]> arthur.barton.de Git - netatalk.git/blob - include/atalk/iniparser.h
Writing metadata xattr on directories with sticky bit set, FR#94
[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 */
14
15 #ifndef _INIPARSER_H_
16 #define _INIPARSER_H_
17
18 /*---------------------------------------------------------------------------
19                                                                 Includes
20  ---------------------------------------------------------------------------*/
21
22 #include <stdio.h>
23 #include <stdlib.h>
24 #include <string.h>
25
26 /*
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.
30  */
31 /* #include <unistd.h> */
32
33 #include "dictionary.h"
34
35 int        atalk_iniparser_getnsec(const dictionary * d);
36 const char *atalk_iniparser_getsecname(const dictionary * d, int n);
37 void       atalk_iniparser_dump_ini(const dictionary * d, FILE * f);
38 void       atalk_iniparser_dump(const dictionary * d, FILE * f);
39 const char *atalk_iniparser_getstring(const dictionary * d, const char *section, const char * key, const char * def);
40 char       *atalk_iniparser_getstrdup(const dictionary * d, const char *section, const char * key, const char * def);
41 int        atalk_iniparser_getint(const dictionary * d, const char *section, const char * key, int notfound);
42 double     atalk_iniparser_getdouble(const dictionary * d, const char *section, const char * key, double notfound);
43 int        atalk_iniparser_getboolean(const dictionary * d, const char *section, const char * key, int notfound);
44 int        atalk_iniparser_set(dictionary * ini, char *section, char * key, char * val);
45 void       atalk_iniparser_unset(dictionary * ini, char *section, char * key);
46 int        atalk_iniparser_find_entry(const dictionary * ini, const char * entry) ;
47 dictionary *atalk_iniparser_load(const char * ininame);
48 void       atalk_iniparser_freedict(dictionary * d);
49
50 #endif