Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Michal Marek | 42368c3 | 2010-08-17 10:21:19 +0200 | [diff] [blame] | 2 | #include <stdarg.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | |
| 4 | /* confdata.c */ |
Michal Marek | 70529b1 | 2015-01-27 17:11:42 +0100 | [diff] [blame] | 5 | void conf_parse(const char *name); |
| 6 | int conf_read(const char *name); |
| 7 | int conf_read_simple(const char *name, int); |
| 8 | int conf_write_defconfig(const char *name); |
| 9 | int conf_write(const char *name); |
Masahiro Yamada | 00c864f | 2018-07-20 16:46:31 +0900 | [diff] [blame] | 10 | int conf_write_autoconf(int overwrite); |
Masahiro Yamada | 5ee5465 | 2021-04-10 15:57:22 +0900 | [diff] [blame] | 11 | void conf_set_changed(bool val); |
Michal Marek | 70529b1 | 2015-01-27 17:11:42 +0100 | [diff] [blame] | 12 | bool conf_get_changed(void); |
| 13 | void conf_set_changed_callback(void (*fn)(void)); |
Masahiro Yamada | 5accd7f | 2018-07-05 11:46:12 +0900 | [diff] [blame] | 14 | void conf_set_message_callback(void (*fn)(const char *s)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 15 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | /* symbol.c */ |
Michal Marek | 70529b1 | 2015-01-27 17:11:42 +0100 | [diff] [blame] | 17 | extern struct symbol * symbol_hash[SYMBOL_HASHSIZE]; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 18 | |
Michal Marek | 70529b1 | 2015-01-27 17:11:42 +0100 | [diff] [blame] | 19 | struct symbol * sym_lookup(const char *name, int flags); |
| 20 | struct symbol * sym_find(const char *name); |
Masahiro Yamada | 51d792c | 2021-10-01 14:32:47 +0900 | [diff] [blame] | 21 | void print_symbol_for_listconfig(struct symbol *sym); |
Michal Marek | 70529b1 | 2015-01-27 17:11:42 +0100 | [diff] [blame] | 22 | struct symbol ** sym_re_search(const char *pattern); |
| 23 | const char * sym_type_name(enum symbol_type type); |
| 24 | void sym_calc_value(struct symbol *sym); |
| 25 | enum symbol_type sym_get_type(struct symbol *sym); |
| 26 | bool sym_tristate_within_range(struct symbol *sym,tristate tri); |
| 27 | bool sym_set_tristate_value(struct symbol *sym,tristate tri); |
| 28 | tristate sym_toggle_tristate_value(struct symbol *sym); |
| 29 | bool sym_string_valid(struct symbol *sym, const char *newval); |
| 30 | bool sym_string_within_range(struct symbol *sym, const char *str); |
| 31 | bool sym_set_string_value(struct symbol *sym, const char *newval); |
Marco Ammon | baa23ec | 2019-07-04 12:50:41 +0200 | [diff] [blame] | 32 | bool sym_is_changeable(struct symbol *sym); |
Michal Marek | 70529b1 | 2015-01-27 17:11:42 +0100 | [diff] [blame] | 33 | struct property * sym_get_choice_prop(struct symbol *sym); |
Michal Marek | 70529b1 | 2015-01-27 17:11:42 +0100 | [diff] [blame] | 34 | const char * sym_get_string_value(struct symbol *sym); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | |
Michal Marek | 70529b1 | 2015-01-27 17:11:42 +0100 | [diff] [blame] | 36 | const char * prop_get_type_name(enum prop_type type); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | |
Masahiro Yamada | 104daea | 2018-05-28 18:21:40 +0900 | [diff] [blame] | 38 | /* preprocess.c */ |
Masahiro Yamada | 1175c02 | 2018-05-28 18:21:50 +0900 | [diff] [blame] | 39 | enum variable_flavor { |
| 40 | VAR_SIMPLE, |
| 41 | VAR_RECURSIVE, |
Masahiro Yamada | ed2a22f | 2018-05-28 18:21:51 +0900 | [diff] [blame] | 42 | VAR_APPEND, |
Masahiro Yamada | 1175c02 | 2018-05-28 18:21:50 +0900 | [diff] [blame] | 43 | }; |
Masahiro Yamada | 104daea | 2018-05-28 18:21:40 +0900 | [diff] [blame] | 44 | void env_write_dep(FILE *f, const char *auto_conf_name); |
Masahiro Yamada | 1175c02 | 2018-05-28 18:21:50 +0900 | [diff] [blame] | 45 | void variable_add(const char *name, const char *value, |
| 46 | enum variable_flavor flavor); |
Masahiro Yamada | 9ced3bd | 2018-05-28 18:21:49 +0900 | [diff] [blame] | 47 | void variable_all_del(void); |
Masahiro Yamada | 104daea | 2018-05-28 18:21:40 +0900 | [diff] [blame] | 48 | char *expand_dollar(const char **str); |
| 49 | char *expand_one_token(const char **str); |
| 50 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 51 | /* expr.c */ |
Michal Marek | 70529b1 | 2015-01-27 17:11:42 +0100 | [diff] [blame] | 52 | void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken); |