1 /* This code is in the public domain.
2 * $Nightmare: nightmare/include/config.h,v 1.32.2.2.2.2 2002/07/02 03:41:28 ejb Exp $
3 * $Id: newconf.h 64 2006-09-23 00:27:18Z spb $
6 #ifndef _NEWCONF_H_INCLUDED
7 #define _NEWCONF_H_INCLUDED
15 #include "s_newconf.h"
21 void (*cf_func
) (void *);
29 int (*tc_sfunc
) (struct TopConf
*);
30 int (*tc_efunc
) (struct TopConf
*);
32 struct ConfEntry
*tc_entries
;
36 #define CF_QSTRING 0x01
38 #define CF_STRING 0x03
46 #define CF_FLIST 0x1000
47 #define CF_MFLAG 0xFF00
49 typedef struct conf_parm_t_stru
51 struct conf_parm_t_stru
*next
;
57 struct conf_parm_t_stru
*list
;
63 extern struct TopConf
*conf_cur_block
;
65 extern char *current_file
;
67 int read_config(char *);
68 int conf_start_block(char *, char *);
69 int conf_end_block(struct TopConf
*);
70 int conf_call_set(struct TopConf
*, char *, conf_parm_t
*, int);
71 void conf_report_error(const char *, ...);
72 void newconf_init(void);
73 int add_conf_item(const char *topconf
, const char *name
, int type
, void (*func
) (void *));
74 int remove_conf_item(const char *topconf
, const char *name
);
75 int add_top_conf(const char *name
, int (*sfunc
) (struct TopConf
*), int (*efunc
) (struct TopConf
*), struct ConfEntry
*items
);
76 int remove_top_conf(char *name
);
77 struct TopConf
*find_top_conf(const char *name
);
78 struct ConfEntry
*find_conf_item(const struct TopConf
*top
, const char *name
);