 /****************************************************************************/
/*                                                                          */
/*       Globals.h      Global variables for Maxmail                        */
/*                      Version 1.0                                         */
/*                                                                          */
/****************************************************************************/


#ifdef MAIN
#define GLOBAL 
#else 
#define GLOBAL extern
#endif

/* Global variables */

GLOBAL FILE *outfile;
GLOBAL FILE *afile;

GLOBAL char *offsets;

GLOBAL char BBSphone[15];
GLOBAL char BBSid[15];
GLOBAL char QWKDir[9];

GLOBAL char LastUse[14];
GLOBAL char StatName[14];
GLOBAL char TxtFile[14];
GLOBAL char PrmFile[14];
GLOBAL char ArcFile[14];
GLOBAL char SumFile[14];
GLOBAL char BullFile[65];
GLOBAL char LogFile[65];
GLOBAL char CfgFile[65];
GLOBAL char MCfgFile[65];
GLOBAL char MsgHdrFile[65];
GLOBAL char QWKWelcome[65];
GLOBAL char QWKnews[65];
GLOBAL char QWKbye[65];
GLOBAL char NewFiles[65];
GLOBAL char statline[81];
GLOBAL char temp[91];
GLOBAL char temp1[91];
GLOBAL char UserName[50];
GLOBAL char NewHelpFil[65];
GLOBAL char HelpFile[65];
GLOBAL char SignOff[81];

GLOBAL byte TextAttr[TOTALCOLORS];


GLOBAL char hdrive[_MAX_DRIVE];
GLOBAL char hdir[_MAX_DIR];
GLOBAL char sdrive[_MAX_DRIVE];
GLOBAL char sdir[_MAX_DIR];
GLOBAL char tdir[_MAX_DIR];

GLOBAL char *month;
GLOBAL char *day;
GLOBAL char *tm;

GLOBAL char break_flag;

GLOBAL struct _usr       LastUser;
GLOBAL struct user_cfg   USERCFG;
GLOBAL struct m_pointers prm;
GLOBAL struct _area      AREA;

GLOBAL struct msgupd_st  *MSGUPD_1;		/* Pointer to first linked item */
GLOBAL struct msgupd_st  *MSGUPD_cur;	/* Pointer to current linked item */
GLOBAL struct packer_st  *PACKER_1;		/* Pointer to first linked item */
GLOBAL struct packer_st  *PACKER_cur;	/* Pointer to current linked item */
GLOBAL struct proto_st   *PROTO_1;		/* Pointer to first linked item */
GLOBAL struct proto_st   *PROTO_cur;	/* Pointer to current linked item */
GLOBAL struct repupl_st  *REPUPL_1; 	/* Pointer to first linked item */
GLOBAL struct repupl_st  *REPUPL_cur; 	/* Pointer to current linked item */

GLOBAL struct reparc_st  *ZIPREP;
GLOBAL struct reparc_st  *LHAREP;
GLOBAL struct reparc_st  *ARCREP;

GLOBAL int user_slen;		/* Length of USER.BBS structure */
GLOBAL int user_num;		/* Index of user in USER.BBS */
GLOBAL int totmsgs;		/* Total messages recorded */
GLOBAL int first;		/* various first time flags */
GLOBAL int UserCfgnum;		/* Index of user in config file */
GLOBAL int UserClass;
GLOBAL int errcode;
GLOBAL int packer_del;
GLOBAL int parmread;
GLOBAL int astrlen;
GLOBAL int totprotocols;
GLOBAL int totpackers;
GLOBAL int totuplreps;
GLOBAL int totmsgareas;
GLOBAL int IsLocal;
GLOBAL int LogMode;
GLOBAL int msg_update;
GLOBAL int ReDirect;
GLOBAL int Task;
GLOBAL int TimeAdjust;
GLOBAL int ScanDone;
GLOBAL int PackDone;
GLOBAL int Hangup;
GLOBAL int SwapMode;
GLOBAL int ExtendOk;
GLOBAL int ChatOk;
GLOBAL int YellOn;
GLOBAL int MaxDaily;
GLOBAL int SysopMode;
GLOBAL int EmptyRecs;
GLOBAL int StripTags;
GLOBAL int newuser;
GLOBAL int HangupMode;
GLOBAL int HaveUpl;
GLOBAL int WatchDog;
GLOBAL int Exitcode;
GLOBAL int Pport;

GLOBAL int **SkipAreas;
GLOBAL int SkipCount;

GLOBAL int **ForceAreas;
GLOBAL int ForceCount;

GLOBAL unsigned MaxMsgs;

GLOBAL clock_t startsecs;


/* Global variables initialization */

#ifdef MAIN

first = -1;
class = 0;
ReDirect = FALSE;

#endif

