made gconfig support input from string
[radsecproxy.git] / gconfig.h
1 #define CONF_STR 1
2 #define CONF_CBK 2
3 #define CONF_MSTR 3
4 #define CONF_BLN 4
5
6 struct gconffile {
7     char *path;
8     FILE *file;
9     const char *data;
10     size_t datapos;
11 };
12
13 int getconfigline(struct gconffile **cf, char *block, char **opt, char **val, int *conftype);
14 int getgenericconfig(struct gconffile **cf, char *block, ...);
15 int pushgconfdata(struct gconffile **cf, const char *data);
16 FILE *pushgconffile(struct gconffile **cf, const char *path);
17 FILE *pushgconffiles(struct gconffile **cf, const char *path);
18 int popgconf(struct gconffile **cf);
19 void freegconf(struct gconffile **cf);
20 struct gconffile *openconfigfile(const char *file);