aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make/settings.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/blogc-make/settings.h')
-rw-r--r--src/blogc-make/settings.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/blogc-make/settings.h b/src/blogc-make/settings.h
new file mode 100644
index 0000000..0ba9545
--- /dev/null
+++ b/src/blogc-make/settings.h
@@ -0,0 +1,30 @@
+/*
+ * blogc: A blog compiler.
+ * Copyright (C) 2016 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+ *
+ * This program can be distributed under the terms of the BSD License.
+ * See the file LICENSE.
+ */
+
+#ifndef _MAKE_SETTINGS_H
+#define _MAKE_SETTINGS_H
+
+#include "../common/error.h"
+#include "../common/utils.h"
+
+typedef struct {
+ char *root_dir;
+ bc_trie_t *env;
+ bc_trie_t *settings;
+ char **posts;
+ char **pages;
+ char **copy_files;
+ char **tags;
+} bm_settings_t;
+
+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 */