home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-10-10 | 42.6 KB | 1,321 lines |
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
-
- DoorDriver 5.00 - By Scott M. Baker
-
- Introduction - What is DoorDriver?
- ----------------------------------
- Doordriver is a set of .TPU units designed to be used
- to create "Door" programs in the Turbo Pascal programming
- language. The idea behind DoorDriver is that you
- concentrate on writing your game and let DoorDriver do all
- of the nasty ugly low-level details such as handling
- serial I/O and processing BBS drop files.
- Here are a listing of some of DoorDriver's finer
- features:
-
- * Handles all serial I/O for you. You don't need to
- know a COM-PORT from a BAUD-RATE - DoorDriver'll do
- it for you.
-
- * Processes drop file from a variety of bbs systems -
- RBBS-PC, Wildcat, Spitfire, PC-Board, WWIV,
- Quickbbs, etc.
-
- Drop Files
- ----------
- Drop Files are the files created by the bulletin board
- software when it goes to run a door. Obviously, the door
- needs to know the user's name, baud rate, com port, etc,
- right? Well, this is where that information goes. The BBS
- creates a "Drop File" containing most information that the
- door needs to operate.
- These drop files vary from BBS software to BBS
- software, although some standards are emerging. For this
- purpose, DoorDriver includes support for several different
- drop file formats.
-
- Overview of Routines
- --------------------
- The procedures, functions, and variables in DoorDriver
- can be categorized into several different groups:
-
- * INPUT [INP]
-
- Get information from the user who is online.
- Example: SREAD() which performs the
- functional equivelant of READLN().
-
- * OUTPUT [OUT]
-
- Send information to the user. Example:
- SWRITE() which performs the equivelant of
- WRITE().
-
- * INFORMATIONAL [INF]
-
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- Provide information about the user, such as
- his name, baud rate, etc. Example:
- USER_FIRST_NAME which stores the current
- user's first name.
-
- Informational variables are usually
- read-only, but some can be written to as
- well. Use common sense and you should get
- by.
-
- * CONTROL [CTL]
-
- Procedures which perform various control
- functions over how doordriver operates.
-
- In the reference sections of this manual, all
- functions/procedures/etc will be placed in one of these
- categories for your convenience.
-
- (copy "converting your program into a door")
-
- Configuration - The Control File
- --------------------------------
- For the convenience of both the author and the sysops
- who will be running the door, DoorDriver picks up some of
- it's configuration data from a "control file". A control
- file is a plain ASCII file which contains special commands
- and directives to tell DoorDriver how to behave. For
- example, this includes which BBS drop files to use, the
- Sysop's name, etc.
- A Sample control file (DOORDRIV.CTL) is included. You
- may designate any name you wish as the name of the control
- file for your door (for example, my CDRDOOR program uses
- CDRDOOR.CTL; News door uses NEWS.CTL, etc)
- The control file is loaded and processed automatically
- when your program calls "INITDOORDRIVER". (This will be
- described further down).
-
- Command Line Parameters
- -----------------------
- DoorDriver supports several parameters which may be
- specified on the command line. These parameters are
- automatically processed for you when you call
- "INITDOORDRIVER".
-
- "/L" This tells DoorDriver to load up in LOCAL
- mode. This is good for testing or when a sysop just wants
- to "try out" the door without messing with his BBS setup.
- The "/L" mode will ask the user for his name and run the
- door in local mode.
-
- "/S" This command will tell doordriver to load up
- in the Sysop FAST local mode. The only difference between
- this and "/L" above is that the sysop is not asked his
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- name - it is plucked out of the control file
- automatically.
-
- "/M" This is a generic maintenance mode. It logs
- into the game with the name "SYSTEM MAINT" in local mode.
- You can use it if your program requires a nightly
- maintenance or something similar.
-
- "/Nx" (where x is 1..9) This specifies a "node
- number". Some bbs software support multinode environments
- in which you must know the node number of the drop file to
- use. For example, RBBS-PC uses DORINFOx.DEF. If you
- specified "/N2" then doordriver would use DORINFO2.DEF.
-
- "/Pyyy" This specifies the PATH to the drop files.
- For example, "/PC:\BBS" would tell DoorDriver to look for
- the drop files in C:\BBS.
-
- Reference - Procedures
- ----------------------
-
- INITDOORDRIVER(filen: string); [CTL]
-
- This procedure MUST be called before any of
- DoorDriver's features are used. In fact, in most cases it
- should be the first statement that your program executes.
- The FILEN variable specifies the filename of the control
- file that DoorDriver will use (i.e. DOORDRIV.CTL).
- InitDoorDriver does a variety of things including
- loading and processing the control file, reading the drop
- files, setting up serial I/O. It also sets up an "EXIT
- Procuedure" which will automatically close down the serial
- I/O when your program is finished.
-
- DISPLAYFILE(Filen: String); [OUT]
-
- This Procedure is usefull in that it will transfer an
- Ascii or Ansi file, and will put "(C)ontinue, (S)top,
- (N)onstop" to stop an Ascii file from scrolling of the
- page and thus allowing the user to read this file at his
- or her own speed.
-
-
- DISPLAY_MACRO(s: string); [OUT]
-
- This procedure is used to display a macro-string. The
- macro string is usually contained in the variable
- MACRO_STRING.
-
-
- PROMPT(var s: string; length: integer; hi: boolean); [INP]
-
- The prompt procedure is a high-level string input
- routine. It allows you to specify the maximum length of
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- the input string and if HI is set to true, it will hilight
- the input in reverse background. The colors for the prompt
- routine are defined in the control file.
-
-
- RECORD_MACRO(var s: string); [INP]
-
- This procedure allows the user to record a macro
- string, up to 255 characters that will be invoked whenever
- the CTRL-N key is pressed. The macro is stored in the
- string variable S. To activate the macro capability, you
- must place the macro into the string variable
- "MACRO_STRING".
-
-
- SCLRSCR; [OUT]
-
- This procedure clears the remote side's and the local
- side's screen.
-
- SCRLEOL; [OUT]
-
- This procedure will clear up to then end of the
- current line. (note: only works when caller has ANSI
- capabilities)
-
-
- SET_FOREGROUND(i: integer); [OUT]
-
- The set_foreground procedure sets the current
- foreground color to the one specified by the integer
- variable, i. The color is set both on the local side and
- the remote side if the remote user has ANSI toggled on.
- The acceptable range for the color is 0-15.
-
-
- SET_BACKGROUND(i: integer); [OUT]
-
- The set_background procedure sets the current
- background color to the one specified by the integer
- variable, i. The color is set both on the local side and
- the remote terminal if the remote user has toggled his
- ANSI on. The acceptable range for the color is 0-7.
-
-
- SGOTO_XY(x,y: integer); [OUT]
-
- Sgoto_xy allows you to position the cursor on the
- local and remote screen. The valid range for X is 1 to 80
- and the valid range for Y is 1 to 24.
-
-
- SREAD_CHAR(var c: char); [INP]
-
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- This procedure waits for a character to be pressed
- and then returns that character in the character variable.
- No echoing is performed (i.e. the user will not see the
- key he pressed). If you wish echoing, you must again write
- the character with SWRITE below. This routine is useful
- for writing your own lowlevel readln routines or
- performing "hot-key" operations. It is a direct
- replacement for CH:=READKEY.
-
- SREAD(var s: string); [INP]
-
- The sread procedure accomplishes the equivilant of
- the Turbo Pascal procedure READLN. A string is read from
- the user and wher the CR character is obtained, the
- procedure exits with the string stored in the string
- variable, s.
-
-
- SREAD_NUM(var i: integer); [INP]
-
- The sread_num procedure is almost identical to the
- sread procedure except it will read an integer variable
- instead of a string. Only the characters 0-9 are allowed
- to be entered by the user. The value returned will be in
- the range of -32768 to +32768.
-
-
- SREAD_NUM_BYTE(var b: byte); [INP]
-
- The sread_num_byte procedure is almost identical to
- the sread procedure except it will read an byte variable
- instead of a string. Only the characters 0-9 are allowed
- to be entered by the user. The value returned will be in
- the range of 0 to 255.
-
-
- SREAD_NUM_WORD(var w: word); [INP]
-
- The sread_num_word procedure is almost identical to
- the sread procedure except it will read an word variable
- instead of a string. Only the characters 0-9 are allowed
- to be entered by the user. The value returned will be in
- the range of 0 to 65535.
-
-
- SREAD_NUM_LONGINT(var l: longint); [INP]
-
- The sread_num_longint procedure is almost identical
- to the sread procedure except it will read an longint
- variable instead of a string. Only the characters 0-9 are
- allowed to be entered by the user. The value returned will
- be in the range of -2147483648 to +2147483647.
-
-
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- SWRITE(s: string); [OUT]
-
- The swrite procedure is the equivilant of the Turbo
- Pascal WRITE procedure. Swrite will simultaniously write
- to both the local screen and the remote terminal. No CR/LF
- sequence is added to the end of the string. (note: You may
- also use WRITE(SOUTPUT,s))
-
-
- SWRITELN(s: string); [OUT]
-
- The swriteln procedure is the equivilant of the Turbo
- Pascal WRITELN procedure. Swrite will simultaniously write
- to both the local screen and the remote terminal. A CR/LF
- sequence is appended to the end of the string. (note: You
- may also use WRITELN(SOUTPUT,s))
-
- DDASSIGNSOUTPUT(f: text); [CTL]
-
- This procedure assigns the simultanious output
- channel to a text file. This is done automatically by
- INITDOORDRIVER to SOUTPUT (i.e. DDASSIGNSOUTPUT(SOUTPUT).
- But, if you wish to assign it to a different file, you may
- do it with this procedure. For example:
-
- DDASSIGNSOUTPUT(my_output_file);
- rewrite(my_output_file);
- writeln(my_output_file,'This will go to both local and '+
- 'remote.');
-
-
- Reference - Functions
- ---------------------
-
- SKEYPRESSED: Boolean; [INF]
-
- SKEYPRESSED will return TRUE if a key has been
- pressed and is waiting to be read and FALSE if no key has
- been pressed. It is the equivelant of Turbo Pascal's
- KEYPRESSED function.
- This also allows the program to pause until the user
- presses a key. When used in a loop like this it stops
- everything until user input occurs.
-
- Repeat Until skeypressed;
-
-
- TIME_LEFT: Byte; [INF]
-
- The time_left function returns the amount of time
- left in minutes. This time is computed automatically by
- doordriver for you.
-
- Reference - Variables
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- ---------------------
-
- SOUTPUT: text; [OUT]
-
- This text file is associated with the simultanious
- output channel. It provides an alternate form of IO than
- using swrite/swriteln. To use, simply treat SOUTPUT as it
- were a normal text file. For example,
-
- Writeln(SOUTPUT,'This is a test'); is the same as
- swriteln('This is a test');
-
- When is this useful? When you want to use WRITELN's
- ability to write various data types (i.e. integers, reals,
- etc) or it's ability to format output. For example:
-
- USING SWRITELN: str(integer_data,tempstr);
- swriteln(tempstr);
-
- USING SOUTPUT: writeln(soutput,integer_data);
-
- ALTKEYS: (see configurable alt key section)
-
- ALTHELP: (see configurable alt key section)
-
- ANSION: boolean; [CTL]
-
- This variable controls whether local output (it has
- nothing to do with remote) will go directly to the local
- screen or if it will be sent through doordriver's
- emulation routine. Since the emulation routine is slow in
- comparison to direct output, this variable is defaulted to
- FALSE. If you want to send your own ANSI codes to the
- screen through SWRITE/SWRITELN, then you will have to set
- this variable to TRUE.
-
- BAUD_RATE: integer; [INF]
-
- This variable holds the user's current baud rate.
-
- BBS_SOFTWARE: byte; [INF]
-
- The following numbers indicate software names:
-
- 0 : Maintenance mode n/a
- 1 : Local-only operation n/a
- 2 : Sysop-fast logon only n/a
- 3 : Qbbs DORINFOx.DEF
- 4 : Pcboard-12 PCBOARD.SYS
- 5 : WWIV CHAIN.TXT
- 6 : n/a n/a
- 7 : Rbbs 16.x DORINFOx.DEF
- 8 : Phoenix EXITINFO.DAT
- 9 : WildCat (pre - 3.0) CALLINFO.BBS
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- 10: Pcboard-14 PCBOARD.SYS
- 11: DOOR.SYS DOOR.SYS
- 12: Spitfire SFDOORS.DAT
-
-
- BBS_TIME_LEFT: integer; [INF]
-
- This holds the amount of time that the user had left
- when he entered the door. It is loaded from the DROP FILE
- by INITDOORDRIVER. Note that this provides the time left
- when the user ENTERED the door, not the current time left.
- The current amount of time left is calculated by the
- function TIME_LEFT.
-
- BOARD_NAME: String[70]; [INF]
-
- Board_Name hold the current BBS's name that is set in
- the control file.
-
- CHARORIGIN: CharOriginType; [INF]
-
- Returns either LocalChar or RemoteChar depending on
- where the last sread_char was received from. This is
- mainly used in the chat routine to set different
- foreground colors for local and remote users.
-
- COM_PORT: byte; [INF]
-
- Contains the current com port that serial output is
- going to. Should be a zero if in local mode.
-
-
- CURRENT_FORGROUND: byte; [INF]
-
- This variable stores the current foreground color.
-
-
- CURRENT_BACKGROUND: byte; [INF]
-
- This variable stores the current background color.
-
- CURLINENUM: byte; [INF]
-
- This variable is used internally to control the more
- prompt. It is incremented when a line of text is sent out.
- When it reaches 24, a <more> is sent. This is of course,
- providing that morechk:=true.
-
- [INF]
- GRAPHICS: byte;
-
- Graphics specifies a text mode:
-
- 1 : Ascii - General Text
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- 2 : Ascii's Extended Graphics and General Text
- 3 : Ansi Color and Graphics
- 4 : Ansi Color and Graphics and Ansi Music (See
- Section on ANSI.TPU)
-
- LOCAL: boolean; [INF]
-
- This boolean is alway true if in local mode and false
- if in remote mode.
-
-
- MINTIME: byte; [INF]
-
- (check this - don't know)
-
- MORECHK: boolean; [CTL]
-
- This boolean allows you to toggle the more prompts on
- or off. If TRUE, then doordriver will display a "more"
- prompt every 24 lines.
-
-
- NODE_NUM: byte; [INF]
-
- Returns the current Node that the door is running
- under. Defaulted to 1 in a single node system. This
- corresponds directly to the "/Nx" command line parameter.
-
-
- NOTIME: String; [CTL]
-
- (check this)
-
- When the users time limit has been reached this
- string will be displayed then the user will be returned to
- the bbs. This string has a default of "(***TIME LIMIT
- EXCEEDED***)".
-
- STACKED: string; [---]
-
- The Procedure sread and sreadln can have stacked
- commands which is when a user type something in like this:
-
- "m;101;m;102;m;103;m;104"
-
- Notice the ";"'s throughout the example. well this is
- a stacked command. the ";"'s indicate a seperate
- operation. This allows the user to type in multiple
- operations to preform on one line and not have to go
- through each and every prompt of the door. This can be
- very useful when used in combi- nation with the
- Record_Macro command.
-
-
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- STATFORE: byte; [CTL]
-
- The status line foreground.
-
-
- STATBACK: byte; [CTL]
-
- The status line background.
-
-
- STATLINE: boolean; [CTL]
-
- A status line pops while any door is in operation if
- this boolean is set true. The status line contains the
- user name and the program name an the users time left.
-
-
- SYSOP_FIRST_NAME: string[30]; [INF]
-
- Returns the first name of the sysop. The name is
- entered into door-driver through the control file.
-
-
- SYSOP_LAST_NAME: string[30]; [INF]
-
- Returns the last name of the sysop. The name is
- entered into door-driver through the control file.
-
-
- USER_FIRST_NAME: string[30]; [INF]
-
- Returns the first name of the current user of the
- door program. The user's name is determined from whatever
- door information is passed from the bbs software.
-
-
- USER_LAST_NAME: string[30]; [INF]
-
- Returns the last name of the current user of the door
- program. The user's name is determined from whatever door
- information is passed from the bbs software.
-
-
- USER_ACCESS_LEVEL: word; [INF]
-
- Returns the access level of the user. The user's
- access level is determined from whatever door information
- is passed from the bbs software.
-
-
- PROGNAME: String[60]; [CTL]
-
- This option must be set by the programmer, preferably
- in the beginning of the door. It sets the name that will
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- be displayed centered on line 25 of the screen. It is
- simply used for cosmetic purposes.
-
-
- MACRO_STRING: string; [INF/CTL]
-
- The contents of this variable are treated as a
- macro. Whenever the user types a CTRL-N, the string will
- be output. The string may be easily recorded with the
- RECORD_MACRO procedure and displayed with the
- DISPLAY_MACRO procedure.
-
-
- SETFORECHECK: boolean; (default=FALSE) [CTL]
-
- This variable when set to TRUE will cause DOORDRIV
- to filter out repetetive SET_FOREGROUND() calls. If for
- example, you set the foreground to gray, then set it to
- gray again later while the foreground is still gray, the
- second call would be ignored. This can spare the user from
- the slowdown effects of meaningless, repetetive
- SET_FOREGROUND calls.
-
- Referance - Constants
- ---------------------
- VERSION = 'Version 5.00; 9-18-91' (LARGE VERSION)
- = 'Version 5.00S; 9-18-91' (SMALL VERSION)
-
-
- Reference - Procedure Substitutions
- -----------------------------------
- This section is provided to help you in figuring out which
- doordriver routines you should call to replace turbo's
- standard I/O routines.
-
- READKEY:
-
- Readkey is used in many normal programs to get a
- single character. (i.e. CHAR:=readey). This can be
- replaced by SREAD_CHAR(char);.
-
- WRITELN(xxxx); (or WRITE(xxxx))
-
- The writeln procedure is probably the most common and
- numerous change that you will have to make. DoorDriver
- provides the SWRITE/SWRITELN procedures to do the job of
- turbo's write/writeln. In addition, the SOUTPUT file is
- also available. Let's take a look at some examples:
-
- Ex 1
- ----
- Convert "writeln('Scott was here!');"
-
- --> swriteln('Scott was here!');
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
-
- or --> writeln(soutput,'Scott was here!');
-
- Ex 2
- ----
- int is an integer.
- Convert "write(int);"
-
- --> str(int,tempstr); swrite(tempstr);
-
- or --> write(soutput,int);
-
- Ex 3
- ----
- r is a real.
- Covert "writeln(r:2:2);"
-
- ---> str(r:2:2,tempstr); swriteln(tempstr);
-
- or ---> writeln(soutput,r:2:2);
-
- As you can see, the SWRITE/SWRITELN method is easier
- if you are using string type data, but the
- write(SOUTPUT,xxx) method is better for numerical types.
- You can use whichever you like.
-
-
- CLREOL:
-
- You can replace CLREOL with SCLREOL, but please note
- that it will only work when the caller has ANSI
- capabilities. If the caller doesn't have ansi, then he'll
- get a load of garbage.
-
-
- CLRSCR:
-
- CLRSCR can be directly converted to SCLRSCR. This
- works for either ANSI or non-ANSI users.
-
- GOTOXY(x,y):
-
- GOTOXY(x,y) can be converted into SGOTO_XY(x,y), but
- again, this will only work for ansi users.
-
- READLN(string_variable) ---> SREAD(string_variable)
-
- READLN(integer_variable) ---> SREAD_NUM(integer_variable)
-
- READLN(word_variable) ---> SREAD_WORD(word_variable)
-
- READLN(long_variable) ---> SREAD_LONGINT(long_variable)
-
-
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- REFERENCE - Units
- -----------------
-
- I'll briefly list the included units and what they do
- here. Inside UNITINTR.ARJ you will find the interface
- section of all of DoorDriver's units. Some are commented
- and come are not.
-
- *DOORDRIV.TPU
-
- This is the "large" version of doordriver. It's the
- main unit that you need to use.
-
- *DDANSI.TPU
-
- Contains procedures used by doordriver to display
- ANSI on local screen.
-
- *DDFOSSIL.TPU
-
- Contains procedures used by doordriver to interact
- with fossil drivers.
-
- *DDSCOTT.TPU
-
- Miscellanious procedures used by doordriver.
-
- *REWINDOW.TPU
-
- The remote window routines.
-
- *CFGEDITR.TPU
-
- Configurable editor.
-
- *COMIO.TPU
-
- Medium-level COM I/O used by doordriver.
-
- *ASYNC.TPU/SZASYNC.OBJ
-
- Internal COM routines.
-
- *DDOVR.TPU
-
- Overlayable unit containing code that gets
- information out of bbs drop files (i.e. DORINFOx.DEF, etc)
-
- *DDOVR2.TPU
-
- Overlayable unit that contains code to process
- control file.
-
-
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- REFERENCE - CONFIGURABLE ALT KEYS
- ---------------------------------
- Inside doordriver's SREAD_CH routine (which handles
- all input from the user), doordriver processes ALT-KEY
- combinatations (such as ALT-H, ALT-D, etc). These ALT-KEYs
- activate certain features within doordriver.
- Doordriver includes support to "hook" your own
- procedures into a certain ALT key. when the sysop hits
- that key, whatever procedure you define will be executed.
- DoorDriver defines the variable ALTKEYS as an
- array['A'..'Z'] of pointer. These correspond to ALT-A
- through ALT-Z. To link a procedure into these alt keys,
- you must do the following:
-
- 1: Your procedure must be compiled FAR. (i.e. put
- {$F+} and {$F-} around it)
-
- 2: Your procedure must not have any parameters passed
- to it.
-
- 3: You must set the appropriate pointer in ALTKEYS to
- point to your procedure.
-
- For example:
-
- {$F+}
- PROCEDURE Display_Neato_message;
- begin;
- swriteln('Neat-o! The Alt Keys worked!');
- end;
- {$F-}
-
- PROCEDURE Install_Neato;
- begin;
- ALTKEYS['N']:=@Display_Neato_message; {Hook in the proc}
- new(althelp['N']); {create a help
- line}
- althelp^['N']:='Neato!'; {Put in help}
- end;
-
- The procedure INSTALL_NEATO is what installs the
- Display_Neato_Message procedure into the ALT-N key. It
- also does a few other things which may need a little
- explanation:
- The ALTHELP array is an array of ^STRING which
- contains strings which will be displayed in doordrivers
- hot-key help (ALT-H). To create a help string, you have to
- NEW the string, then put the data in. This is not
- absolutely necessary and is only used for cosmetic
- purposes.
- Note: You can also use ALTKEYS to disable or override
- the built in ALT-C (chat), ALT-H (help), and ALT-D (drop
- to dos). For example, ALTKEYS['D']:=Nil would disable drop
- to dos.
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- Now, if you aren't totally confused, I'm real
- surprised.... (grin). The sample program, EDITDEMO sets up
- a configurable editor screen tied to ALT-E.
-
- REFERENCE - ANSI MENU ROUTINES
- ------------------------------
-
- There is an additional TPU file included with the
- doordriver package that includes a user-friendly ANSI-MENU
- handler. The TPU can be called up with the statement "USES
- ANSIMENU". The menu system is accessed by the single
- function:
-
- CHAR:=GetAnsiMenu(menu_definition_template)
-
- The menu-definition-template type is declared within
- the unit. It is identical to the structure below:
-
-
- menutype = record
- header: string[80];
- footer: string[80];
- headercolor,
- footercolor,
- optioncolor,
- desccolor,
- arrowcolor,
- bracketcolor: byte;
- numoptions: byte;
- options: array[1..20] of string[1];
- desc: array[1..20] of string[80];
- end;
-
- The structure is usually defined by your program as
- a constant. The ANSIMENU procedure interprets this
- strucure and uses it to generate a centered menu. The menu
- options may be selected by using the numeric keypad (the 8
- for up and the 2 for down) or by simply typing the the
- letter of the option. A sample door, NEWS.PAS, is included
- to demonstrate the use of the ansimenu unit.
-
- REFERENCE - DDTERM TERMINAL SUPPORT
- -----------------------------------
- DDTERM support killed! It just didn't accomplish a whole
- lot, so I nuked the support. Sorry if anyone was using it,
- but DDTerm never really has amounted to much over here.
-
-
- REFERENCE - SAMPLE DOORS
- ------------------------
-
- I have included two sample door programs, NEWS.PAS and
- BBSLIST.PAS. These two programs are intended to be an
- example of how doordriver can be used.
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- NEWS.PAS is a program that I once wrote as an online
- news reader for USA Today, Movie Review, and a few other
- electronic magazine services. It's a good demonstration of
- how to use the ANSIMENU unit, displayfile, and several of
- DoorDriver's features.
- BBSLIST.PAS is a bbs list maintainer that I wrote a
- while back. Like NEWS, it's a good example of the ANSIMENU
- unit.
- You are free to use code in these programs if you
- like, but I do maintain a copyright on those programs. If
- you do use code, I expect to be "cut in" to whatever
- extent the code was used. For example, if you developed
- BBSLIST.PAS into a little more powerful program and
- started distributing it, I would expect a reasonable
- portion of whatever profits you make.
-
- REFERENCE - IMPORTANT THINGS
- ----------------------------
-
- -> What happens when the user runs out of time, sleep
- -> disconnects, or drops carrier?
-
- Doordriver will HALT. This will cause an immediate
- termination of the door. If your door needs to save any
- data then you should use an EXIT PROCEDURE to save the
- data. For example:
-
- {$F+} procedure myexit; {$F-}
- begin;
- save_our_data;
- exitproc:=exitsave;
- end;
-
- {main program}
- begin;
- InitDoorDriver......
- ExitSave:=Exitproc;
- ExitProc:=@myexit;
- .......
- end.
-
- This will setup MYEXIT so it is run whenever your program
- exits for any reason. This is the best way to trapped
- carrier dropped, out of time, etc.
-
- NOTE #1: The carrier, time left, and sleep disconnect are
- only tested when doordriver is waiting for a keypress
- (i.e. sread_char, sread, etc)
-
- NOTE #2: If checktime=false then DoorDriver will not check
- to see if the user is out of time.
-
- -> How do I use ANSI in my programs?
-
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- You can use ANSI by two methods:
-
- 1) By using the set_foreground, set_background, and
- sclrscr procedures, you can perform some basic ANSI
- functions. DoorDriver will automatically enable these
- fucntions when ANSI is available and disable it when
- not.
-
- 2) If you set ANSION:=TRUE, then you can just SWRITE your
- ansi sequences directly to the screen. When you turn
- ANSION on, it will slow down screen writes, so it is
- advisable to do it only when necessary.
-
- REFERENCE - CARRIER DETECT
- --------------------------
- I am currently writing a door tutorial for Michael
- Crosson's Carrier Detect Journal. Carrier Detect is a
- bi-monthly electronic journal produced by Mike and it is
- quite good.
- The Door Tutorial that I am writing was started in the
- September 1991 issue of CD and will continue as long as
- possible. I have included the september extract of Door
- Tutorial as DDTUT1.DOC.
- Issues of Carrier Detect can be found on my bbs.
-
-
- UPDATE HISTORY
- --------------
-
- Version 2.50:
-
- - First Public release
-
- Version 2.55:
-
- - DoorDriver screen removed and replaced by a 2-line
- message.
-
- - Small problem with SET_FOREGROUND has been fixed.
-
- - The NEWS.DIR file which was left out in previous
- versions has now been included.
-
- Version 2.60:
-
- - Modifications to the ANSIMENU TPU 1) The TPU is now
- called "ANSIMENU" instead of "ANSIMENUSYSTEM". If your
- program was using the ansimenu routines, then the "uses"
- statement must be changed from "uses ansimenusystem" to
- "uses ansimenu". 2) The function name "ANSIMENU" has been
- repleaced by "GETANSIMENU". All occurences of the function
- call <char>:=Ansimenu(<MenuTemplate>) must be changed to
- <char>:=GetAnsiMenu(<MenuTemplate>).
-
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- - DoorDriver title screen/info shrunk even more at users'
- request.
-
- Version 3.00
-
- - Doordriver majorly modified to switch to use of control
- file rather than the /C configuration.
-
- - INITDOORDRIVER(filename) must be called before any of
- doordrivers routines are used.
-
- - SREAD_CHAR was omitted by accident in previous versions
- of the documentation.
-
- - Many new configuration options present in the control
- file including EGA/VGA support.
-
- - Two versions of DoorDriver are now included. DOORDRIV is
- the normal version with all features included while
- DOORDRSM is the SMALL version which leaves out the
- REWINDOW, ALT-KEY, and SYSOP FILTER support. If your
- program begins to run low on memory, you may wish to
- consider using DOORDRSM instead of DOORDRIV.
-
- - Doordirv.INT has been included in the package and
- includes the actual interface section of doordriver.
-
- - CFGEDITR.TPU has been altered. (See edittest.pas for the
- new template record structure)
-
- Version 4.00
-
- - The DDANSI unit went through a major overhaul - it
- should now be faster and more error free.
-
- - DDTERM support included - see the above section for
- information.
-
- - Both TP5.5 and TP6.0 routines included.
-
- Version 5.00
-
- - The actual bbs-information loading code has been moved
- into DDOVR.TPU. This file may be overlaid if you wish to
- conserve memory.
-
- - Control file processing code moved to DDOVR2.TPU.
-
- - SOUTPUT file and DDAssignSOutput(f:text) procedure
- added.
-
- - Added spitfire and Door.sys support.
-
- - Removed DDTERM support.
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
-
- - Changed around the way the configurable ALT-Keys worked.
- If you were using the old method, please see the above
- section on configurable alt keys.
-
- - Removed the REWindow support routines. They weren't
- widely used.
-
- - Documentation upgraded a lot!
-
- Credits
- -------
- SCOTT BAKER (myself)
-
- Author of DOORDRIVER, NEWS, and ANSIMENU.
-
- DERRICK PARKHURST
-
- Repairs to the still malfunctioning ANSI.TPU unit.
- Various work on configurable editor routines.
- Remote windowing and Windowed chat support.
- Sysop filter.
-
- CARL EVANS (of Vervans War Board)
-
- Addition of PC-BOARD 14 support.
-
-
- Copyright
- ---------
-
- The DOORDRIVER routines are copyrighted by Scott
- Baker and Derrick Parkhurst. This copyright includes all
- material contained in this package - TPU modules, PAS
- files, sample door, Documentation, etc. You are permitted
- to USE these routines in your own doors if you wish under
- the following conditions:
-
- 1) Any material which you use from this package
- must not be modified in any way. You can use it, but you
- can't hack into it.
-
- 2) If you intend to use this kit for commercial
- purposed (this includes SHAREWARE), then you must register
- it with the author and pay the required minimum
- registration fee.
-
- 3) You MUST include credit to the authors of
- these routines in your program, documentation, etc.
-
- Suggested Registration Fee
- --------------------------
- I encourage you to send me whatever you feel
- doordriver is worth. The minimum that I will consider is
-
-
-
-
-
-
- DoorDriver Door Kit By Scott M. Baker
-
-
-
-
-
- $25 which I feel doordriver is easily worth that much.
- However, don't feel you are limited to $25. You can
- send as much as you like. If doordriver is a major part of
- your program which you could not do without it, then
- please compensate me for my work. For example, I have a
- few authors who are sending me a percentage of their
- profit off their doors as compensation.
-
- I encourage you to register this package with the
- authors if you find it useful to your programming.
- Registration/donations can be mailed to the following
- address:
-
- Scott M. Baker
- 6431 Tierra Catalina #48
- Tucson, Az 85718
-
- If you wish to contact the authors of this software
- for any reason, they may be reached by the address above,
- or you may log on to our software support bbs:
-
- "The Not-Yet-Named bbs"
-
- Sysop: Scott Baker
- NODE #1: (602) 577-3650 1200-9600 (V.32) 1:300/9
- NODE #2: (602) 577-3419 2400-14400 (USR DUAL) 1:300/29
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-