Lines Matching +full:line +full:- +full:name
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
45 static char line[PATH_MAX]; variable
70 p = str + l - 1; in strip()
72 *p-- = 0; in strip()
124 * and if no then no-one. in randomize_choice_values()
127 if (csym->curr.tri != yes) in randomize_choice_values()
134 expr_list_for_each_sym(prop->expr, e, sym) in randomize_choice_values()
144 expr_list_for_each_sym(prop->expr, e, sym) { in randomize_choice_values()
146 sym->def[S_DEF_USER].tri = yes; in randomize_choice_values()
147 csym->def[S_DEF_USER].val = sym; in randomize_choice_values()
149 sym->def[S_DEF_USER].tri = no; in randomize_choice_values()
151 sym->flags |= SYMBOL_DEF_USER; in randomize_choice_values()
153 sym->flags &= ~SYMBOL_VALID; in randomize_choice_values()
155 csym->flags |= SYMBOL_DEF_USER; in randomize_choice_values()
157 csym->flags &= ~SYMBOL_VALID; in randomize_choice_values()
177 * can't go as the default in switch-case below, otherwise gcc whines in conf_set_all_new_symbols()
178 * about -Wmaybe-uninitialized in conf_set_all_new_symbols()
209 pty = pby - ptm; in conf_set_all_new_symbols()
231 if (sym_has_value(sym) || sym->flags & SYMBOL_VALID) in conf_set_all_new_symbols()
239 sym->def[S_DEF_USER].tri = yes; in conf_set_all_new_symbols()
242 sym->def[S_DEF_USER].tri = mod; in conf_set_all_new_symbols()
245 sym->def[S_DEF_USER].tri = no; in conf_set_all_new_symbols()
248 sym->def[S_DEF_USER].tri = no; in conf_set_all_new_symbols()
250 if (sym->type == S_TRISTATE) { in conf_set_all_new_symbols()
252 sym->def[S_DEF_USER].tri = yes; in conf_set_all_new_symbols()
254 sym->def[S_DEF_USER].tri = mod; in conf_set_all_new_symbols()
256 sym->def[S_DEF_USER].tri = yes; in conf_set_all_new_symbols()
262 sym->flags |= SYMBOL_DEF_USER; in conf_set_all_new_symbols()
285 csym->flags |= SYMBOL_NEED_SET_CHOICE_VALUES; in conf_set_all_new_symbols()
314 sym->def[S_DEF_USER].tri == old_val) in conf_rewrite_mod_or_yes()
315 sym->def[S_DEF_USER].tri = new_val; in conf_rewrite_mod_or_yes()
325 line[0] = '\n'; in conf_askvalue()
326 line[1] = 0; in conf_askvalue()
330 line[0] = '\n'; in conf_askvalue()
331 line[1] = 0; in conf_askvalue()
345 xfgets(line, sizeof(line), stdin); in conf_askvalue()
354 struct symbol *sym = menu->sym; in conf_string()
358 printf("%*s%s ", indent - 1, "", menu->prompt->text); in conf_string()
359 printf("(%s) ", sym->name); in conf_string()
365 switch (line[0]) { in conf_string()
370 if (line[1] == '\n') { in conf_string()
377 line[strlen(line)-1] = 0; in conf_string()
378 def = line; in conf_string()
387 struct symbol *sym = menu->sym; in conf_sym()
391 printf("%*s%s ", indent - 1, "", menu->prompt->text); in conf_sym()
392 if (sym->name) in conf_sym()
393 printf("(%s) ", sym->name); in conf_sym()
416 strip(line); in conf_sym()
418 switch (line[0]) { in conf_sym()
422 if (!line[1] || !strcmp(&line[1], "o")) in conf_sym()
428 if (!line[1]) in conf_sym()
434 if (!line[1] || !strcmp(&line[1], "es")) in conf_sym()
458 sym = menu->sym; in conf_choice()
476 printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); in conf_choice()
486 printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); in conf_choice()
489 line[0] = 0; in conf_choice()
490 for (child = menu->list; child; child = child->next) { in conf_choice()
493 if (!child->sym) { in conf_choice()
498 if (child->sym == def_sym) { in conf_choice()
504 if (child->sym->name) in conf_choice()
505 printf(" (%s)", child->sym->name); in conf_choice()
506 if (!sym_has_value(child->sym)) in conf_choice()
510 printf("%*schoice", indent - 1, ""); in conf_choice()
515 printf("[1-%d?]: ", cnt); in conf_choice()
527 xfgets(line, sizeof(line), stdin); in conf_choice()
528 strip(line); in conf_choice()
529 if (line[0] == '?') { in conf_choice()
533 if (!line[0]) in conf_choice()
535 else if (isdigit(line[0])) in conf_choice()
536 cnt = atoi(line); in conf_choice()
545 for (child = menu->list; child; child = child->next) { in conf_choice()
546 if (!child->sym || !menu_is_visible(child)) in conf_choice()
548 if (!--cnt) in conf_choice()
553 if (line[0] && line[strlen(line) - 1] == '?') { in conf_choice()
557 sym_set_choice_value(sym, child->sym); in conf_choice()
558 for (child = child->list; child; child = child->next) { in conf_choice()
561 indent -= 2; in conf_choice()
576 sym = menu->sym; in conf()
577 prop = menu->prompt; in conf()
581 switch (prop->type) { in conf()
609 if (sym->curr.tri != mod) in conf()
614 switch (sym->type) { in conf()
628 for (child = menu->list; child; child = child->next) in conf()
631 indent -= 2; in conf()
642 sym = menu->sym; in check_conf()
649 if (sym->name) { in check_conf()
652 if (sym->type == S_STRING) { in check_conf()
655 printf("%s%s=%s\n", CONFIG_, sym->name, str); in check_conf()
659 printf("%s%s=%s\n", CONFIG_, sym->name, str); in check_conf()
664 printf("-----\n"); in check_conf()
666 printf("-----\n"); in check_conf()
677 for (child = menu->list; child; child = child->next) in check_conf()
704 printf("Usage: %s [options] <kconfig-file>\n", progname); in conf_usage()
707 printf(" -h, --help Print this message and exit.\n"); in conf_usage()
708 printf(" -s, --silent Do not print log.\n"); in conf_usage()
711 printf(" --listnewconfig List new options\n"); in conf_usage()
712 printf(" --helpnewconfig List new options and help text\n"); in conf_usage()
713 printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); in conf_usage()
714 printf(" --oldconfig Update a configuration using a provided .config as base\n"); in conf_usage()
715 printf(" --syncconfig Similar to oldconfig but generates configuration in\n" in conf_usage()
717 …printf(" --olddefconfig Same as oldconfig but sets new symbols to their default value\n"… in conf_usage()
718 printf(" --defconfig <file> New config with default defined in <file>\n"); in conf_usage()
719 printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n"); in conf_usage()
720 printf(" --allnoconfig New config where all options are answered with no\n"); in conf_usage()
721 printf(" --allyesconfig New config where all options are answered with yes\n"); in conf_usage()
722 printf(" --allmodconfig New config where all options are answered with mod\n"); in conf_usage()
723 printf(" --alldefconfig New config with all symbols set to default\n"); in conf_usage()
724 printf(" --randconfig New config with random answer to all options\n"); in conf_usage()
725 printf(" --yes2modconfig Change answers from yes to mod if possible\n"); in conf_usage()
726 printf(" --mod2yesconfig Change answers from mod to yes if possible\n"); in conf_usage()
727 printf(" (If none of the above is given, --oldaskconfig is the default)\n"); in conf_usage()
734 const char *name, *defconfig_file = NULL /* gcc uninit */; in main() local
739 while ((opt = getopt_long(ac, av, "hs", long_opts, NULL)) != -1) { in main()
809 name = getenv("KCONFIG_ALLCONFIG"); in main()
810 if (!name) in main()
812 if ((strcmp(name, "") != 0) && (strcmp(name, "1") != 0)) { in main()
813 if (conf_read_simple(name, S_DEF_USER)) { in main()
816 name); in main()
822 case allnoconfig: name = "allno.config"; break; in main()
823 case allyesconfig: name = "allyes.config"; break; in main()
824 case allmodconfig: name = "allmod.config"; break; in main()
825 case alldefconfig: name = "alldef.config"; break; in main()
826 case randconfig: name = "allrandom.config"; break; in main()
829 if (conf_read_simple(name, S_DEF_USER) && in main()
833 name); in main()
842 name = getenv("KCONFIG_NOSILENTUPDATE"); in main()
843 if (name && *name) { in main()
917 * in the top-level Makefile in main()