diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/ctemplates.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/ctemplates.h b/include/ctemplates.h index 7c8e57c..e0598ad 100644 --- a/include/ctemplates.h +++ b/include/ctemplates.h @@ -45,8 +45,8 @@ struct TMPL_varlist* TMPL_alloc_varlist(void); /* Frees a varlist (and recursively, any loops under it, any varlists under those loops, ect.) */ void TMPL_free_varlist(struct TMPL_varlist* t); -/* Allocate a new template. If allocation fails, the struct retunred will be NULL */ -struct TMPL_templates* TMPL_alloc_template(const char* t); +/* Allocate a new template. If allocation fails, the retunred value will be non-zero*/ +int TMPL_alloc_template(const char* tmplstr, struct TMPL_templates **t); /* Free a template. Do not use the string returned by TMPL_render() the template is freed */ void TMPL_free_template(struct TMPL_templates* t); @@ -61,6 +61,7 @@ If size_p is non-null, the size of the resulting string will be placed in it. If any errors happened the t->error will be non-zero and the error can be retreived with TMPL_err(t,&size)*/ char* TMPL_render(struct TMPL_templates* t, struct TMPL_varlist* varlist, size_t* size_p); +/*Returns a string error that might give more information*/ const char* TMPL_err(struct TMPL_templates* t,size_t* size); /* A debug functions */ |
