Lines 1-65
Link Here
|
1 |
/* |
|
|
2 |
Based upon libiniparser, by Nicolas Devillard |
3 |
Hacked into 1 file (m-iniparser) by Freek/2005 |
4 |
Original terms following: |
5 |
|
6 |
-- - |
7 |
|
8 |
Copyright (c) 2000 by Nicolas Devillard (ndevilla AT free DOT fr). |
9 |
|
10 |
Written by Nicolas Devillard. Not derived from licensed software. |
11 |
|
12 |
Permission is granted to anyone to use this software for any |
13 |
purpose on any computer system, and to redistribute it freely, |
14 |
subject to the following restrictions: |
15 |
|
16 |
1. The author is not responsible for the consequences of use of |
17 |
this software, no matter how awful, even if they arise |
18 |
from defects in it. |
19 |
|
20 |
2. The origin of this software must not be misrepresented, either |
21 |
by explicit claim or by omission. |
22 |
|
23 |
3. Altered versions must be plainly marked as such, and must not |
24 |
be misrepresented as being the original software. |
25 |
|
26 |
4. This notice may not be removed or altered. |
27 |
|
28 |
*/ |
29 |
|
30 |
|
31 |
#ifndef _INIPARSER_H_ |
32 |
#define _INIPARSER_H_ |
33 |
#include <stdio.h> |
34 |
#include <stdlib.h> |
35 |
#include <string.h> |
36 |
#include <unistd.h> |
37 |
#include <ctype.h> |
38 |
|
39 |
#include <ccs.h> |
40 |
|
41 |
typedef IniDictionary dictionary; |
42 |
|
43 |
typedef struct _FileLock |
44 |
{ |
45 |
int fd; |
46 |
} FileLock; |
47 |
|
48 |
/* generated by genproto */ |
49 |
|
50 |
dictionary * iniparser_new(char *ininame); |
51 |
dictionary * dictionary_new(int size); |
52 |
void iniparser_free(dictionary * d); |
53 |
|
54 |
|
55 |
int iniparser_getnsec(dictionary * d); |
56 |
char * iniparser_getsecname(dictionary * d, int n); |
57 |
void iniparser_dump_ini(dictionary * d, const char * file_name); |
58 |
char * iniparser_getstring(dictionary * d, char * key, char * def); |
59 |
void iniparser_add_entry(dictionary * d, char * sec, char * key, char * val); |
60 |
int iniparser_find_entry(dictionary * ini, char * entry); |
61 |
int iniparser_setstr(dictionary * ini, char * entry, char * val); |
62 |
void iniparser_unset(dictionary * ini, char * entry); |
63 |
|
64 |
#endif |
65 |
|