1 /* vi: set sw=4 ts=4: */
3 * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
4 * Released under the terms of the GNU GPL v2.0.
16 #ifdef LKC_DIRECT_LINK
17 #define P(name,type,arg) extern type name arg
20 #define P(name,type,arg) extern type (*name ## _p) arg
22 #include "lkc_proto.h"
25 #define SRCTREE "srctree"
28 void zconfdump(FILE *out);
30 extern int zconfdebug;
31 void zconf_starthelp(void);
32 FILE *zconf_fopen(const char *name);
33 void zconf_initscan(const char *name);
34 void zconf_nextfile(const char *name);
35 int zconf_lineno(void);
36 char *zconf_curname(void);
39 extern const char conf_def_filename[];
40 extern char conf_filename[];
42 char *conf_get_default_confname(void);
45 void kconfig_load(void);
49 void menu_add_menu(void);
50 void menu_end_menu(void);
51 void menu_add_entry(struct symbol *sym);
52 void menu_end_entry(void);
53 void menu_add_dep(struct expr *dep);
54 struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep);
55 void menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
56 void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
57 void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
58 void menu_finalize(struct menu *parent);
59 void menu_set_type(int type);
62 struct file *file_lookup(const char *name);
63 int file_write_dep(const char *name);
69 struct gstr str_new(void);
70 struct gstr str_assign(const char *s);
71 void str_free(struct gstr *gs);
72 void str_append(struct gstr *gs, const char *s);
73 void str_printf(struct gstr *gs, const char *fmt, ...);
74 const char *str_get(struct gstr *gs);
78 void sym_clear_all_valid(void);
79 void sym_set_changed(struct symbol *sym);
80 struct symbol *sym_check_deps(struct symbol *sym);
81 struct property *prop_alloc(enum prop_type type, struct symbol *sym);
82 struct symbol *prop_get_symbol(struct property *prop);
84 static inline tristate sym_get_tristate_value(struct symbol *sym)
90 static inline struct symbol *sym_get_choice_value(struct symbol *sym)
92 return (struct symbol *)sym->curr.val;
95 static inline bool sym_set_choice_value(struct symbol *ch, struct symbol *chval)
97 return sym_set_tristate_value(chval, yes);
100 static inline bool sym_is_choice(struct symbol *sym)
102 return sym->flags & SYMBOL_CHOICE ? true : false;
105 static inline bool sym_is_choice_value(struct symbol *sym)
107 return sym->flags & SYMBOL_CHOICEVAL ? true : false;
110 static inline bool sym_is_optional(struct symbol *sym)
112 return sym->flags & SYMBOL_OPTIONAL ? true : false;
115 static inline bool sym_has_value(struct symbol *sym)
117 return sym->flags & SYMBOL_NEW ? false : true;