aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make
diff options
context:
space:
mode:
Diffstat (limited to 'src/blogc-make')
-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 */