diff options
Diffstat (limited to 'scripts/kconfig/nconf.c')
| -rw-r--r-- | scripts/kconfig/nconf.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index 87d4b15da95..39ca1f1640e 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c | |||
| @@ -83,10 +83,10 @@ static const char nconf_readme[] = N_( | |||
| 83 | "Text Box (Help Window)\n" | 83 | "Text Box (Help Window)\n" |
| 84 | "--------\n" | 84 | "--------\n" |
| 85 | "o Use the cursor keys to scroll up/down/left/right. The VI editor\n" | 85 | "o Use the cursor keys to scroll up/down/left/right. The VI editor\n" |
| 86 | " keys h,j,k,l function here as do <u>, <d> and <SPACE BAR> for\n" | 86 | " keys h,j,k,l function here as do <SPACE BAR> for those\n" |
| 87 | " those who are familiar with less and lynx.\n" | 87 | " who are familiar with less and lynx.\n" |
| 88 | "\n" | 88 | "\n" |
| 89 | "o Press <Enter>, <F1>, <F5>, <F9>, <q> or <Esc> to exit.\n" | 89 | "o Press <Enter>, <F1>, <F5>, <F7> or <Esc> to exit.\n" |
| 90 | "\n" | 90 | "\n" |
| 91 | "\n" | 91 | "\n" |
| 92 | "Alternate Configuration Files\n" | 92 | "Alternate Configuration Files\n" |
| @@ -182,6 +182,8 @@ setmod_text[] = N_( | |||
| 182 | "This feature depends on another which\n" | 182 | "This feature depends on another which\n" |
| 183 | "has been configured as a module.\n" | 183 | "has been configured as a module.\n" |
| 184 | "As a result, this feature will be built as a module."), | 184 | "As a result, this feature will be built as a module."), |
| 185 | nohelp_text[] = N_( | ||
| 186 | "There is no help available for this option.\n"), | ||
| 185 | load_config_text[] = N_( | 187 | load_config_text[] = N_( |
| 186 | "Enter the name of the configuration file you wish to load.\n" | 188 | "Enter the name of the configuration file you wish to load.\n" |
| 187 | "Accept the name shown to restore the configuration you\n" | 189 | "Accept the name shown to restore the configuration you\n" |
| @@ -223,7 +225,7 @@ search_help[] = N_( | |||
| 223 | "Defined at drivers/pci/Kconfig:47\n" | 225 | "Defined at drivers/pci/Kconfig:47\n" |
| 224 | "Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n" | 226 | "Depends on: X86_LOCAL_APIC && X86_IO_APIC || IA64\n" |
| 225 | "Location:\n" | 227 | "Location:\n" |
| 226 | " -> Bus options (PCI, PCMCIA, EISA, ISA)\n" | 228 | " -> Bus options (PCI, PCMCIA, EISA, MCA, ISA)\n" |
| 227 | " -> PCI support (PCI [ = y])\n" | 229 | " -> PCI support (PCI [ = y])\n" |
| 228 | " -> PCI access mode (<choice> [ = y])\n" | 230 | " -> PCI access mode (<choice> [ = y])\n" |
| 229 | "Selects: LIBCRC32\n" | 231 | "Selects: LIBCRC32\n" |
| @@ -278,9 +280,6 @@ static int global_exit; | |||
| 278 | /* the currently selected button */ | 280 | /* the currently selected button */ |
| 279 | const char *current_instructions = menu_instructions; | 281 | const char *current_instructions = menu_instructions; |
| 280 | 282 | ||
| 281 | static char *dialog_input_result; | ||
| 282 | static int dialog_input_result_len; | ||
| 283 | |||
| 284 | static void conf(struct menu *menu); | 283 | static void conf(struct menu *menu); |
| 285 | static void conf_choice(struct menu *menu); | 284 | static void conf_choice(struct menu *menu); |
| 286 | static void conf_string(struct menu *menu); | 285 | static void conf_string(struct menu *menu); |
| @@ -696,6 +695,7 @@ static void search_conf(void) | |||
| 696 | { | 695 | { |
| 697 | struct symbol **sym_arr; | 696 | struct symbol **sym_arr; |
| 698 | struct gstr res; | 697 | struct gstr res; |
| 698 | char dialog_input_result[100]; | ||
| 699 | char *dialog_input; | 699 | char *dialog_input; |
| 700 | int dres; | 700 | int dres; |
| 701 | again: | 701 | again: |
| @@ -703,7 +703,7 @@ again: | |||
| 703 | _("Search Configuration Parameter"), | 703 | _("Search Configuration Parameter"), |
| 704 | _("Enter " CONFIG_ " (sub)string to search for " | 704 | _("Enter " CONFIG_ " (sub)string to search for " |
| 705 | "(with or without \"" CONFIG_ "\")"), | 705 | "(with or without \"" CONFIG_ "\")"), |
| 706 | "", &dialog_input_result, &dialog_input_result_len); | 706 | "", dialog_input_result, 99); |
| 707 | switch (dres) { | 707 | switch (dres) { |
| 708 | case 0: | 708 | case 0: |
| 709 | break; | 709 | break; |
| @@ -721,7 +721,7 @@ again: | |||
| 721 | dialog_input += strlen(CONFIG_); | 721 | dialog_input += strlen(CONFIG_); |
| 722 | 722 | ||
| 723 | sym_arr = sym_re_search(dialog_input); | 723 | sym_arr = sym_re_search(dialog_input); |
| 724 | res = get_relations_str(sym_arr, NULL); | 724 | res = get_relations_str(sym_arr); |
| 725 | free(sym_arr); | 725 | free(sym_arr); |
| 726 | show_scroll_win(main_window, | 726 | show_scroll_win(main_window, |
| 727 | _("Search Results"), str_get(&res)); | 727 | _("Search Results"), str_get(&res)); |
| @@ -1348,6 +1348,7 @@ static void conf_choice(struct menu *menu) | |||
| 1348 | static void conf_string(struct menu *menu) | 1348 | static void conf_string(struct menu *menu) |
| 1349 | { | 1349 | { |
| 1350 | const char *prompt = menu_get_prompt(menu); | 1350 | const char *prompt = menu_get_prompt(menu); |
| 1351 | char dialog_input_result[256]; | ||
| 1351 | 1352 | ||
| 1352 | while (1) { | 1353 | while (1) { |
| 1353 | int res; | 1354 | int res; |
| @@ -1370,8 +1371,8 @@ static void conf_string(struct menu *menu) | |||
| 1370 | prompt ? _(prompt) : _("Main Menu"), | 1371 | prompt ? _(prompt) : _("Main Menu"), |
| 1371 | heading, | 1372 | heading, |
| 1372 | sym_get_string_value(menu->sym), | 1373 | sym_get_string_value(menu->sym), |
| 1373 | &dialog_input_result, | 1374 | dialog_input_result, |
| 1374 | &dialog_input_result_len); | 1375 | sizeof(dialog_input_result)); |
| 1375 | switch (res) { | 1376 | switch (res) { |
| 1376 | case 0: | 1377 | case 0: |
| 1377 | if (sym_set_string_value(menu->sym, | 1378 | if (sym_set_string_value(menu->sym, |
| @@ -1391,13 +1392,14 @@ static void conf_string(struct menu *menu) | |||
| 1391 | 1392 | ||
| 1392 | static void conf_load(void) | 1393 | static void conf_load(void) |
| 1393 | { | 1394 | { |
| 1395 | char dialog_input_result[256]; | ||
| 1394 | while (1) { | 1396 | while (1) { |
| 1395 | int res; | 1397 | int res; |
| 1396 | res = dialog_inputbox(main_window, | 1398 | res = dialog_inputbox(main_window, |
| 1397 | NULL, load_config_text, | 1399 | NULL, load_config_text, |
| 1398 | filename, | 1400 | filename, |
| 1399 | &dialog_input_result, | 1401 | dialog_input_result, |
| 1400 | &dialog_input_result_len); | 1402 | sizeof(dialog_input_result)); |
| 1401 | switch (res) { | 1403 | switch (res) { |
| 1402 | case 0: | 1404 | case 0: |
| 1403 | if (!dialog_input_result[0]) | 1405 | if (!dialog_input_result[0]) |
| @@ -1422,13 +1424,14 @@ static void conf_load(void) | |||
| 1422 | 1424 | ||
| 1423 | static void conf_save(void) | 1425 | static void conf_save(void) |
| 1424 | { | 1426 | { |
| 1427 | char dialog_input_result[256]; | ||
| 1425 | while (1) { | 1428 | while (1) { |
| 1426 | int res; | 1429 | int res; |
| 1427 | res = dialog_inputbox(main_window, | 1430 | res = dialog_inputbox(main_window, |
| 1428 | NULL, save_config_text, | 1431 | NULL, save_config_text, |
| 1429 | filename, | 1432 | filename, |
| 1430 | &dialog_input_result, | 1433 | dialog_input_result, |
| 1431 | &dialog_input_result_len); | 1434 | sizeof(dialog_input_result)); |
| 1432 | switch (res) { | 1435 | switch (res) { |
| 1433 | case 0: | 1436 | case 0: |
| 1434 | if (!dialog_input_result[0]) | 1437 | if (!dialog_input_result[0]) |
| @@ -1503,11 +1506,7 @@ int main(int ac, char **av) | |||
| 1503 | } | 1506 | } |
| 1504 | 1507 | ||
| 1505 | notimeout(stdscr, FALSE); | 1508 | notimeout(stdscr, FALSE); |
| 1506 | #if NCURSES_REENTRANT | ||
| 1507 | set_escdelay(1); | ||
| 1508 | #else | ||
| 1509 | ESCDELAY = 1; | 1509 | ESCDELAY = 1; |
| 1510 | #endif | ||
| 1511 | 1510 | ||
| 1512 | /* set btns menu */ | 1511 | /* set btns menu */ |
| 1513 | curses_menu = new_menu(curses_menu_items); | 1512 | curses_menu = new_menu(curses_menu_items); |
