Lines Matching refs:prop
32 static void prop_warn(struct property *prop, const char *fmt, ...) in prop_warn() argument
36 fprintf(stderr, "%s:%d:warning: ", prop->file->name, prop->lineno); in prop_warn()
132 struct property *prop; in menu_add_prop() local
134 prop = xmalloc(sizeof(*prop)); in menu_add_prop()
135 memset(prop, 0, sizeof(*prop)); in menu_add_prop()
136 prop->type = type; in menu_add_prop()
137 prop->file = current_file; in menu_add_prop()
138 prop->lineno = zconf_lineno(); in menu_add_prop()
139 prop->menu = current_entry; in menu_add_prop()
140 prop->expr = expr; in menu_add_prop()
141 prop->visible.expr = dep; in menu_add_prop()
147 for (propp = ¤t_entry->sym->prop; in menu_add_prop()
151 *propp = prop; in menu_add_prop()
154 return prop; in menu_add_prop()
160 struct property *prop = menu_add_prop(type, NULL, dep); in menu_add_prompt() local
163 prop_warn(prop, "leading whitespace ignored"); in menu_add_prompt()
168 prop_warn(prop, "prompt redefined"); in menu_add_prompt()
188 prop->visible.expr = expr_alloc_and(prop->visible.expr, in menu_add_prompt()
193 current_entry->prompt = prop; in menu_add_prompt()
194 prop->text = prompt; in menu_add_prompt()
196 return prop; in menu_add_prompt()
223 struct property *prop; in sym_check_prop() local
227 for (prop = sym->prop; prop; prop = prop->next) { in sym_check_prop()
228 switch (prop->type) { in sym_check_prop()
231 prop->expr->type != E_SYMBOL) in sym_check_prop()
232 prop_warn(prop, in sym_check_prop()
235 if (prop->expr->type != E_SYMBOL) in sym_check_prop()
237 sym2 = prop_get_symbol(prop); in sym_check_prop()
240 prop_warn(prop, in sym_check_prop()
250 prop_warn(prop, in sym_check_prop()
257 use = prop->type == P_SELECT ? "select" : "imply"; in sym_check_prop()
258 sym2 = prop_get_symbol(prop); in sym_check_prop()
260 prop_warn(prop, in sym_check_prop()
266 prop_warn(prop, in sym_check_prop()
273 prop_warn(prop, "range is only allowed " in sym_check_prop()
275 if (!menu_validate_number(sym, prop->expr->left.sym) || in sym_check_prop()
276 !menu_validate_number(sym, prop->expr->right.sym)) in sym_check_prop()
277 prop_warn(prop, "range is invalid"); in sym_check_prop()
289 struct property *prop; in menu_finalize() local
346 prop = menu->sym->prop; in menu_finalize()
352 prop = menu->prompt; in menu_finalize()
355 for (; prop; prop = prop->next) { in menu_finalize()
356 if (prop->menu != menu) in menu_finalize()
379 dep = rewrite_m(prop->visible.expr); in menu_finalize()
385 prop->visible.expr = dep; in menu_finalize()
391 if (prop->type == P_SELECT) { in menu_finalize()
392 struct symbol *es = prop_get_symbol(prop); in menu_finalize()
395 } else if (prop->type == P_IMPLY) { in menu_finalize()
396 struct symbol *es = prop_get_symbol(prop); in menu_finalize()
492 for (prop = menu->sym->prop; prop; prop = prop->next) { in menu_finalize()
493 if (prop->type == P_DEFAULT) in menu_finalize()
494 prop_warn(prop, "defaults for choice " in menu_finalize()
496 if (prop->menu == menu) in menu_finalize()
498 if (prop->type == P_PROMPT && in menu_finalize()
499 prop->menu->parent->sym != sym) in menu_finalize()
500 prop_warn(prop, "choice value used outside its choice group"); in menu_finalize()
511 for (prop = menu->sym->prop; prop; prop = prop->next) { in menu_finalize()
512 if (prop->menu != menu) in menu_finalize()
514 prop->visible.expr = expr_alloc_and(expr_copy(basedep), in menu_finalize()
515 prop->visible.expr); in menu_finalize()
519 prop = sym_get_choice_prop(sym); in menu_finalize()
520 for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr) in menu_finalize()
709 static void get_prompt_str(struct gstr *r, struct property *prop, in get_prompt_str() argument
716 str_printf(r, " Prompt: %s\n", prop->text); in get_prompt_str()
718 get_dep_str(r, prop->menu->dep, " Depends on: "); in get_prompt_str()
727 if (!expr_eq(prop->menu->dep, prop->visible.expr)) in get_prompt_str()
728 get_dep_str(r, prop->visible.expr, " Visible if: "); in get_prompt_str()
730 menu = prop->menu; in get_prompt_str()
772 struct property *prop; in get_symbol_props_str() local
774 for_all_properties(sym, prop, tok) { in get_symbol_props_str()
780 expr_gstr_print(prop->expr, r); in get_symbol_props_str()
792 struct property *prop; in get_symbol_str() local
799 prop = sym_get_range_prop(sym); in get_symbol_str()
800 if (prop) { in get_symbol_str()
802 expr_gstr_print(prop->expr, r); in get_symbol_str()
809 for_all_properties(sym, prop, P_SYMBOL) { in get_symbol_str()
810 if (prop->menu->prompt) { in get_symbol_str()
811 get_def_str(r, prop->menu); in get_symbol_str()
812 get_prompt_str(r, prop->menu->prompt, head); in get_symbol_str()
816 for_all_properties(sym, prop, P_SYMBOL) { in get_symbol_str()
817 if (!prop->menu->prompt) { in get_symbol_str()
818 get_def_str(r, prop->menu); in get_symbol_str()
819 get_dep_str(r, prop->menu->dep, " Depends on: "); in get_symbol_str()