Lines Matching refs:prop
31 static void prop_warn(struct property *prop, const char *fmt, ...) in prop_warn() argument
35 fprintf(stderr, "%s:%d:warning: ", prop->file->name, prop->lineno); in prop_warn()
131 struct property *prop; in menu_add_prop() local
133 prop = xmalloc(sizeof(*prop)); in menu_add_prop()
134 memset(prop, 0, sizeof(*prop)); in menu_add_prop()
135 prop->type = type; in menu_add_prop()
136 prop->file = current_file; in menu_add_prop()
137 prop->lineno = zconf_lineno(); in menu_add_prop()
138 prop->menu = current_entry; in menu_add_prop()
139 prop->expr = expr; in menu_add_prop()
140 prop->visible.expr = dep; in menu_add_prop()
146 for (propp = ¤t_entry->sym->prop; in menu_add_prop()
150 *propp = prop; in menu_add_prop()
153 return prop; in menu_add_prop()
159 struct property *prop = menu_add_prop(type, NULL, dep); in menu_add_prompt() local
162 prop_warn(prop, "leading whitespace ignored"); in menu_add_prompt()
167 prop_warn(prop, "prompt redefined"); in menu_add_prompt()
187 prop->visible.expr = expr_alloc_and(prop->visible.expr, in menu_add_prompt()
192 current_entry->prompt = prop; in menu_add_prompt()
193 prop->text = prompt; in menu_add_prompt()
195 return prop; in menu_add_prompt()
244 struct property *prop; in sym_check_prop() local
248 for (prop = sym->prop; prop; prop = prop->next) { in sym_check_prop()
249 switch (prop->type) { in sym_check_prop()
252 prop->expr->type != E_SYMBOL) in sym_check_prop()
253 prop_warn(prop, in sym_check_prop()
256 if (prop->expr->type != E_SYMBOL) in sym_check_prop()
258 sym2 = prop_get_symbol(prop); in sym_check_prop()
261 prop_warn(prop, in sym_check_prop()
271 prop_warn(prop, in sym_check_prop()
278 use = prop->type == P_SELECT ? "select" : "imply"; in sym_check_prop()
279 sym2 = prop_get_symbol(prop); in sym_check_prop()
281 prop_warn(prop, in sym_check_prop()
287 prop_warn(prop, in sym_check_prop()
294 prop_warn(prop, "range is only allowed " in sym_check_prop()
296 if (!menu_validate_number(sym, prop->expr->left.sym) || in sym_check_prop()
297 !menu_validate_number(sym, prop->expr->right.sym)) in sym_check_prop()
298 prop_warn(prop, "range is invalid"); in sym_check_prop()
310 struct property *prop; in menu_finalize() local
367 prop = menu->sym->prop; in menu_finalize()
373 prop = menu->prompt; in menu_finalize()
376 for (; prop; prop = prop->next) { in menu_finalize()
377 if (prop->menu != menu) in menu_finalize()
400 dep = rewrite_m(prop->visible.expr); in menu_finalize()
406 prop->visible.expr = dep; in menu_finalize()
412 if (prop->type == P_SELECT) { in menu_finalize()
413 struct symbol *es = prop_get_symbol(prop); in menu_finalize()
416 } else if (prop->type == P_IMPLY) { in menu_finalize()
417 struct symbol *es = prop_get_symbol(prop); in menu_finalize()
513 for (prop = menu->sym->prop; prop; prop = prop->next) { in menu_finalize()
514 if (prop->type == P_DEFAULT) in menu_finalize()
515 prop_warn(prop, "defaults for choice " in menu_finalize()
517 if (prop->menu == menu) in menu_finalize()
519 if (prop->type == P_PROMPT && in menu_finalize()
520 prop->menu->parent->sym != sym) in menu_finalize()
521 prop_warn(prop, "choice value used outside its choice group"); in menu_finalize()
532 for (prop = menu->sym->prop; prop; prop = prop->next) { in menu_finalize()
533 if (prop->menu != menu) in menu_finalize()
535 prop->visible.expr = expr_alloc_and(expr_copy(basedep), in menu_finalize()
536 prop->visible.expr); in menu_finalize()
540 prop = sym_get_choice_prop(sym); in menu_finalize()
541 for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr) in menu_finalize()
730 static void get_prompt_str(struct gstr *r, struct property *prop, in get_prompt_str() argument
737 str_printf(r, " Prompt: %s\n", prop->text); in get_prompt_str()
739 get_dep_str(r, prop->menu->dep, " Depends on: "); in get_prompt_str()
748 if (!expr_eq(prop->menu->dep, prop->visible.expr)) in get_prompt_str()
749 get_dep_str(r, prop->visible.expr, " Visible if: "); in get_prompt_str()
751 menu = prop->menu->parent; in get_prompt_str()
762 if (menu_is_visible(prop->menu)) { in get_prompt_str()
769 jump->target = prop->menu; in get_prompt_str()
804 struct property *prop; in get_symbol_props_str() local
806 for_all_properties(sym, prop, tok) { in get_symbol_props_str()
812 expr_gstr_print(prop->expr, r); in get_symbol_props_str()
824 struct property *prop; in get_symbol_str() local
831 prop = sym_get_range_prop(sym); in get_symbol_str()
832 if (prop) { in get_symbol_str()
834 expr_gstr_print(prop->expr, r); in get_symbol_str()
841 for_all_properties(sym, prop, P_SYMBOL) { in get_symbol_str()
842 if (prop->menu->prompt) { in get_symbol_str()
843 get_def_str(r, prop->menu); in get_symbol_str()
844 get_prompt_str(r, prop->menu->prompt, head); in get_symbol_str()
848 for_all_properties(sym, prop, P_SYMBOL) { in get_symbol_str()
849 if (!prop->menu->prompt) { in get_symbol_str()
850 get_def_str(r, prop->menu); in get_symbol_str()
851 get_dep_str(r, prop->menu->dep, " Depends on: "); in get_symbol_str()