.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org> |
---|
3 | | - * Released under the terms of the GNU GPL v2.0. |
---|
4 | 4 | */ |
---|
5 | 5 | |
---|
6 | 6 | #ifndef LKC_H |
---|
.. | .. |
---|
30 | 30 | #undef CONFIG_ |
---|
31 | 31 | #define CONFIG_ CONFIG_prefix() |
---|
32 | 32 | |
---|
33 | | -#define TF_COMMAND 0x0001 |
---|
34 | | -#define TF_PARAM 0x0002 |
---|
35 | | -#define TF_OPTION 0x0004 |
---|
36 | | - |
---|
37 | 33 | enum conf_def_mode { |
---|
38 | 34 | def_default, |
---|
39 | 35 | def_yes, |
---|
40 | 36 | def_mod, |
---|
| 37 | + def_y2m, |
---|
| 38 | + def_m2y, |
---|
41 | 39 | def_no, |
---|
42 | 40 | def_random |
---|
43 | | -}; |
---|
44 | | - |
---|
45 | | -#define T_OPT_MODULES 1 |
---|
46 | | -#define T_OPT_DEFCONFIG_LIST 2 |
---|
47 | | -#define T_OPT_ALLNOCONFIG_Y 4 |
---|
48 | | - |
---|
49 | | -struct kconf_id { |
---|
50 | | - const char *name; |
---|
51 | | - int token; |
---|
52 | | - unsigned int flags; |
---|
53 | | - enum symbol_type stype; |
---|
54 | 41 | }; |
---|
55 | 42 | |
---|
56 | 43 | extern int yylineno; |
---|
.. | .. |
---|
64 | 51 | |
---|
65 | 52 | /* confdata.c */ |
---|
66 | 53 | const char *conf_get_configname(void); |
---|
67 | | -const char *conf_get_autoconfig_name(void); |
---|
68 | | -char *conf_get_default_confname(void); |
---|
69 | 54 | void sym_set_change_count(int count); |
---|
70 | 55 | void sym_add_change_count(int count); |
---|
71 | 56 | bool conf_set_all_new_symbols(enum conf_def_mode mode); |
---|
| 57 | +void conf_rewrite_mod_or_yes(enum conf_def_mode mode); |
---|
72 | 58 | void set_all_choice_values(struct symbol *csym); |
---|
73 | 59 | |
---|
74 | 60 | /* confdata.c and expr.c */ |
---|
.. | .. |
---|
80 | 66 | fprintf(stderr, "Error in writing or end of file.\n"); |
---|
81 | 67 | } |
---|
82 | 68 | |
---|
83 | | -/* menu.c */ |
---|
84 | | -void _menu_init(void); |
---|
85 | | -void menu_warn(struct menu *menu, const char *fmt, ...); |
---|
86 | | -struct menu *menu_add_menu(void); |
---|
87 | | -void menu_end_menu(void); |
---|
88 | | -void menu_add_entry(struct symbol *sym); |
---|
89 | | -void menu_add_dep(struct expr *dep); |
---|
90 | | -void menu_add_visibility(struct expr *dep); |
---|
91 | | -struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); |
---|
92 | | -void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); |
---|
93 | | -void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); |
---|
94 | | -void menu_add_option(int token, char *arg); |
---|
95 | | -void menu_finalize(struct menu *parent); |
---|
96 | | -void menu_set_type(int type); |
---|
97 | | - |
---|
98 | 69 | /* util.c */ |
---|
99 | 70 | struct file *file_lookup(const char *name); |
---|
100 | 71 | void *xmalloc(size_t size); |
---|
.. | .. |
---|
102 | 73 | void *xrealloc(void *p, size_t size); |
---|
103 | 74 | char *xstrdup(const char *s); |
---|
104 | 75 | char *xstrndup(const char *s, size_t n); |
---|
| 76 | + |
---|
| 77 | +/* lexer.l */ |
---|
| 78 | +int yylex(void); |
---|
105 | 79 | |
---|
106 | 80 | struct gstr { |
---|
107 | 81 | size_t len; |
---|
.. | .. |
---|
118 | 92 | void str_printf(struct gstr *gs, const char *fmt, ...); |
---|
119 | 93 | const char *str_get(struct gstr *gs); |
---|
120 | 94 | |
---|
| 95 | +/* menu.c */ |
---|
| 96 | +void _menu_init(void); |
---|
| 97 | +void menu_warn(struct menu *menu, const char *fmt, ...); |
---|
| 98 | +struct menu *menu_add_menu(void); |
---|
| 99 | +void menu_end_menu(void); |
---|
| 100 | +void menu_add_entry(struct symbol *sym); |
---|
| 101 | +void menu_add_dep(struct expr *dep); |
---|
| 102 | +void menu_add_visibility(struct expr *dep); |
---|
| 103 | +struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); |
---|
| 104 | +void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); |
---|
| 105 | +void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); |
---|
| 106 | +void menu_add_option_modules(void); |
---|
| 107 | +void menu_add_option_defconfig_list(void); |
---|
| 108 | +void menu_add_option_allnoconfig_y(void); |
---|
| 109 | +void menu_finalize(struct menu *parent); |
---|
| 110 | +void menu_set_type(int type); |
---|
| 111 | + |
---|
| 112 | +extern struct menu rootmenu; |
---|
| 113 | + |
---|
| 114 | +bool menu_is_empty(struct menu *menu); |
---|
| 115 | +bool menu_is_visible(struct menu *menu); |
---|
| 116 | +bool menu_has_prompt(struct menu *menu); |
---|
| 117 | +const char *menu_get_prompt(struct menu *menu); |
---|
| 118 | +struct menu *menu_get_root_menu(struct menu *menu); |
---|
| 119 | +struct menu *menu_get_parent_menu(struct menu *menu); |
---|
| 120 | +bool menu_has_help(struct menu *menu); |
---|
| 121 | +const char *menu_get_help(struct menu *menu); |
---|
| 122 | +struct gstr get_relations_str(struct symbol **sym_arr, struct list_head *head); |
---|
| 123 | +void menu_get_ext_help(struct menu *menu, struct gstr *help); |
---|
| 124 | + |
---|
121 | 125 | /* symbol.c */ |
---|
122 | 126 | void sym_clear_all_valid(void); |
---|
123 | 127 | struct symbol *sym_choice_default(struct symbol *sym); |
---|
| 128 | +struct property *sym_get_range_prop(struct symbol *sym); |
---|
124 | 129 | const char *sym_get_string_default(struct symbol *sym); |
---|
125 | 130 | struct symbol *sym_check_deps(struct symbol *sym); |
---|
126 | | -struct property *prop_alloc(enum prop_type type, struct symbol *sym); |
---|
127 | 131 | struct symbol *prop_get_symbol(struct property *prop); |
---|
128 | 132 | |
---|
129 | 133 | static inline tristate sym_get_tristate_value(struct symbol *sym) |
---|