1.1 --- a/kconfig/lkc.h Fri Oct 17 12:47:53 2008 +0000
1.2 +++ b/kconfig/lkc.h Sat Aug 13 00:05:51 2011 +0200
1.3 @@ -14,6 +14,7 @@
1.4 static inline const char *gettext(const char *txt) { return txt; }
1.5 static inline void textdomain(const char *domainname) {}
1.6 static inline void bindtextdomain(const char *name, const char *dir) {}
1.7 +static inline char *bind_textdomain_codeset(const char *dn, char *c) { return c; }
1.8 #endif
1.9
1.10 #ifdef __cplusplus
1.11 @@ -31,12 +32,18 @@
1.12
1.13 #define SRCTREE "srctree"
1.14
1.15 -#define PACKAGE "crosstool-NG"
1.16 +#ifndef PACKAGE
1.17 +#define PACKAGE "linux"
1.18 +#endif
1.19 +
1.20 #define LOCALEDIR "/usr/share/locale"
1.21
1.22 #define _(text) gettext(text)
1.23 #define N_(text) (text)
1.24
1.25 +#ifndef CONFIG_
1.26 +#define CONFIG_ "CONFIG_"
1.27 +#endif
1.28
1.29 #define TF_COMMAND 0x0001
1.30 #define TF_PARAM 0x0002
1.31 @@ -61,35 +68,49 @@
1.32 enum symbol_type stype;
1.33 };
1.34
1.35 +#ifdef YYDEBUG
1.36 +extern int zconfdebug;
1.37 +#endif
1.38 +
1.39 int zconfparse(void);
1.40 void zconfdump(FILE *out);
1.41 -
1.42 -extern int zconfdebug;
1.43 void zconf_starthelp(void);
1.44 FILE *zconf_fopen(const char *name);
1.45 void zconf_initscan(const char *name);
1.46 void zconf_nextfile(const char *name);
1.47 int zconf_lineno(void);
1.48 -char *zconf_curname(void);
1.49 +const char *zconf_curname(void);
1.50 +
1.51 +/* conf.c */
1.52 +void xfgets(char *str, int size, FILE *in);
1.53
1.54 /* confdata.c */
1.55 const char *conf_get_configname(void);
1.56 +const char *conf_get_autoconfig_name(void);
1.57 char *conf_get_default_confname(void);
1.58 void sym_set_change_count(int count);
1.59 void sym_add_change_count(int count);
1.60 void conf_set_all_new_symbols(enum conf_def_mode mode);
1.61
1.62 +/* confdata.c and expr.c */
1.63 +static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
1.64 +{
1.65 + if (fwrite(str, len, count, out) < count)
1.66 + fprintf(stderr, "\nError in writing or end of file.\n");
1.67 +}
1.68 +
1.69 /* kconfig_load.c */
1.70 void kconfig_load(void);
1.71
1.72 /* menu.c */
1.73 -void menu_init(void);
1.74 +void _menu_init(void);
1.75 void menu_warn(struct menu *menu, const char *fmt, ...);
1.76 struct menu *menu_add_menu(void);
1.77 void menu_end_menu(void);
1.78 void menu_add_entry(struct symbol *sym);
1.79 void menu_end_entry(void);
1.80 void menu_add_dep(struct expr *dep);
1.81 +void menu_add_visibility(struct expr *dep);
1.82 struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep);
1.83 struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
1.84 void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
1.85 @@ -105,6 +126,11 @@
1.86 struct gstr {
1.87 size_t len;
1.88 char *s;
1.89 + /*
1.90 + * when max_width is not zero long lines in string s (if any) get
1.91 + * wrapped not to exceed the max_width value
1.92 + */
1.93 + int max_width;
1.94 };
1.95 struct gstr str_new(void);
1.96 struct gstr str_assign(const char *s);
1.97 @@ -120,6 +146,8 @@
1.98 void sym_clear_all_valid(void);
1.99 void sym_set_all_changed(void);
1.100 void sym_set_changed(struct symbol *sym);
1.101 +struct symbol *sym_choice_default(struct symbol *sym);
1.102 +const char *sym_get_string_default(struct symbol *sym);
1.103 struct symbol *sym_check_deps(struct symbol *sym);
1.104 struct property *prop_alloc(enum prop_type type, struct symbol *sym);
1.105 struct symbol *prop_get_symbol(struct property *prop);