]> mj.ucw.cz Git - libucw.git/blob - lib/conf.h
015ff0c1b553cd86556c20b6f3bb0b725946cd62
[libucw.git] / lib / conf.h
1 /* Reading conf files
2  * Robert Spalek, (c) 2001, robert@ucw.cz
3  * $Id: conf.h,v 1.1 2001/01/07 21:21:53 robert Exp $
4  */
5
6 enum cftype { ct_stop, ct_int, ct_string, ct_function };
7
8 struct cfitem {
9         byte *name;
10         enum cftype type;
11         void *var;
12 };
13
14 typedef byte *(*ci_func)(struct cfitem *, byte *);
15
16 void cf_register(byte *section,struct cfitem *items);
17 void cf_register_opts(byte *so,struct option *lo);
18
19 int cf_read(byte *filename);
20 void cf_read_err(byte *filename);
21 int cf_getopt(int argc,char * const argv[], int *longindex);
22