/*******************************\
* ACCOUNTS.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
int Load_Account(slot,hoozer)
	int slot;
	struct User *hoozer;

int Save_Account(hoozer)
	struct User *hoozer;

int Find_Open_Account(hoozer)
	struct User *hoozer;

static int Display_Account(who,hoozer)
	int who;
	struct User *hoozer;

int Edit_Accounts()

int NumberInput()

/*******************************\
* ACOM.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
int ACom()

/*******************************\
* BCOM.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
int BCom()

static int Bulletin_Listings(bh)
	struct Bulletin_Header *bh;

static int Read_Bulletin(bh,number)
	struct Bulletin_Header *bh;
	int number;

static int Help()

/*******************************\
* CONSOLE.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
InitConsole()

OpenConsole()

CheckCon()

CheckInput()

ConPutChar()

ConPutStr()

PutStr(string)
	char *string;

SendChar(ch)
	int ch;

GetConKey(wait)
	int wait;

ReadChar(wait)
	ULONG wait;

CloseConsole()

/*******************************\
* CORE.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
CheckCSI()

CheckMessage()

int Reset_System()

int Await_Logon()

int Cycle_The_Display()

int LineInput(atstart,tohere,maxlen,time_allowed)
	char atstart[],tohere[];
	int maxlen;
	long time_allowed;

int LineInputConverted(atstart,tohere,maxlen,time_allowed)
	char atstart[],tohere[];
	int maxlen;
	long time_allowed;

int StringCompare(s,t)
	char *s, *t;

int MenuSend(s)
	char *s;

int FilPutStr(s)
	char *s;

int PrtPutStr(s)
	char *s;

int FilPutChar(c)
	char c;

int PrtPutChar(c)
	char c;

int Chat()

int StatCursorTo(x,y)
	register int x,y;

int StatPrint(s)
	register char *s;

int StatParkCursor()

int StatMessage(x,y,s)
	register int x,y;
	register char *s;

int StatRollMessage(s)
	register char *s;

int StatPrintName(s)
	char *s;

int StatPrintStatus(s)
	char *s;

int StatPrintSlot(s)
	char *s;

int StatPrintTime(s)
	char *s;

int StatPrintSpecial(s)
	char *s;

int StatPrintUser(hoozer)
	struct User *hoozer;

/*******************************\
* EDIT.C			*
* (c)1986, Patrick E. Hughes	*
* skeleton from Marc Hall	*
\*******************************/
int Edit(bp,size,maxline,type)
	char *bp;   
	short size,maxline,type;

static int Retype()

static int Edit_Line(which)
	int which;

static int List()

static int Free_Space()

static int Help()

static int Delete_Line(which)
	int which;

static int Abort()

static int Store()

static int Enter()

/*******************************\
* INIT_BOARDS.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
int Init_Boards()

static int Header_Segment()

static int Data_Segment()

/*******************************\
* INIT_BULLETIN.C		*
* (c)1986, Patrick E. Hughes	*
\*******************************/
int Init_Bulletins()

static int Header_Segment()

/*******************************\
* INIT_LIBRARY.C		*
* (c)1986, Patrick E. Hughes	*
\*******************************/
int Init_Libraries()

static int Header_Segment()

static int Data_Segment()

/*******************************\
* INIT_SYSTEM.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
int Init_System()

int Display_Logo()

/*******************************\
* JCOM.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
int JCom()

/*******************************\
* LCOM.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
int LCom()

static int Lib_Prompt(lh)
	struct Library_Header *lh;

static int Lib_ReadNew(lh)
	struct Library_Header *lh;

static int Lib_Read(lh,from,to)
	struct Library_Header *lh;
	int from,to;

static int Send_Message(lh,ld,number)
	struct Library_Header *lh;
	struct Library_Data *ld;
	int number;

static int Flush_Keys(lh)
	struct Library_Header *lh;

static int Lib_Read_Frontend(lh)
	struct Library_Header *lh;

static int Lib_Immediate(lh)
	struct Library_Header *lh;

static int Lib_Delete_Frontend(lh)
	struct Library_Header *lh;

static int Between_Lib_Prompt(lh,ld,number)
	struct Library_Header *lh;
	struct Library_Data *ld;
	int number;

static int Lib_Delete(lh,from,to)
	struct Library_Header *lh;
	int from,to;

static int Lib_Upload(lh)
	struct Library_Header *lh;

static int Store_File(lh,ld)
	struct Library_Header *lh;
	struct Library_Data *ld;

static int Lib_Forward(bh,dh,number)
	struct Board_Header *bh;
	struct Board_Data *dh;
	int number;

/*******************************\
* LOGON.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
int Logon_Sequence()

int New_Account_Sequence()

int Sysop_Account_Sequence()

/*******************************\
* MCOM.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
int MCom()

static int Msg_Prompt(bh)
	struct Board_Header *bh;

static int Msg_ReadNew(bh)
	struct Board_Header *bh;

static int Msg_Read(bh,from,to)
	struct Board_Header *bh;
	int from,to;

static int Send_Message(bh,bd,msg,number)
	struct Board_Header *bh;
	struct Board_Data *bd;
	char msg[];
	int number;

static int Store_Message(bh,dh,msg)
	struct Board_Header *bh;
	struct Board_Data *dh;	/* containing title-author-etc info */
	char msg[];

static int Find_Open_Slot(bh,dh)
	struct Board_Header *bh;
	struct Board_Data *dh;

static int Flush_Keys(bh)
	struct Board_Header *bh;

static int Msg_Read_Frontend(bh)
	struct Board_Header *bh;

static int Msg_Immediate(bh)
	struct Board_Header *bh;

static int Msg_Delete_Frontend(bh)
	struct Board_Header *bh;

static int Between_Msg_Prompt(bh,bd,buf,number)
	struct Board_Header *bh;
	struct Board_Data *bd;
	char *buf;
	int number;

static int Msg_Extract(bh,dh,buf,number)
	struct Board_Header *bh;
	struct Board_Data *dh;
	char *buf;
	int number;

static int Make_Open_Slot(bh)
	struct Board_Header *bh;

static int Msg_Delete(bh,from,to)
	struct Board_Header *bh;
	int from,to;

static int Msg_Write(bh)
	struct Board_Header *bh;

static int Msg_Public_Reply(bh,dh)
	struct Board_Header *bh;
	struct Data_Header *dh;

static int Msg_ReadTitleMatch(bh)
	struct Board_Header *bh;

static int Msg_ScanTitles(bh)
	struct Board_Header *bh;

static int Msg_Forward(bh,dh,number)
	struct Board_Header *bh;
	struct Board_Data *dh;
	int number;

/*******************************\
* MENU.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
int Menu()

int TCom()

int CCom()

int ICom()

int Clear_Online_Status()

int Check_Online_Status()

/*******************************\
* PCOM.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
int PCom()

static int Mail_Prompt(mh)
	struct Mail_Header *mh;

static int Mail_Read(mh,from,to)
	struct Mail_Header *mh;
	int from,to;

static int Send_Mail(mh,bd,msg,number)
	struct Mail_Header *mh;
	struct Mail_Data *bd;
	char msg[];
	int number;

static int Store_Mail(mh,dh,msg)
	struct Mail_Header *mh;
	struct Mail_Data *dh;	/* containing title-author-etc info */
	char msg[];

static int Find_Open_Slot(mh,dh)
	struct Mail_Header *mh;
	struct Mail_Data *dh;

static int Flush_Keys(mh)
	struct Mail_Header *mh;

static int Mail_Read_Frontend(mh)
	struct Mail_Header *mh;

static int Mail_Immediate(mh)
	struct Mail_Header *mh;

static int Mail_Delete_Frontend(mh)
	struct Mail_Header *mh;

static int Between_Mail_Prompt(mh,bd,buf,number)
	struct Mail_Header *mh;
	struct Mail_Data *bd;
	char *buf;
	int number;

static int Mail_Extract(mh,dh,buf,number)
	struct Mail_Header *mh;
	struct Mail_Data *dh;
	char *buf;
	int number;

static int Mail_Delete(mh,from,to)
	struct Mail_Header *mh;
	int from,to;

static int Mail_Write(mh)
	struct Mail_Header *mh;

static int Mail_Private_Reply(mh,dh)
	struct Mail_Header *mh;
	struct Mail_Data *dh;

int Mail_Count(mh,who)
	struct Mail_Header *mh;
	int who;

int Mail_List(mh,who)
	struct Mail_Header *mh;
	int who;

int Mail_Reply_To(mh,who)
	struct Mail_Header *mh;
	int who;

/*******************************\
* SERIAL.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
int OpenSerial(Baud,DataLen,StopBits,SerFlags)
  ULONG Baud, SerFlags;
  UBYTE DataLen,StopBits;

CheckSer()

CloseSerial()

CheckCarrier()

SetDTR(set)
  int  set;

SetBaud(rate)
  LONG rate;

SerPutChar(ch)
  UBYTE ch;

SerPutStr(string)
  UBYTE *string;

SerPutBlk(block,length)
  UBYTE *block;
  int length;

sendser(ch)
  UBYTE ch;

GetSerKey(wait)
int wait;

readser(wait)
  ULONG wait;

PurgeLine()

/*******************************\
* STATISTICS.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
int Init_Stat()

int Close_Day(day)
	int day;

int Open_Day(day)
	int day;

int Save_Stat()

int Close_Stat()

int Append_Stat(which)
	int which;

int Report_Stat()

/*******************************\
* TAG.C				*
* (c)1986, Patrick E. Hughes	*
\*******************************/
main()

int ShutDown()

/*******************************\
* TIMER.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
int OpenTimer()

int SetTimer(secs, micros)
  ULONG secs, micros;

int CloseTimer()

/*******************************\
* TIMER.C			*
* (c)1986, Patrick E. Hughes	*
\*******************************/
static int sendchar(ch)
int ch;

static int readchar( seconds, doabort )
	unsigned int seconds, doabort;

static int purge_line()

static int Xon(val)
int val;

static int start_line()

static int check_line()

static int do_crc( val )

static int check_abort()

int Xmodem_Receive(file)
	char *file;

static int verify_checksum( byte )
UBYTE byte;

static int chop_file()

int Xmodem_Send(file)
char *file;

static int fillbuf()

static int sendsector( buf )
unsigned char *buf;

int report(file)
	char *file;

