Lines Matching +full:use +full:- +full:case
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
5 * Introduced single menu mode (show all sub-menus in one large tree).
6 * 2002-11-06 Petr Baudis <pasky@ucw.cz>
24 #include "mnconf-common.h"
28 "--------\n"
30 "Features can either be built-in, modularized, or ignored. Parameters\n"
37 " - - are selected by other feature,\n"
44 "through the available options (i.e. Y->N->M->Y).\n"
49 "----------\n"
50 "o Use the Up/Down arrow keys (cursor keys) to highlight the item you\n"
52 " Submenus are designated by \"--->\", empty ones by \"----\".\n"
56 " through all visible items which use that hotkey.\n"
58 " You may also use the <PAGE UP> and <PAGE DOWN> keys to scroll\n"
61 "o To exit a menu use the cursor keys to highlight the <Exit> button\n"
71 "o To get help with an item, use the cursor keys to highlight <Help>\n"
80 "-----------\n"
81 "o Use the cursor keys to select the option you wish to set and press\n"
87 "o To see available help for the item, use the cursor keys to highlight\n"
97 "-----------\n"
102 "o For help, use the <TAB> or cursor keys to highlight the help option\n"
107 "--------\n"
108 "o Use the cursor keys to scroll up/down/left/right. The VI editor\n"
116 "-----------------------------\n"
117 "Menuconfig supports the use of alternate configuration files for\n"
122 "a file of your choosing. Use the <Load> button to load a previously\n"
125 "Even if you don't use alternate configuration files, but you find\n"
127 "settings, you may use the <Load> button to restore your previously\n"
131 "-----------------\n"
132 "If you use Menuconfig in an XTERM window, make sure you have your\n"
149 "------------------------------\n"
165 "-------\n"
166 "Pressing the forward-slash (/) anywhere brings up a search dialog box.\n"
170 "--------------------------------\n"
172 "MENUCONFIG_COLOR. To select a theme use:\n"
184 "<Enter> selects submenus ---> (or empty submenus ----). "
188 "Legend: [*] built-in [ ] excluded <M> module < > module capable",
190 "Use the arrow keys to navigate this window or "
197 "Use the <TAB> key to move from the input field to the buttons below it.",
200 "Use the <TAB> key to move from the input field to the buttons below it.",
203 "Use the <TAB> key to move from the input field to the buttons below it.",
231 "and use the current configuration as an alternate to whatever\n"
242 "-----------------------------------------------------------------\n"
247 " -> Bus options (PCI, PCMCIA, EISA, ISA)\n"
248 " -> PCI support (PCI [=y])\n"
249 "(1) -> PCI access mode (<choice> [=y])\n"
254 "-----------------------------------------------------------------\n"
266 " selectable menu item - and the current value is displayed inside\n"
298 snprintf(menu_backtitle, sizeof(menu_backtitle), "%s - %s", in set_config_filename()
299 config_filename, rootmenu.prompt->text); in set_config_filename()
318 tmp = pos->next; in set_subtitle()
324 if (sp->text) { in set_subtitle()
326 pos->next = xcalloc(1, sizeof(*pos)); in set_subtitle()
327 pos = pos->next; in set_subtitle()
331 pos->text = sp->text; in set_subtitle()
343 tmp = pos->next; in reset_subtitle()
374 help.max_width = getmaxx(stdscr) - 10; in show_help()
402 case 0: in search_conf()
404 case 1: in search_conf()
439 conf(data.target->parent, data.target); in search_conf()
472 sym = menu->sym; in build_conf()
473 prop = menu->prompt; in build_conf()
477 switch (prop->type) { in build_conf()
478 case P_MENU: in build_conf()
482 menu->data ? "-->" : "++>", in build_conf()
487 menu_is_empty(menu) ? "----" : "--->"); in build_conf()
490 if (single_menu_mode && menu->data) in build_conf()
493 case P_COMMENT: in build_conf()
504 item_make("---%*c%s", indent + 1, ' ', prompt); in build_conf()
520 for (child = menu->list; child; child = child->next) { in build_conf()
521 if (menu_is_visible(child) && child->sym == def_sym) in build_conf()
528 case S_BOOLEAN: in build_conf()
531 case S_TRISTATE: in build_conf()
533 case yes: ch = '*'; break; in build_conf()
534 case mod: ch = 'M'; break; in build_conf()
552 item_add_str(" --->"); in build_conf()
553 if (def_menu->list) { in build_conf()
556 indent -= 2; in build_conf()
563 item_make("---%*c%s", indent + 1, ' ', menu_get_prompt(menu)); in build_conf()
576 case S_BOOLEAN: in build_conf()
580 item_make("-%c-", val == no ? ' ' : '*'); in build_conf()
584 case S_TRISTATE: in build_conf()
586 case yes: ch = '*'; break; in build_conf()
587 case mod: ch = 'M'; break; in build_conf()
591 if (sym->rev_dep.tri == mod) in build_conf()
596 item_make("-%c-", ch); in build_conf()
603 tmp = indent - tmp + 4; in build_conf()
617 if (menu->prompt->type == P_MENU) { in build_conf()
618 item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->"); in build_conf()
625 for (child = menu->list; child; child = child->next) in build_conf()
627 indent -= doint; in build_conf()
636 active = sym_get_choice_value(menu->sym); in conf_choice()
643 for (child = menu->list; child; child = child->next) { in conf_choice()
646 if (child->sym) in conf_choice()
653 if (child->sym == active) in conf_choice()
655 if (child->sym == sym_get_choice_value(menu->sym)) in conf_choice()
666 case 0: in conf_choice()
669 if (!child->sym) in conf_choice()
672 sym_set_tristate_value(child->sym, yes); in conf_choice()
675 case 1: in conf_choice()
679 active = child->sym; in conf_choice()
683 case KEY_ESC: in conf_choice()
685 case -ERRDISPLAYTOOSMALL: in conf_choice()
699 switch (sym_get_type(menu->sym)) { in conf_string()
700 case S_INT: in conf_string()
703 case S_HEX: in conf_string()
706 case S_STRING: in conf_string()
715 sym_get_string_value(menu->sym)); in conf_string()
717 case 0: in conf_string()
718 if (sym_set_string_value(menu->sym, dialog_input_result)) in conf_string()
722 case 1: in conf_string()
725 case KEY_ESC: in conf_string()
740 case 0: in conf_load()
750 case 1: in conf_load()
753 case KEY_ESC: in conf_load()
767 case 0: in conf_save()
776 case 1: in conf_save()
779 case KEY_ESC: in conf_save()
811 if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL) in conf()
822 sym = submenu->sym; in conf()
827 case 0: in conf()
829 case 'm': in conf()
831 submenu->data = (void *) (long) !submenu->data; in conf()
835 case 't': in conf()
838 else if (submenu->prompt->type == P_MENU) in conf()
841 case 's': in conf()
846 case 2: in conf()
854 case 3: in conf()
858 case 4: in conf()
862 case 5: in conf()
870 case 6: in conf()
874 case 7: in conf()
878 case 8: in conf()
884 case 9: in conf()
887 case 10: in conf()
919 res = -1; in handle_exit()
924 case 0: in handle_exit()
934 case -1: in handle_exit()
966 if (ac > 1 && strcmp(av[1], "-s") == 0) { in main()