aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/lkc.h
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/kconfig/lkc.h')
-rw-r--r--scripts/kconfig/lkc.h28
1 files changed, 25 insertions, 3 deletions
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index ce6549cdaccf..febf0c94d558 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -14,6 +14,7 @@
14static inline const char *gettext(const char *txt) { return txt; } 14static inline const char *gettext(const char *txt) { return txt; }
15static inline void textdomain(const char *domainname) {} 15static inline void textdomain(const char *domainname) {}
16static inline void bindtextdomain(const char *name, const char *dir) {} 16static inline void bindtextdomain(const char *name, const char *dir) {}
17static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c; }
17#endif 18#endif
18 19
19#ifdef __cplusplus 20#ifdef __cplusplus
@@ -31,12 +32,18 @@ extern "C" {
31 32
32#define SRCTREE "srctree" 33#define SRCTREE "srctree"
33 34
35#ifndef PACKAGE
34#define PACKAGE "linux" 36#define PACKAGE "linux"
37#endif
38
35#define LOCALEDIR "/usr/share/locale" 39#define LOCALEDIR "/usr/share/locale"
36 40
37#define _(text) gettext(text) 41#define _(text) gettext(text)
38#define N_(text) (text) 42#define N_(text) (text)
39 43
44#ifndef CONFIG_
45#define CONFIG_ "CONFIG_"
46#endif
40 47
41#define TF_COMMAND 0x0001 48#define TF_COMMAND 0x0001
42#define TF_PARAM 0x0002 49#define TF_PARAM 0x0002
@@ -61,16 +68,21 @@ struct kconf_id {
61 enum symbol_type stype; 68 enum symbol_type stype;
62}; 69};
63 70
71#ifdef YYDEBUG
72extern int zconfdebug;
73#endif
74
64int zconfparse(void); 75int zconfparse(void);
65void zconfdump(FILE *out); 76void zconfdump(FILE *out);
66
67extern int zconfdebug;
68void zconf_starthelp(void); 77void zconf_starthelp(void);
69FILE *zconf_fopen(const char *name); 78FILE *zconf_fopen(const char *name);
70void zconf_initscan(const char *name); 79void zconf_initscan(const char *name);
71void zconf_nextfile(const char *name); 80void zconf_nextfile(const char *name);
72int zconf_lineno(void); 81int zconf_lineno(void);
73char *zconf_curname(void); 82const char *zconf_curname(void);
83
84/* conf.c */
85void xfgets(char *str, int size, FILE *in);
74 86
75/* confdata.c */ 87/* confdata.c */
76const char *conf_get_configname(void); 88const char *conf_get_configname(void);
@@ -80,6 +92,13 @@ void sym_set_change_count(int count);
80void sym_add_change_count(int count); 92void sym_add_change_count(int count);
81void conf_set_all_new_symbols(enum conf_def_mode mode); 93void conf_set_all_new_symbols(enum conf_def_mode mode);
82 94
95/* confdata.c and expr.c */
96static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
97{
98 if (fwrite(str, len, count, out) < count)
99 fprintf(stderr, "\nError in writing or end of file.\n");
100}
101
83/* kconfig_load.c */ 102/* kconfig_load.c */
84void kconfig_load(void); 103void kconfig_load(void);
85 104
@@ -91,6 +110,7 @@ void menu_end_menu(void);
91void menu_add_entry(struct symbol *sym); 110void menu_add_entry(struct symbol *sym);
92void menu_end_entry(void); 111void menu_end_entry(void);
93void menu_add_dep(struct expr *dep); 112void menu_add_dep(struct expr *dep);
113void menu_add_visibility(struct expr *dep);
94struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep); 114struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep);
95struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); 115struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
96void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); 116void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
@@ -126,6 +146,8 @@ void sym_init(void);
126void sym_clear_all_valid(void); 146void sym_clear_all_valid(void);
127void sym_set_all_changed(void); 147void sym_set_all_changed(void);
128void sym_set_changed(struct symbol *sym); 148void sym_set_changed(struct symbol *sym);
149struct symbol *sym_choice_default(struct symbol *sym);
150const char *sym_get_string_default(struct symbol *sym);
129struct symbol *sym_check_deps(struct symbol *sym); 151struct symbol *sym_check_deps(struct symbol *sym);
130struct property *prop_alloc(enum prop_type type, struct symbol *sym); 152struct property *prop_alloc(enum prop_type type, struct symbol *sym);
131struct symbol *prop_get_symbol(struct property *prop); 153struct symbol *prop_get_symbol(struct property *prop);