aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/ctemplates.h21
1 files changed, 4 insertions, 17 deletions
diff --git a/include/ctemplates.h b/include/ctemplates.h
index a8855a8..d202651 100644
--- a/include/ctemplates.h
+++ b/include/ctemplates.h
@@ -16,26 +16,12 @@
//Length of error messages
#define ERR_MSG_LEN 500
-struct TMPL_varlist{
- map_t map;
-}TMPL_varlist;
+struct TMPL_varlist;
-struct TMPL_loop{
- struct TMPL_varlist* varlist;
- size_t loop_len;
- struct TMPL_loop* next;
- struct TMPL_loop* tail;
-};
+struct TMPL_loop;
/* Holdes all the data needed for a template*/
-struct TMPL_templates{
- struct TMPL_buf* out;
- struct TMPL_buf* errout;
- struct TMPL_tagnode* roottag;
- int linenum;
- int error;
-} TMPL_templates;
-
+struct TMPL_templates;
void TMPL_add_var_to_varlist(struct TMPL_varlist* vl, char* name, char* value);
void TMPL_add_loop_to_varlist(struct TMPL_varlist* vl, char* name, struct TMPL_loop* loop);
@@ -52,6 +38,7 @@ struct TMPL_loop* TMPL_alloc_loop(void);
void TMPL_free_loop(struct TMPL_loop* tl);
char* TMPL_render(struct TMPL_templates* t, struct TMPL_varlist* varlist, size_t* size_p);
+const char* TMPL_err(struct TMPL_templates* t);
/*A debug function*/
void print_varlist(struct TMPL_varlist* vl);