typedef		unsigned char boolean;

struct	UserRecord
	{
	char	Name[36];
	char	City[26];
	char	Pwd[16];
	char	DataPhone[13];
	char	HomePhone[13];
	char	LastTime[6];
	char	LastDate[9];
	byte	Attrib;
	byte	Flags[4];
	int	Credit;
	int	Pending;
	int	TimesPosted;
	int	HighMsgRead;
	int	SecLvl;
	int	Times;
	int	Ups;
	int	Downs;
	int	UpK;
	int	DownK;
	int	TodayK;
	int	Elapsed;
	int	Len;
	byte	ExtraSpace[8];
	};

/*	Attrib:
 
	Bit 0: Deleted
	Bit 1: Screen Clear Codes
	Bit 2: More Prompt
	Bit 3: ANSI
	Bit 4: No-Kill
	Bit 5: Ignore Download Hours
	Bit 6: ANSI Full Screen Editor
	Bit 7: [ Reserved ]
*/

struct	NodeIdxRecord
	{
	int	Zone;
	int	Net;
	int	Node;
	byte	Nodetype;
	};

struct	NodelistRecord
	{
	byte	NodeType;
	int	Zone;
	int	Net;
	int	Node;
	char	Name[21];
	char	City[41];
	char	Phone[41];
	int	BaudRate;
	int	Cost;
	};

struct	_qnode		/* this structure is identicle to Nodelistrecord */
	{
	byte	nodetype;
	int	zone;
	int	net;
	int	node;
	byte	namelength;	/* length of name string in Pascal.	*/
	char	name[20];
	byte	citylength;	/* length of city string in Pascal.	*/
	char	city[40];
	byte	phonelength;	/* length of phone string in Pascal.	*/
	char	phone[40];
	int	rate;
	int	cost;
	};

struct	InfoRecord
	{
	int	LowMsg;			/* lowest message in file.	*/
	int	HighMsg;		/* highest message in file.	*/
	int	TotalActive;		/* total active messages.	*/
	int	ActiveMsgs[200];
	};

struct	IdxRecord
	{
	int	MsgNum;
	byte	Board;
	};

struct	HdrRecord
	{
	int	MsgNum;
	int	ReplyTo;
	int	SeeAlsoNum;
	int	TRead;
	word	StartRec;
	int	NumRecs;
	int	DestNet;
	int	DestNode;
	int	OrigNet;
	int	OrigNode;
	byte	DestZone;
	byte	OrigZone;
	int	Cost;
	byte	MsgAttr;
	byte	NetAttr;
	byte	Board;
	char	PostTime[6];
	char	PostDate[9];
	char	WhoTo[36];
	char	WhoFrom[36];
	char	Subj[73];
	};

/* Msg Attributes:
 
      Bit 0: Deleted
      Bit 1: Unmoved Outgoing Net Message
      Bit 2: Is a Net Mail Message
      Bit 3: Private
      Bit 4: Received
      Bit 5: Unmoved Outgoing Echo Message
      Bit 6: Local Bit
      Bit 7: [ Reserved ]
 
   Net Attributes:
 
      Bit 0: Kill Message after it's been sent
      Bit 1: Sent OK
      Bit 2: File(s) Attached
      Bit 3: Crash Priority
      Bit 4: Request Receipt
      Bit 5: Audit Request
      Bit 6: Is a Return Receipt
      Bit 7: [ Reserved ]
 
  Each record in the MSGTOIDX.BBS file is of type String[35], each entry
  is simply the name of the corresponding message in MSGHDR.BBS is
  addressed to.
 
  Each record in the MSGTXT.BBS file is of type String[255], each entry
  is used to store blocks of message text.  The variable "StartRec" in
  the MSGHDR.BBS file contains the starting record position for the
  text, the variable "NumRecs" indicates how many consecutive blocks
  of text there are in the MSGTXT.BBS file.
 
*/

struct	SysInfoRecord
	{
	long	CallCount;
	char	LastCaller[36];
	byte	ExtraSpace[128];
	};

struct	TimeLogRecord
	{
	char	StartDate[9];
	int	BusyPerHour[24];
	int	BusyPerDay[7];
	};

struct	MenuRecord
	{
	byte	Typ;
	int	Sec;
	byte	Flags[4];
	char	Str[76];
	char	Key;
	char	Data[81];
	byte	Fg;
	byte	Bg;
	};

struct	EventRecord
	{
	byte	Status;
	char	RunTime[6];
	byte	ErrorLevel;
	byte	Days;
	boolean	Forced;
	char	LastTimeRun[9];
	};

struct	BoardRecord
	{
	char	Name[17];
	byte	Typ;
	byte	Kinds;
	boolean	Combined;
	boolean	Aliases;

	int	ReadSecLvl;
	byte	ReadFlags[4];

	int	WriteSecLvl;
	byte	WriteFlags[4];

	int	SysopSecLvl;
	byte	SysopFlags[4];
	};

struct	ConfigRecord
	{
	int	CommPort;
	int	InitBaud;
	int	InitTimes;
	int	AnswerWait;
	char	ModemInitStr[71];
	char	ModemBusyStr[71];
	char	ModemInitResp[41];
	char	ModemBusyResp[41];
	char	Resp300[41];
	char	Resp1200[41];
	char	Resp2400[41];

	char	MenuPath[67];
	char	TextPath[67];
	char	NetPath[67];

	int	MinBaud;
	int	GraphicsBaud;
	int	XferBaud;

	char	LowBaudStart[6];
	char	LowBaudEnd[6];
	char	DownloadStart[6];
	char	DownloadEnd[6];
	char	PagingStart[6];
	char	PagingEnd[6];

	int	MatrixZone;
	int	MatrixNet;
	int	MatrixNode;
	int	AkaNet[5];
	int	AkaNode[5];
	int	NetMailBoard;

	int	DefaultSec;
	int	DefaultCredit;
	byte	DefaultFlags[4];

	char	EditorCmdStr[71];
	char	OriginLine[61];
	char	SysopName[36];
	boolean	AutoLogonChar;
	boolean	FastLogon;
	boolean	ScreenBlanking;
	boolean	UseLastRead;
	boolean	MonoMode;
	boolean	DirectWrite;
	boolean	SnowCheck;
	boolean	NetEchoExit;
	boolean	OneWordNames;
	boolean	CheckMail;
	boolean	AskHomePhone;
	boolean	AskDataPhone;
	boolean	GraphicsAvail;
	int	InactiveTimeOut;
	int	LogonTime;
	int	DefFgColor;
	int	DefBgColor;
	int	PasswordTries;
	int	MaxPageTimes;
	int	PageBellLen;
 
	boolean	UseZoneGates;
	byte	ExtraSpace[511];
 
	struct	EventRecord	EventRec[30];
	struct	BoardRecord	BoardRec[200];
	};
 
struct	ExitRecord	/* structure of EXITINFO.BBS file.		*/
	{
	int	BaudRate;
	struct	SysInfoRecord	SysInfo;
	struct	TimeLogRecord	TimeLogInfo;
	struct	UserRecord	UserInfo;
	struct	EventRecord	EventInfo;
	boolean	NetMailEntered;
	boolean	EchoMailEntered;
	char	LoginTime[6];
	char	LoginDate[9];
	int	TmLimit;
	long	LoginSec;
	long	Credit;
	int	UserRecNum;
	int	ReadThru;
	int	PageTimes;
	int	DownLimit;
	};
