#ifndef CONFIG_H #define CONFIG_H #define MAX_ITEMSIZE 2048 /* max length of a header line */ #define MAX_PCKSTRING 8 /* max length of radixpack result */ #define MAX_NODENAME 32 /* max length of a node name */ #define MAX_DOMAINNAME 128 /* max length of a domain name */ #define MAX_CLPSIZE 128 /* max length of cmd line parameter */ /*----------------------------------------------------------------------*/ /* Configuration */ /* */ /*----------------------------------------------------------------------*/ typedef struct { char configfile[_MAX_PATH]; /* configuration file */ char workdir[_MAX_PATH]; /* changi home dir */ char activefile[_MAX_PATH]; /* list of active groups */ char newactfile[_MAX_PATH]; /* new list of active groups */ char oldactfile[_MAX_PATH]; /* old list of active groups */ char historyfile[_MAX_PATH]; /* name of history file */ char newhistfile[_MAX_PATH]; /* name of new history file */ char oldhistfile[_MAX_PATH]; /* name of old history file */ char newsdir[_MAX_PATH]; /* news home directory */ char logfile[_MAX_PATH]; /* logfile name */ char pidfile[_MAX_PATH]; /* process id flag file */ long logflg; int expiredays; /* expire days */ long expiretime; int forgetdays; /* forget days */ long forgettime; int ignorexp; int nohistory; int dorebuild; char groups[BUFSIZ]; /* expire groups */ } CONFIG; extern CONFIG cfg; extern void init_cfg(void); extern int validate_cfg(void); /*----------------------------------------------------------------------*/ /* Logging flags */ /*----------------------------------------------------------------------*/ #define LOG_FLUSH 0x00000001L #define LOG_TESTMODE 0x00000002L #define LOG_EXPIRE 0x00000004L #define DOLOG(x) ((cfg.logflg & (x)) != 0) #endif