Lines Matching refs:sym
118 struct symbol *sym; in randomize_choice_values() local
134 expr_list_for_each_sym(prop->expr, e, sym) in randomize_choice_values()
144 expr_list_for_each_sym(prop->expr, e, sym) { in randomize_choice_values()
146 sym->def[S_DEF_USER].tri = yes; in randomize_choice_values()
147 csym->def[S_DEF_USER].val = sym; in randomize_choice_values()
149 sym->def[S_DEF_USER].tri = no; in randomize_choice_values()
151 sym->flags |= SYMBOL_DEF_USER; in randomize_choice_values()
153 sym->flags &= ~SYMBOL_VALID; in randomize_choice_values()
174 struct symbol *sym, *csym; in conf_set_all_new_symbols() local
230 for_all_symbols(i, sym) { in conf_set_all_new_symbols()
231 if (sym_has_value(sym) || sym->flags & SYMBOL_VALID) in conf_set_all_new_symbols()
233 switch (sym_get_type(sym)) { in conf_set_all_new_symbols()
239 sym->def[S_DEF_USER].tri = yes; in conf_set_all_new_symbols()
242 sym->def[S_DEF_USER].tri = mod; in conf_set_all_new_symbols()
245 sym->def[S_DEF_USER].tri = no; in conf_set_all_new_symbols()
248 sym->def[S_DEF_USER].tri = no; in conf_set_all_new_symbols()
250 if (sym->type == S_TRISTATE) { in conf_set_all_new_symbols()
252 sym->def[S_DEF_USER].tri = yes; in conf_set_all_new_symbols()
254 sym->def[S_DEF_USER].tri = mod; in conf_set_all_new_symbols()
256 sym->def[S_DEF_USER].tri = yes; in conf_set_all_new_symbols()
261 if (!(sym_is_choice(sym) && mode == def_random)) in conf_set_all_new_symbols()
262 sym->flags |= SYMBOL_DEF_USER; in conf_set_all_new_symbols()
307 struct symbol *sym; in conf_rewrite_mod_or_yes() local
312 for_all_symbols(i, sym) { in conf_rewrite_mod_or_yes()
313 if (sym_get_type(sym) == S_TRISTATE && in conf_rewrite_mod_or_yes()
314 sym->def[S_DEF_USER].tri == old_val) in conf_rewrite_mod_or_yes()
315 sym->def[S_DEF_USER].tri = new_val; in conf_rewrite_mod_or_yes()
320 static int conf_askvalue(struct symbol *sym, const char *def) in conf_askvalue() argument
322 if (!sym_has_value(sym)) in conf_askvalue()
328 if (!sym_is_changeable(sym)) { in conf_askvalue()
338 if (sym_has_value(sym)) { in conf_askvalue()
354 struct symbol *sym = menu->sym; in conf_string() local
359 printf("(%s) ", sym->name); in conf_string()
360 def = sym_get_string_value(sym); in conf_string()
363 if (!conf_askvalue(sym, def)) in conf_string()
380 if (def && sym_set_string_value(sym, def)) in conf_string()
387 struct symbol *sym = menu->sym; in conf_sym() local
392 if (sym->name) in conf_sym()
393 printf("(%s) ", sym->name); in conf_sym()
395 oldval = sym_get_tristate_value(sym); in conf_sym()
407 if (oldval != no && sym_tristate_within_range(sym, no)) in conf_sym()
409 if (oldval != mod && sym_tristate_within_range(sym, mod)) in conf_sym()
411 if (oldval != yes && sym_tristate_within_range(sym, yes)) in conf_sym()
414 if (!conf_askvalue(sym, sym_get_string_value(sym))) in conf_sym()
445 if (sym_set_tristate_value(sym, newval)) in conf_sym()
454 struct symbol *sym, *def_sym; in conf_choice() local
458 sym = menu->sym; in conf_choice()
459 is_new = !sym_has_value(sym); in conf_choice()
460 if (sym_is_changeable(sym)) { in conf_choice()
462 sym_calc_value(sym); in conf_choice()
463 switch (sym_get_tristate_value(sym)) { in conf_choice()
472 switch (sym_get_tristate_value(sym)) { in conf_choice()
487 def_sym = sym_get_choice_value(sym); in conf_choice()
493 if (!child->sym) { in conf_choice()
498 if (child->sym == def_sym) { in conf_choice()
504 if (child->sym->name) in conf_choice()
505 printf(" (%s)", child->sym->name); in conf_choice()
506 if (!sym_has_value(child->sym)) in conf_choice()
546 if (!child->sym || !menu_is_visible(child)) in conf_choice()
557 sym_set_choice_value(sym, child->sym); in conf_choice()
569 struct symbol *sym; in conf() local
576 sym = menu->sym; in conf()
604 if (!sym) in conf()
607 if (sym_is_choice(sym)) { in conf()
609 if (sym->curr.tri != mod) in conf()
614 switch (sym->type) { in conf()
626 if (sym) in conf()
630 if (sym) in conf()
636 struct symbol *sym; in check_conf() local
642 sym = menu->sym; in check_conf()
643 if (sym && !sym_has_value(sym) && in check_conf()
644 (sym_is_changeable(sym) || in check_conf()
645 (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes))) { in check_conf()
649 if (sym->name) { in check_conf()
652 if (sym->type == S_STRING) { in check_conf()
653 str = sym_get_string_value(sym); in check_conf()
655 printf("%s%s=%s\n", CONFIG_, sym->name, str); in check_conf()
658 str = sym_get_string_value(sym); in check_conf()
659 printf("%s%s=%s\n", CONFIG_, sym->name, str); in check_conf()