aboutsummaryrefslogtreecommitdiff
path: root/conf.h
blob: 36f8998024109243efaf0bb4aefb76d0bb84ab78 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* $Id$ */

/*
* conf.h, configuration reader and parser include
* Copyright (C) 2004-2007 Juan J. Martinez <jjm*at*usebox*dot*net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License Version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
*/

#ifndef __BOGOM_CONF__
#define __BOGOM_CONF__

#define REQ_NONE	0
#define REQ_BOOL	1
#define REQ_STRING	2
#define REQ_QSTRING	3
#define REQ_LSTQSTRING	4

struct string_list
{
	char *s;
	struct string_list *n;
};

struct conftoken
{
	char *word;
	int required;
	char *str;
	int bool;
	struct string_list *sl;
};

int read_conf(const char *filename, struct conftoken *);

#endif