/*----------------------------------------------------------------------*/ /* Configuration */ /* */ /*----------------------------------------------------------------------*/ typedef struct _CONFIG { char workdir[_MAX_PATH]; char logfile[_MAX_PATH]; char pidfile[_MAX_PATH]; char configfile[_MAX_PATH]; char newsdir[_MAX_PATH]; char activefile[_MAX_PATH]; char active_times[_MAX_PATH]; char accessfile[_MAX_PATH]; char historyfile[_MAX_PATH]; char inewscall[_MAX_PATH]; char rnewscall[_MAX_PATH]; long logflg; } CONFIG, *PCONFIG; extern CONFIG cfg; extern void init_cfg(void); extern int validate_cfg(void); /*----------------------------------------------------------------------*/ /* Logging flags */ /*----------------------------------------------------------------------*/ #define LOG_FLUSH 0x00000001L #define LOG_RECV 0x00000002L #define LOG_SEND 0x00000004L #define LOG_DBM 0x00000008L #define LOG_ACTIVE 0x00000010L #define dolog(f) ((cfg.logflg & f) == f)