]> arthur.barton.de Git - netatalk.git/blob - include/atalk/iniparser.h
6466358c8192265beb13013cac0ec9a867cc1c66
[netatalk.git] / include / atalk / iniparser.h
1
2 /*-------------------------------------------------------------------------*/
3 /**
4    @file    iniparser.h
5    @author  N. Devillard
6    @date    Sep 2007
7    @version 3.0
8    @brief   Parser for ini files.
9 */
10 /*--------------------------------------------------------------------------*/
11
12 /*
13         $Id: iniparser.h,v 1.26 2011-03-02 20:15:13 ndevilla Exp $
14         $Revision: 1.26 $
15 */
16
17 #ifndef _INIPARSER_H_
18 #define _INIPARSER_H_
19
20 /*---------------------------------------------------------------------------
21                                                                 Includes
22  ---------------------------------------------------------------------------*/
23
24 #include <stdio.h>
25 #include <stdlib.h>
26 #include <string.h>
27
28 /*
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.
32  */
33 /* #include <unistd.h> */
34
35 #include "dictionary.h"
36
37 int        iniparser_getnsec(dictionary * d);
38 char       *iniparser_getsecname(dictionary * d, int n);
39 void       iniparser_dump_ini(dictionary * d, FILE * f);
40 void       iniparser_dump(dictionary * d, FILE * f);
41 char       *iniparser_getstring(dictionary * d, char *section, char * key, char * def);
42 char       *iniparser_getstrdup(dictionary * d, char *section, char * key, char * def);
43 int        iniparser_getint(dictionary * d, char *section, char * key, int notfound);
44 double     iniparser_getdouble(dictionary * d, char *section, char * key, double notfound);
45 int        iniparser_getboolean(dictionary * d, char *section, 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(dictionary * ini, char * entry) ;
49 dictionary *iniparser_load(char * ininame);
50 void       iniparser_freedict(dictionary * d);
51
52 #endif