home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / MISC / GAPQBDR.ZIP / GAPQBDR.TXT < prev    next >
Text File  |  1994-01-05  |  100KB  |  3,080 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.                          GAP Communications Online Software
  29.  
  30.  
  31.  
  32.  
  33.                                        GAPQBDR
  34.  
  35.                  Door Interface Library For Quick Basic Programmers
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.           Copyright (C) 1987-1993 by GAP Development Company.
  43.  
  44.  
  45.           ALL RIGHTS  RESERVED. No part of this manual shall be reproduced,
  46.           stored in  a retrieval  system,  or  transmitted  by  any  means,
  47.           electronic, mechanical,  photocopying, recording,  or  otherwise,
  48.           without written  permission from  GAP Development  Company. While
  49.           every precaution  has been  taken  in  the  preparation  of  this
  50.           manual, GAP  Development Company  assumes no  responsibility  for
  51.           errors or omissions. Neither is any liability assumed for damages
  52.           resulting from the use of the information contained herein.
  53.  
  54.  
  55.           GAPQBDR is  the sole  and exclusive  property of  GAP Development
  56.           Company. It  is licensed  and not  sold  to  the  end  user  with
  57.           restrictions placed upon its use.
  58.  
  59.  
  60.           GAPQBDR is copyrighted by GAP Development Company.
  61.           DESQview is a trademark of Quarterdeck.
  62.           PCBoard is a trademark of Clark Development Corporation.
  63.           WildCat! is copyrighted by Mustang Software.
  64.           DigiBoard is a trademark of DigiBoard Incorporated.
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.                                   TABLE OF CONTENTS
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.                                                                        Page
  79.  
  80.  
  81.  
  82.           DESCRIPTION                                                     5
  83.  
  84.  
  85.  
  86.           GETTING STARTED                                                 6
  87.  
  88.  
  89.  
  90.           COMPILING AND LINKING                                          12
  91.  
  92.  
  93.  
  94.           SYSOP SETUP AND FUNCTIONS                                      13
  95.  
  96.  
  97.  
  98.           GLOBAL VARIABLES                                               17
  99.  
  100.                CONSTANTS                                                 17
  101.                ANSI CONSTANTS                                            17
  102.                DOOR.SYS VARIABLES                                        18
  103.                     INTEGERS                                             18
  104.                     LONGS                                                18
  105.                     STRINGS                                              18
  106.                GAPQBDR GLOBALS                                           19
  107.                     INTEGERS                                             19
  108.                     LONGS                                                19
  109.                     STRINGS                                              19
  110.  
  111.  
  112.           GLOBAL VARIABLES - ALPHABETICALLY By Type                      20
  113.  
  114.                CONSTANTS                                                 20
  115.                INTEGERS                                                  20
  116.                LONGS                                                     21
  117.                STRINGS                                                   21
  118.  
  119.  
  120.  
  121.  
  122.                                        Page 3
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.           FUNCTIONS AND SUBROUTINES - QUICK REFERENCE                    22
  130.  
  131.  
  132.  
  133.           FUNCTIONS AND SUBROUTINES - REFERENCE                          23
  134.  
  135.  
  136.  
  137.           INDEX                                                          51
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.                                        Page 4
  181.  
  182.  
  183.  
  184.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  185.  
  186.  
  187.                                      DESCRIPTION
  188.                                      -----------
  189.  
  190.           GAPQBDR is a professional development kit for Bulletin Board Door
  191.           programmers. It  can also  be used  to facilitate  the writing of
  192.           stand alone  communications programs.  Written entirely  in Quick
  193.           Basic (with  a little help from some Assembler support routines),
  194.           it is  fast, reliable,  easy to use, and easy to incorporate into
  195.           the serious programmer's source code.
  196.  
  197.           Features Include :
  198.  
  199.                o    Interfaces with GAP Communications, PCBoard, WildCat or
  200.                     any BBS capable of writing a DOOR.SYS file.
  201.                o    Complete interrupt driven communications which does not
  202.                     require a DTR patched BRUNxx.EXE run time library.
  203.                o    Supports the  DigiBoard COM/Xi  Intelligent Serial Port
  204.                     Boards.
  205.                o    Supports the FIFO buffers of the 16550 UART.
  206.                o    Speeds to 57,600 bps.
  207.                o    Supports all communications ports.
  208.                o    Does not require watchdog or CTTY.
  209.                o    Uses ANSI colors instead of Basic's color statements so
  210.                     the sysop sees what the caller sees.
  211.                o    Maintains a scoreboard of the top 10 players.
  212.                o    High speed text file display.
  213.                o    Supports ANSI  color  and  ASCII  text  files  with  no
  214.                     programming  effort   other  than   to  make  a  single
  215.                     subroutine call.
  216.                o    Easy to use Random Number Generator.
  217.                o    Informative Status Line display.
  218.                o    Monitors keyboard activity and caller time remaining.
  219.                o    Easy interfacing to BBS system and user files.
  220.                o    Sysop chat with full word wrapping.
  221.                o    Allows the sysop to shell to DOS.
  222.                o    "Remembers"  the  default  drive  and  directory  which
  223.                     prevents file access errors.
  224.                o    Credits caller  with time spent chatting or while sysop
  225.                     is in a DOS shell.
  226.                o    Sysop can  twit caller  without caller ever knowing the
  227.                     sysop is watching.
  228.                o    Caller time can be increased or decreased.
  229.                o    Time calculations  are not  dependent on  the  "seconds
  230.                     since midnight"  and  are  thus  unsusceptible  to  the
  231.                     midnight roll over.
  232.                o    Allows the sysop to "force" a file display.
  233.                o    Automatic detection of multi-user system.
  234.                o    Extremely easy interfacing to door programs.
  235.  
  236.  
  237.  
  238.                                        Page 5
  239.  
  240.  
  241.  
  242.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  243.  
  244.  
  245.                                    GETTING STARTED
  246.                                    ---------------
  247.  
  248.           GAPQBDR is distributed in archived format. The contents of the
  249.           archive should be as follows:
  250.  
  251.                QBORDER.FRM    -    Registration Info and Order Form.
  252.                GAPQBDR.TXT    -    This documentation.
  253.                GAPQBDR.QLB    -    Library routines for QB 4.5 environment.
  254.                GAPQBDR.LIB    -    Library routines for QB 4.5.
  255.                GAPQBDR7.LIB   -    Library routines for Basic 7.x.
  256.                GAPQBDR.BI     -    Door Interface include file.
  257.                GAPQBERR.BI    -    Error Handling routines.
  258.                DOOR.ZIP       -    Sample program illustrating many of
  259.                                    the features of GAPQBDR.
  260.                READ.ME        -    Any pertinent information which you
  261.                                    should read.
  262.                LIBLIB         -    Library Response File for QB 4.5.
  263.                LIBLIB7        -    Library Response File for Basic 7.x
  264.                QLBLIB         -    Linker Response File for QB 4.5
  265.                QLBLIB7        -    Linker Response File for Basic 7.x
  266.                MAKE7QLB       -    Batch File to build Basic 7.x QLB file.
  267.                MAKEBAS7.BAT   -    Batch File to build Basic 7.x LIB file.
  268.                MAKESRC.BAT    -    Batch File to build 4.5 LIB & QLB files.
  269.  
  270.  
  271.           If you licensed the source code to GAPQBDR, the following files
  272.           are included in an archive called GAPQBSRC:
  273.  
  274.                ACCESS.BAS     -    Basic source for file access.
  275.                CARRIER.BAS    -    Basic source for no carrier routines.
  276.                DOCHAT.BAS     -    Basic source for sysop chat.
  277.                GAPDOS.BAS     -    Basic source to read/write GAPDOS.DAT.
  278.                GAPQBDR.BAS    -    Basic source for main GAPQBDR functions.
  279.                GAPUSER.BAS    -    Basic source to read/write GAP USERS.
  280.                GETRAND.BAS    -    Basic source for random number routines.
  281.                INITDOOR.BAS   -    Basic source for door initialization.
  282.                LEAVE.BAS      -    Basic source for closing the door.
  283.                PCBSYS.BAS     -    Basic source to read/write PCBOARD.SYS.
  284.                PCBUSER.BAS    -    Basic source to read/write PCB USERS.
  285.                PUTCHAR.BAS    -    Basic source for character output.
  286.                SCOREBRD.BAS   -    Basic source for scoreboard routines.
  287.                SHOWFILE.BAS   -    Basic source for file display.
  288.                STATUS.BAS     -    Basic source for the status line.
  289.                SYSPAGE.BAS    -    Basic source for page sysop routines.
  290.                TIMCRED.BAS    -    Basic source for time credits.
  291.                WAIT.BAS       -    Basic source for time pauses.
  292.                ATSAY.ASM      -    Assembler source for screen positioning.
  293.  
  294.  
  295.  
  296.                                        Page 6
  297.  
  298.  
  299.  
  300.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  301.  
  302.  
  303.                CLS.ASM        -    Assembler source for clear screen.
  304.                CTRLC.ASM      -    Assembler source for CTRL-C handler.
  305.                CURSOR.ASM     -    Assembler code for cursor positioning.
  306.                DOSPRINT.ASM   -    Assembler source for BIOS string output.
  307.                GAPPUTS.ASM    -    Assembler source for string output.
  308.                GETKEYC.ASM    -    Assembler source for keyboard input.
  309.                KEYBRD.ASM     -    Assembler source for keyboard function.
  310.                GAPQBSRC.BI    -    Global declarations for source files.
  311.                LIBLIB         -    Library Response File for QB 4.5.
  312.                LIBLIB7        -    Library Response File for Basic 7.x
  313.                QLBLIB         -    Linker Response File for QB 4.5
  314.                QLBLIB7        -    Linker Response File for Basic 7.x
  315.                MAKE7QLB       -    Batch File to build Basic 7.x QLB file.
  316.                MAKEBAS7.BAT   -    Batch File to build Basic 7.x LIB file.
  317.                MAKESRC.BAT    -    Batch File to build 4.5 LIB & QLB files.
  318.                SRCREAD.ME     -    Any pertinent information which you
  319.                                    should read.
  320.  
  321.           In addition,  all the  object modules  for  the  private  GAPQBDR
  322.           functions are  provided so that you may create the quick library.
  323.           You will  also need  the file QB.BI which is distributed with the
  324.           Microsoft QB  disks. A DTR patched BRUN45.EXE is not needed since
  325.           GAPQBDR uses its own communications routines.
  326.  
  327.           Place the  files in  your QB work directory. Make sure that QB.BI
  328.           is accessible  to the compiler. The source files should be placed
  329.           in a directory called SOURCE (off of your QB directory).
  330.  
  331.           Throughout this  document, the terms function, routine, procedure
  332.           and subroutine  are  used  interchangeably.  However,  pay  close
  333.           attention to the return value and the examples. In QB, a function
  334.           returns a value, where as a sub program does not.
  335.  
  336.           If you  use an external editor to write your programs, the editor
  337.           must allow  control characters  to be  entered and displayed. The
  338.           ANSI constants  are initialized by literal characters and if your
  339.           editor removes  the ESC  character from  the constants, your ANSI
  340.           displays will be quite messy.
  341.  
  342.           If you  are using  the QB  environment, you will need to load the
  343.           door module  along with  your source  program. To do so, type the
  344.           following :
  345.  
  346.                QB door /L GAPQBDR
  347.  
  348.                (where door is the name of your basic source program)
  349.  
  350.  
  351.  
  352.  
  353.  
  354.                                        Page 7
  355.  
  356.  
  357.  
  358.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  359.  
  360.  
  361.           If you  fail to  load the  quick library along with your program,
  362.           you will  receive a  great many  "subprogram not  defined" errors
  363.           when you try to compile or run your program.
  364.  
  365.           We are a firm supporter of declaring all variables prior to their
  366.           use. Not  only does  it make  your programs  easier to  debug, it
  367.           makes them  easier   to read   and  follow. We recommend that you
  368.           follow our guidelines and declare all of your global variables at
  369.           the beginning of your program, after including GAPQBDR.BI.
  370.  
  371.           At the  very beginning  of your  program, you  must  include  the
  372.           GAPQBDR.BI file. Without this file, nothing will work. It must be
  373.           the first directive in your source file. To include the file, you
  374.           type the following at the beginning of your source program:
  375.  
  376.                '$INCLUDE: 'GAPQBDR.BI'
  377.  
  378.           Do not under any circumstances use the DEF type statements (I.E.,
  379.           DEFINT A-Z).  This is  the lazy  persons method  of  programming.
  380.           Typedef your variables by either declaring them ahead of time, or
  381.           by appending the type after the name (i.e., A$, I%).
  382.  
  383.           If you  need to use your own On Error routines, you should modify
  384.           the supplied  error handler  rather  than  simply  ignore  it  or
  385.           replace it. If you subsequently change the Error Trap address, it
  386.           is your responsibility to deal with any run time errors.
  387.  
  388.           After declaring any variables and functions, you must include the
  389.           error handling file. The error handler is included in your source
  390.           module so  that it  can be globally accessible by all routines in
  391.           the GAPQBDR  library. To  include the  file, type  the  following
  392.           immediately AFTER  declaring your global variables and BEFORE any
  393.           executable statements:
  394.  
  395.                '$INCLUDE: 'GAPQBERR.BI'
  396.  
  397.           It is  important that  the error handling file be inserted at the
  398.           proper place in your program. The file may not be included before
  399.           your variable  declarations and it MUST be included prior to your
  400.           first executable  statement. Please see the example program for a
  401.           sample of  how to  include this  file. Remember  that a  variable
  402.           assignment is not a variable declaration but an actual executable
  403.           statement.
  404.  
  405.           You are  now ready  to begin your program. You may now initialize
  406.           your variables and start your program.
  407.  
  408.  
  409.  
  410.  
  411.  
  412.                                        Page 8
  413.  
  414.  
  415.  
  416.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  417.  
  418.  
  419.           The first  thing that must be done prior to using any of the door
  420.           functions, is  to initialize  GAPQBDR itself.  This  is  done  by
  421.           making a  call to read.cnf. Read.cnf opens the configuration file
  422.           (the name  of which  you pass as a parameter) and reads the first
  423.           eight lines  of the  file. If  the configuration  file cannot  be
  424.           found, the program will end. The format of the configuration file
  425.           is as follows:
  426.  
  427.           -----------------------------------------
  428.           C:\GAP
  429.           The Crow's Nest BBS
  430.           4
  431.           03F8
  432.           STANDARD
  433.           D000
  434.           320
  435.           4
  436.  
  437.  
  438.           The first  line of  the file  is the  path  to  the  BBS  default
  439.           directory. The second line is the name of the BBS. The third line
  440.           is the Port IRQ and the 4th line is the Port Base Address. If the
  441.           sysop running  your program  has his  BBS configured  to use  Com
  442.           Ports other  than 1  or 2,  he would  then enter the IRQ and Base
  443.           address for  his Com  Port on  lines 3 and 4. GAPQBDR derives the
  444.           Port Number from the DOOR.SYS file.
  445.  
  446.           Lines five through eight are for the Intelligent DigiBoard multi-
  447.           port Communications  Card. The  DigiBoard  routines  specifically
  448.           support the  COM/Xi series.  All four of these lines are required
  449.           even if  your end  users are  using the  Standard Interface. Line
  450.           five is  the Communications Port Interface. It must be one of the
  451.           following:
  452.  
  453.                     STANDARD    DIGIBOARD   INT14/EBIOS
  454.  
  455.           The Standard  interface is the one that will normally be used. If
  456.           an end  user is  using a  DigiBoard then  either the DigiBoard or
  457.           Int14/EBIOS interface  may be  selected. Most sysops will use the
  458.           Int14/EBIOS interface.  All  input/output  to  the  DigiBoard  is
  459.           performed via  Interrupt 14  calls and a Device Driver (available
  460.           from DigiBoard) handles the interface between the program and the
  461.           board. The  DigiBoard interface  uses Direct Programming. GAPQBDR
  462.           talks to the board directly without the need for a Device Driver.
  463.           In order  to use  this interface,  a program  called RESETDIG.EXE
  464.           must be used in the AUTOEXEC.BAT file to reset the DigiBoard once
  465.           when the  computer is first booted. If the end user does not have
  466.  
  467.  
  468.  
  469.  
  470.                                        Page 9
  471.  
  472.  
  473.  
  474.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  475.  
  476.  
  477.           this program (it is a part of the GAP Communications BBS package)
  478.           then the Int14/EBIOS interface must be used.
  479.  
  480.           If the  Interface is  other than STANDARD, then lines 6 through 8
  481.           will be  ignored. If  the Interface  is INT14/EBIOS, then lines 6
  482.           and 7 will be ignored.
  483.  
  484.           Line 6  is the  DigiBoard Memory Window, or the address the board
  485.           uses as  a  communications  area  between  itself  and  the  Host
  486.           Computer. This  line is  used only  if the  Interface is  set  to
  487.           DIGIBOARD. It  can be  set to  0 if  the Interface is STANDARD or
  488.           INT14/EBIOS.
  489.  
  490.           Line 7  is the DigiBoard I/O Port Address. This line is used only
  491.           if the  Interface is  set to  DIGIBOARD  and  can  be  set  to  0
  492.           otherwise.
  493.  
  494.           Line 8 is the DigiBoard Channel Number. This line is required for
  495.           the DIGIBOARD  and INT14/EBIOS  Interfaces. It  is normally 1 - 8
  496.           for the  DIGIBOARD Interface  and 4  -  11  for  the  INT14/EBIOS
  497.           Interface. The  Channel Number  is similar  to a  Port Number. It
  498.           tells the  program which of the DigiBoard Communications ports to
  499.           use.
  500.  
  501.  
  502.           The configuration  file is  usually given  a name  similar to the
  503.           name of  your door  program, with  a CNF extension. Read.cnf will
  504.           leave this  file open for your use. If you have any configuration
  505.           options of  your own,  you may  place them in this file beginning
  506.           with line  9. Do  not read your configuration options until after
  507.           making a  call to  init.door (which should be the second function
  508.           call in  your program).  Upon return from init.door, you are free
  509.           to read  your configuration  options (if  any). At this time, you
  510.           should close the configuration file. Its file number is #1.
  511.  
  512.           Normally, your  program is  invoked with a command line parameter
  513.           giving the name of the configuration file to use:
  514.  
  515.                (I.E., DOOR DOOR.CNF).
  516.  
  517.           You would  use the COMMAND$ function to extract the configuration
  518.           parameter and  then pass  this parameter  on  to  read.cnf.  This
  519.           allows the  end user  to use a single program (your program) with
  520.           multiple configuration  files. This is especially important under
  521.           multi-user systems where separate configuration files are needed.
  522.  
  523.           The configuration  file is  opened as  a sequential file so using
  524.           Line Input #1 would be appropriate for reading any data.
  525.  
  526.  
  527.  
  528.                                        Page 10
  529.  
  530.  
  531.  
  532.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  533.  
  534.  
  535.  
  536.           If there  were no errors, read.cnf will return. You must now make
  537.           a call  to init.door. Init.door uses the information derived from
  538.           line 1  of the  configuration file  to open and read DOOR.SYS. In
  539.           addition, init.door  opens the  communications port (if  a remote
  540.           user is  on), initializes  some global variables, initializes the
  541.           random  number  generator,  and  installs  the  CTRL-C  interrupt
  542.           handler. If there is an error, init.door will not return. Instead
  543.           it will end the program.
  544.  
  545.           That is  basically all  you have  to do to initialize the GAPQBDR
  546.           module. When  your  program  ends,  you  should  clean  house  if
  547.           necessary and  call leave.  Leave closes  the communications port
  548.           and any  open files,  sends a sign off message to the caller, and
  549.           then exits to DOS.
  550.  
  551.           Things to remember:
  552.  
  553.             To get  the ball  rolling,  include  GAPQBDR.BI  as  the  first
  554.             directive in your source program.
  555.  
  556.             Include GAPQBERR.BI  after declaring  any global  variables and
  557.             prior to your first executable statement.
  558.  
  559.             To initialize  the door,  call read.cnf  with the  name of your
  560.             programs configuration file. Call init.door.
  561.  
  562.             Call leave when your program is finished.
  563.  
  564.             With the  exception of  file #1  which  is  used  to  read  the
  565.             configuration file  and which  YOU should  close, there  are no
  566.             other files  left open.  GAPQBDR uses good programming practice
  567.             by asking  Basic for  a file  number rather  than telling Basic
  568.             which number to use.
  569.  
  570.             All input  and output  should be  performed through the GAPQBDR
  571.             functions. The  sample program  gives good  examples on  how to
  572.             accomplish this.
  573.  
  574.             To determine if the BBS is a single or multi user system, check
  575.             the variable  called node. If it is anything other than 0, then
  576.             the BBS is multi-user and you should read/write your data files
  577.             with sharing attributes.
  578.  
  579.  
  580.           To test  your program,  you will  need a  DOOR.SYS file  that was
  581.           written for  local exit.  Of course,  you can  always modify  any
  582.           DOOR.SYS file and change the first line so that it reads COM0:. A
  583.  
  584.  
  585.  
  586.                                        Page 11
  587.  
  588.  
  589.  
  590.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  591.  
  592.  
  593.           complete set  of sample  files  are  provided  for  testing  your
  594.           program under  local mode. Experience has shown that although the
  595.           QB environment  editor makes for a cumbersome programmers editor,
  596.           testing programs  inside QB  is  perhaps  the  easiest  and  most
  597.           efficient way  to test. The environment is wonderful for catching
  598.           syntax errors  and even more fantastic at allowing the programmer
  599.           to correct those errors and continue to run the program.
  600.  
  601.           Do not  use any  of the  Basic input/output or screen positioning
  602.           functions. If  you do,  you will  find that  if  you  attempt  to
  603.           "print" a  string, the string will not appear on the screen where
  604.           you might  think it  should. This  is because Basic maintains its
  605.           own  cursor   location,  and   GAPQBDR  does   NOT  update   this
  606.           information.  All   input/output  should  take  place  using  the
  607.           functions provided  by GAPQBDR.  Not only are they more efficient
  608.           than Basics, they are faster as well!
  609.  
  610.  
  611.                                 COMPILING AND LINKING
  612.                                 ---------------------
  613.  
  614.           GAPQBDR has already been compiled with the necessary compile time
  615.           switches.
  616.  
  617.           To compile  your programs,  use whatever switches are required by
  618.           your program  along with the /x (on error) switch which is needed
  619.           for the error handling routine. Use the following commands:
  620.  
  621.                bc /x doorname;
  622.                link doorname,,NUL.MAP,+gapqbdr
  623.  
  624.                Where doorname is the name of your program.
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.                                        Page 12
  645.  
  646.  
  647.  
  648.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  649.  
  650.  
  651.                               SYSOP SETUP AND FUNCTIONS
  652.                               -------------------------
  653.  
  654.           These sysop  setup and  function descriptions should be placed in
  655.           the documentation  of your  door program.  You should,  of course
  656.           change the setup information to fit your particular needs.
  657.  
  658.  
  659.           Door programs written with the GAPQBDR Door Interface Module will
  660.           run on any BBS System that supports DOOR.SYS.
  661.  
  662.           To configure the door for a particular BBS setup, a configuration
  663.           file must  be used.  At the  very minimum, this file will contain
  664.           eight lines.  It may  contain more  than eight,  depending upon a
  665.           particular doors configuration requirements. The name of the file
  666.           is usually  the same  as that  of the door program but with a CNF
  667.           extension. The minimum requirements for the file are as follows:
  668.  
  669.                     C:\GAP
  670.                     The Crow's Nest BBS
  671.                     4
  672.                     03F8
  673.                     STANDARD
  674.                     D000
  675.                     320
  676.                     4
  677.  
  678.  
  679.           The first  line of  the file  is the  path  to  the  BBS  default
  680.           directory. The second line is the name of the BBS. The third line
  681.           is the Port IRQ and the 4th line is the Port Base Address. If you
  682.           have your  BBS configured to use Com Ports other than 1 or 2, you
  683.           would enter the IRQ and Base address for your Com Port on lines 3
  684.           and 4. GAPQBDR derives the Port Number from the DOOR.SYS file.
  685.  
  686.           Lines five through eight are for the Intelligent DigiBoard multi-
  687.           port Communications  Card. The  DigiBoard  routines  specifically
  688.           support the  COM/Xi series.  All four of these lines are required
  689.           even if  you are  using the  Standard Interface. Line five is the
  690.           Communications Port Interface. It must be one of the following:
  691.  
  692.                     STANDARD    DIGIBOARD   INT14/EBIOS
  693.  
  694.           The Standard  interface is the one that will normally be used. If
  695.           you  are   using  a   DigiBoard  then  either  the  DigiBoard  or
  696.           Int14/EBIOS interface  may be  selected. Most sysops will use the
  697.           Int14/EBIOS interface.  All  input/output  to  the  DigiBoard  is
  698.           performed via  Interrupt 14  calls and a Device Driver (available
  699.  
  700.  
  701.  
  702.                                        Page 13
  703.  
  704.  
  705.  
  706.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  707.  
  708.  
  709.           from DigiBoard) handles the interface between the program and the
  710.           board. The  DigiBoard interface  uses Direct Programming. GAPQBDR
  711.           talks to the board directly without the need for a Device Driver.
  712.           In order  to use  this interface,  a program  called RESETDIG.EXE
  713.           must be used in the AUTOEXEC.BAT file to reset the DigiBoard once
  714.           when the  computer is  first booted.  If you  do  not  have  this
  715.           program (it is a part of the GAP Communications BBS package) then
  716.           the Int14/EBIOS interface must be used.
  717.  
  718.           If the  Interface is  other than STANDARD, then lines 6 through 8
  719.           will be  ignored. If  the Interface  is INT14/EBIOS, then lines 6
  720.           and 7 will be ignored.
  721.  
  722.           Line 6  is the  DigiBoard Memory Window, or the address the board
  723.           uses as  a  communications  area  between  itself  and  the  Host
  724.           Computer. This  line is  used only  if the  Interface is  set  to
  725.           DIGIBOARD. It  can be  set to  0 if  the Interface is STANDARD or
  726.           INT14/EBIOS.
  727.  
  728.           Line 7  is the DigiBoard I/O Port Address. This line is used only
  729.           if the  Interface is  set to  DIGIBOARD  and  can  be  set  to  0
  730.           otherwise.
  731.  
  732.           Line 8 is the DigiBoard Channel Number. This line is required for
  733.           the DIGIBOARD  and INT14/EBIOS  Interfaces. It  is normally 1 - 8
  734.           for the  DIGIBOARD Interface  and 4  -  11  for  the  INT14/EBIOS
  735.           Interface. The  Channel Number  is similar  to a  Port Number. It
  736.           tells the  program which of the DigiBoard Communications ports to
  737.           use.
  738.  
  739.  
  740.           GAPQBDR will  obtain the  sysop's name from the BBS configuration
  741.           file.
  742.  
  743.           You must  now create  a batch file to invoke the door. This batch
  744.           file is  placed in  your BBS default directory. Such a batch file
  745.           might look like this:
  746.  
  747.                @echo off
  748.                cd \gap\doors\tl
  749.                tl tl.cfg
  750.                cd \gap
  751.  
  752.           As you  can see, the door is invoked by passing the configuration
  753.           file name as a parameter.
  754.  
  755.  
  756.  
  757.  
  758.  
  759.  
  760.                                        Page 14
  761.  
  762.  
  763.  
  764.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  765.  
  766.  
  767.           You will  also need  to modify your doors menu files and the data
  768.           file that  tells the  BBS what  your doors  are and  the security
  769.           level needed to access them. For GAP, these are respectively:
  770.  
  771.                DOORM
  772.                DOORMG
  773.                DOORS.DAT
  774.  
  775.           Please refer  to your  BBS documentation  for details on  setting
  776.           these files up.
  777.  
  778.           If you  are running  multi-nodes, simply  create a  separate door
  779.           configuration file  for each node, and number them. For instance,
  780.           for a  3 node  system, you might have the following configuration
  781.           files:
  782.  
  783.                TL1.CFG
  784.                TL2.CFG
  785.                TL3.CFG
  786.  
  787.           The only difference between the three would be the 1st line which
  788.           points to the default directory for the particular node.
  789.  
  790.           The following sysop functions are available while awaiting
  791.           keyboard input :
  792.  
  793.                    F5     -  Shell to DOS.
  794.                    F8     -  Twit user and return to BBS.
  795.                   F10     -  Initiate chat with user.
  796.                   CF10    -  Answer user page bell.
  797.                   Home    -  Main user stats.
  798.                   End     -  Displays sysop keys available.
  799.                   PgDn    -  Secondary user stats.
  800.                 Up Arrow  -  Increase user's time remaining.
  801.                 Dn Arrow  -  Decrease user's time remaining.
  802.  
  803.  
  804.           One of  the nicer  features about using the TWIT key, is the user
  805.           is not  told that  "the sysop  wants them  to return to the BBS".
  806.           Instead, a very plain and simple message of "returning you to the
  807.           BBS" is displayed. This way, the user is given no indication that
  808.           the sysop is hovering about.
  809.  
  810.           When using  the F5  shell to  DOS key,  to  return  to  the  door
  811.           program, simply  type EXIT  at the  DOS command prompt. It is not
  812.           necessary to  change directories  back  to  the  door  directory.
  813.           GAPQBDR is  smart enough  to know  which drive  and directory the
  814.  
  815.  
  816.  
  817.  
  818.                                        Page 15
  819.  
  820.  
  821.  
  822.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  823.  
  824.  
  825.           door program  is in and  will reset the defaults upon return from
  826.           DOS.
  827.  
  828.           The Up  and Down Arrow keys increase and decrease the user's time
  829.           respectively by  5 minutes for each press of the key. There is no
  830.           indication of  what is  occurring (except  by the fact the user's
  831.           time remaining  will change), so the sysop should try not to have
  832.           a lead  finger. The  increase or decrease is effective only while
  833.           the user is in the door. Since we are firm believers that the BBS
  834.           system files  belong to  the BBS and should not be altered by any
  835.           door program,  updating the  BBS system file is NOT automatic. If
  836.           you wish that any decrease or increase in the user's time be made
  837.           permanent,  you  may,  after  initializing  the  door,  call  the
  838.           function that  opens the  system file.  Keep track  of  any  time
  839.           credits  during  the  door  programs  operation,  then  call  the
  840.           function that  updates the BBS system file. Examples of how to do
  841.           this are included in the sample program.
  842.  
  843.  
  844.  
  845.  
  846.  
  847.  
  848.  
  849.  
  850.  
  851.  
  852.  
  853.  
  854.  
  855.  
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.                                        Page 16
  877.  
  878.  
  879.  
  880.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  881.  
  882.  
  883.                                   GLOBAL VARIABLES
  884.                                   ----------------
  885.  
  886.           All global variables (except for constants) are defined as COMMON
  887.           SHARED. They  are included  in your program by including the file
  888.           GAPQBDR.BI at the top of your source file.
  889.  
  890.  
  891.           CONSTANTS
  892.           ---------
  893.  
  894.           Constants are defined as - CONST name = constant value.
  895.  
  896.           NO                  Defined as 0
  897.           YES                 Defined as 1
  898.  
  899.           ANSI CONSTANTS
  900.           --------------
  901.  
  902.           ANSI constants contain the actual ANSI color sequences.
  903.  
  904.           BLACK               ANSI codes for Black
  905.           BLUE                ANSI codes for Blue
  906.           BROWN               ANSI codes for Brown
  907.           CYAN                ANSI codes for Cyan
  908.           GREEN               ANSI codes for Green
  909.           MAGENTA             ANSI codes for Magenta
  910.           RED                 ANSI codes for Red
  911.           WHITE               ANSI codes for White
  912.  
  913.           BBLACK              ANSI codes for Grey
  914.           BBLUE               ANSI codes for bright Blue
  915.           BCYAN               ANSI codes for bright Cyan
  916.           BGREEN              ANSI codes for bright Green
  917.           BMAGENTA            ANSI codes for bright Magenta
  918.           BRED                ANSI codes for bright Red
  919.           BWHITE              ANSI codes for bright White
  920.           YELLOW              ANSI codes for Yellow
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.  
  932.  
  933.  
  934.                                        Page 17
  935.  
  936.  
  937.  
  938.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  939.  
  940.  
  941.           DOOR.SYS VARIABLES
  942.           ------------------
  943.  
  944.           DOOR.SYS  variables   are  initialized  while  reading  the  Door
  945.           Interface Module,  DOOR.SYS. These  variables are  available from
  946.           door start  up to  door end.  The DOOR.SYS variables are the door
  947.           programmer's connection to the BBS.
  948.  
  949.  
  950.           INTEGERS
  951.           --------
  952.  
  953.           alarm               Caller Alarm. 0 = off, 1 = on
  954.           bell                Page Bell. 0 = off, 1 = on
  955.           c.olor              Color toggle. 0 = no color, 1 = color ok
  956.           expert              Expert mode. 0 = non-expert, 1 = expert
  957.           l.ocal              0 = remote user, 1 = local
  958.           level               User's security level
  959.           minsleft            Number of minutes user has left at door start
  960.           node                Node number. 0 = single user
  961.           page                User's page length
  962.           parity              Should actually be data bits and is not used
  963.           port                Communications port in use
  964.           printer             Printer Toggle. 0 = off, 1 = on
  965.           s.creen             Screen display. 0 = off, 1 = on
  966.  
  967.           LONGS
  968.           -----
  969.  
  970.           baud                DTE rate to open COMM port at
  971.           downbytes           Total bytes downloaded
  972.           downloads           Number of downloads
  973.           maxbytes            Maximum number of bytes allowed to download
  974.           recnum              User's record number in USER file
  975.           timeson             Number of times user has been on
  976.           upbytes             Total bytes uploaded
  977.           uploads             Number of uploads
  978.           userbaud            BPS rate of the remote user
  979.  
  980.           STRINGS
  981.           -------
  982.  
  983.           bphone              User's business or data phone number
  984.           city                User's home town
  985.           first               User's first name
  986.           hphone              User's home phone number
  987.           last                User's last name
  988.           lastdate            Last date user was on
  989.  
  990.  
  991.  
  992.                                        Page 18
  993.  
  994.  
  995.  
  996.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  997.  
  998.  
  999.           password            User's password. PASSWORD if sysop is on
  1000.           subscrip            Date user's subscription expires
  1001.           username            User's full name
  1002.  
  1003.  
  1004.           GAPQBDR GLOBALS
  1005.           --------------
  1006.  
  1007.           These variables are the documented, global variables (initialized
  1008.           and used  by GAPQBDR).  They may  be modified  and/or used at the
  1009.           programmer's discretion.
  1010.  
  1011.  
  1012.           INTEGERS
  1013.           ---------
  1014.  
  1015.           noup                If set to 1, get.string will not uppercase
  1016.           timecredit          Time credits for user (in minutes)
  1017.           timeleft            Time user has left (in minutes)
  1018.  
  1019.           LONGS
  1020.           -----
  1021.  
  1022.           starttime           Time the user logged on (in seconds)
  1023.           temptime            For calculating keyboard time out
  1024.           timenow             Time it is now  (in seconds)
  1025.  
  1026.           STRINGS
  1027.           -------
  1028.  
  1029.           anystring1          Global garbage collector
  1030.           bbs.dir             Path to BBS default dir
  1031.           birthday            Callers birth date
  1032.           board.name          Name of the BBS
  1033.           gendir              Path to the gen directory
  1034.           maindir             Path to the main directory
  1035.           sysname             Sysop's name
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.                                        Page 19
  1051.  
  1052.  
  1053.  
  1054.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1055.  
  1056.  
  1057.                       GLOBAL VARIABLES - ALPHABETICALLY By Type
  1058.                       -----------------------------------------
  1059.  
  1060.           CONSTANTS
  1061.           ---------
  1062.  
  1063.           BBLACK              ANSI codes for Grey
  1064.           BBLUE               ANSI codes for bright Blue
  1065.           BCYAN               ANSI codes for bright Cyan
  1066.           BGREEN              ANSI codes for bright Green
  1067.           BLACK               ANSI codes for Black
  1068.           BLUE                ANSI codes for Blue
  1069.           BMAGENTA            ANSI codes for bright Magenta
  1070.           BRED                ANSI codes for bright Red
  1071.           BROWN               ANSI codes for Brown
  1072.           BWHITE              ANSI codes for bright White
  1073.           CYAN                ANSI codes for Cyan
  1074.           GREEN               ANSI codes for Green
  1075.           MAGENTA             ANSI codes for Magenta
  1076.           NO                  Defined as 0
  1077.           RED                 ANSI codes for Red
  1078.           WHITE               ANSI codes for White
  1079.           YELLOW              ANSI codes for Yellow
  1080.           YES                 Defined as 1
  1081.  
  1082.           INTEGERS
  1083.           --------
  1084.  
  1085.           alarm               Caller Alarm. 0 = off, 1 = on
  1086.           bell                Page Bell. 0 = off, 1 = on
  1087.           c.olor              Color toggle. 0 = no color, 1 = color ok
  1088.           expert              Expert mode. 0 = non-expert, 1 = expert
  1089.           l.ocal              0 = remote user, 1 = local
  1090.           level               User's security level
  1091.           minsleft            Number of minutes user has left at door start
  1092.           node                Node number. 0 = single user
  1093.           noup                1 = get.string will not uppercase
  1094.           page                User's page length
  1095.           parity              Should actually be data bits and is not used
  1096.           port                Communications port in use
  1097.           printer             Printer Toggle. 0 = off, 1 = on
  1098.           s.creen             Screen display. 0 = off, 1 = on
  1099.           timecredit          Time credits for user (in minutes)
  1100.           timeleft            Time user has left (in minutes)
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.                                        Page 20
  1109.  
  1110.  
  1111.  
  1112.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1113.  
  1114.  
  1115.           LONGS
  1116.           -----
  1117.  
  1118.           baud                DTE rate to open COMM port at
  1119.           downbytes           Total bytes downloaded
  1120.           downloads           Number of downloads
  1121.           maxbytes            Maximum number of bytes allowed to download
  1122.           recnum              User's record number in USER file
  1123.           starttime           Time the user logged on (in seconds)
  1124.           temptime            For calculating keyboard time out
  1125.           timenow             Time it is now  (in seconds)
  1126.           timeson             Number of times user has been on
  1127.           upbytes             Total bytes uploaded
  1128.           uploads             Number of uploads
  1129.           userbaud            BPS rate of the remote user
  1130.  
  1131.           STRINGS
  1132.           -------
  1133.  
  1134.           anystring1          garbage collector
  1135.           bbs.dir             Path to BBS default dir
  1136.           birthday            Callers birth date
  1137.           board.name          Name of the BBS
  1138.           bphone              User's business or data phone number
  1139.           city                User's home town
  1140.           first               User's first name
  1141.           gendir              Path to the gen directory
  1142.           hphone              User's home phone number
  1143.           last                User's last name
  1144.           lastdate            Last date user was on
  1145.           maindir             Path to the main directory
  1146.           password            User's password. PASSWORD if sysop is on
  1147.           subscrip            Date user's subscription expires
  1148.           sysname             Sysop's name
  1149.           username            User's full name
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.                                        Page 21
  1167.  
  1168.  
  1169.  
  1170.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1171.  
  1172.  
  1173.                      FUNCTIONS AND SUBROUTINES - QUICK REFERENCE
  1174.                      -------------------------------------------
  1175.  
  1176.           a.ccess%            Checks for the existence of a file.
  1177.           ansi                Displays ANSI escape sequences.
  1178.           backspace           Sends one or more backspaces.
  1179.           ckeypress%          Checks for a remote or local key press.
  1180.           clear.scr           Clears the local and remote screens
  1181.           do.chat             To allow sysop to chat with remote user.
  1182.           elap.time           Computes elapsed time.
  1183.           get.string          Gets a string of characters.
  1184.           get.time&           Returns number of seconds since 01/01/70.
  1185.           getakey%            Gets one key responses.
  1186.           getrand%            Returns a random number.
  1187.           init.door           Initializes the Door.
  1188.           leave               Shuts down door and returns to the BBS.
  1189.           more                Checks for a full screen.
  1190.           nl                  Sends a CR/LF to local and remote.
  1191.           no.carrier          Prints a message if carrier lost.
  1192.           pagesysop           Alerts sysop that the user wants to chat.
  1193.           pause               Sends a "Press [Any Key] To Continue" prompt.
  1194.           putachar            Sends a single character.
  1195.           putkey              Used by chat for word wrapping.
  1196.           read.cnf            Reads the door configuration file.
  1197.           read.doorsys%       Reads DOOR.SYS.
  1198.           read.gapuser%       Reads USERS.DAT.
  1199.           read.pcbuser%       Reads PCB USERS file.
  1200.           read.score%         Reads and displays the scoreboard.
  1201.           right.trim$         Trims spaces from string.
  1202.           set.status          Displays status line.
  1203.           show.file           Displays text files.
  1204.           show.mess           Displays a message.
  1205.           time.credit         Gives credits for time used.
  1206.           time.left           Computes time remaining.
  1207.           update.clock        Updates status line clock.
  1208.           waitasec            Pauses for x number of seconds.
  1209.           wrap.word           Wraps a word.
  1210.           write.gapuser%      Writes USERS.DAT.
  1211.           write.pcbuser%      Writes PCB USERS.
  1212.           write.score         Creates and maintains the scoreboard.
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.                                        Page 22
  1225.  
  1226.  
  1227.  
  1228.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1229.  
  1230.  
  1231.                         FUNCTIONS AND SUBROUTINES - REFERENCE
  1232.                         -------------------------------------
  1233.  
  1234.  
  1235.           Functions always  return a value. The type of the return value is
  1236.           denoted by  the type  modifier after  a function name. The return
  1237.           value should  be assigned  to a  variable of  the same  type. For
  1238.           instance, the  function get.time&  returns a long integer. To re-
  1239.           trieve the return value, assign it to an long integer as :
  1240.  
  1241.                long.int& = get.time&
  1242.  
  1243.           Subroutines do  not return a value. To call a subroutine, use the
  1244.           Basic CALL function :
  1245.  
  1246.                call get.string
  1247.  
  1248.  
  1249.  
  1250.  
  1251.  
  1252.           a.ccess%
  1253.           -----------------------------------------------------------------
  1254.  
  1255.           Purpose       Checks for the existence of a file.
  1256.  
  1257.           Parameters    Full path and name of file
  1258.  
  1259.           Return Value  0 = file was found, 1 = file not found
  1260.  
  1261.           Description   In order  to avoid  Basic errors  that  occur  when
  1262.                         trying to  open a  file that  does not  exist, this
  1263.                         function should be used prior to opening any file.
  1264.  
  1265.           Example
  1266.  
  1267.              r% = access%("GAPQBDR.DOC")
  1268.              if r% <> 0 then
  1269.                call show.mess("Can't Find GAPQBDR.DOC",NO,YES)
  1270.              end if
  1271.  
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.                                        Page 23
  1283.  
  1284.  
  1285.  
  1286.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1287.  
  1288.  
  1289.           ansi
  1290.           -----------------------------------------------------------------
  1291.  
  1292.           Purpose       Displays ANSI escape sequences
  1293.  
  1294.           Parameters    ANSI color to display
  1295.  
  1296.           Return Value  None
  1297.  
  1298.           Description   This function  will send  a string  of ANSI  escape
  1299.                         sequences to  the remote  user  and  to  the  local
  1300.                         console. The  ANSI codes for the various colors are
  1301.                         defined as constants in the GAPQBDR.BI file. If the
  1302.                         remote or  local user  is in non graphics mode, the
  1303.                         function returns immediately.
  1304.  
  1305.           Example       call ansi(BWHITE)
  1306.  
  1307.  
  1308.  
  1309.           backspace
  1310.           -----------------------------------------------------------------
  1311.  
  1312.           Purpose       Sends one or more backspaces
  1313.  
  1314.           Parameters    Number of backspaces to send
  1315.  
  1316.           Return Value  None
  1317.  
  1318.           Description   In order  to actually  erase  a  character  on  the
  1319.                         screen, you  must send a 3 character sequence which
  1320.                         consists  of   backspace,  space,  backspace.  This
  1321.                         function will  send as  many of  these 3  character
  1322.                         sequences as you specify in the parameter list.
  1323.  
  1324.           Example       call backspace(1)
  1325.  
  1326.              str$ = "Press Any Key "      ' set up string
  1327.              call show.mess(str$,NO,NO)   ' show string
  1328.              c% = getkeyc%                ' get a key
  1329.              call backspace(len(str$))    ' erase string
  1330.  
  1331.  
  1332.  
  1333.  
  1334.  
  1335.  
  1336.  
  1337.  
  1338.  
  1339.  
  1340.                                        Page 24
  1341.  
  1342.  
  1343.  
  1344.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1345.  
  1346.  
  1347.           ckeypress%
  1348.           -----------------------------------------------------------------
  1349.  
  1350.           Purpose       Checks for a remote or local key press
  1351.  
  1352.           Parameters    None
  1353.  
  1354.           Return Value  0 = no key is waiting, 1 = a key is waiting
  1355.  
  1356.           Description   This function will check the local keyboard as well
  1357.                         as the  communications receive  buffer to  see if a
  1358.                         key is waiting to be read. It is most often used in
  1359.                         loops that need to receive a 1 character keystroke.
  1360.  
  1361.           Example       c% = ckeypress%   ' key pressed?
  1362.  
  1363.              c% = 0                       ' initialize
  1364.              do
  1365.                 |                         ' do something
  1366.                 |
  1367.                 c% = ckeypress%           ' key pressed?
  1368.              until c% <> 0                ' key pressed,exit
  1369.  
  1370.  
  1371.           clear.scr
  1372.           -----------------------------------------------------------------
  1373.  
  1374.           Purpose       Clears local and remote screens.
  1375.  
  1376.           Parameters    None
  1377.  
  1378.           Return Value  None
  1379.  
  1380.           Description   This routine  will call  CLS23 to  clear the  local
  1381.                         screen. If  the remote caller is in non-color mode,
  1382.                         it sends a CHR$(12) to the remote screen, otherwise
  1383.                         it sends the ANSI clear screen sequence.
  1384.  
  1385.           Example       call clear.scr    ' clear screen
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.                                        Page 25
  1399.  
  1400.  
  1401.  
  1402.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1403.  
  1404.  
  1405.           do.chat
  1406.           -----------------------------------------------------------------
  1407.  
  1408.           Purpose       To allow sysop to chat with remote user
  1409.  
  1410.           Parameters    None
  1411.  
  1412.           Return Value  None
  1413.  
  1414.           Description   This function  allows a  one on one chat with a re-
  1415.                         mote user.  If the  caller is in graphics mode, the
  1416.                         sysop's key  presses will be displayed in green and
  1417.                         the remote  user's key presses will be displayed in
  1418.                         white. Text  will automatically  wrap at column 76.
  1419.                         To exit  chat, press  either the  ESC key or type a
  1420.                         CTRL-X. Note  that the  user may  also  send  these
  1421.                         characters to  end chat. The user will receive full
  1422.                         credit for  the time spent chatting with the sysop.
  1423.                         However, this  function will  not  update  the  BBS
  1424.                         system file  so it is possible that the user may be
  1425.                         logged off  (with an  out  of  time  message)  when
  1426.                         he/she returns to the BBS.
  1427.  
  1428.           Example       call do.chat
  1429.  
  1430.              response$ = " "              ' initialize
  1431.              call get.string(response$)   ' get a string
  1432.              if response$ = "P" then      ' paging sysop
  1433.                call do.chat               ' chat with sysop
  1434.              end if
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.                                        Page 26
  1457.  
  1458.  
  1459.  
  1460.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1461.  
  1462.  
  1463.           elap.time
  1464.           -----------------------------------------------------------------
  1465.  
  1466.           Purpose       Computes elapsed  time while  waiting for  keyboard
  1467.                         input
  1468.  
  1469.           Parameters    None
  1470.  
  1471.           Return Value  None
  1472.  
  1473.           Description   This function  is used  in loops  that await a key-
  1474.                         board response.  Prior to  entering the  loop,  the
  1475.                         variable called temptime should be initialized with
  1476.                         the  current  time.  Once  inside  the  loop,  this
  1477.                         function should  be called  to keep  track  of  the
  1478.                         elapsed time.  If there  is  no  keyboard  response
  1479.                         within 4 minutes, the user will be logged off.
  1480.  
  1481.  
  1482.  
  1483.           Example       call elap.time
  1484.  
  1485.              temptime& = get.time&        ' start timer
  1486.              do
  1487.                gc = getakey%              ' get a key
  1488.                if gc <> 0 then            ' key pressed
  1489.                  exit do                  ' exit and process
  1490.                end if
  1491.                call elap.time             ' activity?
  1492.              loop                         ' continue
  1493.  
  1494.  
  1495.  
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.                                        Page 27
  1515.  
  1516.  
  1517.  
  1518.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1519.  
  1520.  
  1521.           get.string
  1522.           -----------------------------------------------------------------
  1523.  
  1524.           Purpose       Gets a string of characters
  1525.  
  1526.           Parameters    String to fill
  1527.  
  1528.           Return Value  None
  1529.  
  1530.           Description   This is  the main  input routine.  It  will  get  a
  1531.                         string from  either the  remote user  or the  local
  1532.                         keyboard. The  string passed  will be  set  to  the
  1533.                         characters received. The length of the input string
  1534.                         is determined  by the  length of the string passed.
  1535.                         Do not pass a fixed length string to this routine.
  1536.  
  1537.                         Before calling,  you  must  initialize  the  passed
  1538.                         string with  spaces. The  number of  spaces in  the
  1539.                         string determines  the number of characters allowed
  1540.                         to be  input. If  a  user  attempts  to  type  more
  1541.                         characters than  allowed, the  cursor will not move
  1542.                         pass the  end of  the string.  Input ends  when the
  1543.                         Enter key is pressed.
  1544.  
  1545.                         To initialize  the string,  use  the  Basic  space$
  1546.                         function (IE,  input$ =  space$(10)  -  initializes
  1547.                         input$ to 10 spaces).
  1548.  
  1549.                         WARNING : It is extremely important that the passed
  1550.                         string be initialized. Failure to set the string to
  1551.                         spaces, will cause unpredictable results!
  1552.  
  1553.                         This function  does not  return a  new string  con-
  1554.                         taining the  keyboard input.  Instead, it  modifies
  1555.                         the string  you pass  to it  in the parameter list.
  1556.                         The string will be stripped of any trailing spaces.
  1557.  
  1558.                         get.string automatically  uppercases the string. If
  1559.                         you wish  to disable this feature, set the variable
  1560.                         noup to 1.
  1561.  
  1562.                         get.string will  automatically check  for  keyboard
  1563.                         activity so it is not necessary for you to do so.
  1564.  
  1565.           Example
  1566.  
  1567.              instr$ = space$(10)          ' initialize
  1568.              call get.string(instr$)      ' get string
  1569.  
  1570.  
  1571.  
  1572.                                        Page 28
  1573.  
  1574.  
  1575.  
  1576.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1577.  
  1578.  
  1579.           get.time&
  1580.           -----------------------------------------------------------------
  1581.  
  1582.           Purpose       Gets the number of seconds elapsed since 01/01/70
  1583.  
  1584.           Parameters    None
  1585.  
  1586.           Return Value  Number of seconds since 01/01/70
  1587.  
  1588.           Description   This routine  is equivalent  to the  C time() func-
  1589.                         tion. It  is used  throughout the GAPQBDR module to
  1590.                         compute various  times. This  function is  not sus-
  1591.                         ceptible to  the  midnight  roll  over  problem  so
  1592.                         prevalent in Basic communications programs.
  1593.  
  1594.                         Note that  the Return  Value is  of type  LONG. You
  1595.                         must cast  the Return  Value to  a LONG  INTEGER or
  1596.                         loss of significant digits will result.
  1597.  
  1598.           Example
  1599.  
  1600.              dim ltime as long            ' declare as long
  1601.  
  1602.              ltime = get.time&            ' get the time
  1603.  
  1604.              ' if you don't like declaring variables, you can
  1605.              ' do it the old fashioned way
  1606.  
  1607.              longtime& = get.time&        ' get the time
  1608.  
  1609.  
  1610.  
  1611.  
  1612.  
  1613.  
  1614.  
  1615.  
  1616.  
  1617.  
  1618.  
  1619.  
  1620.  
  1621.  
  1622.  
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.                                        Page 29
  1631.  
  1632.  
  1633.  
  1634.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1635.  
  1636.  
  1637.           getakey%
  1638.           -----------------------------------------------------------------
  1639.  
  1640.           Purpose       Gets one key responses
  1641.  
  1642.           Parameters    None
  1643.  
  1644.           Return Value  ASCII code for the key pressed or 0
  1645.  
  1646.           Description   This is the main keyboard input routine (internal).
  1647.                         It is  called by get.string as well as any keyboard
  1648.                         polling loops. It checks the receive buffer as well
  1649.                         as the  local keyboard  for a  key press. If one is
  1650.                         not found  it returns 0. The character input is not
  1651.                         echoed. Since  99% of all keyboard input comes from
  1652.                         this  routine,   it  checks   for   carrier,   time
  1653.                         remaining, keyboard  time-out, as  well as  special
  1654.                         sysop function  keys. The  "timeleft"  variable  is
  1655.                         updated via  this routine. This is the variable you
  1656.                         would normally use in a prompt such as,
  1657.  
  1658.                                    [20 mins left] Main Command :
  1659.  
  1660.           Example       c% = getakey
  1661.  
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.                                        Page 30
  1689.  
  1690.  
  1691.  
  1692.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1693.  
  1694.  
  1695.           getrand%
  1696.           -----------------------------------------------------------------
  1697.  
  1698.           Purpose       Gets a random number
  1699.  
  1700.           Parameters    Low number, high number
  1701.  
  1702.           Return Value  A random number
  1703.  
  1704.           Description   This routine  is provided because it is much easier
  1705.                         to use and understand than Basic's random function.
  1706.                         Provide  as  parameters  two  integers.  The  first
  1707.                         parameter is the lowest number you will accept as a
  1708.                         random number,  and the  second  parameter  is  the
  1709.                         highest random number you will accept. The function
  1710.                         will return  a random  integer  between  the  range
  1711.                         specified (low  and high  are included in the range
  1712.                         of numbers). It is not necessary to seed the random
  1713.                         number generator  as this is done automatically for
  1714.                         you during program initialization.
  1715.  
  1716.           Example
  1717.  
  1718.              ' get a random number between 1 and 10
  1719.  
  1720.              rndnum% = getrand% (1,10)
  1721.  
  1722.  
  1723.  
  1724.  
  1725.  
  1726.  
  1727.  
  1728.  
  1729.  
  1730.  
  1731.  
  1732.  
  1733.  
  1734.  
  1735.  
  1736.  
  1737.  
  1738.  
  1739.  
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.                                        Page 31
  1747.  
  1748.  
  1749.  
  1750.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1751.  
  1752.  
  1753.           init.door
  1754.           -----------------------------------------------------------------
  1755.  
  1756.           Purpose       Initializes the GAPQBDR functions
  1757.  
  1758.           Parameters    None
  1759.  
  1760.           Return Value  None
  1761.  
  1762.           Description   This  routine  must  be  called  immediately  after
  1763.                         calling read.cnf.  It initializes  the door,  opens
  1764.                         and reads  system files, initializes the comm port,
  1765.                         initializes global  variables and in general, makes
  1766.                         sure that  all of  the files required for operation
  1767.                         are present.  There is no Return Value. If an error
  1768.                         occurs while  trying to  initialize,  the  function
  1769.                         will display an error message and end the program.
  1770.  
  1771.           Example
  1772.  
  1773.              call read.cnf("DOOR.CFG")    ' read config file
  1774.              call init.door               ' init the door
  1775.  
  1776.  
  1777.           leave
  1778.           -----------------------------------------------------------------
  1779.  
  1780.           Purpose       Exits the program
  1781.  
  1782.           Parameters    None
  1783.  
  1784.           Return Value  None
  1785.  
  1786.           Description   When the  program terminates,  it  must  call  this
  1787.                         function to  end. This is the ONLY proper exit from
  1788.                         the door.
  1789.  
  1790.           Example       call leave
  1791.  
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797.  
  1798.  
  1799.  
  1800.  
  1801.  
  1802.  
  1803.  
  1804.                                        Page 32
  1805.  
  1806.  
  1807.  
  1808.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1809.  
  1810.  
  1811.           more
  1812.           -----------------------------------------------------------------
  1813.  
  1814.           Purpose       Checks for a full screen and issues a More Prompt
  1815.  
  1816.           Parameters    None
  1817.  
  1818.           Return Value  None
  1819.  
  1820.           Description   This is  an internal  routine that is called by the
  1821.                         character output functions.
  1822.  
  1823.           Example
  1824.  
  1825.  
  1826.  
  1827.           nl
  1828.           -----------------------------------------------------------------
  1829.  
  1830.           Purpose       To send  a Carriage  Return and  Line Feed to local
  1831.                         and remote
  1832.  
  1833.           Parameters    Number of New Line's to send
  1834.  
  1835.           Return Value  None
  1836.  
  1837.           Description   To send  a blank  line, call  this routine with the
  1838.                         number of blank lines you wish to send.
  1839.  
  1840.           Example       call nl(2)        ' send two blank lines
  1841.  
  1842.  
  1843.  
  1844.  
  1845.  
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.  
  1856.  
  1857.  
  1858.  
  1859.  
  1860.  
  1861.  
  1862.                                        Page 33
  1863.  
  1864.  
  1865.  
  1866.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1867.  
  1868.  
  1869.           no.carrier
  1870.           -----------------------------------------------------------------
  1871.  
  1872.           Purpose       Prints a message and calls leave()
  1873.  
  1874.           Parameters    None
  1875.  
  1876.           Return Value  None
  1877.  
  1878.           Description   Internal routine  that is  called when  there is  a
  1879.                         loss of  carrier. Displays  a message  to the local
  1880.                         screen  and  then  calls  leave  to  terminate  the
  1881.                         program.
  1882.  
  1883.                         If you  have a  routine that checks for carrier and
  1884.                         you wish  to  display  the  standard  "No  Carrier"
  1885.                         message and log the user off, call this function.
  1886.  
  1887.           Example       call no.carrier
  1888.  
  1889.  
  1890.  
  1891.           pagesysop
  1892.           -----------------------------------------------------------------
  1893.  
  1894.           Purpose       Alerts sysop that user wants to chat
  1895.  
  1896.           Parameters    None
  1897.  
  1898.           Return Value  None
  1899.  
  1900.           Description   Allows the  programer to  provide the  user with  a
  1901.                         Page Sysop  command. The  page lasts for 30 seconds
  1902.                         and can be aborted by typing CTRL K. If the sysop's
  1903.                         page bell  is on,  the sysop's  speaker  will  also
  1904.                         sound. To  answer the  page, the sysop should press
  1905.                         CTRL F10.
  1906.  
  1907.           Example
  1908.  
  1909.              response$ = " "              ' initialize var
  1910.              call get.string(response$)   ' wait for a key
  1911.              if response$ = "P" then      ' wants to chat
  1912.                call pagesysop             ' tell sysop
  1913.              end if
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.                                        Page 34
  1921.  
  1922.  
  1923.  
  1924.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1925.  
  1926.  
  1927.           pause
  1928.           -----------------------------------------------------------------
  1929.  
  1930.           Purpose       Sends a "Press [Any Key] To Continue" prompt
  1931.  
  1932.           Parameters    None
  1933.  
  1934.           Return Value  None
  1935.  
  1936.           Description   This function  sends a pause prompt and waits for a
  1937.                         key press.
  1938.  
  1939.           Example
  1940.  
  1941.              call nl(1)                   ' send blank line
  1942.              call pause                   ' wait for a key
  1943.  
  1944.  
  1945.           putachar
  1946.           -----------------------------------------------------------------
  1947.  
  1948.           Purpose       Send a single character to local and remote
  1949.  
  1950.           Parameters    ASCII character to send
  1951.  
  1952.           Return Value  None
  1953.  
  1954.           Description   This routine  is called  a "semi-unfiltered"  char-
  1955.                         acter output  routine because  it allows  for  most
  1956.                         ASCII characters to be output.
  1957.  
  1958.           Example
  1959.  
  1960.              c% = ASC("A")                ' send an 'A'
  1961.              call putachar(c%)            ' to local and remote screen
  1962.  
  1963.              c% = getakey%                ' get a keypress
  1964.              if (c% <> 0 then             ' if we got a key
  1965.                call putachar(c%)          ' display the
  1966.              end if                       ' character
  1967.  
  1968.  
  1969.  
  1970.  
  1971.  
  1972.  
  1973.  
  1974.  
  1975.  
  1976.  
  1977.  
  1978.                                        Page 35
  1979.  
  1980.  
  1981.  
  1982.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  1983.  
  1984.  
  1985.           putkey
  1986.           -----------------------------------------------------------------
  1987.  
  1988.           Purpose       Used  by  chat  routines  to  keep  track  of  word
  1989.                         wrapping
  1990.  
  1991.           Parameters    Character to send
  1992.  
  1993.           Return Value  None
  1994.  
  1995.           Description   This is  the  main  output  routine  for  the  chat
  1996.                         functions. It  keeps track  of the  current column,
  1997.                         and decides  when it  is time  to wrap  a word.  It
  1998.                         should not  be called  by the programmer's routines
  1999.                         since putachar is faster and more efficient.
  2000.  
  2001.           Example
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.                                        Page 36
  2037.  
  2038.  
  2039.  
  2040.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  2041.  
  2042.  
  2043.           read.cnf
  2044.           -----------------------------------------------------------------
  2045.  
  2046.           Purpose       To read the door configuration file
  2047.  
  2048.           Parameters    Full path and file name to the configuration file.
  2049.  
  2050.           Return Value  None
  2051.  
  2052.           Description   Opens the  configuration file for the current door.
  2053.                         Normally the  passed parameter  is the  name of the
  2054.                         door with  a .CNF extension (it is assumed that the
  2055.                         file is in the same directory as the door program).
  2056.                         If an error occurs, the program ends immediately.
  2057.  
  2058.                         The first  line of  the file is the path to the BBS
  2059.                         default directory.  The second  line is the name of
  2060.                         the BBS. The third line is the Port IRQ and the 4th
  2061.                         line is the Port Base Address. If the sysop running
  2062.                         your program  has his  BBS configured  to  use  Com
  2063.                         Ports other  than 1  or 2,  he would then enter the
  2064.                         IRQ and  Base address  for his  Com Port on lines 3
  2065.                         and 4.  GAPQBDR derives  the Port  Number from  the
  2066.                         DOOR.SYS file.
  2067.  
  2068.                         Lines five  through eight  are for  the Intelligent
  2069.                         DigiBoard  multi-port   Communications  Card.   The
  2070.                         DigiBoard routines  specifically support the COM/Xi
  2071.                         series. All  four of  these lines are required even
  2072.                         if your end users are using the Standard Interface.
  2073.                         Line five  is the Communications Port Interface. It
  2074.                         must be one of the following:
  2075.  
  2076.                                    STANDARD  DIGIBOARD INT14/EBIOS
  2077.  
  2078.                         The  Standard   interface  is  the  one  that  will
  2079.                         normally be  used.  If  an  end  user  is  using  a
  2080.                         DigiBoard then  either the DigiBoard or Int14/EBIOS
  2081.                         interface may be selected. Most sysops will use the
  2082.                         Int14/EBIOS  interface.  All  input/output  to  the
  2083.                         DigiBoard is performed via Interrupt 14 calls and a
  2084.                         Device Driver  (available from  DigiBoard)  handles
  2085.                         the interface  between the  program and  the board.
  2086.                         The DigiBoard  interface uses  Direct  Programming.
  2087.                         GAPQBDR talks  to the  board directly  without  the
  2088.                         need for  a Device  Driver. In  order to  use  this
  2089.                         interface, a  program called  RESETDIG.EXE must  be
  2090.                         used  in   the  AUTOEXEC.BAT   file  to  reset  the
  2091.  
  2092.  
  2093.  
  2094.                                        Page 37
  2095.  
  2096.  
  2097.  
  2098.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  2099.  
  2100.  
  2101.                         DigiBoard once  when the  computer is first booted.
  2102.                         If the end user does not have this program (it is a
  2103.                         part of  the GAP  Communications BBS  package) then
  2104.                         the Int14/EBIOS interface must be used.
  2105.  
  2106.                         If the Interface is other than STANDARD, then lines
  2107.                         6 through  8 will  be ignored.  If the Interface is
  2108.                         INT14/EBIOS, then lines 6 and 7 will be ignored.
  2109.  
  2110.                         Line 6  is the  DigiBoard  Memory  Window,  or  the
  2111.                         address the  board uses  as a  communications  area
  2112.                         between itself  and the Host Computer. This line is
  2113.                         used only  if the Interface is set to DIGIBOARD. It
  2114.                         can be  set to  0 if  the Interface  is STANDARD or
  2115.                         INT14/EBIOS.
  2116.  
  2117.                         Line 7 is the DigiBoard I/O Port Address. This line
  2118.                         is used  only if  the Interface is set to DIGIBOARD
  2119.                         and can be set to 0 otherwise.
  2120.  
  2121.                         Line 8  is the  DigiBoard Channel Number. This line
  2122.                         is  required  for  the  DIGIBOARD  and  INT14/EBIOS
  2123.                         Interfaces. It  is normally 1 - 8 for the DIGIBOARD
  2124.                         Interface and 4 - 11 for the INT14/EBIOS Interface.
  2125.                         The Channel  Number is similar to a Port Number. It
  2126.                         tells  the   program   which   of   the   DigiBoard
  2127.                         Communications ports to use.
  2128.  
  2129.                         It is  the responsibility  of the  door  author  to
  2130.                         describe the format of these eight lines to the end
  2131.                         user. It  is also  the responsibility  of the  door
  2132.                         author to insure that the end user have these eight
  2133.                         lines in  the door configuration file. If your door
  2134.                         program requires no configuration parameters of its
  2135.                         own, you  can simply distribute a sample "door".cnf
  2136.                         file with these eight lines already in it.
  2137.  
  2138.                         GAPQBDR will  NOT close  this file  (file #1) after
  2139.                         reading the  first eight  lines. It leaves the file
  2140.                         open for  the programmer's  use. If  your door does
  2141.                         require certain configuration parameters, have your
  2142.                         users place  the parameters  in the  file  starting
  2143.                         with line  9. If  you use a set up program, be sure
  2144.                         that your  set up  program writes  the first  eight
  2145.                         lines as specified.
  2146.  
  2147.                         After you  have called  read.cnf and  init.door, if
  2148.                         you  have   any  configuration   options   in   the
  2149.  
  2150.  
  2151.  
  2152.                                        Page 38
  2153.  
  2154.  
  2155.  
  2156.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  2157.  
  2158.  
  2159.                         "door".cnf file,  you should  line input  those op-
  2160.                         tions. Then  close file  #1. Even  if you  have  no
  2161.                         options to read, close the file.
  2162.  
  2163.                         WARNING :  You MUST  call this routine before using
  2164.                         any of  the GAPQBDR  functions. After  calling this
  2165.                         routine, you MUST call init.door.
  2166.  
  2167.           Example
  2168.  
  2169.              call read.cnf("TOURIST.CNF")
  2170.              call init.door
  2171.  
  2172.  
  2173.           read.doorsys%
  2174.           -----------------------------------------------------------------
  2175.  
  2176.           Purpose       Reads the DOOR.SYS universal door interface file
  2177.  
  2178.           Parameters    None
  2179.  
  2180.           Return Value  0 = no error, 1 = error
  2181.  
  2182.           Description   Internal routine  called by  init.door.  Reads  the
  2183.                         DOOR.SYS file  and initializes any global variables
  2184.                         that depend on the information in that file.
  2185.  
  2186.           Example       c% = read.doorsys%
  2187.  
  2188.  
  2189.  
  2190.           read.gapuser%
  2191.           -----------------------------------------------------------------
  2192.  
  2193.           Purpose       Reads the GAP Communications USERS.DAT file
  2194.  
  2195.           Parameters    None
  2196.  
  2197.           Return Value  0 = no error, 1 = error
  2198.  
  2199.           Description   Reads the  user record  of the  current user in the
  2200.                         GAP  USERS.DAT   file.  The  record  variables  are
  2201.                         contained in a variable called user.
  2202.  
  2203.           Example       c% = read.gapuser%
  2204.  
  2205.  
  2206.  
  2207.  
  2208.  
  2209.  
  2210.                                        Page 39
  2211.  
  2212.  
  2213.  
  2214.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  2215.  
  2216.  
  2217.           read.pcbuser%
  2218.           -----------------------------------------------------------------
  2219.  
  2220.           Purpose       Reads the PCB USERS file.
  2221.  
  2222.           Parameters    None
  2223.  
  2224.           Return Value  0 = no error, 1 = error
  2225.  
  2226.           Description   This function  will read  the PCB  Users record for
  2227.                         the user currently in the door.
  2228.  
  2229.           Example       c% = read.pcbuser%
  2230.  
  2231.  
  2232.  
  2233.           read.score%
  2234.           -----------------------------------------------------------------
  2235.  
  2236.           Purpose       Reads and displays the top 10 player file.
  2237.  
  2238.           Parameters    Filename to read, message to display.
  2239.  
  2240.           Return Value  0 = ok, 1 = file not found
  2241.  
  2242.           Description   This  function   reads  the   scoreboard  file  and
  2243.                         displays it  to  the  caller.  Pass  as  the  first
  2244.                         parameter, the  name of  the scoreboard  file.  The
  2245.                         second parameter  is a  string to  display prior to
  2246.                         showing the actual scores.
  2247.  
  2248.           Example
  2249.  
  2250.              c% = read.score% ("SCORE.DAT","Top 10 Players")
  2251.              if c% = 1 then
  2252.                call show_mess("No winners yet!",NO,YES)
  2253.              end if
  2254.  
  2255.  
  2256.  
  2257.  
  2258.  
  2259.  
  2260.  
  2261.  
  2262.  
  2263.  
  2264.  
  2265.  
  2266.  
  2267.  
  2268.                                        Page 40
  2269.  
  2270.  
  2271.  
  2272.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  2273.  
  2274.  
  2275.           right.trim$
  2276.           -----------------------------------------------------------------
  2277.  
  2278.           Purpose       Trims  spaces  from  the  end  of  NULL  terminated
  2279.                         strings
  2280.  
  2281.           Parameters    String containing the spaces.
  2282.  
  2283.           Return Value  String without the spaces.
  2284.  
  2285.           Description   This function  will remove  the NULL  and trim  any
  2286.                         spaces from the right end of any 'C' string.
  2287.  
  2288.           Example       username$ = right.trim$(user.fname)
  2289.  
  2290.  
  2291.  
  2292.           set.status
  2293.           -----------------------------------------------------------------
  2294.  
  2295.           Purpose       To display and update the sysop status line
  2296.  
  2297.           Parameters    0 =  set the  status line,  1 =  update the  status
  2298.                         line, 4 = show other user stats
  2299.  
  2300.           Return Value  None
  2301.  
  2302.           Description   This routine is used internally. There should be no
  2303.                         reason to call it unless you have modified a user's
  2304.                         stats and  you need  to update  those stats  on the
  2305.                         status line. In this case, you should use option 0.
  2306.  
  2307.           Example       call set.status(0)
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.  
  2321.  
  2322.  
  2323.  
  2324.  
  2325.  
  2326.                                        Page 41
  2327.  
  2328.  
  2329.  
  2330.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  2331.  
  2332.  
  2333.           show.file
  2334.           -----------------------------------------------------------------
  2335.  
  2336.           Purpose       To display a text file
  2337.  
  2338.           Parameters    The full path and file name to the file to be shown
  2339.  
  2340.           Return Value  None
  2341.  
  2342.           Description   Many door  programs have  welcome, news, exit, help
  2343.                         and other  files to  show to  the user  at  various
  2344.                         points in  the program.  This is  the function that
  2345.                         allows you to do that. This function tries to be as
  2346.                         intelligent as  it possibly  can in determining the
  2347.                         sysop's wishes. To display a file to the user, call
  2348.                         the function  with the  full drive\path\filename of
  2349.                         the file to display.
  2350.  
  2351.                         If you  have color  and non-color versions of files
  2352.                         pass the  name of  the non-color  version  as  this
  2353.                         function will  automatically append  a "G"  to  the
  2354.                         filename if  the user  is in  color mode.  In fact,
  2355.                         this function will ALWAYS try to find a file with a
  2356.                         "G" appended to the end of the name (if the user is
  2357.                         in color  mode) before it looks for the actual file
  2358.                         by the  name you  specified. If you pass "WELCOMEG"
  2359.                         to this  function and the user is in color mode, it
  2360.                         will first  try to  find a  file with  the name  of
  2361.                         "WELCOMEGG".
  2362.  
  2363.                         As with  GAP Communications,  your text  files  can
  2364.                         have  certain   control  characters  as  the  first
  2365.                         character in  the file. A "{" signals that the more
  2366.                         prompt  should   never  display.  In  other  words,
  2367.                         GAPQBDR will  not keep track of the number of lines
  2368.                         displayed and  will never issue a more prompt. This
  2369.                         is useful  for very  long ANSI files. A "@" signals
  2370.                         that the  pause prompt should be displayed when the
  2371.                         screen is  full instead  of a  more prompt. This is
  2372.                         very handy  when you  want the user to see the file
  2373.                         in its  entirety. The  user will  not be allowed to
  2374.                         break out of the file read.
  2375.  
  2376.                         WARNING :  The "{"  or "@"  MUST appear as the VERY
  2377.                         first character  in the  file. If  you use  an ANSI
  2378.                         editor, be aware that the first few characters in a
  2379.                         file will  usually be  an ANSI  color sequence. You
  2380.  
  2381.  
  2382.  
  2383.  
  2384.                                        Page 42
  2385.  
  2386.  
  2387.  
  2388.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  2389.  
  2390.  
  2391.                         normally have  to edit  the file with a text editor
  2392.                         to insert the control character.
  2393.  
  2394.                         Because QB  4.x is  EXTREMELY slow when it comes to
  2395.                         function calls,  all input  and output  is done "in
  2396.                         line". Despite QB's high overhead, this function is
  2397.                         pretty fast.
  2398.  
  2399.                         GAPQBDR does  not have  the ability  to protect the
  2400.                         status line. Because of this, it is possible for an
  2401.                         ANSI file that contains clear screen codes to erase
  2402.                         the status  line. At  the end  of the function, the
  2403.                         status line  will be  re-drawn just  in case. Since
  2404.                         most ANSI  files contain  the clear screen codes at
  2405.                         the beginning  of the  file, show.file  will remove
  2406.                         any such codes during the first read of the file.
  2407.  
  2408.                         Pressing CTRL  K or  CTRL X  will  abort  any  file
  2409.                         display if the file does not begin with a "@".
  2410.  
  2411.                         REMEMBER :  If you  have both  color and  non-color
  2412.                         versions of  the same  files, pass  the name of the
  2413.                         non-color version. Also, the actual disk files must
  2414.                         be named  in such  a way  that they  have  no  file
  2415.                         extension and the color version ends with a "G".
  2416.  
  2417.           Example       call show.file("WELCOME")
  2418.  
  2419.              call show.file("C:\GAP\GEN\WELCOME")
  2420.  
  2421.  
  2422.  
  2423.  
  2424.  
  2425.  
  2426.  
  2427.  
  2428.  
  2429.  
  2430.  
  2431.  
  2432.  
  2433.  
  2434.  
  2435.  
  2436.  
  2437.  
  2438.  
  2439.  
  2440.  
  2441.  
  2442.                                        Page 43
  2443.  
  2444.  
  2445.  
  2446.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  2447.  
  2448.  
  2449.           show.mess
  2450.           -----------------------------------------------------------------
  2451.  
  2452.           Purpose       Displays a message
  2453.  
  2454.           Parameters    Message, ring the bell, issue a New Line
  2455.  
  2456.           Return Value  None
  2457.  
  2458.           Description   Finally!   After all  of this, just how do you dis-
  2459.                         play a message to the user?  Well, here it is. This
  2460.                         is the  string output  function for  GAPQBDR. Under
  2461.                         most circumstances,  this is  the one function that
  2462.                         you would call to display output to the user. There
  2463.                         should  be   no  reason  to  ever  call  putkey  or
  2464.                         putachar, as they are basically internal routines.
  2465.  
  2466.                         There should  be no  reason to  EVER use  the Basic
  2467.                         print statement  unless you  need to display a mes-
  2468.                         sage to  the local  screen that you do not want the
  2469.                         remote user  to see.  In other  words,  ALL  string
  2470.                         output should  be done  through this  function.  If
  2471.                         there is a reason to display information locally it
  2472.                         would be  much easier  and more  efficient to  keep
  2473.                         track of  the l.ocal  variable, set  it to  1, call
  2474.                         show.mess with  the strings  to be  displayed, then
  2475.                         restore the  l.ocal variable to what it was before,
  2476.                         instead of  using the  print function  which cannot
  2477.                         display ANSI  sequences (forcing  you to  translate
  2478.                         ANSI codes to color statements).
  2479.  
  2480.                         The three parameters are :
  2481.  
  2482.                           1 - the string to display
  2483.  
  2484.                           2 - YES or NO if you want to sound the remote
  2485.                               user's bell.
  2486.  
  2487.                           3 - YES or NO if you want to issue a CR/LF after
  2488.                               displaying the string.
  2489.  
  2490.  
  2491.  
  2492.  
  2493.  
  2494.  
  2495.  
  2496.  
  2497.  
  2498.  
  2499.  
  2500.                                        Page 44
  2501.  
  2502.  
  2503.  
  2504.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  2505.  
  2506.  
  2507.           Example
  2508.  
  2509.              ' the first show.mess displays the string and leaves the
  2510.              ' cursor on the same line. The second show.mess displays
  2511.              ' the string, rings the remote user's bell, and drops the
  2512.              ' cursor to the next line.
  2513.  
  2514.              call nl(1)
  2515.              call show.mess("Are you ready? (Y/N) : ",NO,NO)
  2516.  
  2517.              a$ = space$(3)
  2518.              call get.string(a$)
  2519.  
  2520.              if left$(a$,1) = "Y" then
  2521.                ' begin whatever it is you want to begin
  2522.              else
  2523.                call nl(1)
  2524.                call show.mess("Too Bad!",YES,YES)
  2525.              end if
  2526.  
  2527.  
  2528.  
  2529.  
  2530.  
  2531.  
  2532.  
  2533.  
  2534.  
  2535.  
  2536.  
  2537.  
  2538.  
  2539.  
  2540.  
  2541.  
  2542.  
  2543.  
  2544.  
  2545.  
  2546.  
  2547.  
  2548.  
  2549.  
  2550.  
  2551.  
  2552.  
  2553.  
  2554.  
  2555.  
  2556.  
  2557.  
  2558.                                        Page 45
  2559.  
  2560.  
  2561.  
  2562.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  2563.  
  2564.  
  2565.           time.credit
  2566.           -----------------------------------------------------------------
  2567.  
  2568.           Purpose       Keeps track  of time and credits the user with time
  2569.                         elapsed
  2570.  
  2571.           Parameters    1 = start timer, 0 = end timer
  2572.  
  2573.           Return Value  None
  2574.  
  2575.           Description   This is  basically an  internal routine  called  by
  2576.                         chat and sysop shell to DOS so that the user is not
  2577.                         penalized  for  time  used.  It  updates  a  global
  2578.                         variable called  timecredit. Timecredit  is used in
  2579.                         the calculations  that determine  the  user's  time
  2580.                         remaining.
  2581.  
  2582.                         If you  wish to  use this  feature in your own rou-
  2583.                         tines,  prior   to  entering   your  routine,  call
  2584.                         time.credit with  a 1  and it will start the timer.
  2585.                         When your  routine is  finished,  call  time.credit
  2586.                         with a  0 and  the timer  will stop.  The  variable
  2587.                         timecredit will be updated with the elapsed time.
  2588.  
  2589.           Example
  2590.  
  2591.              call time.credit(1)          ' start the timer
  2592.              call do.chat                 ' chat with user
  2593.              call time.credit(0)          ' stop the timer
  2594.  
  2595.              ' Note that this is simply an example. do.chat
  2596.              ' calls time.credit on its own. In the above
  2597.              ' example, if the sysop chat with the user took
  2598.              ' 10  minutes, the user will be credited with
  2599.              ' that 10 minutes as will be reflected in the
  2600.              ' timecredit variable.
  2601.  
  2602.  
  2603.  
  2604.  
  2605.  
  2606.  
  2607.  
  2608.  
  2609.  
  2610.  
  2611.  
  2612.  
  2613.  
  2614.  
  2615.  
  2616.                                        Page 46
  2617.  
  2618.  
  2619.  
  2620.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  2621.  
  2622.  
  2623.           time.left
  2624.           -----------------------------------------------------------------
  2625.  
  2626.           Purpose       To compute the user's time remaining
  2627.  
  2628.           Parameters    None
  2629.  
  2630.           Return Value  None
  2631.  
  2632.           Description   This is the routine that is called by the input and
  2633.                         output  routines   to  compute   the  user's   time
  2634.                         remaining. It  is not  necessary for the programmer
  2635.                         to call this routine directly.
  2636.  
  2637.                         A global  variable called  timeleft will be updated
  2638.                         with each  call.  This  variable  may  be  used  in
  2639.                         prompts that display the user's remaining time.
  2640.  
  2641.                         As long as all input/output is performed thru calls
  2642.                         to the  GAPQBDR library, the timeleft variable will
  2643.                         always be current.
  2644.  
  2645.           Example       call time.left
  2646.  
  2647.  
  2648.  
  2649.           update.clock
  2650.           -----------------------------------------------------------------
  2651.  
  2652.           Purpose       Updates the status line clock
  2653.  
  2654.           Parameters    None
  2655.  
  2656.           Return Value  None
  2657.  
  2658.           Description   Internal routine to update the status line clock.
  2659.  
  2660.           Example
  2661.  
  2662.  
  2663.  
  2664.  
  2665.  
  2666.  
  2667.  
  2668.  
  2669.  
  2670.  
  2671.  
  2672.  
  2673.  
  2674.                                        Page 47
  2675.  
  2676.  
  2677.  
  2678.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  2679.  
  2680.  
  2681.           waitasec
  2682.           -----------------------------------------------------------------
  2683.  
  2684.           Purpose       Pauses for the number of seconds specified.
  2685.  
  2686.           Parameters    Number of seconds to pause
  2687.  
  2688.           Return Value  None
  2689.  
  2690.           Description   This function  allows you  to pause  all processing
  2691.                         for the  specified number  of seconds.  It  is  in-
  2692.                         sensitive to  processor speed  and is immune to the
  2693.                         midnight rollover problem.
  2694.  
  2695.            Example      call waitasec(10) ' pause for 10 sec
  2696.  
  2697.  
  2698.  
  2699.           wrap.word
  2700.           -----------------------------------------------------------------
  2701.  
  2702.           Purpose       To wrap a word during sysop chats
  2703.  
  2704.           Parameters    None
  2705.  
  2706.           Return Value  None
  2707.  
  2708.           Description   Internal function called by putkey to wrap words.
  2709.  
  2710.           Example
  2711.  
  2712.  
  2713.  
  2714.  
  2715.  
  2716.  
  2717.  
  2718.  
  2719.  
  2720.  
  2721.  
  2722.  
  2723.  
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729.  
  2730.  
  2731.  
  2732.                                        Page 48
  2733.  
  2734.  
  2735.  
  2736.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  2737.  
  2738.  
  2739.           write.gapuser%
  2740.           -----------------------------------------------------------------
  2741.  
  2742.           Purpose       Updates the user record in GAP's USERS.DAT file
  2743.  
  2744.           Parameters    None
  2745.  
  2746.           Return Value  0 = no error, 1 = error
  2747.  
  2748.           Description   This function allows you to update any variables in
  2749.                         the GAP USERS.DAT file for the current user.
  2750.  
  2751.                         WARNING :  The GAP  USERS.DAT file contains C char-
  2752.                         acter arrays. These are equivalent to Basic's fixed
  2753.                         length  strings  with  the  exception  that  the  C
  2754.                         strings have a NULL character (chr$(0)) in the last
  2755.                         position. If  you modify  any of these fixed length
  2756.                         strings, you  MUST make  sure that  the  string  is
  2757.                         fully  padded  with    spaces  and  that  the  NULL
  2758.                         character is  placed in  the last  string position.
  2759.                         When assigning  a value  to a  fixed length string,
  2760.                         Basic  will  automatically  pad  the  fixed  length
  2761.                         string with  spaces. All  the programmer need to is
  2762.                         insure that  the NULL is inserted at the end of the
  2763.                         string.
  2764.  
  2765.                         WARNING : The indexes for the user file consists of
  2766.                         the  user's  last  name,  first  name,  level,  and
  2767.                         handle.  Do  not  under  any  circumstances  modify
  2768.                         either of  these four  fields. Doing  so will cause
  2769.                         corruption of the Index file.
  2770.  
  2771.           Example
  2772.  
  2773.              ' Increase # of Files User has downloaded
  2774.  
  2775.              c% = read.gapuser%           ' 1st read record
  2776.              user.downloads = user.downloads + 2
  2777.              c% = write.gapuser%          ' update the record
  2778.  
  2779.  
  2780.  
  2781.  
  2782.  
  2783.  
  2784.  
  2785.  
  2786.  
  2787.  
  2788.  
  2789.  
  2790.                                        Page 49
  2791.  
  2792.  
  2793.  
  2794.           GAPQBDR       (C) Copyright 1988-1993 The GAP Development Company
  2795.  
  2796.  
  2797.           write.pcbuser%
  2798.           -----------------------------------------------------------------
  2799.  
  2800.           Purpose       Updates the PCB USERS file
  2801.  
  2802.           Parameters    None
  2803.  
  2804.           Return Value  0 = no error, 1 = error
  2805.  
  2806.           Description   This function  allows the  programmer to update the
  2807.                         PCB USERS  File. Note  that you  will need  to  use
  2808.                         MKSMBF on  the field  lastmsg, and  MKDMBF  on  the
  2809.                         fields downbytes and upbytes, if you modified these
  2810.                         fields since reading the file.
  2811.  
  2812.           Example       c% = write.pcbuser%  ' write the file
  2813.  
  2814.  
  2815.  
  2816.           write.score
  2817.           -----------------------------------------------------------------
  2818.  
  2819.           Purpose       Creates and maintains the scoreboard file.
  2820.  
  2821.           Parameters    Filename to write, score to write.
  2822.  
  2823.           Return Value  None
  2824.  
  2825.           Description   This function  will create and maintain a data file
  2826.                         of the  top 10  scores. You pass as parameters, the
  2827.                         name of the file to use as the scoreboard file, and
  2828.                         the score  to write.  The score  is a long integer.
  2829.                         The name  and date  are already  known. If the file
  2830.                         does not exist, it will be created.
  2831.  
  2832.           Example
  2833.  
  2834.              DIM score AS LONG
  2835.  
  2836.              score = 45600
  2837.              write.score("SCORE.DAT",score)
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.  
  2846.  
  2847.  
  2848.                                        Page 50
  2849.  
  2850.  
  2851.  
  2852.                                         INDEX
  2853.                                         -----
  2854.  
  2855.           @    42
  2856.           {    42
  2857.           A.ccess%  23
  2858.           ANSI 5, 7, 17, 20, 24, 42, 44
  2859.           Backspace 24
  2860.           Base address   9, 13, 37
  2861.           Bell 44
  2862.           Chat 5, 26, 34, 36, 46, 48
  2863.           Ckeypress%     25
  2864.           Clear.scr 25
  2865.           COMMAND$  10
  2866.           Communications
  2867.             base address 9, 13, 37
  2868.             configuration file     9, 13, 37
  2869.             IRQ     9, 13, 37
  2870.           Communications port 11
  2871.           Configuration file  10, 11
  2872.           Do.chat   26
  2873.           DOOR.SYS  9, 11, 13, 18, 22, 37
  2874.           Elap.time 27
  2875.           Error     8, 11, 23, 32, 37
  2876.           Files
  2877.             Aborting     43
  2878.             Color   42
  2879.             Configuration     11, 37
  2880.             DOOR.SYS     9, 13, 37, 39
  2881.             Errors  23
  2882.             Include 8, 11
  2883.             Opening 23
  2884.             PCB USERS    40
  2885.             Showing 42
  2886.             System  26, 32
  2887.             USERS.DAT    39, 49
  2888.           Functions 23
  2889.           Get.string     19, 26, 28, 30, 34, 45
  2890.           Get.time& 29
  2891.           Getakey%  30
  2892.           Getrand%  31
  2893.           Global Variables
  2894.             Constants
  2895.               ANSI
  2896.                 BBLACK   17
  2897.                 BBLUE    17
  2898.                 BCYAN    17
  2899.                 BGREEN   17
  2900.                 BLACK    17
  2901.                 BLUE     17
  2902.                 BMAGENTA 17
  2903.  
  2904.  
  2905.  
  2906.                                        Page 51
  2907.  
  2908.  
  2909.  
  2910.                                         INDEX
  2911.                                         -----
  2912.  
  2913.                 BRED     17
  2914.                 BROWN    17
  2915.                 BWHITE   17
  2916.                 CYAN     17
  2917.                 GREEN    17
  2918.                 MAGENTA  17
  2919.                 RED 17
  2920.                 WHITE    17
  2921.                 YELLOW   17
  2922.               General
  2923.                 NO  17
  2924.                 YES 17
  2925.             Integers
  2926.               DOOR.SYS
  2927.                 alarm    18
  2928.                 bell     18
  2929.                 c.olor   18
  2930.                 expert   18
  2931.                 l.ocal   18
  2932.                 level    18
  2933.                 minsleft 18
  2934.                 node     18
  2935.                 page     18
  2936.                 parity   18
  2937.                 port     18
  2938.                 printer  18
  2939.                 s.creen  18
  2940.               General
  2941.                 noup     19
  2942.                 timecredit    19
  2943.                 timeleft 19
  2944.             Longs
  2945.               DOOR.SYS
  2946.                 baud     18
  2947.                 downbytes     18
  2948.                 downloads     18
  2949.                 maxbytes 18
  2950.                 recnum   18
  2951.                 timeson  18
  2952.                 upbytes  18
  2953.                 uploads  18
  2954.                 userbaud 18
  2955.               General
  2956.                 starttime     19
  2957.                 temptime 19
  2958.                 timenow  19
  2959.             Strings
  2960.               DOOR.SYS
  2961.  
  2962.  
  2963.  
  2964.                                        Page 52
  2965.  
  2966.  
  2967.  
  2968.                                         INDEX
  2969.                                         -----
  2970.  
  2971.                 bphone   18
  2972.                 city     18
  2973.                 first    18
  2974.                 hphone   18
  2975.                 last     18
  2976.                 lastdate 18
  2977.                 password 19
  2978.                 subscrip 19
  2979.                 username 19
  2980.               General
  2981.                 anystring1    19
  2982.                 bbs.dir  19
  2983.                 board.name    19
  2984.                 gendir   19
  2985.                 maindir  19
  2986.                 sysname  19
  2987.           Init.door 10, 11, 32, 39
  2988.           IRQ  9, 13, 37
  2989.           Leave     11, 32
  2990.           MKDMBF    50
  2991.           MKSMBF    50
  2992.           More 33
  2993.           New Line  33, 44
  2994.           Nl   33
  2995.           No.carrier     34
  2996.           Node 11
  2997.           Noup 28
  2998.           Pagesysop 34
  2999.           Pause     35, 48
  3000.           PCB USERS 22
  3001.           Putachar  35, 44
  3002.           Putkey    36, 44
  3003.           Read.cnf  9, 10, 11, 37
  3004.           Read.doorsys%  39
  3005.           Read.gapuser%  39
  3006.           Read.pcbuser%  40
  3007.           Read.score%    40
  3008.           Right.trim$    41
  3009.           Set.status     41
  3010.           Show.file 42
  3011.           Show.mess 24, 44
  3012.           Spaces
  3013.             Trimming     41
  3014.             USERS.DAT    49
  3015.           Status Line    5, 41, 43, 47
  3016.           String output  44
  3017.           Subroutines    23
  3018.           Time.credit    46
  3019.  
  3020.  
  3021.  
  3022.                                        Page 53
  3023.  
  3024.  
  3025.  
  3026.                                         INDEX
  3027.                                         -----
  3028.  
  3029.           Time.left 47
  3030.           Timecredit     46
  3031.           Timeleft  30, 47
  3032.           Trimming Spaces     41
  3033.           Update.clock   47
  3034.           USERS.DAT 22
  3035.           Waitasec  48
  3036.           Wrap.word 48
  3037.           Write.gapuser% 49
  3038.           Write.pcbuser% 50
  3039.           Write.score    50
  3040.  
  3041.  
  3042.  
  3043.  
  3044.  
  3045.  
  3046.  
  3047.  
  3048.  
  3049.  
  3050.  
  3051.  
  3052.  
  3053.  
  3054.  
  3055.  
  3056.  
  3057.  
  3058.  
  3059.  
  3060.  
  3061.  
  3062.  
  3063.  
  3064.  
  3065.  
  3066.  
  3067.  
  3068.  
  3069.  
  3070.  
  3071.  
  3072.  
  3073.  
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.                                        Page 54