Lines Matching +full:tri +full:- +full:default

2  * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
94 strncat(res_value, in, src - in); in conf_expand_value()
130 switch (sym->type) { in conf_set_sym_val()
133 sym->def[def].tri = mod; in conf_set_sym_val()
134 sym->flags |= def_flags; in conf_set_sym_val()
140 sym->def[def].tri = yes; in conf_set_sym_val()
141 sym->flags |= def_flags; in conf_set_sym_val()
145 sym->def[def].tri = no; in conf_set_sym_val()
146 sym->flags |= def_flags; in conf_set_sym_val()
151 p, sym->name); in conf_set_sym_val()
157 sym->type = S_STRING; in conf_set_sym_val()
165 if (p[strlen(p) - 1] != '"') { in conf_set_sym_val()
171 p[strlen(p) - 1] = 0; in conf_set_sym_val()
177 sym->def[def].val = xstrdup(p); in conf_set_sym_val()
178 sym->flags |= def_flags; in conf_set_sym_val()
182 p, sym->name); in conf_set_sym_val()
186 default: in conf_set_sym_val()
198 new_size += LINE_GROWTH - 1; in add_byte()
202 return -1; in add_byte()
232 return -1; in compat_getline()
234 default: in compat_getline()
242 line[slen-1] = '\0'; in compat_getline()
244 return -1; in compat_getline()
270 if (expr_calc_value(prop->visible.expr) == no || in conf_read_simple()
271 prop->expr->type != E_SYMBOL) in conf_read_simple()
273 name = conf_expand_value(prop->expr->left.sym->name); in conf_read_simple()
292 sym->flags |= SYMBOL_CHANGED; in conf_read_simple()
293 sym->flags &= ~(def_flags|SYMBOL_VALID); in conf_read_simple()
295 sym->flags |= def_flags; in conf_read_simple()
296 switch (sym->type) { in conf_read_simple()
300 if (sym->def[def].val) in conf_read_simple()
301 free(sym->def[def].val); in conf_read_simple()
303 default: in conf_read_simple()
304 sym->def[def].val = NULL; in conf_read_simple()
305 sym->def[def].tri = no; in conf_read_simple()
309 while (compat_getline(&line, &line_asize, in) != -1) { in conf_read_simple()
329 if (sym->type == S_UNKNOWN) in conf_read_simple()
330 sym->type = S_BOOLEAN; in conf_read_simple()
332 if (sym->flags & def_flags) { in conf_read_simple()
333 conf_warning("override: reassigning to symbol %s", sym->name); in conf_read_simple()
335 switch (sym->type) { in conf_read_simple()
338 sym->def[def].tri = no; in conf_read_simple()
339 sym->flags |= def_flags; in conf_read_simple()
341 default: in conf_read_simple()
351 *p2-- = 0; in conf_read_simple()
363 if (sym->type == S_UNKNOWN) in conf_read_simple()
364 sym->type = S_OTHER; in conf_read_simple()
366 if (sym->flags & def_flags) { in conf_read_simple()
367 conf_warning("override: reassigning to symbol %s", sym->name); in conf_read_simple()
381 switch (sym->def[def].tri) { in conf_read_simple()
385 if (cs->def[def].tri == yes) { in conf_read_simple()
386 conf_warning("%s creates inconsistent choice state", sym->name); in conf_read_simple()
387 cs->flags &= ~def_flags; in conf_read_simple()
391 if (cs->def[def].tri != no) in conf_read_simple()
392 conf_warning("override: %s changes choice state", sym->name); in conf_read_simple()
393 cs->def[def].val = sym; in conf_read_simple()
396 cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri); in conf_read_simple()
421 if (sym_is_choice(sym) || (sym->flags & SYMBOL_AUTO)) in conf_read()
423 if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) { in conf_read()
425 switch (sym->type) { in conf_read()
428 if (sym->def[S_DEF_USER].tri != sym_get_tristate_value(sym)) in conf_read()
433 default: in conf_read()
434 if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val)) in conf_read()
438 } else if (!sym_has_value(sym) && !(sym->flags & SYMBOL_WRITE)) in conf_read()
452 if (sym->visible == no && !conf_unsaved) in conf_read()
453 sym->flags &= ~SYMBOL_DEF_USER; in conf_read()
454 switch (sym->type) { in conf_read()
459 if (sym_string_within_range(sym, sym->def[S_DEF_USER].val)) in conf_read()
461 sym->flags &= ~(SYMBOL_VALID|SYMBOL_DEF_USER); in conf_read()
464 default: in conf_read()
480 * passing a non-NULL argument to the printer.
487 switch (sym->type) { in kconfig_print_symbol()
495 CONFIG_, sym->name); in kconfig_print_symbol()
499 default: in kconfig_print_symbol()
503 fprintf(fp, "%s%s=%s\n", CONFIG_, sym->name, value); in kconfig_print_symbol()
541 switch (sym->type) { in header_print_symbol()
552 default: in header_print_symbol()
554 CONFIG_, sym->name, suffix); in header_print_symbol()
564 CONFIG_, sym->name, prefix, value); in header_print_symbol()
570 CONFIG_, sym->name, value); in header_print_symbol()
572 default: in header_print_symbol()
615 if (sym->type == S_TRISTATE && *value != 'n') in tristate_print_symbol()
616 fprintf(fp, "%s%s=%c\n", CONFIG_, sym->name, (char)toupper(*value)); in tristate_print_symbol()
631 switch (sym->type) { in conf_write_symbol()
639 printer->print_symbol(fp, sym, str2, printer_arg); in conf_write_symbol()
642 default: in conf_write_symbol()
644 printer->print_symbol(fp, sym, str, printer_arg); in conf_write_symbol()
657 rootmenu.prompt->text); in conf_write_heading()
659 printer->print_comment(fp, buf, printer_arg); in conf_write_heading()
664 * All values that has default values are skipped as this is redundant.
683 sym = menu->sym; in conf_write_defconfig()
689 if (!(sym->flags & SYMBOL_WRITE)) in conf_write_defconfig()
691 sym->flags &= ~SYMBOL_WRITE; in conf_write_defconfig()
692 /* If we cannot change the symbol - skip */ in conf_write_defconfig()
695 /* If symbol equals to default value - skip */ in conf_write_defconfig()
701 * default for a choice - skip. in conf_write_defconfig()
713 if ((sym->type == S_BOOLEAN) && in conf_write_defconfig()
721 if (menu->list != NULL) { in conf_write_defconfig()
722 menu = menu->list; in conf_write_defconfig()
724 else if (menu->next != NULL) { in conf_write_defconfig()
725 menu = menu->next; in conf_write_defconfig()
727 while ((menu = menu->parent)) { in conf_write_defconfig()
728 if (menu->next != NULL) { in conf_write_defconfig()
729 menu = menu->next; in conf_write_defconfig()
759 int size = slash - name + 1; in conf_write()
790 sym = menu->sym; in conf_write()
799 } else if (!(sym->flags & SYMBOL_CHOICE)) { in conf_write()
801 if (!(sym->flags & SYMBOL_WRITE)) in conf_write()
803 sym->flags &= ~SYMBOL_WRITE; in conf_write()
809 if (menu->list) { in conf_write()
810 menu = menu->list; in conf_write()
813 if (menu->next) in conf_write()
814 menu = menu->next; in conf_write()
815 else while ((menu = menu->parent)) { in conf_write()
816 if (menu->next) { in conf_write()
817 menu = menu->next; in conf_write()
858 if ((sym->flags & SYMBOL_AUTO) || !sym->name) in conf_split_config()
860 if (sym->flags & SYMBOL_WRITE) { in conf_split_config()
861 if (sym->flags & SYMBOL_DEF_AUTO) { in conf_split_config()
866 switch (sym->type) { in conf_split_config()
870 sym->def[S_DEF_AUTO].tri) in conf_split_config()
877 sym->def[S_DEF_AUTO].val)) in conf_split_config()
880 default: in conf_split_config()
888 switch (sym->type) { in conf_split_config()
894 default: in conf_split_config()
898 } else if (!(sym->flags & SYMBOL_DEF_AUTO)) in conf_split_config()
908 s = sym->name; in conf_split_config()
918 if (fd == -1) { in conf_split_config()
938 if (fd == -1) { in conf_split_config()
991 if (!(sym->flags & SYMBOL_WRITE) || !sym->name) in conf_write_autoconf()
1062 * and if no then no-one. in randomize_choice_values()
1065 if (csym->curr.tri != yes) in randomize_choice_values()
1072 expr_list_for_each_sym(prop->expr, e, sym) in randomize_choice_values()
1082 expr_list_for_each_sym(prop->expr, e, sym) { in randomize_choice_values()
1084 sym->def[S_DEF_USER].tri = yes; in randomize_choice_values()
1085 csym->def[S_DEF_USER].val = sym; in randomize_choice_values()
1088 sym->def[S_DEF_USER].tri = no; in randomize_choice_values()
1090 sym->flags |= SYMBOL_DEF_USER; in randomize_choice_values()
1092 sym->flags &= ~SYMBOL_VALID; in randomize_choice_values()
1094 csym->flags |= SYMBOL_DEF_USER; in randomize_choice_values()
1096 csym->flags &= ~(SYMBOL_VALID); in randomize_choice_values()
1110 * Set all non-assinged choice values to no in set_all_choice_values()
1112 expr_list_for_each_sym(prop->expr, e, sym) { in set_all_choice_values()
1114 sym->def[S_DEF_USER].tri = no; in set_all_choice_values()
1116 csym->flags |= SYMBOL_DEF_USER; in set_all_choice_values()
1118 csym->flags &= ~(SYMBOL_VALID | SYMBOL_NEED_SET_CHOICE_VALUES); in set_all_choice_values()
1129 pby = 50; pty = ptm = 33; /* can't go as the default in switch-case in conf_set_all_new_symbols()
1131 * -Wmaybe-uninitialized */ in conf_set_all_new_symbols()
1153 pby = p[0]; ptm = pby/2; pty = pby-ptm; in conf_set_all_new_symbols()
1172 if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID)) in conf_set_all_new_symbols()
1180 sym->def[S_DEF_USER].tri = yes; in conf_set_all_new_symbols()
1183 sym->def[S_DEF_USER].tri = mod; in conf_set_all_new_symbols()
1186 if (sym->flags & SYMBOL_ALLNOCONFIG_Y) in conf_set_all_new_symbols()
1187 sym->def[S_DEF_USER].tri = yes; in conf_set_all_new_symbols()
1189 sym->def[S_DEF_USER].tri = no; in conf_set_all_new_symbols()
1192 sym->def[S_DEF_USER].tri = no; in conf_set_all_new_symbols()
1194 if (sym->type == S_TRISTATE) { in conf_set_all_new_symbols()
1196 sym->def[S_DEF_USER].tri = yes; in conf_set_all_new_symbols()
1198 sym->def[S_DEF_USER].tri = mod; in conf_set_all_new_symbols()
1200 sym->def[S_DEF_USER].tri = yes; in conf_set_all_new_symbols()
1202 default: in conf_set_all_new_symbols()
1206 sym->flags |= SYMBOL_DEF_USER; in conf_set_all_new_symbols()
1208 default: in conf_set_all_new_symbols()
1218 * If curr.tri equals to mod then we can select several in conf_set_all_new_symbols()
1221 * If curr.tri equals yes then only one symbol can be in conf_set_all_new_symbols()
1229 csym->flags |= SYMBOL_NEED_SET_CHOICE_VALUES; in conf_set_all_new_symbols()