diff options
author | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-12-16 01:35:58 +0100 |
---|---|---|
committer | Rafael G. Martins <rafael@rafaelmartins.eng.br> | 2018-12-16 01:35:58 +0100 |
commit | 3f58386ebd99fe980b35487ceb721fedcce73ac5 (patch) | |
tree | 1c21cd8993f8539cb89e9fcae873b9ddc4543175 /src/blogc-make/settings.c | |
parent | 6460ca46e47f43a87146da4755d8d45e2bba9560 (diff) | |
download | blogc-3f58386ebd99fe980b35487ceb721fedcce73ac5.tar.gz blogc-3f58386ebd99fe980b35487ceb721fedcce73ac5.tar.bz2 blogc-3f58386ebd99fe980b35487ceb721fedcce73ac5.zip |
make: settings: removed unused function
Diffstat (limited to 'src/blogc-make/settings.c')
-rw-r--r-- | src/blogc-make/settings.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/blogc-make/settings.c b/src/blogc-make/settings.c index 41af3b4..fad6567 100644 --- a/src/blogc-make/settings.c +++ b/src/blogc-make/settings.c @@ -89,7 +89,6 @@ bm_settings_parse(const char *content, size_t content_len, bc_error_t **err) return NULL; bm_settings_t *rv = bc_malloc(sizeof(bm_settings_t)); - rv->root_dir = NULL; rv->global = bc_trie_new(free); rv->settings = bc_trie_new(free); rv->posts = NULL; @@ -172,32 +171,11 @@ cleanup: } -bm_settings_t* -bm_settings_parse_file(const char *filename, bc_error_t **err) -{ - if (err == NULL || *err != NULL) - return NULL; - - size_t content_len; - char *content = bc_file_get_contents(filename, true, &content_len, err); - if (*err != NULL) - return NULL; - - bm_settings_t *rv = bm_settings_parse(content, content_len, err); - char *real_filename = realpath(filename, NULL); - rv->root_dir = bc_strdup(dirname(real_filename)); - free(real_filename); - free(content); - return rv; -} - - void bm_settings_free(bm_settings_t *settings) { if (settings == NULL) return; - free(settings->root_dir); bc_trie_free(settings->global); bc_trie_free(settings->settings); bc_strv_free(settings->posts); |