Lines Matching +full:line +full:- +full:name

1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
46 static char line[PATH_MAX]; variable
71 p = str + l - 1; in strip()
73 *p-- = 0; in strip()
125 * and if no then no-one. in randomize_choice_values()
128 if (csym->curr.tri != yes) in randomize_choice_values()
135 expr_list_for_each_sym(prop->expr, e, sym) in randomize_choice_values()
145 expr_list_for_each_sym(prop->expr, e, sym) { in randomize_choice_values()
147 sym->def[S_DEF_USER].tri = yes; in randomize_choice_values()
148 csym->def[S_DEF_USER].val = sym; in randomize_choice_values()
150 sym->def[S_DEF_USER].tri = no; in randomize_choice_values()
152 sym->flags |= SYMBOL_DEF_USER; in randomize_choice_values()
154 sym->flags &= ~SYMBOL_VALID; in randomize_choice_values()
156 csym->flags |= SYMBOL_DEF_USER; in randomize_choice_values()
158 csym->flags &= ~SYMBOL_VALID; in randomize_choice_values()
176 * can't go as the default in switch-case below, otherwise gcc whines in conf_set_all_new_symbols()
177 * about -Wmaybe-uninitialized in conf_set_all_new_symbols()
208 pty = pby - ptm; in conf_set_all_new_symbols()
230 if (sym_has_value(sym) || sym->flags & SYMBOL_VALID) in conf_set_all_new_symbols()
238 sym->def[S_DEF_USER].tri = yes; in conf_set_all_new_symbols()
241 sym->def[S_DEF_USER].tri = mod; in conf_set_all_new_symbols()
244 sym->def[S_DEF_USER].tri = no; in conf_set_all_new_symbols()
247 sym->def[S_DEF_USER].tri = no; in conf_set_all_new_symbols()
249 if (sym->type == S_TRISTATE) { in conf_set_all_new_symbols()
251 sym->def[S_DEF_USER].tri = yes; in conf_set_all_new_symbols()
253 sym->def[S_DEF_USER].tri = mod; in conf_set_all_new_symbols()
255 sym->def[S_DEF_USER].tri = yes; in conf_set_all_new_symbols()
261 sym->flags |= SYMBOL_DEF_USER; in conf_set_all_new_symbols()
284 csym->flags |= SYMBOL_NEED_SET_CHOICE_VALUES; in conf_set_all_new_symbols()
311 sym->def[S_DEF_USER].tri == old_val) in conf_rewrite_tristates()
312 sym->def[S_DEF_USER].tri = new_val; in conf_rewrite_tristates()
322 line[0] = '\n'; in conf_askvalue()
323 line[1] = 0; in conf_askvalue()
327 line[0] = '\n'; in conf_askvalue()
328 line[1] = 0; in conf_askvalue()
342 xfgets(line, sizeof(line), stdin); in conf_askvalue()
351 struct symbol *sym = menu->sym; in conf_string()
355 printf("%*s%s ", indent - 1, "", menu->prompt->text); in conf_string()
356 printf("(%s) ", sym->name); in conf_string()
362 switch (line[0]) { in conf_string()
367 if (line[1] == '\n') { in conf_string()
374 line[strlen(line)-1] = 0; in conf_string()
375 def = line; in conf_string()
384 struct symbol *sym = menu->sym; in conf_sym()
388 printf("%*s%s ", indent - 1, "", menu->prompt->text); in conf_sym()
389 if (sym->name) in conf_sym()
390 printf("(%s) ", sym->name); in conf_sym()
413 strip(line); in conf_sym()
415 switch (line[0]) { in conf_sym()
419 if (!line[1] || !strcmp(&line[1], "o")) in conf_sym()
425 if (!line[1]) in conf_sym()
431 if (!line[1] || !strcmp(&line[1], "es")) in conf_sym()
455 sym = menu->sym; in conf_choice()
473 printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); in conf_choice()
483 printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); in conf_choice()
486 line[0] = 0; in conf_choice()
487 for (child = menu->list; child; child = child->next) { in conf_choice()
490 if (!child->sym) { in conf_choice()
495 if (child->sym == def_sym) { in conf_choice()
501 if (child->sym->name) in conf_choice()
502 printf(" (%s)", child->sym->name); in conf_choice()
503 if (!sym_has_value(child->sym)) in conf_choice()
507 printf("%*schoice", indent - 1, ""); in conf_choice()
512 printf("[1-%d?]: ", cnt); in conf_choice()
524 xfgets(line, sizeof(line), stdin); in conf_choice()
525 strip(line); in conf_choice()
526 if (line[0] == '?') { in conf_choice()
530 if (!line[0]) in conf_choice()
532 else if (isdigit(line[0])) in conf_choice()
533 cnt = atoi(line); in conf_choice()
542 for (child = menu->list; child; child = child->next) { in conf_choice()
543 if (!child->sym || !menu_is_visible(child)) in conf_choice()
545 if (!--cnt) in conf_choice()
550 if (line[0] && line[strlen(line) - 1] == '?') { in conf_choice()
554 sym_set_tristate_value(child->sym, yes); in conf_choice()
555 for (child = child->list; child; child = child->next) { in conf_choice()
558 indent -= 2; in conf_choice()
573 sym = menu->sym; in conf()
574 prop = menu->prompt; in conf()
578 switch (prop->type) { in conf()
606 if (sym->curr.tri != mod) in conf()
611 switch (sym->type) { in conf()
625 for (child = menu->list; child; child = child->next) in conf()
628 indent -= 2; in conf()
639 sym = menu->sym; in check_conf()
646 if (sym->name) in check_conf()
650 printf("-----\n"); in check_conf()
652 printf("-----\n"); in check_conf()
663 for (child = menu->list; child; child = child->next) in check_conf()
691 printf("Usage: %s [options] <kconfig-file>\n", progname); in conf_usage()
694 printf(" -h, --help Print this message and exit.\n"); in conf_usage()
695 printf(" -s, --silent Do not print log.\n"); in conf_usage()
698 printf(" --listnewconfig List new options\n"); in conf_usage()
699 printf(" --helpnewconfig List new options and help text\n"); in conf_usage()
700 printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); in conf_usage()
701 printf(" --oldconfig Update a configuration using a provided .config as base\n"); in conf_usage()
702 printf(" --syncconfig Similar to oldconfig but generates configuration in\n" in conf_usage()
704 …printf(" --olddefconfig Same as oldconfig but sets new symbols to their default value\n"… in conf_usage()
705 printf(" --defconfig <file> New config with default defined in <file>\n"); in conf_usage()
706 printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n"); in conf_usage()
707 printf(" --allnoconfig New config where all options are answered with no\n"); in conf_usage()
708 printf(" --allyesconfig New config where all options are answered with yes\n"); in conf_usage()
709 printf(" --allmodconfig New config where all options are answered with mod\n"); in conf_usage()
710 printf(" --alldefconfig New config with all symbols set to default\n"); in conf_usage()
711 printf(" --randconfig New config with random answer to all options\n"); in conf_usage()
712 printf(" --yes2modconfig Change answers from yes to mod if possible\n"); in conf_usage()
713 printf(" --mod2yesconfig Change answers from mod to yes if possible\n"); in conf_usage()
714 printf(" --mod2noconfig Change answers from mod to no if possible\n"); in conf_usage()
715 printf(" (If none of the above is given, --oldaskconfig is the default)\n"); in conf_usage()
722 const char *name, *defconfig_file = NULL /* gcc uninit */; in main() local
727 while ((opt = getopt_long(ac, av, "hs", long_opts, NULL)) != -1) { in main()
798 name = getenv("KCONFIG_ALLCONFIG"); in main()
799 if (!name) in main()
801 if ((strcmp(name, "") != 0) && (strcmp(name, "1") != 0)) { in main()
802 if (conf_read_simple(name, S_DEF_USER)) { in main()
805 name); in main()
811 case allnoconfig: name = "allno.config"; break; in main()
812 case allyesconfig: name = "allyes.config"; break; in main()
813 case allmodconfig: name = "allmod.config"; break; in main()
814 case alldefconfig: name = "alldef.config"; break; in main()
815 case randconfig: name = "allrandom.config"; break; in main()
818 if (conf_read_simple(name, S_DEF_USER) && in main()
822 name); in main()
831 name = getenv("KCONFIG_NOSILENTUPDATE"); in main()
832 if (name && *name) { in main()
909 * in the top-level Makefile in main()