Lines Matching +full:line +full:- +full:name
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
47 static char line[PATH_MAX]; variable
72 p = str + l - 1; in strip()
74 *p-- = 0; in strip()
118 * randomize_choice_values - randomize choice block
134 struct symbol *sym = menu->sym; in randomize_choice_values()
144 struct symbol *sym = menu->sym; in randomize_choice_values()
147 x--; in randomize_choice_values()
150 sym->def[S_DEF_USER].tri = yes; in randomize_choice_values()
151 sym->flags |= SYMBOL_DEF_USER; in randomize_choice_values()
157 list_move_tail(&sym->choice_link, in randomize_choice_values()
158 &choice->choice_members); in randomize_choice_values()
163 cnt--; in randomize_choice_values()
180 * can't go as the default in switch-case below, otherwise gcc whines in conf_set_all_new_symbols()
181 * about -Wmaybe-uninitialized in conf_set_all_new_symbols()
211 pty = pby - ptm; in conf_set_all_new_symbols()
233 struct symbol *sym = menu->sym; in conf_set_all_new_symbols()
236 if (!sym || !menu->prompt || sym_has_value(sym) || in conf_set_all_new_symbols()
237 (sym->type != S_BOOLEAN && sym->type != S_TRISTATE) || in conf_set_all_new_symbols()
260 if (sym->type == S_TRISTATE) { in conf_set_all_new_symbols()
272 sym->def[S_DEF_USER].tri = val; in conf_set_all_new_symbols()
273 sym->flags |= SYMBOL_DEF_USER; in conf_set_all_new_symbols()
285 sym->def[S_DEF_USER].tri == old_val) in conf_rewrite_tristates()
286 sym->def[S_DEF_USER].tri = new_val; in conf_rewrite_tristates()
296 line[0] = '\n'; in conf_askvalue()
297 line[1] = 0; in conf_askvalue()
301 line[0] = '\n'; in conf_askvalue()
302 line[1] = 0; in conf_askvalue()
316 xfgets(line, sizeof(line), stdin); in conf_askvalue()
325 struct symbol *sym = menu->sym; in conf_string()
329 printf("%*s%s ", indent - 1, "", menu->prompt->text); in conf_string()
330 printf("(%s) ", sym->name); in conf_string()
336 switch (line[0]) { in conf_string()
341 if (line[1] == '\n') { in conf_string()
348 line[strlen(line)-1] = 0; in conf_string()
349 def = line; in conf_string()
358 struct symbol *sym = menu->sym; in conf_sym()
362 printf("%*s%s ", indent - 1, "", menu->prompt->text); in conf_sym()
363 if (sym->name) in conf_sym()
364 printf("(%s) ", sym->name); in conf_sym()
387 strip(line); in conf_sym()
389 switch (line[0]) { in conf_sym()
393 if (!line[1] || !strcmp(&line[1], "o")) in conf_sym()
399 if (!line[1]) in conf_sym()
405 if (!line[1] || !strcmp(&line[1], "es")) in conf_sym()
432 printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); in conf_choice()
435 line[0] = 0; in conf_choice()
436 for (child = menu->list; child; child = child->next) { in conf_choice()
439 if (!child->sym) { in conf_choice()
444 if (child->sym == def_sym) { in conf_choice()
450 child->sym->name); in conf_choice()
451 if (!sym_has_value(child->sym)) { in conf_choice()
457 printf("%*schoice", indent - 1, ""); in conf_choice()
462 printf("[1-%d?]: ", cnt); in conf_choice()
474 xfgets(line, sizeof(line), stdin); in conf_choice()
475 strip(line); in conf_choice()
476 if (line[0] == '?') { in conf_choice()
480 if (!line[0]) in conf_choice()
482 else if (isdigit(line[0])) in conf_choice()
483 cnt = atoi(line); in conf_choice()
492 for (child = menu->list; child; child = child->next) { in conf_choice()
493 if (!child->sym || !menu_is_visible(child)) in conf_choice()
495 if (!--cnt) in conf_choice()
500 if (line[0] && line[strlen(line) - 1] == '?') { in conf_choice()
504 choice_set_value(menu, child->sym); in conf_choice()
518 sym = menu->sym; in conf()
519 prop = menu->prompt; in conf()
523 switch (prop->type) { in conf()
554 switch (sym->type) { in conf()
568 for (child = menu->list; child; child = child->next) in conf()
571 indent -= 2; in conf()
582 sym = menu->sym; in check_conf()
586 if (sym->name) in check_conf()
590 printf("-----\n"); in check_conf()
592 printf("-----\n"); in check_conf()
603 for (child = menu->list; child; child = child->next) in check_conf()
634 printf(" -h, --help Print this message and exit.\n"); in conf_usage()
635 printf(" -s, --silent Do not print log.\n"); in conf_usage()
638 printf(" --listnewconfig List new options\n"); in conf_usage()
639 printf(" --helpnewconfig List new options and help text\n"); in conf_usage()
640 printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); in conf_usage()
641 printf(" --oldconfig Update a configuration using a provided .config as base\n"); in conf_usage()
642 printf(" --syncconfig Similar to oldconfig but generates configuration in\n" in conf_usage()
644 …printf(" --olddefconfig Same as oldconfig but sets new symbols to their default value\n"… in conf_usage()
645 printf(" --defconfig <file> New config with default defined in <file>\n"); in conf_usage()
646 printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n"); in conf_usage()
647 printf(" --allnoconfig New config where all options are answered with no\n"); in conf_usage()
648 printf(" --allyesconfig New config where all options are answered with yes\n"); in conf_usage()
649 printf(" --allmodconfig New config where all options are answered with mod\n"); in conf_usage()
650 printf(" --alldefconfig New config with all symbols set to default\n"); in conf_usage()
651 printf(" --randconfig New config with random answer to all options\n"); in conf_usage()
652 printf(" --yes2modconfig Change answers from yes to mod if possible\n"); in conf_usage()
653 printf(" --mod2yesconfig Change answers from mod to yes if possible\n"); in conf_usage()
654 printf(" --mod2noconfig Change answers from mod to no if possible\n"); in conf_usage()
655 printf(" (If none of the above is given, --oldaskconfig is the default)\n"); in conf_usage()
658 printf(" kconfig_file Top-level Kconfig file.\n"); in conf_usage()
665 const char *name, *defconfig_file = NULL /* gcc uninit */; in main() local
670 while ((opt = getopt_long(ac, av, "hs", long_opts, NULL)) != -1) { in main()
741 name = getenv("KCONFIG_ALLCONFIG"); in main()
742 if (!name) in main()
744 if ((strcmp(name, "") != 0) && (strcmp(name, "1") != 0)) { in main()
745 if (conf_read_simple(name, S_DEF_USER)) { in main()
748 name); in main()
754 case allnoconfig: name = "allno.config"; break; in main()
755 case allyesconfig: name = "allyes.config"; break; in main()
756 case allmodconfig: name = "allmod.config"; break; in main()
757 case alldefconfig: name = "alldef.config"; break; in main()
758 case randconfig: name = "allrandom.config"; break; in main()
761 if (conf_read_simple(name, S_DEF_USER) && in main()
765 name); in main()
777 name = getenv("KCONFIG_NOSILENTUPDATE"); in main()
778 if (name && *name) { in main()
857 * in the top-level Makefile in main()