#define TOP_STAT 51
#define TOP_NOSTAT 11
#define BOT_SPLIT 98

#define C_BLACK  0
#define C_RED    4
#define C_GREEN  2
#define C_YELLOW 6
#define C_BLUE   1
#define C_PURPLE 5
#define C_CYAN   3
#define C_WHITE  7

#define GRN_BLK 0x20
#define YEL_BLK 0x60
#define BLU_BLU 0x11
#define CYN_BLK 0x30
#define CYN_BLU 0x31
#define WHT_BLK 0x70
#define WHT_RED 0x74
#define WHT_BLU 0x71
#define WHT_PUR 0x75

#define EVER ;;

#define EDHANDLE_FLAG		0x01
#define EDREALNAME_FLAG		0x02
#define EDADDRESS_FLAG		0x04
#define EDVOICE_FLAG		0x08
#define EDDATA_FLAG		0x10
#define BANNER_FLAG		0x20
#define TERMLINK_FLAG		0x40
#define PORTMONITOR_FLAG	0x80
#define VOTEMAINT_FLAG		0x0100
#define ALARMSYSOP_FLAG		0x0200
#define OPENSCREEN_FLAG		0x0400
#define OPENCAPTURE_FLAG	0x0800
#define NETMAIL_FLAG		0x1000
#define FREQSEND_FLAG		0x2000
#define NETMAILANY_FLAG		0x4000

#define EMAIL_FLAG		0x01	/* bit defs for ABits of struct Privs */
#define	PFILE_FLAG		0x02
#define GFILE_FLAG		0x04
#define	ULIST_FLAG		0x08
#define	SYSOP_FLAG		0x10
#define	XXXXXXXXX1_FLAG		0x20	/* not used (but reserved!!!) */
#define	FCREDEX_FLAG		0x40
#define BCREDEX_FLAG		0x80
#define	EXPIREMAIL_FLAG		0x0100
#define	BULK_FLAG		0x0200
#define PARTY_FLAG		0x0400
#define	URGENT_FLAG		0x0800
#define	TIMESBP_FLAG		0x1000
#define	FILEADD_FLAG		0x2000
#define	READANY_FLAG		0x4000
#define	DELETEANY_FLAG		0x8000
#define XXXXXXXXX_FLAG		0x010000	/* not used */
#define	DOCALLBACK_FLAG		0x020000
#define AUTOVALID_FLAG		0x040000
#define	XXXXXXXXX2_FLAG		0x080000	/* not used */
#define	SEEANON_FLAG		0x100000
#define	XXXXXXXXX3_FLAG		0x200000	/* not used */
#define	CONF_FLAG		0x400000
#define CONFCON_FLAG		0x800000
#define MCI1_FLAG		0x01000000
#define MCI2_FLAG		0x02000000
#define	RELOGON_FLAG		0x04000000
#define RECEIVEMAIL_FLAG 	0x08000000
#define FORWARD_FLAG   		0x10000000
#define VOTETOPIC_FLAG  	0x20000000
#define VOTECHOICE_FLAG 	0x40000000
#define NOLOCKS_FLAG		0x80000000

struct LogType {
	char	name  [10];
	short	id;

	char	custom[10];

	UBYTE	flag;
	UBYTE	other;
};

struct	FidoType {
	char	Name[25];

	long	Zone,
		Net,
		Node,
		Point,

		Highwater,
		Seenby;

	char	EchoOrigin[80],
		NetOrigin [80];
};

struct	ProtoType {
	char	Name[16];
	char	Env[36];
	short	Flags;
	char	One[2];
	char	Path[22];
};

struct	ArcType {
	char	Suffix[8];
	char	Keyword[16];
	char	View[64];
	char	Test[64];
	char	Pack[64];
	char	Extract[64];

	long	Row;
	long	Column;
};

struct	EditorType {
	char	name[20];
	char	path[32];
	long	flags;
};

struct	EventType {
	long	command;
	char	startday[16];
	long	starttime;
	char	endday[16];
	long	endtime;
	char	args[40];

	UBYTE	offline;
	UBYTE	answer;
	UBYTE	other[2];
};

struct	Config1 {
	char	MySystemName[26];
	char	MySysopName[26];
	char	MyLocation[26];
	char	MyPhoneNumber[20];
	char	MyBBSID[10];

	char	FontName[40];
	long	NewBalance;
	long	DefaultColor;
	long	BlankTicks;
	long	BlankBright;

	long	nUDBASEx;		/* highest UDBASE partition */
	long	nBASEx;			/* highest BASE partition */
	long	MaxOpenPfiles;		/* stuff from BBSCONFIG */
	long	maxUserAccounts;
	long	NumRooms;
	long	nLinkPorts;		/* max link ID            */
	long	nsub;			/* */
	long	nitem;			/* size of item q */
	long	nselect;		/* */
	long	nupload;
	long	nlist;
	long	maxYanks;
	long	maxYankSize;
	long	maxYankDays;
	long	other_limit[6];

	char	MyCountry[4];
	char	MyAreaCode[12];
	char	DefDefProtocol[4];
	char	Yprefix[4];		/* Yank identifier */
	long	NewGamePoints;
	long	DefTimeForm;

	UBYTE	SysPassword;
	UBYTE	LogonFeedback;
	UBYTE	LogonSearch;
	UBYTE	GuestUsers;
	UBYTE	HideStatus;
	UBYTE	ConfProfile;
	UBYTE	MailFeedback;
	UBYTE	SeparateTexts;
	UBYTE	IndentSpaces;
	UBYTE	other_options[11];

	char	OLMpath[40],
		ZIPpath[40],
		EXTRACTpath[40],
		YANKwork[40],
		RAMpath[40],
		TERMpath[40],
		LocalEditor[40],
		other_Path[ 2][40];

	char	FKey [10][80];
	char	TFKey[10][80];

	USHORT	DColors2[2];
	USHORT	DColors4[4];
	USHORT	DColors8[8];
	USHORT	DColors16[16];

	long	narc;
	long	ned;
	long	nproto;
	long	nfido;
	long	nlog;

	struct	ArcType	   arc   [20];
	struct	EditorType ed     [8];
	struct	ProtoType  proto [16];
	struct	FidoType   fido  [12];
	struct	LogType	   log   [88];
};

struct LinkPortData {
	UBYTE	channel;		/* which room channel */
	char	name[23];		/* user's name-in-use */
};

struct IsDate {		/* must LEAVE as BYTE */
	BYTE Year;
	BYTE Month;
	BYTE Date;
	BYTE Hour;
	BYTE Minute;
	BYTE Second;
};

/* LONG aligned */

struct RoomConfig {
	long	Access;		/* which groups may enter */

	short	Creator;	/* who created this room (id#) */
	short	Youngest;
	short	Oldest;

	UBYTE	Doors;
	UBYTE	NameType;
	UBYTE	Gender;
	UBYTE	Quiet;
	UBYTE	Public;
	UBYTE	PermaRoom;

	char	Name[31];
	char	Topic[31];
	char	Entry[81];	/* Messages for entry, exit */
	char	Exit[81];

	UBYTE	Scribe;			/* are we writing a scribe? */
	UBYTE	MCIScribe;		/* remove MCI's ?? */
	char	SName[78];		/* name of current scribe file */

	UBYTE	Channel;
	UBYTE	LinkID;

	UBYTE	Invited[300];		/* 1 bit each for 2400 users */
};

struct Room {
	struct	RoomConfig rc;

	long	Pointer;
	long	Ports;		/* which ports are in this room */

	short	pSBuff;		/* pointer into Scribe Buffer */

	UBYTE	Buffer[6000];		/* Actual I/O buffer (Q) */

	UBYTE	SBuff[1024];		/* buffer for Scribe */
};

/* LONG aligned.  Total length == 304 */

struct RoomUser {
	long	MyPointer;		/* 0 */
	long	UID;			/* 4 */
	short	Room;			/* 8 */

	char	Entry[71];		/* 10 */
	char	Exit[71];
	char	Topic[31];
	char	Alias[21];
	char	Noise[71];
	UBYTE	Action;
	UBYTE	DefRoom;
	UBYTE	Quit;
	UBYTE	AllowReal;

	UBYTE	expansion[25];		/* 278 */
};

struct SelectType {			/* Select list */
	long	Size;

	char	Location[88];		/* path to file */
	char	Path0   [40];		/* path to data file */
	char	Title   [32];

	short	Order;
	short	MDownBytes;
	short	MDownFiles;

	BYTE	FreeStuff;
	BYTE	SDownFiles;
	BYTE	SDownBytes;
	UBYTE	AutoKill;

	char	morestuff[5];

	UBYTE	temp_rem;		/* DS from DS list!! */
};

struct BaseUser {
	long	UID;			/* ==IDNumber if user's been here */

	UBYTE	scan_flags;		/* used to 'mark' subboards */

	UBYTE	Joined;			/* TRUE if Joined */
	BYTE	Invited;		/* -1 denied, 0 neutral, 1 invited */
	BYTE	Sort;

	struct	IsDate LastMNew;
	struct	IsDate MNewDate;
	struct	IsDate Created;		/* when sub was created */

	char	Alias[23];
	UBYTE	MNewSave;
};

struct HeaderType {
	struct	IsDate ShowDate;	/* for display */
	struct	IsDate EditDate;	/* last edited */
	struct	IsDate PostDate;

	short	ByAccount;

	char	Title[72];

	char	By[36];			/* Real name or alias */
	char	ByUser[24];		/* Handle */
	long	ByID;

	char	To[36];
	char	ToUser[24];
	long	ToID;

	UBYTE	ByNotParanoid;		/* allow showing real name? */
	UBYTE	ByAnonymous;
	UBYTE	ToAnonymous;
	UBYTE	Private;

	UBYTE	Imported;
	UBYTE	ByAlias;		/* is BY an alais for ByUser? */
	UBYTE	ToNotParanoid;		/* allow showing real name? */
	UBYTE	ToAlias;		/* is TO an alias for ToUser? */

	short	ToAccount;		/* for SendToMailBox() */

	UBYTE	expand[58];
};

struct	MessageType {
	long	ItemNumber;
	long	ResponseNumber;
	long	ByID;
	long	ToID;

	struct	IsDate PostDate;

	UBYTE	Imported;
	UBYTE	IsFile;
};

struct	ItemType {
	long	Number;
	long	Response1;		/*  1st valid response # */
	long	Responses;		/* last valid response # */

	char	Title[72];
	struct	IsDate PostDate;	/* new item ?      */
	struct	IsDate RespDate;	/* new responses ? */

	long	ByID;
	long	ToID;

	long	Size;
	long	Downloads;
	char	Info[84];
	struct	IsDate UsedDate;	/* new downloads ? */
	short	Part;			/* which partition? */

	short	fcredit;	/* Remember the Accounting credits */
	short	bcredit;	/* and File/Byte credits given for */
	UBYTE	fratio;		/* for this item so they can accurately */
	UBYTE	bratio;		/* be removed if un-validated or killed */

	UBYTE	Private;
	UBYTE	Killed;

	UBYTE	PleaseKill;
	UBYTE	Frozen;
	UBYTE	Free;
	UBYTE	Protected;

	UBYTE	Favorite;
	UBYTE	Validated;
	UBYTE	Finished;
	UBYTE	Described;

	UBYTE	Transformed;		/* has the script been ran? */
	UBYTE	MissingPost;
	UBYTE	MissingFile;
	BYTE	Integrity;		/* 0 == not tested
					   1 == passed
					  -1 == failed
					   2 == not testable */

	short	ByAccount;		/* for AddCredits */

	short	order;			/* for New Files Scan */
	short	base;
	UBYTE	WasMoved;

	BYTE	expand[57];
};

struct OldItemType {
	long	Fee;			/* 0 not curr. used */
	long	Ordinal;		/* 4 not curr. used */

	long	Size;			/* 8 file? if so, size? */
	short	Part;			/* 12 which UDBASE/BASE partition? */
	char	Title[51];		/* 14 */
	char	Info[81];		/* 65 info in memory now... */
	long	ByID;			/* 146 un-al! */
	long	ToID;			/* 150 */

	struct	IsDate Date;		/* 154 posted */
	struct	IsDate RDate;		/* last responded */
	struct	IsDate UDate;		/* last downloaded */

	long	TimesUsed;		/* 172 */
	long	Responses;		/* 176 number of responses */
	long	RPointer;		/* 180 pointer to last response header */

	UBYTE	Killed;			/* 184 */
	UBYTE	MarkedForDeath;		/* amaint will try to kill it */
	UBYTE	Suspended;
	UBYTE	Frozen;
	UBYTE	Free;
	UBYTE	Protected;
	UBYTE	Favorite;
	UBYTE	Private;
	UBYTE	Validated;
	UBYTE	Finished;
	UBYTE	Described;

	char	Integrity;		/* 0 == not tested
					   1 == passed
					  -1 == failed
					   2 == not testable */

	UBYTE	Transformed;		/* has the script been ran? */

	UBYTE	MissingPost;
	UBYTE	MissingFile;

	char	Align[3];		/* 198 */

	short	fcredit;	/* 202 Remember the Accounting credits */
	short	bcredit;	/* 204 and File/Byte credits given for */
	UBYTE	fratio;		/* 206 for this item so they can accurately */
	UBYTE	bratio;		/* 207 be removed if un-validated or killed */

	UBYTE	exp[26];	/* 208 */
};

/* LONG aligned.  Length = 126 */

struct OldHeaderType {
	long	Response;	/* 0 actual response #		 */
	long	NPointer;	/* 4 seek pointer to NEXT response */
	long	PPointer;	/* 8 seek pointer to PREV response */

	struct	IsDate Date;	/* 12 posted? */
	char	By[31];		/* 18 */
	char	To[31];		/* 49 */
	short	ByAccount;	/* 80 */
	short	ToAccount;	/* 82 */
	long	ToID;		/* 84 */
	long	ByID;		/* 88 */

	UBYTE	Anonymous;	/* 92 */
	UBYTE	Private;	/* 93 */
	UBYTE	Imported;	/* 94 From a FIDO import? */
	UBYTE	exp[25];	/* 95 */

	struct	IsDate ShowDate;  /* 120 */
};

/* LONG aligned.  Total length == 20 */

struct OldBaseUser {
	long	UID;			/* ==IDNumber if user's been here */
	short	Joined;			/* TRUE if Joined */
	short	Sort;			/* user sort preference */
	struct	IsDate LastEntry;
	struct	IsDate IsNewDate;
};

/* Total length == 334 */

struct NewSubboardType {
	char	Title[31];		/* 0  */
	char	SubDirName[21];		/* 31 */
	char	Part0Path [40];		/* 52 */
	long	Parts;			/* 92 partitions 0-31 now allowed */

	long	SubOpIDs [10];		/* 96 */
	short	SubOpAccs[10];		/* 136 */

	UBYTE	Direct;			/* 156 TYPE now dispersed */
					/* Show FREEBYTES if UploadAccess */
	UBYTE	Echo;			/* 157 Is this a FIDO subboard? */
	UBYTE	UUCP;			/*     Is this a UUCP subboard? */
	UBYTE	OtherType2;
	UBYTE	Subdirectory;
	UBYTE	Closed;

	long	UnionFlags;		/* 162 Must have all of these flags */
	long	Access;			/* 166 Groups which may ENTER */
	long	PostAccess;		/* 170 Groups which may Post  */
	long	RespondAccess;		/* 174 ... Respond */
	long	UploadAccess;		/* 178 ... Upload */
	long	DownloadAccess;		/* 182 ... Download */
	long	ComputerTypes;		/* 186 */
	long	Hours;			/* 190 restricted entry hours */
	long	HourUnionFlags;		/* 194 */
	long	HourAccess;		/* 198 groups which may Enter during Hours*/
	long	Baud;			/* 202 minimum Baud rate to enter */
	long	BaudHours;		/* 206 hours to enforce min baud rate */

	UBYTE	Gender;			/* 210 0 or 'M', 'F' */
	UBYTE	AllowAliases;
	short	Youngest;		/* 212 */
	short	Oldest;			/* 214 */

	struct	IsDate	Sent;		/* 216 FIDO to track new messages */

	short	MDownBytes;	/* 222 % of download bytes to subtract */
	short	MDownFiles;	/* 224 % of files to subtract per download */
	short	MTimeCredit;	/* 226 % of time to give back for uploads */

	long	MinFreeBytes;	/* 228 to upload in this subboard */
	short	SubSort;	/* 232 */
	short	InactiveDays;	/* 234 */

	UBYTE	RealNames;	/* 236 use real names instead of Handles? */
	UBYTE	Addressees;
	UBYTE	Anonymous;
	UBYTE	TotalAnon;

	UBYTE	Verification;	/* 240 */
	UBYTE	DupCheck;
	UBYTE	ShowUnvalidated;
	UBYTE	NoMCI;

	UBYTE	PrivateArea;	/* 244 */
	BYTE	SDownFiles;	/* Which download charge schedules? */
	BYTE	SDownBytes;
	UBYTE	TestImmediate;	/* test at upload time */

	UBYTE	TransImmediate;	/* 248 run script at upload time */
	UBYTE	AutoAdopt;	/* Adopt Orphans at a-maint */
	UBYTE	WeedResponses;	/* Use inactive days against indiv responses */
	UBYTE	NoSignatures;

	UBYTE	NoReadCharges;	/* 252 opt to short circuit accounting system */
	UBYTE	NoWriteCharges; /* 253 for reading/writing messages */

	long	Arcs;		/* 254 which Arcs in BBSARC are allowed uploaded*/

	short	UpRatioBytes;	/* 258 which set of file/byte ratios to use? */
	short	UpChargeBytes;	/* 260 which set of charges to use?          */
	short	UpRatioFiles;
	short	UpChargeFiles;	/* 264 */

	UBYTE	Invitation;	/* 266 */
	UBYTE	UserMustJoin;
	UBYTE	DeleteOwn;
	UBYTE	Marker;		/* 0 = Base, 1 = UDBASE, &128 = Killed */

	long	Transforms;	/* 270 which BBSARCS to transform */

	char	NetPath[20];	/* 274 */
	short	NetNumber;	/* 294 */ 

	UBYTE	unknown[6];	/* 296 */

	UBYTE	QWKReplies;	/* 302 */
	BYTE	SBaseUse;	/* 303  which BBSCHARGE rate to use? */
	UBYTE	CarbonCopy;	/* 304 */
	UBYTE	TotalPrivate;	/* 305 all new items auto-private */

	struct	IsDate LastUpload;
	struct	IsDate LastMessage;
	struct	IsDate Created;	/* for membership determination */

	short	Parent;		/* pointers to other subboard #s */
	short	Child;
	short	Next;

	short	TimeLock;	/* 330 minutes online before available */
};

/* LONG aligned.  Total length == 348 */

struct SerPort {
	long	unit;		/* 0 */
	long	flags;		/* 4 */

	short	idlebaud;	/* 8 */
	short	escape;
	short	answerpause;	/* 12 */
	short	seconds;

	char	name[21];	/* 16 */
	char	init1[61];
	char	init2[61];
	char	hangup[21];
	char	dialout[21];
	char	answer[21];
	char	offhook[21];
	char	terminal[61];
	char	ring[9];
	char	connect[11];

	char	termlink[24];	/* 324 */
};

/* LONG aligned.  Total length == 20 */

struct	PortConfig {
	UBYTE	online;
	UBYTE	open;			/* 1==perm, 2==call only */

	UBYTE	check;			/* menus */
	UBYTE	idle;			/* clock, SAG, SAM ? */

	short	not_used;

	UBYTE	bplanes;
	UBYTE	lace;			/* 0=none, 1=24 line, 2=49 line */

	USHORT	sizes[8];		/* workbench window & zoom size */
};

struct OldPrivs {			/* each access group has one   */
	UBYTE	Calls;			/* of these ... also each USER */
	UBYTE	kludge;

	short	CallMinutes;
	short	DailyMinutes;
	UBYTE	DailyDownloads;		/* per 24 hr DAY */
	UBYTE	DailyUploads;		/* same */
	UBYTE	FileRatio;
	UBYTE	ByteRatio;
	long	FreeBytes;
	UBYTE	Messages;
	UBYTE	Feedbacks;
	UBYTE	EditorLines;
	UBYTE	kludge2;

	ULONG	ABits;			/* see bitdefs above */

	long	DailyDownBytes;
	long	DailyUpBytes;
	short	FreeFiles;

	UBYTE	FileRatio2;
	UBYTE	ByteRatio2;
	UBYTE	FileRatio3;
	UBYTE	ByteRatio3;

	UBYTE	MaxMailKBytes;		/* before mail-receive is limited */

	UBYTE	Idle;

	char	expansion[2];
};

/* LONG aligned.  Total length==92 */

struct Privs {				/* each access group has one   */
	long	MBaseFlags;		/* 580 */
	long	FBaseFlags;		/* 584 Can user reach which subs ? */
	long	LBaseFlags;		/* 588 Gfiles/Pfiles flags */

	ULONG	ABits;			/* 592 see bitdefs above */

	long	DailyDownBytes;		/* 596 */
	long	DailyUpBytes;		/* 600 */
	long	FreeBytes;		/* 604 */
	long	FreeFiles;		/* 608 */

	short	Calls;			/* 612 of these ... also each USER */
	short	CallMinutes;		/* 614 */
	short	DailyMinutes;		/* 616 */
	short	DailyDownloads;		/* 618 per 24 hr DAY */
	short	DailyUploads;		/* 620 same */
	short	Messages;		/* 622 */
	short	Feedbacks;		/* 624 */
	short	EditorLines;		/* 626 */
	short	Idle;			/* 628 */
	short	MaxMailKBytes;		/* 630 before mail-receive is limited */
	short	PurgeDays;		/* 632 */

	UBYTE	FileRatio;		/* 634 */
	UBYTE	ByteRatio;
	UBYTE	FileRatio2;
	UBYTE	ByteRatio2;
	UBYTE	FileRatio3;
	UBYTE	ByteRatio3;

	ULONG	ABits2;			/* 640 now gives 64 flags! */

	short	SigLines;		/* 644 how many lines per signature */

	UBYTE	AllowAliases;		/* 646 new tri-state variables */
	UBYTE	DeleteOwn;
	UBYTE	Anonymous;
	UBYTE	PrivateArea;

	short	DailyPfileMinutes;	/* 650 */
	short	LogToMail;		/* account # to send log */

	long	LogFlags;		/* 654 */

	char	exp[ 14 ];		/* 658 */
};

struct OldAccessGroup {
	char	Name[21];
	UBYTE	kludge;

	struct	OldPrivs	DefPrivs;
};

struct AccessGroup {
	char	Name[32];		/*   0 */
	struct	Privs	DefPrivs;	/*  32 */
	char	exp[ 32 ];		/* 124 */
};

struct KeyElement {
	char	Handle[22];		/* actual user handle */
	short	HandleX;		/* account number where found */
};

struct MarkType {
	short	sub;			/* The new system can uniquely  */
	long	item;			/* identify a message with this */
	long	response;		/* information.  Used for Z/ZG. */
};

struct TransType {
	struct	TransType *next;	/* linked list */

	long	lines;
	long	bytes;

	UBYTE	**mm;			/* pointers to BBSMENU lines */
	UBYTE	**bm;			/* pointers to BBSTEXT lines */
	short	menustart[50];		/* */
	short	menulen  [50];
};

struct MainPort {			/* common, public to all ports */
	struct	MsgPort mp;		/* standard EXEC message port  */
	char	portName[22];		/* */

	long	um[10];			/* for C programmer use.  You can */
					/* (typecast) them as you need to. */
					/* Initially at bootup == 0 */

	char	*SubTitle;
	long	s1;			/* version of CONTROL */
	long	s2;			/* version of BBS */
	long	s3;			/* serial number of owner */

	char	*PortDoing[24];		/* pointers to user-doing strings */
	struct	UserData *PortUser[24]; /* pointers to each ports' UserData */
	struct	PortData *PortZ[24];	/* pointers to each port's PortData struct */
	struct	Room *CRoom[24];	/* pointers to ROOM structures  */
	struct	RoomUser *CUser[24];	/* pointers to ROOMUSER structs */
	struct	Task *MyTask[24];	/* each port's task. For 'see you type' */
	short	ActiveSub[48];		/* pointer to current subboard title */
	char	**Noise;		/* Conference NOISE memory */
	char	*NArg;			/* */
	long	MySignal[24];		/* bit to signal on each port */

	long	getout;			/* set to auto-quit program */
	long	Ports;			/* BITS for ports-on-line */

	struct	Window		*PWindow;
	struct	TransType	*FirstTT;
	struct	NewSubboardType *Subboard;
	struct	LinkPortData	*lport;		/* all-linked port users! */
	struct	KeyElement	*Key;		/* alpha order, etc. */

	char	IDQ[5];			/* */
	UBYTE	firstload;		/* */

	char	LastOn[32];

	long	YankCount;
	long	OpenPfiles;		/* */
	long	AuxInUse;

	long	ClickMaint;		/* can we use local mouse maint? */
	long	Verbose;		/* do not redirect to NIL: for debug */

	long	Nums[5];		/* # of accounts, etc */
	long	SAG[2][72];		/* activity graph    */
	long	SAM[5][15];		/* activity monitor  */
	struct	IsDate SAMDate[6];	/* */

	short	PortID[24];		/* Account#, 24 ports */
	long	Hidden[24],		/* BITS for hide 24x24 ports */
		Muffled[24],		/* BITS for Muffle 24x24 ports */
		Monitor[24],		/* Who's monitoring which ports */
		ChatReq[24],		/* who's requested chat with whom */
		UserMonitor;		/* */

	UBYTE	Dumped[24],		/* auto-kickoff flags, 24 ports */
		OLMWaiting[24],		/* OLM waiting, 24 ports */
		HideAll[24],		/* Hidden from ALL? */
		MuffAll[24],		/* Muffling ALL? */
		MonitorAll[24],		/* Monitoring ALL? */
		OnLine[24],		/* */
		nPdepth[24],		/* How many pfiles a port is running */
		ChatCode[24],		/* who's chatting with who */
		WantToOpen[24];		/* */

	long	ns;			/* number of subs in memory */

	struct	BitMap  ClockBrush;	/* 40 bytes */
	struct	SignalSemaphore SEM[19];	/* for critical secs. */
	struct	PortConfig      pc[25];		/* For CONTROL, remembers things  */
	struct	AccessGroup     AGC[24];	/* BBS.ADATA stuff    */

	struct	Config1 gc;

	long	nNOISElines;
	long	nNOISEbytes;
};

struct OldUserData {			/* each user account */
	long	IDNumber;		/* 0 unique (serial) ID # */
	char	Handle[21];
	char	RealName[26];
	char	Address[31];
	char	CityState[31];
	char	ZipCode[11];
	char	PhoneNo[16];		/* Euro 6-8 format POSSIBLE!! */
	char	PassWord[16];

	long	FileCredits;		/* CREDITS used now! */
	long	ByteCredits;

	UBYTE	TextSet;		/* which BBSTEXT/MENU translation */
	UBYTE	kludge;

	struct	IsDate Birthdate;
	struct	IsDate FirstCall;
	struct	IsDate LastCall;
	struct	IsDate NewMailDate;
	struct	IsDate ConnectDate;
	BYTE	Access;
	BYTE	TimeForm;
	BYTE	MoreMode;
	BYTE	LineFeeds;
	BYTE	Paranoia;
	BYTE	TimeZone;

	BYTE	ANSI;
	BYTE	Sex;
	BYTE	AutoMore;	/* More? and CLS between messages? */
	BYTE	TermType;

	BYTE	HelpLevel;
	BYTE	CompType;
	BYTE	DefProtocol;
	BYTE	TermWidth;
	BYTE	TermLength;
	BYTE	CallsToday;
	BYTE	MailBoxOpen;
	BYTE	kludge2;

	short	MailForward;
	USHORT 	TotalCalls;
	short 	TimeToday;
	USHORT	PubMessages;
	USHORT	PriMessages;

	long	ExpireDate;		/* in DAYS...system format */
					/* didn't have room for entire IsDate*/
	long	UpBytes;		/* KILO bytes */
	long	DownBytes;		/* KILO bytes */

	long	DoorPoints;
	long	Balance;

	long	FBaseFlags;		/* Can user reach which subs ? */

	USHORT	BaudRate;
	USHORT	HighBaud;

	short	LogonAttempts;

	struct	OldPrivs MyPrivs;		/* THESE ACTUALLY USED, not AGC       */

	char	Macro[4][36];		/* user's defined macro keys */
	char	Comments[33];

	char	Country[8];

	UBYTE	Colors;			/* can user display ANSI colors? */
	UBYTE	Tabs;			/* can user do ANSI tabs? */
	UBYTE	PrivsSet;

	short	DayUpFiles;
	short	DayDownFiles;
	long	DayUpBytes;
	long	DayDownBytes;
	long	UpFiles;
	long	DownFiles;

	long	MBaseFlags;

	short	NetCredits;

	BYTE	ExpireAccess;
	UBYTE	kludge3;
};

/* LONG Aligned, total length==672 */

struct UserData {			/* each user account */
	long	IDNumber;		/* 0 unique (serial) ID # */
	char	Handle[21];		/* 4 */
	char	RealName[26];		/* 25 */
	char	Address[31];		/* 51 */
	char	CityState[31];		/* 82 */
	char	ZipCode[11];		/* 113 */
	char	Country[8];		/* 124 */
	char	PhoneNo[17];		/* 132 Euro 8-7 format POSSIBLE!! */
	char	PassWord[15];		/* 149 */
	char	Comments[34];		/* 164 */
	char	Macro[4][36];		/* 198 user's defined macro keys */

	struct	IsDate Birthdate;	/* 342 */
	struct	IsDate FirstCall;	/* 348 */
	struct	IsDate LastCall;	/* 354 */
	struct	IsDate NewMailDate;	/* 360 */
	struct	IsDate ConnectDate;	/* 366 */
	struct	IsDate YankDate;	/* 372 */

	BYTE	Access;			/* 378 */
	BYTE	ExpireAccess;		/* 379 */

	short	PfileTimeToday;

	short	not_used;

	BYTE	TextSet;		/* 384 which BBSTEXT/MENU translation */
	BYTE	TimeForm;
	BYTE	MoreMode;
	BYTE	LineFeeds;
	BYTE	ObsParanoia;
	BYTE	TimeZone;
	BYTE	Colors;			/* can user display ANSI colors? */
	BYTE	Tabs;			/* can user do ANSI tabs? */
	BYTE	ANSI;
	BYTE	Sex;
	BYTE	AutoMore;		/* More? and CLS between messages? */
	BYTE	TermType;
	BYTE	HelpLevel;
	BYTE	CompType;
	BYTE	DefProtocol;
	BYTE	TermWidth;
	BYTE	TermLength;		/* 400 */
	BYTE	MailBoxOpen;		/* 401 */
	short	MailForward;		/* 402 */

	long 	TotalCalls;		/* 404 */
	long	PubMessages;		/* 408 */
	long	PriMessages;		/* 412 */
	long	UpBytes;		/* 416 KILO bytes */
	long	UpFiles;		/* 420 */
	long	DownBytes;		/* 424 KILO bytes */
	long	DownFiles;		/* 428 */

	long	FileCredits;		/* 432 CREDITS used now! */
	long	ByteCredits;		/* 436 */
	long	TimeCredits;		/* 440 */

	long	Balance;		/* 444 */
	long	NetCredits;		/* 448 */
	long	DoorPoints;		/* 452 */

	long	DayUpBytes;		/* 456 */
	long	DayDownBytes;		/* 460 */
	short	DayUpFiles;		/* 464 */
	short	DayDownFiles;		/* 466 */

	short	CallsToday;		/* 468 */
	short 	TimeToday;		/* 470 */
	short	LogonAttempts;		/* 472 */

	USHORT	BaudRate;		/* 474 */
	USHORT	HighBaud;		/* 476 */

	char	UUCP[11];		/* 478 */

	UBYTE	PName;			/* 489 flags, are these data     */
	UBYTE	PAge;			/* items to be kept private? */
	UBYTE	PAddress;		/* street address only */
	UBYTE	PVoice;			/* phone numbers */
	UBYTE	PData;

	char	Banner[43];		/* 494 */

	char	VoiceNo[17];		/* 537 Euro 8-7 format POSSIBLE!! */

	short	YankCount;		/* 554 */

	struct	IsDate ExpireDate;	/* 556 */
	struct	IsDate FNewDate;

	char	more[7];		/* 568 reserved */

	UBYTE	YankCR;			/* 575 add CR's to yank text? */
	UBYTE	YankArc;		/* which archiver to use? */

	BYTE	DefEditor;		/* 577 */
	BYTE	AutoHide;
	BYTE	PrivsSet;		/* 579 */
	struct	Privs MyPrivs;		/* 580 THESE ACTUALLY USED, not AGC */
};

/* length == 296 */

struct MailHeader {			/* NEW 2.0 for mail, etc */
	struct	IsDate  Date;
	struct	IsDate	EDate;		/* for EXPIRATION setting */
	short	EDays;
	char	Subject [81];		/* Ahh, nice and roomy */
	char	From    [31];
	short	ByAccount;
	long	ByID;

	char	To	[28];		/* originals, if was Sent/forwarded */
	long	ToID;
	short	ToAccount;

	UBYTE	Receipt;		/* return-receipt ?? */
	UBYTE	Return;			/* return original message?? */

	UBYTE	HasOriginal;		/* is original attached to this one? */
	UBYTE	File;			/* for File Mail */
	UBYTE	Anonymous;		/* From an anonymous user? */

	char	Route	[41];		/* for Bulk Mail, list of recips */
	short	Recipients;		/* number of recipients ... */
	UBYTE	Party;			/* Allow party responses? */

	long	Length;
	long	CheckSum;		/* must be 0 */

	long	Item;			/* if this message is repeated */
	long	Response;		/* somewhere on the system     */
	short	Base;			/* this tells where !!!        */

	char	NetAddress[55];		/* may be shortened */

	UBYTE	NoEdits;

	struct	IsDate  ShowDate;
};

/* LONG aligned.  Length==172 */

struct Subdirectory {
	long	SubOpIDs [10];
	short	SubOpAccs[10];

	long	Access;
	long	UnionFlags;

	long	Hours;
	long	HourUnionFlags;
	long	HourAccess;

	long	Baud;
	long	BaudHours;

	short	Youngest;
	short	Oldest;

/* when the Download command is used on a Gfile */

	short	MDownFiles;	/* % of download files to subtract */
	BYTE	SDownFiles;	/* Which download charge schedules? */
	BYTE	SDownBytes;

/* per-usage charge schedules from BBSCHARGESX.A files */

	short	SPfileCharge;	/* flat rate for execution of pfile */
	short	SGfileCharge;	/* flat rate for reading/downloading */

	UBYTE	Gender;		/* 0 or 'M', 'F' */

	UBYTE	exp[67];

	short	TimeLock;	/* minutes online before available */
	short	MDownBytes;	/* % of download Bytes to subtract */
};

struct ListItem {
	short	Version;		/* should be 225 */
	char	Path       [54];	/* 2 */
	char	Description[64];	/* 56 */
	char	Arguments  [64];	/* 120 */

	long	Access;			/* 184 */
	long	UnionFlags;		/* 188 */

	struct	IsDate Date;		/* 192 */

	short	SCharge;		/* 198 override a subdir schedule */

	UBYTE	Subdirectory;		/* 200 */
	UBYTE	DaysToKeep;
	UBYTE	ReadFlags;		/* internal only */
	UBYTE	Environ;

	UBYTE	DailyPfileTime;		/* 204 subtract from daily pfile time? */

	UBYTE	Expansion[23];		/* 205 */
};

/* Length== 176 */

struct OldListItem {
	char	Path       [51];	/* 0 */
	char	Description[61];	/* 51 */
	char	Arguments  [20];

	struct	IsDate Date;		/* 132 */

	long	Access;			/* 138 un-al */

	UBYTE	Subdirectory;		/* 142 */
	UBYTE	DaysToKeep;
	UBYTE	ReadFlags;		/* internal only */
	UBYTE	Environ;

	short	SCharge;		/* 146 override a subdir schedule */

	long	UnionFlags;

	UBYTE	DailyPfileTime;		/* subtract from daily pfile time? */

	UBYTE	Expansion[23];		/* 148 */
};

/* LONG aligned.  Length==48 */

struct CPort {				/* setup when a C pfile is ran */
	struct	MsgPort  mport;		/* 0 */
	short	align;
	struct	MainPort *myp;		/* 36 pointer to MainPort */
	struct	PortData *zp;		/* 40 pointer to my PortData */

	UBYTE	ack;			/* 44 tell CNet we've arrived */
	UBYTE	align2[3];
};

/* LONG aligned.  Length==44 */

struct CMessage {			/* passed between C pfile and C-Net */
	struct	Message cn_Message;	/* 0 communication stuff */
	ULONG	arg1;			/* 20 */
	ULONG	arg2;
	ULONG	arg3;
	ULONG	arg4;
	ULONG	result;
	UBYTE	command;		/* 40 which command? see programming doc */
	UBYTE	align[3];
};

/* all LONG's 4 byte aligned */

struct PortData {			/* each opened ports global vars */
	struct	IsDate	Today;		/* 0 what time is it right now? */
	struct	IsDate	VConnectDate;	/* 6 Virtual connect...eg 12am */

	short	id,			/* 12 current user1 account # */
		InPort,			/* 14 which port are we in??  */
		Age,			/* 16 how old am I ? */
		CurrentCPS,		/* 18 CPS rate.  240 == 2400 baud */
		OnType,			/* 20 type of logon  */
		OffType,		/* 22 */
		CallMessages,		/* 24 */
		CallFeedbacks,		/* 26 */
		TimeLeft,		/* 28 TENTHS of minutes left */
		TimeIdle,		/* 30 TENTHS of minutes without activity */
		TimeOnLine,		/* 32 TENTHS of minutes since logon */
		TimeCredit,		/* 34 TENTHS awarded for uploads, etc */
		LastTSR,		/* 36 */
		Carrier;		/* 38 Is there a carrier or Local? */

	char	*AName;			/* 40 ptr to access group name */
	long	SysMaint,		/* 44 */
		LocalTime,		/* 48 current area sur-time minutes */
		LocalCharge,		/* 52 current area sur-charge per minute */
		LastTime,		/* 56 */
		ServLen,		/* 60 seconds in-between Service() calls */
		Caller;			/* 64 which caller am I? */

	struct	UserData	user1,	/* 68 */
				user2;	/* 740 actual user structs */

	long	uz[10];			/* 1412 for C programmer use.  You can */
					/* (typecast) them as you need to */

	long	numWE;			/* window-edit, current number */
	short	xc,			/* x coord, cursor pos */
		yc,			/* y coord */
		sxc,			/* storage for ANSI [s, [t */
		syc,
		YMAX,			/* max y value */
		CurrentMouseX,
		CurrentMouseY,
		countWE;		/* window-edit, # characters */

	long	plsize, nplanes;	/* SkyStuff Stuff */
	short	skyxpen, skyypen;
	PLANEPTR planePtr;
	struct	TmpRas  tmpRas;
	struct	BitMap  SkyBrush;

	struct	Window		*Window, *CWindow, *SWindow, *TWindow;
	struct	Screen		*Screen;

	struct	Window		*TTWindow;

	struct	RastPort	*wrp, *trp;
	struct	TextFont	*BlueFont,
				*StandardFont;

	struct	MsgPort		*cpreplyp;
	struct	Task		*ThisTask;
	struct	MainPort	*cnp;	/* redundant pointer to MainPort */
	struct	FileInfoBlock	*fib;	/* for reading directories */
	struct	InfoData	*IData;	/* for getting free disk space, etc */

	struct	ItemType        *Item;
	struct	MessageType     *Message;
	struct	BaseUser	*buser;
	struct	SelectType      *Select;
	struct	ListItem        *fpt;

	char	**EdBuffer;		/* pointers to editor lines.*/
	char	*EdBase;		/* pointer to editor memory */
	UBYTE	*CR;			/* Is there a Carriage Return? ea line*/
	char	**mm;			/* pointers to bbsmenu lines */
	char	**bm;			/* pointers to bbstext lines */
	short	*menustart;
	short	*menulen;

	UBYTE	not_used_0 [108];

	char	Title[80];		/* Screen/Window */
	short	Depth;
	short	Height;

	short	TextSet;		/* 0==use system-wide text/menu */
	short	npitems;		/* number of items parsed */
	char	pitem[8][61];		/* last input parsed list */

	long	txline;			/* number of lines in ed buffer */
	char	GBuffer[16][81];	/* General purpose 2-D text buffer */
	UBYTE	GCR[16];

	struct	IOStdReq *UTReq, *ServReq, *PrintReq;

	struct	IOStdReq *ConReq;	/* console device junk */
	struct	MsgPort	 *ConPort;	/* for workbench CNet window */
	struct	Window	 *WBWindow;

	UBYTE	morereqs[36];

	struct	IOExtSer *SerRdReq, *SerWrReq, *SerIOReq;
	struct	MsgPort  *SerRdPort,*SerWrPort,*SerIOPort,
			 *UTPort,   *ServPort, *PrintPort;

	long	WaitFlags,
		SERVICE_MASK,
		RAWKEY_MASK;

	short	ACC[65],		/* accounting table currently in use */
		nowCharge;		/* schedule now in memory            */

	long	CTC[65];		/* users account, 62 items, Cost of This Call */

	char	ABuffer [256],		/* workspace */
		InBuffer[256],		/* after a line input */
		keyin,
		keyout,			/* not used */
		serbuffer[2];

	char	Pathx[8][64];		/* g/p/n subdir history */
	short	sorder[240];		/* max subboards per subdir is 240 */

	char	FileNote[84],
		SPrompt[64],		/* subboard prompt */
		diskloc[64],
		myloc[80],
		LastSubject[84];	/* for Read-Mail */

	long	warn1;

	char	Doing[48];

	long	TotalCTC;		/* TOTAL Cost of this Call (cents?)*/

	char	*LastError;		/* for file transfer WHY command */

	short	nl;			/* number on g/p/n list */
	char	LPrompt[64];		/* G/P/N list prompt */

	UBYTE	dirname[34],
		SubType,	/* ==1 if in Direct Exchange */
		resetIP;	/* flag, must re-order item pointers */

	short	bz,		/* # of subs on current List */
		dz,		/* how deep in the tree are we? */
		bn,		/* current sub # */
		rn,		/* how many items, current list */
		istart,		/* 1st item in memory ... VIRTUAL stuff! */
		iend,		/* last item in memory */

		br,		/* item last used */
		new_f,
		new_p,

		VTimeOnLine,	/* may reset at midnight */

		imax,		/* max items in item Q at once. */

		mx,		/* highest item NOT killed */

		new_ri,

		gpos,		/* for global commands, last command # */
		nsubs;		/* tracks # subs accessed in a Global cmd */

	long	t_new_i,	/* total new items */
		t_new_f,	/* total new files */
		t_new_p,	/* total new posts */
		t_new_r,	/* total new responses */
		t_new_n,	/* total new messages to you */
		t_new_ri;	/* total new response items */

	long	not_used_1;

	short	AParams,
		AParam[17];

	short	PTimeOnLine;	/* in-current-pfile time counter */

	UBYTE	not_used_2 [50];

	UBYTE	qwk;
	UBYTE	ylharc;
	UBYTE	yaddcr;
	UBYTE	ylocal;

	short	zmatches;
	UBYTE	zheader;
	UBYTE	readnew;

	long	nsets,
		rset,
		rcount,
		rtotal,
		set[10][2];

	UBYTE	rtome,
		rfree,
		rfavorite,
		runval,
		rprivate,
		rreverse,
		rbrandnew,
		rnresponse,
		rpass,
		rsince,
		rnew,
		rglobal,
		rdeftype,
		rchron,
		rbyme,
		runtil;

	struct	IsDate	rdate,
			udate;

	UBYTE	rpreview,
		rbanner;

	char	ldiskloc[62],		/* diskloc for P/G/N */

		rsearch[64],
		myfile[54];

	short	pos,
		num,
		num2,
		maint,		/* sysop or subop, current subboard? */
		NoSelected;	/* number of items in Select List */

	char	filename[114],
		ListArea[38];

	long	WWidth;		/* 80 */
	long	WLength;	/* 24 */
	long	WLeft;		/* def   0 */
	long	WRight;		/* def 639 */
	long	WTop;		/* def  11 */
	long	WBottom;	/* def YMAX */

	long	nparts, parts[10][2],		/* editor stuff */
		inlen, edlength, tline, bit_mci;
	short	times, repmode, MaxLines, WScroll;

	short	NoUploaded;
	short	ModelType;		/* Controls .M in editor.  */

	char	not_used_3 [8];

	struct	ItemType **ip;

	long	warn2;

	char	KBuff[ 256 ];		/* keyboard buffer! */
	UBYTE	MaxColors,		/* # of colors on screen */
		FlagCH,
		FlagED,
		Gflag,
		ConfMode,		/* Are we in conference? */
		column,
		KB1,			/* DeQueue pointers */
		KB2,

		KB3,			/* what inter-user chat sees */
		CursorStatus,		/* is cursor on? */
		AbortFlags,
		HourNow,
		LastHour,
		Indent,
		InANSI,
		GETarg,

		CMDarg,
		LocalMode,		/* BOOLS .. In Local Mode ? */
		noflowcontrol,
		AtWaitScreen,		/* Are we at IDLE? */
		AnnounceLogon,		/* OBSOLETE */
		DoQuick,		/* ! at last input ? */
		AutoLogon,
		TermOn,			/* in terminal? */

		ANSIon,			/* can we type ansi? (ESC) */
		PrintFlags,		/* space or ^C pressed */
		CountUp,
		InputFlags,
		Relogon,
		Logoff,
		NewScanBROWSE,		/* BROWSE at logon scan for new? */
		DoRetype,

		WWrap,
		DoubleBuffer,
		MoreRow,
		MoreAtRow,
		WScreen,
		InTransfer,
		NoMCI,
		FreezeTime,

		OffLine,		/* skip answering the phone?? */
		mcitest,		/* MCI stuff */
		mcilabel,		/* label to look for ... */
		kolorific,
		mciflash,		/* actually, bold */
		mciscore,
		mcireverse,
		intense,		/* color greater than 7? */

		mciprint,
		mcispeed,
		mcicolor,		/* the requested MCI color 0-7 */
		pencolor,		/* actual screen pencolor */
		mcinoabort,
		backcolor,		/* background color */
		mciback,
		MCIenv,			/* current MCI environ flags */

		MCIdefenv;
	char	EditorOn,		/* is editor on? */
		var5,
		ScreenWidth;

	char	CStack[80],		/* Command stacking */
		ChatMsg[84],		/* current chat message */
		sbuff[48],
		outbuffer[84],
		ansiout[80],
		dbuffer[84],
		ConnectCode[84],
		ChatBuff[84],
		APrint[36],		/* for PrintAccess */
		MCILine[5][44],		/* last MCI inputs */
		PName[3][32];

	long	warn3;

	long	swrite, LogoffFlag;	/* file transfer stuff */
	long	ResumeSize;
	short	ResumeNumber, StartUpTime;

	short	protonum;
	char	protobyte;
	char	edbuff;			/* T/F something saved in ed? */

	short	xfercount;

	short	unused;

/* If you use QuoteType=2, you MUST set the following three variables.
   Note that QuoteFrom and QuoteDate are POINTERS ... do NOT copy into
   them!
*/
	char	*QuoteFrom;		/* Who are we quoting? */
	struct	IsDate *QuoteDate;	/* When was that message written? */
	long	QuoteEnd;		/* LAST BYTE position in file */
					/* Quoter will stop automatically
					   if ^Z occurs first */
	char	not_used_4 [15];

	UBYTE	qwk_anonymous;
	UBYTE	qwk_private;
	UBYTE	cminute;
	UBYTE	chour;
	UBYTE	FNewSave;		/* flag: update FNewDate at logoff */

	long	XferTime;
	short	LastCPS, cpsavecount;
	long	cpsavesum, LastXTime, StartByte, LastByte;

	UBYTE	mode,
		ZAlternate,
		TrapDoor,
		QuoteType;		/* 0==Mail, 1==Message base
					   2==User defined.  See QuoteFrom,
					      QuoteDate, etc., above */

	short	ARunCount;		/* depth of AREXX pfiles */
	short	CRunCount;		/* depth of C pfiles */
	char	CSpawn[84];

	long	TrapBaud;
	long	TrapLock;

	char	QuotePath[104];		/* MESSAGE QUOTING in editor. */
					/* SETTING this ENABLES quoting.
					   Remember to clear this after
					   you use it. */
	long	QuoteSeek;		/* What's the starting byte pos? */

	short	imode;		/* editor.  Insert mode?  If yes, which line*/
	short	iline;

	long	abort;

	long	nm,		/* were once SHORTS...moved here to*/
		rs,		/* avoid conflicts with 32767 max  */
		new_i,		/* responses/item or per subboard  */
		new_n,
		new_r;

	UBYTE	AtPrompt,
		InShell,
		donormal,
		dtr,		/* modem device OPENED and ready */
		sread,		/* read request pending ... */
		modem,		/* modem exists ... allows BBSPORT0 */
		mio;		/* modem IO allowed */

	UBYTE	isud;		/* when in base, is UD, not BASE */

	char	RexxObject[84];

	short	UrgentMail1;
	UBYTE	MRinuse;
	UBYTE	intab;			/* for LoadLine() */

	UBYTE	rjustposts;

	UBYTE	not_used_6;

	char	ExtTransfer;
	char	ExtProtocol;
	long	ExtMinFree;

	long	ALogon;
	long	BLogon;
	long	ATransfer;
	long	BDownload;
	long	BUpload;
	long	APfiles;
	long	BCharge;
	long	hiCharge;
	long	loCharge;
	long	EventFlags;

	struct	CMessage	cpmess;
	struct	SerPort		sp;	/* BBSPORT data. see above struct */

	long	warn4;

	UBYTE	PAccess,
		RAccess,
		DAccess,
		UAccess;

	long	TimeTilCutoff,
		TimeTilEvent,		/* TENTHS of minutes until next event */
		NextEvent;		/* minute time of next event */

	long	SERIAL_MASK,
		UTILITY_MASK;

	APTR	mya4;			/* pointer to global data reg */
	char	protoenv[80];
	void	(*doxx)( void );
	ULONG	xxsig;
	struct	Task *xxtask;

	char	*xpr_filename;
	long	(* __asm xpr_sread)(
		register __a0 char *buffer,
		register __d0 long size,
		register __d1 long timeout,
		register __a2 APTR data );
	long	(* __asm xpr_swrite)(
		register __a0 char *buffer,
		register __d0 long size,
		register __a2 APTR data );
	long	(* __asm xpr_update)(
		register __a0 struct XPR_UPDATE *updatestruct,
		register __a2 APTR data );
	long	(* __asm xpr_sflush)(
		register __a2 APTR data );
	long	(* __asm xpr_ffirst)(
		register __a0 char *buffer,
		register __a1 char *pattern,
		register __a2 APTR data );
	long	(* __asm xpr_fnext)(
		register __d0 long oldstate,
		register __a0 char *buffer,
		register __a1 char *pattern,
		register __a2 APTR data );
	long	(* __asm xpr_chkabort)(
		register __a2 APTR data );

	struct	MsgPort *rexxPort;
	long	rexxPortBit;
	char	*extension;
	struct	rexxCommandList *globalrcl;

	short	callback;		/* enable AUTOCALLBACK @ LOGON */
	short	avalid;			/* which avalid set to use */

	char	home[35];

	UBYTE	PendEvent;		/* execute BBSEVENT at logoff */
	long	LastOffEvent;		/* Time of last OFFLINE BBSEVENT */

	char	not_used_99[60];

	struct	SelectType *Upload;	/* upload list is now SEPARATE!!! */

	struct	Subdirectory	sub;

	long	SAMNow[20];		/* users 'Last' SAM column */

	char	qwk_to     [26],
		qwk_subject[26];

	struct	NewSubboardType Subboard0;

	struct	BaseUser	brec;
	struct	HeaderType	Header0, LastHeader;
	struct	MessageType	Message0;
	struct	ItemType	Item0;

	char	BackBuff[10][80];	/* last 10 commands executed */
	long	bbnum;			/* pointer into D-Q */

	long	mstart,
		mend,
		mmax;

	UBYTE	Logon;			/* VOTE: set to 1 during SYS.WELCOME */
	UBYTE	TermLink;
	short	LinkPort;
	long	TermLinkBaud;

	short	Monitored;		/* 128 + port number if monitored. */
	short	ModelEnable;		/* Controls .M in editor.  */

	struct	MailHeader	Mail0;

	short	listn;			/* current list subboard pointer */
	short	parent0;

	struct	SelectType	Select0;
};

struct FidoNet {
	char from[36];
	char to  [36];
	char subject [72];
	char dateline[20];
	USHORT time;
	USHORT destnode;
	USHORT orignode;
	USHORT cost;
	USHORT orignet;
	USHORT destnet;
	USHORT destzone;
	USHORT orignzone;
	USHORT destpoint;
	USHORT orignpoint;
	USHORT replyto;
	USHORT attribute;
	USHORT nextrply;
};
