dhcpd-pools  3.0
ISC dhcpd lease usage analyser
Data Fields
mustach_itf Struct Reference

mustach_itf - interface for callbacks More...

#include <mustach.h>

Data Fields

int(* start )(void *closure)
int(* put )(void *closure, const char *name, int escape, FILE *file)
int(* enter )(void *closure, const char *name)
int(* next )(void *closure)
int(* leave )(void *closure)

Detailed Description

mustach_itf - interface for callbacks

Mustach function pointers.

All of this function should return a negative value to stop the mustache processing. The returned negative value will be then returned to the caller of mustach as is.

The functions enter and next should return 0 or 1.

All other functions should normally return 0.

: Starts the mustach processing of the closure 'start' is optional (can be NULL)

: Writes the value of 'name' to 'file' with 'escape' or not

: Enters the section of 'name' if possible. Musts return 1 if entered or 0 if not entered. When 1 is returned, the function 'leave' will always be called. Conversely 'leave' is never called when enter returns 0 or a negative value. When 1 is returned, the function must activate the first item of the section.

: Activates the next item of the section if it exists. Musts return 1 when the next item is activated. Musts return 0 when there is no item to activate.

: Leaves the last entered section

Field Documentation

◆ enter

int(* enter) (void *closure, const char *name)

Referenced by process().

◆ leave

int(* leave) (void *closure)

Referenced by process().

◆ next

int(* next) (void *closure)

Referenced by must_enter(), and process().

◆ put

int(* put) (void *closure, const char *name, int escape, FILE *file)

◆ start

int(* start) (void *closure)

Referenced by fmustach().

The documentation for this struct was generated from the following file: