aboutsummaryrefslogtreecommitdiff
path: root/scripts/kconfig/lxdialog/util.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2022-11-16 14:43:33 +0000
committerRon Yorston <rmy@pobox.com>2022-11-16 14:43:33 +0000
commit13b71ecafba53ebe8e4f88f9af70170b032ba408 (patch)
treeb0b4a6b1fc5359eebbc556d1d133e7f3e681f5c3 /scripts/kconfig/lxdialog/util.c
parent04e7f6dd0fc57ab98f39fb6fc9df610d0737ff17 (diff)
downloadbusybox-w32-13b71ecafba53ebe8e4f88f9af70170b032ba408.tar.gz
busybox-w32-13b71ecafba53ebe8e4f88f9af70170b032ba408.tar.bz2
busybox-w32-13b71ecafba53ebe8e4f88f9af70170b032ba408.zip
build system: allow monochrome 'make menuconfig'
'make menuconfig' uses a hardcoded colour palette which may be difficult to read. Add support for the 'COLORS' environment variable. Setting this to '0' will cause 'make menuconfig' to be displayed in black and white. (GitHub issue #273)
Diffstat (limited to 'scripts/kconfig/lxdialog/util.c')
-rw-r--r--scripts/kconfig/lxdialog/util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/kconfig/lxdialog/util.c b/scripts/kconfig/lxdialog/util.c
index 072d3eecc..ea3ee4a95 100644
--- a/scripts/kconfig/lxdialog/util.c
+++ b/scripts/kconfig/lxdialog/util.c
@@ -138,6 +138,9 @@ void dialog_clear(void)
138 */ 138 */
139void init_dialog(void) 139void init_dialog(void)
140{ 140{
141 char *colors = getenv("COLORS");
142 use_colors = !(colors && *colors == '0');
143
141 initscr(); /* Init curses */ 144 initscr(); /* Init curses */
142 keypad(stdscr, TRUE); 145 keypad(stdscr, TRUE);
143 cbreak(); 146 cbreak();