gconfig.h 726 Bytes
Newer Older
1
2
3
#define CONF_STR 1
#define CONF_CBK 2
#define CONF_MSTR 3
4
#define CONF_BLN 4
5

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

13
14
int getconfigline(struct gconffile **cf, char *block, char **opt, char **val, int *conftype);
int getgenericconfig(struct gconffile **cf, char *block, ...);
15
int pushgconfdata(struct gconffile **cf, const char *data);
16
17
18
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);
19
20
int popgconf(struct gconffile **cf);
void freegconf(struct gconffile **cf);
venaas's avatar
venaas committed
21
struct gconffile *openconfigfile(const char *file);