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>
27 "--------\n"
29 "Features can either be built-in, modularized, or ignored. Parameters\n"
36 " - - are selected by other feature,\n"
43 "through the available options (i.e. Y->N->M->Y).\n"
48 "----------\n"
49 "o Use the Up/Down arrow keys (cursor keys) to highlight the item you\n"
51 " Submenus are designated by \"--->\", empty ones by \"----\".\n"
55 " through all visible items which use that hotkey.\n"
57 " You may also use the <PAGE UP> and <PAGE DOWN> keys to scroll\n"
60 "o To exit a menu use the cursor keys to highlight the <Exit> button\n"
70 "o To get help with an item, use the cursor keys to highlight <Help>\n"
79 "-----------\n"
80 "o Use the cursor keys to select the option you wish to set and press\n"
86 "o To see available help for the item, use the cursor keys to highlight\n"
96 "-----------\n"
101 "o For help, use the <TAB> or cursor keys to highlight the help option\n"
106 "--------\n"
107 "o Use the cursor keys to scroll up/down/left/right. The VI editor\n"
115 "-----------------------------\n"
116 "Menuconfig supports the use of alternate configuration files for\n"
121 "a file of your choosing. Use the <Load> button to load a previously\n"
124 "Even if you don't use alternate configuration files, but you find\n"
126 "settings, you may use the <Load> button to restore your previously\n"
130 "-----------------\n"
131 "If you use Menuconfig in an XTERM window, make sure you have your\n"
148 "------------------------------\n"
163 "--------------------------------\n"
165 "MENUCONFIG_COLOR. To select a theme use:\n"
177 "<Enter> selects submenus ---> (or empty submenus ----). "
181 "Legend: [*] built-in [ ] excluded <M> module < > module capable",
183 "Use the arrow keys to navigate this window or "
190 "Use the <TAB> key to move from the input field to the buttons below it.",
193 "Use the <TAB> key to move from the input field to the buttons below it.",
196 "Use the <TAB> key to move from the input field to the buttons below it.",
224 "and use the current configuration as an alternate to whatever\n"
235 "-----------------------------------------------------------------\n"
240 " -> Bus options (PCI, PCMCIA, EISA, ISA)\n"
241 " -> PCI support (PCI [=y])\n"
242 "(1) -> PCI access mode (<choice> [=y])\n"
247 "-----------------------------------------------------------------\n"
259 " selectable menu item - and the current value is displayed inside\n"
303 "%s - %s", config_filename, rootmenu.prompt->text); in set_config_filename()
305 menu_backtitle[sizeof(menu_backtitle)-1] = '\0'; in set_config_filename()
310 filename[sizeof(filename)-1] = '\0'; in set_config_filename()
326 tmp = pos->next; in set_subtitle()
332 if (sp->text) { in set_subtitle()
334 pos->next = xcalloc(1, sizeof(*pos)); in set_subtitle()
335 pos = pos->next; in set_subtitle()
339 pos->text = sp->text; in set_subtitle()
351 tmp = pos->next; in reset_subtitle()
370 list_for_each_entry(pos, data->head, entries) { in update_text()
371 if (pos->offset >= start && pos->offset < end) { in update_text()
375 int key = '0' + (pos->index % JUMP_NB) + 1; in update_text()
378 data->keys[k] = key; in update_text()
379 data->targets[k] = pos->target; in update_text()
385 memcpy(buf + pos->offset, header, sizeof(header) - 1); in update_text()
388 data->keys[k] = 0; in update_text()
412 case 0: in search_conf()
414 case 1: in search_conf()
453 conf(targets[i]->parent, targets[i]); in search_conf()
486 sym = menu->sym; in build_conf()
487 prop = menu->prompt; in build_conf()
491 switch (prop->type) { in build_conf()
492 case P_MENU: in build_conf()
496 menu->data ? "-->" : "++>", in build_conf()
501 menu_is_empty(menu) ? "----" : "--->"); in build_conf()
504 if (single_menu_mode && menu->data) in build_conf()
507 case P_COMMENT: in build_conf()
518 item_make("---%*c%s", indent + 1, ' ', prompt); in build_conf()
534 for (child = menu->list; child; child = child->next) { in build_conf()
535 if (menu_is_visible(child) && child->sym == def_sym) in build_conf()
542 case S_BOOLEAN: in build_conf()
545 case S_TRISTATE: in build_conf()
547 case yes: ch = '*'; break; in build_conf()
548 case mod: ch = 'M'; break; in build_conf()
566 item_add_str(" --->"); in build_conf()
567 if (def_menu->list) { in build_conf()
570 indent -= 2; in build_conf()
577 item_make("---%*c%s", indent + 1, ' ', menu_get_prompt(menu)); in build_conf()
590 case S_BOOLEAN: in build_conf()
594 item_make("-%c-", val == no ? ' ' : '*'); in build_conf()
598 case S_TRISTATE: in build_conf()
600 case yes: ch = '*'; break; in build_conf()
601 case mod: ch = 'M'; break; in build_conf()
605 if (sym->rev_dep.tri == mod) in build_conf()
610 item_make("-%c-", ch); in build_conf()
617 tmp = indent - tmp + 4; in build_conf()
631 if (menu->prompt->type == P_MENU) { in build_conf()
632 item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->"); in build_conf()
639 for (child = menu->list; child; child = child->next) in build_conf()
641 indent -= doint; in build_conf()
670 if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL) in conf()
681 sym = submenu->sym; in conf()
686 case 0: in conf()
688 case 'm': in conf()
690 submenu->data = (void *) (long) !submenu->data; in conf()
694 case 't': in conf()
697 else if (submenu->prompt->type == P_MENU) in conf()
700 case 's': in conf()
705 case 2: in conf()
713 case 3: in conf()
717 case 4: in conf()
721 case 5: in conf()
729 case 6: in conf()
733 case 7: in conf()
737 case 8: in conf()
743 case 9: in conf()
746 case 10: in conf()
789 help.max_width = getmaxx(stdscr) - 10; in show_help()
802 active = sym_get_choice_value(menu->sym); in conf_choice()
809 for (child = menu->list; child; child = child->next) { in conf_choice()
812 if (child->sym) in conf_choice()
819 if (child->sym == active) in conf_choice()
821 if (child->sym == sym_get_choice_value(menu->sym)) in conf_choice()
832 case 0: in conf_choice()
835 if (!child->sym) in conf_choice()
838 sym_set_tristate_value(child->sym, yes); in conf_choice()
841 case 1: in conf_choice()
845 active = child->sym; in conf_choice()
849 case KEY_ESC: in conf_choice()
851 case -ERRDISPLAYTOOSMALL: in conf_choice()
865 switch (sym_get_type(menu->sym)) { in conf_string()
866 case S_INT: in conf_string()
869 case S_HEX: in conf_string()
872 case S_STRING: in conf_string()
881 sym_get_string_value(menu->sym)); in conf_string()
883 case 0: in conf_string()
884 if (sym_set_string_value(menu->sym, dialog_input_result)) in conf_string()
888 case 1: in conf_string()
891 case KEY_ESC: in conf_string()
906 case 0: in conf_load()
916 case 1: in conf_load()
919 case KEY_ESC: in conf_load()
933 case 0: in conf_save()
942 case 1: in conf_save()
945 case KEY_ESC: in conf_save()
964 res = -1; in handle_exit()
969 case 0: in handle_exit()
979 case -1: in handle_exit()
1011 if (ac > 1 && strcmp(av[1], "-s") == 0) { in main()