Lines Matching +full:tri +full:- +full:default
1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
103 tmp[sizeof(tmp) - 1] = 0; in make_parent_dir()
121 return -1; in make_parent_dir()
141 return -1; in conf_touch_dep()
146 if (fd == -1) in conf_touch_dep()
147 return -1; in conf_touch_dep()
241 switch (sym->type) { in conf_set_sym_val()
244 sym->def[def].tri = mod; in conf_set_sym_val()
245 sym->flags |= def_flags; in conf_set_sym_val()
251 sym->def[def].tri = yes; in conf_set_sym_val()
252 sym->flags |= def_flags; in conf_set_sym_val()
256 sym->def[def].tri = no; in conf_set_sym_val()
257 sym->flags |= def_flags; in conf_set_sym_val()
262 p, sym->name); in conf_set_sym_val()
285 sym->def[def].val = xstrdup(p); in conf_set_sym_val()
286 sym->flags |= def_flags; in conf_set_sym_val()
290 p, sym->name); in conf_set_sym_val()
294 default: in conf_set_sym_val()
307 if (len > 0 && (*lineptr)[len - 1] == '\n') { in getline_stripped()
308 len--; in getline_stripped()
311 if (len > 0 && (*lineptr)[len - 1] == '\r') { in getline_stripped()
312 len--; in getline_stripped()
386 sym->flags &= ~(def_flags|SYMBOL_VALID); in conf_read_simple()
387 switch (sym->type) { in conf_read_simple()
391 free(sym->def[def].val); in conf_read_simple()
393 default: in conf_read_simple()
394 sym->def[def].val = NULL; in conf_read_simple()
395 sym->def[def].tri = no; in conf_read_simple()
401 while (getline_stripped(&line, &line_asize, in) != -1) { in conf_read_simple()
459 if (sym->flags & def_flags) in conf_read_simple()
460 conf_warning("override: reassigning to symbol %s", sym->name); in conf_read_simple()
472 list_move(&sym->choice_link, &choice->choice_members); in conf_read_simple()
497 if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) { in conf_read()
499 switch (sym->type) { in conf_read()
502 if (sym->def[S_DEF_USER].tri == sym_get_tristate_value(sym)) in conf_read()
505 default: in conf_read()
506 if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val)) in conf_read()
510 } else if (!sym_has_value(sym) && !(sym->flags & SYMBOL_WRITE)) in conf_read()
546 fprintf(fp, "%s\n", cs->prefix); in conf_write_heading()
549 cs->decoration); in conf_write_heading()
551 fprintf(fp, "%s %s\n", cs->decoration, rootmenu.prompt->text); in conf_write_heading()
553 fprintf(fp, "%s\n", cs->postfix); in conf_write_heading()
607 if (sym->type == S_UNKNOWN) in __print_symbol()
612 if ((sym->type == S_BOOLEAN || sym->type == S_TRISTATE) && in __print_symbol()
615 fprintf(fp, "# %s%s is not set\n", CONFIG_, sym->name); in __print_symbol()
619 if (sym->type == S_STRING && escape_string) { in __print_symbol()
624 fprintf(fp, "%s%s=%s\n", CONFIG_, sym->name, val); in __print_symbol()
651 if (sym->type == S_UNKNOWN) in print_symbol_for_c()
656 switch (sym->type) { in print_symbol_for_c()
665 default: in print_symbol_for_c()
676 default: in print_symbol_for_c()
680 fprintf(fp, "#define %s%s%s %s%s\n", CONFIG_, sym->name, sym_suffix, in print_symbol_for_c()
694 if (sym->type == S_UNKNOWN) in print_symbol_for_rustccfg()
699 switch (sym->type) { in print_symbol_for_rustccfg()
711 * we provide an empty `--cfg CONFIG_X` here in both `y` in print_symbol_for_rustccfg()
715 * a `--cfg CONFIG_X="y"` or `--cfg CONFIG_X="m"`, which can in print_symbol_for_rustccfg()
718 fprintf(fp, "--cfg=%s%s\n", CONFIG_, sym->name); in print_symbol_for_rustccfg()
724 default: in print_symbol_for_rustccfg()
735 /* All values get escaped: the `--cfg` option only takes strings */ in print_symbol_for_rustccfg()
739 fprintf(fp, "--cfg=%s%s=%s\n", CONFIG_, sym->name, val); in print_symbol_for_rustccfg()
747 * All values that has default values are skipped as this is redundant.
764 sym = menu->sym; in conf_write_defconfig()
770 if (!(sym->flags & SYMBOL_WRITE)) in conf_write_defconfig()
772 sym->flags &= ~SYMBOL_WRITE; in conf_write_defconfig()
776 /* Skip symbols that are equal to the default */ in conf_write_defconfig()
780 /* Skip choice values that are equal to the default */ in conf_write_defconfig()
810 return -1; in conf_write()
815 return -1; in conf_write()
819 return -1; in conf_write()
840 sym = menu->sym; in conf_write()
851 !(sym->flags & SYMBOL_WRITTEN)) { in conf_write()
853 if (!(sym->flags & SYMBOL_WRITE)) in conf_write()
859 sym->flags |= SYMBOL_WRITTEN; in conf_write()
864 if (menu->list) { in conf_write()
865 menu = menu->list; in conf_write()
870 if (!menu->sym && menu_is_visible(menu) && menu != &rootmenu && in conf_write()
871 menu->prompt->type == P_MENU) { in conf_write()
876 if (menu->next) { in conf_write()
877 menu = menu->next; in conf_write()
879 menu = menu->parent; in conf_write()
887 sym->flags &= ~SYMBOL_WRITTEN; in conf_write()
919 return -1; in conf_write_autoconf_cmd()
922 return -1; in conf_write_autoconf_cmd()
926 return -1; in conf_write_autoconf_cmd()
931 return -1; in conf_write_autoconf_cmd()
942 return -1; in conf_write_autoconf_cmd()
946 return -1; in conf_write_autoconf_cmd()
960 depfile_prefix_len = tmp ? tmp - name + 1 : 0; in conf_touch_deps()
962 return -1; in conf_touch_deps()
974 if (sym->flags & SYMBOL_WRITE) { in conf_touch_deps()
975 if (sym->flags & SYMBOL_DEF_AUTO) { in conf_touch_deps()
980 switch (sym->type) { in conf_touch_deps()
984 sym->def[S_DEF_AUTO].tri) in conf_touch_deps()
991 sym->def[S_DEF_AUTO].val)) in conf_touch_deps()
994 default: in conf_touch_deps()
1002 switch (sym->type) { in conf_touch_deps()
1008 default: in conf_touch_deps()
1012 } else if (!(sym->flags & SYMBOL_DEF_AUTO)) in conf_touch_deps()
1021 res = conf_touch_dep(sym->name); in conf_touch_deps()
1039 return -1; in __conf_write_autoconf()
1043 return -1; in __conf_write_autoconf()
1048 return -1; in __conf_write_autoconf()
1054 if ((sym->flags & SYMBOL_WRITE) && sym->name) in __conf_write_autoconf()
1062 return -1; in __conf_write_autoconf()
1066 return -1; in __conf_write_autoconf()
1083 return -1; in conf_write_autoconf()