Functions | |
int | iniparser_getnsec (dictionary *d) |
Get number of sections in a dictionary. | |
char * | iniparser_getsecname (dictionary *d, int n) |
Get name for section n in a dictionary. | |
void | iniparser_dump_ini (dictionary *d, FILE *f) |
Save a dictionary to a loadable ini file. | |
void | iniparser_dump (dictionary *d, FILE *f) |
Dump a dictionary to an opened file pointer. | |
char * | iniparser_getstr (dictionary *d, char *key) |
Get the string associated to a key, return NULL if not found. | |
char * | iniparser_getstring (dictionary *d, char *key, char *def) |
Get the string associated to a key. | |
int | iniparser_getint (dictionary *d, char *key, int notfound) |
Get the string associated to a key, convert to an int. | |
double | iniparser_getdouble (dictionary *d, char *key, double notfound) |
Get the string associated to a key, convert to a double. | |
int | iniparser_getboolean (dictionary *d, char *key, int notfound) |
Get the string associated to a key, convert to a boolean. | |
int | iniparser_setstr (dictionary *ini, char *entry, char *val) |
Set an entry in a dictionary. | |
void | iniparser_unset (dictionary *ini, char *entry) |
Delete an entry in a dictionary. | |
int | iniparser_find_entry (dictionary *ini, char *entry) |
Finds out if a given entry exists in a dictionary. | |
dictionary * | iniparser_load (char *ininame) |
Parse an ini file and return an allocated dictionary object. | |
void | iniparser_freedict (dictionary *d) |
Free all memory associated to an ini dictionary. |
|
Dump a dictionary to an opened file pointer.
stderr or stdout as output files. This function is meant for debugging purposes mostly. |
|
Save a dictionary to a loadable ini file.
stderr or stdout as output files. |
|
Finds out if a given entry exists in a dictionary.
|
|
Free all memory associated to an ini dictionary.
|
|
Get the string associated to a key, convert to a boolean.
A true boolean is found if one of the following is matched:
A false boolean is found if one of the following is matched:
The notfound value returned if no boolean is identified, does not necessarily have to be 0 or 1. |
|
Get the string associated to a key, convert to a double.
|
|
Get the string associated to a key, convert to an int.
|
|
Get number of sections in a dictionary.
This clearly fails in the case a section name contains a colon, but this should simply be avoided. This function returns -1 in case of error. |
|
Get name for section n in a dictionary.
This function returns NULL in case of error. |
|
Get the string associated to a key, return NULL if not found.
This function is only provided for backwards compatibility with previous versions of iniparser. It is recommended to use iniparser_getstring() instead. |
|
Get the string associated to a key.
|
|
Parse an ini file and return an allocated dictionary object.
The returned dictionary must be freed using iniparser_freedict(). |
|
Set an entry in a dictionary.
|
|
Delete an entry in a dictionary.
|