• Home
  • Raw
  • Download

Lines Matching refs:sym

86 	struct symbol *sym;  in conf_expand_value()  local
100 sym = sym_lookup(name, 0); in conf_expand_value()
101 sym_calc_value(sym); in conf_expand_value()
102 strcat(res_value, sym_get_string_value(sym)); in conf_expand_value()
126 static int conf_set_sym_val(struct symbol *sym, int def, int def_flags, char *p) in conf_set_sym_val() argument
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()
176 if (sym_string_valid(sym, p)) { 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()
253 struct symbol *sym; in conf_read_simple() local
273 name = conf_expand_value(prop->expr->left.sym->name); in conf_read_simple()
291 for_all_symbols(i, sym) { in conf_read_simple()
292 sym->flags |= SYMBOL_CHANGED; in conf_read_simple()
293 sym->flags &= ~(def_flags|SYMBOL_VALID); in conf_read_simple()
294 if (sym_is_choice(sym)) 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()
304 sym->def[def].val = NULL; in conf_read_simple()
305 sym->def[def].tri = no; in conf_read_simple()
311 sym = NULL; in conf_read_simple()
322 sym = sym_find(line + 2 + strlen(CONFIG_)); in conf_read_simple()
323 if (!sym) { in conf_read_simple()
328 sym = sym_lookup(line + 2 + strlen(CONFIG_), 0); 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()
356 sym = sym_find(line + strlen(CONFIG_)); in conf_read_simple()
357 if (!sym) { in conf_read_simple()
362 sym = sym_lookup(line + strlen(CONFIG_), 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()
369 if (conf_set_sym_val(sym, def, def_flags, p)) in conf_read_simple()
379 if (sym && sym_is_choice_value(sym)) { in conf_read_simple()
380 struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym)); in conf_read_simple()
381 switch (sym->def[def].tri) { in conf_read_simple()
386 conf_warning("%s creates inconsistent choice state", sym->name); 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()
406 struct symbol *sym; in conf_read() local
419 for_all_symbols(i, sym) { in conf_read()
420 sym_calc_value(sym); in conf_read()
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()
430 if (!sym_is_choice(sym)) 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()
445 for_all_symbols(i, sym) { in conf_read()
446 if (sym_has_value(sym) && !sym_is_choice_value(sym)) { 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()
484 kconfig_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) in kconfig_print_symbol() argument
487 switch (sym->type) { in kconfig_print_symbol()
495 CONFIG_, sym->name); in kconfig_print_symbol()
503 fprintf(fp, "%s%s=%s\n", CONFIG_, sym->name, value); in kconfig_print_symbol()
538 header_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) in header_print_symbol() argument
541 switch (sym->type) { 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()
612 tristate_print_symbol(FILE *fp, struct symbol *sym, const char *value, void *arg) in tristate_print_symbol() argument
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()
625 static void conf_write_symbol(FILE *fp, struct symbol *sym, in conf_write_symbol() argument
631 switch (sym->type) { in conf_write_symbol()
636 str = sym_get_string_value(sym); in conf_write_symbol()
639 printer->print_symbol(fp, sym, str2, printer_arg); in conf_write_symbol()
643 str = sym_get_string_value(sym); in conf_write_symbol()
644 printer->print_symbol(fp, sym, str, printer_arg); in conf_write_symbol()
668 struct symbol *sym; in conf_write_defconfig() local
683 sym = menu->sym; in conf_write_defconfig()
684 if (sym == NULL) { in conf_write_defconfig()
687 } else if (!sym_is_choice(sym)) { in conf_write_defconfig()
688 sym_calc_value(sym); in conf_write_defconfig()
689 if (!(sym->flags & SYMBOL_WRITE)) in conf_write_defconfig()
691 sym->flags &= ~SYMBOL_WRITE; in conf_write_defconfig()
693 if (!sym_is_changable(sym)) in conf_write_defconfig()
696 if (strcmp(sym_get_string_value(sym), sym_get_string_default(sym)) == 0) in conf_write_defconfig()
706 if (sym_is_choice_value(sym)) { in conf_write_defconfig()
710 cs = prop_get_symbol(sym_get_choice_prop(sym)); in conf_write_defconfig()
712 if (!sym_is_optional(cs) && sym == ds) { in conf_write_defconfig()
713 if ((sym->type == S_BOOLEAN) && in conf_write_defconfig()
714 sym_get_tristate_value(sym) == yes) in conf_write_defconfig()
718 conf_write_symbol(out, sym, &kconfig_printer_cb, NULL); in conf_write_defconfig()
742 struct symbol *sym; in conf_write() local
790 sym = menu->sym; in conf_write()
791 if (!sym) { in conf_write()
799 } else if (!(sym->flags & SYMBOL_CHOICE)) { in conf_write()
800 sym_calc_value(sym); in conf_write()
801 if (!(sym->flags & SYMBOL_WRITE)) in conf_write()
803 sym->flags &= ~SYMBOL_WRITE; in conf_write()
805 conf_write_symbol(out, sym, &kconfig_printer_cb, NULL); in conf_write()
844 struct symbol *sym; in conf_split_config() local
856 for_all_symbols(i, sym) { in conf_split_config()
857 sym_calc_value(sym); in conf_split_config()
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()
869 if (sym_get_tristate_value(sym) == in conf_split_config()
870 sym->def[S_DEF_AUTO].tri) in conf_split_config()
876 if (!strcmp(sym_get_string_value(sym), in conf_split_config()
877 sym->def[S_DEF_AUTO].val)) in conf_split_config()
888 switch (sym->type) { in conf_split_config()
891 if (sym_get_tristate_value(sym) == no) in conf_split_config()
898 } else if (!(sym->flags & SYMBOL_DEF_AUTO)) in conf_split_config()
908 s = sym->name; in conf_split_config()
954 struct symbol *sym; in conf_write_autoconf() local
989 for_all_symbols(i, sym) { in conf_write_autoconf()
990 sym_calc_value(sym); in conf_write_autoconf()
991 if (!(sym->flags & SYMBOL_WRITE) || !sym->name) in conf_write_autoconf()
995 conf_write_symbol(out, sym, &kconfig_printer_cb, (void *)1); in conf_write_autoconf()
997 conf_write_symbol(tristate, sym, &tristate_printer_cb, (void *)1); in conf_write_autoconf()
999 conf_write_symbol(out_h, sym, &header_printer_cb, NULL); in conf_write_autoconf()
1056 struct symbol *sym; in randomize_choice_values() local
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()
1104 struct symbol *sym; in set_all_choice_values() local
1112 expr_list_for_each_sym(prop->expr, e, sym) { in set_all_choice_values()
1113 if (!sym_has_value(sym)) in set_all_choice_values()
1114 sym->def[S_DEF_USER].tri = no; in set_all_choice_values()
1123 struct symbol *sym, *csym; in conf_set_all_new_symbols() local
1171 for_all_symbols(i, sym) { in conf_set_all_new_symbols()
1172 if (sym_has_value(sym) || (sym->flags & SYMBOL_VALID)) in conf_set_all_new_symbols()
1174 switch (sym_get_type(sym)) { 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()
1205 if (!(sym_is_choice(sym) && mode == def_random)) in conf_set_all_new_symbols()
1206 sym->flags |= SYMBOL_DEF_USER; in conf_set_all_new_symbols()