summaryrefslogtreecommitdiff
path: root/accel-dp/conf_file.h
blob: 7110303f166a1f3e3d1a5bbf3ec941443351a702 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef __CONF_FILE_H
#define __CONF_FILE_H

struct conf_opt {
	struct conf_opt *next;
	char *name;
	char *val;
	char *raw;
	struct conf_opt *child;
};

struct conf_sect {
	struct conf_sect *next;
	char *name;
	struct conf_opt *opt;
};

struct conf_sect *conf_get_sect(const char *name);
const char *conf_get_opt(const char *sect, const char *name);
const char *conf_get_subopt(const struct conf_opt *opt, const char *name);

int conf_load(const char *fname);

#endif