2 /*-------------------------------------------------------------------------*/
8 @brief Parser for ini files.
10 /*--------------------------------------------------------------------------*/
18 /*---------------------------------------------------------------------------
20 ---------------------------------------------------------------------------*/
27 * The following #include is necessary on many Unixes but not Linux.
28 * It is not needed for Windows platforms.
29 * Uncomment it if needed.
31 /* #include <unistd.h> */
33 #include "dictionary.h"
35 int iniparser_getnsec(const dictionary * d);
36 const char *iniparser_getsecname(const dictionary * d, int n);
37 void iniparser_dump_ini(const dictionary * d, FILE * f);
38 void iniparser_dump(const dictionary * d, FILE * f);
39 const char *iniparser_getstring(const dictionary * d, const char *section, const char * key, const char * def);
40 char *iniparser_getstrdup(const dictionary * d, const char *section, const char * key, const char * def);
41 int iniparser_getint(const dictionary * d, const char *section, const char * key, int notfound);
42 double iniparser_getdouble(const dictionary * d, const char *section, const char * key, double notfound);
43 int iniparser_getboolean(const dictionary * d, const char *section, const char * key, int notfound);
44 int iniparser_set(dictionary * ini, char *section, char * key, char * val);
45 void iniparser_unset(dictionary * ini, char *section, char * key);
46 int iniparser_find_entry(const dictionary * ini, const char * entry) ;
47 dictionary *iniparser_load(const char * ininame);
48 void iniparser_freedict(dictionary * d);