Main Functions
==============
Starting and Stopping
---------------------
int pascal initdoor(char *     Name,
                    int        SessionLimit,
                    int        KbdTimeout,
                    openstatus OpenStatus);

  OpenStatus values:
    WATCHKBD  WATCHSESSION  READUSERSYS  SHOWSTATUSLINE  LMRS  CONFFLAGS  TPA
    NOCLS

void pascal closedoor(bool UpdateUserSys);
void pascal goodbye(bool UpdateUserSys);
void pascal atclosing(void);


Display Functions
-----------------
void pascal backup(int NumColumns);
void pascal backupcleareol(int NumColumns);
void pascal bell(void);
void pascal checkdisplaystatus(void);
void pascal checkstatus(void);
void pascal cleareol(void);
void pascal displayfile(char * Name, displayfiletype Type);

  Type values:
    NOALTERNATE  GRAPHICS  SECURITY  LANGUAGE

void pascal displayhelpfile(int HelpNum);
void pascal forward(int NumColumns);
void pascal freshline(void);
void pascal moreprompt(moretype Type);

  Type values:
    MOREPROMPT  PRESSENTER

void pascal movecursor(int X, int Y);
void pascal newline(void);
void pascal print(char *Str);
void pascal println(char *Str);
void pascal printcls(void);
void pascal printcolor(int ColorNum);
void pascal printdefcolor(void);
void pascal printxlated(char *Str);
void pascal startdisplay(startdisplaytype Action);

  Action values:
    NOCHANGE  FORCENONSTOP  FORCECOUNTLINES

Input Functions
---------------
void pascal inputfield(char *      Buffer,
                       int         PcbTextNum,
                       int         MaxLen,
                       displaytype Display,
                       int         HelpNum,
                       char *      Mask);

  Display values:
    DEFAULTS  ECHODOTS  FIELDLEN  GUIDE  UPCASE  STACKED  ERASELINE  NEWLINE
    LFBEFORE  LFAFTER  WORDWRAP  NOCLEAR  BELL  HIGHASCII  AUTO

  Mask format:
    char mask_atoz[] = {3,0,'A','z'};

int pascal inputfieldint(int         Default,
                         char *      Prompt,
                         int         Color,
                         int         MaxLen,
                         displaytype Display,
                         int         HelpNum);

long pascal inputfieldlong(long        Default,
                           char *      Prompt,
                           int         Color,
                           int         MaxLen,
                           displaytype Display,
                           int         HelpNum);

void pascal inputfieldstr(char *      Buffer,
                          char *      Prompt,
                          int         Color,
                          int         MaxLen,
                          displaytype Display,
                          int         HelpNum,
                          char *      Mask);

void pascal inputfieldreqstr(char *      Buffer,
                             char *      Prompt,
                             int         Color,
                             int         MaxLen,
                             int         MinLen,
                             displaytype Display,
                             int         HelpNum,
                             char *      Mask);

Low Level Functions
-------------------
void pascal ansi(char *Str);
int  pascal comminkey(void);
void pascal sendbyte(char Byte);
void pascal sendstr(char * Str, int StrLen);
void pascal curcolor(void);
void pascal awherex(void);
void pascal awherey(void);
void pascal agotoxy(void);
void pascal asetcolor(char NewColor);
void pascal turnonrts(void);
void pascal turnoffrts(void);
void pascal turnondtr(void);
void pascal turnoffdtr(void);
void pascal turnonxmit(void);
int  pascal cdstillup(void);
int  pascal online(void);
void pascal clearinbuf(void);
void pascal clearoutbuf(void);
void pascal turnonfifo(char TriggerLevel);
void pascal clearkbdbuffer(void);
int  pascal commportinkey(void);
int  pascal kbdinkey(void);
int  pascal cinkey(void);
int  pascal giveup(void);
void pascal waitforempty(int Seconds);


Timer Functions
---------------
void pascal settimer(int Which, long Ticks);

  Unused timers:  4, 7, 8
  Ticks = number of 1/18th second intervals

void pascal gettimer(int Which);
void pascal tickdelay(int Ticks);


Modem Functions
---------------
void pascal slowsendtomodem(char *Str);
int  pascal showmodem(char *InBuf, int BufSize, modemverifytype Verify);
int  pascal modemcommand(char *Command, modemverifytype Verify);


Misc. Door Functions
--------------------
void pascal customhelp(int HelpNum);
void pascal redisplaystatusline(void);
void pascal sysopchat(void);
int  pascal minutesleft(void);
void pascal addtime(long Seconds, timereasontype Reason);

  Reason values:
    NEWTIME  CONFTIME  CREDTIME

void pascal subtime(long Seconds, timereasontype Reason);
int  pascal getconfrecord(unsigned ConfNum, pcbconftype * ConfRecord);
int  pascal opencnames(void);
void pascal closecnames(void);
long pascal finduser(char *SrchName);
void pascal writelog(char * Str, padtype Pad);

  Pad values:
    LEFTJUSTIFY  SPACERIGHT

void pascal change(char * Str, char Old, char New);
void pascal displaypcbtext(int PcbTextNum, displaytype Display);

  Display values:
    DEFAULTS  NEWLINE  LFBEFORE  LFAFTER  BELL  LOGIT  LOGITLEFT

int  pascal savescrnbuffer(void);
void pascal restscrnbuffer(void);
void pascal turndisplayon(bool WriteToDisk);
void pascal turndisplayoff(bool WriteToDisk);
void pascal shelltodos(void);
int  pascal performshell(char * Command, char * Params, shelltype ShellType);

  ShellType values:
    SHELLDIRECT  SHELLVIACOMMAND

int  pascal tokenize(char *Command);
char * pascal getnexttoken(void);
void pascal turnkbdtimeron(void);



Memory Functions
----------------
void * pascal bmalloc(int Size);
void pascal bfree(void *ptr);
void pascal bfreeall(void);
void far * pascal fbmalloc(long Size);
void pascal fbfree(void far *ptr);
void pascal fbfreeall(void);


DOS Functions
-------------
  OpenFlags values:
    OPEN_READ  OPEN_WRIT  OPEN_RDWR
    OPEN_DENYNONE  OPEN_DENYREAD  OPEN_DENYWRIT  OPEN_DENYRDWR

  Attributes:
    OPEN_NORMAL  OPEN_RDONLY  OPEN_HIDDEN  OPEN_SYSTEM  OPEN_VOLUME

void pascal dosinit(void);
int  pascal dosappend(char * FileName, int OpenFlags);
int  pascal dosappendcheck(char * FileName, int OpenFlags);
int  pascal doscreate(char * FileName, int OpenFlags, int Attributes);
int  pascal doscreatecheck(char * FileName, int OpenFlags, int Attributes);
int  pascal dosclose(Handle);
int  pascal doscommit(Handle);
int  pascal dosdup(OldHandle);
int  pascal dosfclose(DOSFILE *file);
int  pascal dosfgets(char * Str, unsigned  MaxChars, DOSFILE * file);
int  pascal dosfputs(char * Str, DOSFILE * file);
int  pascal dosflush(DOSFILE *file);
int  pascal dosfopen(char * FileName, int OpenFlags, DOSFILE * file);
int  pascal dosfread(char * Buffer, unsigned NumChars, DOSFILE * file);
int  pascal dosfwrite(char * Buffer, unsigned NumChars, DOSFILE * file);
long pascal dosfseek(DOSFILE * file, long distance, char method);
int  pascal doslockcheck(int handle, long offset, long length);
long pascal doslseek(int handle, long distance, char method);
int  pascal dosopen(char * FileName, int OpenFlags);
int  pascal dosopencheck(char * FileName, int OpenFlags);
int  pascal dosread(int handle, void * buf, unsigned len);
void pascal dosrewind(DOSFILE *file);
void pascal dossetbuf(DOSFILE * file, unsigned BufSize);
int  pascal doswrite(int handle, void * buf, unsigned len);
int  pascal readcheck(int handle, void * buf, unsigned len);
int  pascal writecheck(int handle, void * buf, unsigned len);


String Functions
----------------
void pascal addbackslash(char * Str, int MaxLen);
void pascal addchar(char * Str, char Ch);
void pascal ascii(char * Str, int Num);
void pascal asciispace(char * Str, int Num);
void        buildstr(char * Dest, char * Srce, ..., NULL);
void pascal fmemcpy(void far * dest, void far * src, unsigned len);
void pascal fmemset(void far * dest, char c, unsigned   len);
int  pascal isset(void far * BitStream, int BitNum);
void pascal lascii(char * Str, long Num);
void pascal maxstrcpy(char * Dest, char * Srce, int Max);
void pascal padstr(char * Str, char C, int MaxLen);
char * pascal strnchr(char * Str, char C, int Len);
void pascal stripleft(char * Str, char Ch);
void pascal stripright(char * Str, char Ch);
void pascal setbit(void far * BitStream, int BitNum);
bool pascal substitute(char * Str, char * Search, char * Replace, int MaxLen);
void pascal unsetbit(void far * BitStream, int BitNum);


Conversion Functions
--------------------
long pascal bassngltolong(bassngl Num);
long pascal basdbletolong(bassngl Num);
void pascal longtobasdble(basdble New, long Num);
void pascal longtobassngl(bassngl New, long Num);


Date Functions
--------------
char * pascal datestr(char *DateStr);
unsigned pascal datetojulian(char *DateStr);
unsigned pascal getjuliandate(void);
char * pascal juliantodate(unsigned int JulianDate);
char * pascal timestr1(char *TimeStr);
char * pascal timestr2(char *TimeStr);


Screen Functions
----------------
void pascal cls(void);
void pascal fastputc(int Loc, char C);
void pascal fastputch(int Loc, char C, char Color);
void pascal fastprint(int X,int Y,char * Str,char Attr);
int  pascal getcursor(void);
void pascal setcursor(int CursorType);
int  pascal xyvalue(int X, int Y);


Additional Functions
--------------------
void pascal pcbinit(void);
char pascal fileexist(char *FileName);
void pascal mydelay(int Hundredths);
