html.h (456B)
1 #ifndef HTML_H 2 #define HTML_H 3 4 #include <stdio.h> 5 #include <stddef.h> 6 7 struct html_var { 8 const char *name; 9 const char *value; 10 }; 11 12 struct html_row { 13 const struct html_var *vars; 14 size_t nvars; 15 }; 16 17 struct html_block { 18 const char *name; 19 const struct html_row *rows; 20 size_t nrows; 21 }; 22 23 void html_escape(FILE *fp, const char *s); 24 25 int render_template(FILE *, const char *, 26 const struct html_var *, size_t, 27 const struct html_block *, size_t); 28 29 #endif