Lines Matching refs:sym

68 void menu_add_entry(struct symbol *sym, enum menu_type type)  in menu_add_entry()  argument
75 menu->sym = sym; in menu_add_entry()
83 if (sym) in menu_add_entry()
84 list_add_tail(&menu->link, &sym->menus); in menu_add_entry()
121 if (e->left.sym == &symbol_mod) in rewrite_m()
137 struct symbol *sym = current_entry->sym; in menu_set_type() local
139 if (sym->type == type) in menu_set_type()
141 if (sym->type == S_UNKNOWN) { in menu_set_type()
142 sym->type = type; in menu_set_type()
147 sym->name ? sym->name : "<choice>", in menu_set_type()
148 sym_type_name(sym->type), sym_type_name(type)); in menu_set_type()
166 if (current_entry->sym) { in menu_add_prop()
169 for (propp = &current_entry->sym->prop; in menu_add_prop()
222 void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep) in menu_add_symbol() argument
224 menu_add_prop(type, expr_alloc_symbol(sym), dep); in menu_add_symbol()
227 static int menu_validate_number(struct symbol *sym, struct symbol *sym2) in menu_validate_number() argument
230 (sym2->type == S_UNKNOWN && sym_string_valid(sym, sym2->name)); in menu_validate_number()
233 static void sym_check_prop(struct symbol *sym) in sym_check_prop() argument
239 for (prop = sym->prop; prop; prop = prop->next) { in sym_check_prop()
242 if ((sym->type == S_STRING || sym->type == S_INT || sym->type == S_HEX) && in sym_check_prop()
246 " must be a single symbol", sym->name); in sym_check_prop()
250 if (sym->type == S_HEX || sym->type == S_INT) { in sym_check_prop()
251 if (!menu_validate_number(sym, sym2)) in sym_check_prop()
254 sym->name); in sym_check_prop()
256 if (sym_is_choice(sym)) { in sym_check_prop()
259 if (!choice || choice->sym != sym) in sym_check_prop()
269 if (sym->type != S_BOOLEAN && sym->type != S_TRISTATE) in sym_check_prop()
272 "not bool or tristate", sym->name, use); in sym_check_prop()
282 if (sym->type != S_INT && sym->type != S_HEX) in sym_check_prop()
285 if (!menu_validate_number(sym, prop->expr->left.sym) || in sym_check_prop()
286 !menu_validate_number(sym, prop->expr->right.sym)) in sym_check_prop()
298 struct symbol *sym; in _menu_finalize() local
302 sym = parent->sym; in _menu_finalize()
321 if (menu->sym) in _menu_finalize()
326 prop = menu->sym->prop; in _menu_finalize()
372 expr_alloc_and(expr_alloc_symbol(menu->sym), dep)); in _menu_finalize()
376 expr_alloc_and(expr_alloc_symbol(menu->sym), dep)); in _menu_finalize()
386 _menu_finalize(menu, sym && sym_is_choice(sym)); in _menu_finalize()
387 } else if (!inside_choice && sym) { in _menu_finalize()
418 if (!expr_contains_symbol(dep, sym)) in _menu_finalize()
421 if (expr_depends_symbol(dep, sym)) in _menu_finalize()
454 sym->dir_dep.expr = expr_alloc_or(sym->dir_dep.expr, parent->dep); in _menu_finalize()
497 if (sym && !(sym->flags & SYMBOL_WARNED)) { in _menu_finalize()
498 if (sym->type == S_UNKNOWN) in _menu_finalize()
502 sym_check_prop(sym); in _menu_finalize()
503 sym->flags |= SYMBOL_WARNED; in _menu_finalize()
538 struct symbol *sym; in menu_is_visible() local
549 sym = menu->sym; in menu_is_visible()
550 if (sym) { in menu_is_visible()
551 sym_calc_value(sym); in menu_is_visible()
559 if (!sym || sym_get_tristate_value(menu->sym) == no) in menu_is_visible()
573 else if (menu->sym) in menu_get_prompt()
574 return menu->sym->name; in menu_get_prompt()
681 if (menu->sym) { in get_prompt_str()
682 str_printf(r, " (%s [=%s])", menu->sym->name ? in get_prompt_str()
683 menu->sym->name : "<choice>", in get_prompt_str()
684 sym_get_string_value(menu->sym)); in get_prompt_str()
690 static void get_symbol_props_str(struct gstr *r, struct symbol *sym, in get_symbol_props_str() argument
696 for_all_properties(sym, prop, tok) { in get_symbol_props_str()
711 static void get_symbol_str(struct gstr *r, struct symbol *sym, in get_symbol_str() argument
717 if (sym && sym->name) { in get_symbol_str()
718 str_printf(r, "Symbol: %s [=%s]\n", sym->name, in get_symbol_str()
719 sym_get_string_value(sym)); in get_symbol_str()
720 str_printf(r, "Type : %s\n", sym_type_name(sym->type)); in get_symbol_str()
721 if (sym->type == S_INT || sym->type == S_HEX) { in get_symbol_str()
722 prop = sym_get_range_prop(sym); in get_symbol_str()
732 list_for_each_entry(menu, &sym->menus, link) { in get_symbol_str()
739 list_for_each_entry(menu, &sym->menus, link) { in get_symbol_str()
746 get_symbol_props_str(r, sym, P_SELECT, "Selects: "); in get_symbol_str()
747 if (sym->rev_dep.expr) { in get_symbol_str()
748 expr_gstr_print_revdep(sym->rev_dep.expr, r, yes, "Selected by [y]:\n"); in get_symbol_str()
749 expr_gstr_print_revdep(sym->rev_dep.expr, r, mod, "Selected by [m]:\n"); in get_symbol_str()
750 expr_gstr_print_revdep(sym->rev_dep.expr, r, no, "Selected by [n]:\n"); in get_symbol_str()
753 get_symbol_props_str(r, sym, P_IMPLY, "Implies: "); in get_symbol_str()
754 if (sym->implied.expr) { in get_symbol_str()
755 expr_gstr_print_revdep(sym->implied.expr, r, yes, "Implied by [y]:\n"); in get_symbol_str()
756 expr_gstr_print_revdep(sym->implied.expr, r, mod, "Implied by [m]:\n"); in get_symbol_str()
757 expr_gstr_print_revdep(sym->implied.expr, r, no, "Implied by [n]:\n"); in get_symbol_str()
765 struct symbol *sym; in get_relations_str() local
769 for (i = 0; sym_arr && (sym = sym_arr[i]); i++) in get_relations_str()
770 get_symbol_str(&res, sym, head); in get_relations_str()
779 struct symbol *sym = menu->sym; in menu_get_ext_help() local
783 if (sym->name) in menu_get_ext_help()
784 str_printf(help, "%s%s:\n\n", CONFIG_, sym->name); in menu_get_ext_help()
788 if (sym) in menu_get_ext_help()
789 get_symbol_str(help, sym, NULL); in menu_get_ext_help()
829 if (!menu->sym) { in menu_dump()
836 printf("symbol %s\n", menu->sym->name); in menu_dump()