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