gconfig.h 867 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
#include <stdio.h>

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

16 17
int getconfigline(struct gconffile **cf, char *block, char **opt, char **val, int *conftype);
int getgenericconfig(struct gconffile **cf, char *block, ...);
18
int pushgconfdata(struct gconffile **cf, const char *data);
19 20 21
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);
22
int popgconf(struct gconffile **cf);
23
void freegconfmstr(char **mstr);
24
void freegconf(struct gconffile **cf);
venaas's avatar
venaas committed
25
struct gconffile *openconfigfile(const char *file);
26 27 28 29

/* Local Variables: */
/* c-file-style: "stroustrup" */
/* End: */