Formatting changes.
[radsecproxy.git] / gconfig.h
1 /* Copyright (c) 2006-2010, UNINETT AS
2  * Copyright (c) 2010-2012, NORDUnet A/S */
3 /* See LICENSE for licensing information. */
4
5 #define CONF_STR 1
6 #define CONF_CBK 2
7 #define CONF_MSTR 3
8 #define CONF_BLN 4
9 #define CONF_LINT 5
10
11 #include <stdio.h>
12
13 struct gconffile {
14     char *path;
15     FILE *file;
16     const char *data;
17     size_t datapos;
18 };
19
20 int getconfigline(struct gconffile **cf, char *block, char **opt, char **val, int *conftype);
21 int getgenericconfig(struct gconffile **cf, char *block, ...);
22 int pushgconfdata(struct gconffile **cf, const char *data);
23 FILE *pushgconfpath(struct gconffile **cf, const char *path);
24 FILE *pushgconffile(struct gconffile **cf, FILE *file, const char *description);
25 FILE *pushgconfpaths(struct gconffile **cf, const char *path);
26 int popgconf(struct gconffile **cf);
27 void freegconfmstr(char **mstr);
28 void freegconf(struct gconffile **cf);
29 struct gconffile *openconfigfile(const char *file);
30
31 /* Local Variables: */
32 /* c-file-style: "stroustrup" */
33 /* End: */