dhcpd-pools  3.0
ISC dhcpd lease usage analyser
Data Structures | Macros | Functions
mustach.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mustach_itf
 mustach_itf - interface for callbacks More...
 

Macros

#define MUSTACH_OK   0
 
#define MUSTACH_ERROR_SYSTEM   -1
 
#define MUSTACH_ERROR_UNEXPECTED_END   -2
 
#define MUSTACH_ERROR_EMPTY_TAG   -3
 
#define MUSTACH_ERROR_TAG_TOO_LONG   -4
 
#define MUSTACH_ERROR_BAD_SEPARATORS   -5
 
#define MUSTACH_ERROR_TOO_DEPTH   -6
 
#define MUSTACH_ERROR_CLOSING   -7
 
#define MUSTACH_ERROR_BAD_UNESCAPE_TAG   -8
 

Functions

int fmustach (const char *template, struct mustach_itf *itf, void *closure, FILE *file)
 
int fdmustach (const char *template, struct mustach_itf *itf, void *closure, int fd)
 fmustach - Renders the mustache 'template' in 'fd' for 'itf' and 'closure'. More...
 
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'. More...
 

Macro Definition Documentation

◆ MUSTACH_ERROR_BAD_SEPARATORS

#define MUSTACH_ERROR_BAD_SEPARATORS   -5

Referenced by mustach_dhcpd_pools(), and process().

◆ MUSTACH_ERROR_BAD_UNESCAPE_TAG

#define MUSTACH_ERROR_BAD_UNESCAPE_TAG   -8

Referenced by mustach_dhcpd_pools(), and process().

◆ MUSTACH_ERROR_CLOSING

#define MUSTACH_ERROR_CLOSING   -7

Referenced by mustach_dhcpd_pools(), and process().

◆ MUSTACH_ERROR_EMPTY_TAG

#define MUSTACH_ERROR_EMPTY_TAG   -3

Referenced by mustach_dhcpd_pools(), and process().

◆ MUSTACH_ERROR_SYSTEM

#define MUSTACH_ERROR_SYSTEM   -1

◆ MUSTACH_ERROR_TAG_TOO_LONG

#define MUSTACH_ERROR_TAG_TOO_LONG   -4

Referenced by mustach_dhcpd_pools(), and process().

◆ MUSTACH_ERROR_TOO_DEPTH

#define MUSTACH_ERROR_TOO_DEPTH   -6

Referenced by mustach_dhcpd_pools(), and process().

◆ MUSTACH_ERROR_UNEXPECTED_END

#define MUSTACH_ERROR_UNEXPECTED_END   -2

Referenced by mustach_dhcpd_pools(), and process().

◆ MUSTACH_OK

#define MUSTACH_OK   0

Referenced by mustach_dhcpd_pools().

Function Documentation

◆ fdmustach()

int fdmustach ( const char *  template,
struct mustach_itf itf,
void *  closure,
int  fd 
)

fmustach - Renders the mustache 'template' in 'fd' for 'itf' and 'closure'.

: the template string to instanciate : the interface to the functions that mustach calls : the closure to pass to functions called : the file descriptor number where to write the result

Returns 0 in case of success, -1 with errno set in case of system error a other negative value in case of error.

Here is the call graph for this function:

◆ fmustach()

int fmustach ( const char *  template,
struct mustach_itf itf,
void *  closure,
FILE *  file 
)

Referenced by fdmustach(), mustach(), and mustach_dhcpd_pools().

Here is the call graph for this function:

◆ mustach()

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'.

: the template string to instanciate : the interface to the functions that mustach calls : the closure to pass to functions called

Returns
: the pointer receiving the result when 0 is returned : the size of the returned result

Returns 0 in case of success, -1 with errno set in case of system error a other negative value in case of error.

Here is the call graph for this function: