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()
93 line[0] = '\n'; in conf_askvalue()
94 line[1] = 0; in conf_askvalue()
98 line[0] = '\n'; in conf_askvalue()
99 line[1] = 0; in conf_askvalue()
113 xfgets(line, sizeof(line), stdin); in conf_askvalue()
128 printf("%s", line); in conf_askvalue()
134 struct symbol *sym = menu->sym; in conf_string()
138 printf("%*s%s ", indent - 1, "", menu->prompt->text); in conf_string()
139 printf("(%s) ", sym->name); in conf_string()
145 switch (line[0]) { in conf_string()
150 if (line[1] == '\n') { in conf_string()
157 line[strlen(line)-1] = 0; in conf_string()
158 def = line; in conf_string()
167 struct symbol *sym = menu->sym; in conf_sym()
171 printf("%*s%s ", indent - 1, "", menu->prompt->text); in conf_sym()
172 if (sym->name) in conf_sym()
173 printf("(%s) ", sym->name); in conf_sym()
196 strip(line); in conf_sym()
198 switch (line[0]) { in conf_sym()
202 if (!line[1] || !strcmp(&line[1], "o")) in conf_sym()
208 if (!line[1]) in conf_sym()
214 if (!line[1] || !strcmp(&line[1], "es")) in conf_sym()
238 sym = menu->sym; in conf_choice()
256 printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); in conf_choice()
266 printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); in conf_choice()
269 line[0] = 0; in conf_choice()
270 for (child = menu->list; child; child = child->next) { in conf_choice()
273 if (!child->sym) { in conf_choice()
278 if (child->sym == def_sym) { in conf_choice()
284 if (child->sym->name) in conf_choice()
285 printf(" (%s)", child->sym->name); in conf_choice()
286 if (!sym_has_value(child->sym)) in conf_choice()
290 printf("%*schoice", indent - 1, ""); in conf_choice()
295 printf("[1-%d?]: ", cnt); in conf_choice()
307 xfgets(line, sizeof(line), stdin); in conf_choice()
308 strip(line); in conf_choice()
309 if (line[0] == '?') { in conf_choice()
313 if (!line[0]) in conf_choice()
315 else if (isdigit(line[0])) in conf_choice()
316 cnt = atoi(line); in conf_choice()
325 for (child = menu->list; child; child = child->next) { in conf_choice()
326 if (!child->sym || !menu_is_visible(child)) in conf_choice()
328 if (!--cnt) in conf_choice()
333 if (line[0] && line[strlen(line) - 1] == '?') { in conf_choice()
337 sym_set_choice_value(sym, child->sym); in conf_choice()
338 for (child = child->list; child; child = child->next) { in conf_choice()
341 indent -= 2; in conf_choice()
356 sym = menu->sym; in conf()
357 prop = menu->prompt; in conf()
361 switch (prop->type) { in conf()
389 if (sym->curr.tri != mod) in conf()
394 switch (sym->type) { in conf()
408 for (child = menu->list; child; child = child->next) in conf()
411 indent -= 2; in conf()
422 sym = menu->sym; in check_conf()
427 if (sym->name) { in check_conf()
430 if (sym->type == S_STRING) { in check_conf()
433 printf("%s%s=%s\n", CONFIG_, sym->name, str); in check_conf()
437 printf("%s%s=%s\n", CONFIG_, sym->name, str); in check_conf()
441 printf("-----\n"); in check_conf()
443 printf("-----\n"); in check_conf()
454 for (child = menu->list; child; child = child->next) in check_conf()
480 printf("Usage: %s [-s] [option] <kconfig-file>\n", progname); in conf_usage()
482 printf(" --listnewconfig List new options\n"); in conf_usage()
483 printf(" --helpnewconfig List new options and help text\n"); in conf_usage()
484 printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); in conf_usage()
485 printf(" --oldconfig Update a configuration using a provided .config as base\n"); in conf_usage()
486 printf(" --syncconfig Similar to oldconfig but generates configuration in\n" in conf_usage()
488 …printf(" --olddefconfig Same as oldconfig but sets new symbols to their default value\n"… in conf_usage()
489 printf(" --defconfig <file> New config with default defined in <file>\n"); in conf_usage()
490 printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n"); in conf_usage()
491 printf(" --allnoconfig New config where all options are answered with no\n"); in conf_usage()
492 printf(" --allyesconfig New config where all options are answered with yes\n"); in conf_usage()
493 printf(" --allmodconfig New config where all options are answered with mod\n"); in conf_usage()
494 printf(" --alldefconfig New config with all symbols set to default\n"); in conf_usage()
495 printf(" --randconfig New config with random answer to all options\n"); in conf_usage()
496 printf(" --yes2modconfig Change answers from yes to mod if possible\n"); in conf_usage()
497 printf(" --mod2yesconfig Change answers from mod to yes if possible\n"); in conf_usage()
504 const char *name, *defconfig_file = NULL /* gcc uninit */; in main() local
509 while ((opt = getopt_long(ac, av, "s", long_opts, NULL)) != -1) { in main()
576 name = av[optind]; in main()
577 conf_parse(name); in main()
607 name = getenv("KCONFIG_ALLCONFIG"); in main()
608 if (!name) in main()
610 if ((strcmp(name, "") != 0) && (strcmp(name, "1") != 0)) { in main()
611 if (conf_read_simple(name, S_DEF_USER)) { in main()
614 name); in main()
620 case allnoconfig: name = "allno.config"; break; in main()
621 case allyesconfig: name = "allyes.config"; break; in main()
622 case allmodconfig: name = "allmod.config"; break; in main()
623 case alldefconfig: name = "alldef.config"; break; in main()
624 case randconfig: name = "allrandom.config"; break; in main()
627 if (conf_read_simple(name, S_DEF_USER) && in main()
631 name); in main()
640 name = getenv("KCONFIG_NOSILENTUPDATE"); in main()
641 if (name && *name) { in main()
715 * in the top-level Makefile in main()