diff options
Diffstat (limited to 'scripts/kconfig/nconf.c')
-rw-r--r-- | scripts/kconfig/nconf.c | 30 |
1 files changed, 9 insertions, 21 deletions
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index 488dd741078..39ca1f1640e 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c | |||
@@ -7,7 +7,7 @@ | |||
7 | */ | 7 | */ |
8 | #define _GNU_SOURCE | 8 | #define _GNU_SOURCE |
9 | #include <string.h> | 9 | #include <string.h> |
10 | #define LKC_DIRECT_LINK | 10 | |
11 | #include "lkc.h" | 11 | #include "lkc.h" |
12 | #include "nconf.h" | 12 | #include "nconf.h" |
13 | #include <ctype.h> | 13 | #include <ctype.h> |
@@ -1067,7 +1067,6 @@ static void conf(struct menu *menu) | |||
1067 | struct menu *submenu = 0; | 1067 | struct menu *submenu = 0; |
1068 | const char *prompt = menu_get_prompt(menu); | 1068 | const char *prompt = menu_get_prompt(menu); |
1069 | struct symbol *sym; | 1069 | struct symbol *sym; |
1070 | struct menu *active_menu = NULL; | ||
1071 | int res; | 1070 | int res; |
1072 | int current_index = 0; | 1071 | int current_index = 0; |
1073 | int last_top_row = 0; | 1072 | int last_top_row = 0; |
@@ -1152,13 +1151,9 @@ static void conf(struct menu *menu) | |||
1152 | continue; | 1151 | continue; |
1153 | 1152 | ||
1154 | submenu = (struct menu *) item_data(); | 1153 | submenu = (struct menu *) item_data(); |
1155 | active_menu = (struct menu *)item_data(); | ||
1156 | if (!submenu || !menu_is_visible(submenu)) | 1154 | if (!submenu || !menu_is_visible(submenu)) |
1157 | continue; | 1155 | continue; |
1158 | if (submenu) | 1156 | sym = submenu->sym; |
1159 | sym = submenu->sym; | ||
1160 | else | ||
1161 | sym = NULL; | ||
1162 | 1157 | ||
1163 | switch (res) { | 1158 | switch (res) { |
1164 | case ' ': | 1159 | case ' ': |
@@ -1222,20 +1217,13 @@ static void conf_message_callback(const char *fmt, va_list ap) | |||
1222 | 1217 | ||
1223 | static void show_help(struct menu *menu) | 1218 | static void show_help(struct menu *menu) |
1224 | { | 1219 | { |
1225 | struct gstr help = str_new(); | 1220 | struct gstr help; |
1226 | 1221 | ||
1227 | if (menu && menu->sym && menu_has_help(menu)) { | 1222 | if (!menu) |
1228 | if (menu->sym->name) { | 1223 | return; |
1229 | str_printf(&help, "%s%s:\n\n", CONFIG_, menu->sym->name); | 1224 | |
1230 | str_append(&help, _(menu_get_help(menu))); | 1225 | help = str_new(); |
1231 | str_append(&help, "\n"); | 1226 | menu_get_ext_help(menu, &help); |
1232 | get_symbol_str(&help, menu->sym); | ||
1233 | } else { | ||
1234 | str_append(&help, _(menu_get_help(menu))); | ||
1235 | } | ||
1236 | } else { | ||
1237 | str_append(&help, nohelp_text); | ||
1238 | } | ||
1239 | show_scroll_win(main_window, _(menu_get_prompt(menu)), str_get(&help)); | 1227 | show_scroll_win(main_window, _(menu_get_prompt(menu)), str_get(&help)); |
1240 | str_free(&help); | 1228 | str_free(&help); |
1241 | } | 1229 | } |