Lines Matching +full:long +full:- +full:press +full:- +full:mode

1 // SPDX-License-Identifier: GPL-2.0
17 #include "mnconf-common.h"
23 "------------\n"
30 " of <?> <h>, or if in a data entry window then press <F1>.\n"
34 "------------\n"
36 "build. Kernel features can either be built-in, modularized, or removed.\n"
43 " - - are selected by another feature\n"
49 "listed below and press <y> to build it in, <m> to make it a module or\n"
50 "<n> to remove it. You may press the <Space> key to cycle through the\n"
53 "A trailing \"--->\" designates a submenu, a trailing \"----\" an\n"
57 "----------------------------------------------------------------------\n"
69 "Start incremental, case-insensitive search for STRING in menu entries,\n"
75 "Exit menu search mode </> <Esc>\n"
79 "----------------------------------------------------------------------\n"
86 "-----------------------\n"
88 "and press <Space>.\n"
92 "----------\n"
93 "Enter the requested information and press <Enter>. Hexadecimal values\n"
98 "----------------------\n"
101 "Press any of <Enter> <Esc> <q> <F5> <F9> to exit.\n"
105 "-----------------------------\n"
107 "Press <F6> to save your current configuration. Press <F7> and enter\n"
112 "----------------------\n"
122 "Single menu mode\n"
123 "----------------\n"
132 "leading \"++>\" and unfolded entries by a leading \"-->\".\n"
134 "Note that this mode can eventually be a little more CPU expensive than\n"
135 "the default mode, especially with a larger number of unfolded submenus.\n"
138 "Legend: [*] built-in [ ] excluded <M> module < > module capable.\n"
139 "Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n"
147 "To search for menu entries press </>.\n"
151 "Press <1> instead of <F1>, <2> instead of <F2>, etc.\n"
153 "For help related to the current menu entry press <?> or <h>.\n",
155 "Legend: [*] built-in [ ] excluded <M> module < > module capable.\n"
156 "Submenus are designated by a trailing \"--->\", empty ones by \"----\".\n"
164 "To search for menu entries press </>.\n"
168 "For verbose global help press <F1>.\n"
169 "For help related to the current menu entry press <?> or <h>.\n",
171 "Press <Up>, <Down>, <Home> or <End> to navigate a radiolist, select\n"
173 "For help related to the current entry press <?> or <h>.\n"
174 "For global help press <F1>.\n",
178 "Press <Enter> to apply, <Esc> to cancel.",
181 "Press <Enter> to apply, <Esc> to cancel.",
184 "Press <Enter> to apply, <Esc> to cancel.",
218 "-----------------------------------------------------------------\n"
224 " -> Bus options (PCI, PCMCIA, EISA, ISA)\n"
225 " -> PCI support (PCI [ = y])\n"
226 "(1) -> PCI access mode (<choice> [ = y])\n"
229 "-----------------------------------------------------------------\n"
241 " Press the key in the (#) prefix to jump directly to that\n"
382 mvwprintw(main_window, lines-3, offset, in print_function_line()
387 mvwprintw(main_window, lines-3, in print_function_line()
504 /* return the index of the matched item, or -1 if no such item exists */
512 return -1; in get_mext_match()
517 --match_start; in get_mext_match()
527 --index; in get_mext_match()
532 return -1; in get_mext_match()
541 if (items_num > MAX_MENU_ITEMS-1) in item_make()
580 int index = items_num-1; in item_add_str()
614 return mcur->tag; in item_tag()
631 return mcur->usrptr; in item_data()
644 snprintf(menu_backtitle, sizeof(menu_backtitle), "%s - %s", in set_config_filename()
645 config_filename, rootmenu.prompt->text); in set_config_filename()
651 * -1 means go on doing what you were doing
668 return -1; in do_exit()
749 selected_conf(data.target->parent, data.target); in search_conf()
771 sym = menu->sym; in build_conf()
772 prop = menu->prompt; in build_conf()
777 ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; in build_conf()
784 menu->data ? "-->" : "++>", in build_conf()
790 menu_is_empty(menu) ? "----" : "--->"); in build_conf()
792 if (single_menu_mode && menu->data) in build_conf()
807 item_make(menu, ':', "---%*c%s", in build_conf()
823 for (child = menu->list; child; child = child->next) { in build_conf()
824 if (menu_is_visible(child) && child->sym == def_sym) in build_conf()
834 item_add_str(" (%s) --->", menu_get_prompt(def_menu)); in build_conf()
839 "---%*c%s", indent + 1, in build_conf()
851 item_make(menu, 't', "-%c-", in build_conf()
867 if (sym->rev_dep.tri == mod) in build_conf()
872 item_make(menu, 't', "-%c-", ch); in build_conf()
878 tmp = indent - tmp + 4; in build_conf()
890 if (menu->prompt && menu->prompt->type == P_MENU) { in build_conf()
891 item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->"); in build_conf()
898 for (child = menu->list; child; child = child->next) in build_conf()
900 indent -= doint; in build_conf()
919 toprow = max(selected_index-mwin_max_lines/2, 0); in center_item()
920 if (toprow >= item_count(curses_menu)-mwin_max_lines) in center_item()
921 toprow = item_count(curses_menu)-mwin_max_lines; in center_item()
955 maxx = min(maxx, mwin_max_cols-2); in show_menu()
961 (mwin_max_cols-maxx)/2); in show_menu()
999 * item to center, or -1 otherwise.
1000 * Else return -1 .
1006 *ans = -1; in do_match()
1007 if (key == '/' || (state->in_search && key == 27)) { in do_match()
1011 state->in_search = 1-state->in_search; in do_match()
1012 bzero(state->pattern, sizeof(state->pattern)); in do_match()
1013 state->match_direction = MATCH_TINKER_PATTERN_DOWN; in do_match()
1015 } else if (!state->in_search) in do_match()
1019 state->pattern[strlen(state->pattern)] = c; in do_match()
1020 state->pattern[strlen(state->pattern)] = '\0'; in do_match()
1021 adj_match_dir(&state->match_direction); in do_match()
1022 *ans = get_mext_match(state->pattern, in do_match()
1023 state->match_direction); in do_match()
1025 state->match_direction = FIND_NEXT_MATCH_DOWN; in do_match()
1026 *ans = get_mext_match(state->pattern, in do_match()
1027 state->match_direction); in do_match()
1029 state->match_direction = FIND_NEXT_MATCH_UP; in do_match()
1030 *ans = get_mext_match(state->pattern, in do_match()
1031 state->match_direction); in do_match()
1033 state->pattern[strlen(state->pattern)-1] = '\0'; in do_match()
1034 adj_match_dir(&state->match_direction); in do_match()
1039 state->in_search = 0; in do_match()
1040 bzero(state->pattern, sizeof(state->pattern)); in do_match()
1044 return -1; in do_match()
1079 if ((struct menu *) mcur->usrptr == active_menu) { in selected_conf()
1101 if (current_index != -1) in selected_conf()
1158 sym = submenu->sym; in selected_conf()
1172 submenu->data = in selected_conf()
1173 (void *) (long) !submenu->data; in selected_conf()
1180 else if (submenu->prompt && in selected_conf()
1181 submenu->prompt->type == P_MENU) in selected_conf()
1248 for (i = 0, child = menu->list; child; child = child->next) { in conf_choice()
1252 if (child->sym == sym_calc_choice(menu)) in conf_choice()
1255 else if (child->sym) in conf_choice()
1262 if (child->sym == active){ in conf_choice()
1283 if (selected_index != -1) in conf_choice()
1329 if (!child || !menu_is_visible(child) || !child->sym) in conf_choice()
1335 choice_set_value(menu, child->sym); in conf_choice()
1340 active = child->sym; in conf_choice()
1356 switch (sym_get_type(menu->sym)) { in conf_string()
1372 sym_get_string_value(menu->sym), in conf_string()
1377 if (sym_set_string_value(menu->sym, in conf_string()
1465 main_window = newwin(lines-2, columns-2, 2, 1); in setup_windows()
1467 mwin_max_lines = lines-7; in setup_windows()
1468 mwin_max_cols = columns-6; in setup_windows()
1477 char *mode; in main() local
1479 if (ac > 1 && strcmp(av[1], "-s") == 0) { in main()
1487 mode = getenv("NCONFIG_MODE"); in main()
1488 if (mode) { in main()
1489 if (!strcasecmp(mode, "single_menu")) in main()