libexplain  1.4.D001
Functions
libexplain/printf_format/list.c File Reference
#include <libexplain/ac/stdlib.h>
#include <libexplain/printf_format.h>

Go to the source code of this file.

Functions

void explain_printf_format_list_constructor (explain_printf_format_list_t *lp)
void explain_printf_format_list_destructor (explain_printf_format_list_t *lp)
void explain_printf_format_list_clear (explain_printf_format_list_t *lp)
int explain_printf_format_list_append (explain_printf_format_list_t *lp, const explain_printf_format_t *datum)
static int cmp (const void *va, const void *vb)
void explain_printf_format_list_sort (explain_printf_format_list_t *lp)

Function Documentation

static int cmp ( const void *  va,
const void *  vb 
) [static]

Definition at line 79 of file list.c.

The explain_printf_format_list_append function is used to add another formaat specifier to the list.

Parameters:
lpThe list to operate on.
datumThe additional format spec.
Returns:
0 on success, -1 if malloc() fails.

Definition at line 51 of file list.c.

The explain_printf_format_list_clear function is used to discard the contents of a list.

Parameters:
lpThe list to operate on.

Definition at line 44 of file list.c.

The explain_printf_format_list_constructor function is used to prepare a list for use. Failure to call it will cause segfaults.

Parameters:
lpThe list to operate on.

Definition at line 26 of file list.c.

The explain_printf_format_list_destructor function is used to release resources held by the list. Failure to call it will cause memory leaks.

Parameters:
lpThe list to operate on.

Definition at line 34 of file list.c.

The explain_printf_format_list_sort function is used to sort the format specifiers in the list, into ascending order of indexes. This is how you figure out the order and types of the remaining arguments.

Parameters:
lpThe list to operate on.

Definition at line 88 of file list.c.