/* Copyright (C) 2003, 2004 IRCtoo Network, Pasi Hirvonen */ #ifndef _CONFIGPARSER_H_ #define _CONFIGPARSER_H_ char *get_string_setting(const char *); int get_int_setting(const char *); void processint(const char *, int, int); void processchar(const char *, char *, int); void read_config(void); void cleanup_config_strings(void); void set_config_vars(void); void handle_hup(int); typedef enum e_datatype {STRING, NUMBER} datatype; typedef struct t_conf_entries { char *name; int required; datatype dt; void *value; const void *defvalue; /* Stores either char* or (int) */ int rehash; void *storeptr; /* will strcpy/set value here if not NULL */ size_t maxstrlen; /* 1 = yes, alter at rehash possibly make this accept/point to * a function? some special things may need to be done upon * a rehash for certain parameters */ } conf_entries; #endif /* _CONFIGPARSER_H_ */