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