#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 workdir[_MAX_PATH]; /* work directory */ char logfile[_MAX_PATH]; /* log file name */ char pidfile[_MAX_PATH]; /* pid file name */ char configfile[_MAX_PATH]; /* configuration file name */ char mynode[MAX_NODENAME]; /* local node name without domain */ char mydomain[MAX_DOMAINNAME]; /* local node name including domain */ char newsserver[MAX_DOMAINNAME];/* nodename of newsserver */ char approved[MAX_CLPSIZE]; /* overwrite approved line */ char grouplist[_MAX_PATH]; /* groups to create */ long logflg; /* log flags */ char distribution[MAX_CLPSIZE]; /* overwrite distribution line */ char expire[MAX_CLPSIZE]; /* overwrite expire line */ char sender[MAX_CLPSIZE]; /* overwrite from line */ char followup[MAX_CLPSIZE]; /* overwrite followup-to line */ char grade; /* uucp grade */ int moderated; /* used for group creation */ char newsgroups[MAX_CLPSIZE]; /* overwrite newsgroups line */ char organization[MAX_CLPSIZE]; /* overwrite organization line */ char replyto[MAX_CLPSIZE]; /* overwrite reply-to line */ char spooldir[_MAX_PATH]; /* spool directory */ char signfile[_MAX_PATH]; /* append signature file */ char subject[MAX_CLPSIZE]; /* overwrite subject line */ int printid; /* message ids printed if 1 */ char rnewscall[_MAX_PATH]; /* call rnews for local delivery */ int uupcmode; /* munge spool files if 1 */ } CONFIG; 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 #endif