aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2018-12-16 01:35:58 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2018-12-16 01:35:58 +0100
commit3f58386ebd99fe980b35487ceb721fedcce73ac5 (patch)
tree1c21cd8993f8539cb89e9fcae873b9ddc4543175 /src
parent6460ca46e47f43a87146da4755d8d45e2bba9560 (diff)
downloadblogc-3f58386ebd99fe980b35487ceb721fedcce73ac5.tar.gz
blogc-3f58386ebd99fe980b35487ceb721fedcce73ac5.tar.bz2
blogc-3f58386ebd99fe980b35487ceb721fedcce73ac5.zip
make: settings: removed unused function
Diffstat (limited to 'src')
-rw-r--r--src/blogc-make/settings.c22
-rw-r--r--src/blogc-make/settings.h2
2 files changed, 0 insertions, 24 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);
diff --git a/src/blogc-make/settings.h b/src/blogc-make/settings.h
index 8e131fe..116aca5 100644
--- a/src/blogc-make/settings.h
+++ b/src/blogc-make/settings.h
@@ -14,7 +14,6 @@
#include "../common/utils.h"
typedef struct {
- char *root_dir;
bc_trie_t *global;
bc_trie_t *settings;
char **posts;
@@ -25,7 +24,6 @@ typedef struct {
bm_settings_t* bm_settings_parse(const char *content, size_t content_len,
bc_error_t **err);
-bm_settings_t* bm_settings_parse_file(const char *filename, bc_error_t **err);
void bm_settings_free(bm_settings_t *settings);
#endif /* _MAKE_SETTINGS_H */