blob: edd1e617b25c5c3683ba4287f108ccb690608d10 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Michal Marek42368c32010-08-17 10:21:19 +02002#include <stdarg.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
4/* confdata.c */
Michal Marek70529b12015-01-27 17:11:42 +01005void conf_parse(const char *name);
6int conf_read(const char *name);
7int conf_read_simple(const char *name, int);
8int conf_write_defconfig(const char *name);
9int conf_write(const char *name);
Masahiro Yamada00c864f2018-07-20 16:46:31 +090010int conf_write_autoconf(int overwrite);
Masahiro Yamada5ee54652021-04-10 15:57:22 +090011void conf_set_changed(bool val);
Michal Marek70529b12015-01-27 17:11:42 +010012bool conf_get_changed(void);
13void conf_set_changed_callback(void (*fn)(void));
Masahiro Yamada5accd7f2018-07-05 11:46:12 +090014void conf_set_message_callback(void (*fn)(const char *s));
Linus Torvalds1da177e2005-04-16 15:20:36 -070015
Linus Torvalds1da177e2005-04-16 15:20:36 -070016/* symbol.c */
Michal Marek70529b12015-01-27 17:11:42 +010017extern struct symbol * symbol_hash[SYMBOL_HASHSIZE];
Linus Torvalds1da177e2005-04-16 15:20:36 -070018
Michal Marek70529b12015-01-27 17:11:42 +010019struct symbol * sym_lookup(const char *name, int flags);
20struct symbol * sym_find(const char *name);
Masahiro Yamada51d792c2021-10-01 14:32:47 +090021void print_symbol_for_listconfig(struct symbol *sym);
Michal Marek70529b12015-01-27 17:11:42 +010022struct symbol ** sym_re_search(const char *pattern);
23const char * sym_type_name(enum symbol_type type);
24void sym_calc_value(struct symbol *sym);
25enum symbol_type sym_get_type(struct symbol *sym);
26bool sym_tristate_within_range(struct symbol *sym,tristate tri);
27bool sym_set_tristate_value(struct symbol *sym,tristate tri);
28tristate sym_toggle_tristate_value(struct symbol *sym);
29bool sym_string_valid(struct symbol *sym, const char *newval);
30bool sym_string_within_range(struct symbol *sym, const char *str);
31bool sym_set_string_value(struct symbol *sym, const char *newval);
Marco Ammonbaa23ec2019-07-04 12:50:41 +020032bool sym_is_changeable(struct symbol *sym);
Michal Marek70529b12015-01-27 17:11:42 +010033struct property * sym_get_choice_prop(struct symbol *sym);
Michal Marek70529b12015-01-27 17:11:42 +010034const char * sym_get_string_value(struct symbol *sym);
Linus Torvalds1da177e2005-04-16 15:20:36 -070035
Michal Marek70529b12015-01-27 17:11:42 +010036const char * prop_get_type_name(enum prop_type type);
Linus Torvalds1da177e2005-04-16 15:20:36 -070037
Masahiro Yamada104daea2018-05-28 18:21:40 +090038/* preprocess.c */
Masahiro Yamada1175c022018-05-28 18:21:50 +090039enum variable_flavor {
40 VAR_SIMPLE,
41 VAR_RECURSIVE,
Masahiro Yamadaed2a22f2018-05-28 18:21:51 +090042 VAR_APPEND,
Masahiro Yamada1175c022018-05-28 18:21:50 +090043};
Masahiro Yamada104daea2018-05-28 18:21:40 +090044void env_write_dep(FILE *f, const char *auto_conf_name);
Masahiro Yamada1175c022018-05-28 18:21:50 +090045void variable_add(const char *name, const char *value,
46 enum variable_flavor flavor);
Masahiro Yamada9ced3bd2018-05-28 18:21:49 +090047void variable_all_del(void);
Masahiro Yamada104daea2018-05-28 18:21:40 +090048char *expand_dollar(const char **str);
49char *expand_one_token(const char **str);
50
Linus Torvalds1da177e2005-04-16 15:20:36 -070051/* expr.c */
Michal Marek70529b12015-01-27 17:11:42 +010052void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *), void *data, int prevtoken);