diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-12-25 00:43:42 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2016-12-25 00:43:42 +0100 |
commit | 6636bd99d6767a99546b1b82ce69ade6df867b42 (patch) | |
tree | 9855c1668ffe7ba367ed0f976bc50b4cc048e8a6 /src/common/config-parser.h | |
parent | ccb429435e162915917f2492217c4e206b9b2a96 (diff) | |
download | blogc-6636bd99d6767a99546b1b82ce69ade6df867b42.tar.gz blogc-6636bd99d6767a99546b1b82ce69ade6df867b42.tar.bz2 blogc-6636bd99d6767a99546b1b82ce69ade6df867b42.zip |
config-parser: added support to parse section as list of lines
Diffstat (limited to 'src/common/config-parser.h')
-rw-r--r-- | src/common/config-parser.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/config-parser.h b/src/common/config-parser.h index e249c37..0bf1706 100644 --- a/src/common/config-parser.h +++ b/src/common/config-parser.h @@ -17,13 +17,15 @@ typedef struct { bc_trie_t *root; } bc_config_t; -bc_config_t* bc_config_parse(const char *src, size_t src_len, bc_error_t **err); +bc_config_t* bc_config_parse(const char *src, size_t src_len, + const char *list_sections[], bc_error_t **err); char** bc_config_list_sections(bc_config_t *config); char** bc_config_list_keys(bc_config_t *config, const char *section); const char* bc_config_get(bc_config_t *config, const char *section, const char *key); const char* bc_config_get_with_default(bc_config_t *config, const char *section, const char *key, const char *default_); +bc_slist_t* bc_config_get_list(bc_config_t *config, const char *section); void bc_config_free(bc_config_t *config); #endif /* _CONFIG_PARSER_H */ |