]>
jfr.im git - solanum.git/blob - include/newconf.h
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 1735 2006-07-19 02:35:40Z nenolod $
6 #ifndef _NEWCONF_H_INCLUDED
7 #define _NEWCONF_H_INCLUDED
19 void (*cf_func
) (void *);
27 int (*tc_sfunc
) (struct TopConf
*);
28 int (*tc_efunc
) (struct TopConf
*);
29 rb_dlink_list tc_items
;
30 struct ConfEntry
*tc_entries
;
34 #define CF_QSTRING 0x01
36 #define CF_STRING 0x03
44 #define CF_FLIST 0x1000
45 #define CF_MFLAG 0xFF00
47 typedef struct conf_parm_t_stru
49 struct conf_parm_t_stru
*next
;
55 struct conf_parm_t_stru
*list
;
61 extern struct TopConf
*conf_cur_block
;
63 extern char *current_file
;
65 int read_config(char *);
66 int conf_start_block(char *, char *);
67 int conf_end_block(struct TopConf
*);
68 int conf_call_set(struct TopConf
*, char *, conf_parm_t
*, int);
69 void conf_report_error(const char *, ...);
70 void newconf_init(void);
71 int add_conf_item(const char *topconf
, const char *name
, int type
, void (*func
) (void *));
72 int remove_conf_item(const char *topconf
, const char *name
);
73 int add_top_conf(const char *name
, int (*sfunc
) (struct TopConf
*), int (*efunc
) (struct TopConf
*), struct ConfEntry
*items
);
74 int remove_top_conf(char *name
);
75 struct TopConf
*find_top_conf(const char *name
);
76 struct ConfEntry
*find_conf_item(const struct TopConf
*top
, const char *name
);