summaryrefslogtreecommitdiff
path: root/scripts/kconfig/lkc.h
Unidiff
Diffstat (limited to 'scripts/kconfig/lkc.h') (more/less context) (show whitespace changes)
-rw-r--r--scripts/kconfig/lkc.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index cdd04a9..dd040f7 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -40,70 +40,74 @@ extern char conf_filename[];
40 40
41char *conf_get_default_confname(void); 41char *conf_get_default_confname(void);
42 42
43/* kconfig_load.c */ 43/* kconfig_load.c */
44void kconfig_load(void); 44void kconfig_load(void);
45 45
46/* menu.c */ 46/* menu.c */
47void menu_init(void); 47void menu_init(void);
48void menu_add_menu(void); 48void menu_add_menu(void);
49void menu_end_menu(void); 49void menu_end_menu(void);
50void menu_add_entry(struct symbol *sym); 50void menu_add_entry(struct symbol *sym);
51void menu_end_entry(void); 51void menu_end_entry(void);
52struct property *create_prop(enum prop_type type);
53void menu_add_dep(struct expr *dep); 52void menu_add_dep(struct expr *dep);
54struct property *menu_add_prop(int token, char *prompt, struct symbol *def, struct expr *dep); 53struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep);
54void menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
55void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
56void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
55void menu_finalize(struct menu *parent); 57void menu_finalize(struct menu *parent);
56void menu_set_type(int type); 58void menu_set_type(int type);
57struct file *file_lookup(const char *name); 59struct file *file_lookup(const char *name);
58int file_write_dep(const char *name); 60int file_write_dep(const char *name);
59 61
60extern struct menu *current_entry; 62extern struct menu *current_entry;
61extern struct menu *current_menu; 63extern struct menu *current_menu;
62 64
63/* symbol.c */ 65/* symbol.c */
64void sym_init(void); 66void sym_init(void);
65void sym_clear_all_valid(void); 67void sym_clear_all_valid(void);
66void sym_set_changed(struct symbol *sym); 68void sym_set_changed(struct symbol *sym);
69struct symbol *sym_check_deps(struct symbol *sym);
70struct property *prop_alloc(enum prop_type type, struct symbol *sym);
71struct symbol *prop_get_symbol(struct property *prop);
67 72
68static inline tristate sym_get_tristate_value(struct symbol *sym) 73static inline tristate sym_get_tristate_value(struct symbol *sym)
69{ 74{
70 return S_TRI(sym->curr); 75 return sym->curr.tri;
71} 76}
72 77
73 78
74static inline struct symbol *sym_get_choice_value(struct symbol *sym) 79static inline struct symbol *sym_get_choice_value(struct symbol *sym)
75{ 80{
76 return (struct symbol *)S_VAL(sym->curr); 81 return (struct symbol *)sym->curr.val;
77} 82}
78 83
79static inline bool sym_set_choice_value(struct symbol *ch, struct symbol *chval) 84static inline bool sym_set_choice_value(struct symbol *ch, struct symbol *chval)
80{ 85{
81 return sym_set_tristate_value(chval, yes); 86 return sym_set_tristate_value(chval, yes);
82} 87}
83 88
84static inline bool sym_is_choice(struct symbol *sym) 89static inline bool sym_is_choice(struct symbol *sym)
85{ 90{
86 return sym->flags & SYMBOL_CHOICE ? true : false; 91 return sym->flags & SYMBOL_CHOICE ? true : false;
87} 92}
88 93
89static inline bool sym_is_choice_value(struct symbol *sym) 94static inline bool sym_is_choice_value(struct symbol *sym)
90{ 95{
91 return sym->flags & SYMBOL_CHOICEVAL ? true : false; 96 return sym->flags & SYMBOL_CHOICEVAL ? true : false;
92} 97}
93 98
94static inline bool sym_is_optional(struct symbol *sym) 99static inline bool sym_is_optional(struct symbol *sym)
95{ 100{
96 return sym->flags & SYMBOL_OPTIONAL ? true : false; 101 return sym->flags & SYMBOL_OPTIONAL ? true : false;
97} 102}
98 103
99static inline bool sym_has_value(struct symbol *sym) 104static inline bool sym_has_value(struct symbol *sym)
100{ 105{
101 //return S_VAL(sym->def) != NULL;
102 return sym->flags & SYMBOL_NEW ? false : true; 106 return sym->flags & SYMBOL_NEW ? false : true;
103} 107}
104 108
105#ifdef __cplusplus 109#ifdef __cplusplus
106} 110}
107#endif 111#endif
108 112
109#endif /* LKC_H */ 113#endif /* LKC_H */