xt_dsv_line_free(3)

NAME
xt_dsv_line_free() - Destroy a generic tabular data object

LIBRARY
#include <xtend/dsv.h>
-lbiolibc

SYNOPSIS
int     xt_dsv_line_free(xt_dsv_line_t *xt_dsv_line)

ARGUMENTS
xt_dsv_line    Pointer to a populated xt_dsv_line_t structure

DESCRIPTION
Free allocated memory for a DSV object. The xt_dsv_line_t structure contains an array of strings, each holding one field from the line, and an an array of delimiters, each holding the character that ended the corresponding field. Note that each field could potentially end with a different delimiter, as multiple delimiters can be specified.

RETURN VALUES
The number of fields freed. Fields set to NULL are not freed.

EXAMPLES
xt_dsv_line_t  *line = xt_dsv_line_new();
while ( xt_dsv_line_read(line, stdin, "t") != EOF )
{
    xt_dsv_line_write(line, stdout);
    xt_dsv_line_free(line);
}

SEE ALSO
xt_dsv_line_new(3), xt_dsv_line_free(3), xt_dsv_line_read(3), xt_dsv_line_write(3), xt_dsv_line_copy(3), xt_dsv_read_field(3), xt_dsv_read_field_malloc(3), xt_dsv_skip_field(3), xt_dsv_skip_rest_of_line(3)