From 335bd0d855dc2cd0b2b6c1f666fd7402afb591ca Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 9 Mar 2010 16:37:48 +0000 Subject: bogom 1.9.2 import --- conf.h | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 conf.h (limited to 'conf.h') diff --git a/conf.h b/conf.h new file mode 100644 index 0000000..36f8998 --- /dev/null +++ b/conf.h @@ -0,0 +1,49 @@ +/* $Id$ */ + +/* +* conf.h, configuration reader and parser include +* Copyright (C) 2004-2007 Juan J. Martinez +* +* 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 + -- cgit v1.2.3