Lines Matching +full:line +full:- +full:name
2 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
43 static char line[PATH_MAX]; variable
68 p = str + l - 1; in strip()
70 *p-- = 0; in strip()
90 line[0] = '\n'; in conf_askvalue()
91 line[1] = 0; in conf_askvalue()
95 line[0] = '\n'; in conf_askvalue()
96 line[1] = 0; in conf_askvalue()
110 xfgets(line, sizeof(line), stdin); in conf_askvalue()
125 printf("%s", line); in conf_askvalue()
131 struct symbol *sym = menu->sym; in conf_string()
135 printf("%*s%s ", indent - 1, "", menu->prompt->text); in conf_string()
136 printf("(%s) ", sym->name); in conf_string()
142 switch (line[0]) { in conf_string()
147 if (line[1] == '\n') { in conf_string()
154 line[strlen(line)-1] = 0; in conf_string()
155 def = line; in conf_string()
164 struct symbol *sym = menu->sym; in conf_sym()
168 printf("%*s%s ", indent - 1, "", menu->prompt->text); in conf_sym()
169 if (sym->name) in conf_sym()
170 printf("(%s) ", sym->name); in conf_sym()
193 strip(line); in conf_sym()
195 switch (line[0]) { in conf_sym()
199 if (!line[1] || !strcmp(&line[1], "o")) in conf_sym()
205 if (!line[1]) in conf_sym()
211 if (!line[1] || !strcmp(&line[1], "es")) in conf_sym()
235 sym = menu->sym; in conf_choice()
253 printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); in conf_choice()
263 printf("%*s%s\n", indent - 1, "", menu_get_prompt(menu)); in conf_choice()
266 line[0] = 0; in conf_choice()
267 for (child = menu->list; child; child = child->next) { in conf_choice()
270 if (!child->sym) { in conf_choice()
275 if (child->sym == def_sym) { in conf_choice()
281 if (child->sym->name) in conf_choice()
282 printf(" (%s)", child->sym->name); in conf_choice()
283 if (!sym_has_value(child->sym)) in conf_choice()
287 printf("%*schoice", indent - 1, ""); in conf_choice()
292 printf("[1-%d?]: ", cnt); in conf_choice()
304 xfgets(line, sizeof(line), stdin); in conf_choice()
305 strip(line); in conf_choice()
306 if (line[0] == '?') { in conf_choice()
310 if (!line[0]) in conf_choice()
312 else if (isdigit(line[0])) in conf_choice()
313 cnt = atoi(line); in conf_choice()
322 for (child = menu->list; child; child = child->next) { in conf_choice()
323 if (!child->sym || !menu_is_visible(child)) in conf_choice()
325 if (!--cnt) in conf_choice()
330 if (line[0] && line[strlen(line) - 1] == '?') { in conf_choice()
334 sym_set_choice_value(sym, child->sym); in conf_choice()
335 for (child = child->list; child; child = child->next) { in conf_choice()
338 indent -= 2; in conf_choice()
353 sym = menu->sym; in conf()
354 prop = menu->prompt; in conf()
358 switch (prop->type) { in conf()
386 if (sym->curr.tri != mod) in conf()
391 switch (sym->type) { in conf()
405 for (child = menu->list; child; child = child->next) in conf()
408 indent -= 2; in conf()
419 sym = menu->sym; in check_conf()
424 if (sym->name) { in check_conf()
427 if (sym->type == S_STRING) { in check_conf()
430 printf("%s%s=%s\n", CONFIG_, sym->name, str); in check_conf()
434 printf("%s%s=%s\n", CONFIG_, sym->name, str); in check_conf()
446 for (child = menu->list; child; child = child->next) in check_conf()
466 * value but not 'n') with the counter-intuitive name.
475 printf("Usage: %s [-s] [option] <kconfig-file>\n", progname); in conf_usage()
477 printf(" --listnewconfig List new options\n"); in conf_usage()
478 printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); in conf_usage()
479 printf(" --oldconfig Update a configuration using a provided .config as base\n"); in conf_usage()
480 printf(" --syncconfig Similar to oldconfig but generates configuration in\n" in conf_usage()
482 …printf(" --olddefconfig Same as oldconfig but sets new symbols to their default value\n"… in conf_usage()
483 printf(" --oldnoconfig An alias of olddefconfig\n"); in conf_usage()
484 printf(" --defconfig <file> New config with default defined in <file>\n"); in conf_usage()
485 printf(" --savedefconfig <file> Save the minimal current configuration to <file>\n"); in conf_usage()
486 printf(" --allnoconfig New config where all options are answered with no\n"); in conf_usage()
487 printf(" --allyesconfig New config where all options are answered with yes\n"); in conf_usage()
488 printf(" --allmodconfig New config where all options are answered with mod\n"); in conf_usage()
489 printf(" --alldefconfig New config with all symbols set to default\n"); in conf_usage()
490 printf(" --randconfig New config with random answer to all options\n"); in conf_usage()
497 const char *name, *defconfig_file = NULL /* gcc uninit */; in main() local
503 while ((opt = getopt_long(ac, av, "s", long_opts, NULL)) != -1) { in main()
567 name = av[optind]; in main()
568 conf_parse(name); in main()
571 name = conf_get_configname(); in main()
572 if (stat(name, &tmpstat)) { in main()
578 "***\n", name); in main()
609 name = getenv("KCONFIG_ALLCONFIG"); in main()
610 if (!name) in main()
612 if ((strcmp(name, "") != 0) && (strcmp(name, "1") != 0)) { in main()
613 if (conf_read_simple(name, S_DEF_USER)) { in main()
616 name); in main()
622 case allnoconfig: name = "allno.config"; break; in main()
623 case allyesconfig: name = "allyes.config"; break; in main()
624 case allmodconfig: name = "allmod.config"; break; in main()
625 case alldefconfig: name = "alldef.config"; break; in main()
626 case randconfig: name = "allrandom.config"; break; in main()
629 if (conf_read_simple(name, S_DEF_USER) && in main()
633 name); in main()
642 name = getenv("KCONFIG_NOSILENTUPDATE"); in main()
643 if (name && *name) { in main()
710 * in the top-level Makefile in main()