sfparse_parser_item

Synopsis

#include <sfparse.h>

int sfparse_parser_item(sfparse_parser *sfp, sfparse_value *dest)

sfparse_parser_item() reads a single item. If this function returns 0, it stores the item in dest if it is not NULL.

This function is only used for the field value that consists of a single item.

Caller can optionally read parameters attached to the item by calling sfparse_parser_param().

Caller should call this function again to make sure that there is nothing left to read. If this 2nd function call returns SFPARSE_ERR_EOF, all data have been processed successfully.

This function returns 0 if it succeeds, or one of the following negative error codes:

SFPARSE_ERR_EOF

There is nothing left to read.

SFPARSE_ERR_PARSE

It encountered fatal error while parsing field value.