diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2021-04-10 22:45:34 +0300 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2021-04-14 09:25:13 +0300 |
commit | 93487b17b147f22400378240d06f33badc3368da (patch) | |
tree | d4dfb6beb1160e422d4b87e34a0b1028dde12071 /scripts/kconfig/nconf.h | |
parent | 16b0e10238b45251790ea1a2683855d4f8f3c1a3 (diff) | |
download | linux-93487b17b147f22400378240d06f33badc3368da.tar.xz |
kconfig: nconf: refactor attributes setup code
The current attributes setup code is strange; the array attribute[]
is set to values outside the range of the attribute_t enum.
At least,
attributes_t attributes[ATTR_MAX+1] = {0};
... should be
int attribute[ATTR_MAX+1] = {0};
Also, there is no need to hard-code the color-pair numbers in
attributes_t.
The current code is messy. Rewrite it.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/nconf.h')
-rw-r--r-- | scripts/kconfig/nconf.h | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/scripts/kconfig/nconf.h b/scripts/kconfig/nconf.h index fa5245eb93a7..90a1ae331878 100644 --- a/scripts/kconfig/nconf.h +++ b/scripts/kconfig/nconf.h @@ -32,30 +32,26 @@ typeof(b) _b = b;\ _a < _b ? _a : _b; }) -typedef enum { - NORMAL = 1, - MAIN_HEADING, - MAIN_MENU_BOX, - MAIN_MENU_FORE, - MAIN_MENU_BACK, - MAIN_MENU_GREY, - MAIN_MENU_HEADING, - SCROLLWIN_TEXT, - SCROLLWIN_HEADING, - SCROLLWIN_BOX, - DIALOG_TEXT, - DIALOG_MENU_FORE, - DIALOG_MENU_BACK, - DIALOG_BOX, - INPUT_BOX, - INPUT_HEADING, - INPUT_TEXT, - INPUT_FIELD, - FUNCTION_TEXT, - FUNCTION_HIGHLIGHT, - ATTR_MAX -} attributes_t; -extern attributes_t attributes[]; +extern int attr_normal; +extern int attr_main_heading; +extern int attr_main_menu_box; +extern int attr_main_menu_fore; +extern int attr_main_menu_back; +extern int attr_main_menu_grey; +extern int attr_main_menu_heading; +extern int attr_scrollwin_text; +extern int attr_scrollwin_heading; +extern int attr_scrollwin_box; +extern int attr_dialog_text; +extern int attr_dialog_menu_fore; +extern int attr_dialog_menu_back; +extern int attr_dialog_box; +extern int attr_input_box; +extern int attr_input_heading; +extern int attr_input_text; +extern int attr_input_field; +extern int attr_function_text; +extern int attr_function_highlight; typedef enum { F_HELP = 1, |