comparison config.h @ 1852:a4cae960fd08

Allow config file to be saved with executable for "portable" setups
author Michael Pavone <pavone@retrodev.com>
date Wed, 24 Apr 2019 19:08:49 -0700
parents 1fc61c844ec5
children 93960907807a
comparison
equal deleted inserted replaced
1851:419b458f93cd 1852:a4cae960fd08
7 #define CONFIG_H_ 7 #define CONFIG_H_
8 #include "tern.h" 8 #include "tern.h"
9 9
10 tern_node *parse_config_file(char *config_path); 10 tern_node *parse_config_file(char *config_path);
11 tern_node *parse_bundled_config(char *config_name); 11 tern_node *parse_bundled_config(char *config_name);
12 tern_node *load_overrideable_config(char *name, char *bundled_name); 12 tern_node *load_overrideable_config(char *name, char *bundled_name, uint8_t *used_config_dir);
13 tern_node *load_config(); 13 tern_node *load_config();
14 char *serialize_config(tern_node *config, uint32_t *size_out); 14 char *serialize_config(tern_node *config, uint32_t *size_out);
15 uint8_t serialize_config_file(tern_node *config, char *path); 15 uint8_t serialize_config_file(tern_node *config, char *path);
16 void persist_config_at(tern_node *config, char *fname); 16 void persist_config_at(tern_node *app_config, tern_node *to_save, char *fname);
17 void persist_config(tern_node *config); 17 void persist_config(tern_node *config);
18 char **get_extension_list(tern_node *config, uint32_t *num_exts_out); 18 char **get_extension_list(tern_node *config, uint32_t *num_exts_out);
19 uint32_t get_lowpass_cutoff(tern_node *config); 19 uint32_t get_lowpass_cutoff(tern_node *config);
20 20
21 #endif //CONFIG_H_ 21 #endif //CONFIG_H_