aboutsummaryrefslogtreecommitdiffstats
path: root/src/loader.h
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-18 17:17:37 -0300
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2015-04-18 17:17:37 -0300
commitde39a41da62c4b3820b4805ddb7c4970c36bc257 (patch)
tree33da0f360932be9c76dd79a05a9bceaaed5a0441 /src/loader.h
parentd3e1e90f0979621f741357484e5a8f9656ee4a22 (diff)
downloadblogc-de39a41da62c4b3820b4805ddb7c4970c36bc257.tar.gz
blogc-de39a41da62c4b3820b4805ddb7c4970c36bc257.tar.bz2
blogc-de39a41da62c4b3820b4805ddb7c4970c36bc257.zip
added loader, error handling and cli. tests needed
Diffstat (limited to 'src/loader.h')
-rw-r--r--src/loader.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/loader.h b/src/loader.h
new file mode 100644
index 0000000..42a0abf
--- /dev/null
+++ b/src/loader.h
@@ -0,0 +1,22 @@
+/*
+ * blogc: A blog compiler.
+ * Copyright (C) 2015 Rafael G. Martins <rafael@rafaelmartins.eng.br>
+ *
+ * This program can be distributed under the terms of the BSD License.
+ * See the file COPYING.
+ */
+
+#ifndef _LOADER_H
+#define _LOADER_H
+
+#include "utils/utils.h"
+#include "error.h"
+
+#define BLOGC_FILE_CHUNK_SIZE 1024
+
+char* blogc_file_get_contents(const char *path, size_t *len, blogc_error_t **err);
+b_slist_t* blogc_template_parse_from_file(const char *f, blogc_error_t **err);
+blogc_source_t* blogc_source_parse_from_file(const char *f, blogc_error_t **err);
+b_slist_t* blogc_source_parse_from_files(b_slist_t *l, blogc_error_t **err);
+
+#endif /* _LOADER_H */