20 #ifndef _mustach_h_included_ 21 #define _mustach_h_included_ 55 int (*
put)(
void *closure,
const char *name,
int escape, FILE *file);
56 int (*
enter)(
void *closure,
const char *name);
57 int (*
next)(
void *closure);
62 #define MUSTACH_ERROR_SYSTEM -1 63 #define MUSTACH_ERROR_UNEXPECTED_END -2 64 #define MUSTACH_ERROR_EMPTY_TAG -3 65 #define MUSTACH_ERROR_TAG_TOO_LONG -4 66 #define MUSTACH_ERROR_BAD_SEPARATORS -5 67 #define MUSTACH_ERROR_TOO_DEPTH -6 68 #define MUSTACH_ERROR_CLOSING -7 69 #define MUSTACH_ERROR_BAD_UNESCAPE_TAG -8 109 extern int mustach(
const char *
template,
struct mustach_itf *
itf,
void *closure,
char **result,
size_t *size);
int(* enter)(void *closure, const char *name)
Definition: mustach.h:56
static struct mustach_itf itf
Definition: mustach-dhcpd-pools.c:148
int(* start)(void *closure)
Definition: mustach.h:54
int(* leave)(void *closure)
Definition: mustach.h:58
int fmustach(const char *template, struct mustach_itf *itf, void *closure, FILE *file)
Definition: mustach.c:204
int(* next)(void *closure)
Definition: mustach.h:57
mustach_itf - interface for callbacks
Definition: mustach.h:53
int(* put)(void *closure, const char *name, int escape, FILE *file)
Definition: mustach.h:55
int mustach(const char *template, struct mustach_itf *itf, void *closure, char **result, size_t *size)
fmustach - Renders the mustache 'template' in 'result' for 'itf' and 'closure'.
Definition: mustach.c:228
int fdmustach(const char *template, struct mustach_itf *itf, void *closure, int fd)
fmustach - Renders the mustache 'template' in 'fd' for 'itf' and 'closure'.
Definition: mustach.c:212