gconfig.h 779 Bytes
Newer Older
1
2
3
#define CONF_STR 1
#define CONF_CBK 2
#define CONF_MSTR 3
4
#define CONF_BLN 4
venaas's avatar
venaas committed
5
#define CONF_LINT 5
6

7
8
9
struct gconffile {
    char *path;
    FILE *file;
10
11
    const char *data;
    size_t datapos;
12
13
};

14
15
int getconfigline(struct gconffile **cf, char *block, char **opt, char **val, int *conftype);
int getgenericconfig(struct gconffile **cf, char *block, ...);
16
int pushgconfdata(struct gconffile **cf, const char *data);
17
18
19
FILE *pushgconfpath(struct gconffile **cf, const char *path);
FILE *pushgconffile(struct gconffile **cf, FILE *file, const char *description);
FILE *pushgconfpaths(struct gconffile **cf, const char *path);
20
int popgconf(struct gconffile **cf);
21
void freegconfmstr(char **mstr);
22
void freegconf(struct gconffile **cf);
venaas's avatar
venaas committed
23
struct gconffile *openconfigfile(const char *file);