Lines Matching refs:sym

44 void menu_add_entry(struct symbol *sym)  in menu_add_entry()  argument
50 menu->sym = sym; in menu_add_entry()
93 if (e->left.sym == &symbol_mod) in menu_check_dep()
109 struct symbol *sym = current_entry->sym; in menu_set_type() local
111 if (sym->type == type) in menu_set_type()
113 if (sym->type == S_UNKNOWN) { in menu_set_type()
114 sym->type = type; in menu_set_type()
118 sym->name ? sym->name : "<choice>", in menu_set_type()
119 sym_type_name(sym->type), sym_type_name(type)); in menu_set_type()
124 struct property *prop = prop_alloc(type, current_entry->sym); in menu_add_prop()
155 void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep) in menu_add_symbol() argument
157 menu_add_prop(type, NULL, expr_alloc_symbol(sym), dep); in menu_add_symbol()
167 prop->expr = expr_alloc_symbol(current_entry->sym); in menu_add_option()
171 sym_defconfig_list = current_entry->sym; in menu_add_option()
172 else if (sym_defconfig_list != current_entry->sym) in menu_add_option()
178 static int menu_range_valid_sym(struct symbol *sym, struct symbol *sym2) in menu_range_valid_sym() argument
181 (sym2->type == S_UNKNOWN && sym_string_valid(sym, sym2->name)); in menu_range_valid_sym()
184 void sym_check_prop(struct symbol *sym) in sym_check_prop() argument
188 for (prop = sym->prop; prop; prop = prop->next) { in sym_check_prop()
191 if ((sym->type == S_STRING || sym->type == S_INT || sym->type == S_HEX) && in sym_check_prop()
195 " must be a single symbol", sym->name); in sym_check_prop()
199 if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE) in sym_check_prop()
202 "not boolean or tristate", sym->name); in sym_check_prop()
207 sym->name, sym2->name); in sym_check_prop()
215 if (sym->type != S_INT && sym->type != S_HEX) in sym_check_prop()
218 if (!menu_range_valid_sym(sym, prop->expr->left.sym) || in sym_check_prop()
219 !menu_range_valid_sym(sym, prop->expr->right.sym)) in sym_check_prop()
231 struct symbol *sym; in menu_finalize() local
235 sym = parent->sym; in menu_finalize()
237 if (sym && sym_is_choice(sym)) { in menu_finalize()
240 if (menu->sym) { in menu_finalize()
242 menu_set_type(menu->sym->type); in menu_finalize()
244 menu_set_type(sym->type); in menu_finalize()
248 parentdep = expr_alloc_symbol(sym); in menu_finalize()
259 if (menu->sym) in menu_finalize()
260 prop = menu->sym->prop; in menu_finalize()
269 if (menu->sym && menu->sym->type != S_TRISTATE) in menu_finalize()
275 expr_alloc_and(expr_alloc_symbol(menu->sym), expr_copy(dep))); in menu_finalize()
281 } else if (sym) { in menu_finalize()
288 if (!expr_contains_symbol(dep, sym)) in menu_finalize()
290 if (expr_depends_symbol(dep, sym)) in menu_finalize()
314 if (sym && sym_is_choice(sym) && menu->sym) { in menu_finalize()
315 menu->sym->flags |= SYMBOL_CHOICEVAL; in menu_finalize()
318 for (prop = menu->sym->prop; prop; prop = prop->next) { in menu_finalize()
329 menu_set_type(sym->type); in menu_finalize()
330 menu_add_symbol(P_CHOICE, sym, NULL); in menu_finalize()
331 prop = sym_get_choice_prop(sym); in menu_finalize()
335 (*ep)->right.sym = menu->sym; in menu_finalize()
349 if (sym && !(sym->flags & SYMBOL_WARNED)) { in menu_finalize()
350 if (sym->type == S_UNKNOWN) in menu_finalize()
353 if (sym_is_choice(sym) && !parent->prompt) in menu_finalize()
357 sym_check_prop(sym); in menu_finalize()
358 sym->flags |= SYMBOL_WARNED; in menu_finalize()
361 if (sym && !sym_is_optional(sym) && parent->prompt) { in menu_finalize()
362 sym->rev_dep.expr = expr_alloc_or(sym->rev_dep.expr, in menu_finalize()
371 struct symbol *sym; in menu_is_visible() local
376 sym = menu->sym; in menu_is_visible()
377 if (sym) { in menu_is_visible()
378 sym_calc_value(sym); in menu_is_visible()
385 if (!sym || sym_get_tristate_value(menu->sym) == no) in menu_is_visible()
398 else if (menu->sym) in menu_get_prompt()
399 return _(menu->sym->name); in menu_get_prompt()