Lines Matching +full:long +full:- +full:press +full:- +full:mode
1 // SPDX-License-Identifier: GPL-2.0
18 #include "mnconf-common.h"
24 "------------\n"
31 " of <?> <h>, or if in a data entry window then press <F1>.\n"
35 "------------\n"
37 "build. Kernel features can either be built-in, modularized, or removed.\n"
44 " - - are selected by another feature\n"
50 "listed below and press <y> to build it in, <m> to make it a module or\n"
51 "<n> to remove it. You may press the <Space> key to cycle through the\n"
54 "A trailing \"--->\" designates a submenu, a trailing \"----\" an\n"
58 "----------------------------------------------------------------------\n"
70 "Start incremental, case-insensitive search for STRING in menu entries,\n"
76 "Exit menu search mode </> <Esc>\n"
80 "----------------------------------------------------------------------\n"
87 "-----------------------\n"
89 "and press <Space>.\n"
93 "----------\n"
94 "Enter the requested information and press <Enter>. Hexadecimal values\n"
99 "----------------------\n"
102 "Press any of <Enter> <Esc> <q> <F5> <F9> to exit.\n"
106 "-----------------------------\n"
108 "Press <F6> to save your current configuration. Press <F7> and enter\n"
113 "----------------------\n"
123 "Single menu mode\n"
124 "----------------\n"
133 "leading \"++>\" and unfolded entries by a leading \"-->\".\n"
135 "Note that this mode can eventually be a little more CPU expensive than\n"
136 "the default mode, especially with a larger number of unfolded submenus.\n"
139 "Legend: [*] built-in [ ] excluded <M> module < > module capable.\n"
140 "Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n"
148 "To search for menu entries press </>.\n"
152 "Press <1> instead of <F1>, <2> instead of <F2>, etc.\n"
154 "For help related to the current menu entry press <?> or <h>.\n",
156 "Legend: [*] built-in [ ] excluded <M> module < > module capable.\n"
157 "Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n"
165 "To search for menu entries press </>.\n"
169 "For verbose global help press <F1>.\n"
170 "For help related to the current menu entry press <?> or <h>.\n",
172 "Press <Up>, <Down>, <Home> or <End> to navigate a radiolist, select\n"
174 "For help related to the current entry press <?> or <h>.\n"
175 "For global help press <F1>.\n",
179 "Press <Enter> to apply, <Esc> to cancel.",
182 "Press <Enter> to apply, <Esc> to cancel.",
185 "Press <Enter> to apply, <Esc> to cancel.",
219 "-----------------------------------------------------------------\n"
225 " -> Bus options (PCI, PCMCIA, EISA, ISA)\n"
226 " -> PCI support (PCI [ = y])\n"
227 "(1) -> PCI access mode (<choice> [ = y])\n"
230 "-----------------------------------------------------------------\n"
242 " Press the key in the (#) prefix to jump directly to that\n"
383 mvwprintw(main_window, lines-3, offset, in print_function_line()
388 mvwprintw(main_window, lines-3, in print_function_line()
505 /* return the index of the matched item, or -1 if no such item exists */
513 return -1; in get_mext_match()
518 --match_start; in get_mext_match()
528 --index; in get_mext_match()
533 return -1; in get_mext_match()
542 if (items_num > MAX_MENU_ITEMS-1) in item_make()
581 int index = items_num-1; in item_add_str()
597 k_menu_items[index].str[sizeof(k_menu_items[index].str) - 1] = '\0'; in item_add_str()
617 return mcur->tag; in item_tag()
634 return mcur->usrptr; in item_data()
647 snprintf(menu_backtitle, sizeof(menu_backtitle), "%s - %s", in set_config_filename()
648 config_filename, rootmenu.prompt->text); in set_config_filename()
654 * -1 means go on doing what you were doing
671 return -1; in do_exit()
752 selected_conf(data.target->parent, data.target); in search_conf()
774 sym = menu->sym; in build_conf()
775 prop = menu->prompt; in build_conf()
780 ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; in build_conf()
787 menu->data ? "-->" : "++>", in build_conf()
793 menu_is_empty(menu) ? "----" : "--->"); in build_conf()
795 if (single_menu_mode && menu->data) in build_conf()
810 item_make(menu, ':', "---%*c%s", in build_conf()
826 for (child = menu->list; child; child = child->next) { in build_conf()
827 if (menu_is_visible(child) && child->sym == def_sym) in build_conf()
837 item_add_str(" (%s) --->", menu_get_prompt(def_menu)); in build_conf()
842 "---%*c%s", indent + 1, in build_conf()
854 item_make(menu, 't', "-%c-", in build_conf()
870 if (sym->rev_dep.tri == mod) in build_conf()
875 item_make(menu, 't', "-%c-", ch); in build_conf()
881 tmp = indent - tmp + 4; in build_conf()
893 if (menu->prompt && menu->prompt->type == P_MENU) { in build_conf()
894 item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->"); in build_conf()
901 for (child = menu->list; child; child = child->next) in build_conf()
903 indent -= doint; in build_conf()
922 toprow = max(selected_index-mwin_max_lines/2, 0); in center_item()
923 if (toprow >= item_count(curses_menu)-mwin_max_lines) in center_item()
924 toprow = item_count(curses_menu)-mwin_max_lines; in center_item()
958 maxx = min(maxx, mwin_max_cols-2); in show_menu()
964 (mwin_max_cols-maxx)/2); in show_menu()
1002 * item to center, or -1 otherwise.
1003 * Else return -1 .
1009 *ans = -1; in do_match()
1010 if (key == '/' || (state->in_search && key == 27)) { in do_match()
1014 state->in_search = 1-state->in_search; in do_match()
1015 bzero(state->pattern, sizeof(state->pattern)); in do_match()
1016 state->match_direction = MATCH_TINKER_PATTERN_DOWN; in do_match()
1018 } else if (!state->in_search) in do_match()
1022 state->pattern[strlen(state->pattern)] = c; in do_match()
1023 state->pattern[strlen(state->pattern)] = '\0'; in do_match()
1024 adj_match_dir(&state->match_direction); in do_match()
1025 *ans = get_mext_match(state->pattern, in do_match()
1026 state->match_direction); in do_match()
1028 state->match_direction = FIND_NEXT_MATCH_DOWN; in do_match()
1029 *ans = get_mext_match(state->pattern, in do_match()
1030 state->match_direction); in do_match()
1032 state->match_direction = FIND_NEXT_MATCH_UP; in do_match()
1033 *ans = get_mext_match(state->pattern, in do_match()
1034 state->match_direction); in do_match()
1036 state->pattern[strlen(state->pattern)-1] = '\0'; in do_match()
1037 adj_match_dir(&state->match_direction); in do_match()
1042 state->in_search = 0; in do_match()
1043 bzero(state->pattern, sizeof(state->pattern)); in do_match()
1047 return -1; in do_match()
1082 if ((struct menu *) mcur->usrptr == active_menu) { in selected_conf()
1104 if (current_index != -1) in selected_conf()
1161 sym = submenu->sym; in selected_conf()
1175 submenu->data = in selected_conf()
1176 (void *) (long) !submenu->data; in selected_conf()
1183 else if (submenu->prompt && in selected_conf()
1184 submenu->prompt->type == P_MENU) in selected_conf()
1251 for (i = 0, child = menu->list; child; child = child->next) { in conf_choice()
1255 if (child->sym == sym_calc_choice(menu)) in conf_choice()
1258 else if (child->sym) in conf_choice()
1265 if (child->sym == active){ in conf_choice()
1286 if (selected_index != -1) in conf_choice()
1332 if (!child || !menu_is_visible(child) || !child->sym) in conf_choice()
1338 choice_set_value(menu, child->sym); in conf_choice()
1343 active = child->sym; in conf_choice()
1359 switch (sym_get_type(menu->sym)) { in conf_string()
1375 sym_get_string_value(menu->sym), in conf_string()
1380 if (sym_set_string_value(menu->sym, in conf_string()
1468 main_window = newwin(lines-2, columns-2, 2, 1); in setup_windows()
1470 mwin_max_lines = lines-7; in setup_windows()
1471 mwin_max_cols = columns-6; in setup_windows()
1480 char *mode; in main() local
1484 if (ac > 1 && strcmp(av[1], "-s") == 0) { in main()
1492 mode = getenv("NCONFIG_MODE"); in main()
1493 if (mode) { in main()
1494 if (!strcasecmp(mode, "single_menu")) in main()