liblcf
|
Go to the source code of this file.
Macros | |
#define | INI_ALLOW_MULTILINE 1 |
Functions | |
int | ini_parse (const char *filename, int(*handler)(void *user, const char *section, const char *name, const char *value), void *user) |
#define INI_ALLOW_MULTILINE 1 |
Nonzero to allow multi-line value parsing, in the style of Python's ConfigParser. If allowed, ini_parse() will call the handler with the same name for each subsequent line parsed.
int ini_parse | ( | const char * | filename, |
int(*)(void *user, const char *section, const char *name, const char *value) | handler, | ||
void * | user | ||
) |
Parse given INI-style file. May have [section]s, name=value pairs (whitespace stripped), and comments starting with ';' (semicolon). Section is "" if name=value pair parsed before any section heading.
For each name=value pair parsed, call handler function with given user pointer as well as section, name, and value (data only valid for duration of handler call). Handler should return nonzero on success, zero on error.