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>
29 "--------\n"
31 "Features can either be built-in, modularized, or ignored. Parameters\n"
38 " - - are selected by other feature,\n"
45 "through the available options (i.e. Y->N->M->Y).\n"
50 "----------\n"
51 "o Use the Up/Down arrow keys (cursor keys) to highlight the item you\n"
53 " Submenus are designated by \"--->\", empty ones by \"----\".\n"
57 " through all visible items which use that hotkey.\n"
59 " You may also use the <PAGE UP> and <PAGE DOWN> keys to scroll\n"
62 "o To exit a menu use the cursor keys to highlight the <Exit> button\n"
72 "o To get help with an item, use the cursor keys to highlight <Help>\n"
81 "-----------\n"
82 "o Use the cursor keys to select the option you wish to set and press\n"
88 "o To see available help for the item, use the cursor keys to highlight\n"
98 "-----------\n"
103 "o For help, use the <TAB> or cursor keys to highlight the help option\n"
108 "--------\n"
109 "o Use the cursor keys to scroll up/down/left/right. The VI editor\n"
117 "-----------------------------\n"
118 "Menuconfig supports the use of alternate configuration files for\n"
123 "a file of your choosing. Use the <Load> button to load a previously\n"
126 "Even if you don't use alternate configuration files, but you find\n"
128 "settings, you may use the <Load> button to restore your previously\n"
132 "-----------------\n"
133 "If you use Menuconfig in an XTERM window, make sure you have your\n"
150 "------------------------------\n"
165 "--------------------------------\n"
167 "MENUCONFIG_COLOR. To select a theme use:\n"
179 "<Enter> selects submenus ---> (or empty submenus ----). "
183 "Legend: [*] built-in [ ] excluded <M> module < > module capable",
185 "Use the arrow keys to navigate this window or "
192 "Use the <TAB> key to move from the input field to the buttons below it.",
195 "Use the <TAB> key to move from the input field to the buttons below it.",
198 "Use the <TAB> key to move from the input field to the buttons below it.",
226 "and use the current configuration as an alternate to whatever\n"
237 "-----------------------------------------------------------------\n"
242 " -> Bus options (PCI, PCMCIA, EISA, ISA)\n"
243 " -> PCI support (PCI [=y])\n"
244 "(1) -> PCI access mode (<choice> [=y])\n"
249 "-----------------------------------------------------------------\n"
261 " selectable menu item - and the current value is displayed inside\n"
303 snprintf(menu_backtitle, sizeof(menu_backtitle), "%s - %s", in set_config_filename()
304 config_filename, rootmenu.prompt->text); in set_config_filename()
323 tmp = pos->next; in set_subtitle()
329 if (sp->text) { in set_subtitle()
331 pos->next = xcalloc(1, sizeof(*pos)); in set_subtitle()
332 pos = pos->next; in set_subtitle()
336 pos->text = sp->text; in set_subtitle()
348 tmp = pos->next; in reset_subtitle()
367 list_for_each_entry(pos, data->head, entries) { in update_text()
368 if (pos->offset >= start && pos->offset < end) { in update_text()
372 int key = '0' + (pos->index % JUMP_NB) + 1; in update_text()
375 data->keys[k] = key; in update_text()
376 data->targets[k] = pos->target; in update_text()
382 memcpy(buf + pos->offset, header, sizeof(header) - 1); in update_text()
385 data->keys[k] = 0; in update_text()
409 case 0: in search_conf()
411 case 1: in search_conf()
450 conf(targets[i]->parent, targets[i]); in search_conf()
483 sym = menu->sym; in build_conf()
484 prop = menu->prompt; in build_conf()
488 switch (prop->type) { in build_conf()
489 case P_MENU: in build_conf()
493 menu->data ? "-->" : "++>", in build_conf()
498 menu_is_empty(menu) ? "----" : "--->"); in build_conf()
501 if (single_menu_mode && menu->data) in build_conf()
504 case P_COMMENT: in build_conf()
515 item_make("---%*c%s", indent + 1, ' ', prompt); in build_conf()
531 for (child = menu->list; child; child = child->next) { in build_conf()
532 if (menu_is_visible(child) && child->sym == def_sym) in build_conf()
539 case S_BOOLEAN: in build_conf()
542 case S_TRISTATE: in build_conf()
544 case yes: ch = '*'; break; in build_conf()
545 case mod: ch = 'M'; break; in build_conf()
563 item_add_str(" --->"); in build_conf()
564 if (def_menu->list) { in build_conf()
567 indent -= 2; in build_conf()
574 item_make("---%*c%s", indent + 1, ' ', menu_get_prompt(menu)); in build_conf()
587 case S_BOOLEAN: in build_conf()
591 item_make("-%c-", val == no ? ' ' : '*'); in build_conf()
595 case S_TRISTATE: in build_conf()
597 case yes: ch = '*'; break; in build_conf()
598 case mod: ch = 'M'; break; in build_conf()
602 if (sym->rev_dep.tri == mod) in build_conf()
607 item_make("-%c-", ch); in build_conf()
614 tmp = indent - tmp + 4; in build_conf()
628 if (menu->prompt->type == P_MENU) { in build_conf()
629 item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->"); in build_conf()
636 for (child = menu->list; child; child = child->next) in build_conf()
638 indent -= doint; in build_conf()
667 if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL) in conf()
678 sym = submenu->sym; in conf()
683 case 0: in conf()
685 case 'm': in conf()
687 submenu->data = (void *) (long) !submenu->data; in conf()
691 case 't': in conf()
694 else if (submenu->prompt->type == P_MENU) in conf()
697 case 's': in conf()
702 case 2: in conf()
710 case 3: in conf()
714 case 4: in conf()
718 case 5: in conf()
726 case 6: in conf()
730 case 7: in conf()
734 case 8: in conf()
740 case 9: in conf()
743 case 10: in conf()
786 help.max_width = getmaxx(stdscr) - 10; in show_help()
799 active = sym_get_choice_value(menu->sym); in conf_choice()
806 for (child = menu->list; child; child = child->next) { in conf_choice()
809 if (child->sym) in conf_choice()
816 if (child->sym == active) in conf_choice()
818 if (child->sym == sym_get_choice_value(menu->sym)) in conf_choice()
829 case 0: in conf_choice()
832 if (!child->sym) in conf_choice()
835 sym_set_tristate_value(child->sym, yes); in conf_choice()
838 case 1: in conf_choice()
842 active = child->sym; in conf_choice()
846 case KEY_ESC: in conf_choice()
848 case -ERRDISPLAYTOOSMALL: in conf_choice()
862 switch (sym_get_type(menu->sym)) { in conf_string()
863 case S_INT: in conf_string()
866 case S_HEX: in conf_string()
869 case S_STRING: in conf_string()
878 sym_get_string_value(menu->sym)); in conf_string()
880 case 0: in conf_string()
881 if (sym_set_string_value(menu->sym, dialog_input_result)) in conf_string()
885 case 1: in conf_string()
888 case KEY_ESC: in conf_string()
903 case 0: in conf_load()
913 case 1: in conf_load()
916 case KEY_ESC: in conf_load()
930 case 0: in conf_save()
939 case 1: in conf_save()
942 case KEY_ESC: in conf_save()
961 res = -1; in handle_exit()
966 case 0: in handle_exit()
976 case -1: in handle_exit()
1008 if (ac > 1 && strcmp(av[1], "-s") == 0) { in main()