diff options
Diffstat (limited to 'scripts/kconfig/lkc.h')
-rw-r--r-- | scripts/kconfig/lkc.h | 28 |
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 @@ | |||
14 | static inline const char *gettext(const char *txt) { return txt; } | 14 | static inline const char *gettext(const char *txt) { return txt; } |
15 | static inline void textdomain(const char *domainname) {} | 15 | static inline void textdomain(const char *domainname) {} |
16 | static inline void bindtextdomain(const char *name, const char *dir) {} | 16 | static inline void bindtextdomain(const char *name, const char *dir) {} |
17 | static 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 | ||
72 | extern int zconfdebug; | ||
73 | #endif | ||
74 | |||
64 | int zconfparse(void); | 75 | int zconfparse(void); |
65 | void zconfdump(FILE *out); | 76 | void zconfdump(FILE *out); |
66 | |||
67 | extern int zconfdebug; | ||
68 | void zconf_starthelp(void); | 77 | void zconf_starthelp(void); |
69 | FILE *zconf_fopen(const char *name); | 78 | FILE *zconf_fopen(const char *name); |
70 | void zconf_initscan(const char *name); | 79 | void zconf_initscan(const char *name); |
71 | void zconf_nextfile(const char *name); | 80 | void zconf_nextfile(const char *name); |
72 | int zconf_lineno(void); | 81 | int zconf_lineno(void); |
73 | char *zconf_curname(void); | 82 | const char *zconf_curname(void); |
83 | |||
84 | /* conf.c */ | ||
85 | void xfgets(char *str, int size, FILE *in); | ||
74 | 86 | ||
75 | /* confdata.c */ | 87 | /* confdata.c */ |
76 | const char *conf_get_configname(void); | 88 | const char *conf_get_configname(void); |
@@ -80,6 +92,13 @@ void sym_set_change_count(int count); | |||
80 | void sym_add_change_count(int count); | 92 | void sym_add_change_count(int count); |
81 | void conf_set_all_new_symbols(enum conf_def_mode mode); | 93 | void conf_set_all_new_symbols(enum conf_def_mode mode); |
82 | 94 | ||
95 | /* confdata.c and expr.c */ | ||
96 | static 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 */ |
84 | void kconfig_load(void); | 103 | void kconfig_load(void); |
85 | 104 | ||
@@ -91,6 +110,7 @@ void menu_end_menu(void); | |||
91 | void menu_add_entry(struct symbol *sym); | 110 | void menu_add_entry(struct symbol *sym); |
92 | void menu_end_entry(void); | 111 | void menu_end_entry(void); |
93 | void menu_add_dep(struct expr *dep); | 112 | void menu_add_dep(struct expr *dep); |
113 | void menu_add_visibility(struct expr *dep); | ||
94 | struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep); | 114 | struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep); |
95 | struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); | 115 | struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); |
96 | void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); | 116 | void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); |
@@ -126,6 +146,8 @@ void sym_init(void); | |||
126 | void sym_clear_all_valid(void); | 146 | void sym_clear_all_valid(void); |
127 | void sym_set_all_changed(void); | 147 | void sym_set_all_changed(void); |
128 | void sym_set_changed(struct symbol *sym); | 148 | void sym_set_changed(struct symbol *sym); |
149 | struct symbol *sym_choice_default(struct symbol *sym); | ||
150 | const char *sym_get_string_default(struct symbol *sym); | ||
129 | struct symbol *sym_check_deps(struct symbol *sym); | 151 | struct symbol *sym_check_deps(struct symbol *sym); |
130 | struct property *prop_alloc(enum prop_type type, struct symbol *sym); | 152 | struct property *prop_alloc(enum prop_type type, struct symbol *sym); |
131 | struct symbol *prop_get_symbol(struct property *prop); | 153 | struct symbol *prop_get_symbol(struct property *prop); |