sf_parser_param

Synopsis

#include <sfparse.h>

int sf_parser_param(sf_parser *sfp, sf_vec *dest_key, sf_value *dest_value)

sf_parser_param() reads a parameter. If this function returns 0, it stores parameter key and value in dest_key and dest_value respectively, if they are not NULL.

This function does no effort to find duplicated keys. Same key may be reported more than once.

Caller should keep calling this function until it returns negative error code. If it returns SF_ERR_EOF, all parameters have read, and caller can continue to read rest of the values. If it returns SF_ERR_PARSE_ERROR, it encountered fatal error while parsing field value.