00001
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __TEMPLATE_H
00021 #define __TEMPLATE_H
00022
00026 typedef struct s_cf_template {
00027 void *tpl;
00029 t_string parsed;
00030 t_cf_hash *varlist;
00032 } t_cf_template;
00033
00037 typedef struct s_cf_tpl_variable {
00038 t_string *data;
00039 int escape_html;
00040 } t_cf_tpl_variable;
00041
00042
00043 typedef void (*t_parse)(t_cf_template *);
00044 typedef void (*t_parse_mem)(t_cf_template *);
00053 int tpl_cf_init(t_cf_template *tpl,const u_char *fname);
00054
00063 void tpl_cf_setvar(t_cf_template *tpl,u_char *vname,const u_char *value,int len,int escapehtml);
00064
00073 int tpl_cf_appendvar(t_cf_template *tpl,u_char *vname,const u_char *value,int len);
00074
00080 void tpl_cf_freevar(t_cf_template *tpl,u_char *vname);
00081
00087 void tpl_cf_parse(t_cf_template *tpl);
00088
00094 void tpl_cf_parse_to_mem(t_cf_template *tpl);
00095
00101 void tpl_cf_finish(t_cf_template *tpl);
00102
00110 const t_cf_tpl_variable *tpl_cf_getvar(t_cf_template *tpl,u_char *vname);
00111
00112
00113 #endif
00114
00115