1 #ifndef CONF_H
2 #define CONF_H
3 
4 #include "system.h"
5 
6 struct conf {
7 	char *base_dir;
8 	char *cache_dir;
9 	unsigned cache_dir_levels;
10 	char *compiler;
11 	char *compiler_check;
12 	bool compression;
13 	unsigned compression_level;
14 	char *cpp_extension;
15 	bool direct_mode;
16 	bool disable;
17 	char *extra_files_to_hash;
18 	bool hard_link;
19 	bool hash_dir;
20 	char *ignore_headers_in_manifest;
21 	bool keep_comments_cpp;
22 	float limit_multiple;
23 	char *log_file;
24 	unsigned max_files;
25 	uint64_t max_size;
26 	char *memcached_conf;
27 	bool memcached_only;
28 	char *path;
29 	bool pch_external_checksum;
30 	char *prefix_command;
31 	char *prefix_command_cpp;
32 	bool read_only;
33 	bool read_only_direct;
34 	bool read_only_memcached;
35 	bool recache;
36 	bool run_second_cpp;
37 	unsigned sloppiness;
38 	bool stats;
39 	char *temporary_dir;
40 	unsigned umask;
41 	bool unify;
42 
43 	const char **item_origins;
44 };
45 
46 struct conf *conf_create(void);
47 void conf_free(struct conf *conf);
48 bool conf_read(struct conf *conf, const char *path, char **errmsg);
49 bool conf_update_from_environment(struct conf *conf, char **errmsg);
50 bool conf_set_value_in_file(const char *path, const char *key,
51                             const char *value, char **errmsg);
52 bool conf_print_items(struct conf *conf,
53                       void (*printer)(const char *descr, const char *origin,
54                                       void *context),
55                       void *context);
56 
57 #endif
58