diff options
author | Ron Yorston <rmy@pobox.com> | 2022-11-16 14:43:33 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2022-11-16 14:43:33 +0000 |
commit | 13b71ecafba53ebe8e4f88f9af70170b032ba408 (patch) | |
tree | b0b4a6b1fc5359eebbc556d1d133e7f3e681f5c3 | |
parent | 04e7f6dd0fc57ab98f39fb6fc9df610d0737ff17 (diff) | |
download | busybox-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)
-rw-r--r-- | scripts/kconfig/lxdialog/util.c | 3 |
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 | */ |
139 | void init_dialog(void) | 139 | void 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(); |