Fast Forward Technologies/ARCHIVE 3WS 990629

From RoyalWeb
Jump to: navigation, search
PRINT 'This archive created 15:30:24 29 JUN 1999'
      EQUATE FALSE TO 0, TRUE TO 1, SET TO 1
      EQUATE AM TO CHAR(254)
      WHO = OCONV('','U50BB')
      USER.ID = FIELD(WHO,' ',1)
      VERSION.CONTROL = SET
      VERS ='2.27.3'
      ERROR = '' ; PRE.ENVIRONMENT = ''
      GET.SENTENCE = '' ; CHAR.INPUT = ''
*
      GOSUB ASK.WHICH.MACHINE
      BEGIN CASE
         CASE MACHINE.OS = 'WINDOWS 98' AND MACHINE.DATABASE = 'MVBASE'
            SENT = SYSTEM(125)
         CASE 1 ; SENT = ''
      END CASE
      BEGIN CASE
         CASE MACHINE.DATABASE = 'UNIVERSE'
            OPEN 'VOC' TO F.MD ELSE
               PRINT 'Cannot open required file VOC' ; GOSUB ACK
            END
         CASE 1
            OPEN 'MD' TO F.MD ELSE
               PRINT 'Cannot open required file MD' ; GOSUB ACK
            END
      END CASE
      GOSUB PARSE.SENT
*
      PREREQS = ''
      PREREQS<1,-1> = 'CREATE-FILE CODE.INCLUDES'
      PREREQS<2,-1> = 'CREATE-FILE FFT.BP'
      PREREQS<2,-1> = 'ADDRAW FFT.BP FFTUNZIP'
      PREREQS<2,-1> = 'BASIC FFT.BP FFTUNZIP'
      PREREQS<2,-1> = 'CATALOG FFT.BP FFTUNZIP'
      GOTO END.SELF.UNZIPPER.MAIN
*
PROCESS.COMMAND:
      DIRECTIVE = FIELD(LINE,' ',1)
      BEGIN CASE
         CASE DIRECTIVE = 'ADD' ; GOSUB PROCESS.ADD
         CASE DIRECTIVE = 'ADDRAW' ; GOSUB PROCESS.ADDRAW
         CASE DIRECTIVE = 'CREATE-FILE' ; GOSUB PROCESS.CREATE.FILE
         CASE DIRECTIVE = 'CHAIN'
            REST.OF.LINE = OCONV(LINE,'G1 99')
            CHAIN REST.OF.LINE
         CASE DIRECTIVE = 'CATALOG'
            BEGIN CASE
               CASE MACHINE.DATABASE = 'UNIVERSE'
                  BEGIN CASE
                     CASE SYSTEM(1001) = 1         ; * IDEAL
                        LINE = LINE:' LOCAL'
                  END CASE
            END CASE
            PRINT LINE ; EXECUTE LINE
         CASE 1 ; PRINT LINE ; EXECUTE LINE
      END CASE
*
* Delete each prerequisite as we encounter it
      IF PREREQS<1> # '' THEN
         LOCATE(LINE,PREREQS,1;W.LINE) THEN
            PRINT 'Removing ':LINE:' from prerequisites'
            PREREQS = DELETE(PREREQS,1,W.LINE)
         END
      END
      IF PREREQS<2> # '' THEN
         LOCATE(LINE,PREREQS,2;W.LINE) THEN
            PRINT 'Removing ':LINE:' from prerequisites'
            PREREQS = DELETE(PREREQS,2,W.LINE)
         END
      END
      IF PREREQS<1> = '' THEN
         GOSUB WRITE.PRE.ENVIRONMENT ; PREREQS<1> = 'DONE'
      END
      IF PREREQS<2> = '' THEN
         LINE = "FFTUNZIP A B" ; PRINT LINE ; EXECUTE LINE
         PREREQS<2> = 'DONE'
      END
      RETURN
*
PROCESS.ADD:
      PRINT 'Installing zipped':
      PRINT ' component(s) of file ':N.FILE:' ':ITEMLIST
      GOSUB UNEMBED.ITEM
      WRITE MYITEM ON F.FILE,'ZIPPED*':USER.ID
      LINE = "FFTUNZIP ":N.FILE:" ZIPPED*":USER.ID
      PRINT LINE ; DATA N.FILE ; EXECUTE LINE
      RETURN
*
PROCESS.ADDRAW:
      PRINT 'Installing raw':
      PRINT ' component(s) of file ':N.FILE:' ':ITEMLIST
      GOSUB UNEMBED.ITEM
      WRITE MYITEM ON F.FILE,K.FILE
      RETURN
*
UNEMBED.ITEM:
      N.FILE = FIELD(LINE,' ',2)
      OPEN N.FILE TO F.FILE ELSE
         PRINT 'Cant open file ':N.FILE ; GOSUB ACK
      END
      K.FILE = FIELD(LINE,' ',3)
      LOCATE('GOTO ':I.STACK,R.FILE;W.START) ELSE
         PRINT 'I cannot find where the current raw item starts.'
         PRINT 'The archive has become corrupt.' ; GOSUB ACK
      END
      LOCATE(I.STACK:':',R.FILE;W.END) ELSE
         PRINT 'I cannot find where the current raw item ends.'
         PRINT 'The archive has become corrupt.' ; GOSUB ACK
      END
      C.R.FILE.START = INDEX(R.FILE,AM,W.START)
      * CHAR POSITION TO START ON
      C.R.FILE.END = INDEX(R.FILE,AM,W.END-1)
      * CHAR POSITION TO END ON
      L.MYITEM = C.R.FILE.END - C.R.FILE.START + 1
      MYITEM = R.FILE[C.R.FILE.START + 1, L.MYITEM]
      * THE ITEM TO WRITE
      S.MYITEM = DCOUNT(MYITEM,AM)
      FOR I.MYITEM = 1 TO S.MYITEM
         T.MYITEM = MYITEM<I.MYITEM>
         MYITEM<I.MYITEM> = T.MYITEM[2,LEN(T.MYITEM)]
      NEXT I.MYITEM
      RETURN
*
PROCESS.CREATE.FILE:
      FILENAME = FIELD(LINE,' ',2)
      READV EXISTS FROM F.MD,FILENAME,1 THEN
         PRINT 'File ':FILENAME:' already exists. Skipping CREATE-FILE.'
      END ELSE
         C.FILESIZE = INDEX(LINE,' ',2)-1
         BEGIN CASE
            CASE MACHINE.DATABASE = 'UNIVERSE'
               GOSUB PROCESS.CREATE.FILE.UNIVERSE
            CASE 1
               FILESIZE = LINE[C.FILESIZE+1,LEN(LINE)]
               IF FILESIZE"R#1" = "B" THEN
                  FILESIZE = FILESIZE[1,LEN(FILESIZE)-1]:"1"
               END ELSE
                  FILESIZE = FILESIZE[1,LEN(FILESIZE)-2]
               END
         END CASE
         LINE = LINE[1,C.FILESIZE]
         LINE = LINE:' ':FILESIZE
         PRINT LINE ; EXECUTE LINE
         LINE = DIRECTIVE:' ':FILENAME
      END
      RETURN
*
PROCESS.CREATE.FILE.UNIVERSE:
      DATAFILESIZE = FIELD(LINE,' ',4)
      DATAFILEMOD = FIELD(DATAFILESIZE,',',1)
      DATAFILESEP = FIELD(DATAFILESIZE,',',2)
      DATAFILETYPE = FIELD(DATAFILESIZE,',',3)
      IF DATAFILETYPE = 'B' THEN DATAFILETYPE = '1'
      IF DATAFILETYPE = '' THEN DATAFILETYPE = '2'
      BEGIN CASE
         CASE SYSTEM(1001) = 1           ; *IDEAL
            FILESIZE = DATAFILETYPE:' '
            FILESIZE = FILESIZE:DATAFILEMOD:' ':DATAFILESEP
         CASE 1
            FILESIZE = DATAFILEMOD:','
            FILESIZE = FILESIZE:DATAFILESEP:',':DATAFILETYPE
      END CASE
      RETURN
*
OPEN.FILE:
      gOPENTRY = 0
      LOOP
         gOPENDONE = TRUE
         OPEN N.FILE TO F.FILE ELSE
            gFILENAME = N.FILE ; gFILESIZE = FILESIZE
            gOPENTRY = gOPENTRY + 1
            IF gOPENTRY = 1 THEN
               PRINT "Can't open required file ":gFILENAME
               PRINT "Would you like me to create it (Y/N) "
               INPUT gCREATEIT
               IF gCREATEIT = 'Y' THEN
                  gLINE = "CREATE-FILE ":gFILENAME:' ':gFILESIZE
                  PRINT gLINE ; EXECUTE gLINE
                  gOPENDONE = FALSE
               END ELSE
                  PRINT 'User declined create. Aborting' ; GOSUB ACK
               END
            END ELSE PRINT 'Create failed. Aborting' ; GOSUB ACK
         END
      UNTIL gOPENDONE DO REPEAT
      RETURN
*
ACK:
      PRINT 'Please contact Fast Forward Technologies at 831 477 7125'
      PRINT 'or E-mail us at fft2001@aol.com to report this problem.'
      PRINT ; PRINT 'Please hit the ENTER or RETURN key to acknowledge':
      PRINT ' this message'
      INPUT ACK ; STOP
      RETURN
*
ASK.WHICH.MACHINE:
      PRINT 'WHAT KIND OF MACHINE ARE YOU ON'
      PRINT '1 UNIVERSE on UNIX'
      PRINT '2 MvBASE ON WINDOWS'
      PRINT '3 PICK D3 ON WINDOWS'
      PRINT '4 ULTIMATE ON A NATIVE IMPLEMENTATION'
      PRINT '5 UNIVERSE ON WINDOWS'
      PRINT ; PRINT 'CHOOSE ONE ': ; INPUT N.WHICH
      BEGIN CASE
         CASE N.WHICH = 1 ; GOSUB WHICH.MACHINE.1
         CASE N.WHICH = 2 ; GOSUB WHICH.MACHINE.2
         CASE N.WHICH = 3 ; GOSUB WHICH.MACHINE.3
         CASE N.WHICH = 4 ; GOSUB WHICH.MACHINE.4
         CASE N.WHICH = 5 ; GOSUB WHICH.MACHINE.5
      END CASE
      RETURN
*
WRITE.PRE.ENVIRONMENT:
      OPEN 'CODE.INCLUDES' TO F.CODE.INCLUDES ELSE
         ERROR = 'Cannot open the CODE.INCLUDES file.'
         GOSUB ERROR.HANDLER
      END
      WRITE PRE.ENVIRONMENT ON F.CODE.INCLUDES,'PRE.ENVIRONMENT'
      WRITE GET.SENTENCE ON F.CODE.INCLUDES,'GET.SENTENCE'
      WRITE CHAR.INPUT ON F.CODE.INCLUDES,'CHAR.INPUT'
      RETURN
*
ERROR.HANDLER:
      S.ERROR = DCOUNT(ERROR,AM)
      FOR I.ERROR = 1 TO S.ERROR ; PRINT ERROR<I.ERROR> ; NEXT I.ERROR
      PRINT 'Your install did not complete properly.' ; GOSUB ACK
      RETURN
*
WHICH.MACHINE.1:
      PRE.ENVIRONMENT<-1> = "* System settings"
      MACHINE.OS = "UNIX"
      PRE.ENVIRONMENT<-1> = "MACHINE.OS = 'UNIX'"
      MACHINE.DATABASE = 'UNIVERSE'
      PRE.ENVIRONMENT<-1> = "MACHINE.DATABASE = 'UNIVERSE'"
      MACHINE.SENTENCE = '@SENTENCE'
      PRE.ENVIRONMENT<-1> = "MACHINE.SENTENCE = '@SENTENCE'"
      GET.SENTENCE = 'SENT = @SENTENCE'
      MACHINE.SENT.SEP = CHAR(32)
      PRE.ENVIRONMENT<-1> = "MACHINE.SENT.SEP = CHAR(32)"
      CHAR.INPUT = 'ANS = KEYIN()'
      PRE.ENVIRONMENT<-1> = "CHAR.INPUT.METHOD = 'KEYIN()'"
      PRE.ENVIRONMENT<-1> = "SENDMAIL.VERB = 'SENDMAIL'"
      PRE.ENVIRONMENT<-1> = "TOHOSTFILE.VERB = ''"
      PRE.ENVIRONMENT<-1> = "FROMHOSTFILE.VERB = ''"
      PRE.ENVIRONMENT<-1> = "*"
      PRE.ENVIRONMENT<-1> = "WHO = OCONV('','U50BB')"
      PRE.ENVIRONMENT<-1> = "PORT.NO = FIELD(WHO,' ',1)"
      PRE.ENVIRONMENT<-1> = "ACCOUNT = FIELD(WHO,' ',2)"
      PRE.ENVIRONMENT<-1> = "TTY = @TTY"
      PRE.ENVIRONMENT<-1> = "eLEVEL = @LEVEL"
      PRE.ENVIRONMENT<-1> = "*"
      PRE.ENVIRONMENT<-1> = "* Client admin choices"
      PRE.ENVIRONMENT<-1> = "USER.ID = @LOGNAME"
      PRE.ENVIRONMENT<-1> = "CONTROL.ADMIN = 'FFT'"
      RETURN
*
WHICH.MACHINE.2:
      PRE.ENVIRONMENT<-1> = "* System settings"
      MACHINE.OS = 'WINDOWS 98'
      PRE.ENVIRONMENT<-1> = "MACHINE.OS = 'WINDOWS 98'"
      MACHINE.DATABASE = 'MVBASE'
      PRE.ENVIRONMENT<-1> = "MACHINE.DATABASE = 'MVBASE'"
      MACHINE.SENTENCE = 'SENTENCE()'
      PRE.ENVIRONMENT<-1> = "MACHINE.SENTENCE = 'SENTENCE()'"
      GET.SENTENCE = 'SENT = SENTENCE()'
      MACHINE.SENT.SEP = CHAR(32)
      PRE.ENVIRONMENT<-1> = "MACHINE.SENT.SEP = CHAR(32)"
      CHAR.INPUT = 'INPUT ANS,0'
      PRE.ENVIRONMENT<-1> = "CHAR.INPUT.METHOD = 'INPUT ANS,0'"
      PRE.ENVIRONMENT<-1> = "SENDMAIL.VERB = ''"
      PRE.ENVIRONMENT<-1> = "TOHOSTFILE.VERB = 'OSCOPY file item path'"
      PRE.ENVIRONMENT<-1> = "FROMHOSTFILE.VERB = 'OSCOPY path file item'"
      PRE.ENVIRONMENT<-1> = "*"
      PRE.ENVIRONMENT<-1> = "WHO = OCONV('','U50BB')"
      PRE.ENVIRONMENT<-1> = "PORT.NO = FIELD(WHO,' ',1)"
      PRE.ENVIRONMENT<-1> = "ACCOUNT = FIELD(WHO,' ',2)"
      PRE.ENVIRONMENT<-1> = "TTY = ''"
      PRE.ENVIRONMENT<-1> = "eLEVEL = 0 "
      PRE.ENVIRONMENT<-1> = "*"
      PRE.ENVIRONMENT<-1> = "* Client admin choices"
      PRE.ENVIRONMENT<-1> = "USER.ID = ACCOUNT"
      PRE.ENVIRONMENT<-1> = "CONTROL.ADMIN = 'FFT'"
      RETURN
*
WHICH.MACHINE.3:
      PRE.ENVIRONMENT<-1> = "* System settings"
      MACHINE.OS = 'WINDOWS 98'
      PRE.ENVIRONMENT<-1> = "MACHINE.OS = 'WINDOWS 98'"
      MACHINE.DATABASE = 'PICKD3'
      PRE.ENVIRONMENT<-1> = "MACHINE.DATABASE = 'PICKD3'"
      MACHINE.SENTENCE = 'SENTENCE()'
      PRE.ENVIRONMENT<-1> = "MACHINE.SENTENCE = 'TCLREAD'"
      GET.SENTENCE = 'TCLREAD SENT'
      MACHINE.SENT.SEP = CHAR(32)
      PRE.ENVIRONMENT<-1> = "MACHINE.SENT.SEP = CHAR(32)"
      CHAR.INPUT = 'IN ANS'
      PRE.ENVIRONMENT<-1> = "CHAR.INPUT.METHOD = 'IN'"
      PRE.ENVIRONMENT<-1> = "SENDMAIL.VERB = ''"
      PRE.ENVIRONMENT<-1> = "TOHOSTFILE.VERB = ''"
      PRE.ENVIRONMENT<-1> = "FROMHOSTFILE.VERB = ''"
      PRE.ENVIRONMENT<-1> = "*"
      PRE.ENVIRONMENT<-1> = "WHO = OCONV('','U50BB')"
      PRE.ENVIRONMENT<-1> = "PORT.NO = FIELD(WHO,' ',1)"
      PRE.ENVIRONMENT<-1> = "ACCOUNT = FIELD(WHO,' ',2)"
      PRE.ENVIRONMENT<-1> = "TTY = ''"
      PRE.ENVIRONMENT<-1> = "eLEVEL = 0 "
      PRE.ENVIRONMENT<-1> = "*"
      PRE.ENVIRONMENT<-1> = "* Client admin choices"
      PRE.ENVIRONMENT<-1> = "USER.ID = ACCOUNT"
      PRE.ENVIRONMENT<-1> = "CONTROL.ADMIN = 'FFT'"
      RETURN
*
WHICH.MACHINE.4:
      PRE.ENVIRONMENT<-1> = "* System settings"
      MACHINE.OS = 'ULTIMATE'
      PRE.ENVIRONMENT<-1> = "MACHINE.OS = 'ULTIMATE'"
      MACHINE.DATABASE = 'ULTIMATE'
      PRE.ENVIRONMENT<-1> = "MACHINE.DATABASE = 'ULTIMATE'"
      MACHINE.SENTENCE = 'PROCREAD'
      PRE.ENVIRONMENT<-1> = "MACHINE.SENTENCE = 'PROCREAD'"
      GET.SENTENCE = 'PROCREAD SENT ELSE SENT = ""'
      MACHINE.SENT.SEP = CHAR(254)
      PRE.ENVIRONMENT<-1> = "MACHINE.SENT.SEP = CHAR(254)"
      CHAR.INPUT = ''
      PRE.ENVIRONMENT<-1> = "CHAR.INPUT.METHOD = ''"
      PRE.ENVIRONMENT<-1> = "SENDMAIL.VERB = ''"
      PRE.ENVIRONMENT<-1> = "TOHOSTFILE.VERB = ''"
      PRE.ENVIRONMENT<-1> = "FROMHOSTFILE.VERB = ''"
      PRE.ENVIRONMENT<-1> = "*"
      PRE.ENVIRONMENT<-1> = "WHO = OCONV('','U50BB')"
      PRE.ENVIRONMENT<-1> = "PORT.NO = FIELD(WHO,' ',1)"
      PRE.ENVIRONMENT<-1> = "ACCOUNT = FIELD(WHO,' ',2)"
      PRE.ENVIRONMENT<-1> = "TTY = ''"
      PRE.ENVIRONMENT<-1> = "eLEVEL = 0 "
      PRE.ENVIRONMENT<-1> = "*"
      PRE.ENVIRONMENT<-1> = "* Client admin choices"
      PRE.ENVIRONMENT<-1> = "USER.ID = ACCOUNT"
      PRE.ENVIRONMENT<-1> = "CONTROL.ADMIN = 'FFT'"
      RETURN
*
WHICH.MACHINE.5:
      PRE.ENVIRONMENT<-1> = "* System settings"
      MACHINE.OS = "WINDOWS NT"
      PRE.ENVIRONMENT<-1> = "MACHINE.OS = 'WINDOWS NT'"
      MACHINE.DATABASE = 'UNIVERSE'
      PRE.ENVIRONMENT<-1> = "MACHINE.DATABASE = 'UNIVERSE'"
      MACHINE.SENTENCE = '@SENTENCE'
      PRE.ENVIRONMENT<-1> = "MACHINE.SENTENCE = '@SENTENCE'"
      GET.SENTENCE = 'SENT = @SENTENCE'
      MACHINE.SENT.SEP = CHAR(32)
      PRE.ENVIRONMENT<-1> = "MACHINE.SENT.SEP = CHAR(32)"
      CHAR.INPUT = 'ANS = KEYIN()'
      PRE.ENVIRONMENT<-1> = "CHAR.INPUT.METHOD = 'KEYIN()'"
      PRE.ENVIRONMENT<-1> = "SENDMAIL.VERB = ''"
      PRE.ENVIRONMENT<-1> = "TOHOSTFILE.VERB = ''"
      PRE.ENVIRONMENT<-1> = "FROMHOSTFILE.VERB = ''"
      PRE.ENVIRONMENT<-1> = "*"
      PRE.ENVIRONMENT<-1> = "WHO = OCONV('','U50BB')"
      PRE.ENVIRONMENT<-1> = "PORT.NO = FIELD(WHO,' ',1)"
      PRE.ENVIRONMENT<-1> = "ACCOUNT = FIELD(WHO,' ',2)"
      PRE.ENVIRONMENT<-1> = "TTY = @TTY"
      PRE.ENVIRONMENT<-1> = "eLEVEL = @LEVEL"
      PRE.ENVIRONMENT<-1> = "*"
      PRE.ENVIRONMENT<-1> = "* Client admin choices"
      PRE.ENVIRONMENT<-1> = "USER.ID = @LOGNAME"
      PRE.ENVIRONMENT<-1> = "IF INDEX(USER.ID,'\',1) THEN USER.ID = FIELD(USER.ID,'\',2)"
      PRE.ENVIRONMENT<-1> = "CONTROL.ADMIN = 'FFT'"
      RETURN
*
PARSE.SENT:
      GET.SENT = FALSE
      IF SENT = '' THEN GET.SENT = TRUE
      SENT.TRY = 1
      LOOP
         VERB = FIELD(SENT,' ',1)
         N.FILE = FIELD(SENT,' ',2)
         N.ITEM = FIELD(SENT,' ',3)
         IF VERB # 'RUN' THEN
            IF SENT.TRY = 1 THEN GET.SENT = TRUE ELSE
               PRINT 'Please use the RUN verb to run this program'
               GOSUB ACK
            END
         END
         IF NOT(GET.SENT) THEN
            OPEN N.FILE TO F.FILE ELSE
               IF SENT.TRY = 1 THEN GET.SENT = TRUE ELSE
                  PRINT 'I cannot open the file ':N.FILE:'. Aborting'
                  GOSUB ACK
               END
            END
         END
         IF NOT(GET.SENT) THEN
            READ R.FILE FROM F.FILE,N.ITEM ELSE
               IF SENT.TRY = 1 THEN GET.SENT = TRUE ELSE
                  PRINT 'I cannot read the item ':N.ITEM:
                  PRINT ' from the file ':N.FILE:'.':
                  PRINT 'Aborting' ; GOSUB ACK
               END
            END
         END
         IF GET.SENT THEN
            PRINT 'Please retype your RUN statement here just as it':
            PRINT ' appears on the TCL command line above'
            INPUT SENT ; GET.SENT = FALSE
         END
      UNTIL SENT.TRY = 2 DO SENT.TRY = SENT.TRY + 1 REPEAT
      RETURN
*
WRAPUP:
      INSTALL.COMPLETE = TRUE
      IF PREREQS<1> # 'DONE' THEN INSTALL.COMPLETE = FALSE
      IF PREREQS<2> # 'DONE' THEN INSTALL.COMPLETE = FALSE
      IF NOT(INSTALL.COMPLETE) THEN
         PRINT 'The installer still has prerequisite components of ':
         PRINT PREREQS
         PRINT 'This install failed!' ; GOSUB ACK
      END
      RETURN
*
END.SELF.UNZIPPER.MAIN:
* Modified 16:53:00  18 JUN 1999 by FFT version 2.1
* Reason: Set version to 2.0
* Modified 17:04:10  18 JUN 1999 by FFT version 2.2
* Reason: Add running of uninstall program for old code
* Modified 17:10:41  18 JUN 1999 by FFT version 2.3
* Reason: Add a dummy call to FFTUNZIP.SA in order for the user to setup their control items
* Modified 17:16:55  18 JUN 1999 by FFT version 2.4
* Reason:
* Modified 10:52:05  20 JUN 1999 by FFT version 2.5
* Reason: Remove the hard-coded references to the programs that the unzipper needs
* Modified 16:31:27  20 JUN 1999 by FFT version 2.6
* Reason:
* Modified 17:09:21  20 JUN 1999 by FFT version 2.7
* Reason:
* Modified 17:15:28  20 JUN 1999 by FFT version 2.8
* Reason: Add the new create-file logic based on treating the item as a series of gotos jumping over embedded code
* Modified 17:17:29  20 JUN 1999 by FFT version 2.9
* Reason: Create label so this fragment knows where special code starts
* Modified 17:32:10  20 JUN 1999 by FFT version 2.10
* Reason: E
* Modified 18:01:47  20 JUN 1999 by FFT version 2.11
* Reason: Install logic of prerequisites before the stand-alone unzipper can be compiled
* Modified 18:06:42  20 JUN 1999 by FFT version 2.12
* Reason:
* Modified 18:26:34  20 JUN 1999 by FFT version 2.13
* Reason:
* Modified 18:27:42  20 JUN 1999 by FFT version 2.14
* Reason:
* Modified 18:50:12  20 JUN 1999 by FFT version 2.15
* Reason:
* Modified 17:32:17  21 JUN 1999 by FFT version 2.16
* Reason: Add support for setting GET.SENTENCE include
* Modified 17:40:58  21 JUN 1999 by FFT version 2.17
* Reason: Add support for building the CHAR.INPUT include
* Modified 19:26:55  21 JUN 1999 by FFT version 2.18
* Reason: Remove references in this program to the uninstaller and compiling the unzipper.  These are now done as steps in the installer
* Modified 16:51:30  22 JUN 1999 by FFT version 2.19
* Reason:
* Modified 17:32:23  22 JUN 1999 by FFT version 2.20
* Reason:
* Modified 17:45:37  22 JUN 1999 by FFT version 2.21
* Reason:
* Modified 17:07:23 23 JUN 1999 by willj version 2.22
* Reason: Allow two levels of prerequisites, seperate writing pre environment from first unzip
* Modified 17:37:44 23 JUN 1999 by willj version 2.23
* Reason: Allow install to be complete with 2 level prereqs if they both say done
* Modified 13:33:59 24 JUN 1999 by willj version 2.24
* Reason: Add the ability to chain (used only at the end hopefully);
* Modified 14:27:04 25 JUN 1999 by FRED\Administrator version 2.25
* Reason: Add support for the way the Universe Ideal flavor does create.file and catalog
* Modified 14:48:32 25 JUN 1999 by FRED\Administrator version 2.26
* Reason: Add Universe on Windows as a selectable machine type
* Modified 16:46:51 25 JUN 1999 by Administrator version 2.27
* Reason: Skip create file if file already exists
* Modified 14:35:46 29 JUN 1999 by Administrator version 2.27.1
* Reason: Fix logic on how to extract filesize, had an unassigned variable
* Modified 15:14:05 29 JUN 1999 by Administrator version 2.27.2
* Reason: Another fix related to proper extract of filesizing information
* Modified 15:17:11 29 JUN 1999 by Administrator version 2.27.3
* Reason: Yet another change related to getting proper file size, was extracting at wrong word position
LINE = "RUN FFT.BP UPGRADE*WS"; GOSUB PROCESS.COMMAND
LINE = "RUN FFT.BP UPGRADE*FFTUNZIP"; GOSUB PROCESS.COMMAND
LINE = "CREATE-FILE CODE.CONTROL 1,1 3,1"; GOSUB PROCESS.COMMAND
LINE = "CREATE-FILE CODE.INCLUDES 1,1 13,1,B"; GOSUB PROCESS.COMMAND
LINE = "CREATE-FILE GLOBAL.CONTROL 1,1 11,1"; GOSUB PROCESS.COMMAND
LINE = "CREATE-FILE VERSION.REGISTRY 1,1 3,1"; GOSUB PROCESS.COMMAND
ITEMLIST = "PROGRAM*FFTUNZIP"
LINE = "ADDRAW GLOBAL.CONTROL PROGRAM*FFTUNZIP"
I.STACK = 7; GOSUB PROCESS.COMMAND
GOTO 7
*11469
*11469
*0 FFT
*FFT
*Will Johnson
*
*
*
*
*
*
*
*
7:
ITEMLIST = "VENDOR*FFT"
LINE = "ADDRAW GLOBAL.CONTROL VENDOR*FFT"
I.STACK = 8; GOSUB PROCESS.COMMAND
GOTO 8
*11471
*11471
*0 FFT
*Fast Forward Technologies
*Will Johnson
*180 Seventh Avenue
*Suite 102
*Santa Cruz
*CA
*95062
*8314777125
*8314777126
*8316880978
*fft2001@AOL.COM
*
*
*
*
8:
ITEMLIST = "COMPONENTS*FFTUNZIP"
LINE = "ADDRAW GLOBAL.CONTROL COMPONENTS*FFTUNZIP"
I.STACK = 9; GOSUB PROCESS.COMMAND
GOTO 9
*CODE.INCLUDES CHAR.INPUT
*CODE.INCLUDES CLIENT.EQU
*CODE.INCLUDES ENVIRONMENT
*CODE.INCLUDES GET.MY.CONTROLS
*CODE.INCLUDES GET.SENTENCE
*CODE.INCLUDES GLOBAL
*CODE.INCLUDES INSTALL.EQU
*CODE.INCLUDES MACHINE.EQU
*CODE.INCLUDES PRE.ENVIRONMENT
*CODE.INCLUDES PROGRAM.EQU
*CODE.INCLUDES VENDOR.EQU
*FFT.BP BROWSER
*FFT.BP BROWSER.UNIX.UNIVERSE
*FFT.BP BROWSER.WINDOWS98.MVBASE
*FFT.BP CLOSEFILE.UNIX.UNIVERSE
*FFT.BP CLOSEFILE.WINDOWS.MVBASE
*FFT.BP OPENFILE.UNIX.UNIVERSE
*FFT.BP OPENFILE.WINDOWS.MVBASE
*FFT.BP READFILE.UNIX.UNIVERSE
*FFT.BP READFILE.WINDOWS.MVBASE
*FFT.BP SENTENCE.FUNCTION
*FFT.BP SENTENCE.VARIABLE
9:
ITEMLIST = "INCLUDE*CHAR.INPUT"
LINE = "ADDRAW VERSION.REGISTRY INCLUDE*CHAR.INPUT"
I.STACK = 10; GOSUB PROCESS.COMMAND
GOTO 10
*NOVERS
*60193
*11477
*
10:
ITEMLIST = "INCLUDE*CLIENT.EQU"
LINE = "ADDRAW VERSION.REGISTRY INCLUDE*CLIENT.EQU"
I.STACK = 11; GOSUB PROCESS.COMMAND
GOTO 11
*3.0.2
*76189.032
*11501
*
11:
ITEMLIST = "INCLUDE*ENVIRONMENT"
LINE = "ADDRAW VERSION.REGISTRY INCLUDE*ENVIRONMENT"
I.STACK = 12; GOSUB PROCESS.COMMAND
GOTO 12
*1.26
*62643
*11497
*
12:
ITEMLIST = "INCLUDE*GET.MY.CONTROLS"
LINE = "ADDRAW VERSION.REGISTRY INCLUDE*GET.MY.CONTROLS"
I.STACK = 13; GOSUB PROCESS.COMMAND
GOTO 13
*1.4
*53722
*11490
*
13:
ITEMLIST = "INCLUDE*GET.SENTENCE"
LINE = "ADDRAW VERSION.REGISTRY INCLUDE*GET.SENTENCE"
I.STACK = 14; GOSUB PROCESS.COMMAND
GOTO 14
*1.9
*57003
*11492
*
14:
ITEMLIST = "INCLUDE*GLOBAL"
LINE = "ADDRAW VERSION.REGISTRY INCLUDE*GLOBAL"
I.STACK = 15; GOSUB PROCESS.COMMAND
GOTO 15
*1.88.4
*77217.1
*11501
*11482
*
15:
ITEMLIST = "INCLUDE*INSTALL.EQU"
LINE = "ADDRAW VERSION.REGISTRY INCLUDE*INSTALL.EQU"
I.STACK = 16; GOSUB PROCESS.COMMAND
GOTO 16
*1.12.0
*78580.3
*11501
*
16:
ITEMLIST = "INCLUDE*MACHINE.EQU"
LINE = "ADDRAW VERSION.REGISTRY INCLUDE*MACHINE.EQU"
I.STACK = 17; GOSUB PROCESS.COMMAND
GOTO 17
*1.13
*72916
*11488
*
17:
ITEMLIST = "INCLUDE*PRE.ENVIRONMENT"
LINE = "ADDRAW VERSION.REGISTRY INCLUDE*PRE.ENVIRONMENT"
I.STACK = 18; GOSUB PROCESS.COMMAND
GOTO 18
*NOVERS
*53357.925
*11499
*
18:
ITEMLIST = "INCLUDE*PROGRAM.EQU"
LINE = "ADDRAW VERSION.REGISTRY INCLUDE*PROGRAM.EQU"
I.STACK = 19; GOSUB PROCESS.COMMAND
GOTO 19
*1.10
*56678
*11488
*
19:
ITEMLIST = "INCLUDE*VENDOR.EQU"
LINE = "ADDRAW VERSION.REGISTRY INCLUDE*VENDOR.EQU"
I.STACK = 20; GOSUB PROCESS.COMMAND
GOTO 20
*1.11.0
*78915.763
*11501
*
20:
ITEMLIST = "BROWSER"
LINE = "ADDRAW VERSION.REGISTRY BROWSER"
I.STACK = 21; GOSUB PROCESS.COMMAND
GOTO 21
*1.14
*42006
*11491
*
21:
ITEMLIST = "BROWSER.WINDOWS98.MVBASE"
LINE = "ADDRAW VERSION.REGISTRY BROWSER.WINDOWS98.MVBASE"
I.STACK = 22; GOSUB PROCESS.COMMAND
GOTO 22
*1.22
*54750
*11485
*
22:
ITEMLIST = "CLOSEFILE.UNIX.UNIVERSE"
LINE = "ADDRAW VERSION.REGISTRY CLOSEFILE.UNIX.UNIVERSE"
I.STACK = 23; GOSUB PROCESS.COMMAND
GOTO 23
*NOVERS
*59302
*11485
*
23:
ITEMLIST = "CLOSEFILE.WINDOWS.MVBASE"
LINE = "ADDRAW VERSION.REGISTRY CLOSEFILE.WINDOWS.MVBASE"
I.STACK = 24; GOSUB PROCESS.COMMAND
GOTO 24
*NOVERS
*59274
*11485
*
24:
ITEMLIST = "OPENFILE.UNIX.UNIVERSE"
LINE = "ADDRAW VERSION.REGISTRY OPENFILE.UNIX.UNIVERSE"
I.STACK = 25; GOSUB PROCESS.COMMAND
GOTO 25
*NOVERS
*59159
*11485
*
25:
ITEMLIST = "OPENFILE.WINDOWS.MVBASE"
LINE = "ADDRAW VERSION.REGISTRY OPENFILE.WINDOWS.MVBASE"
I.STACK = 26; GOSUB PROCESS.COMMAND
GOTO 26
*NOVERS
*59170
*11485
*
26:
ITEMLIST = "READFILE.UNIX.UNIVERSE"
LINE = "ADDRAW VERSION.REGISTRY READFILE.UNIX.UNIVERSE"
I.STACK = 27; GOSUB PROCESS.COMMAND
GOTO 27
*NOVERS
*59638
*11485
*
27:
ITEMLIST = "READFILE.WINDOWS.MVBASE"
LINE = "ADDRAW VERSION.REGISTRY READFILE.WINDOWS.MVBASE"
I.STACK = 28; GOSUB PROCESS.COMMAND
GOTO 28
*NOVERS
*59629
*11485
*
28:
ITEMLIST = "SENTENCE.FUNCTION"
LINE = "ADDRAW VERSION.REGISTRY SENTENCE.FUNCTION"
I.STACK = 29; GOSUB PROCESS.COMMAND
GOTO 29
*NOVERS
*53647
*11490
*
29:
ITEMLIST = "SENTENCE.VARIABLE"
LINE = "ADDRAW VERSION.REGISTRY SENTENCE.VARIABLE"
I.STACK = 30; GOSUB PROCESS.COMMAND
GOTO 30
*NOVERS
*53670
*11490
*
30:
ITEMLIST = "CHAR.INPUT"
LINE = "ADDRAW CODE.INCLUDES CHAR.INPUT"
I.STACK = 31; GOSUB PROCESS.COMMAND
GOTO 31
*      T.COMPONENT = gCODE.INCLUDES:' CHAR.INPUT'
*      GOSUB gADD.COMPONENT
*      INPUT ANS,0
31:
ITEMLIST = "ce"
LINE = "ADDRAW CODE.CONTROL ce"
I.STACK = 32; GOSUB PROCESS.COMMAND
GOTO 32
*CODE.INCLUDES CLIENT.EQU
*
32:
ITEMLIST = "CLIENT.EQU"
LINE = "ADDRAW CODE.CONTROL CLIENT.EQU"
I.STACK = 33; GOSUB PROCESS.COMMAND
GOTO 33
*ce
*
33:
ITEMLIST = "CLIENT.EQU"
LINE = "ADDRAW CODE.INCLUDES CLIENT.EQU"
I.STACK = 34; GOSUB PROCESS.COMMAND
GOTO 34
*      INCLUDEVERS ='3.0.2'
*      gINCLUDE = TRUE
**!*!  VERSION CONTROL
*      T.INCLUDE.ITEM = "CLIENT.EQU" ; T.MNE = "ce"
*      INCLUDE.PREREQUISITES = gCODE.INCLUDES:' GLOBAL'
*      INCLUDE.PREREQUISITES<-1> = gCODE.INCLUDES:' ENVIRONMENT'
*      *
*      T.INCLUDE = gCODE.INCLUDES:' ':T.INCLUDE.ITEM
*      IF gTEST.LEVEL THEN PRINT 'In include ':T.INCLUDE
**
*      T.COMPONENT = T.INCLUDE ; GOSUB gADD.COMPONENT
*      IF ERROR = '' THEN GOSUB gCHECK.PREREQUISITES
*      IF ERROR = '' THEN GOSUB gVERIFY.MNEMONIC
*      IF ERROR = '' THEN
*         IF gREG.CHK THEN
*            gMACHINE = '' ; GOSUB gCHECK.REGISTRY
*         END
*      END
*      IF ERROR # '' THEN GOTO ceLEAVE
**
**!*!  START TABLE
*      EQUATE V.CLIENT.CREATEDATE TO 1
*      EQUATE V.CLIENT.LASTMODDATE TO 2
*      EQUATE V.CLIENT.LASTMODID TO 3
*      EQUATE V.CLIENT.NAME TO 4
*      EQUATE V.CLIENT.CONTACT TO 5
*      EQUATE V.CLIENT.ADDR1 TO 6
*      EQUATE V.CLIENT.ADDR2 TO 7
*      EQUATE V.CLIENT.CITY TO 8
*      EQUATE V.CLIENT.STATE TO 9
*      EQUATE V.CLIENT.ZIP TO 10
*      EQUATE V.CLIENT.VPHONE1 TO 11      ; *VOICE PHONE NUMBER
*      EQUATE V.CLIENT.VPHONE2 TO 12
*      EQUATE V.CLIENT.FAX TO 13
*      EQUATE V.CLIENT.EMAIL TO 14
*      EQUATE V.CLIENT.WEBURL TO 15       ; * WEB URL
**!*!  END TABLE
*      EQUATE S.CLIENT.REC TO 16
*      DIM CLIENT.REC(16)
**
*      EQUATE HELP.CLIENT.NAME TO 'Enter the name of your company'
*      EQUATE HELP.CLIENT.CONTACT TO 'Enter your name, first and last'
*      EQUATE HELP.CLIENT.ADDR1 TO 'Enter the street address of your company'
*      EQUATE HELP.CLIENT.ADDR2 TO 'Enter any second street address line your company uses (not city state zip)'
*      EQUATE HELP.CLIENT.CITY TO 'Enter the city your company is in'
*      EQUATE HELP.CLIENT.STATE TO 'Enter the state your company is in'
*      EQUATE HELP.CLIENT.ZIP TO 'Enter the postal (zip) code of your company'
*      EQUATE HELP.CLIENT.VPHONE1 TO 'Enter your business phone number'
*      EQUATE HELP.CLIENT.VPHONE2 TO 'Enter an alternate business phone number (switchboard?)'
*      EQUATE HELP.CLIENT.FAX TO 'Enter your fax number'
*      EQUATE HELP.CLIENT.EMAIL TO 'Enter you E-mail address'
*      EQUATE HELP.CLIENT.WEBURL TO 'Enter your web site address if any'
**
*      ceK.CONTROL = 'CLIENT*':K.CLIENT
*      T.COMPONENT = eCONTROL.FILE:' ':ceK.CONTROL
*      GOSUB gADD.COMPONENT
**
*      gREADTRY = 0
*      LOOP
*         gREADDONE = TRUE
*         MATREAD CLIENT.REC FROM eF.CONTROL,ceK.CONTROL THEN
*            CLIENT.DONE = TRUE
*         END ELSE
*            IF gSTANDALONE THEN CLIENT.DONE = TRUE ELSE
*               K.CONTROL = ceK.CONTROL ; GOSUB gCREATE.CONTROL
*            END
*         END
*      UNTIL gREADDONE DO REPEAT
*      IF ERROR # '' THEN GOTO ceLEAVE
**
*ceLEAVE:
*      IF gTEST.LEVEL THEN PRINT 'Leaving include ':T.INCLUDE
*      gINCLUDE = FALSE
** Modified 21:22:33  24 MAY 1999 by FFT version 1.1
** Reason: Add version control
** Modified 21:52:45  24 MAY 1999 by FFT version 1.2
** Reason: Fix typo in name of component
** Modified 16:52:19  25 MAY 1999 by FFT version 1.3
** Reason: Change location of CONTROL.FILE from mnemonic go to mnemonic e
** Modified 14:29:13  30 MAY 1999 by FFT version 1.4
** Reason: Add variable ceK.CONTROL
** Modified 13:58:54  31 MAY 1999 by FFT version 1.5
** Reason: Use add component global subroutine
** Modified 14:01:39  31 MAY 1999 by FFT version 1.6
** Reason: Add global subroutines check prerequisites and verify mnemonic
** Modified 14:04:41  31 MAY 1999 by FFT version 1.7
** Reason: Add standard controls
** Modified 13:19:56 27 MAY 1999 by willj version 1.8
** Reason: Fix VERSION CONTROL line
** Modified 17:06:35 27 MAY 1999 by willj version 1.9
** Reason: Remove extra add component logic
** Modified 17:12:17 27 MAY 1999 by willj version 1.10
** Reason: Set value of K.CONTROL to this includes when calling CREATE.CONTROL global routine
** Modified 14:07:01 02 JUN 1999 by willj version 1.13
** Reason:
** Modified 18:31:17  11 JUN 1999 by FFT version 1.14
** Reason:
** Modified 18:32:19  11 JUN 1999 by FFT version 1.15
** Reason: Install new readtry logic to create the control
** Modified 15:45:43  14 JUN 1999 by FFT version 1.16
** Reason: Skip control creation for standalone programs
** Modified 10:15:38  15 JUN 1999 by FFT version 1.17
** Reason: Put a space after field numbers for phone and weburl before the semi-colon
** Modified 18:50:13 27 JUN 1999 by Administrator version 2.0.0
** Reason: Add embedded help text
** Modified 20:38:27 27 JUN 1999 by Administrator version 3.0.1
** Reason: Pull the help text out of being embedded in the table and make it a seperate table
** Modified 21:09:48 27 JUN 1999 by Administrator version 3.0.2
** Reason: Remove the unnecessary tags around the help table and the general help message
34:
ITEMLIST = "e"
LINE = "ADDRAW CODE.CONTROL e"
I.STACK = 35; GOSUB PROCESS.COMMAND
GOTO 35
*CODE.INCLUDES ENVIRONMENT
*
35:
ITEMLIST = "ENVIRONMENT"
LINE = "ADDRAW CODE.CONTROL ENVIRONMENT"
I.STACK = 36; GOSUB PROCESS.COMMAND
GOTO 36
*e
*
36:
ITEMLIST = "ENVIRONMENT"
LINE = "ADDRAW CODE.INCLUDES ENVIRONMENT"
I.STACK = 37; GOSUB PROCESS.COMMAND
GOTO 37
*      INCLUDEVERS ='1.26'
*      gINCLUDE = TRUE
**!*!  VERSION CONTROL
*      T.INCLUDE.ITEM = "ENVIRONMENT" ; T.MNE = 'e'
*      INCLUDE.PREREQUISITES = gCODE.INCLUDES:' GLOBAL'
**
*      T.INCLUDE = gCODE.INCLUDES:' ':T.INCLUDE.ITEM
*      IF gTEST.LEVEL THEN PRINT 'In include ':T.INCLUDE
**
*      T.COMPONENT = T.INCLUDE ; GOSUB gADD.COMPONENT
*      IF ERROR = '' THEN GOSUB gCHECK.PREREQUISITES
*      IF ERROR = '' THEN GOSUB gVERIFY.MNEMONIC
*      IF ERROR = '' THEN
*         IF gREG.CHK THEN
*            gINCLUDE = TRUE ; gMACHINE = '' ; GOSUB gCHECK.REGISTRY
*         END
*      END
*      IF ERROR # '' THEN GOTO eLEAVE
**
*      eCONTROL.FILE = 'GLOBAL.CONTROL'
*      LOCATE(eCONTROL.FILE,gSEGMENT.FILES;eW.SEGMENT.FILE;'AL') ELSE
*         gSEGMENT.FILES = INSERT(gSEGMENT.FILES,eW.SEGMENT.FILE;eCONTROL.FILE)
*      END
*      gOPENTRY = 0
*      LOOP
*         gOPENDONE = TRUE
*         gFILENAME = eCONTROL.FILE ; gFILESIZE = "1,1 11,1"
*         gCREATEFILE.CMD = 'CREATE-FILE ':gFILENAME:' ':gFILESIZE
*         T.FILE = gCREATEFILE.CMD ; GOSUB gADD.FILE
*         OPEN eCONTROL.FILE TO eF.CONTROL ELSE GOSUB gCREATE.FILE
*      UNTIL gOPENDONE DO REPEAT
*      IF ERROR # '' THEN GOTO eLEAVE
**
*eLEAVE:
*      IF gTEST.LEVEL THEN PRINT 'Leaving include ':T.INCLUDE
*      gINCLUDE = FALSE
** Modified 17:38:58  24 MAY 1999 by FFT version 1.1
** Reason: Write a generic SYSTEM Q-pointer if none exists in the MD
** Modified 17:54:57  24 MAY 1999 by FFT version 1.2
** Reason: Add INCLUDE in front of VERS variable
** Modified 18:18:28  24 MAY 1999 by FFT version 1.3
** Reason: Change name of variable from MD.FILE to VERBS.FILE
** Modified 18:25:15  24 MAY 1999 by FFT version 1.4
** Reason: Add INCLUDE in front of VERS argument
** Modified 20:15:51  24 MAY 1999 by FFT version 1.5
** Reason: Add new call to global ADD.COMPONENTS routine
** Modified 20:20:08  24 MAY 1999 by FFT version 1.6
** Reason: Add new calls to global subroutines
** Modified 20:25:06  24 MAY 1999 by FFT version 1.7
** Reason: Fix typo in called named
** Modified 20:43:26  24 MAY 1999 by FFT version 1.8
** Reason: Typo with name of global subroutine
** Modified 20:47:27  24 MAY 1999 by FFT version 1.9
** Reason: Fix typo with name of called global subroutine
** Modified 13:33:58  25 MAY 1999 by FFT version 1.10
** Reason: Use parameter for goCONTROL.FILE instead of hard-coding it
** Modified 16:11:50  25 MAY 1999 by FFT version 1.11
** Reason: Debugging
** Modified 16:12:54  25 MAY 1999 by FFT version 1.12
** Reason: Move SYSTEM file open to MACHINE equate
** Modified 16:15:57  25 MAY 1999 by FFT version 1.13
** Reason: Debug
** Modified 16:16:36  25 MAY 1999 by FFT version 1.14
** Reason: Debug
** Modified 16:27:48  25 MAY 1999 by FFT version 1.15
** Reason: Merge GLOBAL.OPENS include into ENVIRONMENT include
** Modified 13:23:43 27 MAY 1999 by willj version 1.16
** Reason: Allow display of TTY for SCCOE
** Modified 16:34:56 27 MAY 1999 by willj version 1.17
** Reason: Add sendmail verb variable
** Modified 14:27:14  31 MAY 1999 by FFT version 1.18
** Reason: Upgrade standard controls
** Modified 13:59:18 02 JUN 1999 by willj version 1.18
** Reason:
** Modified 15:45:37 03 JUN 1999 by willj version 1.19
** Reason:
** Modified 12:13:11 09 JUN 1999 by willj version 1.20
** Reason:
** Modified 14:48:23  11 JUN 1999 by FFT version 1.21
** Reason: Move some system-level variables to PRE.ENVIRONMENT
** Modified 17:53:21  11 JUN 1999 by FFT version 1.22
** Reason: Add a call to createfile so this include can create the file it needs if its not present
** Modified 12:34:50  14 JUN 1999 by FFT version 1.23
** Reason: Add the create-file directive as a component
** Modified 16:04:39  20 JUN 1999 by FFT version 1.24
** Reason:
** Modified 19:45:53  21 JUN 1999 by FFT version 1.25
** Reason: New variables to support maintaining a list of create-file directives
** Modified 17:24:03 23 JUN 1999 by willj version 1.26
** Reason: Move tohostpath and sendmail up to pre environment
37:
ITEMLIST = "gc"
LINE = "ADDRAW CODE.CONTROL gc"
I.STACK = 38; GOSUB PROCESS.COMMAND
GOTO 38
*CODE.INCLUDES GET.MY.CONTROLS
*
38:
ITEMLIST = "GET.MY.CONTROLS"
LINE = "ADDRAW CODE.CONTROL GET.MY.CONTROLS"
I.STACK = 39; GOSUB PROCESS.COMMAND
GOTO 39
*gc
*
39:
ITEMLIST = "GET.MY.CONTROLS"
LINE = "ADDRAW CODE.INCLUDES GET.MY.CONTROLS"
I.STACK = 40; GOSUB PROCESS.COMMAND
GOTO 40
*      INCLUDEVERS ='1.4'
*      gINCLUDE = TRUE
**!*!  VERSION CONTROL
*      T.INCLUDE.ITEM = "GET.MY.CONTROLS" ; T.MNE = 'gc'
*      INCLUDE.PREREQUISITES = gCODE.INCLUDES:' GLOBAL'
*      T.INCLUDE = gCODE.INCLUDES:' ':T.INCLUDE.ITEM
*      IF gTEST.LEVEL THEN PRINT 'In include ':T.INCLUDE
**
*      T.COMPONENT = T.INCLUDE ; GOSUB gADD.COMPONENT
*      IF ERROR = '' THEN GOSUB gCHECK.PREREQUISITES
*      IF ERROR = '' THEN GOSUB gVERIFY.MNEMONIC
*      IF ERROR = '' THEN
*         IF gREG.CHK THEN
*            gINCLUDE = TRUE ; gMACHINE = '' ; GOSUB gCHECK.REGISTRY
*         END
*      END
*      IF ERROR # '' THEN GOTO gcLEAVE
**
** Determine program information
*$INCLUDE CODE.INCLUDES PROGRAM.EQU
*      IF ERROR # '' THEN GOTO gcLEAVE
*      IF NOT(PROGRAM.DONE) THEN
*         ERROR = 'Error ':K.CONTROL:' control item not in ':eCONTROL.FILE
*         IF gERROR.MODE = 'DISPLAY' THEN GOSUB gABORT.WITH.INPUT
*         GOTO gcLEAVE
*      END
**
** Determine program vendor information
*      K.VENDOR = PROGRAM.REC(V.PROGRAM.VENDOR)
*$INCLUDE CODE.INCLUDES VENDOR.EQU
*      IF ERROR # '' THEN GOTO gcLEAVE
*      IF NOT(VENDOR.DONE) THEN
*         ERROR = 'Error ':K.CONTROL:' control item not in ':eCONTROL.FILE
*         IF gERROR.MODE = 'DISPLAY' THEN GOSUB gABORT.WITH.INPUT
*         GOTO gcLEAVE
*      END
**
** Determine the name of the client I'm running on
*      K.CONTROL = 'CLIENT*local'
*      READV K.CLIENT FROM eF.CONTROL,K.CONTROL,1 ELSE
*         CRT 'Enter a three to six characters abbreviation of '
*         CRT 'your company name and/or site designation'
*         CRT 'Please try to make it as unique as you can ': ; INPUT K.CLIENT
*         WRITEV K.CLIENT ON eF.CONTROL,K.CONTROL,1
*      END
**
** Determine client information
*$INCLUDE CODE.INCLUDES CLIENT.EQU
*      IF ERROR # '' THEN GOTO gcLEAVE
*      IF NOT(CLIENT.DONE) THEN
*         ERROR = 'Error ':K.CLIENT:' control item not in ':eCONTROL.FILE
*         IF gERROR.MODE = 'DISPLAY' THEN GOSUB gABORT.WITH.INPUT
*         GOTO gcLEAVE
*      END
**
** Determine machine information
*      K.MACHINE = K.CLIENT
*$INCLUDE CODE.INCLUDES MACHINE.EQU
*      IF ERROR # '' THEN GOTO gcLEAVE
**
** Determine install information
*      K.INSTALL = K.PROGRAM:"*":K.CLIENT
*$INCLUDE CODE.INCLUDES INSTALL.EQU
*      IF ERROR # '' THEN GOTO gcLEAVE
*      IF NOT(INSTALL.DONE) THEN
*         PRINT 'First time installion'
*         MAT INSTALL.REC = ''
*         FOR I.TEMP = 1 TO S.PROGRAM.REC
*            INSTALL.REC(I.TEMP) = PROGRAM.REC(I.TEMP)
*         NEXT I.TEMP
*         INSTALL.REC(V.INSTALL.INSTALLDATE) = DATE()
*         INSTALL.REC(V.INSTALL.EXPIREDATE) = DATE() + 30
*         MATWRITE INSTALL.REC ON eF.CONTROL,'INSTALL*':K.INSTALL
*      END
*      IF ERROR # '' THEN GOTO gcLEAVE
*gcLEAVE:
*      IF gTEST.LEVEL THEN PRINT 'Leaving include ':T.INCLUDE
*      gINCLUDE = FALSE
*      IF RETURNTOME THEN RETURN
** Modified 14:29:56  31 MAY 1999 by FFT version 1.1
** Reason: Upgrade to standard controls
** Modified 17:20:35  14 JUN 1999 by FFT version 1.2
** Reason: Allow the local client setting to be made on a first-run
** Modified 17:22:37  14 JUN 1999 by FFT version 1.3
** Reason: Fix logic in writing client name on first run
** Modified 14:55:22 16 JUN 1999 by willj version 1.4
** Reason:
40:
ITEMLIST = "gs"
LINE = "ADDRAW CODE.CONTROL gs"
I.STACK = 41; GOSUB PROCESS.COMMAND
GOTO 41
*CODE.INCLUDES GET.SENTENCE
*
41:
ITEMLIST = "GET.SENTENCE"
LINE = "ADDRAW CODE.CONTROL GET.SENTENCE"
I.STACK = 42; GOSUB PROCESS.COMMAND
GOTO 42
*gs
*
42:
ITEMLIST = "GET.SENTENCE"
LINE = "ADDRAW CODE.INCLUDES GET.SENTENCE"
I.STACK = 43; GOSUB PROCESS.COMMAND
GOTO 43
*      INCLUDEVERS ='1.9'
*      gINCLUDE = TRUE
**!*!  VERSION CONTROL
*      T.INCLUDE.ITEM = "GET.SENTENCE" ; T.MNE = 'gs'
*      INCLUDE.PREREQUISITES = gCODE.INCLUDES:' GLOBAL'
*      *
*      T.INCLUDE = gCODE.INCLUDES:' ':T.INCLUDE.ITEM
*      IF gTEST.LEVEL THEN PRINT 'In include ':T.INCLUDE
**
*      T.COMPONENT = T.INCLUDE ; GOSUB gADD.COMPONENT
*      IF ERROR = '' THEN GOSUB gCHECK.PREREQUISITES
*      IF ERROR = '' THEN GOSUB gVERIFY.MNEMONIC
*      IF ERROR = '' THEN
*         IF gREG.CHK THEN
*            gINCLUDE = TRUE ; gMACHINE = '' ; GOSUB gCHECK.REGISTRY
*         END
*      END
*      IF ERROR # '' THEN GOTO gsLEAVE
**
*      BEGIN CASE
*         CASE MACHINE.SENTENCE = 'SENTENCE()'
*            CALL SENTENCE.FUNCTION(SENT)
*         CASE MACHINE.SENTENCE = '@SENTENCE'
*            CALL SENTENCE.VARIABLE(SENT)
*         CASE MACHINE.SENTENCE = 'PROCREAD'
*            PROCREAD SENT ELSE SENT = ''
*         CASE 1
*            ERROR = 'Cannot assign a GET-SENTENCE method to this machine'
*            ERROR<-1> = MACHINE.OS:' ':MACHINE.DATABASE:' ':MACHINE.SENTENCE
*      END CASE
*gsLEAVE:
*      IF gTEST.LEVEL THEN PRINT 'Leaving include ':T.INCLUDE
*      gINCLUDE = FALSE
** Modified 20:48:05  30 MAY 1999 by FFT version 1.1
** Reason:
** Modified 20:48:50  30 MAY 1999 by FFT version 1.2
** Reason: Support systems that can only get a sentence by PROCREAD
** Modified 21:07:37  30 MAY 1999 by FFT version 1.3
** Reason: Fix variable name VERS should be INCLUDEVERS so it doesn't mess including program
** Modified 22:17:32  30 MAY 1999 by FFT version 1.4
** Reason: Add a failure case so I know when I need to update my machine data
** Modified 14:32:15  31 MAY 1999 by FFT version 1.5
** Reason: Add standard controls
** Modified 14:52:38  11 JUN 1999 by FFT version 1.6
** Reason:
** Modified 14:53:48 16 JUN 1999 by willj version 1.7
** Reason:
** Modified 14:56:20 16 JUN 1999 by willj version 1.8
** Reason:
** Modified 15:50:03  18 JUN 1999 by FFT version 1.9
** Reason:
43:
ITEMLIST = "g"
LINE = "ADDRAW CODE.CONTROL g"
I.STACK = 44; GOSUB PROCESS.COMMAND
GOTO 44
*CODE.INCLUDES GLOBAL
*
44:
ITEMLIST = "GLOBAL"
LINE = "ADDRAW CODE.CONTROL GLOBAL"
I.STACK = 45; GOSUB PROCESS.COMMAND
GOTO 45
*g
*
45:
ITEMLIST = "GLOBAL"
LINE = "ADDRAW CODE.INCLUDES GLOBAL"
I.STACK = 46; GOSUB PROCESS.COMMAND
GOTO 46
*      INCLUDEVERS ='1.88.4'
**!*!  VERSION CONTROL
*      T.INCLUDE.ITEM = 'GLOBAL' ; T.MNE = 'g'
**
*      EQUATE FALSE TO 0, TRUE TO 1, ZEROED TO 0, SET TO 1
*      EQUATE NO TO 0, YES TO 1
*      EQUATE SM TO CHAR(252), VM TO CHAR(253), AM TO CHAR(254)
*      EQUATE BS TO CHAR(8), CR TO CHAR(13), ESC TO CHAR(27)
*      EQUATE LF TO CHAR(10)
*      gINCLUDE = TRUE
*      gTERM.WIDTH = SYSTEM(2)
**
*      K.CONTROL = ''
*      gSTANDALONE = (VERS"R#3" = ".SA")
*      gERROR.MODE = 'DISPLAY'            ; * Turn this on until we are done with global
**
*      gCODE.INCLUDES = 'CODE.INCLUDES'
*      T.INCLUDE = gCODE.INCLUDES:' ':T.INCLUDE.ITEM
*      gSEGMENT.FILES = gCODE.INCLUDES
**
*$INCLUDE CODE.INCLUDES PRE.ENVIRONMENT
**
*      T.COMPONENT = gCODE.INCLUDES:' PRE.ENVIRONMENT'
*      GOSUB gADD.COMPONENT
**
*      gOPENTRY = 0
*      LOOP
*         gOPENDONE = TRUE
*         gFILENAME = gCODE.INCLUDES ; gFILESIZE = "1,1 13,1,B"
*         gCREATEFILE.CMD = 'CREATE-FILE ':gFILENAME:' ':gFILESIZE
*         T.FILE = gCREATEFILE.CMD ; GOSUB gADD.FILE
*         OPEN gCODE.INCLUDES TO gF.CODE.INCLUDES ELSE GOSUB gCREATE.FILE
*      UNTIL gOPENDONE DO REPEAT
*      IF ERROR # '' THEN GOTO gLEAVE
**
*      GOTO gSKIP.GLOBAL.SUBS
**
*gABORT.WITH.INPUT:
*      gS.ERROR = DCOUNT(ERROR,AM)
*      PRINT 'In program ':K.PROGRAM:' and include ':T.INCLUDE
*      FOR gI.ERROR = 1 TO gS.ERROR
*         PRINT ERROR<gI.ERROR>

*      NEXT gI.ERROR
*      PRINT 'Aborting.  Hit any key...':
*      GOSUB gCHAR.INPUT
*      PRINT
*      RETURN
**
*gADD.COMPONENT:
*      LOCATE(T.COMPONENT,COMPONENTS;W.COMPONENT;'AL') ELSE
*         COMPONENTS = INSERT(COMPONENTS,W.COMPONENT;T.COMPONENT)
*      END
*      RETURN
**
*gADD.FILE:
*      LOCATE(T.FILE,FILES;W.FILE;'AL') ELSE
*         FILES = INSERT(FILES,W.FILE;T.FILE)
*      END
*      RETURN
**
*gBAD.TABLE.FORMAT:
*      gERROR = "Cannot verify that table has proper format on line "
*      gERROR = gERROR:gI.INCLUDE :" looking for ":gERROR
*      GOSUB gCREATE.CONTROL.ERROR
*      RETURN
**
*gCHAR.INPUT:
*$INCLUDE CODE.INCLUDES CHAR.INPUT
*      RETURN
**
*gCHECK.PREREQUISITES:
*      gS.INCLUDE.PREREQUISITES = DCOUNT(INCLUDE.PREREQUISITES,AM)
*      FOR gI.INCLUDE.PREREQUISITES = 1 TO gS.INCLUDE.PREREQUISITES
*         gT.INCLUDE.PREREQUISITES = INCLUDE.PREREQUISITES<gI.INCLUDE.PREREQUISITES>
*         LOCATE(gT.INCLUDE.PREREQUISITES,COMPONENTS;gW.COMPONENT) ELSE
*            ERROR = "Pre-requisite component "
*            ERROR = ERROR:gT.INCLUDE.PREREQUISITES:" is not present."
*            GOSUB gABORT.WITH.INPUT ; CRT
*         END
*      NEXT gI.INCLUDE.PREREQUISITES
*      RETURN
**
*gBUILD.REGISTRY.ID:
*      IF gINCLUDE THEN
*         gK.VERSION.REGISTRY = "INCLUDE*":T.INCLUDE.ITEM
*         IF gMACHINE # '' THEN
*            gK.VERSION.REGISTRY = gK.VERSION.REGISTRY:"*":gMACHINE
*         END
*      END ELSE
*         gC.CHAR = INDEX(T.COMPONENT,"#VERS",1)
*         IF gC.CHAR THEN
*            gK.VERSION.REGISTRY = T.COMPONENT[1,gC.CHAR]
*         END ELSE
*            gK.VERSION.REGISTRY = T.COMPONENT
*         END
*      END
*      RETURN
**
*gCHECK.REGISTRY:
*      IF gTEST.LEVEL THEN PRINT "CHECKING REGISTRY ON ":
*      GOSUB gBUILD.REGISTRY.ID
*      IF gINCLUDE THEN gVERS = INCLUDEVERS ELSE gVERS = VERS
*      IF gTEST.LEVEL THEN PRINT gK.VERSION.REGISTRY:" VERS ":gVERS
*      READV NEWEST.VERS FROM gF.VERSION.REGISTRY,gK.VERSION.REGISTRY,1 THEN
*         IF NEWEST.VERS # gVERS THEN
*            gMSG = 'You are running version ':gVERS:' of '
*            IF gINCLUDE THEN gMSG = gMSG:'include ':T.INCLUDE.ITEM ELSE
*               gMSG = gMSG:'component ':T.COMPONENT
*            END
*            gHOLDK.VERSION.REGISTRY = gK.VERSION.REGISTRY
*            IF gK.VERSION.REGISTRY"R#1" # "#" THEN
*               gK.VERSION.REGISTRY = gK.VERSION.REGISTRY:"#"
*            END
*            gK.VERSION.REGISTRY = gK.VERSION.REGISTRY:"VERS":gVERS
*            READ gR.VERSION.REGISTRY FROM gF.VERSION.REGISTRY,gK.VERSION.REGISTRY THEN
*               gDUMMY = 'Created ':OCONV(gR.VERSION.REGISTRY<3>,'D4-')
*               gDUMMY = gDUMMY:' at '
*               gDUMMY = gDUMMY:OCONV(gR.VERSION.REGISTRY<2>,'MTS')
*               gMSG<-1> = gDUMMY
*            END
*            gMSG<-1> = 'The newest version is ':NEWEST.VERS
*            gK.VERSION.REGISTRY = gHOLDK.VERSION.REGISTRY
*            READ gR.VERSION.REGISTRY FROM gF.VERSION.REGISTRY,gK.VERSION.REGISTRY THEN
*               gDUMMY = 'Created ':OCONV(gR.VERSION.REGISTRY<3>,'D4-')
*               gDUMMY = gDUMMY:' at '
*               gDUMMY = gDUMMY:OCONV(gR.VERSION.REGISTRY<2>,'MTS')
*               gMSG<-1> = gDUMMY
*            END
*            GOSUB gMESSAGE ; CRT
*            CRT 'Hit any key to acknowledge...':
*$INCLUDE CODE.INCLUDES CHAR.INPUT
*            CRT
*         END
*      END
*      RETURN
**
*gCREATE.CONTROL:
*      gREADTRY = gREADTRY + 1
*      IF gREADTRY = 1 THEN
*         gMSG = ""
*         gMSG<-1> = K.CONTROL:' is not in the ':eCONTROL.FILE:' file.'
*         gMSG<-1> = 'Would you like to create it now (Y/N) '
*         GOSUB gMESSAGE ; INPUT gCREATEIT,2
*         IF gCREATEIT = 'Y' THEN
*            gACTION = 'CREATE' ; GOSUB gCREATE.CONTROL.HORSE
*            gREADDONE = FALSE
*         END ELSE ERROR = 'User declined create' ; GOSUB gABORT.WITH.INPUT
*      END ELSE ERROR = 'Create failed' ; GOSUB gABORT.WITH.INPUT
*      RETURN
**
*gCREATE.CONTROL.ERROR:
*      ERROR<-1> = gERROR:" ":gK.CODE.INCLUDES:" in file ":gCODE.INCLUDES
*      GOSUB gABORT.WITH.INPUT ; STOP
*      RETURN
**
*gCREATE.CONTROL.HORSE:
*      gK.CONTROL = FIELD(K.CONTROL,'*',1) ; gINSTANCE = FIELD(K.CONTROL,'*',2)
*      gK.CODE.INCLUDES = gK.CONTROL:'.EQU'
*      CRT ; CRT 'Attempt to ':gACTION:' ':gK.CONTROL:' CONTROL ':
*      CRT 'with instance ':gINSTANCE:
*      CRT ' from table ':gK.CODE.INCLUDES ; CRT
*      READ gR.INCLUDE FROM gF.CODE.INCLUDES,gK.CODE.INCLUDES THEN
*         LOCATE("*!*!  START TABLE",gR.INCLUDE;gW.START.TABLE) THEN
*            gW.START.TABLE += 1
*            LOCATE("*!*!  END TABLE",gR.INCLUDE;gW.END.TABLE) THEN
*               READU gR.CONTROL FROM eF.CONTROL,K.CONTROL THEN
*                  IF gACTION = 'CREATE' THEN
*                     gERROR = " Create attempted on existing item"
*                     GOSUB gCREATE.CONTROL.ERROR
*                  END
*               END ELSE
*                  IF gACTION = 'MOD' THEN
*                     gERROR = " Modify attempted on non-existant item"
*                     GOSUB gCREATE.CONTROL.ERROR
*                  END
*                  gR.CONTROL = ''
*               END
*               GOSUB gCREATE.CONTROL.SET.ALL.FIELDS
*               WRITE gR.CONTROL ON eF.CONTROL,K.CONTROL
*            END ELSE
*               gERROR = " Can't find beginning of equate table "
*               GOSUB gCREATE.CONTROL.ERROR
*            END
*         END ELSE
*            gERROR = " Can't find end of equate table "
*            GOSUB gCREATE.CONTROL.ERROR
*         END
*      END ELSE
*         gERROR = " Can't read item "
*         GOSUB gCREATE.CONTROL.ERROR
*      END
*      RETURN
**
*gCREATE.CONTROL.SET.FIELD:
*      gTABLE.FIELD.NUM = FIELD(gT.INCLUDE," ",4)
*      BEGIN CASE
*         CASE gTABLE.FIELD.NAME = "CREATEDATE"
*            gR.CONTROL<gTABLE.FIELD.NUM> = DATE()
*         CASE gTABLE.FIELD.NAME = "LASTMODDATE"
*            gR.CONTROL<gTABLE.FIELD.NUM> = DATE()
*         CASE gTABLE.FIELD.NAME = "LASTMODID"
*            gR.CONTROL<gTABLE.FIELD.NUM> = USER.ID
*         CASE gTABLE.FIELD.NAME = "INSTALLDATE"
*            IF gACTION = 'CREATE' THEN gR.CONTROL<gTABLE.FIELD.NUM> = DATE()
*         CASE gTABLE.FIELD.NAME = "EXPIREDATE"
*            IF gACTION = 'CREATE' THEN gR.CONTROL<gTABLE.FIELD.NUM> = DATE()+45
*         CASE 1
*            IF gTABLE.FIELD.HELP # '' THEN PRINT gTABLE.FIELD.HELP
*            IF INDEX(gTABLE.FIELD.NAME,'DATE',1) THEN
*               PRINT 'Today is ':OCONV(DATE(),'D4-'):
*               PRINT ' internal is ':DATE()
*            END
*            PRINT gTABLE.FIELD.NAME:" = ":
*            IF gACTION = 'MOD' THEN
*               gOLDFIELD = gR.CONTROL<gTABLE.FIELD.NUM>

*               PRINT gOLDFIELD:STR(BS,LEN(gOLDFIELD)):
*            END ELSE gOLDFIELD = ''
*            INPUT ANS
*            BEGIN CASE
*               CASE ANS = '' ; gR.CONTROL<gTABLE.FIELD.NUM> = gOLDFIELD
*               CASE TRIM(ANS) = '' ; gR.CONTROL<gTABLE.FIELD.NUM> = TRIM(ANS)
*               CASE 1 ; gR.CONTROL<gTABLE.FIELD.NUM> = ANS
*            END CASE
*      END CASE
*      RETURN
**
*gCREATE.CONTROL.SET.ALL.FIELDS:
*      gW.END.TABLE -= 1
*      FOR gI.INCLUDE = gW.START.TABLE TO gW.END.TABLE
*         gT.INCLUDE = TRIM(gR.INCLUDE<gI.INCLUDE>)
*         IF FIELD(gT.INCLUDE," ",1) # "EQUATE" THEN
*            IF FIELD(gT.INCLUDE," ",1) # "EQU" THEN
*               gERROR = "EQUATE or EQU" ; GOSUB gBAD.TABLE.FORMAT
*            END
*         END
*         gTABLE.FIELD.NAME = FIELD(gT.INCLUDE," ",2)
*         IF FIELD(gTABLE.FIELD.NAME,".",1) # "V" THEN
*            gERROR = "V" ; GOSUB gBAD.TABLE.FORMAT
*         END
*         IF FIELD(gTABLE.FIELD.NAME,".",2) # gK.CONTROL THEN
*            gERROR = gK.CONTROL ; GOSUB gBAD.TABLE.FORMAT
*         END
*         gTABLE.FIELD.NAME = FIELD(gTABLE.FIELD.NAME,".",3)
*         IF FIELD(gT.INCLUDE," ",3) # "TO" THEN
*            gERROR = "TO" ; GOSUB gBAD.TABLE.FORMAT
*         END
** Look for any help
*         gTABLE.FIELD.HELP = 'HELP.':gK.CONTROL:'.':gTABLE.FIELD.NAME
*         gC.HELP = INDEX(gR.INCLUDE,gTABLE.FIELD.HELP,1)
*         IF gC.HELP THEN
*            gW.HELP = DCOUNT(gR.INCLUDE[1,gC.HELP],AM)
*            gTABLE.FIELD.HELP = TRIM(gR.INCLUDE<gW.HELP>)
*            gDUMMY = FIELD(gTABLE.FIELD.HELP," ",4)
*            gDUMMY = gTABLE.FIELD.HELP[COL1(),LEN(gTABLE.FIELD.HELP)]
*            CONVERT "'" TO "" IN gDUMMY
*            CONVERT '"' TO "" IN gDUMMY
*            gTABLE.FIELD.HELP = gDUMMY
*         END ELSE gTABLE.FIELD.HELP = ''
*         GOSUB gCREATE.CONTROL.SET.FIELD
*      NEXT gI.INCLUDE
*      RETURN
**
*gCREATE.FILE:
*      gOPENTRY = gOPENTRY + 1
*      IF gOPENTRY = 1 THEN
*         gMSG = ''
*         gMSG<-1> = "Can't open required file ":gFILENAME
*         gMSG<-1> = "Would you like me to create it (Y/N) "
*         GOSUB gMESSAGE ; INPUT gCREATEIT
*         IF gCREATEIT = 'Y' THEN
*            PRINT gCREATEFILE.CMD ; EXECUTE gCREATEFILE.CMD
*            gOPENDONE = FALSE
*         END ELSE ERROR = 'User declined create' ; GOSUB gABORT.WITH.INPUT
*      END ELSE ERROR = 'Create failed' ; GOSUB gABORT.WITH.INPUT
*      RETURN
**
*gMESSAGE:
*      CRT 'In program ':K.PROGRAM:
*      IF gINCLUDE THEN CRT ' and include ':T.INCLUDE ELSE CRT
*      gS.gMSG = DCOUNT(gMSG,AM)
*      FOR gI.gMSG = 1 TO gS.gMSG-1
*         gT.MSG = gMSG<gI.gMSG> ; GOSUB gWRAP.MESSAGE
*      NEXT gI.gMSG
*      CRT gMSG<gS.gMSG>:
*      RETURN
**
*gWRAP.MESSAGE:
*      gL.MSG = LEN(gT.MSG) ; gC.MSG = 1
*      LOOP
*         gC.MSG.END = gC.MSG + gTERM.WIDTH
*         LOOP
*         UNTIL gT.MSG[gC.MSG.END,1] = ' ' OR gC.MSG.END >= gL.MSG DO
*            gC.MSG.END = gC.MSG.END - 1
*         REPEAT
*         PRINT gT.MSG[gC.MSG,gC.MSG.END-gC.MSG+1]
*         gC.MSG = gC.MSG.END+1
*      UNTIL gC.MSG > gL.MSG DO REPEAT
*      RETURN
**
*gMOD.CONTROL:
*      gACTION = 'MOD' ; GOSUB gCREATE.CONTROL.HORSE
*      RETURN
**
*gVERIFY.MNEMONIC:
*      READV T2.INCLUDE FROM gF.CODE.CONTROL,T.MNE,1 THEN
*         IF T2.INCLUDE # T.INCLUDE THEN
*            ERROR = T.INCLUDE:" attempted to attach mnemonic ":T.MNE
*            ERROR = ERROR:" which is assigned to ":T2.INCLUDE
*            ERROR = ERROR:" according to entry in ":gCODE.CONTROL:" file."
*            GOSUB gABORT.WITH.INPUT ; CRT
*         END
*      END ELSE
*         IF gSTANDALONE THEN gANS = 'Y' ELSE
*            gMSG = "Can't find item ":T.MNE:" in ":gCODE.CONTROL:" file."
*            gMSG<2> = "Would you like me to set it to the"
*            gMSG<2> = gMSG<2>:" current complainer? (Y/N) "
*            GOSUB gMESSAGE ; INPUT gANS,2: ; CRT
*         END
*         IF gANS = 'Y' THEN
*            WRITEV T.INCLUDE ON gF.CODE.CONTROL,T.MNE,1
*         END ELSE
*            GOSUB gABORT.WITH.INPUT ; CRT
*         END
*      END
*      WRITEV T.MNE ON gF.CODE.CONTROL,T.INCLUDE.ITEM,1
*      RETURN
**
*gSKIP.GLOBAL.SUBS:
**
*      gCODE.CONTROL = 'CODE.CONTROL'
**
*      gOPENTRY = 0
*      LOOP
*         gOPENDONE = TRUE
*         gFILENAME = gCODE.CONTROL ; gFILESIZE = "1,1 3,1"
*         gCREATEFILE.CMD = 'CREATE-FILE ':gFILENAME:' ':gFILESIZE
*         T.FILE = gCREATEFILE.CMD ; GOSUB gADD.FILE
*         OPEN gCODE.CONTROL TO gF.CODE.CONTROL ELSE GOSUB gCREATE.FILE
*      UNTIL gOPENDONE DO REPEAT
*      IF ERROR # '' THEN GOTO gLEAVE
**
*      gVERSION.REGISTRY = 'VERSION.REGISTRY'
**
*      gOPENTRY = 0
*      LOOP
*         gOPENDONE = TRUE
*         gFILENAME = gVERSION.REGISTRY ; gFILESIZE = "1,1 3,1"
*         gCREATEFILE.CMD = 'CREATE-FILE ':gFILENAME:' ':gFILESIZE
*         T.FILE = gCREATEFILE.CMD ; GOSUB gADD.FILE
*         OPEN gVERSION.REGISTRY TO gF.VERSION.REGISTRY ELSE GOSUB gCREATE.FILE
*      UNTIL gOPENDONE DO REPEAT
*      IF ERROR # '' THEN GOTO gLEAVE
**
** Check if test level is on for the individual, or globally
*      gTEST.LEVEL = 0
*      IF NOT(gTEST.LEVEL) THEN
*         gCODE.CONTROL.itest = 'test*':USER.ID
*         READV gTEST.LEVEL FROM gF.CODE.CONTROL,gCODE.CONTROL.itest,1 ELSE
*            NULL
*         END
*      END
*      IF NOT(gTEST.LEVEL) THEN
*         gCODE.CONTROL.itest = 'test'
*         READV gTEST.LEVEL FROM gF.CODE.CONTROL,gCODE.CONTROL.itest,1 ELSE
*            NULL
*         END
*      END
**
** Check if registry checking is on for the individual, or globally
*      gREG.CHK = 0
*      IF NOT(gREG.CHK) THEN
*         gCODE.CONTROL.iregchk = 'registry*':USER.ID
*         READV gREG.CHK FROM gF.CODE.CONTROL,gCODE.CONTROL.iregchk,1 ELSE
*            NULL
*         END
*      END
*      IF NOT(gREG.CHK) THEN
*         gCODE.CONTROL.iregchk = 'registry'
*         READV gREG.CHK FROM gF.CODE.CONTROL,gCODE.CONTROL.iregchk,1 ELSE
*            NULL
*         END
*      END
**
*      IF gTEST.LEVEL THEN PRINT 'In include ':T.INCLUDE
*      IF gREG.CHK THEN
*         gINCLUDE = TRUE ; gMACHINE = '' ; GOSUB gCHECK.REGISTRY
*      END
*      GOSUB gVERIFY.MNEMONIC
*      IF ERROR # '' THEN GOTO gLEAVE
**
*gLEAVE:
*      T.COMPONENT = T.INCLUDE
*      GOSUB gADD.COMPONENT
**
*      gERROR.MODE = 'PASS'
*      IF gTEST.LEVEL THEN PRINT 'Leaving include ':T.INCLUDE
*      gINCLUDE = FALSE
** Modified 19:28:24  24 MAY 1999 by FFT version 1.1
** Reason: Start set-up for posting mnemonics to includes in a file
** Modified 19:28:44  24 MAY 1999 by FFT version 1.2
** Reason:
** Modified 19:34:13  24 MAY 1999 by FFT version 1.3
** Reason: Correct small bug in naming convention
** Modified 19:44:18  24 MAY 1999 by FFT version 1.4
** Reason: Fix bug that on error it would GOSUB the leave tag instead of GOTO it
** Modified 20:01:15  24 MAY 1999 by FFT version 1.5
** Reason: Add concept of global.subroutines
** Modified 20:09:35  24 MAY 1999 by FFT version 1.6
** Reason: Add the global routines ADD.COMPONENT and VERIFY.MNEMONIC
** Modified 20:12:58  24 MAY 1999 by FFT version 1.7
** Reason: Add global routine CHECK.PREREQUISITES
** Modified 20:46:53  24 MAY 1999 by FFT version 1.8
** Reason: Fix typo with name of called global subroutine
** Modified 21:01:51  24 MAY 1999 by FFT version 1.9
** Reason: Add handling of TEST.LEVEL condition
** Modified 21:06:08  24 MAY 1999 by FFT version 1.10
** Reason: Fix typo in name of global variable gTEST.LEVEL
** Modified 21:06:57  24 MAY 1999 by FFT version 1.11
** Reason: Fix typo in name of global variable gTEST.LEVEL
** Modified 21:27:18  24 MAY 1999 by FFT version 1.12
** Reason:
** Modified 21:34:32  24 MAY 1999 by FFT version 1.13
** Reason: Parameratize name of test level tag item
** Modified 21:38:30  24 MAY 1999 by FFT version 1.14
** Reason: debugging
** Modified 21:39:08  24 MAY 1999 by FFT version 1.15
** Reason: Debugging
** Modified 21:42:35  24 MAY 1999 by FFT version 1.16
** Reason: Undo debuggin
** Modified 22:06:34  24 MAY 1999 by FFT version 1.17
** Reason: Fix VERS tag
** Modified 13:27:03  25 MAY 1999 by FFT version 1.18
** Reason: Add new variable gSEGMENT.FILES to hold list of code segment
**         that cannot stand-alone, but yet can be made-live, audited,
**         stamped, and archived as "code"
** Modified 13:28:52  25 MAY 1999 by FFT version 1.19
** Reason: Fix typo in comment area
** Modified 16:47:47  25 MAY 1999 by FFT version 1.20
** Reason: Allow auto-setting of failed MNE existence with user input
** Modified 16:49:20  25 MAY 1999 by FFT version 1.21
** Reason: Re-display include name on user not selecting to auto-set failed mnemonic
** Modified 14:56:27 27 MAY 1999 by willj version 1.22
** Reason: If the fieldname in the auto-control build routine has DATE in it display today's date external and internal before prompting
** Modified 16:04:10 27 MAY 1999 by willj version 1.23
** Reason: Automatically set the createdate, lastmoddate and lastmodid on created controls
** Modified 12:32:38  30 MAY 1999 by FFT version 1.24
** Reason: Indent
** Modified 11:29:06  31 MAY 1999 by FFT version 1.25
** Reason: Add VERSION.REGISTRY file as a global file
** Modified 13:08:27  31 MAY 1999 by FFT version 1.26
** Reason: Start mods for doing registry checking
** Modified 13:10:54  31 MAY 1999 by FFT version 1.27
** Reason: Continue changes related to version registry checking
** Modified 13:48:23  31 MAY 1999 by FFT version 1.28
** Reason: Finish draft of version registry checking logic
** Modified 13:49:56  31 MAY 1999 by FFT version 1.29
** Reason: Put global subroutines in alphabetical order for easier locating
** Modified 14:49:51  31 MAY 1999 by FFT version 1.30
** Reason: Improve clarity of error message in verify mnemonic
** Modified 15:02:27  31 MAY 1999 by FFT version 1.31
** Reason: Show that I am checking the registry if test level is on
** Modified 14:35:25 02 JUN 1999 by willj version 1.32
** Reason:
** Modified 14:43:51 03 JUN 1999 by willj version 1.33
** Reason: Remove extra END statement
** Modified 14:48:33 03 JUN 1999 by willj version 1.34
** Reason:
** Modified 14:52:43 03 JUN 1999 by willj version 1.35
** Reason:
** Modified 17:38:41 03 JUN 1999 by willj version 1.36
** Reason: If an attempt is made to create a control and there is no control passed then return
** Modified 17:39:25 03 JUN 1999 by willj version 1.37
** Reason: On a call to create control with an unassigned K.CONTROL, set it to null and return
** Modified 20:42:20  08 JUN 1999 by FFT version 1.38
** Reason: Add SM variable
** Modified 13:18:55 09 JUN 1999 by willj version 1.38
** Reason: Synchronize with SCCOE's version
** Modified 13:35:36 09 JUN 1999 by willj version 1.39
** Reason: Display message when version registry finds a problem and prompt for acknowledgement
** Modified 13:46:37 09 JUN 1999 by willj version 1.40
** Reason: Fix bug where the attributes of the version registry for date and time were backwards which caused very large dates to be generated on the screen display
** Modified 13:56:02 09 JUN 1999 by willj version 1.41
** Reason: Add check for individual or global settings for test on and registry checking on
** Modified 13:59:54 09 JUN 1999 by willj version 1.42
** Reason: If VERS is unassigned then set it to unknown
** Modified 14:05:20 09 JUN 1999 by pattib version 1.43
** Reason: Add pre environment inclue
** Modified 14:06:21 09 JUN 1999 by pattib version 1.44
** Reason: Fix typo in name of new included pre environment include
** Modified 14:45:41  11 JUN 1999 by FFT version 1.45
** Reason:
** Modified 17:03:23  11 JUN 1999 by FFT version 1.46
** Reason: Create files VERSION.REGISTRY, CODE.CONTROL and CODE.INCLUDES if they don't exist
** Modified 17:32:34  11 JUN 1999 by FFT version 1.47
** Reason: Add the gCREATE.FILE internal routine so GLOBAL can create the files it needs if they are not present
** Modified 17:36:45  11 JUN 1999 by FFT version 1.48
** Reason:
** Modified 17:41:08  11 JUN 1999 by FFT version 1.49
** Reason:
** Modified 17:41:49  11 JUN 1999 by FFT version 1.50
** Reason: Change exit name to GLEAVE
** Modified 17:42:07  11 JUN 1999 by FFT version 1.51
** Reason: Change exit name to gLEAVE
** Modified 17:44:22  11 JUN 1999 by FFT version 1.52
** Reason: Move variable t.include , was causing problem that it was addressing a value not yet set
** Modified 17:48:19  11 JUN 1999 by FFT version 1.53
** Reason: Add a call to gmessage to gcreate.file.  Was asking to create a non-existant file but no message to user.
** Modified 18:08:06  11 JUN 1999 by FFT version 1.54
** Reason: Add readtry logic to control creation
** Modified 18:16:02  11 JUN 1999 by FFT version 1.55
** Reason: Cut up the create control routine into smaller bites
** Modified 18:20:21  11 JUN 1999 by FFT version 1.56
** Reason: Add message about the name of the include to the create control logic
** Modified 18:21:09  11 JUN 1999 by FFT version 1.57
** Reason: Remove redundant create file routine definition
** Modified 18:26:45  11 JUN 1999 by FFT version 1.58
** Reason: Fix missing END in version registry checker logic
** Modified 18:41:20  11 JUN 1999 by FFT version 1.59
** Reason: Clarify the error message when create control cant read the item
** Modified 19:10:24  11 JUN 1999 by FFT version 1.60
** Reason: Add display of program name to all errors
** Modified 19:30:23  11 JUN 1999 by FFT version 1.61
** Reason:
** Modified 14:16:19  13 JUN 1999 by FFT version 1.62
** Reason: Fix logic with error messages showing program name and include name
** Modified 12:06:05  14 JUN 1999 by FFT version 1.63
** Reason: Add pre.environment to component list
** Modified 12:06:15  14 JUN 1999 by FFT version 1.64
** Reason: Fix comment line
** Modified 12:32:30  14 JUN 1999 by FFT version 1.65
** Reason: Add the create-file directives as components
** Modified 13:02:46  14 JUN 1999 by FFT version 1.66
** Reason: Allow modification of control as well as creation, allow default setting
** Modified 13:07:11  14 JUN 1999 by FFT version 1.67
** Reason: Fix bug in new logic to allow modifying controls
** Modified 13:09:34  14 JUN 1999 by FFT version 1.68
** Reason: Fix bug that was nulling out entire control record on a mod attempt
** Modified 13:28:51  14 JUN 1999 by FFT version 1.69
** Reason: Allow a field to be blanked out during control item modification
** Modified 13:29:27  14 JUN 1999 by FFT version 1.70
** Reason: Fix logic bug in new control field modification logic
** Modified 15:41:17  14 JUN 1999 by FFT version 1.71
** Reason: Create a new variable to determine if the program is stand-alone or not
** Modified 16:36:58  14 JUN 1999 by FFT version 1.72
** Reason: Fix bug where the new standalone variable was not getting properly set
** Modified 16:41:53  14 JUN 1999 by FFT version 1.73
** Reason: If a standalone program, then dont ask to set code control missing items, just do it
** Modified 18:13:53  14 JUN 1999 by FFT version 1.74
** Reason: If this is a standalone then ask what kind of machine it is
** Modified 18:20:33  14 JUN 1999 by FFT version 1.75
** Reason: Remove last change
** Modified 20:40:24  14 JUN 1999 by FFT version 1.76
** Reason: Add several more forced settings to control creation
** Modified 10:16:33  15 JUN 1999 by FFT version 1.77
** Reason: Fix logic in forcing setting for a few control fields, was using wrong variable
** Modified 11:15:43  15 JUN 1999 by FFT version 1.78
** Reason: Remove the carriage return suppress after create it now prompt in create control function
** Modified 19:49:28  15 JUN 1999 by FFT version 1.79
** Reason: Add instance to create control display
** Modified 15:56:29 16 JUN 1999 by willj version 1.80
** Reason: Initialize the value of K.CONTROL so Universe doesnt complain
** Modified 11:32:05 17 JUN 1999 by willj version 1.81
** Reason: Remove forced setting of control ADMIN to FFT
** Modified 11:49:41 17 JUN 1999 by willj version 1.82
** Reason: Add the B directive to the filesize of code.includes
** Modified 17:11:28  18 JUN 1999 by FFT version 1.83
** Reason: Remove non-standard code UNASSIGNED function
** Modified 19:44:40  21 JUN 1999 by FFT version 1.84
** Reason: New variables for maintaining lists of create-file directives
** Modified 18:03:05 23 JUN 1999 by willj version 1.85
** Reason: Cross-reference the mnemonic by writing the include as a record to code control as well
** Modified 11:31:27 24 JUN 1999 by willj version 1.86
** Reason: Seperate the building of the registry id from checking the version
** Modified 12:17:59 24 JUN 1999 by willj version 1.87
** Reason: Always write the cross-reference of mnemonic to insure links exist
** Modified 19:01:20 27 JUN 1999 by Administrator version 1.87.1
** Reason: Add determining the terminal width
** Modified 20:23:32 27 JUN 1999 by Administrator version 1.87.2
** Reason: Change name of variable from TERM.WIDTH to gTERM.WIDTH
** Modified 20:31:58 27 JUN 1999 by Administrator version 1.87.3
** Reason: Add routine to wrap message text
** Modified 20:46:10 27 JUN 1999 by Administrator version 1.88.0
** Reason: Add the ability to display a help message for each field in a control when creating/modifying it
** Modified 20:56:01 27 JUN 1999 by Administrator version 1.88.1
** Reason: Move gINCLUDE flag down a few steps
** Modified 20:59:01 27 JUN 1999 by Administrator version 1.88.2
** Reason: Fix gMESSAGE so it only displays the include if its in one (using the gINCLUDE flag)
** Modified 21:25:56 27 JUN 1999 by Administrator version 1.88.3
** Reason: Fix logic on how to extract help text so it gets all of it
** Modified 21:26:57 27 JUN 1999 by Administrator version 1.88.4
** Reason: Remove any quote marks in the help text
46:
ITEMLIST = "ie"
LINE = "ADDRAW CODE.CONTROL ie"
I.STACK = 47; GOSUB PROCESS.COMMAND
GOTO 47
*CODE.INCLUDES INSTALL.EQU
*
47:
ITEMLIST = "INSTALL.EQU"
LINE = "ADDRAW CODE.CONTROL INSTALL.EQU"
I.STACK = 48; GOSUB PROCESS.COMMAND
GOTO 48
*ie
*
48:
ITEMLIST = "INSTALL.EQU"
LINE = "ADDRAW CODE.INCLUDES INSTALL.EQU"
I.STACK = 49; GOSUB PROCESS.COMMAND
GOTO 49
*      INCLUDEVERS ='1.12.0'
*      gINCLUDE = TRUE
**!*!  VERSION CONTROL
*      T.INCLUDE.ITEM = 'INSTALL.EQU' ; T.MNE = 'ie'
*      INCLUDE.PREREQUISITES = gCODE.INCLUDES:' GLOBAL'
*      INCLUDE.PREREQUISITES<-1> = gCODE.INCLUDES:' ENVIRONMENT'
*      *
*      T.INCLUDE = gCODE.INCLUDES:' ':T.INCLUDE.ITEM
*      IF gTEST.LEVEL THEN PRINT 'In include ':T.INCLUDE
**
*      T.COMPONENT = T.INCLUDE ; GOSUB gADD.COMPONENT
*      IF ERROR = '' THEN GOSUB gCHECK.PREREQUISITES
*      IF ERROR = '' THEN GOSUB gVERIFY.MNEMONIC
*      IF ERROR = '' THEN
*         IF gREG.CHK THEN
*            gINCLUDE = TRUE ; gMACHINE = '' ; GOSUB gCHECK.REGISTRY
*         END
*      END
*      IF ERROR # '' THEN GOTO ieLEAVE
**
**!*!  START TABLE
*      EQUATE V.INSTALL.CREATEDATE TO 1
*      EQUATE V.INSTALL.LASTMODDATE TO 2
*      EQUATE V.INSTALL.LASTMODID TO 3
*      EQUATE V.INSTALL.OCONTACT TO 6
*      EQUATE V.INSTALL.OVPHONE TO 7
*      EQUATE V.INSTALL.OEMAIL TO 8
*      EQUATE V.INSTALL.INSTALLDATE TO 10
*      EQUATE V.INSTALL.EXPIREDATE TO 11
*      EQUATE V.INSTALL.ADMIN TO 12       ; * User id who can change the program
**!*!  END TABLE
**
*      EQUATE S.INSTALL.REC TO 13
*      DIM INSTALL.REC(13)
**
*     EQUATE HELP.INSTALL.OCONTACT TO 'Enter the name of the salesman if any of this product to you.'
*     EQUATE HELP.INSTALL.OVPHONE TO 'Enter the phone number of that salesman if any'
*     EQUATE HELP.INSTALL.OEMAIL TO 'Enter the E-mail address of that salesman if any'
*     EQUATE HELP.INSTALL.ADMIN TO 'Enter the user id of the person who will be administering this program at your site.'
**
*      ieK.CONTROL = 'INSTALL*':K.INSTALL
*      T.COMPONENT = eCONTROL.FILE:' ':ieK.CONTROL
*      GOSUB gADD.COMPONENT
**
*      gREADTRY = 0
*      LOOP
*         gREADDONE = TRUE
*         MATREAD INSTALL.REC FROM eF.CONTROL,ieK.CONTROL THEN
*            INSTALL.DONE = TRUE
*         END ELSE
*            IF gSTANDALONE THEN INSTALL.DONE = TRUE ELSE
*               K.CONTROL = ieK.CONTROL ; GOSUB gCREATE.CONTROL
*            END
*         END
*      UNTIL gREADDONE DO REPEAT
*      IF ERROR # '' THEN GOTO ieLEAVE
**
*ieLEAVE:
*      IF gTEST.LEVEL THEN PRINT 'Leaving include ':T.INCLUDE
*      gINCLUDE = FALSE
**
** Modified 14:06:24 27 MAY 1999 by willj version 1.1
** Reason: Add auto-updater logic and call new global ADD.COMPONENT, VERIFY.MNEMONIC
** Modified 15:15:42 27 MAY 1999 by willj version 1.2
** Reason: Change name of variable from K.CONTROL to ieK.CONTROL
** Modified 14:27:52  30 MAY 1999 by FFT version 1.3
** Reason: Add variable ieK.CONTROL
** Modified 14:34:46  31 MAY 1999 by FFT version 1.4
** Reason: Upgrade to standard controls
** Modified 14:57:49  31 MAY 1999 by FFT version 1.5
** Reason: Fix typo in name of variable
** Modified 14:42:40 02 JUN 1999 by willj version 1.6
** Reason: Synchronize with SCCOE's version
** Modified 14:43:50 02 JUN 1999 by willj version 1.7
** Reason:
** Modified 18:33:23  11 JUN 1999 by FFT version 1.8
** Reason: Install new readtry logic to create the control
** Modified 15:46:12  14 JUN 1999 by FFT version 1.9
** Reason: Skip control creation for standalone programs
** Modified 20:37:22  14 JUN 1999 by FFT version 1.10
** Reason: Add concept of forceing the control item to be set a particular way
** Modified 20:40:55  14 JUN 1999 by FFT version 1.11
** Reason: Remove concept of forceing the control item, done in global now
** Modified 21:49:40 27 JUN 1999 by Administrator version 1.12.0
** Reason: Add the control creation help text
49:
ITEMLIST = "m"
LINE = "ADDRAW CODE.CONTROL m"
I.STACK = 50; GOSUB PROCESS.COMMAND
GOTO 50
*CODE.INCLUDES MACHINE.EQU
*
50:
ITEMLIST = "MACHINE.EQU"
LINE = "ADDRAW CODE.CONTROL MACHINE.EQU"
I.STACK = 51; GOSUB PROCESS.COMMAND
GOTO 51
*m
*
51:
ITEMLIST = "MACHINE.EQU"
LINE = "ADDRAW CODE.INCLUDES MACHINE.EQU"
I.STACK = 52; GOSUB PROCESS.COMMAND
GOTO 52
*      INCLUDEVERS ='1.13'
*      gINCLUDE = TRUE
**!*!  VERSION CONTROL
*      T.INCLUDE.ITEM = "MACHINE.EQU" ; T.MNE = 'm'
*      INCLUDE.PREREQUISITES = gCODE.INCLUDES:' GLOBAL'
*      INCLUDE.PREREQUISITES<-1> = gCODE.INCLUDES:' ENVIRONMENT'
**
*      T.INCLUDE = gCODE.INCLUDES:' ':T.INCLUDE.ITEM
*      IF gTEST.LEVEL THEN PRINT 'In include ':T.INCLUDE
**
*      T.COMPONENT = T.INCLUDE ; GOSUB gADD.COMPONENT
*      IF ERROR = '' THEN GOSUB gCHECK.PREREQUISITES
*      IF ERROR = '' THEN GOSUB gVERIFY.MNEMONIC
*      IF ERROR = '' THEN
*         IF gREG.CHK THEN
*            gINCLUDE = TRUE ; gMACHINE = '' ; GOSUB gCHECK.REGISTRY
*         END
*      END
*      IF ERROR # '' THEN GOTO mLEAVE
**
**!*!  START TABLE
**     EQU V.MACHINE.CREATEDATE TO 1
**     EQU V.MACHINE.LASTMODDATE TO 2
**     EQU V.MACHINE.LASTMODID TO 3
**     EQU V.MACHINE.OS TO 4
**     EQU V.MACHINE.DATABASE TO 5
**     EQU V.MACHINE.SENTENCE TO 6
**     EQU V.MACHINE.SENT.SEP TO 7
**!*!  END TABLE
**
**     EQU S.MACHINE TO 8
**     DIM MACHINE(8)
*      mK.CONTROL = 'MACHINE'
*      T.COMPONENT = eCONTROL.FILE:' ':mK.CONTROL
*      GOSUB gADD.COMPONENT
*      MACHINE.DONE = TRUE
**     gREADTRY = 0
**     LOOP
**        gREADDONE = TRUE
**        MATREAD MACHINE FROM eF.CONTROL,mK.CONTROL THEN
**           MACHINE.DONE = TRUE
**        END ELSE
**           IF gSTANDALONE THEN MACHINE.DONE = TRUE ELSE
**              K.CONTROL = mK.CONTROL; GOSUB gCREATE.CONTROL
**           END
**        END
**     UNTIL gREADDONE DO REPEAT
**     IF ERROR # '' THEN GOTO mLEAVE
**
**     MACHINE.OS = MACHINE(V.MACHINE.OS)
**     MACHINE.DATABASE = MACHINE(V.MACHINE.DATABASE)
**     MACHINE.SENTENCE = MACHINE(V.MACHINE.SENTENCE)
**     MACHINE.SENT.SEP = MACHINE(V.MACHINE.SENT.SEP)
**     IF NUM(MACHINE.SENT.SEP) THEN
**        MACHINE.SENT.SEP = CHAR(MACHINE.SENT.SEP)
**     END
**
**     mVERBS is used to verify existence of verbs, files, subroutines locally
**     mVERB.SOURCE is used to copy verbs as needed from the "source"
**     mSYSTEM is used to verify existence of accounts
*      BEGIN CASE
*         CASE MACHINE.DATABASE = 'UNIVERSE'
*            mVERBS = 'VOC' ; mVERB.SOURCE = 'uv' ; mSYSTEM = 'UV.ACCOUNT'
*         CASE 1
*            mVERBS = 'MD' ; mVERB.SOURCE = 'SYSPROG' ; mSYSTEM = 'SYSTEM'
*      END CASE
*      OPEN mVERBS TO mF.VERBS ELSE
*         ERROR = "Can't open file ":mVERBS:".  Hit any key..."
*         IF gERROR.MODE = 'DISPLAY' THEN GOSUB gABORT.WITH.INPUT
*         GOTO mLEAVE
*      END
**
*      OPEN mVERB.SOURCE TO mF.VERB.SOURCE ELSE
*         WRITE 'Q':AM:mVERB.SOURCE ON mF.VERBS,mVERB.SOURCE
*         OPEN mVERB.SOURCE TO mF.VERB.SOURCE ELSE
*            ERROR = "Can't open file ":mVERB.SOURCE:". Hit any key..."
*            IF gERROR.MODE = 'DISPLAY' THEN GOSUB gABORT.WITH.INPUT
*            GOTO mLEAVE
*         END
*      END
**
*      OPEN mSYSTEM TO mF.SYSTEM ELSE
*         WRITE 'Q':AM:mSYSTEM ON mF.VERBS,mSYSTEM
*         OPEN mSYSTEM TO mF.SYSTEM ELSE
*            ERROR = "Can't open file ":mSYSTEM:".  Hit any key..."
*            IF gERROR.MODE = 'DISPLAY' THEN GOSUB gABORT.WITH.INPUT
*            GOTO mLEAVE
*         END
*      END
**
*mLEAVE:
*      IF gTEST.LEVEL THEN PRINT 'Leaving include ':T.INCLUDE
*      gINCLUDE = FALSE
*******
**
** Modified 15:04:11 27 MAY 1999 by willj version 1.1
** Reason: Add ENVIRONMENT prerequisite
** Modified 15:06:54 27 MAY 1999 by willj version 1.2
** Reason: Add logic to self-create control element
** Modified 15:11:53 27 MAY 1999 by willj version 1.3
** Reason: Change name of variable from K.CONTROL to mCONTROL
** Modified 15:12:31 27 MAY 1999 by willj version 1.4
** Reason: Change name of variable from mCONTROL to mK.CONTROL
** Modified 15:59:15 27 MAY 1999 by willj version 1.5
** Reason: Add standard CREATEDATE, LASTMODDATE and LASTMODID to machine control table
** Modified 14:29:55  30 MAY 1999 by FFT version 1.6
** Reason: Add variable mK.CONTROL
** Modified 14:37:16  31 MAY 1999 by FFT version 1.7
** Reason: Upgrade to standard controls
** Modified 14:54:18 02 JUN 1999 by willj version 1.8
** Reason: Synchronize with SCCOE's version
** Modified 14:44:24 03 JUN 1999 by willj version 1.9
** Reason: Fix missing quote
** Modified 14:51:07  11 JUN 1999 by FFT version 1.10
** Reason:
** Modified 15:48:20  14 JUN 1999 by FFT version 1.11
** Reason: Add new control creation logic and skip on standalone programs
** Modified 19:45:36  14 JUN 1999 by FFT version 1.12
** Reason: Move setting of machine parts to pre environment include
** Modified 20:15:16  14 JUN 1999 by FFT version 1.13
** Reason: Remove concept of machine control
52:
ITEMLIST = "PRE.ENVIRONMENT"
LINE = "ADDRAW CODE.INCLUDES PRE.ENVIRONMENT"
I.STACK = 53; GOSUB PROCESS.COMMAND
GOTO 53
** System settings
*      MACHINE.OS = 'WINDOWS NT'
*      MACHINE.DATABASE = 'UNIVERSE'
*      MACHINE.SENTENCE = '@SENTENCE'
*      MACHINE.SENT.SEP = CHAR(32)
*      CHAR.INPUT.METHOD = 'ANS = KEYIN()'
*      eSENDMAIL.VERB = ''
*      eTOHOSTPATH.VERB = ''
*      eFROMHOSTPATH.VERB = ''
**
*      WHO = OCONV('','U50BB')
*      PORT.NO = FIELD(WHO,' ',1)
*      ACCOUNT = FIELD(WHO,' ',2)
*      TTY = @TTY
*      eLEVEL = @LEVEL
**
** Client admin choices
*      USER.ID = @LOGNAME
*      IF INDEX(USER.ID,'\',1) THEN USER.ID = FIELD(USER.ID,'\',2)
*      CONTROL.ADMIN = 'willj'
53:
ITEMLIST = "pe"
LINE = "ADDRAW CODE.CONTROL pe"
I.STACK = 54; GOSUB PROCESS.COMMAND
GOTO 54
*CODE.INCLUDES PROGRAM.EQU
*
54:
ITEMLIST = "PROGRAM.EQU"
LINE = "ADDRAW CODE.CONTROL PROGRAM.EQU"
I.STACK = 55; GOSUB PROCESS.COMMAND
GOTO 55
*pe
*
55:
ITEMLIST = "PROGRAM.EQU"
LINE = "ADDRAW CODE.INCLUDES PROGRAM.EQU"
I.STACK = 56; GOSUB PROCESS.COMMAND
GOTO 56
*      INCLUDEVERS ='1.10'
*      gINCLUDE = TRUE
**!*!  VERSION CONTROL
*      T.INCLUDE.ITEM = 'PROGRAM.EQU' ; T.MNE = 'pe'
*      INCLUDE.PREREQUISITES = gCODE.INCLUDES:' GLOBAL'
*      INCLUDE.PREREQUISITES<-1> = gCODE.INCLUDES:' ENVIRONMENT'
*      T.INCLUDE = gCODE.INCLUDES:' ':T.INCLUDE.ITEM
*      IF gTEST.LEVEL THEN PRINT 'In include ':T.INCLUDE
**
*      T.COMPONENT = T.INCLUDE ; GOSUB gADD.COMPONENT
*      IF ERROR = '' THEN GOSUB gCHECK.PREREQUISITES
*      IF ERROR = '' THEN GOSUB gVERIFY.MNEMONIC
*      IF ERROR = '' THEN
*         IF gREG.CHK THEN
*            gINCLUDE = TRUE ; gMACHINE = '' ; GOSUB gCHECK.REGISTRY
*         END
*      END
*      IF ERROR # '' THEN GOTO peLEAVE
**
**!*!  START TABLE
*      EQUATE V.PROGRAM.CREATEDATE TO 1
*      EQUATE V.PROGRAM.LASTMODDATE TO 2
*      EQUATE V.PROGRAM.LASTMODID TO 3
*      EQUATE V.PROGRAM.VENDOR TO 4
*      EQUATE V.PROGRAM.AUTHOR TO 5
*      EQUATE V.PROGRAM.OCONTACT TO 6
*      EQUATE V.PROGRAM.OVPHONE TO 7
*      EQUATE V.PROGRAM.OEMAIL TO 8
*      EQUATE V.PROGRAM.ADMIN TO 9        ; * User id who can change program
**!*!  END TABLE
**
*      EQUATE S.PROGRAM.REC TO 10
*      DIM PROGRAM.REC(10)
**
*      peK.CONTROL = 'PROGRAM*':K.PROGRAM
*      T.COMPONENT = eCONTROL.FILE:' ':peK.CONTROL
*      GOSUB gADD.COMPONENT
**
*      gREADTRY = 0
*      LOOP
*         gREADDONE = TRUE
*         MATREAD PROGRAM.REC FROM eF.CONTROL,peK.CONTROL THEN
*            PROGRAM.DONE = TRUE
*         END ELSE
*            IF gSTANDALONE THEN PROGRAM.DONE = TRUE ELSE
*               K.CONTROL = peK.CONTROL ; GOSUB gCREATE.CONTROL
*            END
*         END
*      UNTIL gREADDONE DO REPEAT
*      IF ERROR # '' THEN GOTO peLEAVE
*peLEAVE:
*      IF gTEST.LEVEL THEN PRINT 'Leaving include ':T.INCLUDE
*      gINCLUDE = FALSE
** Modified 15:13:36 27 MAY 1999 by willj version 1.1
** Reason: Change name of variable from K.CONTROL to peK.CONTROL
** Modified 14:21:13  30 MAY 1999 by FFT version 1.2
** Reason: Add varible peCONTROL
** Modified 14:26:32  30 MAY 1999 by FFT version 1.3
** Reason: Add variable peK.CONTROL
** Modified 14:38:55  31 MAY 1999 by FFT version 1.4
** Reason: Upgrade to standard controls
** Modified 15:06:30 02 JUN 1999 by willj version 1.5
** Reason: Synchronize with SCCOE's version
** Modified 18:02:13  11 JUN 1999 by FFT version 1.6
** Reason:
** Modified 18:06:18  11 JUN 1999 by FFT version 1.7
** Reason:
** Modified 18:16:58  11 JUN 1999 by FFT version 1.8
** Reason: Fix readtry logic
** Modified 15:43:45  14 JUN 1999 by FFT version 1.9
** Reason: Allow standalone programs to skip control creation
** Modified 15:44:38  14 JUN 1999 by FFT version 1.10
** Reason: Fix logic with skipping control creation for standalone programs
56:
ITEMLIST = "ve"
LINE = "ADDRAW CODE.CONTROL ve"
I.STACK = 57; GOSUB PROCESS.COMMAND
GOTO 57
*CODE.INCLUDES VENDOR.EQU
*
57:
ITEMLIST = "VENDOR.EQU"
LINE = "ADDRAW CODE.CONTROL VENDOR.EQU"
I.STACK = 58; GOSUB PROCESS.COMMAND
GOTO 58
*ve
*
58:
ITEMLIST = "VENDOR.EQU"
LINE = "ADDRAW CODE.INCLUDES VENDOR.EQU"
I.STACK = 59; GOSUB PROCESS.COMMAND
GOTO 59
*      INCLUDEVERS ='1.11.0'
*      gINCLUDE = TRUE
**!*!  VERSION CONTROL
*      T.INCLUDE.ITEM = 'VENDOR.EQU' ; T.MNE = 've'
*      INCLUDE.PREREQUISITES = gCODE.INCLUDES:' GLOBAL'
*      INCLUDE.PREREQUISITES<-1> = gCODE.INCLUDES:' ENVIRONMENT'
**
*      T.INCLUDE = gCODE.INCLUDES:' ':T.INCLUDE.ITEM
*      IF gTEST.LEVEL THEN PRINT 'In include ':T.INCLUDE
*      T.COMPONENT = T.INCLUDE ; GOSUB gADD.COMPONENT
*      IF ERROR = '' THEN GOSUB gCHECK.PREREQUISITES
*      IF ERROR = '' THEN GOSUB gVERIFY.MNEMONIC
*      IF ERROR = '' THEN
*         IF gREG.CHK THEN
*            gINCLUDE = TRUE ; gMACHINE = '' ; GOSUB gCHECK.REGISTRY
*         END
*      END
*      IF ERROR # '' THEN GOTO veLEAVE
**
**!*!  START TABLE
*      EQUATE V.VENDOR.CREATEDATE TO 1
*      EQUATE V.VENDOR.LASTMODDATE TO 2
*      EQUATE V.VENDOR.LASTMODID TO 3
*      EQUATE V.VENDOR.NAME TO 4
*      EQUATE V.VENDOR.CONTACT TO 5
*      EQUATE V.VENDOR.ADDR1 TO 6
*      EQUATE V.VENDOR.ADDR2 TO 7
*      EQUATE V.VENDOR.CITY TO 8
*      EQUATE V.VENDOR.STATE TO 9
*      EQUATE V.VENDOR.ZIP TO 10
*      EQUATE V.VENDOR.VPHONE1 TO 11      ; *VOICE PHONE NUMBER
*      EQUATE V.VENDOR.VPHONE2 TO 12
*      EQUATE V.VENDOR.FAX TO 13
*      EQUATE V.VENDOR.EMAIL TO 14
*      EQUATE V.VENDOR.WEBURL TO 15       ; * WEB URL
**!*!  END TABLE
**
*      EQUATE S.VENDOR.REC TO 16
*      DIM VENDOR.REC(16)
**
*      EQUATE HELP.VENDOR.NAME TO 'Enter the name of the company that sold you this program'
*      EQUATE HELP.VENDOR.CONTACT TO 'Enter the name of the salesman that sold you this program'
*      EQUATE HELP.VENDOR.ADDR1 TO 'Enter the first address line of the company that sold you this program'
*      EQUATE HELP.VENDOR.ADDR2 TO 'Enter the second address line (not city state zip)'
*      EQUATE HELP.VENDOR.CITY TO 'Enter the name of the city that that company is in'
*      EQUATE HELP.VENDOR.STATE TO 'Enter the state that that company is in'
*      EQUATE HELP.VENDOR.ZIP TO 'Enter the postal (zip) code of that company'
*      EQUATE HELP.VENDOR.VPHONE1 TO 'Enter the voice phone number of that company.'
*      EQUATE HELP.VENDOR.VPHONE2 TO 'Enter an alternate voice phone number.'
*      EQUATE HELP.VENDOR.FAX TO 'Enter the fax number of that company.'
*      EQUATE HELP.VENDOR.EMAIL TO 'Enter the E-mail address of that company.'
*      EQUATE HELP.VENDOR.WEBURL TO 'Enter the web address of that company.'
**
*      veK.CONTROL = 'VENDOR*':K.VENDOR
*      T.COMPONENT = eCONTROL.FILE:' ':veK.CONTROL
*      GOSUB gADD.COMPONENT
**
*      gREADTRY = 0
*      LOOP
*         gREADDONE = TRUE
*         MATREAD VENDOR.REC FROM eF.CONTROL,veK.CONTROL THEN
*            VENDOR.DONE = TRUE
*         END ELSE
*            IF gSTANDALONE THEN VENDOR.DONE = TRUE ELSE
*               K.CONTROL = veK.CONTROL ; GOSUB gCREATE.CONTROL
*            END
*         END
*      UNTIL gREADDONE DO REPEAT
*      IF ERROR # '' THEN GOTO veLEAVE
**
*veLEAVE:
*      IF gTEST.LEVEL THEN PRINT 'Leaving include ':T.INCLUDE
*      gINCLUDE = FALSE
** Modified 14:02:18 27 MAY 1999 by willj version 1.1
** Reason: Add ENVIRONMENT as a prerequisite
** Modified 15:14:24 27 MAY 1999 by willj version 1.2
** Reason: Change name of variable from K.CONTROL to veK.CONTROL
** Modified 14:28:36  30 MAY 1999 by FFT version 1.3
** Reason: Add variable veK.CONTROL
** Modified 14:41:21  31 MAY 1999 by FFT version 1.4
** Reason: Upgrade to standard controls
** Modified 14:57:06  31 MAY 1999 by FFT version 1.5
** Reason: Fix typo in variable name
** Modified 15:11:11 02 JUN 1999 by willj version 1.6
** Reason: Synchronize with SCCOE's version
** Modified 18:31:00  11 JUN 1999 by FFT version 1.7
** Reason: Install new readtry logic to create the control
** Modified 14:29:35  14 JUN 1999 by FFT version 1.8
** Reason: Add a space after the field number for vendor phone 1
** Modified 14:30:24  14 JUN 1999 by FFT version 1.9
** Reason: Add a space after the field number for the vendor web url
** Modified 15:45:13  14 JUN 1999 by FFT version 1.10
** Reason: Skip control creation for standalone programs
** Modified 21:55:15 27 JUN 1999 by Administrator version 1.11.0
** Reason: Add the control creation help text
59:
LINE = "CREATE-FILE FFT.BP 7,1 61,1,B"; GOSUB PROCESS.COMMAND
ITEMLIST = "BROWSER"
LINE = "ADDRAW FFT.BP BROWSER"
I.STACK = 61; GOSUB PROCESS.COMMAND
GOTO 61
*SUBROUTINE BROWSER(PATH,COMPONENTS,MODE,RESULTS,ERROR)
** COPYRIGHT 1992-1999 FAST FORWARD TECHNOLOGIES
** Will Johnson
**
*******
*      K.PROGRAM = 'BROWSER'
*      VERS ='1.14'
**!*!  VERSION CONTROL
*COMPONENTS = 'FFT.BP BROWSER'
*$INCLUDE CODE.INCLUDES GLOBAL
*$INCLUDE CODE.INCLUDES ENVIRONMENT
**
*ERROR = ''; RETURNTOME = FALSE
*$INCLUDE CODE.INCLUDES GET.MY.CONTROLS
*IF ERROR # '' THEN RETURN
**
*BEGIN CASE
*   CASE MACHINE.OS = 'UNIX' AND MACHINE.DATABASE = 'UNIVERSE'
*      CALL BROWSER.UNIX.UNIVERSE(PATH,COMPONENTS,ERROR)
*   CASE MACHINE.OS = 'WINDOWS 98' AND MACHINE.DATABASE = 'MVBASE'
*      CALL BROWSER.WINDOWS98.MVBASE(PATH,COMPONENTS,MODE,RESULTS,ERROR)
*END CASE
*RETURN
**
*ABORT.WITH.INPUT:
*   PRINT ERROR
*   PRINT 'Aborting.  Hit any key...':
*   $INCLUDE CODE.INCLUDES CHAR.INPUT
*   PRINT
*RETURN
** Modified 19:30:52  23 MAY 1999 by FFT version 1.5
** Reason: Add GET.MY.CONTROLS include
** Modified 19:31:35  23 MAY 1999 by FFT version 1.6
** Reason: Add ABORT.WITH.INPUT internal subroutine
** Modified 19:32:28  23 MAY 1999 by FFT version 1.7
** Reason: Add GLOBAL and GLOBAL.OPENS code includes
** Modified 19:37:57  23 MAY 1999 by FFT version 1.8
** Reason: Correct bug that the program was not returning properly on an error in GET.MY.CONTROLS
** Modified 19:42:04  23 MAY 1999 by FFT version 1.9
** Reason: Add an extra PRINT after CHAR.INPUT in ABORT.WITH.INPUT routine
** Modified 13:00:54  24 MAY 1999 by FFT version 1.10
** Reason: Initialize COMPONENTS variable
** Modified 16:34:01  31 MAY 1999 by FFT version 1.11
** Reason: Add two new arguments to argument list MODE and RESULTS
** Modified 14:18:35 09 JUN 1999 by willj version 1.12
** Reason:
** Modified 15:29:41  11 JUN 1999 by FFT version 1.13
** Reason:
** Modified 11:40:06 17 JUN 1999 by willj version 1.14
** Reason: Remove global opens include
*
*
61:
LINE = "BASIC FFT.BP BROWSER"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP BROWSER"; GOSUB PROCESS.COMMAND
ITEMLIST = "BROWSER.UNIX.UNIVERSE"
LINE = "ADDRAW FFT.BP BROWSER.UNIX.UNIVERSE"
I.STACK = 64; GOSUB PROCESS.COMMAND
GOTO 64
*SUBROUTINE BROWSER.UNIX.UNIVERSE(PATH,COMPONENTS,MODE,RESULTS,ERROR)
** COPYRIGHT 1992-1999 FAST FORWARD TECHNOLOGIES
** LIMITED LICENSE IS PROVIDED TO :
**   The Santa Clara County Office of Education
** WARNING! WARNING! WARNING!
** This program may not be duplicated, sold, given, exchanged, modified
** transferred, downloaded, decompiled, or otherwise made available to
** any third party without the express writen and notarized consent of
** FAST FORWARD TECHNOLOGIES, INC.
** Written in the distant past by
** Will Johnson
**
** MODES ARE: S or null which is the default which shows the results onscreen
**            R which returns the results in the RESULTS variable
**            F or null which is the default which works on all dir entries
**            D which only works on sub-directories not all dir entries
**
*      VERS ='2.0.0'
*      K.PROGRAM = "BROWSER.UNIX.UNIVERSE"
**!*!  VERSION CONTROL
**
*$INCLUDE CODE.INCLUDES GLOBAL
*IF ERROR # '' THEN RETURN
*$INCLUDE CODE.INCLUDES ENVIRONMENT
*IF ERROR # '' THEN RETURN
*IF UNASSIGNED(PATH) THEN PATH = ''
*READV REMEMBER.LIST FROM eF.CONTROL,'BROWSER',1 ELSE REMEMBER.LIST = '
*S.REMEMBER.LIST = DCOUNT(REMEMBER.LIST,@VM)
*N.OUTPUT.SUFF = PORT.NO:".TXT"
**
** Determine the MODE
**
*BEGIN CASE
*   CASE UNASSIGNED(MODE)
*      MODE = ''; SHOW = TRUE; TYPES = "ALLFILES"
*   CASE MODE = ''; SHOW = TRUE; TYPES = "ALLFILES"
*   CASE 1
*      SHOW = TRUE; * default
*      BEGIN CASE
*         CASE INDEX(MODE,'S',1); SHOW = TRUE
*         CASE INDEX(MODE,'R',1); SHOW = FALSE
*      END CASE
*      TYPES = "ALLFILES" ; * default
*      BEGIN CASE
*         CASE INDEX(MODE,'F',1); TYPES = "ALLFILES"
*         CASE INDEX(MODE,'D',1); TYPES = "DIR"
*      END CASE
*END CASE
**
** Get the starting path if none was passed
**
*IF PATH = '' THEN
*   W.LIST = 1
*   LOOP
*      PRINT "Enter file path, Q=QUIT, N for next path known, return for ":
*      PRINT REMEMBER.LIST<1,W.LIST>
*      INPUT PATH
*      BEGIN CASE
*         CASE PATH = '';  PATH   = REMEMBER.LIST<1,W.LIST>
*         CASE PATH = 'N'
*            W.LIST = W.LIST + 1; IF W.LIST > S.REMEMBER.LIST THEN W.LIST = 1
*         CASE PATH = 'Q'; STOP
*         CASE 1; NULL
*      END CASE
*   UNTIL PATH # 'N' DO REPEAT
*END
**
** Update the list of known paths
**
*LOCATE(PATH,REMEMBER.LIST,1;W.LIST) ELSE
*   REMEMBER.LIST<1,-1> = PATH
*   WRITEV REMEMBER.LIST ON eF.CONTROL,"BROWSER",1
*END
**
*DONE = FALSE
*LOOP
*   IF PATH"R#1" # "/" THEN PATH = PATH:"/"
*   N.OUTPUT.FILE = PATH:N.OUTPUT.SUFF
*   LINE = "SH -c 'ls"
*   IF TYPES = "DIR" THEN LINE = LINE:" -ad"
*   LINE = LINE:" ":PATH:" > ":N.OUTPUT.FILE
*   IF SHOW THEN PRINT LINE
*   EXECUTE LINE
*   OPENSEQ N.OUTPUT.FILE FOR READ TO UNIXFILE ELSE 
*      PRINT "ERROR: IN PROGRAM ":K.PROGRAM
*      PRINT "CAN'T OPEN ":N.OUTPUT.FILE ; STOP
*   END
*   EOF = FALSE; CNT = 0; NEWITEM = '';C.AM = 1
*   LOOP
*      CNT = CNT + 1
*      READSEQ LINE FROM UNIXFILE THEN
*         FOR I = 1 TO LEN(LINE)
*            T.CHAR = LINE[I,1]
*            S.CHAR = SEQ(T.CHAR)
*            BEGIN CASE
*               CASE S.CHAR = 13; C.AM = C.AM + 1; NEWITEM = NEWITEM:AM
*               CASE S.CHAR = 10; NULL
*               CASE 1
*                  NEWITEM = NEWITEM:T.CHAR
*            END CASE
*         NEXT I
*      END ELSE
*         EOF = TRUE
*         IF SHOW THEN PRINT "READ FAILED"
*         CLOSESEQ UNIXFILE ELSE NULL
*      END
*   UNTIL EOF DO REPEAT
**
** Now show me the results
**
*   IF SHOW THEN
*      LINE = 'DIRECTORY OF PATH ':PATH
*      IF TYPES = "DIR" THEN LINE = LINE:" DIRECTORIES ONLY!"
*      HEADING LINE
*      S.NEWITEM = DCOUNT(NEWITEM,@AM)
*      FOR I.NEWITEM = 1 TO S.NEWITEM
*         PRINT I.NEWITEM"R#3":" ":NEWITEM<I.NEWITEM>

*      NEXT I.NEWITEM
*      PRINT 'Enter line number to select,':
*      PRINT ' .. (double periods) to move up one directory':
*      PRINT ' or return to quit'
*      INPUT SEL
*      BEGIN CASE
*         CASE SEL = ".."
*            S.PATH = DCOUNT(PATH,"/"); IF S.PATH = 1 THEN STOP
*            W.PATH = FIELD(PATH,"/",S.PATH-1); C.PATH = COL1()
*            PATH = PATH[1,C.PATH]
*         CASE SEL = '';  DONE = TRUE
*         CASE NUM(SEL)
*            PATH = TRIM(PATH:NEWITEM<SEL>[1,8])
*            IF TRIM(NEWITEM<SEL>[10,3]) # '' THEN
*               PATH = PATH:".":TRIM(NEWITEM<SEL>[10,3])
*            END
*            IF TRIM(NEWITEM<SEL>[16,5]) # '<DIR>' THEN DONE = TRUE
*         CASE 1; PATH=TRIM(PATH:SEL); DONE = TRUE
*      END CASE
*   END ELSE DONE = TRUE; RESULTS = NEWITEM
*UNTIL DONE DO REPEAT
*RETURN
** Modified 13:14:10 29 JUN 1999 by Administrator version 2.0.0
** Reason: Create program
64:
LINE = "BASIC FFT.BP BROWSER.UNIX.UNIVERSE"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP BROWSER.UNIX.UNIVERSE"; GOSUB PROCESS.COMMAND
ITEMLIST = "BROWSER.WINDOWS98.MVBASE"
LINE = "ADDRAW FFT.BP BROWSER.WINDOWS98.MVBASE"
I.STACK = 67; GOSUB PROCESS.COMMAND
GOTO 67
*SUBROUTINE BROWSER.WINDOWS98.MVBASE(PATH,COMPONENTS,MODE,RESULTS,ERROR)
** COPYRIGHT 1992-1999 FAST FORWARD TECHNOLOGIES
** LIMITED LICENSE IS PROVIDED TO :
**   The Santa Clara County Office of Education
** WARNING! WARNING! WARNING!
** This program may not be duplicated, sold, given, exchanged, modified
** transferred, downloaded, decompiled, or otherwise made available to
** any third party without the express writen and notarized consent of
** FAST FORWARD TECHNOLOGIES, INC.
** Written in the distant past by
** Will Johnson
**
** MODES ARE: S or null which is the default which shows the results onscreen
**            R which returns the results in the RESULTS variable
**            F or null which is the default which works on all dir entries
**            D which only works on sub-directories not all dir entries
**
*      VERS ='1.22'
*      K.PROGRAM = "BROWSER.WINDOWS98.MVBASE"
**!*!  VERSION CONTROL
**
*$INCLUDE CODE.INCLUDES GLOBAL
*IF ERROR # '' THEN RETURN
*$INCLUDE CODE.INCLUDES ENVIRONMENT
*IF ERROR # '' THEN RETURN
*IF UNASSIGNED(PATH) THEN PATH = ''
*READV REMEMBER.LIST FROM eF.CONTROL,'BROWSER',1 ELSE REMEMBER.LIST = '
*S.REMEMBER.LIST = DCOUNT(REMEMBER.LIST,@VM)
*N.OUTPUT.SUFF = PORT.NO:".TXT"
**
** Determine the MODE
**
*BEGIN CASE
*   CASE UNASSIGNED(MODE)
*      MODE = ''; SHOW = TRUE; TYPES = "ALLFILES"
*   CASE MODE = ''; SHOW = TRUE; TYPES = "ALLFILES"
*   CASE 1
*      SHOW = TRUE; * default
*      BEGIN CASE
*         CASE INDEX(MODE,'S',1); SHOW = TRUE
*         CASE INDEX(MODE,'R',1); SHOW = FALSE
*      END CASE
*      TYPES = "ALLFILES" ; * default
*      BEGIN CASE
*         CASE INDEX(MODE,'F',1); TYPES = "ALLFILES"
*         CASE INDEX(MODE,'D',1); TYPES = "DIR"
*      END CASE
*END CASE
**
** Get the starting path if none was passed
**
*IF PATH = '' THEN
*   W.LIST = 1
*   LOOP
*      PRINT "Enter file path, Q=QUIT, N for next path known, return for ":
*      PRINT REMEMBER.LIST<1,W.LIST>
*      INPUT PATH
*      BEGIN CASE
*         CASE PATH = '';  PATH   = REMEMBER.LIST<1,W.LIST>
*         CASE PATH = 'N'
*            W.LIST = W.LIST + 1; IF W.LIST > S.REMEMBER.LIST THEN W.LIST = 1
*         CASE PATH = 'Q'; STOP
*         CASE 1; NULL
*      END CASE
*   UNTIL PATH # 'N' DO REPEAT
*END
**
** Update the list of known paths
**
*LOCATE(PATH,REMEMBER.LIST,1;W.LIST) ELSE
*   REMEMBER.LIST<1,-1> = PATH
*   WRITEV REMEMBER.LIST ON eF.CONTROL,"BROWSER",1
*END
**
*DONE = FALSE
*LOOP
*   IF PATH"R#1" # "\" THEN PATH = PATH:"\"
*   N.OUTPUT.FILE = PATH:N.OUTPUT.SUFF
*   LINE = "! DIR"
*   IF TYPES = "DIR" THEN LINE = LINE:"/ad"
*   LINE = LINE:" ":PATH:" > ":N.OUTPUT.FILE
*   IF SHOW THEN PRINT LINE
*   EXECUTE LINE
*   UOPEN N.OUTPUT.FILE FOR READ TO DOSFILE ELSE 
*      PRINT "ERROR: IN PROGRAM ":K.PROGRAM
*      PRINT "CAN'T OPEN ":N.OUTPUT.FILE ; STOP
*   END
*   EOF = FALSE; CNT = 0; NEWITEM = '';C.AM = 1
*   LOOP
*      CNT = CNT + 1
*      UREAD LINE FROM DOSFILE FOR 100 THEN
*         FOR I = 1 TO LEN(LINE)
*            T.CHAR = LINE[I,1]
*            S.CHAR = SEQ(T.CHAR)
*            BEGIN CASE
*               CASE S.CHAR = 13; C.AM = C.AM + 1; NEWITEM = NEWITEM:AM
*               CASE S.CHAR = 10; NULL
*               CASE 1
*                  NEWITEM = NEWITEM:T.CHAR
*            END CASE
*         NEXT I
*      END ELSE
*         EOF = TRUE
*         IF SHOW THEN PRINT "READ FAILED"
*         UCLOSE DOSFILE ELSE NULL
*      END
*   UNTIL EOF DO REPEAT
**
** Now show me the results
**
*   IF SHOW THEN
*      LINE = 'DIRECTORY OF PATH ':PATH
*      IF TYPES = "DIR" THEN LINE = LINE:" DIRECTORIES ONLY!"
*      HEADING LINE
*      S.NEWITEM = DCOUNT(NEWITEM,@AM)
*      FOR I.NEWITEM = 1 TO S.NEWITEM
*         PRINT I.NEWITEM"R#3":" ":NEWITEM<I.NEWITEM>
*      NEXT I.NEWITEM
*      PRINT 'Enter line number to select,':
*      PRINT ' .. (double periods) to move up one directory':
*      PRINT ' or return to quit'
*      INPUT SEL
*      BEGIN CASE
*         CASE SEL = ".."
*            S.PATH = DCOUNT(PATH,"\"); IF S.PATH = 1 THEN STOP
*            W.PATH = FIELD(PATH,"\",S.PATH-1); C.PATH = COL1()
*            PATH = PATH[1,C.PATH]
*         CASE SEL = '';  DONE = TRUE
*         CASE NUM(SEL)
*            PATH = TRIM(PATH:NEWITEM<SEL>[1,8])
*            IF TRIM(NEWITEM<SEL>[10,3]) # '' THEN
*               PATH = PATH:".":TRIM(NEWITEM<SEL>[10,3])
*            END
*            IF TRIM(NEWITEM<SEL>[16,5]) # '<DIR>' THEN DONE = TRUE
*         CASE 1; PATH=TRIM(PATH:SEL); DONE = TRUE
*      END CASE
*   END ELSE DONE = TRUE; RESULTS = NEWITEM
*UNTIL DONE DO REPEAT
*RETURN
** Modified 19:26:42  23 MAY 1999 by FFT version 1.1
** Reason: Add passed arguments COMPONENTS, and ERROR
** Modified 10:46:30  24 MAY 1999 by FFT version 1.2
** Reason: Allow for string entry of file selected
** Modified 10:49:00  24 MAY 1999 by FFT version 1.4
** Reason: Remove initialization of ERROR variable
** Modified 16:40:13  30 MAY 1999 by FFT version 1.7
** Reason: If error in included segment, return to calling program
** Modified 16:17:15  31 MAY 1999 by FFT version 1.10
** Reason: Use new global control file pointer
** Modified 16:22:07  31 MAY 1999 by FFT version 1.11
** Reason: Allow a starting path to be passed
** Modified 16:25:20  31 MAY 1999 by FFT version 1.12
** Reason: Fix comments and reblock some code
** Modified 16:32:25  31 MAY 1999 by FFT version 1.13
** Reason: Add new arguments to list MODE and RESULTS
** Modified 16:49:05  31 MAY 1999 by FFT version 1.14
** Reason: Add mode GET to just return the results
** Modified 16:49:45  31 MAY 1999 by FFT version 1.15
** Reason: 
** Modified 17:02:48  31 MAY 1999 by FFT version 1.16
** Reason: Add ability to only handle directories
** Modified 17:05:16  31 MAY 1999 by FFT version 1.17
** Reason: Fix typo in DIR statement
** Modified 17:06:42  31 MAY 1999 by FFT version 1.18
** Reason: Add a phrase to heading that indicates a directory only display
** Modified 17:16:29  31 MAY 1999 by FFT version 1.19
** Reason: Fix logic error that there was no return
** Modified 14:19:17 09 JUN 1999 by willj version 1.20
** Reason: 
** Modified 14:19:51 09 JUN 1999 by willj version 1.21
** Reason: 
** Modified 15:12:30  11 JUN 1999 by FFT version 1.22
** Reason: 
*
67:
LINE = "BASIC FFT.BP BROWSER.WINDOWS98.MVBASE"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP BROWSER.WINDOWS98.MVBASE"; GOSUB PROCESS.COMMAND
ITEMLIST = "CLOSEFILE.UNIX.UNIVERSE"
LINE = "ADDRAW FFT.BP CLOSEFILE.UNIX.UNIVERSE"
I.STACK = 70; GOSUB PROCESS.COMMAND
GOTO 70
*SUBROUTINE CLOSEFILE.UNIX.UNIVERSE(UNIXFILE,ERROR)
*CLOSESEQ UNIXFILE
*RETURN
*
*
70:
LINE = "BASIC FFT.BP CLOSEFILE.UNIX.UNIVERSE"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP CLOSEFILE.UNIX.UNIVERSE"; GOSUB PROCESS.COMMAND
ITEMLIST = "CLOSEFILE.WINDOWS.MVBASE"
LINE = "ADDRAW FFT.BP CLOSEFILE.WINDOWS.MVBASE"
I.STACK = 73; GOSUB PROCESS.COMMAND
GOTO 73
*SUBROUTINE CLOSEFILE.WINDOWS.MVBASE(DOSFILE,ERROR)
*UCLOSE DOSFILE ELSE NULL
*RETURN
*
*
73:
LINE = "BASIC FFT.BP CLOSEFILE.WINDOWS.MVBASE"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP CLOSEFILE.WINDOWS.MVBASE"; GOSUB PROCESS.COMMAND
ITEMLIST = "OPENFILE.UNIX.UNIVERSE"
LINE = "ADDRAW FFT.BP OPENFILE.UNIX.UNIVERSE"
I.STACK = 76; GOSUB PROCESS.COMMAND
GOTO 76
*     SUBROUTINE OPENFILE.UNIX.UNIVERSE(PATH,UNIXFILE,ERROR)
*     OPENSEQ PATH TO UNIXFILE ELSE
*        ERROR = "CAN'T OPEN ":PATH ; PRINT ERROR; CLOSESEQ PATH
*     END
*     RETURN
*
*
76:
LINE = "BASIC FFT.BP OPENFILE.UNIX.UNIVERSE"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP OPENFILE.UNIX.UNIVERSE"; GOSUB PROCESS.COMMAND
ITEMLIST = "OPENFILE.WINDOWS.MVBASE"
LINE = "ADDRAW FFT.BP OPENFILE.WINDOWS.MVBASE"
I.STACK = 79; GOSUB PROCESS.COMMAND
GOTO 79
*     SUBROUTINE OPENFILE.WINDOWS.MVBASE(PATH,DOSFILE,ERROR)
*     UOPEN PATH FOR READ TO DOSFILE ELSE
*        ERROR =  "CAN'T OPEN ":PATH ; PRINT ERROR; UCLOSE DOSFILE ELSE NULL
*     END
*     RETURN
*
*
79:
LINE = "BASIC FFT.BP OPENFILE.WINDOWS.MVBASE"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP OPENFILE.WINDOWS.MVBASE"; GOSUB PROCESS.COMMAND
ITEMLIST = "READFILE.UNIX.UNIVERSE"
LINE = "ADDRAW FFT.BP READFILE.UNIX.UNIVERSE"
I.STACK = 82; GOSUB PROCESS.COMMAND
GOTO 82
*SUBROUTINE READFILE.UNIX.UNIVERSE(UNIXFILE,LINE,BYTECNT,EOF)
*EQUATE FALSE TO 0, TRUE TO 1
*READBLK LINE FROM UNIXFILE,BYTECNT ELSE EOF = TRUE
*RETURN
*
*
82:
LINE = "BASIC FFT.BP READFILE.UNIX.UNIVERSE"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP READFILE.UNIX.UNIVERSE"; GOSUB PROCESS.COMMAND
ITEMLIST = "READFILE.WINDOWS.MVBASE"
LINE = "ADDRAW FFT.BP READFILE.WINDOWS.MVBASE"
I.STACK = 85; GOSUB PROCESS.COMMAND
GOTO 85
*SUBROUTINE READFILE.WINDOWS.MVBASE(DOSFILE,LINE,BYTECNT,EOF)
*EQUATE FALSE TO 0, TRUE TO 1
*UREAD LINE FROM DOSFILE FOR BYTECNT ELSE EOF = TRUE
*RETURN
*
*
85:
LINE = "BASIC FFT.BP READFILE.WINDOWS.MVBASE"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP READFILE.WINDOWS.MVBASE"; GOSUB PROCESS.COMMAND
ITEMLIST = "SENTENCE.FUNCTION"
LINE = "ADDRAW FFT.BP SENTENCE.FUNCTION"
I.STACK = 88; GOSUB PROCESS.COMMAND
GOTO 88
*SUBROUTINE SENTENCE.FUNCTION(SENT)
*SENT = SENTENCE()
*RETURN
*
*
88:
LINE = "BASIC FFT.BP SENTENCE.FUNCTION"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP SENTENCE.FUNCTION"; GOSUB PROCESS.COMMAND
ITEMLIST = "SENTENCE.VARIABLE"
LINE = "ADDRAW FFT.BP SENTENCE.VARIABLE"
I.STACK = 91; GOSUB PROCESS.COMMAND
GOTO 91
*SUBROUTINE SENTENCE.VARIABLE(SENT)
*SENT = @SENTENCE
*RETURN
*
*
91:
LINE = "BASIC FFT.BP SENTENCE.VARIABLE"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP SENTENCE.VARIABLE"; GOSUB PROCESS.COMMAND
ITEMLIST = "FFTUNZIP"
LINE = "ADDRAW FFT.BP FFTUNZIP"
I.STACK = 94; GOSUB PROCESS.COMMAND
GOTO 94
**
** Writen by Will Johnson
** Copyright Fast Forward Technologies 1998
** unZips a file after transport at the DOS level
**
*      ERROR = ''; COMPONENTS = ''; FILES = ''
*      K.PROGRAM = 'FFTUNZIP'
*      VERS ='2.92'
**!*!  VERSION CONTROL
**!*!  INSTALL CONTROL
**!*!  FFTUNZIP
*$INCLUDE CODE.INCLUDES GLOBAL
*      IF ERROR # '' THEN
*         PRINT 'In program ':K.PROGRAM:' vers ':VERS
*         PRINT ERROR ; GOTO ABORT.FFTUNZIP
*      END
**environment variables
*$INCLUDE CODE.INCLUDES ENVIRONMENT
*      IF ERROR # '' THEN
*         PRINT 'In program ':K.PROGRAM:' vers ':VERS
*         PRINT ERROR ; GOTO ABORT.FFTUNZIP
*      END
**
*      RETURNTOME = FALSE
*$INCLUDE CODE.INCLUDES GET.MY.CONTROLS
*      IF ERROR # '' THEN
*         PRINT 'In program ':K.PROGRAM:' vers ':VERS
*         PRINT ERROR ; GOTO ABORT.FFTUNZIP
*      END
**
*$INCLUDE CODE.INCLUDES GET.SENTENCE
*      IF ERROR # '' THEN
*         PRINT 'In program ':K.PROGRAM:' vers ':VERS
*         PRINT ERROR ; GOTO ABORT.FFTUNZIP
*      END
**
*      WRITE FILES ON eF.CONTROL,'FILES*':K.PROGRAM
*      PRINT 'You are running ':K.PROGRAM:' from ':VENDOR.REC(V.VENDOR.NAME)
*      PRINT 'This is version ':VERS
*      READV REMEMBER.LIST FROM eF.CONTROL,'UNZIPDOS',1 ELSE REMEMBER.LIST = ''
*      VERB = FIELD(SENT,MACHINE.SENT.SEP,1)
*      IF VERB = 'RAID' OR VERB = 'RUN' THEN
*         OFFSET = 4
*      END ELSE OFFSET = 2
*      BEGIN CASE
*         CASE MACHINE.OS = "WINDOWS 98"
*            SOURCE.FILE.TYPE = "WINDOWS"
*         CASE MACHINE.OS = "UNIX"
*            SOURCE.FILE.TYPE = "UNIX"
*      END CASE
*      PATH = FIELD(SENT,MACHINE.SENT.SEP,OFFSET)
*      BEGIN CASE
*         CASE PATH = 'HELP' ; GOSUB HELP ; GOTO ABORT.FFTUNZIP
*         CASE PATH = ''
*            PRINT 'FILE, B TO BROWSE ': ; INPUT N.FILE
*            IF N.FILE = 'B' THEN
*               CALL BROWSER(PATH,COMPONENTS,MODE,RESULTS,ERROR)
*               IF ERROR # '' THEN PRINT ERROR ; GOTO ABORT.FFTUNZIP
*            END ELSE PATH = N.FILE
*         CASE PATH[2,1] = ":" ; NULL
*         CASE 1 ; SOURCE.FILE.TYPE = "PICK"
*      END CASE
*      IF PATH = '' THEN GOSUB HELP ; GOTO ABORT.FFTUNZIP
*      PRINT SENT ; PRINT PATH
*      BEGIN CASE
*         CASE SOURCE.FILE.TYPE = 'WINDOWS 98'
*            CALL OPENFILE.WINDOWS.MVBASE(PATH,DOSFILE,ERROR)
*            IF ERROR # '' THEN PRINT ERROR ; GOSUB HELP ; GOTO ABORT.FFTUNZIP
*         CASE SOURCE.FILE.TYPE = 'UNIX'
*            CALL OPENFILE.UNIX.UNIVERSE(PATH,UNIXFILE,ERROR)
*            IF ERROR # '' THEN PRINT ERROR ; GOSUB HELP ; GOTO ABORT.FFTUNZIP
*         CASE SOURCE.FILE.TYPE = 'PICK'
*            OPEN PATH TO PICKFILE ELSE ERROR = 'Cant open ':PATH
*            IF ERROR # '' THEN PRINT ERROR ; GOSUB HELP ; GOTO ABORT.FFTUNZIP
*            N.SOURCE.ITEM = FIELD(SENT,MACHINE.SENT.SEP,OFFSET+1)
*            READ LINES FROM PICKFILE,N.SOURCE.ITEM ELSE
*               ERROR = "Cant read ":N.SOURCE.ITEM:' from file ':PATH
*            END
*            IF ERROR # '' THEN PRINT ERROR ;  GOSUB HELP ;  GOTO ABORT.FFTUNZIP
*            L.LINES = LEN(LINES)
*      END CASE
**
*      PRINT "DESTINATION FILE NAME ": ; INPUT N.DEST.FILE
*      OPEN N.DEST.FILE TO F.DEST.FILE ELSE
*         PRINT "Can't open ":N.DEST.FILE ; GOSUB HELP
*         GOSUB CLOSEHOSTFILE
*         GOTO ABORT.FFTUNZIP
*      END
**
*      C.ORIG.FILE = 0 ; K.DEST.FILE = '' ; S.DEST.FILE = 0
*      S.ORIG.FILE = 0
*      EOF = FALSE ; R.DEST.FILE = '' ; T.DEST.FILE = '' ; STATE = 0
*      ZIPVERS = '1.0'                    ; * DEFAULT IF NOT STATED IN TRANSFERRED FILE
*      PRINT
*      PRINT 'ORIG SIZE'"L#14":" ":'DEST KEY'"L#12":" ":'DEST SIZE'"L#12"
*      PRINT "BYTES""L#8":" ":"LINES""L#5":" ":
*      PRINT SPACE(14):
*      PRINT "BYTES""L#5":" ":"LINES""L#5"
*      T.TIME = TIME() ; OLD.K.DEST.FILE = ''
*      LOOP
*         BEGIN CASE
*            CASE SOURCE.FILE.TYPE = "WINDOWS 98"
*               CALL READFILE.WINDOWS.MVBASE(DOSFILE,LINE,100,EOF)
*            CASE SOURCE.FILE.TYPE = "UNIX"
*               CALL READFILE.UNIX.UNIVERSE(UNIXFILE,LINE,100,EOF)
*            CASE SOURCE.FILE.TYPE = "PICK"
*               IF C.ORIG.FILE >= L.LINES THEN EOF = TRUE ELSE
*                  LINE = LINES[C.ORIG.FILE+1,100]
*               END
*         END CASE
*      UNTIL EOF DO
*         C.ORIG.FILE = C.ORIG.FILE + LEN(LINE)
*         FOR I = 1 TO LEN(LINE)
*            T.CHAR = LINE[I,1] ; S.CHAR = SEQ(T.CHAR)
*            BEGIN CASE
*               CASE SOURCE.FILE.TYPE = "PICK" AND S.CHAR = (254)
*                  S.ORIG.FILE = S.ORIG.FILE + 1 ; GOSUB TEST.LINE
*                  T.DEST.FILE = ''
*               CASE S.CHAR = 13
*                  S.ORIG.FILE = S.ORIG.FILE + 1 ; GOSUB TEST.LINE
*                  T.DEST.FILE = ''
*               CASE S.CHAR = 10 ; NULL
*               CASE 1
*                  T.DEST.FILE = T.DEST.FILE:T.CHAR
*            END CASE
*         NEXT I
*         IF T.TIME + 5 < TIME() THEN GOSUB DISPLAY.COUNTER
*      REPEAT
*      EOF = TRUE ; PRINT "EOF"
*      GOSUB CLOSEHOSTFILE
*      IF T.DEST.FILE # '' THEN GOSUB TEST.LINE
*      IF R.DEST.FILE # '' THEN
*         WRITE R.DEST.FILE ON F.DEST.FILE,K.DEST.FILE
*      END
*      GOSUB DISPLAY.COUNTER ; PRINT
*LEAVE.FFTUNZIP:
*ABORT.FFTUNZIP:
*      STOP
**
*CLOSEHOSTFILE:
*      BEGIN CASE
*         CASE SOURCE.FILE.TYPE = "WINDOWS 98"
*            CALL CLOSEFILE.WINDOWS.MVBASE(DOSFILE,ERROR)
*         CASE SOURCE.FILE.TYPE = "UNIX"
*            CALL CLOSEFILE.UNIX.UNIVERSE(UNIXFILE,ERROR)
*      END CASE
*      RETURN
**
*DISPLAY.COUNTER:
*      PRINT CHAR(13):
*      PRINT C.ORIG.FILE"R#8":" ":
*      PRINT S.ORIG.FILE"R#5":" ":
*      PRINT K.DEST.FILE"L#12":" ":
*      PRINT LEN(R.DEST.FILE)"R#5":" ":
*      PRINT S.DEST.FILE"R#5":CHAR(0):
*      T.TIME = TIME()
*      RETURN
**
*TEST.LINE:
*      BEGIN CASE
*         CASE T.DEST.FILE = CHAR(0):CHAR(12):STR(CHAR(0),5)
*            T.DEST.FILE = ''
*         CASE T.DEST.FILE[1,2] = CHAR(0):CHAR(32)
*            T.DEST.FILE = T.DEST.FILE[3,LEN(T.DEST.FILE)]
*         CASE T.DEST.FILE[1,1] = CHAR(0)
*            C.DEST.FILE = 1
*            LOOP
*               C.DEST.FILE = C.DEST.FILE + 1
*            UNTIL T.DEST.FILE[C.DEST.FILE,1] # CHAR(0) DO REPEAT
*            T.DEST.FILE = T.DEST.FILE[C.DEST.FILE,LEN(T.DEST.FILE)]
*      END CASE
*      BEGIN CASE
*         CASE STATE = 0 AND SEQ(TRIM(T.DEST.FILE)[1,1]) = 12 ; NULL
*         CASE STATE = 0 AND SEQ(TRIM(T.DEST.FILE)[1,1]) = 255 ; NULL
*         CASE STATE = 0 AND TRIM(T.DEST.FILE) = '' ; NULL
*         CASE STATE = 0 AND TRIM(T.DEST.FILE)[1,8] = "!VERSION"
*            ZIPVERS = TRIM(T.DEST.FILE)[10,LEN(T.DEST.FILE)]
*         CASE STATE = 0 AND TRIM(T.DEST.FILE)[1,9] = "!ZIPSTAMP"
*            ZIPSTAMP = TRIM(T.DEST.FILE)[11,LEN(T.DEST.FILE)]
*         CASE STATE = 0 AND TRIM(T.DEST.FILE) = "!STARTNEWITEM" ; STATE = 1
*         CASE STATE = 0
*            PRINT "INVALID TAG OR UNKNOWN TEXT FOUND IN ZIPPED ITEM"
*            PRINT "LINE ":S.ORIG.FILE:" READS:"
*            PRINT OCONV(T.DEST.FILE,'MCP'):' ':LEN(T.DEST.FILE)
*            FOR I.DEST.FILE = 1 TO LEN(T.DEST.FILE)
*               PRINT SEQ(T.DEST.FILE[I.DEST.FILE,1]):' ':
*            NEXT I.DEST.FILE
*            PRINT "FATAL ERROR IN ZIPPED ITEM"
*            GOSUB CLOSEHOSTFILE
*            PRINT "HIT ANY KEY"
*$INCLUDE CODE.INCLUDES CHAR.INPUT
*            STOP
*         CASE STATE = 1
*            K.DEST.FILE = TRIM(T.DEST.FILE)
*            R.DEST.FILE = '' ; STATE = 2 ; S.DEST.FILE = 0
*            GOSUB DISPLAY.COUNTER
*         CASE STATE = 2 AND TRIM(T.DEST.FILE) = '!STARTNEWITEM'
*            WRITE R.DEST.FILE ON F.DEST.FILE,K.DEST.FILE
*            GOSUB DISPLAY.COUNTER ; PRINT ; STATE = 1
*         CASE STATE = 2 AND T.DEST.FILE[1,4] = (S.DEST.FILE+1)"R%4"
*            S.DEST.FILE = S.DEST.FILE + 1
*            R.DEST.FILE<S.DEST.FILE> = T.DEST.FILE[6,LEN(T.DEST.FILE)]
*            IF T.TIME + 5 < TIME() THEN GOSUB DISPLAY.COUNTER
*         CASE STATE = 2
** APPEND TO LAST LINE
*            R.DEST.FILE = R.DEST.FILE:T.DEST.FILE[6,LEN(T.DEST.FILE)]
*      END CASE
*      RETURN
**
*HELP:
*      PRINT ; PRINT SPACE(20):'HELP TEXT' ; PRINT
*      PRINT 'This program will UNZIP a file from a DOS location into a Pick '
*      PRINT 'file/item, breaking the zipped item into its constituent parts.'
*      PRINT '(Please see the FFTZIP program for more information.)'
*      PRINT 'The format is: FFTUNZIP (YOU WILL BE PROMPTED FOR A PATH'
*      PRINT '               FFTUNZIP path (e.g. C:\MVBASE\MYFILE.TXT)'
*      PRINT
*      RETURN
**
** Modified 20:39:55  21 MAY 1999 by FFT version 2.1
** Reason: Add version control, install control and GET.MY.CONTROL logi
** Modified 20:40:19  21 MAY 1999 by FFT version 2.2
** Reason: Fix comment area
** Modified 16:14:14  23 MAY 1999 by FFT version 2.3
** Reason: Initialize RETURNTOME variable and add check of ERROR after GET.MY.CONTROLS
** Modified 16:15:22  23 MAY 1999 by FFT version 2.4
** Reason: Initialize COMPONENTS variable
** Modified 16:15:57  23 MAY 1999 by FFT version 2.5
** Reason: Add GLOBAL.OPENS include
** Modified 18:39:32  23 MAY 1999 by FFT version 2.8
** Reason: Add the GET.SENTENCE include
** Modified 19:29:59  23 MAY 1999 by FFT version 2.9
** Reason: Add COMPONENTS and ERROR variable to call to BROWSER
** Modified 19:41:02  23 MAY 1999 by FFT version 2.10
** Reason: Add an extra PRINT after char.input in ABORT.WITH.INPUT
** Modified 20:10:05  23 MAY 1999 by FFT version 2.11
** Reason: Remove use of VERS in name of program
** Modified 10:55:13  24 MAY 1999 by FFT version 2.12
** Reason: Trim lines before comparing them to tags in state 0
** Modified 10:56:44  24 MAY 1999 by FFT version 2.13
** Reason: Print line that caused fatal error
** Modified 10:59:57  24 MAY 1999 by FFT version 2.14
** Reason: Add UCLOSE DOSFILE to every place the program could stop prematurely
** Modified 11:03:58  24 MAY 1999 by FFT version 2.15
** Reason: Allow passage from state 0 to state 1
** Modified 11:06:26  24 MAY 1999 by FFT version 2.16
** Reason: Add display of key being writen
** Modified 11:07:11  24 MAY 1999 by FFT version 2.17
** Reason: Increase test from 100 to 500 bytes
** Modified 11:08:10  24 MAY 1999 by FFT version 2.18
** Reason: Increase test from 500 to 1500 bytes
** Modified 11:08:48  24 MAY 1999 by FFT version 2.19
** Reason: Increase test from 1500 to 4500 bytes
** Modified 11:09:27  24 MAY 1999 by FFT version 2.20
** Reason: Increase test from 4500 to 15000 bytes
** Modified 11:26:06  24 MAY 1999 by FFT version 2.23
** Reason: Fix bug where program didn't see STARTNEWITEM tag because of a leading space
** Modified 11:30:08  24 MAY 1999 by FFT version 2.24
** Reason: Fix bug where lines were getting writen twice to destination file
** Modified 11:31:10  24 MAY 1999 by FFT version 2.25
** Reason: Trim Item Id because of leading space problem
** Modified 14:17:26  30 MAY 1999 by FFT version 2.62
** Reason: Initialize ZIPVERS variable in case version number is not in transferred fiel
** Modified 15:00:25  30 MAY 1999 by FFT version 2.63
** Reason: Widen field displaying Char count of source file
** Modified 15:19:25  30 MAY 1999 by FFT version 2.64
** Reason: Upgrade to version thats supports appending line
** Modified 15:21:12  30 MAY 1999 by FFT version 2.65
** Reason: Remove line numbers that ZIP installed
** Modified 16:38:58  30 MAY 1999 by FFT version 2.66
** Reason: Print error if any upon returning from include segment
** Modified 17:41:48  30 MAY 1999 by FFT version 2.67
** Reason: Display the counter only every 5 seconds
** Modified 17:43:40  30 MAY 1999 by FFT version 2.68
** Reason:
** Modified 17:47:03  30 MAY 1999 by FFT version 2.69
** Reason: Display counter every time a record is writen or every 5 seconds
** Modified 17:48:39  30 MAY 1999 by FFT version 2.70
** Reason:
** Modified 17:50:04  30 MAY 1999 by FFT version 2.71
** Reason: Do a carriage return after the display counter that happens when rec is writen
** Modified 16:38:39  31 MAY 1999 by FFT version 2.72
** Reason: Add standard method of display error messages from includes and add two new arguments to argument list to browser routine
** Modified 17:31:34  31 MAY 1999 by FFT version 2.73
** Reason: Fix program name in HELP display, also remove redundant ABORT routine
** Modified 17:36:18  31 MAY 1999 by FFT version 2.74
** Reason: Improve the wording of the HELP display
** Modified 16:22:12  11 JUN 1999 by FFT version 2.75
** Reason: Make Windows file open external
** Modified 16:29:49  11 JUN 1999 by FFT version 2.76
** Reason: Make opening, reading and closing hostfiles external subroutines
** Modified 16:36:34  11 JUN 1999 by FFT version 2.77
** Reason:
** Modified 18:20:40  13 JUN 1999 by FFT version 2.78
** Reason:
** Modified 18:33:51  13 JUN 1999 by FFT version 2.79
** Reason: Add ability to unzip an item in a PICK file
** Modified 18:36:34  13 JUN 1999 by FFT version 2.80
** Reason:
** Modified 18:37:28  13 JUN 1999 by FFT version 2.81
** Reason:
** Modified 12:21:46  14 JUN 1999 by FFT version 2.82
** Reason: Remove GLOBAL.OPENS include
** Modified 14:57:54  14 JUN 1999 by FFT version 2.83
** Reason: Fix bug that on certain systems, null lines would not get put back into the item
** Modified 15:12:25  14 JUN 1999 by FFT version 2.84
** Reason: Fix bug that was placing the line one position higher than it was supposed to be
** Modified 12:15:41 17 JUN 1999 by willj version 2.85
** Reason: New variable source file tyep to be more specific about why we are calling certain subs
** Modified 17:29:47  18 JUN 1999 by FFT version 2.86
** Reason:
** Modified 17:30:26  18 JUN 1999 by FFT version 2.87
** Reason: Remove components variable
** Modified 17:30:42  18 JUN 1999 by FFT version 2.88
** Reason:
** Modified 19:24:08  18 JUN 1999 by FFT version 2.89
** Reason:
** Modified 19:28:26  18 JUN 1999 by FFT version 2.90
** Reason: Add error checking to pickfile read
** Modified 19:41:51  21 JUN 1999 by FFT version 2.91
** Reason: Add files variable and make it a control
** Modified 19:48:08  21 JUN 1999 by FFT version 2.92
** Reason: Fix variable with wrong name
*
*
94:
LINE = "BASIC FFT.BP FFTUNZIP"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP FFTUNZIP"; GOSUB PROCESS.COMMAND
LINE = "FFTUNZIP A B"; GOSUB PROCESS.COMMAND
LINE = "CREATE-FILE &SAVEDLISTS& 1,1 31,1"; GOSUB PROCESS.COMMAND
ITEMLIST = "PROGRAM*WS"
LINE = "ADDRAW GLOBAL.CONTROL PROGRAM*WS"
I.STACK = 99; GOSUB PROCESS.COMMAND
GOTO 99
*11499
*11499
*Administrator
*FFT
*Will Johnson
*
*
*
*FFT
99:
ITEMLIST = "CONFIG*WS"
LINE = "ADD GLOBAL.CONTROL"
I.STACK = 100; GOSUB PROCESS.COMMAND
GOTO 100
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:25 29 JUN 1999
*!STARTNEWITEM
*CONFIG*WS
*0001 RUN FFT.BP UPGRADE*WSýRUN FFT.BP UPGRADE*FFTUNZIPýCREATE-FILE CODE.CON
*     TROL 1,1 3,1ýCREATE-FILE CODE.INCLUDES 1,1 13,1,BýCREATE-FILE GLOBAL.C
*     ONTROL 1,1 11,1ýCREATE-FILE VERSION.REGISTRY 1,1 3,1ýADDRAW GLOBAL.CON
*     TROL PROGRAM*FFTUNZIPýADDRAW GLOBAL.CONTROL VENDOR*FFTýADDRAW GLOBAL.C
*     ONTROL COMPONENTS*FFTUNZIPýADDRAW VERSION.REGISTRY INCLUDE*CHAR.INPUTý
*     ADDRAW VERSION.REGISTRY INCLUDE*CLIENT.EQUýADDRAW VERSION.REGISTRY INC
*     LUDE*ENVIRONMENTýADDRAW VERSION.REGISTRY INCLUDE*GET.MY.CONTROLSýADDRA
*     W VERSION.REGISTRY INCLUDE*GET.SENTENCEýADDRAW VERSION.REGISTRY INCLUD
*     E*GLOBALýADDRAW VERSION.REGISTRY INCLUDE*INSTALL.EQUýADDRAW VERSION.RE
*     GISTRY INCLUDE*MACHINE.EQUýADDRAW VERSION.REGISTRY INCLUDE*PRE.ENVIRON
*     MENTýADDRAW VERSION.REGISTRY INCLUDE*PROGRAM.EQUýADDRAW VERSION.REGIST
*     RY INCLUDE*VENDOR.EQUýADDRAW VERSION.REGISTRY BROWSERýADDRAW VERSION.R
*     EGISTRY BROWSER.WINDOWS98.MVBASEýADDRAW VERSION.REGISTRY CLOSEFILE.UNI
*     X.UNIVERSEýADDRAW VERSION.REGISTRY CLOSEFILE.WINDOWS.MVBASEýADDRAW VER
*     SION.REGISTRY OPENFILE.UNIX.UNIVERSEýADDRAW VERSION.REGISTRY OPENFILE.
*     WINDOWS.MVBASEýADDRAW VERSION.REGISTRY READFILE.UNIX.UNIVERSEýADDRAW V
*     ERSION.REGISTRY READFILE.WINDOWS.MVBASEýADDRAW VERSION.REGISTRY SENTEN
*     CE.FUNCTIONýADDRAW VERSION.REGISTRY SENTENCE.VARIABLEýADDRAW CODE.INCL
*     UDES CHAR.INPUTýADDRAW CODE.CONTROL ceýADDRAW CODE.CONTROL CLIENT.EQUý
*     ADDRAW CODE.INCLUDES CLIENT.EQUýADDRAW CODE.CONTROL eýADDRAW CODE.CONT
*     ROL ENVIRONMENTýADDRAW CODE.INCLUDES ENVIRONMENTýADDRAW CODE.CONTROL g
*     cýADDRAW CODE.CONTROL GET.MY.CONTROLSýADDRAW CODE.INCLUDES GET.MY.CONT
*     ROLSýADDRAW CODE.CONTROL gsýADDRAW CODE.CONTROL GET.SENTENCEýADDRAW CO
*     DE.INCLUDES GET.SENTENCEýADDRAW CODE.CONTROL gýADDRAW CODE.CONTROL GLO
*     BALýADDRAW CODE.INCLUDES GLOBALýADDRAW CODE.CONTROL ieýADDRAW CODE.CON
*     TROL INSTALL.EQUýADDRAW CODE.INCLUDES INSTALL.EQUýADDRAW CODE.CONTROL 
*     mýADDRAW CODE.CONTROL MACHINE.EQUýADDRAW CODE.INCLUDES MACHINE.EQUýADD
*     RAW CODE.INCLUDES PRE.ENVIRONMENTýADDRAW CODE.CONTROL peýADDRAW CODE.C
*     ONTROL PROGRAM.EQUýADDRAW CODE.INCLUDES PROGRAM.EQUýADDRAW CODE.CONTRO
*     L veýADDRAW CODE.CONTROL VENDOR.EQUýADDRAW CODE.INCLUDES VENDOR.EQUýCR
*     EATE-FILE FFT.BP 7,1 61,1,BýADDRAW FFT.BP BROWSERýBASIC FFT.BP BROWSER
*     ýCATALOG FFT.BP BROWSERýADDRAW FFT.BP BROWSER.UNIX.UNIVERSEýBASIC FFT.
*     BP BROWSER.UNIX.UNIVERSEýCATALOG FFT.BP BROWSER.UNIX.UNIVERSEýADDRAW F
*     FT.BP BROWSER.WINDOWS98.MVBASEýBASIC FFT.BP BROWSER.WINDOWS98.MVBASEýC
*     ATALOG FFT.BP BROWSER.WINDOWS98.MVBASEýADDRAW FFT.BP CLOSEFILE.UNIX.UN
*     IVERSEýBASIC FFT.BP CLOSEFILE.UNIX.UNIVERSEýCATALOG FFT.BP CLOSEFILE.U
*     NIX.UNIVERSEýADDRAW FFT.BP CLOSEFILE.WINDOWS.MVBASEýBASIC FFT.BP CLOSE
*     FILE.WINDOWS.MVBASEýCATALOG FFT.BP CLOSEFILE.WINDOWS.MVBASEýADDRAW FFT
*     .BP OPENFILE.UNIX.UNIVERSEýBASIC FFT.BP OPENFILE.UNIX.UNIVERSEýCATALOG
*      FFT.BP OPENFILE.UNIX.UNIVERSEýADDRAW FFT.BP OPENFILE.WINDOWS.MVBASEýB
*     ASIC FFT.BP OPENFILE.WINDOWS.MVBASEýCATALOG FFT.BP OPENFILE.WINDOWS.MV
*     BASEýADDRAW FFT.BP READFILE.UNIX.UNIVERSEýBASIC FFT.BP READFILE.UNIX.U
*     NIVERSEýCATALOG FFT.BP READFILE.UNIX.UNIVERSEýADDRAW FFT.BP READFILE.W
*     INDOWS.MVBASEýBASIC FFT.BP READFILE.WINDOWS.MVBASEýCATALOG FFT.BP READ
*     FILE.WINDOWS.MVBASEýADDRAW FFT.BP SENTENCE.FUNCTIONýBASIC FFT.BP SENTE
*     NCE.FUNCTIONýCATALOG FFT.BP SENTENCE.FUNCTIONýADDRAW FFT.BP SENTENCE.V
*     ARIABLEýBASIC FFT.BP SENTENCE.VARIABLEýCATALOG FFT.BP SENTENCE.VARIABL
*     EýADDRAW FFT.BP FFTUNZIPýBASIC FFT.BP FFTUNZIPýCATALOG FFT.BP FFTUNZIP
*     ýFFTUNZIP A BýCREATE-FILE &SAVEDLISTS& 1,1 31,1ýADDRAW GLOBAL.CONTROL 
*     PROGRAM*WSýADD GLOBAL.CONTROL CONFIG*WSýADD GLOBAL.CONTROL PROGRAM*WS.
*     TUTORýADD GLOBAL.CONTROL FFTýADD GLOBAL.CONTROL COMPONENTS*WSýADD GLOB
*     AL.CONTROL CONTACT*FFTýADD VERSION.REGISTRY INCLUDE*CONTACT.EQUýADD VE
*     RSION.REGISTRY INCLUDE*WS.ENVIRONMENTýADD VERSION.REGISTRY EXECUTEýADD
*      VERSION.REGISTRY EXECUTE.MVBASEýADD VERSION.REGISTRY EXECUTE.UNIVERSE
*     ýADD VERSION.REGISTRY INSTALLERýADD VERSION.REGISTRY WINDOWS.TRANSLATE
*     .PUNCTUATIONýADD VERSION.REGISTRY WS.TUTORýADD CODE.CONTROL coeýADD CO
*     DE.CONTROL CONTACT.EQUýADD CODE.INCLUDES CONTACT.EQUýADD CODE.CONTROL 
*     weýADD CODE.CONTROL WS.ENVIRONMENTýADD CODE.INCLUDES WS.ENVIRONMENTýAD
*     D FFT.BP EXECUTEýBASIC FFT.BP EXECUTEýCATALOG FFT.BP EXECUTEýADD FFT.B
*     P EXECUTE.D3ýBASIC FFT.BP EXECUTE.D3ýCATALOG FFT.BP EXECUTE.D3ýADD FFT
*     .BP EXECUTE.MVBASEýBASIC FFT.BP EXECUTE.MVBASEýCATALOG FFT.BP EXECUTE.
*     MVBASEýADD FFT.BP EXECUTE.ULTIMATEýBASIC FFT.BP EXECUTE.ULTIMATEýCATAL
*     OG FFT.BP EXECUTE.ULTIMATEýADD FFT.BP EXECUTE.UNIVERSEýBASIC FFT.BP EX
*     ECUTE.UNIVERSEýCATALOG FFT.BP EXECUTE.UNIVERSEýADD FFT.BP INSTALLERýBA
*     SIC FFT.BP INSTALLERýCATALOG FFT.BP INSTALLERýADD FFT.BP WINDOWS.TRANS
*     LATE.PUNCTUATIONýBASIC FFT.BP WINDOWS.TRANSLATE.PUNCTUATIONýCATALOG FF
*     T.BP WINDOWS.TRANSLATE.PUNCTUATIONýADD FFT.BP WS.TUTORýBASIC FFT.BP WS
*     .TUTORýCATALOG FFT.BP WS.TUTORýADD FFT.BP UNINSTALL*WS UPGRADE*WSýBASI
*     C FFT.BP UNINSTALL*WS UPGRADE*WSýCATALOG FFT.BP UNINSTALL*WS UPGRADE*W
*     SýADD FFT.BP WS#VERS2.72.1ýBASIC FFT.BP WS#VERS2.72.1ýCATALOG FFT.BP W
*     S#VERS2.72.1ýADD FFT.BP WSýBASIC FFT.BP WSýCATALOG FFT.BP WSýCHAIN WS
100:
ITEMLIST = "CONFIG*WS"
LINE = "ADD GLOBAL.CONTROL"
I.STACK = 101; GOSUB PROCESS.COMMAND
GOTO 101
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:26 29 JUN 1999
*!STARTNEWITEM
*CONFIG*WS
*0001 RUN FFT.BP UPGRADE*WSýRUN FFT.BP UPGRADE*FFTUNZIPýCREATE-FILE CODE.CON
*     TROL 1,1 3,1ýCREATE-FILE CODE.INCLUDES 1,1 13,1,BýCREATE-FILE GLOBAL.C
*     ONTROL 1,1 11,1ýCREATE-FILE VERSION.REGISTRY 1,1 3,1ýADDRAW GLOBAL.CON
*     TROL PROGRAM*FFTUNZIPýADDRAW GLOBAL.CONTROL VENDOR*FFTýADDRAW GLOBAL.C
*     ONTROL COMPONENTS*FFTUNZIPýADDRAW VERSION.REGISTRY INCLUDE*CHAR.INPUTý
*     ADDRAW VERSION.REGISTRY INCLUDE*CLIENT.EQUýADDRAW VERSION.REGISTRY INC
*     LUDE*ENVIRONMENTýADDRAW VERSION.REGISTRY INCLUDE*GET.MY.CONTROLSýADDRA
*     W VERSION.REGISTRY INCLUDE*GET.SENTENCEýADDRAW VERSION.REGISTRY INCLUD
*     E*GLOBALýADDRAW VERSION.REGISTRY INCLUDE*INSTALL.EQUýADDRAW VERSION.RE
*     GISTRY INCLUDE*MACHINE.EQUýADDRAW VERSION.REGISTRY INCLUDE*PRE.ENVIRON
*     MENTýADDRAW VERSION.REGISTRY INCLUDE*PROGRAM.EQUýADDRAW VERSION.REGIST
*     RY INCLUDE*VENDOR.EQUýADDRAW VERSION.REGISTRY BROWSERýADDRAW VERSION.R
*     EGISTRY BROWSER.WINDOWS98.MVBASEýADDRAW VERSION.REGISTRY CLOSEFILE.UNI
*     X.UNIVERSEýADDRAW VERSION.REGISTRY CLOSEFILE.WINDOWS.MVBASEýADDRAW VER
*     SION.REGISTRY OPENFILE.UNIX.UNIVERSEýADDRAW VERSION.REGISTRY OPENFILE.
*     WINDOWS.MVBASEýADDRAW VERSION.REGISTRY READFILE.UNIX.UNIVERSEýADDRAW V
*     ERSION.REGISTRY READFILE.WINDOWS.MVBASEýADDRAW VERSION.REGISTRY SENTEN
*     CE.FUNCTIONýADDRAW VERSION.REGISTRY SENTENCE.VARIABLEýADDRAW CODE.INCL
*     UDES CHAR.INPUTýADDRAW CODE.CONTROL ceýADDRAW CODE.CONTROL CLIENT.EQUý
*     ADDRAW CODE.INCLUDES CLIENT.EQUýADDRAW CODE.CONTROL eýADDRAW CODE.CONT
*     ROL ENVIRONMENTýADDRAW CODE.INCLUDES ENVIRONMENTýADDRAW CODE.CONTROL g
*     cýADDRAW CODE.CONTROL GET.MY.CONTROLSýADDRAW CODE.INCLUDES GET.MY.CONT
*     ROLSýADDRAW CODE.CONTROL gsýADDRAW CODE.CONTROL GET.SENTENCEýADDRAW CO
*     DE.INCLUDES GET.SENTENCEýADDRAW CODE.CONTROL gýADDRAW CODE.CONTROL GLO
*     BALýADDRAW CODE.INCLUDES GLOBALýADDRAW CODE.CONTROL ieýADDRAW CODE.CON
*     TROL INSTALL.EQUýADDRAW CODE.INCLUDES INSTALL.EQUýADDRAW CODE.CONTROL 
*     mýADDRAW CODE.CONTROL MACHINE.EQUýADDRAW CODE.INCLUDES MACHINE.EQUýADD
*     RAW CODE.INCLUDES PRE.ENVIRONMENTýADDRAW CODE.CONTROL peýADDRAW CODE.C
*     ONTROL PROGRAM.EQUýADDRAW CODE.INCLUDES PROGRAM.EQUýADDRAW CODE.CONTRO
*     L veýADDRAW CODE.CONTROL VENDOR.EQUýADDRAW CODE.INCLUDES VENDOR.EQUýCR
*     EATE-FILE FFT.BP 7,1 61,1,BýADDRAW FFT.BP BROWSERýBASIC FFT.BP BROWSER
*     ýCATALOG FFT.BP BROWSERýADDRAW FFT.BP BROWSER.UNIX.UNIVERSEýBASIC FFT.
*     BP BROWSER.UNIX.UNIVERSEýCATALOG FFT.BP BROWSER.UNIX.UNIVERSEýADDRAW F
*     FT.BP BROWSER.WINDOWS98.MVBASEýBASIC FFT.BP BROWSER.WINDOWS98.MVBASEýC
*     ATALOG FFT.BP BROWSER.WINDOWS98.MVBASEýADDRAW FFT.BP CLOSEFILE.UNIX.UN
*     IVERSEýBASIC FFT.BP CLOSEFILE.UNIX.UNIVERSEýCATALOG FFT.BP CLOSEFILE.U
*     NIX.UNIVERSEýADDRAW FFT.BP CLOSEFILE.WINDOWS.MVBASEýBASIC FFT.BP CLOSE
*     FILE.WINDOWS.MVBASEýCATALOG FFT.BP CLOSEFILE.WINDOWS.MVBASEýADDRAW FFT
*     .BP OPENFILE.UNIX.UNIVERSEýBASIC FFT.BP OPENFILE.UNIX.UNIVERSEýCATALOG
*      FFT.BP OPENFILE.UNIX.UNIVERSEýADDRAW FFT.BP OPENFILE.WINDOWS.MVBASEýB
*     ASIC FFT.BP OPENFILE.WINDOWS.MVBASEýCATALOG FFT.BP OPENFILE.WINDOWS.MV
*     BASEýADDRAW FFT.BP READFILE.UNIX.UNIVERSEýBASIC FFT.BP READFILE.UNIX.U
*     NIVERSEýCATALOG FFT.BP READFILE.UNIX.UNIVERSEýADDRAW FFT.BP READFILE.W
*     INDOWS.MVBASEýBASIC FFT.BP READFILE.WINDOWS.MVBASEýCATALOG FFT.BP READ
*     FILE.WINDOWS.MVBASEýADDRAW FFT.BP SENTENCE.FUNCTIONýBASIC FFT.BP SENTE
*     NCE.FUNCTIONýCATALOG FFT.BP SENTENCE.FUNCTIONýADDRAW FFT.BP SENTENCE.V
*     ARIABLEýBASIC FFT.BP SENTENCE.VARIABLEýCATALOG FFT.BP SENTENCE.VARIABL
*     EýADDRAW FFT.BP FFTUNZIPýBASIC FFT.BP FFTUNZIPýCATALOG FFT.BP FFTUNZIP
*     ýFFTUNZIP A BýCREATE-FILE &SAVEDLISTS& 1,1 31,1ýADDRAW GLOBAL.CONTROL 
*     PROGRAM*WSýADD GLOBAL.CONTROL CONFIG*WSýADD GLOBAL.CONTROL PROGRAM*WS.
*     TUTORýADD GLOBAL.CONTROL FFTýADD GLOBAL.CONTROL COMPONENTS*WSýADD GLOB
*     AL.CONTROL CONTACT*FFTýADD VERSION.REGISTRY INCLUDE*CONTACT.EQUýADD VE
*     RSION.REGISTRY INCLUDE*WS.ENVIRONMENTýADD VERSION.REGISTRY EXECUTEýADD
*      VERSION.REGISTRY EXECUTE.MVBASEýADD VERSION.REGISTRY EXECUTE.UNIVERSE
*     ýADD VERSION.REGISTRY INSTALLERýADD VERSION.REGISTRY WINDOWS.TRANSLATE
*     .PUNCTUATIONýADD VERSION.REGISTRY WS.TUTORýADD CODE.CONTROL coeýADD CO
*     DE.CONTROL CONTACT.EQUýADD CODE.INCLUDES CONTACT.EQUýADD CODE.CONTROL 
*     weýADD CODE.CONTROL WS.ENVIRONMENTýADD CODE.INCLUDES WS.ENVIRONMENTýAD
*     D FFT.BP EXECUTEýBASIC FFT.BP EXECUTEýCATALOG FFT.BP EXECUTEýADD FFT.B
*     P EXECUTE.D3ýBASIC FFT.BP EXECUTE.D3ýCATALOG FFT.BP EXECUTE.D3ýADD FFT
*     .BP EXECUTE.MVBASEýBASIC FFT.BP EXECUTE.MVBASEýCATALOG FFT.BP EXECUTE.
*     MVBASEýADD FFT.BP EXECUTE.ULTIMATEýBASIC FFT.BP EXECUTE.ULTIMATEýCATAL
*     OG FFT.BP EXECUTE.ULTIMATEýADD FFT.BP EXECUTE.UNIVERSEýBASIC FFT.BP EX
*     ECUTE.UNIVERSEýCATALOG FFT.BP EXECUTE.UNIVERSEýADD FFT.BP INSTALLERýBA
*     SIC FFT.BP INSTALLERýCATALOG FFT.BP INSTALLERýADD FFT.BP WINDOWS.TRANS
*     LATE.PUNCTUATIONýBASIC FFT.BP WINDOWS.TRANSLATE.PUNCTUATIONýCATALOG FF
*     T.BP WINDOWS.TRANSLATE.PUNCTUATIONýADD FFT.BP WS.TUTORýBASIC FFT.BP WS
*     .TUTORýCATALOG FFT.BP WS.TUTORýADD FFT.BP UNINSTALL*WS UPGRADE*WSýBASI
*     C FFT.BP UNINSTALL*WS UPGRADE*WSýCATALOG FFT.BP UNINSTALL*WS UPGRADE*W
*     SýADD FFT.BP WS#VERS2.72.1ýBASIC FFT.BP WS#VERS2.72.1ýCATALOG FFT.BP W
*     S#VERS2.72.1ýADD FFT.BP WSýBASIC FFT.BP WSýCATALOG FFT.BP WSýCHAIN WS
101:
ITEMLIST = "PROGRAM*WS.TUTOR"
LINE = "ADD GLOBAL.CONTROL"
I.STACK = 102; GOSUB PROCESS.COMMAND
GOTO 102
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:26 29 JUN 1999
*!STARTNEWITEM
*PROGRAM*WS.TUTOR
*0001 11501
*0002 11501
*0003 Administrator
*0004 FFT
*0005 Will Johnson
*0006 
*0007 
*0008 
*0009 FFT
102:
ITEMLIST = "FFT"
LINE = "ADD GLOBAL.CONTROL"
I.STACK = 103; GOSUB PROCESS.COMMAND
GOTO 103
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:27 29 JUN 1999
103:
ITEMLIST = "COMPONENTS*WS"
LINE = "ADD GLOBAL.CONTROL"
I.STACK = 104; GOSUB PROCESS.COMMAND
GOTO 104
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:27 29 JUN 1999
*!STARTNEWITEM
*COMPONENTS*WS
*0001 CODE.INCLUDES CHAR.INPUT
*0002 CODE.INCLUDES CLIENT.EQU
*0003 CODE.INCLUDES CONTACT.EQU
*0004 CODE.INCLUDES ENVIRONMENT
*0005 CODE.INCLUDES GET.MY.CONTROLS
*0006 CODE.INCLUDES GET.SENTENCE
*0007 CODE.INCLUDES GLOBAL
*0008 CODE.INCLUDES INSTALL.EQU
*0009 CODE.INCLUDES MACHINE.EQU
*0010 CODE.INCLUDES PRE.ENVIRONMENT
*0011 CODE.INCLUDES PROGRAM.EQU
*0012 CODE.INCLUDES VENDOR.EQU
*0013 CODE.INCLUDES WS.ENVIRONMENT
*0014 FFT.BP ASSIGN.DEFAULTLIST.TO.VAR
*0015 FFT.BP BROWSER
*0016 FFT.BP EXECUTE
*0017 FFT.BP EXECUTE.MVBASE
*0018 FFT.BP EXECUTE.UNIVERSE
*0019 FFT.BP WINDOWS.TRANSLATE.PUNCTUATION
*0020 FFT.BP WS
*0021 FFT.BP WS#VERS2.72.1
*0022 FFT.BP WS.TUTOR
*0023 GLOBAL.CONTROL CLIENT*FFTOFFICE
*0024 GLOBAL.CONTROL CONTACT*FFT
*0025 GLOBAL.CONTROL INSTALL*WS*FFTOFFICE
*0026 GLOBAL.CONTROL MACHINE
*0027 GLOBAL.CONTROL PROGRAM*WS
*0028 GLOBAL.CONTROL PROGRAM*WS.TUTOR
*0029 GLOBAL.CONTROL VENDOR*FFT
*0030 MD FFT
*0031 FFT.BP WS
*0032 FFT.BP WSOLD
104:
ITEMLIST = "CONTACT*FFT"
LINE = "ADD GLOBAL.CONTROL"
I.STACK = 105; GOSUB PROCESS.COMMAND
GOTO 105
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:28 29 JUN 1999
*!STARTNEWITEM
*CONTACT*FFT
*0001 11499
*0002 11499
*0003 FRED\Administrator
*0004 Fast Forward Technologies
*0005 Will Johnson
*0006 180 Seventh Avenue
*0007 Suite 102
*0008 Santa Cruz
*0009 CA
*0010 95062
*0011 831 477 7125
*0012 831 477 7126
*0013 831 688 0978
*0014 fft2001@aol.com
*0015 http://members.aol.com/fft2001/prof/index.htm
105:
ITEMLIST = "INCLUDE*CONTACT.EQU"
LINE = "ADD VERSION.REGISTRY"
I.STACK = 106; GOSUB PROCESS.COMMAND
GOTO 106
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:28 29 JUN 1999
*!STARTNEWITEM
*INCLUDE*CONTACT.EQU
*0001 1.6
*0002 66901
*0003 11485
106:
ITEMLIST = "INCLUDE*WS.ENVIRONMENT"
LINE = "ADD VERSION.REGISTRY"
I.STACK = 107; GOSUB PROCESS.COMMAND
GOTO 107
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:29 29 JUN 1999
*!STARTNEWITEM
*INCLUDE*WS.ENVIRONMENT
*0001 1.42
*0002 71402
*0003 11495
107:
ITEMLIST = "EXECUTE"
LINE = "ADD VERSION.REGISTRY"
I.STACK = 108; GOSUB PROCESS.COMMAND
GOTO 108
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:29 29 JUN 1999
*!STARTNEWITEM
*EXECUTE
*0001 NOVERS
*0002 55012
*0003 11485
108:
ITEMLIST = "EXECUTE.MVBASE"
LINE = "ADD VERSION.REGISTRY"
I.STACK = 109; GOSUB PROCESS.COMMAND
GOTO 109
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:30 29 JUN 1999
*!STARTNEWITEM
*EXECUTE.MVBASE
*0001 NOVERS
*0002 55513
*0003 11485
109:
ITEMLIST = "EXECUTE.UNIVERSE"
LINE = "ADD VERSION.REGISTRY"
I.STACK = 110; GOSUB PROCESS.COMMAND
GOTO 110
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:30 29 JUN 1999
*!STARTNEWITEM
*EXECUTE.UNIVERSE
*0001 1.11
*0002 75600.187
*0003 11499
110:
ITEMLIST = "INSTALLER"
LINE = "ADD VERSION.REGISTRY"
I.STACK = 111; GOSUB PROCESS.COMMAND
GOTO 111
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:31 29 JUN 1999
*!STARTNEWITEM
*INSTALLER
*0001 2.25.2
*0002 48169.724
*0003 11503
111:
ITEMLIST = "WINDOWS.TRANSLATE.PUNCTUATION"
LINE = "ADD VERSION.REGISTRY"
I.STACK = 112; GOSUB PROCESS.COMMAND
GOTO 112
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:31 29 JUN 1999
*!STARTNEWITEM
*WINDOWS.TRANSLATE.PUNCTUATION
*0001 1.5
*0002 56447
*0003 11496
112:
ITEMLIST = "WS.TUTOR"
LINE = "ADD VERSION.REGISTRY"
I.STACK = 113; GOSUB PROCESS.COMMAND
GOTO 113
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:32 29 JUN 1999
*!STARTNEWITEM
*WS.TUTOR
*0001 1.42.2
*0002 73446.899
*0003 11501
113:
ITEMLIST = "coe"
LINE = "ADD CODE.CONTROL"
I.STACK = 114; GOSUB PROCESS.COMMAND
GOTO 114
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:32 29 JUN 1999
*!STARTNEWITEM
*coe
*0001 CODE.INCLUDES CONTACT.EQU
114:
ITEMLIST = "CONTACT.EQU"
LINE = "ADD CODE.CONTROL"
I.STACK = 115; GOSUB PROCESS.COMMAND
GOTO 115
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:33 29 JUN 1999
*!STARTNEWITEM
*CONTACT.EQU
*0001 coe
115:
ITEMLIST = "CONTACT.EQU"
LINE = "ADD CODE.INCLUDES"
I.STACK = 116; GOSUB PROCESS.COMMAND
GOTO 116
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:34 29 JUN 1999
*!STARTNEWITEM
*CONTACT.EQU
*0001       INCLUDEVERS ='1.6'
*0002       gINCLUDE = TRUE
*0003 *!*!  VERSION CONTROL
*0004       T.INCLUDE.ITEM = "CONTACT.EQU" ; T.MNE = 'coe'
*0005       INCLUDE.PREREQUISITES = gCODE.INCLUDES:' GLOBAL'
*0006       INCLUDE.PREREQUISITES<-1> = gCODE.INCLUDES:' ENVIRONMENT'
*0007       *
*0008       T.INCLUDE = gCODE.INCLUDES:' ':T.INCLUDE.ITEM
*0009       IF gTEST.LEVEL THEN PRINT 'In include ':T.INCLUDE
*0010 *
*0011       T.COMPONENT = T.INCLUDE ; GOSUB gADD.COMPONENT
*0012       IF ERROR = '' THEN GOSUB gCHECK.PREREQUISITES
*0013       IF ERROR = '' THEN GOSUB gVERIFY.MNEMONIC
*0014       IF ERROR = '' THEN
*0015          IF gREG.CHK THEN
*0016             gINCLUDE = TRUE ; gMACHINE = '' ; GOSUB gCHECK.REGISTRY
*0017          END
*0018       END
*0019       IF ERROR # '' THEN GOTO coeLEAVE
*0020 *
*0021 *!*!  START TABLE
*0022       EQUATE V.CONTACT.CREATEDATE TO 1
*0023       EQUATE V.CONTACT.LASTMODDATE TO 2
*0024       EQUATE V.CONTACT.LASTMODID TO 3
*0025       EQUATE V.CONTACT.COMPANYNAME TO 4
*0026       EQUATE V.CONTACT.CONTACT TO 5
*0027       EQUATE V.CONTACT.ADDR1 TO 6
*0028       EQUATE V.CONTACT.ADDR2 TO 7
*0029       EQUATE V.CONTACT.CITY TO 8
*0030       EQUATE V.CONTACT.STATE TO 9
*0031       EQUATE V.CONTACT.ZIP TO 10
*0032       EQUATE V.CONTACT.VOICEPHONE1 TO 11           ; *VOICE PHONE NUMB
*     ER
*0033       EQUATE V.CONTACT.VOICEPHONE2 TO 12
*0034       EQUATE V.CONTACT.FAX TO 13
*0035       EQUATE V.CONTACT.EMAIL TO 14
*0036       EQUATE V.CONTACT.WEBURL TO 15      ; * WEB URL
*0037 *!*!  END TABLE
*0038 *
*0039       EQUATE S.CONTACT.REC TO 16
*0040       DIM CONTACT.REC(16)
*0041       coeK.CONTROL = 'CONTACT*':K.CONTACT
*0042       T.COMPONENT = eCONTROL.FILE:' ':coeK.CONTROL
*0043       GOSUB gADD.COMPONENT
*0044 *
*0045       gREADTRY = 0
*0046       LOOP
*0047          gREADDONE = TRUE
*0048          MATREAD CONTACT.REC FROM eF.CONTROL,coeK.CONTROL THEN
*0049             CONTACT.DONE = TRUE
*0050          END ELSE
*0051             K.CONTROL = coeK.CONTROL ; GOSUB gCREATE.CONTROL
*0052          END
*0053       UNTIL gREADDONE DO REPEAT
*0054       IF ERROR # '' THEN GOTO coeLEAVE
*0055 *
*0056 coeLEAVE:
*0057       IF gTEST.LEVEL THEN PRINT 'Leaving include ':T.INCLUDE
*0058       gINCLUDE = FALSE
*0059 * Modified 17:06:02 27 MAY 1999 by willj version 1.1
*0060 * Reason: Create this new equate
*0061 * Modified 17:11:41 27 MAY 1999 by willj version 1.2
*0062 * Reason: Set value of K.CONTROL to this include's K.CONTROL when call
*     ing global CREATE.CONTROL routine
*0063 * Modified 13:50:57 02 JUN 1999 by willj version 1.3
*0064 * Reason:  Add registry checking
*0065 * Modified 14:12:13 02 JUN 1999 by willj version 1.4
*0066 * Reason: Synchronize with SCCOE's version
*0067 * Modified 18:33:38  11 JUN 1999 by FFT version 1.5
*0068 * Reason:
*0069 * Modified 18:35:01  11 JUN 1999 by FFT version 1.6
*0070 * Reason: Install new readtry logic to create the control
116:
ITEMLIST = "we"
LINE = "ADD CODE.CONTROL"
I.STACK = 117; GOSUB PROCESS.COMMAND
GOTO 117
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:34 29 JUN 1999
*!STARTNEWITEM
*we
*0001 CODE.INCLUDES WS.ENVIRONMENT
117:
ITEMLIST = "WS.ENVIRONMENT"
LINE = "ADD CODE.CONTROL"
I.STACK = 118; GOSUB PROCESS.COMMAND
GOTO 118
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:35 29 JUN 1999
*!STARTNEWITEM
*WS.ENVIRONMENT
*0001 we
118:
ITEMLIST = "WS.ENVIRONMENT"
LINE = "ADD CODE.INCLUDES"
I.STACK = 119; GOSUB PROCESS.COMMAND
GOTO 119
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:35 29 JUN 1999
*!STARTNEWITEM
*WS.ENVIRONMENT
*0001       INCLUDEVERS ='1.42'
*0002       gINCLUDE = TRUE
*0003 *!*!  VERSION CONTROL
*0004       T.INCLUDE.ITEM = "WS.ENVIRONMENT" ; T.MNE = 'we'
*0005       INCLUDE.PREREQUISITES = gCODE.INCLUDES:' GLOBAL'
*0006       INCLUDE.PREREQUISITES = gCODE.INCLUDES:' ENVIRONMENT'
*0007       INCLUDE.PREREQUISITES = gCODE.INCLUDES:' MACHINE.EQU'
*0008       INCLUDE.PREREQUISITES = gCODE.INCLUDES:' CLIENT.EQU'
*0009 *
*0010       T.INCLUDE = gCODE.INCLUDES:' ':T.INCLUDE.ITEM
*0011       IF gTEST.LEVEL THEN PRINT 'In include ':T.INCLUDE
*0012 *
*0013       T.COMPONENT = T.INCLUDE ; GOSUB gADD.COMPONENT
*0014       IF ERROR = '' THEN GOSUB gCHECK.PREREQUISITES
*0015       IF ERROR = '' THEN GOSUB gVERIFY.MNEMONIC
*0016       IF ERROR = '' THEN
*0017          IF gREG.CHK THEN
*0018             gINCLUDE = TRUE ; gMACHINE = '' ; GOSUB gCHECK.REGISTRY
*0019          END
*0020       END
*0021       IF ERROR # '' THEN GOTO weLEAVE
*0022 *
*0023       BEGIN CASE
*0024          CASE MACHINE.DATABASE = 'UNIVERSE'
*0025             weSTACK.FILE = '&SAVEDLISTS&'
*0026          CASE 1
*0027             weSTACK.FILE = 'WS.STACKS'
*0028       END CASE
*0029       gOPENTRY = 0
*0030       LOOP
*0031          gOPENDONE = TRUE
*0032          gFILENAME = weSTACK.FILE ; gFILESIZE = "1,1 31,1"
*0033          gCREATEFILE.CMD = 'CREATE-FILE ':gFILENAME:' ':gFILESIZE
*0034          T.FILE = gCREATEFILE.CMD ; GOSUB gADD.FILE
*0035          OPEN weSTACK.FILE TO weF.STACK.FILE ELSE GOSUB gCREATE.FILE
*0036       UNTIL gOPENDONE DO REPEAT
*0037       IF ERROR # '' THEN GOTO weLEAVE
*0038 *
*0039       wePROGRAM.FILE = 'FFT.BP'
*0040       T.FILE = 'CREATE-FILE ':wePROGRAM.FILE:' 7,1 61,1,B'
*0041       GOSUB gADD.FILE
*0042       weT.SEGMENT.FILE = wePROGRAM.FILE
*0043       LOCATE(weT.SEGMENT.FILE,gSEGMENT.FILES;weW.SEGMENT.FILE;'AL') EL
*     SE
*0044          gSEGMENT.FILES = INSERT(gSEGMENT.FILES,weW.SEGMENT.FILE;weT.S
*     EGMENT.FILE)
*0045       END
*0046       weEDITORS.TEXT = 'Screen Editor':AM:'Line Editor'
*0047       weEDITORS.COM = 'DOC-EDIT':AM:'ED'
*0048 *
*0049 * Verify that EDITORS set in WS.ENVIRONMENT include exist as verbs
*0050       weS.EDITORS.COM = DCOUNT(weEDITORS.COM,@AM)
*0051       FOR weI.EDITORS.COM = weS.EDITORS.COM TO 1 STEP -1
*0052          weT.EDITORS.COM = weEDITORS.COM<weI.EDITORS.COM>

*0053          READV weEXISTS FROM mF.VERBS,weT.EDITORS.COM,1 ELSE
*0054             ERROR = 'Error in include ':T.INCLUDE:'.  '
*0055             ERROR = ERROR:'There is no such verb ':weT.EDITORS.COM
*0056             ERROR = ERROR:' in the ':mVERBS:' file'
*0057             ERROR = ERROR:' I am removing it from the list'
*0058             IF gERROR.MODE = 'DISPLAY' THEN GOSUB gABORT.WITH.INPUT
*0059             weEDITORS.TEXT = DELETE(weEDITORS.TEXT,weI.EDITORS.COM)
*0060             weEDITORS.COM = DELETE(weEDITORS.COM, weI.EDITORS.COM)
*0061             ERROR = ""
*0062          END
*0063       NEXT weI.EDITORS.COM
*0064 *
*0065       BEGIN CASE
*0066          CASE K.CLIENT = "FFT"
*0067             weDEV.ACCOUNT = "FFT"
*0068             weQA.ACCOUNT = "FFT"
*0069             weLIVE.ACCOUNT = "FFT"
*0070          CASE K.CLIENT = "SCCOE"
*0071             weDEV.ACCOUNT = "PR-DEMO"
*0072             weQA.ACCOUNT = "PAYROLLQA"
*0073             weLIVE.ACCOUNT = "PAYROLL"
*0074          CASE K.CLIENT = "ZITCO"
*0075             weDEV.ACCOUNT = "TRAINING"
*0076             weQA.ACCOUNT = "TRAINING"
*0077             weLIVE.ACCOUNT = "TRAINING"
*0078          CASE 1 ; GOTO weLEAVE
*0079       END CASE
*0080 *
*0081 * Verify that accounts set in WS.ENVIRONMENT include exist as system e
*     ntries
*0082       READV weEXISTS FROM mF.SYSTEM,weDEV.ACCOUNT,1 ELSE
*0083          ERROR = 'Error in include ':T.INCLUDE:'.  '
*0084          ERROR = ERROR:'There is no such account ':weDEV.ACCOUNT
*0085          IF gERROR.MODE = 'DISPLAY' THEN GOSUB gABORT.WITH.INPUT
*0086          GOTO weLEAVE
*0087       END
*0088       READV weEXISTS FROM mF.SYSTEM,weQA.ACCOUNT,1 ELSE
*0089          ERROR = 'Error in include ':T.INCLUDE:'.  '
*0090          ERROR = ERROR:'There is no such account ':weQA.ACCOUNT
*0091          IF gERROR.MODE = 'DISPLAY' THEN GOSUB gABORT.WITH.INPUT
*0092          GOTO weLEAVE
*0093       END
*0094       READV weEXISTS FROM mF.SYSTEM,weLIVE.ACCOUNT,1 ELSE
*0095          ERROR = 'Error in include ':T.INCLUDE:'.  '
*0096          ERROR = ERROR:'There is no such account ':weLIVE.ACCOUNT
*0097          IF gERROR.MODE = 'DISPLAY' THEN GOSUB gABORT.WITH.INPUT
*0098          GOTO weLEAVE
*0099       END
*0100 *
*0101 weLEAVE:
*0102       weWS.ADMIN = 'FFT'
*0103       gINCLUDE = FALSE
*0104 * Modified 16:55:54  24 MAY 1999 by FFT version 1.1
*0105 * Reason: Add version control to this component and check that listed 
*     accounts exist in SYSTEM file
*0106 * Modified 17:45:28  24 MAY 1999 by FFT version 1.2
*0107 * Reason: Fix bug in using WRITEV without an attribute
*0108 * Modified 17:47:44  24 MAY 1999 by FFT version 1.3
*0109 * Reason: Fix bug where during error, name of INCLUDE was getting chan
*     ged to last component
*0110 * Modified 17:48:54  24 MAY 1999 by FFT version 1.4
*0111 * Reason:
*0112 * Modified 17:53:09  24 MAY 1999 by FFT version 1.5
*0113 * Reason: Fix VERS line
*0114 * Modified 17:54:07  24 MAY 1999 by FFT version 1.6
*0115 * Reason: Add INCLUDE in front of VERS argument
*0116 * Modified 18:07:39  24 MAY 1999 by FFT version 1.7
*0117 * Reason: Add error condition if Editor(s) verb cannot be found in MD
*0118 * Modified 18:14:08  24 MAY 1999 by FFT version 1.8
*0119 * Reason: Use standard method of setting ERROR and passing control to 
*     ABORT.WITH.INPUT instead of hard-coding a PRINT ERROR routine here
*0120 * Modified 18:15:53  24 MAY 1999 by FFT version 1.9
*0121 * Reason: debugging
*0122 * Modified 18:17:52  24 MAY 1999 by FFT version 1.10
*0123 * Reason: Correct file naming bug VERBS not MD
*0124 * Modified 18:22:43  24 MAY 1999 by FFT version 1.11
*0125 * Reason: Remove WS.ENVIRONMENT settings indicating that I had multipl
*     e accounts.  Still need some way of making this customer-specific
*0126 * Modified 18:24:56  24 MAY 1999 by FFT version 1.12
*0127 * Reason: Add INCLUDE in front of VERS argument
*0128 * Modified 20:22:22  24 MAY 1999 by FFT version 1.13
*0129 * Reason: Call new global subroutines
*0130 * Modified 20:24:57  24 MAY 1999 by FFT version 1.14
*0131 * Reason: Fix typo in called named
*0132 * Modified 20:43:45  24 MAY 1999 by FFT version 1.15
*0133 * Reason: Typo with name of global subroutine
*0134 * Modified 20:44:10  24 MAY 1999 by FFT version 1.16
*0135 * Reason: Use global routine component
*0136 * Modified 20:48:04  24 MAY 1999 by FFT version 1.17
*0137 * Reason: Fix typo with name of LEAVE tag
*0138 * Modified 20:48:31  24 MAY 1999 by FFT version 1.18
*0139 * Reason: Fix typo with name of LEAVE tag
*0140 * Modified 21:30:37  24 MAY 1999 by FFT version 1.19
*0141 * Reason: Change ABORT.WITH.INPUT to gABORT.WITH.INPUT
*0142 * Modified 14:59:59  25 MAY 1999 by FFT version 1.20
*0143 * Reason: Add gSEGMENT.FILE BP
*0144 * Modified 15:01:29  25 MAY 1999 by FFT version 1.21
*0145 * Reason: Allow BP file to be include in gSEGMENT.FILES listing
*0146 * Modified 15:59:00  25 MAY 1999 by FFT version 1.22
*0147 * Reason: Move checking of editor verb existence in MACHINE.EQU includ
*0148 * Modified 16:29:17  25 MAY 1999 by FFT version 1.23
*0149 * Reason: Move attempted open of DEV, QA, and LIVE accounts into MACHI
*     NE.EQU
*0150 * Modified 16:57:40  25 MAY 1999 by FFT version 1.24
*0151 * Reason: Fix typo in name of DEV, QA and LIVE account name variables
*0152 * Modified 17:20:54  25 MAY 1999 by FFT version 1.25
*0153 * Reason: Move verification of EDITORS.COM from MACHINE equate to this
*      one
*0154 * Modified 17:24:18  25 MAY 1999 by FFT version 1.26
*0155 * Reason: Move verification of DEV, QA, and LIVE account names here fr
*     om MACHINE.EQU
*0156 * Modified 17:01:26  30 MAY 1999 by FFT version 1.27
*0157 * Reason:
*0158 * Modified 18:02:55  30 MAY 1999 by FFT version 1.28
*0159 * Reason: Change name of code file from BP to FFT.BP
*0160 * Modified 22:02:14  30 MAY 1999 by FFT version 1.29
*0161 * Reason: Change machine-dependent @AM to AM
*0162 * Modified 12:04:09  31 MAY 1999 by FFT version 1.30
*0163 * Reason: Add new variable PROGRAM.FILE
*0164 * Modified 14:44:38  31 MAY 1999 by FFT version 1.31
*0165 * Reason: Upgrade to standard controls
*0166 * Modified 14:59:40  31 MAY 1999 by FFT version 1.32
*0167 * Reason: Fix typo in name of prerequisite literal
*0168 * Modified 15:27:36 02 JUN 1999 by willj version 1.35
*0169 * Reason:
*0170 * Modified 15:58:38 02 JUN 1999 by willj version 1.36
*0171 * Reason: Change pre-requisite from GET.MY.CONTROLS to CLIENT.EQU
*0172 * Modified 18:54:58  11 JUN 1999 by FFT version 1.37
*0173 * Reason: Use the new open try logic on the stack files
*0174 * Modified 12:33:53  14 JUN 1999 by FFT version 1.38
*0175 * Reason: Add the create-file directive as a component
*0176 * Modified 14:00:58  14 JUN 1999 by FFT version 1.39
*0177 * Reason: Add a create-file for the weprogram.file to the component li
*     st
*0178 * Modified 11:50:43 17 JUN 1999 by willj version 1.40
*0179 * Reason: Add the B directive to the filesize of the main code file
*0180 * Modified 19:45:29  21 JUN 1999 by FFT version 1.41
*0181 * Reason: New variables to support maintaining a list of create-file d
*     irectives
*0182 * Modified 19:50:02  21 JUN 1999 by FFT version 1.42
*0183 * Reason: Add program file to new create-files list
119:
ITEMLIST = "EXECUTE"
LINE = "ADD FFT.BP"
I.STACK = 120; GOSUB PROCESS.COMMAND
GOTO 120
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:36 29 JUN 1999
*!STARTNEWITEM
*EXECUTE
*0001       SUBROUTINE EXECUTE(WHICH,CMD,CLAUSES,LIST.IN,LIST.OUT,DATA.IN,DA
*     TA.OUT,ERR)
*0002 * Will Johnson
*0003 * 06/03/99 copyright Fast Forward Technologies 1999
*0004 *
*0005       K.PROGRAM = 'EXECUTE'
*0006       BEGIN CASE
*0007          CASE WHICH = "UNIVERSE"
*0008             IF SYSTEM(11) THEN PRINT 'ACTIVE LIST'
*0009             CALL EXECUTE.UNIVERSE(WHICH,CMD,CLAUSES,LIST.IN,LIST.OUT,D
*     ATA.IN,DATA.OUT,ERR)
*0010          CASE WHICH = "MVBASE"
*0011             IF SYSTEM(11) THEN PRINT 'ACTIVE LIST'
*0012             CALL EXECUTE.MVBASE(WHICH,CMD,CLAUSES,LIST.IN,LIST.OUT,DAT
*     A.IN,DATA.OUT,ERR)
*0013          CASE WHICH = "D3"
*0014             IF SYSTEM(11) THEN PRINT 'ACTIVE LIST'
*0015             CALL EXECUTE.D3(WHICH,CMD,CLAUSES,LIST.IN,LIST.OUT,DATA.IN
*     ,DATA.OUT,ERR)
*0016          CASE WHICH = "ULTIMATE"
*0017             IF SYSTEM(25) THEN PRINT 'ACTIVE LIST'
*0018             CALL EXECUTE.ULTIMATE(WHICH,CMD,CLAUSES,LIST.IN,LIST.OUT,D
*     ATA.IN,DATA.OUT,ERR)
*0019          CASE 1
*0020             PRINT 'Logic error in program ':K.PROGRAM
*0021             PRINT 'Case encountered that was not programmed for'
*0022             PRINT 'Which = ':WHICH:'  This program will abort'
*0023             PRINT 'Hit return ': ; INPUT GOON
*0024             PRINT
*0025             STOP
*0026       END CASE
*0027       RETURN
120:
LINE = "BASIC FFT.BP EXECUTE"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP EXECUTE"; GOSUB PROCESS.COMMAND
ITEMLIST = "EXECUTE.D3"
LINE = "ADD FFT.BP"
I.STACK = 123; GOSUB PROCESS.COMMAND
GOTO 123
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:37 29 JUN 1999
123:
LINE = "BASIC FFT.BP EXECUTE.D3"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP EXECUTE.D3"; GOSUB PROCESS.COMMAND
ITEMLIST = "EXECUTE.MVBASE"
LINE = "ADD FFT.BP"
I.STACK = 126; GOSUB PROCESS.COMMAND
GOTO 126
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:38 29 JUN 1999
*!STARTNEWITEM
*EXECUTE.MVBASE
*0001 SUBROUTINE EXECUTE.MVBASE(WHICH,E.LINE,CLAUSES,E.PASSLIST,E.RTNLIST,E.
*     STACKING,E.CAPTURING,E.RETURNING)
*0002 * Will Johnson
*0003 * Copyright Fast Forward Technologies 1999
*0004 IF TRIM(E.LINE) = "" THEN
*0005    E.RTNLIST = ""; E.CAPTURING = ""; E.RETURNING = ""; RETURN
*0006 END
*0007 IF INDEX(CLAUSES,'DO',1) THEN EXECUTE "CAP-HUSH-ON"
*0008 IF INDEX(CLAUSES,'DI',1) THEN DATA E.STACKING
*0009 *
*0010 BEGIN CASE
*0011    CASE E.PASSLIST = "" AND NOT(E.RTNLIST) AND E.CAPTURING AND NOT(E.R
*     ETURNING)
*0012       EXECUTE E.LINE CAPTURING E.CAPTURING
*0013    CASE 1
*0014       EXECUTE E.LINE
*0015 END CASE
*0016 *
*0017 IF INDEX(CLAUSES,'DO',1) THEN EXECUTE "CAP-HUSH-OFF"
*0018 RETURN
126:
LINE = "BASIC FFT.BP EXECUTE.MVBASE"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP EXECUTE.MVBASE"; GOSUB PROCESS.COMMAND
ITEMLIST = "EXECUTE.ULTIMATE"
LINE = "ADD FFT.BP"
I.STACK = 129; GOSUB PROCESS.COMMAND
GOTO 129
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:39 29 JUN 1999
129:
LINE = "BASIC FFT.BP EXECUTE.ULTIMATE"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP EXECUTE.ULTIMATE"; GOSUB PROCESS.COMMAND
ITEMLIST = "EXECUTE.UNIVERSE"
LINE = "ADD FFT.BP"
I.STACK = 132; GOSUB PROCESS.COMMAND
GOTO 132
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:39 29 JUN 1999
*!STARTNEWITEM
*EXECUTE.UNIVERSE
*0001       SUBROUTINE EXECUTE.UNIVERSE(WHICH,CMD,CLAUSES,LIST.IN,LIST.OUT,D
*     ATA.IN,DATA.OUT,ERR)
*0002 * Clauses are a multi-valued list and are:
*0003 *   SI = Select list in, code on line
*0004 *   SS = Select list in, do NOT code on line
*0005 *   SO = Select list out
*0006 *   DI = Data stack in
*0007 *   DO = Data out (captured screen output)
*0008 *   RE = Errmsg (returning )
*0009 * LIST.IN variable of list in (must be a pointer)
*0010 * LIST.OUT variable of list out
*0011 * DATA.IN stacked (DATA clause) data
*0012 * DATA.OUT i.e. CAPTURED screen output
*0013 * ERR error message captured seperatly (RETURNING)
*0014 *
*0015       IF SYSTEM(11) THEN PRINT 'ACTIVE LIST'
*0016       COMPONENTS = '' ; ERROR = '' ; FILES = ''
*0017       K.PROGRAM = 'EXECUTE.UNIVERSE'
*0018       VERS ='1.11'
*0019 $INCLUDE CODE.INCLUDES GLOBAL
*0020       IF ERROR # '' THEN PRINT ERROR ; STOP
*0021       VERSION.CONTROL = SET
*0022 $INCLUDE CODE.INCLUDES ENVIRONMENT
*0023       IF ERROR # '' THEN PRINT ERROR ; STOP
*0024 *
*0025       INTOT= 0                           ; * VALUES 0 THROUGH 5
*0026       LOCATE("SI",CLAUSES,1;W.SI) THEN INTOT = 1
*0027       LOCATE("SS",CLAUSES,1;W.SS) THEN INTOT = 2
*0028       INTOT = INTOT * 2
*0029       LOCATE("DI",CLAUSES,1;W.DI) THEN INTOT = INTOT + 1
*0030 *
*0031       OUTTOT = 0                         ; * VALUES 0 THROUGH 5
*0032       LOCATE("SO",CLAUSES,1;W.SO) THEN OUTTOT = OUTTOT + 1
*0033       OUTTOT = OUTTOT * 2
*0034       LOCATE("DO",CLAUSES,1;W.DO) THEN OUTTOT = OUTTOT + 1
*0035       OUTTOT = OUTTOT * 2
*0036       LOCATE("RE",CLAUSES,1;W.RE) THEN OUTTOT = OUTTOT + 1
*0037 *
*0038 * 25 POSSIBLE COMBINATIONS
*0039       BEGIN CASE
*0040          CASE (INTOT = 0 OR INTOT = 4) AND OUTTOT = 0
*0041             EXECUTE CMD PASSLIST
*0042          CASE (INTOT = 0 OR INTOT = 4) AND (OUTTOT >= 4)
*0043             EXECUTE CMD PASSLIST
*0044          CASE INTOT = 1 AND OUTTOT = 0
*0045             EXECUTE CMD,//IN. < DATA.IN
*0046          CASE INTOT = 2 AND OUTTOT = 0
*0047             EXECUTE CMD,//SELECT. < LIST.IN
*0048          CASE 1
*0049             PRINT 'In program ':K.PROGRAM:' EXECUTE violation'
*0050             PRINT 'The calling program has asked for an EXECUTE clause
*      that is not programmed'
*0051             PRINT 'This program will abort.  Hit any key...':
*0052 $INCLUDE CODE.INCLUDES CHAR.INPUT
*0053             CRT ; STOP
*0054       END CASE
*0055       RETURN
*0056 * Modified 17:52:44 03 JUN 1999 by willj version 1.1
*0057 * Reason:
*0058 * Modified 19:40:29 25 JUN 1999 by Administrator version 1.3
*0059 * Reason: Initialize new files varialbe
*0060 * Modified 20:05:49 25 JUN 1999 by Administrator version 1.4
*0061 * Reason: Add passlist clause to case for intot = 0 or 4
*0062 * Modified 20:07:19 25 JUN 1999 by Administrator version 1.5
*0063 * Reason:
*0064 * Modified 20:17:37 25 JUN 1999 by Administrator version 1.6
*0065 * Reason:
*0066 * Modified 20:26:44 25 JUN 1999 by Administrator version 1.7
*0067 * Reason: 
*0068 * Modified 20:28:16 25 JUN 1999 by Administrator version 1.8
*0069 * Reason: 
*0070 * Modified 20:53:24 25 JUN 1999 by Administrator version 1.9
*0071 * Reason: 
*0072 * Modified 20:56:17 25 JUN 1999 by Administrator version 1.10
*0073 * Reason: 
*0074 * Modified 21:00:00 25 JUN 1999 by Administrator version 1.11
*0075 * Reason: 
132:
LINE = "BASIC FFT.BP EXECUTE.UNIVERSE"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP EXECUTE.UNIVERSE"; GOSUB PROCESS.COMMAND
ITEMLIST = "INSTALLER"
LINE = "ADD FFT.BP"
I.STACK = 135; GOSUB PROCESS.COMMAND
GOTO 135
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:40 29 JUN 1999
*!STARTNEWITEM
*INSTALLER
*0001       SUBROUTINE INSTALLER.2.0(CMDS,CMDS.HELP,STACK)
*0002 *
*0003 * Writen by Will Johnson
*0004 * Copyright Fast Forward Technologies 1999
*0005 * Creates a self-unzipping archive
*0006 *
*0007       ERROR = ''
*0008       K.PROGRAM = 'INSTALLER'
*0009       VERS ='2.25.2'
*0010 *!*!  VERSION CONTROL
*0011       COMPONENTS = 'FFT.BP ':K.PROGRAM ; FILES = ''
*0012 $INCLUDE CODE.INCLUDES GLOBAL
*0013       IF ERROR # '' THEN
*0014          PRINT 'In program ':K.PROGRAM:' vers ':VERS
*0015          PRINT ERROR ; STOP
*0016       END
*0017 *environment variables
*0018 $INCLUDE CODE.INCLUDES ENVIRONMENT
*0019       IF ERROR # '' THEN
*0020          PRINT 'In program ':K.PROGRAM:' vers ':VERS
*0021          PRINT ERROR ; STOP
*0022       END
*0023 *
*0024       RETURNTOME = FALSE
*0025 GET.MY.CONTROLS:
*0026 $INCLUDE CODE.INCLUDES GET.MY.CONTROLS
*0027       IF ERROR # '' THEN
*0028          PRINT 'In program ':K.PROGRAM:' vers ':VERS
*0029          PRINT ERROR ; STOP
*0030       END
*0031 *
*0032 $INCLUDE CODE.INCLUDES GET.SENTENCE
*0033       IF ERROR # '' THEN
*0034          PRINT 'In program ':K.PROGRAM:' vers ':VERS
*0035          PRINT ERROR ; STOP
*0036       END
*0037 *
*0038       PRINT 'You are running ':K.PROGRAM:' from ':VENDOR.REC(V.VENDOR.
*     NAME)
*0039       PRINT 'This is version ':VERS
*0040       PRINT 'This program creates a self-extracting and installing fil
*     e'
*0041 *
*0042       VERB = '' ; VERB.DESC = ''
*0043       VERB<-1> = 'AR' ; VERB.DESC<-1> = 'Create a self-unzipping archi
*     ve to install'
*0044       VERB<-1> = 'EX' ; VERB.DESC<-1> = 'Expand a stack into all its c
*     omponents'
*0045       VERB<-1> = 'RE' ; VERB.DESC<-1> = 'Read a stored configuration f
*     or an install'
*0046       VERB<-1> = 'WR' ; VERB.DESC<-1> = 'Write a stored configuation f
*     or an install'
*0047       IF CMDS = '' THEN
*0048          CMDS = VERB ; CMDS.HELP = VERB.DESC ; RETURN
*0049       END
*0050 *
*0051       WHAT.TO.ADD = "ADDRAW FFT.BP FFTUNZIP"
*0052       LOCATE(WHAT.TO.ADD,STACK;W.UNZIP) ELSE
*0053          STACK = INSERT(STACK,1;WHAT.TO.ADD)
*0054       END
*0055 *
*0056       DONE.PROGRAM = FALSE
*0057       LOOP
*0058          CMD = CMDS<1> ; CMDS = DELETE(CMDS,1)
*0059          *POP THE TOP CMD AND DO IT
*0060          LOCATE(CMD,VERB;W.CMD) THEN
*0061             BEGIN CASE
*0062                CASE CMD = 'AR' ; GOSUB CREATE.ARCHIVE
*0063                CASE CMD = 'EX' ; GOSUB EXPAND.SUMMARY.ITEMS
*0064                CASE CMD = 'RE' ; GOSUB READ.CONFIG
*0065                CASE CMD = 'WR' ; GOSUB WRITE.CONFIG
*0066                CASE 1 ; DONE.PROGRAM = TRUE
*0067             END CASE
*0068          END ELSE
*0069             IF CMD # '' THEN PRINT 'No such command ':CMD
*0070             DONE.PROGRAM = TRUE
*0071          END
*0072       UNTIL DONE.PROGRAM DO REPEAT
*0073       RETURN
*0074 *
*0075 EXPAND.SUMMARY.ITEMS:
*0076       NEW.STACK = '' ; S.STACK = DCOUNT(STACK,AM)
*0077       FOR I.STACK = 1 TO S.STACK
*0078          T.STACK = STACK<I.STACK> ; DIRECTIVE = FIELD(T.STACK,' ',1)
*0079          T.FILE = FIELD(T.STACK,' ',2) ; T.ITEM = FIELD(T.STACK,' ',3)
*0080 * Before getting the components for this item
*0081 * First store off the current program name, and components
*0082 * Then read the controls
*0083          HOLD.K.PROGRAM = K.PROGRAM ; K.PROGRAM = T.ITEM
*0084 * Set the name of the system by cutting off the vers suffix if any
*0085          C.PROGRAM = INDEX(K.PROGRAM,'#VERS',1)
*0086          IF C.PROGRAM THEN
*0087             MASTER.K.PROGRAM = K.PROGRAM[1,C.PROGRAM-1]
*0088          END ELSE
*0089             MASTER.K.PROGRAM = K.PROGRAM
*0090          END
*0091          SLAVE.K.PROGRAM = K.PROGRAM
*0092          HOLD.COMPONENTS = COMPONENTS ; COMPONENTS = ''
*0093          COMPONENTS = gCODE.INCLUDES:' GLOBAL'
*0094          COMPONENTS<-1> = gCODE.INCLUDES:' ENVIRONMENT'
*0095          K.PROGRAM = MASTER.K.PROGRAM
*0096          RETURNTOME = TRUE ; GOSUB GET.MY.CONTROLS
*0097          GOSUB EXPAND.SUMMARY.ITEMS.HORSE
*0098 * Set the program name and components back to what they were
*0099 * And read back the old controls
*0100          K.PROGRAM = HOLD.K.PROGRAM ; COMPONENTS = HOLD.COMPONENTS
*0101          RETURNTOME = TRUE ; GOSUB GET.MY.CONTROLS
*0102       NEXT I.STACK
*0103       GOSUB REMOVE.SOME
*0104       STACK = NEW.STACK
*0105       RETURN
*0106 *
*0107 EXPAND.SUMMARY.ITEMS.HORSE:
*0108 * Run the upgrade routine at the absolute top
*0109       WHAT.TO.INSERT = 'RUN FFT.BP UPGRADE*':MASTER.K.PROGRAM
*0110       NEW.STACK = INSERT(NEW.STACK,1;WHAT.TO.INSERT)
*0111 *
*0112 * Add all the create-file directives that this system needs to
*0113 * the stack, at the relative top.
*0114       READ FILES FROM eF.CONTROL,"FILES*":MASTER.K.PROGRAM ELSE
*0115          FILES = ''
*0116       END
*0117       WHAT.TO.INSERT = FILES
*0118       GOSUB ADD.TO.STACK
*0119 *
*0120 * Then set the program and vendor control into the default items list
*0121       WHAT.TO.INSERT = 'ADDRAW ':eCONTROL.FILE:' ':peK.CONTROL
*0122       GOSUB ADD.TO.STACK
*0123       WHAT.TO.INSERT = 'ADDRAW ':eCONTROL.FILE:' ':veK.CONTROL
*0124       GOSUB ADD.TO.STACK
*0125 *
*0126 * And any other special controls
*0127 *
*0128       READ CONTROLS FROM eF.CONTROL,"CONTROLS*":MASTER.K.PROGRAM ELSE
*0129          CONTROLS = ''
*0130       END
*0131       S.CONTROLS = DCOUNT(CONTROLS,AM)
*0132       FOR I.CONTROLS = 1 TO S.CONTROLS
*0133          T.CONTROL = CONTROLS<I.CONTROLS>
*0134          WHAT.TO.INSERT = DIRECTIVE:' ':T.CONTROL
*0135          GOSUB ADD.TO.STACK
*0136       NEXT I.CONTROLS
*0137 *
*0138 * Build the component list for this program
*0139 *
*0140       EXECUTE "BUILD.COMPONENTS FFT.BP ":SLAVE.K.PROGRAM
*0141 * Add the component list to the stack
*0142       WHAT.TO.INSERT = DIRECTIVE:' ':eCONTROL.FILE:' COMPONENTS*':MAST
*     ER.K.PROGRAM
*0143       GOSUB ADD.TO.STACK
*0144 * Add all the components to the stack
*0145       DEBUG
*0146       INCLUDE.LIST = '' ; PROGRAM.LIST = ''
*0147       READ COMPONENTS FROM eF.CONTROL,"COMPONENTS*":MASTER.K.PROGRAM T
*     HEN
*0148          S.COMPONENTS = DCOUNT(COMPONENTS,AM)
*0149          FOR I.COMPONENTS = 1 TO S.COMPONENTS
*0150             T.COMPONENT = COMPONENTS<I.COMPONENTS>

*0151             T.FILE = FIELD(T.COMPONENT,' ',1)
*0152             T.ITEM = FIELD(T.COMPONENT,' ',2)
*0153             BEGIN CASE
*0154                CASE T.FILE = 'FFT.BP'
*0155                   WHAT.TO.INSERT = DIRECTIVE:' FFT.BP'
*0156                   PROGRAM.LIST<-1> = WHAT.TO.INSERT:' ':T.ITEM
*0157                   PROGRAM.LIST<-1> = 'BASIC ':T.FILE:' ':T.ITEM
*0158                   PROGRAM.LIST<-1> = 'CATALOG ':T.FILE:' ':T.ITEM
*0159                   gINCLUDE = FALSE ; T.COMPONENT = T.ITEM
*0160                CASE T.FILE = 'CODE.INCLUDES'
*0161                   READV T.MNE FROM gF.CODE.CONTROL,T.ITEM,1 THEN
*0162                      WHAT.TO.INSERT = DIRECTIVE:' ':gCODE.CONTROL
*0163                      INCLUDE.LIST<-1> = WHAT.TO.INSERT:' ':T.MNE
*0164                      INCLUDE.LIST<-1> = WHAT.TO.INSERT:' ':T.ITEM
*0165                   END
*0166                   INCLUDE.LIST<-1> = DIRECTIVE:' CODE.INCLUDES ':T.ITE
*     M
*0167                   gINCLUDE = TRUE ; T.INCLUDE.ITEM = T.ITEM
*0168             END CASE
*0169             gMACHINE = ''
*0170             GOSUB gBUILD.REGISTRY.ID
*0171             READV NEWEST.VERS FROM gF.VERSION.REGISTRY,gK.VERSION.REGI
*     STRY,1 THEN
*0172                WHAT.TO.INSERT = DIRECTIVE:' ':gVERSION.REGISTRY
*0173                WHAT.TO.INSERT = WHAT.TO.INSERT:' ':gK.VERSION.REGISTRY
*0174                GOSUB ADD.TO.STACK
*0175 * Use whatever directive the master stack item has
*0176             END
*0177          NEXT I.COMPONENTS
*0178       END
*0179 *
*0180 * Now add all the includes built up, then the programs
*0181 *
*0182       WHAT.TO.INSERT = INCLUDE.LIST ; GOSUB ADD.TO.STACK
*0183       WHAT.TO.INSERT = PROGRAM.LIST ; GOSUB ADD.TO.STACK
*0184 *
*0185 * Add the program to do the upgrade and uninstall
*0186 *
*0187       WHAT.TO.INSERT.SUF = 'UNINSTALL*':MASTER.K.PROGRAM:' UPGRADE*':M
*     ASTER.K.PROGRAM
*0188       WHAT.TO.INSERT = DIRECTIVE:' FFT.BP ':WHAT.TO.INSERT.SUF
*0189       GOSUB ADD.TO.STACK
*0190       WHAT.TO.INSERT = 'BASIC FFT.BP ':WHAT.TO.INSERT.SUF
*0191       GOSUB ADD.TO.STACK
*0192       WHAT.TO.INSERT = 'CATALOG FFT.BP ':WHAT.TO.INSERT.SUF
*0193       GOSUB ADD.TO.STACK
*0194 *
*0195 * Finally add the program itself and the commands to compile and
*0196 * catalog it.
*0197 *
*0198       WHAT.TO.INSERT = DIRECTIVE:' FFT.BP ':SLAVE.K.PROGRAM
*0199       GOSUB ADD.TO.STACK
*0200       WHAT.TO.INSERT = 'BASIC FFT.BP ':SLAVE.K.PROGRAM
*0201       GOSUB ADD.TO.STACK
*0202       WHAT.TO.INSERT = 'CATALOG FFT.BP ':SLAVE.K.PROGRAM
*0203       GOSUB ADD.TO.STACK
*0204 *
*0205 * And add its master if its a different program
*0206 *
*0207       IF SLAVE.K.PROGRAM # MASTER.K.PROGRAM THEN
*0208          WHAT.TO.INSERT = DIRECTIVE:' FFT.BP ':MASTER.K.PROGRAM
*0209          GOSUB ADD.TO.STACK
*0210          WHAT.TO.INSERT = 'BASIC FFT.BP ':MASTER.K.PROGRAM
*0211          GOSUB ADD.TO.STACK
*0212          WHAT.TO.INSERT = 'CATALOG FFT.BP ':MASTER.K.PROGRAM
*0213          GOSUB ADD.TO.STACK
*0214       END
*0215       RETURN
*0216 *
*0217 ADD.TO.STACK:
*0218       S.WHAT.TO.INSERT = DCOUNT(WHAT.TO.INSERT,AM)
*0219       FOR I.WHAT.TO.INSERT = 1 TO S.WHAT.TO.INSERT
*0220          T.WHAT.TO.INSERT = WHAT.TO.INSERT<I.WHAT.TO.INSERT>
*0221          ADD.IT = FALSE
*0222          LOCATE(T.WHAT.TO.INSERT,NEW.STACK;W.WHAT.TO.INSERT) ELSE
*0223             T.DIRECTIVE = FIELD(T.WHAT.TO.INSERT,' ',1)
*0224             REST.WHAT.TO.INSERT = T.WHAT.TO.INSERT[COL2()+1,LEN(T.WHAT
*     .TO.INSERT)]
*0225             IF T.DIRECTIVE = 'ADD' THEN
*0226                LOCATE('ADDRAW ': REST.WHAT.TO.INSERT,NEW.STACK;W.WHAT.
*     TO.INSERT) ELSE
*0227                   ADD.IT = TRUE
*0228                END
*0229             END ELSE ADD.IT = TRUE
*0230          END
*0231          IF ADD.IT THEN NEW.STACK<-1> = T.WHAT.TO.INSERT
*0232       NEXT I.WHAT.TO.INSERT
*0233       RETURN
*0234 *
*0235 CREATE.ARCHIVE:
*0236 * Write config item and add it to the stack
*0237 * Add at the first place where controls items are added zipped or
*0238 * one above the last line (last line could be a chain).
*0239       NEW.STACK = ''
*0240       GOSUB WRITE.CONFIG
*0241       WHAT.TO.INSERT = 'ADD ':eCONTROL.FILE:' ':K.CONTROL
*0242       GOSUB ADD.TO.STACK
*0243       S.STACK = DCOUNT(STACK,AM) ; FOUND.IT = FALSE
*0244       FOR I.STACK = 1 TO S.STACK
*0245          IF OCONV(STACK<I.STACK>,'G0 2') = 'ADD ':eCONTROL.FILE THEN
*0246             STACK = INSERT(STACK,I.STACK;NEW.STACK)
*0247             FOUND.IT = TRUE ; I.STACK = S.STACK
*0248          END
*0249       NEXT I.STACK
*0250       IF NOT(FOUND.IT) THEN STACK = INSERT(STACK,S.STACK-1;NEW.STACK)
*0251 *
*0252       OPEN 'FFT.BP' TO F.FFT.BP ELSE
*0253          PRINT 'Cant open FFT.BP file' ; STOP
*0254       END
*0255       READ SELF.UNZIPPER FROM F.FFT.BP,'SELF.UNZIPPER' ELSE
*0256          PRINT 'cant read SELF.UNZIPPER from FFT.BP file' ; STOP
*0257       END
*0258       READ FFTUNZIP FROM F.FFT.BP,'FFTUNZIP' ELSE
*0259          PRINT 'cant read FFTUNZIP from FFT.BP file' ; STOP
*0260       END
*0261       BEGIN CASE
*0262          CASE MACHINE.DATABASE = 'UNIVERSE'
*0263             OPEN '&SAVEDLISTS&' TO F.POINTER.FILE ELSE
*0264                PRINT 'cant open &SAVEDLISTS&' ; STOP
*0265             END
*0266          CASE 1
*0267             OPEN 'POINTER-FILE' TO F.POINTER.FILE ELSE
*0268                PRINT 'cant open POINTER-FILE' ; STOP
*0269             END
*0270       END CASE
*0271 *
*0272       ARCHIVE.RESULTS = ''
*0273       ARCHIVE.RESULTS = "PRINT 'This archive created ":TIMEDATE():"'"
*0274       ARCHIVE.RESULTS<-1> = SELF.UNZIPPER
*0275       S.STACK = DCOUNT(STACK,AM)
*0276       I.STACK = 0
*0277       LOOP
*0278          I.STACK = I.STACK + 1
*0279          T.ARCHIVE.ITEM = STACK<I.STACK>
*0280          DIRECTIVE = FIELD(T.ARCHIVE.ITEM,' ',1)
*0281          BEGIN CASE
*0282             CASE DIRECTIVE = 'ADD'
*0283                N.FILE = FIELD(T.ARCHIVE.ITEM,' ',2)
*0284                ITEMLIST = T.ARCHIVE.ITEM[COL2()+1,LEN(T.ARCHIVE.ITEM)]
*0285                CONVERT ' ' TO AM IN ITEMLIST
*0286                GOSUB CREATE.ENTRY
*0287             CASE DIRECTIVE = 'ADDRAW' ; GOSUB CREATE.RAW.ENTRY
*0288             CASE 1
*0289                T.ARCHIVE.ITEM = 'LINE = "':T.ARCHIVE.ITEM:'"'
*0290                T.ARCHIVE.ITEM = T.ARCHIVE.ITEM:'; GOSUB PROCESS.COMMAN
*     D'
*0291                ARCHIVE.RESULTS<-1> = T.ARCHIVE.ITEM
*0292          END CASE
*0293       UNTIL I.STACK >= S.STACK DO REPEAT
*0294       ARCHIVE.RESULTS<-1> = 'GOSUB WRAPUP; STOP'
*0295       WRITE ARCHIVE.RESULTS ON F.FFT.BP,'ARCHIVE*':USER.ID
*0296       PRINT 'Writen to FFT.BP as ARCHIVE*':USER.ID
*0297       IF eTOHOSTPATH.VERB # '' THEN
*0298          LINE = eTOHOSTPATH.VERB:" FFT.BP ARCHIVE*":USER.ID
*0299          BEGIN CASE
*0300             CASE MACHINE.OS = 'WINDOWS 98'
*0301                LINE = LINE:" C:\MVBASE\ARCHIVE_3":USER.ID:".TXT"
*0302             CASE MACHINE.OS = 'UNIX'
*0303                LINE = LINE:" /ARCHIVE_3":USER.ID:".TXT"
*0304          END CASE
*0305          PRINT LINE ; DATA "Y" ; EXECUTE LINE
*0306       END
*0307       RETURN
*0308 *
*0309 CREATE.RAW.ENTRY:
*0310       N.FILE = FIELD(T.ARCHIVE.ITEM,' ',2)
*0311       N.ITEM = FIELD(T.ARCHIVE.ITEM,' ',3)
*0312       WHAT.TO.INSERT = 'ITEMLIST = "':N.ITEM:'"'
*0313       WHAT.TO.INSERT<-1> = 'LINE = "ADDRAW ':N.FILE:' ':N.ITEM:'"'
*0314       WHAT.TO.INSERT<-1> = 'I.STACK = ':I.STACK:'; GOSUB PROCESS.COMMA
*     ND'
*0315       WHAT.TO.INSERT<-1> = 'GOTO ':I.STACK
*0316       OPEN N.FILE TO F.FILE ELSE PRINT 'CANT OPEN FILE ':N.FILE ; STOP
*0317       READ R.FILE FROM F.FILE,N.ITEM ELSE
*0318          PRINT 'CANT READ ITEM ':N.ITEM:' FROM FILE ':N.FILE ; STOP
*0319       END
*0320       MYITEM = R.FILE
*0321       GOSUB ENCAPSULATE
*0322       WHAT.TO.INSERT<-1> = MYITEM
*0323       WHAT.TO.INSERT<-1> = I.STACK:':'
*0324       ARCHIVE.RESULTS<-1> = WHAT.TO.INSERT
*0325       RETURN
*0326 *
*0327 CREATE.ENTRY:
*0328       IF ITEMLIST = '*' THEN
*0329          LINE = "FFTZIP ":N.FILE:' *'
*0330          PRINT LINE ; EXECUTE LINE
*0331       END ELSE
*0332          WRITE ITEMLIST ON F.POINTER.FILE,K.PROGRAM:'*':N.FILE
*0333          LINE = "GET-LIST ":K.PROGRAM:"*":N.FILE
*0334          LINE2 = "FFTZIP ":N.FILE
*0335          PRINT LINE ; PRINT LINE2 ; DATA LINE2 ; EXECUTE LINE
*0336       END
*0337       S.ITEMLIST = DCOUNT(ITEMLIST,AM) ; LINE = ''
*0338       FOR I.ITEMLIST = 1 TO S.ITEMLIST
*0339          LINE<1,-1> = ITEMLIST<I.ITEMLIST>

*0340       NEXT I.ITEMLIST
*0341       WHAT.TO.INSERT = 'ITEMLIST = "':LINE:'"'     ; * List of items t
*     o follow
*0342       WHAT.TO.INSERT<-1> = 'LINE = "ADD ':N.FILE:'"'
*0343       WHAT.TO.INSERT<-1> = 'I.STACK = ':I.STACK:'; GOSUB PROCESS.COMMA
*     ND'
*0344       WHAT.TO.INSERT<-1> = 'GOTO ':I.STACK
*0345       OPEN N.FILE TO F.TEMP ELSE PRINT 'Cant open file ':N.FILE ; STOP
*0346       READ MYITEM FROM F.TEMP,'ZIPPED*':USER.ID ELSE
*0347          PRINT 'Cant read item ZIPPED*':USER.ID:' from file ':N.FILE ;
*      STOP
*0348       END
*0349       GOSUB ENCAPSULATE
*0350       WHAT.TO.INSERT<-1> = MYITEM
*0351       WHAT.TO.INSERT<-1> = I.STACK:':'
*0352       ARCHIVE.RESULTS<-1> = WHAT.TO.INSERT
*0353       RETURN
*0354 *
*0355 *
*0356 ENCAPSULATE:
*0357       PRINT 'Encapsulating item'
*0358       S.MYITEM = DCOUNT(MYITEM,AM)
*0359       PRINT SPACE(8):' OUT OF ':S.MYITEM:
*0360       FOR I.MYITEM = 1 TO S.MYITEM
*0361          MYITEM<I.MYITEM> = '*':MYITEM<I.MYITEM>
*0362          IF NOT(MOD(I.MYITEM,100)) THEN PRINT CHAR(13):I.MYITEM"R%7":
*0363       NEXT I.MYITEM
*0364       PRINT CHAR(13):I.MYITEM"R%7"
*0365       RETURN
*0366 *
*0367 REMOVE.SOME:
*0368 *
*0369 * Remove the components for specific clients, installs, and machines
*0370 *
*0371       REMOVE.THESE = ''
*0372       REMOVE.THESE<-1> = "ADD ":eCONTROL.FILE:" INSTALL*WS*FFT"
*0373       REMOVE.THESE<-1> = "ADDRAW ":eCONTROL.FILE:" INSTALL*WS*FFT"
*0374       REMOVE.THESE<-1> = "ADD ":eCONTROL.FILE:" MACHINE"
*0375       REMOVE.THESE<-1> = "ADDRAW ":eCONTROL.FILE:" MACHINE"
*0376 *
*0377       REMOVE.THESE<-1> = "ADD CODE.INCLUDES PRE.ENVIRONMENT"
*0378       REMOVE.THESE<-1> = "ADDRAW CODE.INCLUDES PRE.ENVIRONMENT"
*0379       REMOVE.THESE<-1> = "ADD CODE.INCLUDES CHAR.INPUT"
*0380       REMOVE.THESE<-1> = "ADDRAW CODE.INCLUDES CHAR.INPUT"
*0381       REMOVE.THESE<-1> = "ADD CODE.INCLUDES GET.SENTENCE"
*0382       REMOVE.THESE<-1> = "ADDRAW CODE.INCLUDES GET.SENTENCE"
*0383       REMOVE.THESE<-1> = "ADD CODE.INCLUDES PRE.ENVIRONMENT"
*0384       REMOVE.THESE<-1> = "ADDRAW CODE.INCLUDES PRE.ENVIRONMENT"
*0385       S.REMOVE.THESE = DCOUNT(REMOVE.THESE,AM)
*0386       S.STACK = DCOUNT(STACK,AM)
*0387       FOR I.STACK = S.STACK TO 1 STEP -1
*0388          T.ARCHIVE.ITEM = STACK<I.STACK>

*0389          LOCATE(T.ARCHIVE.ITEM,REMOVE.THESE;W.ARCHIVE) THEN
*0390             STACK = DELETE(STACK,I.STACK)
*0391          END
*0392       NEXT I.STACK
*0393       RETURN
*0394 *
*0395 READ.CONFIG:
*0396       PRINT 'Name of configuration item to read ': ; INPUT K.CONTROL
*0397       N.SYSTEM = K.CONTROL
*0398       K.CONTROL = "CONFIG*":K.CONTROL
*0399       READU R.CONTROL FROM eF.CONTROL,K.CONTROL THEN
*0400          S.STACK = DCOUNT(R.CONTROL<1>,VM)
*0401          FOR I.STACK = 1 TO S.STACK
*0402             T.ARCHIVE.ITEM = R.CONTROL<1,I.STACK>
*0403             LOCATE(T.ARCHIVE.ITEM,STACK;W.ARCHIVE.ITEM) ELSE
*0404                STACK<-1> = T.ARCHIVE.ITEM
*0405             END
*0406          NEXT I.STACK
*0407       END ELSE
*0408          PRINT 'Cannot read item ':K.CONTROL:' from file ':eCONTROL.FI
*     LE
*0409       END
*0410       RETURN
*0411 *
*0412 WRITE.CONFIG:
*0413       PRINT 'Name of configuration item to write ': ; INPUT K.CONTROL
*0414       K.CONTROL = "CONFIG*":K.CONTROL
*0415       READU R.CONTROL FROM eF.CONTROL,K.CONTROL ELSE R.CONTROL = ''
*0416       WHAT.TO.WRITE = ''
*0417       S.STACK = DCOUNT(STACK,AM)
*0418       FOR I.STACK = 1 TO S.STACK
*0419          T.ARCHIVE.ITEM = STACK<I.STACK>
*0420          WHAT.TO.WRITE<1,-1> = T.ARCHIVE.ITEM
*0421       NEXT I.STACK
*0422       WRITE WHAT.TO.WRITE ON eF.CONTROL,K.CONTROL
*0423       RETURN
*0424 *
*0425 HELP:
*0426       S.VERB = DCOUNT(VERB,AM)
*0427       FOR I.VERB = 1 TO S.VERB
*0428          PRINT VERB<I.VERB>:' ':VERB.DESC<I.VERB>
*0429       NEXT I.VERB
*0430       RETURN
*0431 *
*0432 * Modified 11:52:26 24 JUN 1999 by willj version 2.1
*0433 * Reason: Create new version to simplify logic
*0434 * Modified 11:55:07 24 JUN 1999 by willj version 2.2
*0435 * Reason: Set-up verb and desc table on every call not just initialize
*      call
*0436 * Modified 11:56:32 24 JUN 1999 by willj version 2.3
*0437 * Reason: Fix infinite loop if command not recognized
*0438 * Modified 12:13:43 24 JUN 1999 by willj version 2.4
*0439 * Reason: Write results of stack expansion back to stack
*0440 * Modified 12:21:36 24 JUN 1999 by willj version 2.5
*0441 * Reason: Add the directive in front of the programs and combine the l
*     ogic for adding the progs, compiling and cataloging them
*0442 * Modified 12:34:49 24 JUN 1999 by willj version 2.6
*0443 * Reason: Remove the now obsolete add system and delete system command
*     s
*0444 * Modified 12:37:11 24 JUN 1999 by willj version 2.7
*0445 * Reason: Remove the duplicate posting of the component add directive
*0446 * Modified 12:50:20 24 JUN 1999 by willj version 2.8
*0447 * Reason:
*0448 * Modified 12:52:57 24 JUN 1999 by willj version 2.9
*0449 * Reason: E
*0450 * Modified 12:53:44 24 JUN 1999 by willj version 2.10
*0451 * Reason: Fix logic if we encounter the same directive in the stack to
*      not write duplicate entries
*0452 * Modified 13:12:25 24 JUN 1999 by willj version 2.11
*0453 * Reason: Only complain on invalid command if its not null
*0454 * Modified 13:13:38 24 JUN 1999 by willj version 2.12
*0455 * Reason: Tell me the name of the archive record when its writen
*0456 * Modified 13:40:01 24 JUN 1999 by willj version 2.13
*0457 * Reason: Run the upgrade routine at the absolute top not the relative
*      top
*0458 * Modified 13:45:50 24 JUN 1999 by willj version 2.14
*0459 * Reason: DEBUG
*0460 * Modified 13:47:58 24 JUN 1999 by willj version 2.15
*0461 * Reason: Fix error where include body was getting left out of build
*0462 * Modified 13:54:06 24 JUN 1999 by willj version 2.16
*0463 * Reason:
*0464 * Modified 13:59:27 24 JUN 1999 by willj version 2.17
*0465 * Reason:
*0466 * Modified 14:08:19 24 JUN 1999 by willj version 2.18
*0467 * Reason:
*0468 * Modified 14:10:17 24 JUN 1999 by willj version 2.19
*0469 * Reason:
*0470 * Modified 14:21:15 24 JUN 1999 by willj version 2.20
*0471 * Reason: Add the concept of a master program (system
*0472 * Modified 14:26:34 24 JUN 1999 by willj version 2.21
*0473 * Reason: Add the concept of master and slave programs
*0474 * Modified 14:28:38 24 JUN 1999 by willj version 2.22
*0475 * Reason: Initialize include list and program list
*0476 * Modified 14:32:13 24 JUN 1999 by willj version 2.23
*0477 * Reason: Fix logic error in setting value of slave program name
*0478 * Modified 16:28:58 25 JUN 1999 by Administrator version 2.24
*0479 * Reason: Add any special controls that this program might have to the
*      stack
*0480 * Modified 16:34:37 25 JUN 1999 by Administrator version 2.25
*0481 * Reason: Add config item to stack at end
*0482 * Modified 13:03:05 29 JUN 1999 by Administrator version 2.25.1
*0483 * Reason: Change name back to INSTALLER
*0484 * Modified 13:22:49 29 JUN 1999 by Administrator version 2.25.2
*0485 * Reason: Fix logic on where and how the configuration item was added 
*     to the archive
135:
LINE = "BASIC FFT.BP INSTALLER"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP INSTALLER"; GOSUB PROCESS.COMMAND
ITEMLIST = "WINDOWS.TRANSLATE.PUNCTUATION"
LINE = "ADD FFT.BP"
I.STACK = 138; GOSUB PROCESS.COMMAND
GOTO 138
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:41 29 JUN 1999
*!STARTNEWITEM
*WINDOWS.TRANSLATE.PUNCTUATION
*0001      SUBROUTINE WINDOWS.TRANSLATE.PUNCTUATION(WINDOWS.NAME,ERROR)
*0002 * Writen by Will Johnson
*0003 * Copyright Fast Forward Technologies 1999
*0004 * Windows cannot support any file name that has a forward-slash, backs
*     lash or
*0005 * :*?"<>| in its name
*0006 * Also a dot in a name causes problems with programs that use the file
*0007 *  extension to determine what application to run
*0008 * Also AOL will not allow # in file names to their FTP space
*0009 * Pilot char in name will indicate a badchar num follows or two pilotc
*     hars
*0010 *   will indicate that pilot char itself was in the original name
*0011 *
*0012      K.PROGRAM = 'WINDOWS.TRANSLATE.PUNCTUATION'
*0013      VERS ='1.5'
*0014      COMPONENTS = 'FFT.BP ':K.PROGRAM; ERROR = ''
*0015 $INCLUDE CODE.INCLUDES GLOBAL
*0016      IF ERROR # '' THEN
*0017         PRINT 'In program ':K.PROGRAM:' vers ':VERS
*0018         PRINT ERROR; STOP
*0019      END
*0020      VERSION.CONTROL = SET
*0021 *environment variables
*0022 $INCLUDE CODE.INCLUDES ENVIRONMENT
*0023      IF ERROR # '' THEN
*0024         PRINT 'In program ':K.PROGRAM:' vers ':VERS
*0025         PRINT ERROR; STOP
*0026      END
*0027      RETURNTOME = FALSE
*0028 $INCLUDE CODE.INCLUDES GET.MY.CONTROLS
*0029      IF ERROR # '' THEN
*0030         PRINT 'In program ':K.PROGRAM:' vers ':VERS
*0031         PRINT ERROR; STOP
*0032      END
*0033 *
*0034      BADCHARS = CHAR(92):'/:*?"<>|.#'; L.BADCHARS = LEN(BADCHARS)
*0035      PILOTCHAR = "_"
*0036      C.WINDOWS.NAME = 1; *AN INDEX INTO THE NAME STRING
*0037      LOOP
*0038         C.PILOTCHAR = INDEX(WINDOWS.NAME,PILOTCHAR,C.WINDOWS.NAME)
*0039      UNTIL NOT(C.PILOTCHAR) DO
*0040         BEG.WINDOWS.NAME = WINDOWS.NAME[1,C.PILOTCHAR-1]
*0041         MID.WINDOWS.NAME = PILOTCHAR:PILOTCHAR
*0042         END.WINDOWS.NAME = WINDOWS.NAME[C.PILOTCHAR+1,LEN(WINDOWS.NAME
*     )]
*0043         WINDOWS.NAME = BEG.WINDOWS.NAME:MID.WINDOWS.NAME:END.WINDOWS.N
*     AME
*0044         C.WINDOWS.NAME = C.WINDOWS.NAME + 2
*0045      REPEAT
*0046      FOR I.BADCHARS = 1 TO L.BADCHARS
*0047         T.BADCHAR = BADCHARS[I.BADCHARS,1]
*0048         LOOP
*0049            C.BADCHAR = INDEX(WINDOWS.NAME,T.BADCHAR,1)
*0050         UNTIL NOT(C.BADCHAR) DO
*0051            BEG.WINDOWS.NAME = WINDOWS.NAME[1,C.BADCHAR-1]
*0052            MID.WINDOWS.NAME = PILOTCHAR:I.BADCHARS
*0053            END.WINDOWS.NAME = WINDOWS.NAME[C.BADCHAR+1,LEN(WINDOWS.NAM
*     E)]
*0054            WINDOWS.NAME = BEG.WINDOWS.NAME:MID.WINDOWS.NAME:END.WINDOW
*     S.NAME
*0055         REPEAT
*0056      NEXT I.BADCHARS
*0057      RETURN
*0058 * Modified 18:52:24  07 JUN 1999 by FFT version 1.1
*0059 * Reason: Add standard controls
*0060 * Modified 18:56:50  07 JUN 1999 by FFT version 1.2
*0061 * Reason: Fix bad logic when pilotchar is hit in a name
*0062 * Modified 18:58:26  07 JUN 1999 by FFT version 1.3
*0063 * Reason: Fix bug in name of variable
*0064 * Modified 15:36:44  22 JUN 1999 by FFT version 1.4
*0065 * Reason:
*0066 * Modified 15:40:47  22 JUN 1999 by FFT version 1.5
*0067 * Reason:
138:
LINE = "BASIC FFT.BP WINDOWS.TRANSLATE.PUNCTUATION"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP WINDOWS.TRANSLATE.PUNCTUATION"; GOSUB PROCESS.COMMAND
ITEMLIST = "WS.TUTOR"
LINE = "ADD FFT.BP"
I.STACK = 141; GOSUB PROCESS.COMMAND
GOTO 141
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:41 29 JUN 1999
*!STARTNEWITEM
*WS.TUTOR
*0001      SUBROUTINE WS.TUTOR(TUTOR.STEP,TUTOR.CMD,MYPROMPT,MAXSTEP,COMPONE
*     NTS,ERROR)
*0002 *
*0003 * COPYRIGHT 1992-1999 FAST FORWARD TECHNOLOGIES
*0004 * WARNING! WARNING! WARNING!
*0005 * This program may not be duplicated, sold, given, exchanged, modified
*0006 * transferred, downloaded, decompiled, or otherwise made available to
*0007 * any third party without the express writen and notarized consent of
*0008 * FAST FORWARD TECHNOLOGIES, INC.
*0009 * Written in the distant past by
*0010 * Will Johnson
*0011 *
*0012 *
*0013      K.PROGRAM = "WS.TUTOR"
*0014      VERS ='1.42.2'
*0015      FILES = ''
*0016 $INCLUDE CODE.INCLUDES GLOBAL
*0017      VERSION.CONTROL = SET
*0018 * environment variables
*0019 $INCLUDE CODE.INCLUDES ENVIRONMENT
*0020      IF ERROR # '' THEN
*0021         PRINT "IN PROGRAM ":K.PROGRAM:" VERS ":VERS
*0022         PRINT ERROR ; STOP
*0023      END
*0024 *
*0025      RETURNTOME = FALSE
*0026 GET.MY.CONTROLS:
*0027 $INCLUDE CODE.INCLUDES GET.MY.CONTROLS
*0028      IF ERROR # '' THEN
*0029         PRINT "IN PROGRAM ":K.PROGRAM:" VERS ":VERS
*0030         PRINT ERROR ; STOP
*0031      END
*0032 *
*0033      K.CONTACT = 'FFT'
*0034 $INCLUDE CODE.INCLUDES CONTACT.EQU
*0035      IF ERROR # '' THEN
*0036         PRINT "IN PROGRAM ":K.PROGRAM:" VERS ":VERS
*0037         PRINT ERROR ; STOP
*0038      END
*0039 *
*0040 $INCLUDE CODE.INCLUDES WS.ENVIRONMENT
*0041      IF ERROR # '' THEN
*0042         PRINT "IN PROGRAM ":K.PROGRAM:" VERS ":VERS
*0043         PRINT ERROR ; STOP
*0044      END
*0045 *
*0046      PRINT
*0047      MSGS = ''
*0048      MSGS<1> = STR('*',gTERM.WIDTH)
*0049      MSGS<2> = SPACE(30):'TUTOR INSTRUCTIONS'
*0050      MSGS<3> = ''
*0051 *
*0052      BEGIN CASE
*0053         CASE TUTOR.STEP = 0; GOSUB TUTOR.STEP.0
*0054         CASE TUTOR.STEP = 2; GOSUB TUTOR.STEP.2
*0055         CASE TUTOR.STEP = 4; GOSUB TUTOR.STEP.4
*0056         CASE TUTOR.STEP = 6; GOSUB TUTOR.STEP.6
*0057         CASE TUTOR.STEP = 8; GOSUB TUTOR.STEP.8
*0058         CASE TUTOR.STEP = 10; GOSUB TUTOR.STEP.10
*0059         CASE TUTOR.STEP = 12; GOSUB TUTOR.STEP.12
*0060         CASE TUTOR.STEP = 14; GOSUB TUTOR.STEP.14
*0061         CASE TUTOR.STEP = 16; GOSUB TUTOR.STEP.16
*0062         CASE 1; RETURN
*0063      END CASE
*0064      S.MSGS = DCOUNT(MSGS,AM)
*0065      IF CLEAR = 'LAST' THEN
*0066         MSGS<-1> = 'Press the ENTER or RETURN key to continue'
*0067      END
*0068      MSGS<-1> = STR('*',gTERM.WIDTH)
*0069      S.MSGS = DCOUNT(MSGS,AM)
*0070      IF CLEAR = 'FIRST' THEN PRINT @(-1)
*0071      FOR I.MSGS = 1 TO S.MSGS
*0072         MSG = MSGS<I.MSGS>; GOSUB PRINT.MSG
*0073      NEXT I.MSGS
*0074      IF CLEAR = 'LAST' THEN INPUT ANS; DATA ANS; PRINT @(-1)
*0075 *
*0076      TUTOR.STEP = TUTOR.STEP + 1
*0077      MAXSTEP = 17
*0078      RETURN
*0079 *
*0080 PRINT.MSG:
*0081      L.MSG = LEN(MSG); C.MSG = 1
*0082      LOOP
*0083         C.MSG.END = C.MSG + gTERM.WIDTH
*0084         LOOP UNTIL MSG[C.MSG.END,1] = ' ' OR C.MSG.END >= L.MSG DO
*0085            C.MSG.END = C.MSG.END - 1
*0086         REPEAT
*0087         PRINT MSG[C.MSG,C.MSG.END-C.MSG+1]
*0088         C.MSG = C.MSG.END+1
*0089      UNTIL C.MSG > L.MSG DO REPEAT
*0090      RETURN
*0091 *
*0092 TUTOR.STEP.0:
*0093      CLEAR = 'FIRST'
*0094      MSG = MYPROMPT:' is the shell prompt. The stack name displays'
*0095      MSG = MSG:' in-front-of the > character.  By default, when the'
*0096      MSG = MSG:' shell starts, the stack name is PROG because the shel
*     l'
*0097      MSG = MSG:' starts on the Program stack.'
*0098      MSGS<4> = MSG
*0099      MSGS<5> = ''
*0100      MSG = 'The cursor positions itself to the right of the shell'
*0101      MSG = MSG:' prompt and this is where you would type your commands
*     '
*0102      MSG = MSG:' to the shell.  Here you can type any shell command, o
*     r'
*0103      MSG = MSG:' any TCL command.'
*0104      MSGS<6> = MSG
*0105      MSGS<7> = ''
*0106      MSGS<8> = 'Type WHO now to see how this works.'
*0107      TUTOR.CMD = 'WHO'
*0108      RETURN
*0109 *
*0110 TUTOR.STEP.2:
*0111      CLEAR = 'LAST'
*0112      MSGS<4> = 'Very good!.'
*0113      MSG = 'Look above the line of stars and you will see the result o
*     f'
*0114      MSG = MSG:' your WHO command.  In the same way, you can use any'
*0115      MSG = MSG:' TCL command in the shell, including those that requir
*     e'
*0116      MSG = MSG:' secondary input, or act on the results of a previous'
*0117      MSG = MSG:' select action.'
*0118      MSGS<5> = MSG
*0119      TUTOR.CMD = ''
*0120      RETURN
*0121 *
*0122 TUTOR.STEP.4:
*0123      CLEAR = 'FIRST'
*0124      MSG = 'One of the most important functions that the shell has is'
*0125      MSG = MSG:' the help function.  You can get help in the shell in'
*0126      MSG = MSG:' three primary ways.  This tutor, the ? and the HELP'
*0127      MSG = MSG:' command'
*0128      MSGS<4> = MSG
*0129      MSGS<5> = ''
*0130      MSGS<6> = "Let's try the ? command now.  Type ? at the command pr
*     ompt"
*0131      TUTOR.CMD = '?'
*0132      RETURN
*0133 *
*0134 TUTOR.STEP.6:
*0135      CLEAR = 'FIRST'
*0136      MSGS<4> = "Very good!."
*0137      MSG = 'The text that displays in the few lines above the prompt'
*0138      MSG = MSG:' is referred to as the prompt environment.'
*0139      MSGS<5> = MSG
*0140      MSGS<6> = ''
*0141      MSG = "Let's take a closer look at the components of the"
*0142      MSG = MSG:' prompt environment.'
*0143      MSGS<7> = MSG
*0144      MSGS<8> = ''
*0145      MSG = 'On the first line you see the program name WS and the'
*0146      MSG = MSG:' version number'
*0147      MSGS<9> = MSG
*0148      MSGS<10> = ''
*0149      MSG = 'The version number you see is the version of the main shel
*     l'
*0150      MSG = MSG:' program.  Some other functions may generate and'
*0151      MSG = MSG:' display their own version numbers. You can get more'
*0152      MSG = MSG:' details about this version of the shell by using the'
*0153      MSG = MSG:' /V function.'
*0154      MSGS<11> = MSG
*0155      MSGS<12> = ''
*0156      MSGS<13> = 'Type /V at the command prompt'
*0157      TUTOR.CMD = '/V'
*0158      RETURN
*0159 *
*0160 TUTOR.STEP.8:
*0161      CLEAR = 'LAST'
*0162      MSG = 'On the next line you see Type Q to quit, ? or HELP for'
*0163      MSG = MSG:' help, or TUTOR for a tutorial'
*0164      MSGS<4> = MSG
*0165      MSGS<5> = ''
*0166      MSG = 'Q will quit this program and return you to the TCL prompt'
*0167      MSG = MSG:' or if you ran this program from another program or'
*0168      MSG = MSG:' proc, it will return you there.'
*0169      MSGS<6> = MSG
*0170      MSGS<7> = ''
*0171      MSG = '? or HELP will display HELP information like we just saw'
*0172      MSG = MSG:' HELP displays not just help about the shell, but is a
*     '
*0173      MSG = MSG:' gateway to other host-based help systems.  For exampl
*     e'
*0174      MSG = MSG:' the UNIX man help, or the Universe HELP function.'
*0175      MSGS<8> = MSG
*0176      MSGS<9> = ''
*0177      MSG = 'TUTOR will start this tutorial that you are in now.'
*0178      MSG = MSG:' While in this tutorial, you will notice the phrase'
*0179      MSG = MSG:' TUTOR MODE appears in your prompt environment.'
*0180      MSG = MSG:' This is referred to as a Special Message.  There are'
*0181      MSG = MSG:' several special messages which will be explained'
*0182      MSG = MSG:' later.'
*0183      MSGS<10> = MSG
*0184      TUTOR.CMD = ''
*0185      RETURN
*0186 *
*0187 TUTOR.STEP.10:
*0188      CLEAR = 'FIRST'
*0189      MSGS<4> = "Very good!."
*0190      MSG = "The next part of the prompt environment shows some of your
*     "
*0191      MSG = MSG:" personal environmental settings. These are User Id,"
*0192      MSG = MSG:" Account, Port and if you are on a Unix system, your"
*0193      MSG = MSG:" TTY.  Your User Id is very important to the correct"
*0194      MSG = MSG:" functioning of the shell.  Let's take a look at one"
*0195      MSG = MSG:" example of why."
*0196      MSGS<5> = MSG
*0197      MSGS<6> = ''
*0198      MSG = 'The shell is mainly a system where you can stack items of'
*0199      MSG = MSG:' one type or another and operate on those items withou
*     t'
*0200      MSG = MSG:' having to re-key them every time.'
*0201      MSGS<7> = MSG
*0202      MSGS<8> = ''
*0203      MSG = 'The User Id is how the shell keeps your stacks from'
*0204      MSG = MSG:' overwriting the stacks of someone else on your same'
*0205      MSG = MSG:" system.  Let's see how the User Id is used to name th
*     e"
*0206      MSG = MSG:' stacks.  You can see all your environmental settings'
*0207      MSG = MSG:' using the /Z function.  Pay attention to the right-'
*0208      MSG = MSG:'-hand column in the section called stack file records.
*     '
*0209      MSGS<9> = MSG
*0210      MSGS<10> = ''
*0211      MSGS<11> = "Type /Z at the command prompt"
*0212      TUTOR.CMD = "/Z"
*0213      RETURN
*0214 *
*0215 TUTOR.STEP.12:
*0216      CLEAR = 'FIRST'
*0217      MSGS<4> = "Very good!"
*0218      MSG = "You saw a lot of info in the /Z step.  You are not going t
*     o"
*0219      MSG = MSG:" understand much of it right now.  The point of that"
*0220      MSG = MSG:" step was merely to show you where these environmental
*     "
*0221      MSG = MSG:" settings are viewed, and one example of how your User
*     "
*0222      MSG = MSG:" Id is used."
*0223      MSGS<5> = MSG
*0224      MSGS<6> = ''
*0225      MSG = "If you ever sign-on as someone else, you will get their"
*0226      MSG = MSG:" stacks not your own."
*0227      MSGS<7> = MSG
*0228      MSGS<8> = ''
*0229      MSG = "Every so often you will get the message type UPGRADE to"
*0230      MSG = MSG:" upgrade your shell!  Why don't we go ahead and do tha
*     t"
*0231      MSG = MSG:" now?"
*0232      MSGS<9> = MSG
*0233      MSGS<10> = ''
*0234      MSGS<11> = "Type UPGRADE at the command prompt"
*0235      TUTOR.CMD = "UPGRADE"
*0236      RETURN
*0237 *
*0238 TUTOR.STEP.14:
*0239      CLEAR = 'LAST'
*0240      MSGS<4> = "Very good!"
*0241      MSG = "Right now, typing UPGRADE merely gives you the information
*     "
*0242      MSG = MSG:" you would need to manually check for an upgrade.  Ina
*     "
*0243      MSG = MSG:" later release, I hope to have automatic InterNet"
*0244      MSG = MSG:" upgrade checking.  If any of you know how to program"
*0245      MSG = MSG:" this, please call me."
*0246      MSGS<5> = MSG
*0247      TUTOR.CMD = ''
*0248 RETURN
*0249 *
*0250 TUTOR.STEP.16:
*0251      CLEAR = 'FIRST'
*0252      MSGS<4> = 'Very good!'
*0253      MSG = "Now let's try adding something to your program stack.  To"
*0254      MSG = MSG:" insert a new item to a stack, you use the .I command.
*      "
*0255      MSG = MSG:" It will then ask you for a File name and an Item name
*     ."
*0256      MSG = MSG:"   For File we are going to type FFT.BP.  For Item we"
*0257      MSG = MSG:" are going to type WSOLD"
*0258      MSGS<5> = MSG
*0259      MSGS<6> = ''
*0260      MSGS<7> = "Type .I at the command prompt, then when it asks you,t
*     ype"
*0261      MSG = "FFT.BP, followed by the ENTER or RETURN key and then"
*0262      MSG = MSG:" when it asks you, type"
*0263      MSGS<8> = MSG
*0264      MSG = "WSOLD, followed by the ENTER or RETURN key."
*0265      MSGS<9> = MSG
*0266      TUTOR.CMD = ".I"
*0267      RETURN
*0268 *
*0269 TUTOR.END:
*0270 * Modified 15:11:23  15 JUN 1999 by FFT version 1.0
*0271 * Reason: Create
*0272 * Modified 15:15:11  15 JUN 1999 by FFT version 1.1
*0273 * Reason: Add components and error to arguments
*0274 * Modified 15:21:53  15 JUN 1999 by FFT version 1.2
*0275 * Reason: Add vers variable
*0276 * Modified 15:24:48  15 JUN 1999 by FFT version 1.3
*0277 * Reason: Add a clear screen to end of routine
*0278 * Modified 15:36:44  15 JUN 1999 by FFT version 1.4
*0279 * Reason: Add another blank line before each step
*0280 * Modified 15:37:54  15 JUN 1999 by FFT version 1.5
*0281 * Reason: Add a maxstep argument
*0282 * Modified 16:01:21  15 JUN 1999 by FFT version 1.7
*0283 * Reason: Add step 5
*0284 * Modified 16:26:40  15 JUN 1999 by FFT version 1.12
*0285 * Reason: Add /Z step
*0286 * Modified 16:38:04  15 JUN 1999 by FFT version 1.13
*0287 * Reason: Fix wording of /Z step
*0288 * Modified 16:46:27  15 JUN 1999 by FFT version 1.15
*0289 * Reason: Add description after /Z step
*0290 * Modified 16:58:17  15 JUN 1999 by FFT version 1.17
*0291 * Reason: Add UPGRADE step
*0292 * Modified 17:19:25  15 JUN 1999 by FFT version 1.20
*0293 * Reason: Add the .I step
*0294 * Modified 17:48:16  15 JUN 1999 by FFT version 1.21
*0295 * Reason:
*0296 * Modified 17:49:01  15 JUN 1999 by FFT version 1.22
*0297 * Reason: Make all the tutor text flow through a word-wrapping routine
*0298 * Modified 17:50:05  15 JUN 1999 by FFT version 1.23
*0299 * Reason: Add a line of stars to seperate each step
*0300 * Modified 17:58:06  15 JUN 1999 by FFT version 1.24
*0301 * Reason:
*0302 * Modified 18:00:28  15 JUN 1999 by FFT version 1.25
*0303 * Reason: Remove re-display of prompt from this program
*0304 * Modified 18:02:13  15 JUN 1999 by FFT version 1.26
*0305 * Reason: Add a line of starts before and after the tutor instructions
*      to set them off
*0306 * Modified 18:02:53  15 JUN 1999 by FFT version 1.27
*0307 * Reason: Add another blank line
*0308 * Modified 18:16:05  15 JUN 1999 by FFT version 1.28
*0309 * Reason:
*0310 * Modified 18:24:21  15 JUN 1999 by FFT version 1.29
*0311 * Reason: Format the tutor instruction text better
*0312 * Modified 18:27:08  15 JUN 1999 by FFT version 1.30
*0313 * Reason: Fix instruction text by adding another line after each messa
*     ge
*0314 * Modified 18:39:28  15 JUN 1999 by FFT version 1.31
*0315 * Reason:
*0316 * Modified 18:55:45  15 JUN 1999 by FFT version 1.32
*0317 * Reason: Move all text into internal subroutines and allow clearing t
*     he screen before or after text display
*0318 * Modified 18:58:57  15 JUN 1999 by FFT version 1.33
*0319 * Reason: Fix logic on when to display HIT RETURN message when clear i
*     s at the end
*0320 * Modified 19:00:26  15 JUN 1999 by FFT version 1.34
*0321 * Reason: Initialize MSGS varialbe
*0322 * Modified 19:01:54  15 JUN 1999 by FFT version 1.35
*0323 * Reason:
*0324 * Modified 19:04:55  15 JUN 1999 by FFT version 1.36
*0325 * Reason:
*0326 * Modified 19:24:40  15 JUN 1999 by FFT version 1.37
*0327 * Reason: rearrance some of the steps
*0328 * Modified 19:25:47  15 JUN 1999 by FFT version 1.38
*0329 * Reason:
*0330 * Modified 19:27:17  15 JUN 1999 by FFT version 1.39
*0331 * Reason:
*0332 * Modified 20:06:50  18 JUN 1999 by FFT version 1.40
*0333 * Reason: Change line wrapping on step 12
*0334 * Modified 19:21:01  20 JUN 1999 by FFT version 1.41
*0335 * Reason: Add step 16
*0336 * Modified 18:34:46  22 JUN 1999 by FFT version 1.42
*0337 * Reason:
*0338 * Modified 19:02:15 27 JUN 1999 by Administrator version 1.42.1
*0339 * Reason: Use the new global definition of terminal width
*0340 * Modified 20:24:06 27 JUN 1999 by Administrator version 1.42.2
*0341 * Reason: Refer to variable as gTERM.WIDTH instead of TERM.WIDTH
141:
LINE = "BASIC FFT.BP WS.TUTOR"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP WS.TUTOR"; GOSUB PROCESS.COMMAND
ITEMLIST = "UNINSTALL*WSýUPGRADE*WS"
LINE = "ADD FFT.BP"
I.STACK = 144; GOSUB PROCESS.COMMAND
GOTO 144
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:42 29 JUN 1999
*!STARTNEWITEM
*UNINSTALL*WS
*0001       EQUATE AM TO CHAR(254)
*0002       OPEN "GLOBAL.CONTROL" TO F.GLOBAL.CONTROL ELSE
*0003          PRINT 'Cant open GLOBAL.CONTROL file.'
*0004          PRINT 'Hit the ENTER or RETURN key to acknowledge this messag
*     e'
*0005          INPUT ANS
*0006       END
*0007       READ FILES FROM F.GLOBAL.CONTROL,"FILES*WS" ELSE
*0008          PRINT 'Cant read the file list for the WS system.'
*0009          PRINT 'Hit the ENTER or RETURN key to acknowledge this messag
*     e'
*0010          INPUT ANS
*0011       END
*0012       READ COMPONENTS FROM F.GLOBAL.CONTROL,"COMPONENTS*WS" ELSE
*0013          PRINT 'Cant read the component list for the WS system.'
*0014          PRINT 'Hit the ENTER or RETURN key to acknowledge this messag
*     e'
*0015          INPUT ANS
*0016       END
*0017       PRINT 'Is this a Universe machine (Y/N) ': ; INPUT UNIVERSE
*0018       UNIVERSE = (UNIVERSE='Y')
*0019       PRINT 'Do you wish to completely remove WS from your system or'
*0020       PRINT 'are you preparing WS for an upgrade?'
*0021       PRINT 'Type 1 to completely remove WS'
*0022       PRINT 'Type 2 to prepare WS for an upgrade'
*0023       PRINT 'Enter your selection ': ; INPUT MODE
*0024       IF MODE = '1' THEN
*0025          IF UNIVERSE THEN
*0026             OPEN 'VOC' TO F.MD ELSE
*0027                PRINT 'Cannot open the VOC file.' ; ABORT
*0028             END
*0029          END ELSE
*0030             OPEN 'MD' TO F.MD ELSE
*0031                PRINT 'Cannot open the MD file.' ; ABORT
*0032             END
*0033          END
*0034          S.FILES = DCOUNT(FILES,AM)
*0035          FOR I.FILES = 1 TO S.FILES
*0036             T.FILE = FILES<I.FILES>

*0037             IF FIELD(T.FILE,' ',1) = 'CREATE-FILE' THEN
*0038                N.FILE = FIELD(T.FILE,' ',2)
*0039                READV EXISTS FROM F.MD,N.FILE,1 THEN
*0040                   LINE = 'DELETE-FILE ':N.FILE
*0041                   PRINT LINE ; EXECUTE LINE
*0042                END
*0043             END
*0044          NEXT I.FILES
*0045       END
*0046       S.COMPONENTS = DCOUNT(COMPONENTS,AM)
*0047       FOR I.COMPONENTS = 1 TO S.COMPONENTS
*0048          T.COMPONENT = COMPONENTS<I.COMPONENTS>
*0049          IF FIELD(T.FILE,' ',1) = 'CREATE-FILE' THEN NULL ELSE
*0050             IF FIELD(T.FILE,' ',1) = 'FFT.BP' THEN
*0051                LINE = "DECATALOG ":T.COMPONENT ; PRINT LINE ; EXECUTE 
*     LINE
*0052             END
*0053             LINE = "DELETE ":T.COMPONENT ; PRINT LINE ; EXECUTE LINE
*0054          END
*0055       NEXT I.COMPONENTS
*0056       EXECUTE "DELETE MD WS"
*0057       PRINT 'DONE UNINSTALLING WS SYSTEM'
*!STARTNEWITEM
*UPGRADE*WS
*0001       EQUATE AM TO CHAR(254)
*0002       OPEN "GLOBAL.CONTROL" TO F.GLOBAL.CONTROL ELSE
*0003          PRINT 'Cant open GLOBAL.CONTROL file.'
*0004          PRINT 'Hit the ENTER or RETURN key to acknowledge this messag
*     e'
*0005          INPUT ANS
*0006       END
*0007       READ COMPONENTS FROM F.GLOBAL.CONTROL,"COMPONENTS*WS" ELSE
*0008          PRINT 'Cant read the component list for the WS system.'
*0009          PRINT 'Hit the ENTER or RETURN key to acknowledge this messag
*     e'
*0010          INPUT ANS
*0011       END
*0012       S.COMPONENTS = DCOUNT(COMPONENTS,AM)
*0013       FOR I.COMPONENTS = 1 TO S.COMPONENTS
*0014          T.COMPONENT = COMPONENTS<I.COMPONENTS>
*0015          IF FIELD(T.COMPONENT,' ',1) = 'FFT.BP' THEN
*0016             LINE = "DECATALOG ":T.COMPONENT ; PRINT LINE ; EXECUTE LIN
*     E
*0017          END
*0018          BEGIN CASE
*0019             CASE INDEX(T.COMPONENT,'WS.STACKS',1) ; NULL
*0020             CASE INDEX(T.COMPONENT,'GLOBAL.CONTROL',1) ; NULL
*0021             CASE INDEX(T.COMPONENT,'&SAVEDLISTS&',1) ; NULL
*0022             CASE 1
*0023                LINE = "DELETE ":T.COMPONENT ; PRINT LINE ; EXECUTE LIN
*     E
*0024          END CASE
*0025       NEXT I.COMPONENTS
*0026       EXECUTE "DELETE MD WS"
*0027       PRINT 'DONE PREPARING WS SYSTEM FOR UPGRADE'
144:
LINE = "BASIC FFT.BP UNINSTALL*WS UPGRADE*WS"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP UNINSTALL*WS UPGRADE*WS"; GOSUB PROCESS.COMMAND
ITEMLIST = "WS#VERS2.72.1"
LINE = "ADD FFT.BP"
I.STACK = 147; GOSUB PROCESS.COMMAND
GOTO 147
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:43 29 JUN 1999
*!STARTNEWITEM
*WS#VERS2.72.1
*0001       SUBROUTINE WS(VERS,COMPONENTS,ERROR)
*0002 *
*0003 * COPYRIGHT 1992-1999 FAST FORWARD TECHNOLOGIES
*0004 * WARNING! WARNING! WARNING!
*0005 * This program may not be duplicated, sold, given, exchanged, modified
*0006 * transferred, downloaded, decompiled, or otherwise made available to
*0007 * any third party without the express writen and notarized consent of
*0008 * FAST FORWARD TECHNOLOGIES, INC.
*0009 * Written in the distant past by
*0010 * Will Johnson
*0011 *
*0012 * Do not delete the three below lines that start with *!*! or this pro
*     gram
*0013 * will lose it's ability to self-update its VERS
*0014 *!*! VERSION HOLDER
*0015 *!*! WS
*0016 *!*! INSTALL CONTROL
*0017 *!*! WS
*0018 *
*0019       K.PROGRAM = "WS"
*0020       FILES = '' ; CONTROLS = ''
*0021 $INCLUDE CODE.INCLUDES GLOBAL
*0022       VERSION.CONTROL = SET
*0023 * environment variables
*0024 $INCLUDE CODE.INCLUDES ENVIRONMENT
*0025       IF ERROR # '' THEN
*0026          PRINT "IN PROGRAM ":K.PROGRAM:" VERS ":VERS
*0027          PRINT ERROR ; STOP
*0028       END
*0029 *
*0030       RETURNTOME = FALSE
*0031 GET.MY.CONTROLS:
*0032 $INCLUDE CODE.INCLUDES GET.MY.CONTROLS
*0033       IF ERROR # '' THEN
*0034          PRINT "IN PROGRAM ":K.PROGRAM:" VERS ":VERS
*0035          PRINT ERROR ; STOP
*0036       END
*0037 *
*0038       K.CONTACT = 'FFT'
*0039 $INCLUDE CODE.INCLUDES CONTACT.EQU
*0040       IF ERROR # '' THEN
*0041          PRINT "IN PROGRAM ":K.PROGRAM:" VERS ":VERS
*0042          PRINT ERROR ; STOP
*0043       END
*0044       CONTROLS<-1> = eCONTROL.FILE:' ':K.CONTACT
*0045 *
*0046 $INCLUDE CODE.INCLUDES WS.ENVIRONMENT
*0047       IF ERROR # '' THEN
*0048          PRINT "IN PROGRAM ":K.PROGRAM:" VERS ":VERS
*0049          PRINT ERROR ; STOP
*0050       END
*0051 * Determine sentence
*0052 $INCLUDE CODE.INCLUDES GET.SENTENCE
*0053       IF ERROR # '' THEN
*0054          PRINT "IN PROGRAM ":K.PROGRAM:" VERS ":VERS
*0055          PRINT ERROR ; STOP
*0056       END
*0057 *
*0058       HOSTPATH.DELIM = CHAR(92)
*0059       PROCREAD BUF THEN PRINT 'PROC BUFFER = ':BUF
*0060       PROGRAM.FILES = "BP":AM:"FFT.BP"
*0061       F.WHOAMI = 'FFT.BP' ; R.WHOAMI.VERS ='WS'
*0062       T.COMPONENT = F.WHOAMI:' ':R.WHOAMI.VERS
*0063       GOSUB gADD.COMPONENT
*0064       R.WHOAMI.COM = K.PROGRAM:'#VERS':VERS
*0065       T.COMPONENT = F.WHOAMI:' ':R.WHOAMI.COM
*0066       GOSUB gADD.COMPONENT
*0067       WHOAMI.VERS = F.WHOAMI:' ':K.PROGRAM
*0068       WHOAMI.COM = F.WHOAMI:' ':R.WHOAMI.COM ; WHOAMI.NEWCOM = WHOAMI.
*     COM
*0069       CHAIN.ME = K.PROGRAM
*0070 ******
*0071       PROMPT ''
*0072       T.COMPONENT = 'CODE.INCLUDES CHAR.INPUT'
*0073       GOSUB gADD.COMPONENT
*0074       T.COMPONENT = 'FFT.BP WS.TUTOR'
*0075       GOSUB gADD.COMPONENT
*0076       T.COMPONENT = 'GLOBAL.CONTROL PROGRAM*WS.TUTOR'
*0077       GOSUB gADD.COMPONENT
*0078       T.COMPONENT = 'FFT.BP EXECUTE' ; GOSUB gADD.COMPONENT
*0079       T.COMPONENT = 'FFT.BP EXECUTE.UNIVERSE' ; GOSUB gADD.COMPONENT
*0080       T.COMPONENT = 'FFT.BP EXECUTE.MVBASE' ; GOSUB gADD.COMPONENT
*0081       T.COMPONENT = 'FFT.BP ASSIGN.DEFAULTLIST.TO.VAR'
*0082       GOSUB gADD.COMPONENT
*0083       T.COMPONENT = 'FFT.BP BROWSER'
*0084       GOSUB gADD.COMPONENT
*0085       T.COMPONENT = 'FFT.BP WINDOWS.TRANSLATE.PUNCTUATION'
*0086       GOSUB gADD.COMPONENT
*0087 * END OF COMPONENT INFORMATION NOW WRITE IT
*0088       WRITE COMPONENTS ON eF.CONTROL,'COMPONENTS*':K.PROGRAM
*0089       WRITE FILES ON eF.CONTROL,'FILES*':K.PROGRAM
*0090       WRITE CONTROLS ON eF.CONTROL,'CONTROLS*':K.PROGRAM
*0091 *
*0092 * LOAD PLUG-IN FLAGS
*0093       READV EXISTS FROM mF.VERBS,'BCOMPARE',1 THEN
*0094          HAS.BCOMPARE = TRUE
*0095       END ELSE HAS.BCOMPARE = FALSE
*0096       READV EXISTS FROM mF.VERBS,'FFTFORMAT',1 THEN
*0097          HAS.FORMAT = TRUE
*0098       END ELSE HAS.FORMAT = FALSE
*0099       READV EXISTS FROM mF.VERBS,'FFTMAKELIVE',1 THEN
*0100          HAS.MAKELIVE = TRUE
*0101       END ELSE HAS.MAKELIVE = FALSE
*0102       READV EXISTS FROM mF.VERBS,'INSTALLER',1 THEN
*0103          HAS.INSTALLER = TRUE
*0104       END ELSE HAS.INSTALLER = FALSE
*0105 *
*0106       DIM STACK(20)
*0107 *
*0108       GOSUB READ.STACKS
*0109 *
*0110 * If the primary contact is not in the contacts stack then put them in
*0111 * at the top
*0112       HOLD.W.STACK = W.STACK
*0113       LOCATE("CONTACTS",N.STACKS;W.STACK) THEN
*0114          LOCATE(K.CONTACT,STACK(W.STACK);W.CONTACT) ELSE
*0115             STACK(W.STACK) = INSERT(STACK(W.STACK),1;K.CONTACT)
*0116          END
*0117          W.STACK = HOLD.W.STACK
*0118       END
*0119       W.STACK = 1 ; GOSUB SET.STACK.DEPENDENT.HELP
*0120       LIST.ON = FALSE ; MYLIST1 = '' ; MYLIST2 = ''
*0121       TUTOR.MODE = ZEROED ; TUTOR.STEP = 0 ; TUTOR.CMD = ''
*0122       LOOP
*0123          IF TUTOR.MODE THEN GOSUB PROCESS.TUTOR.STEP
*0124          CRT
*0125          IF NOT(MOD(TIME(),20)) THEN
*0126             CRT @(-7):'To check for an upgrade to this shell, ':
*0127             CRT 'type UPGRADE at the prompt.':@(-8)
*0128          END
*0129          BEGIN CASE
*0130             CASE INSTALL.REC(V.INSTALL.EXPIREDATE) < DATE()
*0131                CRT 'Press any key...':
*0132 $INCLUDE CODE.INCLUDES CHAR.INPUT
*0133                CRT ; CRT @(-7):'Your ':K.PROGRAM:' has expired!':@(-8)
*0134                CENTERIT = FALSE
*0135                GOSUB DISPLAY.VENDOR.CONTACT.INFO
*0136                CRT SPACE(5):'in order to renew your license!'
*0137                CRT
*0138             CASE INSTALL.REC(V.INSTALL.EXPIREDATE) < DATE() + 30
*0139                CRT 'Press any key...':
*0140 $INCLUDE CODE.INCLUDES CHAR.INPUT
*0141                CRT ; CRT @(-7):'Your ':K.PROGRAM:' will expire on ':
*0142                CRT OCONV(INSTALL.REC(V.INSTALL.EXPIREDATE),'D4-'):
*0143                CRT '!':@(-8)
*0144                CENTERIT = FALSE
*0145                GOSUB DISPLAY.VENDOR.CONTACT.INFO
*0146                CRT SPACE(5):'in order to renew your license!'
*0147                CRT
*0148          END CASE
*0149          CRT K.PROGRAM:' Version ':VERS
*0150          CRT 'Type Q to Quit this shell, type ? or HELP for help, or T
*     UTOR for a tutorial'
*0151          CRT @(-7):'USER ID:':@(-8):' ':USER.ID:' ':
*0152          CRT @(-7):'ACCOUNT:':@(-8):' ':ACCOUNT:' ':
*0153          CRT @(-7):'PORT:':@(-8):' ':PORT.NO:' ':
*0154          IF MACHINE.OS = 'UNIX' THEN CRT @(-7):'TTY:':@(-8):' ':TTY:' 
*     ':
*0155          CRT
*0156          SPECIAL.MSG = FALSE
*0157          BEGIN CASE
*0158             CASE SYSTEM(11)
*0159                LIST.ON = TRUE
*0160                IF MACHINE.DATABASE = "UNIVERSE" THEN
*0161 *                  CALL ASSIGN.DEFAULTLIST.TO.VAR(MYLIST)
*0162                END
*0163             CASE LIST.ON ; NULL
*0164             CASE 1 ; LIST.ON = FALSE
*0165          END CASE
*0166          IF LIST.ON THEN CRT 'ACTIVE LIST ' : ; SPECIAL.MSG = TRUE
*0167          IF eLEVEL # 0 THEN
*0168             CRT 'LEVEL ':eLEVEL:' ': ; SPECIAL.MSG = TRUE
*0169             DATA 'Q'
*0170          END
*0171          IF TUTOR.MODE THEN CRT 'TUTOR ON ': ; SPECIAL.MSG = TRUE
*0172          IF SPECIAL.MSG THEN CRT
*0173          IF LEN(STACK(W.STACK)<1>) < 50 THEN
*0174             CRT STACK(W.STACK)<1>"L#50":SPACE(5):TIMEDATE()
*0175          END ELSE CRT STACK(W.STACK)<1>
*0176          BEGIN CASE
*0177             CASE FIRST.TIME
*0178                PRINT ; PRINT 'I sense that this is your first time usi
*     ng this':
*0179                PRINT ' Shell program.' ; PRINT 'You can enter the tutu
*     rial at':
*0180                PRINT ' any time by typing TUTOR at the prompt.'
*0181                LOOP
*0182                   PRINT 'Would you like a tutorial now ? (Y/N) ':
*0183                   INPUT TUTOR.ME
*0184                UNTIL TUTOR.ME = 'Y' OR TUTOR.ME = 'N' DO
*0185                   PRINT 'Please enter either Y or N'
*0186                REPEAT
*0187                TUTOR.MODE = (TUTOR.ME = 'Y') ; TUTOR.STEP = -1
*0188                IF TUTOR.MODE THEN PRINT @(-1): ; DATA ''
*0189                FIRST.TIME = FALSE
*0190          END CASE
*0191          MYPROMPT = N.STACKS<W.STACK>:'>'
*0192          CRT MYPROMPT:
*0193          INPUT CMD
*0194       UNTIL CMD = 'Q' DO
*0195          T.STACK = STACK(W.STACK)<1>
*0196          IF N.STACKS<W.STACK> = "PROG" THEN
*0197             T.FILE = FIELD(T.STACK," ",1) ; T.ITEM = FIELD(T.STACK," "
*     ,2)
*0198          END
*0199          VALID = TRUE
*0200          IF TUTOR.MODE THEN
*0201             BEGIN CASE
*0202                CASE CMD = 'END'
*0203                   TUTOR.MODE = ZEROED ; TUTOR.STEP = 0 ; VALID = FALSE
*0204                CASE CMD # TUTOR.CMD ; GOSUB TUTOR.COMPLAINT ; VALID = 
*     FALSE
*0205                CASE 1 ; TUTOR.STEP = TUTOR.STEP + 1
*0206             END CASE
*0207          END ELSE
*0208             IF CMD = '' THEN VALID = FALSE
*0209          END
*0210          IF VALID THEN GOSUB PROCESS.CMD
*0211       REPEAT
*0212       GOSUB WRITE.STACKS
*0213       RETURN
*0214 *
*0215 TUTOR.COMPLAINT:
*0216       PRINT STR("*",75)
*0217       PRINT SPACE(30):"TUTOR ERROR" ; PRINT
*0218       PRINT "You have entered something contrary to the tutor's instru
*     ctions"
*0219       PRINT 'To leave TUTOR mode, type END at any point.'
*0220       PRINT 'Otherwise, please follow the instructions as I give them.
*     '
*0221       PRINT "Press the ENTER or RETURN key to acknowledge this message
*     "
*0222       PRINT STR("*",75)
*0223       INPUT ANS
*0224       PRINT @(-1):
*0225       TUTOR.STEP = TUTOR.STEP - 1
*0226       RETURN
*0227 *
*0228 PROCESS.TUTOR.STEP:
*0229       CALL WS.TUTOR(TUTOR.STEP,TUTOR.CMD,MYPROMPT,MAXSTEP,COMPONENTS,E
*     RROR)
*0230       IF TUTOR.STEP <= MAXSTEP THEN
*0231          IF INT(TUTOR.STEP/2) = TUTOR.STEP/2 THEN  ; * ODD
*0232             PRINT 'The tutor has gotten out of step. Contact us'
*0233             CENTERIT = TRUE ; GOSUB DISPLAY.VENDOR.CONTACT.INFO
*0234             TUTOR.MODE = ZEROED
*0235          END
*0236       END ELSE
*0237          TUTOR.MODE = ZEROED ; TUTOR.STEP = 0 ; TUTOR.CMD = ''
*0238          PRINT 'This marks the end of the tutor.  You may now press'
*0239          PRINT 'the ENTER or RETURN key to begin using and enjoying'
*0240          PRINT 'the stack, or type Q to quit.  You can re-run the stac
*     k'
*0241          PRINT 'at anytime by typing WS at the TCL prompt.'
*0242       END
*0243       RETURN
*0244 *
*0245 PROCESS.CMD:
*0246       BEGIN CASE
*0247          CASE CMD[1,2] = '.A' ; GOSUB APPEND.CMD
*0248          CASE CMD[1,2] = '.C' ; GOSUB CHANGE.CMD
*0249          CASE CMD[1,2] = '.D' ; GOSUB DELETE.CMD
*0250          CASE CMD = '.E' ; GOSUB EDIT.CMD
*0251          CASE CMD[1,2] = '.G' ; GOSUB RECALL.CMD
*0252          CASE CMD = '.I' ; GOSUB INSERT.CMD
*0253          CASE CMD[1,2] = '.L' ; GOSUB LIST.CMD
*0254          CASE CMD[1,2] = '.S' ; GOSUB SWITCH.STACK
*0255          CASE CMD[1,2] = '.X' AND N.STACKS<W.STACK> = "TCL" ; GOSUB EX
*     ECUTE.STACK
*0256          CASE CMD[1,2] = '.X'
*0257             PRINT 'This function only works on the TCL stack.'
*0258             PRINT 'Type .STCL if you wish to switch to the TCL stack.'
*0259          CASE FIELD(CMD,' ',1) = 'LOGTO' ; GOSUB PROCESS.LOGTO
*0260          CASE CMD = 'CLEARSELECT'
*0261             LIST.ON = FALSE ; GOSUB EXECUTE.CMD
*0262          CASE CMD = '?' ; GOSUB HELP
*0263          CASE CMD = '/M' ; GOSUB SHOW.MODS
*0264          CASE CMD = '/V' ; GOSUB VERSION.INFO
*0265          CASE CMD = '/Z' ; GOSUB ENVIRONMENT.INFO
*0266          CASE CMD = 'HELP' ; GOSUB MAJOR.HELP
*0267          CASE CMD = 'TUTOR' ; TUTOR.MODE = SET ; TUTOR.STEP = 0
*0268          CASE CMD = 'UPGRADE' ; GOSUB UPGRADE.ME
*0269          CASE N.STACKS<W.STACK> = "PROG"
*0270             LOCATE(CMD,VALID.CMDS;W.CMD) THEN
*0271                GOSUB PROCESS.CMD.PROG
*0272             END ELSE GOSUB EXECUTE.CMD
*0273          CASE N.STACKS<W.STACK> = "DATA"
*0274             LOCATE(CMD,VALID.CMDS;W.CMD) THEN
*0275                BEGIN CASE
*0276                   CASE CMD = 'U' ; GOSUB USE.VERB
*0277                END CASE
*0278             END ELSE GOSUB EXECUTE.CMD
*0279          CASE N.STACKS<W.STACK> = "TCL"
*0280             LOCATE(CMD,VALID.CMDS;W.CMD) THEN
*0281                BEGIN CASE
*0282                   CASE CMD = 'U' ; GOSUB USE.VERB
*0283                END CASE
*0284             END ELSE GOSUB EXECUTE.CMD
*0285          CASE N.STACKS<W.STACK> = "CONTROLS"
*0286             LOCATE(CMD,VALID.CMDS;W.CMD) THEN
*0287                BEGIN CASE
*0288                   CASE CMD = 'E' ; GOSUB EDIT.THING
*0289                END CASE
*0290             END ELSE GOSUB EXECUTE.CMD
*0291          CASE N.STACKS<W.STACK> = "INSTALLER"
*0292             LOCATE(CMD,VALID.CMDS;W.CMD) THEN
*0293                CMDS = CMD
*0294                CALL INSTALLER(CMDS,CMDS.HELP,STACK(W.STACK))
*0295             END ELSE GOSUB EXECUTE.CMD
*0296          CASE 1 ; GOSUB EXECUTE.CMD
*0297       END CASE
*0298       RETURN
*0299 *
*0300 PROCESS.CMD.PROG:
*0301       BEGIN CASE
*0302          CASE CMD = 'A' ; GOSUB ARCHIVE.PROGRAM
*0303          CASE CMD = 'B' ; GOSUB BASIC.PROGRAM
*0304          CASE CMD = 'BC' AND HAS.BCOMPARE ; GOSUB BCOMPARE.PROGRAM
*0305          CASE CMD = 'C' ; GOSUB CATALOG.PROGRAM
*0306          CASE CMD = 'CO' ; GOSUB SHOW.CONTROLS
*0307          CASE CMD = 'E' ; GOSUB EDIT.THING
*0308          CASE CMD = 'F' AND HAS.FORMAT ; GOSUB FORMAT.PROGRAM
*0309          CASE CMD = 'ML' AND HAS.MAKELIVE ; GOSUB MAKELIVE.PROGRAM
*0310          CASE CMD = 'O' ; GOSUB OUTPUT.PROGRAM
*0311          CASE CMD = 'R' ; GOSUB RUN.PROGRAM
*0312          CASE CMD = 'U' ; GOSUB USE.VERB
*0313       END CASE
*0314       RETURN
*0315 *
*0316 UPGRADE.ME:
*0317       CENTERIT = TRUE
*0318       GOSUB DISPLAY.VENDOR.CONTACT.INFO
*0319       MSG = ' in order to upgrade your copy of ':K.PROGRAM:'!'
*0320       GOSUB CENTER.IT ; CRT MSG
*0321       RETURN
*0322 *
*0323 PROCESS.LOGTO:
*0324       Q.NAME = FIELD(CMD,' ',2):'!':weSTACK.FILE
*0325       R.VERBS = 'Q':AM:FIELD(CMD,' ',2):AM:weSTACK.FILE
*0326       WRITE R.VERBS ON mF.VERBS,Q.NAME
*0327       HOLD.W.STACK = W.STACK
*0328       LOCATE("TCL",N.STACKS;W.STACK) THEN
*0329          STACK(W.STACK) = INSERT(STACK(W.STACK),1;CMD)
*0330          W.STACK = HOLD.W.STACK
*0331       END
*0332       GOSUB WRITE.STACKS                 ; *Write stack to local file
*0333       OPEN Q.NAME TO weF.STACK.FILE THEN
*0334          GOSUB WRITE.STACKS              ; *Write stack to remote file
*0335          CHAIN CMD
*0336       END ELSE
*0337          CRT "Cannot log to the remote account because I can't open th
*     e ":Q.NAME:" file."
*0338          CRT 'Would you like to log there anyway (Y/N) ': ; INPUT GO.O
*     N
*0339          IF GO.ON = 'Y' THEN CHAIN CMD
*0340          OPEN weSTACK.FILE TO weF.STACK.FILE ELSE NULL
*0341       END
*0342       RETURN
*0343 *
*0344 CENTER.IT:
*0345       BLANKS = 80 - LEN(MSG)
*0346       MSG = SPACE(INT(BLANKS/2)):MSG
*0347       RETURN
*0348 *
*0349 USE.VERB:
*0350       CRT 'Verb ': ; INPUT N.VERB
*0351       MYLINE = N.VERB:' ':STACK(W.STACK)<1>
*0352       PRINT 'Add any options or trailing words'
*0353       PRINT MYLINE:' ': ; INPUT N.OPTIONS
*0354       IF N.OPTIONS # '' THEN MYLINE = MYLINE:' ':N.OPTIONS
*0355       HOLD.W.STACK = W.STACK
*0356       LOCATE("TCL",N.STACKS;W.STACK) THEN
*0357          STACK(W.STACK) = INSERT(STACK(W.STACK),1;MYLINE)
*0358          W.STACK = HOLD.W.STACK
*0359       END
*0360       GOSUB WRITE.STACKS
*0361       CLAUSES = '' ; LIST.IN = '' ; LIST.OUT = '' ; DATA.IN = '' ; DAT
*     A.OUT = ''
*0362       ERR = ''
*0363       CALL EXECUTE(MACHINE.DATABASE,MYLINE,CLAUSES,LIST.IN,LIST.OUT,DA
*     TA.IN,DATA.OUT,ERR)
*0364       RETURN
*0365 *
*0366 VERSION.INFO:
*0367       CRT ; MSG = "You are running Will's Shell"
*0368       GOSUB CENTER.IT ; PRINT MSG
*0369       MSG = "a product of ":VENDOR.REC(V.VENDOR.NAME)
*0370       MSG := " and ":PROGRAM.REC(V.PROGRAM.AUTHOR)
*0371       GOSUB CENTER.IT ; PRINT MSG
*0372       MSG = "copyright 1992-1999 Version: ":VERS
*0373       GOSUB CENTER.IT ; PRINT MSG
*0374       MSG = "for free help "
*0375       GOSUB CENTER.IT ; PRINT MSG
*0376       CENTERIT = TRUE
*0377       GOSUB DISPLAY.VENDOR.CONTACT.INFO
*0378       CRT ; CRT
*0379       RETURN
*0380 *
*0381 ENVIRONMENT.INFO:
*0382       MAX.C.LINE = 22
*0383       PRINT 'Environmental variable' ; C.LINE = 1
*0384 *
*0385       DO.RETURN = FALSE
*0386       C.OFFSET = 7 ; GOSUB TEST.PAGE ; IF DO.RETURN THEN RETURN
*0387       PRINT SPACE(5):'File variables'
*0388       PRINT SPACE(10):'Stack file ''L#35':weSTACK.FILE
*0389       PRINT SPACE(10):'Control file ''L#35':eCONTROL.FILE
*0390       PRINT SPACE(10):'Include file ''L#35':gCODE.INCLUDES
*0391       PRINT SPACE(10):'Main program file ''L#35':wePROGRAM.FILE
*0392       PRINT SPACE(10):'Version registry ''L#35':gVERSION.REGISTRY
*0393       PRINT SPACE(10):'Code mnemonic control file ''L#35':gCODE.CONTRO
*     L
*0394 *
*0395       C.OFFSET = S.STACKS+1 ; GOSUB TEST.PAGE ; IF DO.RETURN THEN RETU
*     RN
*0396       PRINT SPACE(5):'Stack file records'
*0397       FOR I.STACKS = 1 TO S.STACKS
*0398          PRINT SPACE(10):N.STACKS<I.STACKS>'L#35':K.STACKS<I.STACKS>

*0399       NEXT I.STACKS
*0400 *
*0401       C.OFFSET = 3 ; GOSUB TEST.PAGE ; IF DO.RETURN THEN RETURN
*0402       PRINT SPACE(5):'Flag variables'
*0403       PRINT SPACE(10):'Test mode ''L#35':
*0404       IF gTEST.LEVEL = TRUE THEN PRINT "TRUE" ELSE PRINT "FALSE"
*0405       PRINT SPACE(10):'Registry checking ''L#35':
*0406       IF gREG.CHK = TRUE THEN PRINT "TRUE" ELSE PRINT "FALSE"
*0407       PRINT SPACE(10):'Error control ''L#35':gERROR.MODE
*0408 *
*0409       C.OFFSET = 6 ; GOSUB TEST.PAGE ; IF DO.RETURN THEN RETURN
*0410       PRINT SPACE(5):'Program variables'
*0411       PRINT SPACE(10):'Program control file key ''L#35':peK.CONTROL
*0412       PRINT SPACE(10):'Program ''L#35':K.PROGRAM
*0413       PRINT SPACE(10):'Program Vendor ''L#35':K.VENDOR
*0414       PRINT SPACE(10):'Program Author ''L#35':PROGRAM.REC(V.PROGRAM.AU
*     THOR)
*0415       PRINT SPACE(10):'Program Admin ''L#35':PROGRAM.REC(V.PROGRAM.ADM
*     IN)
*0416 *
*0417       C.OFFSET = 4
*0418       IF INSTALL.REC(V.INSTALL.OCONTACT) # '' THEN
*0419          C.OFFSET = C.OFFSET + 3
*0420       END
*0421       IF INSTALL.REC(V.INSTALL.ADMIN) # '' THEN C.OFFSET = C.OFFSET + 
*     1
*0422       GOSUB TEST.PAGE ; IF DO.RETURN THEN RETURN
*0423       PRINT SPACE(5):'Install variables'
*0424       PRINT SPACE(10):'Program install control file key ''L#35':ieK.CO
*     NTROL
*0425       IF INSTALL.REC(V.INSTALL.OCONTACT) # '' THEN
*0426          PRINT SPACE(10):'Program Install Contact ''L#35':INSTALL.REC(
*     V.INSTALL.OCONTACT)
*0427          PRINT SPACE(10):"Program Install Contact's Phone "'L#35':
*0428          PRINT INSTALL.REC(V.INSTALL.OVPHONE)"L((###) ###-####)"
*0429          PRINT SPACE(10):"Program Install Contact's E-mail "'L#35':INS
*     TALL.REC(V.INSTALL.OEMAIL)
*0430       END
*0431       PRINT SPACE(10):'Program Install Date ''L#35':
*0432       PRINT OCONV(INSTALL.REC(V.INSTALL.INSTALLDATE),'D4-')
*0433       PRINT SPACE(10):'Program Install Expiration Date ''L#35':
*0434       PRINT OCONV(INSTALL.REC(V.INSTALL.EXPIREDATE),'D4-')
*0435       IF INSTALL.REC(V.INSTALL.ADMIN) # '' THEN
*0436          PRINT SPACE(10):'Install Admin ''L#35':INSTALL.REC(V.INSTALL.
*     ADMIN)
*0437       END
*0438 *
*0439       C.OFFSET = 9
*0440       IF VENDOR.REC(V.VENDOR.ADDR2) # '' THEN C.OFFSET = C.OFFSET + 1
*0441       IF VENDOR.REC(V.VENDOR.WEBURL) # '' THEN C.OFFSET = C.OFFSET + 1
*0442       GOSUB TEST.PAGE ; IF DO.RETURN THEN RETURN
*0443       PRINT SPACE(5):'Vendor variables'
*0444       PRINT SPACE(10):'Vendor control file key ''L#35':veK.CONTROL
*0445       PRINT SPACE(10):'Vendor Name ''L#35':VENDOR.REC(V.VENDOR.NAME)
*0446       PRINT SPACE(10):'Vendor Contact ''L#35':VENDOR.REC(V.VENDOR.CONT
*     ACT)
*0447       PRINT SPACE(10):'Vendor Address ''L#35':VENDOR.REC(V.VENDOR.ADDR
*     1)
*0448       IF VENDOR.REC(V.VENDOR.ADDR2) # '' THEN
*0449          PRINT SPACE(10):SPACE(35):VENDOR.REC(V.VENDOR.ADDR2)
*0450       END
*0451       PRINT SPACE(10):SPACE(35):VENDOR.REC(V.VENDOR.CITY):", ":
*0452       PRINT VENDOR.REC(V.VENDOR.STATE):" ":VENDOR.REC(V.VENDOR.ZIP)
*0453       PRINT SPACE(10):'Vendor Phone ''L#35':
*0454       PRINT VENDOR.REC(V.VENDOR.VPHONE1)"L((###) ###-####)"
*0455       PRINT SPACE(10):'Vendor Fax ''L#35':
*0456       PRINT VENDOR.REC(V.VENDOR.FAX)"L((###) ###-####)"
*0457       PRINT SPACE(10):'Vendor E-mail ''L#35':VENDOR.REC(V.VENDOR.EMAIL
*     )
*0458       IF VENDOR.REC(V.VENDOR.WEBURL) # '' THEN
*0459          PRINT SPACE(10):'Vendor WEB URL ''L#35'
*0460          PRINT SPACE(15):VENDOR.REC(V.VENDOR.WEBURL)
*0461       END
*0462 *
*0463       C.OFFSET = 9
*0464       IF CLIENT.REC(V.CLIENT.ADDR2) # '' THEN C.OFFSET = C.OFFSET + 1
*0465       IF CLIENT.REC(V.CLIENT.WEBURL) # '' THEN C.OFFSET = C.OFFSET + 1
*0466       GOSUB TEST.PAGE ; IF DO.RETURN THEN RETURN
*0467       PRINT SPACE(5):'Client variables'
*0468       PRINT SPACE(10):'Client control file key ''L#35':ceK.CONTROL
*0469       PRINT SPACE(10):'Client ''L#35':K.CLIENT
*0470       PRINT SPACE(10):'Client Name ''L#35':CLIENT.REC(V.CLIENT.NAME)'L
*     #30'
*0471       PRINT SPACE(10):'Client Contact ''L#35':CLIENT.REC(V.CLIENT.CONT
*     ACT)
*0472       PRINT SPACE(10):'Client Address ''L#35':CLIENT.REC(V.CLIENT.ADDR
*     1)
*0473       IF CLIENT.REC(V.CLIENT.ADDR2) # '' THEN
*0474          PRINT SPACE(10):SPACE(35):CLIENT.REC(V.CLIENT.ADDR2)
*0475       END
*0476       PRINT SPACE(10):SPACE(35):CLIENT.REC(V.CLIENT.CITY):", ":
*0477       PRINT CLIENT.REC(V.CLIENT.STATE):" ":CLIENT.REC(V.CLIENT.ZIP)
*0478       PRINT SPACE(10):'Client Phone ''L#35':
*0479       PRINT CLIENT.REC(V.CLIENT.VPHONE1)"L((###) ###-####)"
*0480       PRINT SPACE(10):'Client E-mail ''L#35':CLIENT.REC(V.CLIENT.EMAIL
*     )
*0481       IF CLIENT.REC(V.CLIENT.WEBURL) # '' THEN
*0482          PRINT SPACE(10):'Client WEB URL ''L#35'
*0483          PRINT SPACE(15):CLIENT.REC(V.CLIENT.WEBURL)
*0484       END
*0485 *
*0486       C.OFFSET = 6 ; GOSUB TEST.PAGE ; IF DO.RETURN THEN RETURN
*0487       PRINT SPACE(5):'Machine variables'
*0488       PRINT SPACE(10):'Machine control file key ''L#35':mK.CONTROL
*0489       PRINT SPACE(10):'Machine OS ''L#35':MACHINE.OS
*0490       PRINT SPACE(10):'Machine database ''L#35':MACHINE.DATABASE
*0491       PRINT SPACE(10):'Machine sentence form ''L#35':MACHINE.SENTENCE
*0492       PRINT SPACE(10):'Machine sentence seperator ASCII ''L#35':MACHIN
*     E.SENT.SEP
*0493 *
*0494       S.COMPONENTS = DCOUNT(COMPONENTS,AM)
*0495       C.OFFSET = S.COMPONENTS ; GOSUB TEST.PAGE ; IF DO.RETURN THEN RE
*     TURN
*0496       PRINT SPACE(5):'Components'
*0497       FOR I.COMPONENTS = 1 TO S.COMPONENTS
*0498          PRINT SPACE(10):COMPONENTS<I.COMPONENTS>
*0499       NEXT I.COMPONENTS
*0500       GOSUB PAGE.IT ; IF ANS = 'Q' THEN RETURN
*0501       RETURN
*0502 *
*0503 TEST.PAGE:
*0504       C.LINE = C.LINE + C.OFFSET
*0505       IF C.LINE > MAX.C.LINE THEN
*0506          GOSUB PAGE.IT ; IF ANS = 'Q' THEN DO.RETURN = TRUE
*0507          C.LINE = C.OFFSET
*0508       END
*0509       RETURN
*0510 *
*0511 PAGE.IT:
*0512       CRT 'Hit any key to continue...':
*0513 $INCLUDE CODE.INCLUDES CHAR.INPUT
*0514       CRT
*0515       C.LINE = 0
*0516       RETURN
*0517 *
*0518 READ.STACKS:
*0519       READ WS.OPTIONS FROM weF.STACK.FILE,K.PROGRAM:'!':USER.ID ELSE
*0520          WS.OPTIONS = ''
*0521       END
*0522       IF WS.OPTIONS<1> = '' THEN
*0523          N.STACKS = "PROG":AM:"DATA":AM:"TCL":AM:"TODO":AM:"CONTACTS":
*     AM:"HOSTPATHS":AM:"DELETED":AM:"CONTROLS"
*0524       END ELSE
*0525          N.STACKS = WS.OPTIONS<1>
*0526          CONVERT VM TO AM IN N.STACKS
*0527       END
*0528       IF HAS.INSTALLER THEN
*0529          LOCATE("INSTALLER",N.STACKS;W.STACK) ELSE N.STACKS<-1> = "INS
*     TALLER"
*0530       END
*0531       S.STACKS = DCOUNT(N.STACKS,AM)     ; * SAME AS LAST STACK NUMBER
*0532       IF S.STACKS > 20 THEN
*0533          PRINT 'Error in stack sizing logic.'
*0534          PRINT 'Size of stack array is 20'
*0535          PRINT 'Size of stack names array is ':DCOUNT(N.STACKS,AM)
*0536          STOP
*0537       END
*0538 *
*0539       FIRST.TIME = TRUE
*0540       K.STACKS = ''
*0541       FOR I.STACKS = 1 TO S.STACKS
*0542          K.STACK = K.PROGRAM:N.STACKS<I.STACKS>:'!':USER.ID
*0543          K.STACKS<I.STACKS> = K.STACK
*0544          READ STACK(I.STACKS) FROM weF.STACK.FILE,K.STACK THEN
*0545             IF N.STACKS<I.STACKS> = 'CONTACTS' THEN
*0546                IF STACK(I.STACKS) # '' AND STACK(I.STACKS) # 'FFT' THE
*     N FIRST.TIME = FALSE
*0547             END ELSE
*0548                IF STACK(I.STACKS) # '' THEN FIRST.TIME = FALSE
*0549             END
*0550          END ELSE STACK(I.STACKS) = ''
*0551       NEXT I.STACKS
*0552       RETURN
*0553 *
*0554 WRITE.STACKS:
*0555       FOR I.STACKS = 1 TO S.STACKS
*0556          K.STACK = K.STACKS<I.STACKS>
*0557          WRITE STACK(I.STACKS) ON weF.STACK.FILE,K.STACK
*0558       NEXT I.STACKS
*0559       TEMP = N.STACKS
*0560       CONVERT AM TO VM IN TEMP
*0561       WS.OPTIONS<1> = TEMP
*0562       WRITE WS.OPTIONS ON weF.STACK.FILE,K.PROGRAM:'!':USER.ID
*0563       RETURN
*0564 *
*0565 HELP:
*0566       GOSUB VERSION.INFO
*0567       CRT 'Hit any key...':
*0568 $INCLUDE CODE.INCLUDES CHAR.INPUT
*0569       CRT @(-1):
*0570       CRT 'FUNCTIONS THAT ACT TO MANIPULATE THE STACK ENTRIES'
*0571       CRT
*0572       CRT ' in the below text # means a numeric entry, thus L3 or D2 f
*     or example'
*0573       CRT ' {#} means the number is optional'
*0574       CRT
*0575       CRT '.Astr''L#7':' append str to end of stack item 1'
*0576       CRT '.C{#}/oldstr/newstr{/G}'
*0577       CRT ' ''L#7':' change oldstr to newstr in line # or line 1 if # 
*     not present'
*0578       CRT ' ''L#7':' G global flag if present, means change all occurr
*     ences'
*0579       CRT '.D{#}''L#7':' delete stack item # or 1 if # not specified'
*0580       CRT '.D#-#''L#7':' delete stack items # through #'
*0581       CRT '.E''L#7':' edit current stack using system editor'
*0582       CRT '.G#''L#7':' to retrieve a stack item from position # to pos
*     ition 1'
*0583       CRT '.I''L#7':' to insert a stack item in position 1'
*0584       CRT '.L{#}''L#7':' to list # stack items or 18 if # not specifie
*     d'
*0585       CRT '.S{#}''L#7':' switch to an alternate stack by stack number'
*0586       CRT ' ''L#7':' will switch to the next stack if # is not specifi
*     ed'
*0587       CRT '.Sstr''L#7':' switch to an alternate stack by stack name'
*0588       CRT SPACE(8): ; GOSUB DISPLAY.STACK.NAMES ; CRT
*0589       CRT '.X{#}''L#7':' execute stack item #'
*0590       CRT 'Hit any key...':
*0591 $INCLUDE CODE.INCLUDES CHAR.INPUT
*0592       CRT @(-1):
*0593       CRT 'FUNCTIONS THAT ARE ONLY RELEVANT FOR THE CURRENT STACK (':N
*     .STACKS<W.STACK>:')'
*0594       CRT
*0595       GOSUB DISPLAY.STACK.DEPENDENT.HELP
*0596       CRT 'Hit any key...':
*0597 $INCLUDE CODE.INCLUDES CHAR.INPUT
*0598       CRT @(-1):
*0599       CRT 'FUNCTIONS THAT REVEAL STACK SYSTEM ENVIRONMENTAL INFORMATIO
*     N'
*0600       CRT
*0601       CRT '/M''L#7':' show list of mods made today (or some other part
*     icular day)'
*0602       CRT '/V''L#7':' show version info for this stack'
*0603       CRT '/Z''L#7':' show environmental variable settings for this st
*     ack'
*0604       CRT
*0605       CRT 'SPECIAL FUNCTIONS AND RESERVED WORDS'
*0606       CRT '?''L#7':' show help on the shell'
*0607       CRT 'HELP''L#7':' show help on the shell and the system'
*0608       CRT 'TUTOR''L#7':' turn on the TUTOR'
*0609       CRT 'UPGRADE''L#7':' show how to upgrade the shell'
*0610       RETURN
*0611 *
*0612 DISPLAY.STACK.NAMES:
*0613       FOR I.STACKS = 1 TO S.STACKS
*0614          PRINT I.STACKS:"=":N.STACKS<I.STACKS>:" ":
*0615       NEXT I.STACKS
*0616       RETURN
*0617 *
*0618 MAJOR.HELP:
*0619       CRT 'What area would you like help on?'
*0620       CRT 'S This shell' ; CMDLIST = 'S'
*0621       IF MACHINE.DATABASE = "UNIVERSE" THEN
*0622          CRT 'UB A Universe BASIC statement'
*0623          CRT 'UT A Universe TCL statement'
*0624          CMDLIST = CMDLIST:AM:'UB':AM:'UT'
*0625       END
*0626       IF MACHINE.OS = "UNIX" THEN
*0627          CRT 'UX A Unix command'
*0628          CMDLIST = CMDLIST:AM:'UX'
*0629       END
*0630       CRT ; CRT 'Enter selection ': ; INPUT HELP.SEL
*0631       LOCATE(HELP.SEL,CMDLIST;W.CMD) THEN
*0632          BEGIN CASE
*0633             CASE HELP.SEL = 'S' ; GOSUB HELP
*0634             CASE HELP.SEL = 'UB' ; GOSUB UB.HELP
*0635             CASE HELP.SEL = 'UT' ; GOSUB UT.HELP
*0636             CASE HELP.SEL = 'UX' ; GOSUB UNIX.HELP
*0637          END CASE
*0638       END ELSE
*0639          PRINT 'No such help available.'
*0640          S.CMDLIST = DCOUNT(CMDLIST,AM) ; O.CMDLIST = CMDLIST<1>
*0641          FOR I.CMDLIST = 2 TO S.CMDLIST
*0642             O.CMDLIST = O.CMDLIST:', ':CMDLIST<I.CMDLIST>

*0643          NEXT I.CMDLIST
*0644          PRINT 'Must be one of ':O.CMDLIST:'.'
*0645       END
*0646       RETURN
*0647 *
*0648 UB.HELP:
*0649       CRT 'Enter the BASIC word you want help on ': ; INPUT BASIC.WORD
*0650       EXECUTE "HELP BASIC ":BASIC.WORD
*0651       RETURN
*0652 *
*0653 UT.HELP:
*0654       CRT 'Enter the TCL word you want help on ': ; INPUT TCL.WORD
*0655       EXECUTE "HELP ":TCL.WORD
*0656       RETURN
*0657 *
*0658 UNIX.HELP:
*0659       CRT 'Enter the Unix word you want help on ': ; INPUT UNIX.WORD
*0660       EXECUTE "SH -c 'man ":UNIX.WORD:"'"
*0661       RETURN
*0662 *
*0663 EXECUTE.CMD:
*0664       HOLD.W.STACK = W.STACK
*0665       LOCATE("TCL",N.STACKS;W.STACK) THEN
*0666          STACK(W.STACK) = INSERT(STACK(W.STACK),1;CMD)
*0667          W.STACK = HOLD.W.STACK
*0668       END
*0669       IF LIST.ON THEN
*0670          O.LINE = CMD
*0671          IF MACHINE.DATABASE = 'UNIVERSE' THEN
*0672             CALL EXECUTE(MACHINE.DATABASE,O.LINE,'SO':VM:'SS','','',''
*     ,'','')
*0673          END ELSE
*0674             CALL EXECUTE(MACHINE.DATABASE,O.LINE,'SS','','','','','')
*0675          END
*0676       END ELSE
*0677          O.LINE = CMD
*0678          CALL EXECUTE(MACHINE.DATABASE,O.LINE,'SS','','','','','')
*0679       END
*0680       BEGIN CASE
*0681          CASE SYSTEM(11)
*0682             LIST.ON = TRUE
*0683             IF MACHINE.DATABASE = "UNIVERSE" THEN
*0684 *               CALL ASSIGN.DEFAULTLIST.TO.VAR(MYLIST1)
*0685             END
*0686          CASE 1 ; LIST.ON = FALSE
*0687       END CASE
*0688       GOSUB WRITE.STACKS
*0689       RETURN
*0690 *
*0691 ARCHIVE.PROGRAM:
*0692       LOCATE(T.FILE,PROGRAM.FILES;W.FILE) THEN
*0693          TODAY = DATE()
*0694          THIS.YEAR = OCONV(TODAY,'D2Y')"R%2"
*0695          THIS.MONTH = OCONV(TODAY,'DM')"R%2"
*0696          THIS.DAY = OCONV(TODAY,'DD')"R%2"
*0697          THIS.DATE = THIS.YEAR:THIS.MONTH:THIS.DAY
*0698          MYLINE = "COPY ":STACK(W.STACK)<1>
*0699          MYDATA = "(":T.FILE:".OLD ":T.ITEM:".":THIS.DATE
*0700          PRINT MYLINE:" TO ":MYDATA
*0701          O.LINE = MYLINE
*0702          O.DATA = MYDATA
*0703          CLAUSES = 'DI'
*0704          CALL EXECUTE(MACHINE.DATABASE,O.LINE,CLAUSES,'','',O.DATA,'',
*     '')
*0705       END ELSE
*0706          CRT 'You can only archive an item that is in one of the ':
*0707          CRT 'files ':
*0708          S.PROGRAM.FILES = DCOUNT(PROGRAM.FILES,AM)
*0709          PRINT PROGRAM.FILES<1>:
*0710          FOR I.PROGRAM.FILES = 2 TO S.PROGRAM.FILES
*0711             PRINT ", ":PROGRAM.FILES<I.PROGRAM.FILES>:
*0712          NEXT I.PROGRAM.FILES
*0713          PRINT
*0714       END
*0715       RETURN
*0716 *
*0717 BASIC.PROGRAM:
*0718       MYLINE = "BASIC ":STACK(W.STACK)<1>
*0719       EXECUTE MYLINE
*0720       IF T.STACK = WHOAMI.VERS OR T.STACK = WHOAMI.COM OR T.STACK = WH
*     OAMI.NEWCOM THEN
*0721          CRT 'Chain to new version of ':K.PROGRAM:'? (Y/N) ': ; INPUT 
*     CHAIN.IT
*0722          IF CHAIN.IT = 'Y' THEN GOSUB WRITE.STACKS ; CHAIN CHAIN.ME
*0723       END
*0724       RETURN
*0725 *
*0726 BCOMPARE.PROGRAM:
*0727       IF weDEV.ACCOUNT # weQA.ACCOUNT AND weQA.ACCOUNT # weLIVE.ACCOUN
*     T THEN
*0728          ACCOUNTS = weDEV.ACCOUNT:AM:weQA.ACCOUNT:AM:weLIVE.ACCOUNT
*0729          LOCATE(ACCOUNT,ACCOUNTS;W.WHO) THEN
*0730             ACCOUNTS = DELETE(ACCOUNTS,W.WHO)
*0731          END
*0732          CRT 'Select account to compare to:'
*0733          CRT '1 ':ACCOUNTS<1>
*0734          CRT '2 ':ACCOUNTS<2>
*0735          CRT 'Q QUIT'
*0736          CRT
*0737          CRT 'Enter selection ': ; INPUT SEL
*0738          IF SEL = 'Q' OR SEL = '' THEN RETURN
*0739          IF SEL # 1 AND SEL # 2 THEN
*0740             CRT 'INVALID' ; GOTO BCOMPARE.PROGRAM
*0741          END
*0742          COMP.ACCOUNT = ACCOUNTS<SEL>
*0743       END ELSE
*0744          ACCOUNTS = ''
*0745          LOCATE(weDEV.ACCOUNT,ACCOUNTS;W.ACCT) ELSE
*0746             ACCOUNTS = INSERT(ACCOUNTS,-1;weDEV.ACCOUNT)
*0747          END
*0748          LOCATE(weQA.ACCOUNT,ACCOUNTS;W.ACCT) ELSE
*0749             ACCOUNTS = INSERT(ACCOUNTS,-1;weQA.ACCOUNT)
*0750          END
*0751          LOCATE(weLIVE.ACCOUNT,ACCOUNTS;W.ACCT) ELSE
*0752             ACCOUNTS = INSERT(ACCOUNTS,-1;weLIVE.ACCOUNT)
*0753          END
*0754          LOCATE(ACCOUNT,ACCOUNTS;W.ACCOUNT) THEN
*0755             ACCOUNTS = DELETE(ACCOUNTS,W.ACCOUNT)
*0756          END
*0757          COMP.ACCOUNT = ACCOUNTS
*0758       END
*0759       Q.NAME = T.FILE:"!":COMP.ACCOUNT
*0760       R.VERBS = 'Q':AM:COMP.ACCOUNT:AM:T.FILE
*0761       WRITE R.VERBS ON mF.VERBS,Q.NAME
*0762       MYLINE = "BCOMPARE ":T.FILE:" ":T.ITEM
*0763       MYDATA = "(":T.FILE:"!":COMP.ACCOUNT:" ":T.ITEM
*0764       EXECUTE MYLINE,//IN. < MYDATA
*0765       RETURN
*0766 *
*0767 CATALOG.PROGRAM:
*0768       MYLINE = "CATALOG ":STACK(W.STACK)<1>
*0769       IF MACHINE.DATABASE = "UNIVERSE" AND SYSTEM(1001) = 1 THEN      
*      ; * IDEAL
*0770          MYLINE = MYLINE:" LOCAL"
*0771       END
*0772       EXECUTE MYLINE
*0773       RETURN
*0774 *
*0775 SHOW.CONTROLS:
*0776 * Allow controls to be known under a different (shorter?) name
*0777 * Here's how it works, if the program has a VERSION HOLDER tag than th
*     at's
*0778 * where the INSTALL CONTROL tag will be. If it doesn't than check if i
*0779 * itself has an INSTALL CONTROL tag. If it doesn't then the K.PROGRAMi
*     s the
*0780 * program name less the VERS tag on its name.
*0781       HOLD.K.PROGRAM = K.PROGRAM ; K.PROGRAM = T.ITEM
*0782       HOLD.COMPONENTS = COMPONENTS ; COMPONENTS = ''
*0783       OPEN T.FILE TO TEMP THEN
*0784          READ TARGET FROM TEMP,K.PROGRAM THEN
*0785             LOCATE('*!*! VERSION HOLDER',TARGET;W.TARGET) THEN
*0786                K.PROGRAM = TRIM(TARGET<W.TARGET+1>[6,99])
*0787                READ TARGET FROM TEMP,K.PROGRAM ELSE
*0788                   PRINT "Can't read the tag location ":K.PROGRAM:
*0789                   PRINT " from file ":T.FILE ; RETURN
*0790                END
*0791             END
*0792             LOCATE('*!*! INSTALL CONTROL',TARGET;W.TARGET) THEN
*0793                K.PROGRAM = TRIM(TARGET<W.TARGET+1>[6,99])
*0794             END ELSE
*0795                C.PROGRAM = INDEX(K.PROGRAM,"#VERS",1)
*0796                IF C.PROGRAM THEN K.PROGRAM = K.PROGRAM[1,C.PROGRAM-1]
*0797             END
*0798          END ELSE
*0799             PRINT "Can't read the tag location ":K.PROGRAM:
*0800             PRINT " from file ":T.FILE ; RETURN
*0801          END
*0802       END ELSE
*0803          PRINT "Can't open the file ":T.FILE ; RETURN
*0804       END
*0805       COMPONENTS = gCODE.INCLUDES:' GLOBAL':AM:gCODE.INCLUDES:' ENVIRO
*     NMENT'
*0806       RETURNTOME = TRUE ; GOSUB GET.MY.CONTROLS
*0807       IF ERROR = '' THEN DISPLAY.IT = 'Y' ELSE
*0808          PRINT ERROR ; PRINT 'Display info anyway (Y/N) ': ; INPUT DIS
*     PLAY.IT
*0809       END
*0810       IF DISPLAY.IT = 'Y' THEN GOSUB ENVIRONMENT.INFO
*0811       K.PROGRAM = HOLD.K.PROGRAM ; COMPONENTS = HOLD.COMPONENTS
*0812       RETURNTOME = TRUE ; GOSUB GET.MY.CONTROLS
*0813       RETURN
*0814 *
*0815 FORMAT.PROGRAM:
*0816       MYLINE = "FFTFORMAT ":STACK(W.STACK)<1>
*0817       EXECUTE MYLINE
*0818       RETURN
*0819 *
*0820 MAKELIVE.PROGRAM:
*0821       MYLINE = "FFTMAKELIVE ":STACK(W.STACK)<1>
*0822       EXECUTE MYLINE
*0823       RETURN
*0824 *
*0825 SHOW.MODS:
*0826       PRINT 'Hit return to show names of programs modified today'
*0827       PRINT 'Or enter alternate date (today is ':OCONV(DATE(),'D2-'):'
*     ) ':
*0828       INPUT T.DATE
*0829       IF T.DATE = '' THEN T.DATE = DATE() ELSE T.DATE = ICONV(T.DATE,'
*     D2-')
*0830       K.CONTROL = "MODS*":T.DATE
*0831       READ R.CONTROL FROM eF.CONTROL,K.CONTROL ELSE R.CONTROL = ""
*0832       IF R.CONTROL = "" THEN
*0833          PRINT ; PRINT "NO MODIFICATIONS DONE ":
*0834          IF T.DATE = DATE() THEN PRINT "TODAY!" ELSE
*0835             PRINT "ON ":OCONV(T.DATE,'D2-')
*0836          END
*0837       END ELSE
*0838          K2.CONTROL = "MOD*DETAILS*":T.DATE
*0839          READ R2.CONTROL FROM eF.CONTROL,K2.CONTROL ELSE R2.CONTROL = 
*     ""
*0840          PRINT ; PRINT "MODIFICATIONS DONE TODAY"
*0841          S.CONTROL = DCOUNT(R.CONTROL,AM)
*0842          FOR I.CONTROL = 1 TO S.CONTROL
*0843             T.CONTROL = R.CONTROL<I.CONTROL>
*0844             PRINT SPACE(5):T.CONTROL[1,30]"L#30":
*0845             IF LEN(T.CONTROL) > 30 THEN PRINT '+': ELSE PRINT ' ':
*0846             LOCATE(T.CONTROL,R2.CONTROL,1;W2.CONTROL) THEN
*0847                T2.CONTROL = R2.CONTROL<W2.CONTROL+1>

*0848                IF T2.CONTROL<1,1> = T.CONTROL THEN
*0849                   IF T2.CONTROL<1,2> = '' THEN PRINT SPACE(12): ELSE
*0850                      PRINT " VERS ":T2.CONTROL<1,2>"L#5":' ':
*0851                   END
*0852                   IF T2.CONTROL<1,3> = '' THEN PRINT SPACE(9): ELSE
*0853                      PRINT OCONV(T2.CONTROL<1,3>,'D2-'):' ':
*0854                   END
*0855                   IF T2.CONTROL<1,4> = '' THEN PRINT SPACE(9): ELSE
*0856                      PRINT OCONV(T2.CONTROL<1,4>,'MTS'):
*0857                   END
*0858                   PRINT
*0859                END ELSE PRINT 'MOD*DETAILS CONTROL ITEM OUT-OF-SYNC!'
*0860             END ELSE PRINT
*0861          NEXT I.R.CONTROL
*0862       END
*0863       PRINT
*0864       RETURN
*0865 *
*0866 OUTPUT.PROGRAM:
*0867       T.STACK = STACK(W.STACK)<1>
*0868       T.FILE = FIELD(T.STACK,' ',1) ; T.ITEM = FIELD(T.STACK,' ',2)
*0869       CRT 'Mode F=File, P=Printer, S=Screen, E=E-mail ': ; INPUT MODE
*0870       BEGIN CASE
*0871          CASE MODE = 'F' ; GOSUB OUTPUT.PROGRAM.TO.FILE
*0872          CASE MODE = 'P' ; GOSUB OUTPUT.PROGRAM.TO.PRINTER
*0873          CASE MODE = 'S' ; GOSUB OUTPUT.PROGRAM.TO.SCREEN
*0874          CASE MODE = 'E' ; GOSUB OUTPUT.PROGRAM.TO.EMAIL
*0875       END CASE
*0876       RETURN
*0877 *
*0878 OUTPUT.PROGRAM.TO.FILE:
*0879       PRINT "Output to PICK file, or Host file (DOS, UNIX, etc.) (P/H)
*     ": ; 
*0880       INPUT FILE.DEST
*0881       BEGIN CASE
*0882          CASE FILE.DEST = "P" ; GOSUB OUTPUT.PROGRAM.TO.PICKFILE
*0883          CASE FILE.DEST = "H" ; GOSUB OUTPUT.PROGRAM.TO.HOSTFILE
*0884       END CASE
*0885       RETURN
*0886 *
*0887 OUTPUT.PROGRAM.TO.PICKFILE:
*0888       CRT 'Not yet functional. Hit any key...':
*0889 $INCLUDE CODE.INCLUDES CHAR.INPUT
*0890       CRT
*0891       RETURN
*0892 *
*0893 OUTPUT.PROGRAM.TO.HOSTFILE:
*0894       CRT 'Type L to list your hostpaths, B to browse '
*0895       CRT 'O to type in some other hostpath, ':
*0896       HOLD.W.STACK = W.STACK
*0897       LOCATE("HOSTPATHS",N.STACKS;W.STACK) THEN
*0898          FIRST.HOSTPATH = STACK(W.STACK)<1>
*0899          IF FIRST.HOSTPATH = '' THEN CRT ELSE
*0900             CRT 'Or Y to send to the path shown' ; 
*0901             CRT FIRST.HOSTPATH
*0902          END
*0903          W.STACK = HOLD.W.STACK
*0904       END ELSE CRT ; FIRST.HOSTPATH = ''
*0905       DOIT = FALSE
*0906       CRT 'Input command ': ; INPUT MODE2
*0907       BEGIN CASE
*0908          CASE MODE2 = 'Y' ; PATH = FIRST.HOSTPATH ; DOIT = TRUE
*0909          CASE MODE2 = 'L'
*0910             CMD = ".L9999" ; HOLD.W.STACK = W.STACK
*0911             LOCATE("HOSTPATHS",N.STACKS;W.STACK) THEN
*0912                GOSUB LIST.CMD ; W.STACK = HOLD.W.STACK
*0913             END
*0914          CASE MODE2 = 'B'
*0915             PATH = '' ; CALL BROWSER(PATH,COMPONENTS,MODE,RESULTS,ERRO
*     R)
*0916             IF ERROR = '' THEN DOIT = TRUE ELSE PRINT ERROR
*0917          CASE MODE2 = 'O' ; PRINT 'Enter full path ': ; INPUT PATH ; D
*     OIT = TRUE
*0918       END CASE
*0919       IF DOIT THEN
*0920          LINE = eTOHOSTPATH.VERB:' ':T.STACK:' ':PATH
*0921          CALL WINDOWS.TRANSLATE.PUNCTUATION(T.FILE,ERROR)
*0922          IF ERROR # '' THEN PRINT ERROR ; RETURN
*0923          CALL WINDOWS.TRANSLATE.PUNCTUATION(T.ITEM,ERROR)
*0924          IF ERROR # '' THEN PRINT ERROR ; RETURN
*0925          IF LINE"R#1" # HOSTPATH.DELIM THEN LINE = LINE:HOSTPATH.DELIM
*0926          LINE = LINE:T.FILE:HOSTPATH.DELIM:T.ITEM:'.TXT'
*0927          PRINT LINE
*0928          CALL EXECUTE(MACHINE.DATABASE,LINE,'','','','','','')
*0929       END
*0930       RETURN
*0931 *
*0932 OUTPUT.PROGRAM.TO.PRINTER:
*0933       CRT 'Not yet functional. Hit any key...':
*0934 $INCLUDE CODE.INCLUDES CHAR.INPUT
*0935       CRT
*0936       RETURN
*0937 *
*0938 OUTPUT.PROGRAM.TO.SCREEN:
*0939       CRT 'Not yet functional. Hit any key...':
*0940 $INCLUDE CODE.INCLUDES CHAR.INPUT
*0941       CRT
*0942       RETURN
*0943 *
*0944 OUTPUT.PROGRAM.TO.EMAIL:
*0945       CRT 'Type L to list your contacts,':
*0946       CRT ' GL to list all contacts globally'
*0947       CRT 'O to type in some other email address, ':
*0948       CRT 'Or Y to send to the contact shown'
*0949       HOLD.W.STACK = W.STACK
*0950       LOCATE("CONTACTS",N.STACKS;W.STACK) THEN
*0951          FIRST.CONTACT = STACK(W.STACK)<1>
*0952          W.STACK = HOLD.W.STACK
*0953       END ELSE FIRST.CONTACT = "FFT"
*0954       K.CONTROL = "CONTACT*":FIRST.CONTACT
*0955       MATREAD CONTACT.REC FROM eF.CONTROL,K.CONTROL THEN
*0956          CRT CONTACT.REC(V.CONTACT.COMPANYNAME):' ':
*0957          CRT CONTACT.REC(V.CONTACT.CONTACT):' ':
*0958          CRT CONTACT.REC(V.CONTACT.EMAIL)
*0959       END
*0960       CRT 'Input command ': ; INPUT MODE2
*0961       BEGIN CASE
*0962          CASE MODE2 = 'Y'
*0963             LINE = eSENDMAIL.VERB:' ':T.STACK
*0964             LINE2 = CONTACT.REC(V.CONTACT.EMAIL)
*0965             PRINT LINE ; PRINT LINE2
*0966             CALL EXECUTE(MACHINE.DATABASE,LINE,'DI','','',LINE2,'','')
*0967          CASE MODE2 = 'L'
*0968             CMD = ".L9999"
*0969             HOLD.W.STACK = W.STACK
*0970             LOCATE("CONTACTS",N.STACKS;W.STACK) THEN
*0971                GOSUB LIST.CMD
*0972                W.STACK = HOLD.W.STACK
*0973             END
*0974          CASE MODE2 = 'GL'
*0975             EXECUTE "LIST-ITEM ":eCONTROL.FILE:" LIKE CONTACT*..."
*0976             CRT 'Hit any key...':
*0977 $INCLUDE CODE.INCLUDES CHAR.INPUT
*0978             CRT
*0979          CASE MODE2 = 'O'
*0980             PRINT 'Enter E-mail address (xxx@yyy.com) ':
*0981             INPUT EMAIL.ADDR
*0982             LINE = eSENDMAIL.VERB:' ':T.STACK
*0983             LINE2 = EMAIL.ADDR
*0984             PRINT LINE ; PRINT LINE2
*0985             CALL EXECUTE(MACHINE.DATABASE,LINE,'DI','','',LINE2,'','')
*0986       END CASE
*0987       RETURN
*0988 *
*0989 RUN.PROGRAM:
*0990       MYLINE = "RUN ":STACK(W.STACK)<1>
*0991       EXECUTE MYLINE
*0992       RETURN
*0993 *
*0994 EDIT.CMD:
*0995       GOSUB WRITE.STACKS
*0996 * If there are multiple editors, prompt for which one the person wants
*0997       S.EDITORS = DCOUNT(weEDITORS.COM,AM)
*0998       IF S.EDITORS = 1 THEN EDITOR.COM = weEDITORS.COM<1> ELSE
*0999          FOR I.EDITORS = 1 TO S.EDITORS
*1000             PRINT I.EDITORS:" ":weEDITORS.TEXT<I.EDITORS>
*1001          NEXT I.EDITORS
*1002          INPUT SEL
*1003          BEGIN CASE
*1004             CASE NOT(NUM(SEL)) ; SEL = 1
*1005             CASE SEL = '' ; SEL = 1
*1006          END CASE
*1007          EDITOR.COM = weEDITORS.COM<SEL>
*1008       END
*1009 *
*1010 * Now execute the edit command line
*1011       MYLINE = EDITOR.COM:" ":weSTACK.FILE:" ":K.STACKS<W.STACK>

*1012       EXECUTE MYLINE
*1013       GOSUB READ.STACKS
*1014       RETURN
*1015 *
*1016 EDIT.THING:
*1017 *
*1018 * Determine what line the person wants to edit
*1019       VALID = TRUE
*1020       MYSTACK.NUM = CMD[3,LEN(CMD)]
*1021       BEGIN CASE
*1022          CASE MYSTACK.NUM = '' ; MYSTACK.NUM = 1
*1023          CASE NUM(MYSTACK.NUM)
*1024             IF MYSTACK.NUM < 1 OR MYSTACK.NUM > S.STACK THEN
*1025                VALID = FALSE
*1026             END
*1027          CASE 1 ; VALID = FALSE
*1028       END CASE
*1029       IF VALID THEN
*1030          BEGIN CASE
*1031             CASE N.STACKS<W.STACK> = "PROG" ; GOSUB EDIT.PROGRAM
*1032             CASE N.STACKS<W.STACK> = "CONTROLS" ; GOSUB EDIT.CONTROLS
*1033             CASE 1
*1034                CRT 'You cannot use the edit function on the ':
*1035                CRT N.STACKS<W.STACK>:' stack'
*1036          END CASE
*1037       END
*1038       RETURN
*1039 *
*1040 EDIT.PROGRAM:
*1041 *
*1042 * Determine if the person attempting to edit this program has permissi
*     on
*1043       T.STACK = STACK(W.STACK)<MYSTACK.NUM>
*1044       T.FILE = FIELD(T.STACK," ",1) ; T.ITEM = FIELD(T.STACK," ",2)
*1045       IF T.FILE = F.WHOAMI AND T.ITEM = R.WHOAMI.COM THEN    ; * The s
*     hell itself
*1046          PROGRAM.ADMIN = PROGRAM.REC(V.PROGRAM.ADMIN)
*1047          INSTALL.ADMIN = INSTALL.REC(V.INSTALL.ADMIN)
*1048       END ELSE
*1049          READV PROGRAM.ADMIN FROM eF.CONTROL,'PROGRAM*':T.ITEM,V.PROGR
*     AM.ADMIN ELSE
*1050             PROGRAM.ADMIN = ''
*1051          END
*1052          READV INSTALL.ADMIN FROM eF.CONTROL,'INSTALL*':T.ITEM:"*":K.C
*     LIENT,V.INSTALL.ADMIN ELSE
*1053             INSTALL.ADMIN = ''
*1054          END
*1055       END
*1056       IF USER.ID = '' THEN GOSUB EDIT.DENIED ; RETURN ELSE
*1057          IF (PROGRAM.ADMIN # '' OR INSTALL.ADMIN # '') THEN
*1058             IF USER.ID # PROGRAM.ADMIN AND USER.ID # INSTALL.ADMIN THE
*     N
*1059                GOSUB EDIT.DENIED ; RETURN
*1060             END
*1061          END
*1062 *
*1063 * Hold a copy of what the item looked like before the edit command
*1064          GOSUB SET.OLD.SHELL
*1065 *
*1066 * If there are multiple editors, prompt for which one the person wants
*1067          S.EDITORS = DCOUNT(weEDITORS.COM,AM)
*1068          IF S.EDITORS = 1 THEN EDITOR.COM = weEDITORS.COM<1> ELSE
*1069             FOR I.EDITORS = 1 TO S.EDITORS
*1070                PRINT I.EDITORS:" ":weEDITORS.TEXT<I.EDITORS>
*1071             NEXT I.EDITORS
*1072             INPUT SEL
*1073             BEGIN CASE
*1074                CASE NOT(NUM(SEL)) ; SEL = 1
*1075                CASE SEL = '' ; SEL = 1
*1076             END CASE
*1077             EDITOR.COM = weEDITORS.COM<SEL>
*1078          END
*1079 *
*1080 * Now execute the edit command line
*1081          MYLINE = EDITOR.COM:" ":STACK(W.STACK)<MYSTACK.NUM>
*1082          EXECUTE MYLINE
*1083 *
*1084 * Get a copy of what the item looks like now
*1085          GOSUB SET.NEW.SHELL
*1086          IF OLD.ME # NEW.ME THEN
*1087 * If the item has changed, then
*1088 * If the item has auto-version control, then increase the version
*1089 * number by 1 and ask why the change was made so a comment line may be
*1090 * added to the item
*1091             IF UP.VERSION THEN
*1092                GOSUB UP.MY.VERSION
*1093                PRINT 'What was the reason for this modification?'
*1094                INPUT REASON ; GOSUB MAINTAIN.COMMENTS
*1095             END
*1096             GOSUB AUDIT.PROGRAM
*1097             IF T.FILE AND NOT(UP.VERSION) = wePROGRAM.FILE THEN
*1098                GOSUB BASIC.PROGRAM
*1099             END
*1100 * ANY CODE PLACED BELOW HERE WILL not EXECUTE IF YOU ARE SELF-MODIFYIN
*     G
*1101 * AND CHOOSE CHAIN TO NEW VERSION OF WS!!!!!!
*1102          END
*1103          RETURN
*1104 *
*1105 AUDIT.PROGRAM:
*1106 * Determine if the item changed needs to be audited to MODS control
*1107          T.STACK = STACK(W.STACK)<1>
*1108          T.FILE = FIELD(T.STACK,' ',1)
*1109          T.DICTFILE = FIELD(T.FILE,',',1) ; T.DATAFILE = FIELD(T.FILE,
*     ',',2)
*1110          IF T.DATAFILE = '' THEN T.DATAFILE = T.DICTFILE
*1111          T.REGISTRY = FIELD(T.STACK,' ',2)
*1112 *
*1113          C.ITEM = INDEX(T.REGISTRY,'#VERS',1)
*1114          IF C.ITEM THEN T.REGISTRY = T.REGISTRY[1,C.ITEM]
*1115 *
*1116          K.CONTROL = "MODS*":DATE() ; AUDIT.TO.MODS = FALSE
*1117          IF T.DICTFILE = gCODE.INCLUDES THEN
*1118             AUDIT.TO.MODS = TRUE ; K.VERSION.REGISTRY = "INCLUDE*":T.R
*     EGISTRY
*1119             IF T.DICTFILE # T.DATAFILE THEN
*1120                K.VERSION.REGISTRY = K.VERSION.REGISTRY:"*":T.DATAFILE
*1121             END
*1122          END
*1123          IF T.FILE = wePROGRAM.FILE THEN
*1124             AUDIT.TO.MODS = TRUE ; K.VERSION.REGISTRY = T.REGISTRY
*1125          END
*1126          IF AUDIT.TO.MODS THEN
*1127             READU R.CONTROL FROM eF.CONTROL,K.CONTROL ELSE R.CONTROL =
*     ""
*1128             LOCATE(T.STACK,R.CONTROL;W.CONTROL;'AL') ELSE
*1129                R.CONTROL = INSERT(R.CONTROL,W.CONTROL;T.STACK)
*1130             END
*1131             WRITE R.CONTROL ON eF.CONTROL,K.CONTROL
*1132 *
*1133             K.CONTROL = "MOD*DETAILS*":DATE()
*1134             READU R.CONTROL FROM eF.CONTROL,K.CONTROL THEN
*1135                LOCATE(T.STACK,R.CONTROL,1;W.CONTROL) THEN
*1136                   W.CONTROL = W.CONTROL + 1
*1137                END ELSE
*1138                   W.CONTROL = DCOUNT(R.CONTROL,AM) + 1
*1139                   R.CONTROL<1,W.CONTROL-1> = T.STACK
*1140                END
*1141             END ELSE W.CONTROL = 2 ; R.CONTROL = T.STACK
*1142             R.CONTROL<W.CONTROL,1> = T.STACK
*1143             IF UP.VERSION THEN
*1144                R.CONTROL<W.CONTROL,2> = NEW.VERS
*1145             END ELSE
*1146                R.CONTROL<W.CONTROL,2> = 'NOVERS'
*1147             END
*1148             R.CONTROL<W.CONTROL,3> = DATE()
*1149             R.CONTROL<W.CONTROL,4> = TIME()
*1150             WRITE R.CONTROL ON eF.CONTROL,K.CONTROL
*1151 *
*1152             READU R.VERSION.REGISTRY FROM gF.VERSION.REGISTRY,K.VERSIO
*     N.REGISTRY ELSE
*1153                R.VERSION.REGISTRY = ''
*1154             END
*1155             IF UP.VERSION THEN R.VERSION.REGISTRY<1> = NEW.VERS ELSE
*1156                R.VERSION.REGISTRY<1> = 'NOVERS'
*1157             END
*1158             R.VERSION.REGISTRY<2> = TIME() ; R.VERSION.REGISTRY<3> = D
*     ATE()
*1159             WRITE R.VERSION.REGISTRY ON gF.VERSION.REGISTRY,K.VERSION.
*     REGISTRY
*1160             IF UP.VERSION THEN
*1161                IF K.VERSION.REGISTRY"R#1" # "#" THEN
*1162                   K.VERSION.REGISTRY = K.VERSION.REGISTRY:"#"
*1163                END
*1164                K.VERSION.REGISTRY = K.VERSION.REGISTRY:"VERS":NEW.VERS
*1165                READU R.VERSION.REGISTRY FROM gF.VERSION.REGISTRY,K.VER
*     SION.REGISTRY ELSE
*1166                   R.VERSION.REGISTRY = ''
*1167                END
*1168                R.VERSION.REGISTRY<2> = TIME() ; R.VERSION.REGISTRY<3> 
*     = DATE()
*1169                WRITE R.VERSION.REGISTRY ON gF.VERSION.REGISTRY,K.VERSI
*     ON.REGISTRY
*1170             END
*1171          END
*1172       END
*1173       RETURN
*1174 *
*1175 EDIT.DENIED:
*1176       CRT 'You do not have permission to modify this program.'
*1177       CRT 'Only ':PROGRAM.ADMIN:
*1178       IF INSTALL.ADMIN # '' THEN CRT ' or ':INSTALL.ADMIN:
*1179       CRT ' has the required permission.'
*1180       CRT 'Hit any key...':
*1181 $INCLUDE CODE.INCLUDES CHAR.INPUT
*1182       CRT
*1183       RETURN
*1184 *
*1185 SET.OLD.SHELL:
*1186       UP.VERSION = FALSE
*1187       OPEN T.FILE TO TEMP THEN
*1188          READ OLD.ME FROM TEMP,T.ITEM ELSE OLD.ME = ''
*1189          LOCATE("*!*!  VERSION CONTROL",OLD.ME;W.OLD.ME) THEN
*1190             UP.VERSION = TRUE
*1191             PRINT 'Update VERSION CONTROL tag in ':T.FILE:' ':T.ITEM
*1192          END
*1193          IF INDEX(OLD.ME,"VERSION.CONTROL = SET",1) THEN
*1194             UP.VERSION = TRUE
*1195          END
*1196       END ELSE OLD.ME = ''
*1197       RETURN
*1198 *
*1199 SET.NEW.SHELL:
*1200       OPEN T.FILE TO TEMP THEN
*1201          READ NEW.ME FROM TEMP,T.ITEM ELSE NEW.ME = ''
*1202          LOCATE("*!*!  VERSION CONTROL",NEW.ME;W.NEW.ME) THEN
*1203             UP.VERSION = TRUE
*1204             PRINT 'Update VERSION CONTROL tag in ':T.FILE:' ':T.ITEM
*1205          END
*1206          IF INDEX(NEW.ME,"VERSION.CONTROL = SET",1) THEN
*1207             UP.VERSION = TRUE
*1208          END
*1209          LOCATE("*!*! VERSION HOLDER",NEW.ME;W.NEW.ME) THEN
*1210             T.VERSION = TRIM(NEW.ME<W.NEW.ME+1>[6,99])
*1211          END ELSE T.VERSION = T.ITEM
*1212       END ELSE NEW.ME = ''
*1213       RETURN
*1214 *
*1215 UP.MY.VERSION:
*1216 * Allow the version to be maintained outside of the edited program
*1217       OPEN T.FILE TO TEMP THEN
*1218          READ MYSELF FROM TEMP,T.VERSION THEN
*1219             W.VERS = INDEX(MYSELF,'VERS =',1)
*1220             IF W.VERS THEN
*1221                W.VERS.AM = DCOUNT(MYSELF[1,W.VERS],AM)
*1222                LOOP
*1223                   W.VERS += 1
*1224                UNTIL MYSELF[W.VERS,1] = "=" DO REPEAT
*1225                W.VERS += 1 ; W.VERS.ST = W.VERS
*1226                LOOP
*1227                   W.VERS += 1
*1228                UNTIL MYSELF[W.VERS,1] = AM DO REPEAT
*1229                W.VERS.EN = W.VERS - 1
*1230                OLD.VERS = TRIM(MYSELF[W.VERS.ST,W.VERS.EN-W.VERS.ST+1]
*     )
*1231                CONVERT "'" TO "" IN OLD.VERS
*1232                OLD.VERSA = FIELD(OLD.VERS,'.',1)
*1233                OLD.VERSB = FIELD(OLD.VERS,'.',2)
*1234                OLD.VERSC = FIELD(OLD.VERS,'.',3)
*1235                NEW.VERS1 = (OLD.VERSA + 1):('.0.0')
*1236                NEW.VERS2 = OLD.VERSA:'.':(OLD.VERSB + 1):'.0'
*1237                NEW.VERS3 = OLD.VERSA:'.':OLD.VERSB:'.':(OLD.VERSC + 1)
*1238                PRINT 'Is this a 1 major, 2 medium, or 3 minor change'
*1239                MIDFIX = ' change will will change the version number'
*1240                MIDFIX = MIDFIX:' from ':OLD.VERS:' to '
*1241                PRINT '1 Major':MIDFIX:NEW.VERS1
*1242                PRINT '2 Medium':MIDFIX:NEW.VERS2
*1243                PRINT '3 Minor':MIDFIX:NEW.VERS3
*1244                PRINT 'Enter your selection (1/2/3) ': ; INPUT CH.MODE
*1245                IF CH.MODE = 1 THEN NEW.VERS = NEW.VERS1
*1246                IF CH.MODE = 2 THEN NEW.VERS = NEW.VERS2
*1247                IF CH.MODE = 3 THEN NEW.VERS = NEW.VERS3
*1248                C.VERS = INDEX(MYSELF<W.VERS.AM>,'VERS',1)
*1249                T.LINE = MYSELF<W.VERS.AM>[1,C.VERS-1]
*1250                T.LINE = T.LINE:"VERS ='":NEW.VERS:"'"
*1251                MYSELF<W.VERS.AM> = T.LINE
*1252                WRITE MYSELF ON TEMP,T.VERSION
*1253                IF T.FILE # gCODE.INCLUDES THEN
*1254                   EXECUTE 'BASIC ':T.FILE:' ':T.VERSION
*1255                END
*1256             END
*1257          END
*1258       END
*1259       RETURN
*1260 *
*1261 MAINTAIN.COMMENTS:
*1262       OPEN T.FILE TO TEMP THEN
*1263          READ MYSELF FROM TEMP,T.ITEM THEN
*1264             MYLINE2 = '* Modified ':TIMEDATE():' by ':USER.ID
*1265             MYLINE2 := ' version ':NEW.VERS
*1266             MYSELF<-1> = MYLINE2
*1267             MYSELF<-1> = '* Reason: ':REASON
*1268             OPEN T.FILE:'.OLD' TO ARCHIVE.TEMP THEN
*1269                ARCHIVE.OPEN = TRUE
*1270             END ELSE ARCHIVE.OPEN = FALSE
*1271 *
*1272 * If this item is NOT its own version number holder then
*1273 * the key will have the version number embedded in it. In this case:
*1274 * Auto-archive any version more than 3 (or in the case of the shell
*1275 * more than 7 versions ago)
*1276 * If this item IS its own version number holder then
*1277 * the version number will appear in the body of code not the key. The
*1278 * Auto-archive the current version
*1279 *
*1280             IF T.VERSION = T.ITEM THEN
*1281                R.WHOAMI.NEWCOM = T.ITEM
*1282                IF ARCHIVE.OPEN THEN
*1283                   T.LINE = 'Archived ':TIMEDATE():' by ':WHO
*1284                   OLD.ME = INSERT(OLD.ME,1;T.LINE)
*1285                   K.TEMP = R.WHOAMI.NEWCOM:'#VERS':OLD.VERS
*1286                   WRITE OLD.ME ON ARCHIVE.TEMP,K.TEMP
*1287                END
*1288             END ELSE
*1289                IF T.STACK = WHOAMI.COM OR T.STACK = WHOAMI.NEWCOM THEN
*1290                   AUTO.ARCHIVE.AT = 7
*1291                END ELSE AUTO.ARCHIVE.AT = 3
*1292                C.TEMP = INDEX(R.WHOAMI.COM,'#VERS',1)
*1293                IF ARCHIVE.OPEN THEN
*1294                   T.LINE = 'Archived ':TIMEDATE():' by ':WHO
*1295                   OLD.VERSA = FIELD(OLD.VERS,".",1)
*1296                   OLD.VERSB = FIELD(OLD.VERS,".",2)
*1297                   OLD.VERS = OLD.VERSA:".":(OLD.VERSB-AUTO.ARCHIVE.AT)
*1298                   K.TEMP = R.WHOAMI.COM[1,C.TEMP-1]:'#VERS':OLD.VERS
*1299                   READ OLD.ME FROM TEMP,K.TEMP THEN
*1300                      OLD.ME = INSERT(OLD.ME,1;T.LINE)
*1301                      PRINT 'Archiving program ':K.TEMP
*1302                      WRITE OLD.ME ON ARCHIVE.TEMP,K.TEMP
*1303                      DELETE TEMP,K.TEMP
*1304                   END
*1305                END
*1306                R.WHOAMI.NEWCOM = R.WHOAMI.COM[1,C.TEMP-1]:'#VERS':NEW.
*     VERS
*1307             END
*1308             PRINT 'Writing new version as ':R.WHOAMI.NEWCOM
*1309             WRITE MYSELF ON TEMP,R.WHOAMI.NEWCOM
*1310             T.LINE = T.FILE:" ":R.WHOAMI.NEWCOM
*1311             IF T.ITEM = R.WHOAMI.COM THEN WHOAMI.NEWCOM = T.LINE
*1312             *the shell itself
*1313             HOLD.W.STACK = W.STACK
*1314             LOCATE("PROG",N.STACKS;W.STACK) THEN
*1315                LOCATE(T.LINE,STACK(W.STACK);W.LINE) THEN
*1316                   STACK(W.STACK) = DELETE(STACK(W.STACK),W.LINE)
*1317                END
*1318                STACK(W.STACK) = INSERT(STACK(W.STACK),1;T.LINE)
*1319                W.STACK = HOLD.W.STACK
*1320             END
*1321          END
*1322       END
*1323       RETURN
*1324 *
*1325 RECALL.CMD:
*1326       S.STACK = DCOUNT(STACK(W.STACK),AM)
*1327       MYSTACK.NUM = CMD[3,LEN(CMD)]
*1328       BEGIN CASE
*1329          CASE NUM(MYSTACK.NUM) AND (MYSTACK.NUM < 1 OR MYSTACK.NUM > S
*     .STACK)
*1330             CRT "Stack number to retrieve, ":MYSTACK.NUM:" is not in t
*     his stack's range"
*1331          CASE NUM(MYSTACK.NUM)
*1332             C.LINE = MYSTACK.NUM
*1333             O.LINE = STACK(W.STACK)<C.LINE>

*1334             STACK(W.STACK) = DELETE(STACK(W.STACK),C.LINE)
*1335             STACK(W.STACK) = INSERT(STACK(W.STACK),1;O.LINE)
*1336          CASE 1                          ; * Look for a particular str
*     ing, ignore first line
*1337             MYSTACK.STR = MYSTACK.NUM
*1338             L.FIRST.ITEM = LEN(STACK(W.STACK)<1>)
*1339             L.ALL.ITEMS = LEN(STACK(W.STACK))
*1340             REST.OF.STACK = STACK(W.STACK)[L.FIRST.ITEM+2,L.ALL.ITEMS]
*1341             W.STRING = INDEX(REST.OF.STACK,MYSTACK.STR,1)
*1342             IF W.STRING THEN
*1343                W.STRING.AM = DCOUNT(REST.OF.STACK[1,W.STRING],AM)+1
*1344                O.LINE = STACK(W.STACK)<W.STRING.AM>
*1345                PRINT 'Moving stack item ':W.STRING.AM:' to the top'
*1346                STACK(W.STACK) = DELETE(STACK(W.STACK),W.STRING.AM)
*1347                STACK(W.STACK) = INSERT(STACK(W.STACK),1;O.LINE)
*1348             END ELSE
*1349                CRT 'No ':
*1350                IF INDEX(STACK(W.STACK)<1>,MYSTACK.STR,1) THEN CRT 'oth
*     er ':
*1351                CRT 'stack item with the string ':MYSTACK.STR:' found'
*1352             END
*1353       END CASE
*1354       GOSUB WRITE.STACKS
*1355       RETURN
*1356 *
*1357 EXECUTE.STACK:
*1358       MYSTACK.NUM = CMD[3,LEN(CMD)]
*1359       IF MYSTACK.NUM = '' THEN MYSTACK.NUM = 1
*1360       IF NOT(NUM(MYSTACK.NUM)) THEN
*1361          CRT 'Invalid stack number used'
*1362          RETURN
*1363       END
*1364       O.LINE = STACK(W.STACK)<MYSTACK.NUM>
*1365       STACK(W.STACK) = DELETE(STACK(W.STACK),MYSTACK.NUM)
*1366       STACK(W.STACK) = INSERT(STACK(W.STACK),1;O.LINE)
*1367       IF LIST.ON THEN
*1368          IF MACHINE.DATABASE = 'UNIVERSE' THEN
*1369             CLAUSES = 'SO':VM:'SS'
*1370             CALL EXECUTE(MACHINE.DATABASE,O.LINE,CLAUSES,MYLIST1,'',''
*     ,'','')
*1371          END ELSE
*1372             CLAUSES = 'SS'
*1373             CALL EXECUTE(MACHINE.DATABASE,O.LINE,CLAUSES,'','','','','
*     ')
*1374          END
*1375       END ELSE
*1376          CALL EXECUTE(MACHINE.DATABASE,O.LINE,'','','','','','')
*1377       END
*1378       IF SYSTEM(11) THEN LIST.ON = TRUE ELSE LIST.ON = FALSE
*1379       RETURN
*1380 *
*1381 SWITCH.STACK:
*1382       OLD.W.STACK = W.STACK
*1383       MYSTACK.NUM = CMD[3,LEN(CMD)]
*1384       BEGIN CASE
*1385          CASE MYSTACK.NUM = '' ; W.STACK = MOD(W.STACK,S.STACKS) + 1
*1386          CASE NUM(MYSTACK.NUM)
*1387             IF (MYSTACK.NUM >= 1 AND MYSTACK.NUM <= S.STACKS) THEN
*1388                W.STACK = MYSTACK.NUM
*1389             END
*1390          CASE 1 ; LOCATE(MYSTACK.NUM,N.STACKS;W.STACK2) THEN W.STACK =
*     W.STACK2
*1391       END CASE
*1392       IF W.STACK # OLD.W.STACK THEN
*1393          CMDS = '' ; CMDS.HELP = ''
*1394          GOSUB SET.STACK.DEPENDENT.HELP
*1395       END
*1396       RETURN
*1397 *
*1398 SET.STACK.DEPENDENT.HELP:
*1399       VALID.CMDS = '' ; CMDS.HELP = ''
*1400       BEGIN CASE
*1401          CASE N.STACKS<W.STACK> = "PROG"
*1402             GOSUB SET.STACK.DEPENDENT.HELP.PROG
*1403          CASE N.STACKS<W.STACK> = "DATA"
*1404             VALID.CMDS<-1> = 'U' ; CMDS.HELP<-1> = 'to use a verb agai
*     nst stack item 1'
*1405          CASE N.STACKS<W.STACK> = "TCL"
*1406             VALID.CMDS<-1> = 'U' ; CMDS.HELP<-1> = 'to use a verb agai
*     nst stack item 1'
*1407          CASE N.STACKS<W.STACK> = "CONTROLS"
*1408             VALID.CMDS<-1> = 'E' ; CMDS.HELP<-1> = 'to edit a control'
*1409          CASE N.STACKS<W.STACK> = "INSTALLER"
*1410             CALL INSTALLER(VALID.CMDS,CMDS.HELP,STACK(W.STACK))
*1411       END CASE
*1412       STACK.DEPENDENT.HELP = ''
*1413       S.VALID.CMDS = DCOUNT(VALID.CMDS,AM)
*1414       FOR I.VALID.CMDS = 1 TO S.VALID.CMDS
*1415          STACK.DEPENDENT.HELP<-1> = VALID.CMDS<I.VALID.CMDS>'L#7':' ':
*     CMDS.HELP<I.VALID.CMDS>'L#70'
*1416       NEXT I.CMDS
*1417       RETURN
*1418 *
*1419 SET.STACK.DEPENDENT.HELP.PROG:
*1420       VALID.CMDS<-1> = 'A' ; CMDS.HELP<-1> = 'to archive stack item 1'
*1421       VALID.CMDS<-1> = 'B' ; CMDS.HELP<-1> = 'to compile stack item 1'
*1422       IF HAS.BCOMPARE THEN
*1423          VALID.CMDS<-1> = 'BC'
*1424          CMDS.HELP<-1> = 'to basic-compare stack item 1'
*1425       END
*1426       VALID.CMDS<-1> = 'C' ; CMDS.HELP<-1> = 'to catalog stack item 1'
*1427       VALID.CMDS<-1> = 'CO' ; CMDS.HELP<-1> = 'to show controls for th
*     e program in stack item 1'
*1428       VALID.CMDS<-1> = 'E' ; CMDS.HELP<-1> = 'to edit stack item 1'
*1429       IF HAS.FORMAT THEN
*1430          VALID.CMDS<-1> = 'F' ; CMDS.HELP<-1> = 'to format stack item 
*     1'
*1431       END
*1432       IF HAS.MAKELIVE THEN
*1433          VALID.CMDS<-1> = 'ML' ; CMDS.HELP<-1> = 'to make stack item 1
*      live'
*1434       END
*1435       VALID.CMDS<-1> = 'O' ; CMDS.HELP<-1> = 'to output stack item 1'
*1436       VALID.CMDS<-1> = 'R' ; CMDS.HELP<-1> = 'to run stack item 1'
*1437       VALID.CMDS<-1> = 'U' ; CMDS.HELP<-1> = 'use a verb on stackitem 
*     1'
*1438       RETURN
*1439 *
*1440 DISPLAY.STACK.DEPENDENT.HELP:
*1441       S.STACK.DEPENDENT.HELP = DCOUNT(STACK.DEPENDENT.HELP,AM)
*1442       FOR I.STACK.DEPENDENT.HELP = 1 TO S.STACK.DEPENDENT.HELP
*1443          CRT STACK.DEPENDENT.HELP<I.STACK.DEPENDENT.HELP>

*1444       NEXT I.STACK.DEPENDENT.HELP
*1445       RETURN
*1446 *
*1447 LIST.CMD:
*1448       S.STACK = DCOUNT(STACK(W.STACK),AM)
*1449       MYLINE.NUM = CMD[3,LEN(CMD)]
*1450       BEGIN CASE
*1451          CASE MYLINE.NUM = '' ; MYLINE.NUM = 18
*1452          CASE NOT(NUM(MYLINE.NUM)) OR (MYLINE.NUM < 1) ; MYLINE.NUM = 
*     18
*1453          CASE 1 ; NULL
*1454       END CASE
*1455       IF MYLINE.NUM > S.STACK THEN MYLINE.NUM = S.STACK
*1456       S.STACK = MYLINE.NUM
*1457       FOR I.STACK = 1 TO S.STACK
*1458          CRT I.STACK"R#2":" ":STACK(W.STACK)<I.STACK>
*1459          IF NOT(MOD(I.STACK,18)) AND I.STACK # S.STACK THEN
*1460             CRT 'Hit any key...':
*1461 $INCLUDE CODE.INCLUDES CHAR.INPUT
*1462             IF ANS = 'Q' OR ANS = CHAR(24) THEN I.STACK = S.STACK
*1463             CRT
*1464          END
*1465       NEXT I.STACK
*1466       RETURN
*1467 *
*1468 DELETE.CMD:
*1469       S.STACK = DCOUNT(STACK(W.STACK),AM)
*1470       MYLINE.NUM = CMD[3,LEN(CMD)]
*1471       IF MYLINE.NUM = '' THEN MYLINE.NUM = 1
*1472       IF INDEX(MYLINE.NUM,'-',1) THEN
*1473          START.STACK = FIELD(MYLINE.NUM,'-',1)
*1474          END.STACK = FIELD(MYLINE.NUM,'-',2)
*1475       END ELSE
*1476          START.STACK = MYLINE.NUM ; END.STACK = MYLINE.NUM
*1477       END
*1478       IF NOT(NUM(START.STACK)) OR NOT(NUM(END.STACK)) THEN
*1479          PRINT 'Error in number: format is .D or .D# or .D#-#'
*1480       END ELSE
*1481          IF START.STACK < 1 THEN STACK.STACK = 1
*1482          IF END.STACK > S.STACK THEN END.STACK = S.STACK
*1483          FOR I.STACK = END.STACK TO START.STACK STEP -1
*1484             T.LINE = STACK(W.STACK)<I.STACK>
*1485             HOLD.W.STACK = W.STACK
*1486             LOCATE("DELETED",N.STACKS;W.STACK) THEN
*1487                STACK(W.STACK) = INSERT(STACK(W.STACK),1;T.LINE)
*1488                W.STACK = HOLD.W.STACK
*1489             END
*1490             STACK(W.STACK) = DELETE(STACK(W.STACK),I.STACK)
*1491          NEXT I.STACK
*1492       END
*1493       GOSUB WRITE.STACKS
*1494       RETURN
*1495 *
*1496 APPEND.CMD:
*1497       MYSTRING = CMD[3,LEN(CMD)]
*1498       STACK(W.STACK)<1> = STACK(W.STACK)<1>:MYSTRING
*1499       GOSUB WRITE.STACKS
*1500       RETURN
*1501 *
*1502 CHANGE.CMD:
*1503 * look for the first punctuation char and use it as a delimiter
*1504       L.CMD = LEN(CMD)
*1505       C.CMD = 2
*1506       DONE.CMD = FALSE
*1507       LOOP
*1508          C.CMD = C.CMD + 1
*1509          T.CMD = CMD[C.CMD,1]
*1510          X.CMD = SEQ(T.CMD)
*1511          PUNC = FALSE
*1512          BEGIN CASE
*1513             CASE X.CMD>= 33 AND X.CMD <= 47 ; PUNC = TRUE
*1514             CASE X.CMD>= 58 AND X.CMD <= 64 ; PUNC = TRUE
*1515             CASE X.CMD>= 91 AND X.CMD <= 96 ; PUNC = TRUE
*1516             CASE X.CMD>= 123 AND X.CMD <= 126 ; PUNC = TRUE
*1517             CASE 1 ; PUNC = FALSE
*1518          END CASE
*1519          IF PUNC THEN DELIM = T.CMD ; DONE.CMD = TRUE
*1520          IF C.CMD >= L.CMD THEN DONE.CMD = TRUE
*1521       UNTIL DONE.CMD DO REPEAT
*1522       MYLINE.NUM = FIELD(CMD,DELIM,1)
*1523       MYLINE.NUM = MYLINE.NUM[3,LEN(MYLINE.NUM)]
*1524       IF MYLINE.NUM = '' THEN MYLINE.NUM = 1
*1525       OLD.STRING = FIELD(CMD,DELIM,2)
*1526       NEW.STRING = FIELD(CMD,DELIM,3)
*1527       GLOBAL.FLAG = (FIELD(CMD,DELIM,4) = 'G')
*1528       T.LINE = STACK(W.STACK)<MYLINE.NUM>
*1529       IF GLOBAL.FLAG THEN MAX.OCCUR = 999 ELSE MAX.OCCUR = 1
*1530       NEW.T.LINE = '' ; WORK.T.LINE = T.LINE ; OCCUR = 0
*1531       L.OLD.STRING = LEN(OLD.STRING)
*1532       LOOP
*1533          C.STRING = INDEX(WORK.T.LINE,OLD.STRING,1) ; OCCUR = OCCUR + 
*     1
*1534       UNTIL NOT(C.STRING) OR OCCUR > MAX.OCCUR DO
*1535          NEW.T.LINE = NEW.T.LINE:WORK.T.LINE[1,C.STRING-1]:NEW.STRING
*1536          WORK.T.LINE = WORK.T.LINE[C.STRING+L.OLD.STRING,LEN(WORK.T.LI
*     NE)]
*1537       REPEAT
*1538       NEW.T.LINE = NEW.T.LINE:WORK.T.LINE
*1539       IF NEW.T.LINE = T.LINE THEN
*1540          PRINT 'STRING ':OLD.STRING:' NOT FOUND! NO CHANGE MADE!'
*1541       END
*1542       STACK(W.STACK)<MYLINE.NUM> = NEW.T.LINE
*1543       GOSUB WRITE.STACKS
*1544       RETURN
*1545 *
*1546 INSERT.CMD:
*1547       BEGIN CASE
*1548          CASE N.STACKS<W.STACK> = "PROG" OR N.STACKS<W.STACK> = "DATA"
*1549             OLD.FILE = FIELD(STACK(W.STACK)<1>,' ',1)
*1550             OLD.ITEM = FIELD(STACK(W.STACK)<1>,' ',2)
*1551             CRT 'File ':OLD.FILE:STR(BS,LEN(OLD.FILE)): ; INPUT N.FILE
*1552             IF N.FILE = '' THEN N.FILE = OLD.FILE ; CRT ELSE CRT SPACE
*     (20)
*1553             CRT 'Item ':OLD.ITEM:STR(BS,LEN(OLD.ITEM)): ; INPUT N.ITEM
*1554             IF N.ITEM = '' THEN N.ITEM = OLD.ITEM ; CRT ELSE CRT SPACE
*     (20)
*1555             O.LINE = N.FILE:' ':N.ITEM
*1556          CASE N.STACKS<W.STACK> = "CONTACTS"
*1557             GOSUB ENTER.CONTACT.INFO
*1558          CASE N.STACKS<W.STACK> = "HOSTPATHS"
*1559             CRT "Enter path ": ; INPUT O.LINE
*1560          CASE N.STACKS<W.STACK> = "CONTROLS"
*1561             GOSUB ENTER.CONTROL.INFO
*1562          CASE 1
*1563             CRT 'Enter line ': ; INPUT O.LINE
*1564       END CASE
*1565       IF O.LINE # '' THEN
*1566          LOCATE(O.LINE,STACK(W.STACK);W.LINE) THEN
*1567             STACK(W.STACK) = DELETE(STACK(W.STACK),W.LINE,0,0)
*1568          END
*1569          STACK(W.STACK) = INSERT(STACK(W.STACK),1;O.LINE)
*1570          GOSUB WRITE.STACKS
*1571       END
*1572       RETURN
*1573 *
*1574 ENTER.CONTACT.INFO:
*1575       CRT 'Enter contact id ': ; INPUT O.LINE
*1576       IF O.LINE = '' THEN RETURN
*1577       K.CONTROL = O.LINE
*1578       READ R.CONTROL FROM eF.CONTROL,K.CONTROL THEN
*1579          CRT 'Existing contact entry' ; GOSUB gMOD.CONTROL
*1580       END ELSE
*1581          K.CONTROL = 'CONTACT*': O.LINE
*1582          CRT 'New contact entry' ; GOSUB gCREATE.CONTROL
*1583       END
*1584       RETURN
*1585 *
*1586 ENTER.CONTROL.INFO:
*1587       O.LINE = ''
*1588       CRT 'Enter control type ': ; INPUT O.TYPE
*1589       IF O.TYPE = '' THEN RETURN
*1590       BEGIN CASE
*1591          CASE O.TYPE = 'INSTALL'
*1592             CRT 'Enter program id ': ; INPUT O.PROG
*1593             IF O.PROG = '' THEN RETURN
*1594             CRT 'Enter client id ': ; INPUT O.CLIENT
*1595             IF O.CLIENT = '' THEN RETURN
*1596             K.CONTROL = O.TYPE:'*':O.PROG:'*':O.CLIENT
*1597          CASE O.TYPE = 'PROGRAM'
*1598             CRT 'Enter program id ': ; INPUT O.PROG
*1599             IF O.PROG = '' THEN RETURN
*1600             K.CONTROL = O.TYPE:'*':O.PROG
*1601          CASE O.TYPE = 'CLIENT'
*1602             CRT 'Enter client id ': ; INPUT O.CLIENT
*1603             IF O.CLIENT = '' THEN RETURN
*1604             K.CONTROL = O.TYPE:'*':O.CLIENT
*1605          CASE O.TYPE = 'VENDOR'
*1606             CRT 'Enter vendor id ': ; INPUT O.VENDOR
*1607             IF O.VENDOR = '' THEN RETURN
*1608             K.CONTROL = O.TYPE:'*':O.VENDOR
*1609       END CASE
*1610       O.LINE = K.CONTROL
*1611       READ R.CONTROL FROM eF.CONTROL,K.CONTROL THEN
*1612          CRT 'Existing control entry' ; GOSUB gMOD.CONTROL
*1613       END ELSE
*1614          CRT 'New control entry' ; GOSUB gCREATE.CONTROL
*1615       END
*1616       RETURN
*1617 *
*1618 EDIT.CONTROLS:
*1619       O.LINE = STACK(W.STACK)<MYSTACK.NUM>

*1620       K.CONTROL = O.LINE
*1621       READ R.CONTROL FROM eF.CONTROL,K.CONTROL THEN
*1622          CRT 'Existing control entry' ; GOSUB gMOD.CONTROL
*1623       END ELSE
*1624          CRT 'New control entry' ; GOSUB gCREATE.CONTROL
*1625       END
*1626       IF O.LINE # '' THEN
*1627          LOCATE(O.LINE,STACK(W.STACK);W.LINE) THEN
*1628             STACK(W.STACK) = DELETE(STACK(W.STACK),W.LINE,0,0)
*1629          END
*1630          STACK(W.STACK) = INSERT(STACK(W.STACK),1;O.LINE)
*1631          GOSUB WRITE.STACKS
*1632       END
*1633       RETURN
*1634 *
*1635 DISPLAY.VENDOR.CONTACT.INFO:
*1636       MSG = 'Please contact '
*1637       BEGIN CASE
*1638          CASE INSTALL.REC(V.INSTALL.OCONTACT) # ''
*1639             MSG = MSG: INSTALL.REC(V.INSTALL.OCONTACT)
*1640          CASE 1
*1641             MSG = MSG: VENDOR.REC(V.VENDOR.CONTACT)
*1642       END CASE
*1643       MSG = MSG: ' at '
*1644       BEGIN CASE
*1645          CASE INSTALL.REC(V.INSTALL.OVPHONE) # ''
*1646             MSG = MSG: INSTALL.REC(V.INSTALL.OVPHONE)"L((###) ###-####
*     "
*1647          CASE 1
*1648             MSG = MSG: VENDOR.REC(V.VENDOR.VPHONE1)"L((###) ###-####"
*1649       END CASE
*1650       IF CENTERIT THEN GOSUB CENTER.IT
*1651       CRT MSG
*1652 *
*1653       MSG = 'Mail us at:'
*1654       IF CENTERIT THEN GOSUB CENTER.IT
*1655       CRT MSG
*1656 *
*1657       MSG = VENDOR.REC(V.VENDOR.NAME)
*1658       IF CENTERIT THEN GOSUB CENTER.IT ELSE MSG = SPACE(5):MSG
*1659       CRT MSG
*1660 *
*1661       MSG = 'Attn: ':VENDOR.REC(V.VENDOR.CONTACT)
*1662       IF CENTERIT THEN GOSUB CENTER.IT ELSE MSG = SPACE(5):MSG
*1663       CRT MSG
*1664 *
*1665       MSG = VENDOR.REC(V.VENDOR.ADDR1)
*1666       IF CENTERIT THEN GOSUB CENTER.IT ELSE MSG = SPACE(5):MSG
*1667       CRT MSG
*1668 *
*1669       IF VENDOR.REC(V.VENDOR.ADDR2) # '' THEN
*1670          MSG = VENDOR.REC(V.VENDOR.ADDR2)
*1671          IF CENTERIT THEN GOSUB CENTER.IT ELSE MSG = SPACE(5):MSG
*1672          CRT MSG
*1673       END
*1674       MSG = VENDOR.REC(V.VENDOR.CITY):", "
*1675       MSG = MSG: VENDOR.REC(V.VENDOR.STATE):" "
*1676       MSG = MSG: VENDOR.REC(V.VENDOR.ZIP)
*1677       IF CENTERIT THEN GOSUB CENTER.IT ELSE MSG = SPACE(5):MSG
*1678       CRT MSG
*1679 *
*1680       CRT
*1681       MSG = 'or E-mail to '
*1682       BEGIN CASE
*1683          CASE INSTALL.REC(V.INSTALL.OEMAIL) # ''
*1684             MSG = MSG: INSTALL.REC(V.INSTALL.OEMAIL)
*1685          CASE 1
*1686             MSG = MSG: VENDOR.REC(V.VENDOR.EMAIL)
*1687       END CASE
*1688       IF CENTERIT THEN GOSUB CENTER.IT ELSE MSG = SPACE(5):MSG
*1689       CRT MSG
*1690       IF VENDOR.REC(V.VENDOR.WEBURL) # '' THEN
*1691          MSG = 'or visit our web site at '
*1692          MSG = MSG:VENDOR.REC(V.VENDOR.WEBURL)
*1693          IF CENTERIT THEN GOSUB CENTER.IT ELSE MSG = SPACE(5):MSG
*1694          CRT MSG
*1695       END
*1696       RETURN
*1697 *
*1698 * Modified 15:56:41 09 APR 1999 by willj version 1.47
*1699 * Reason: Write stack after every stack modification command and befor
*     e LOGTO
*1700 * Modified 16:54:43 09 APR 1999 by willj version 1.48
*1701 * Reason: Add 'U'se command
*1702 * Modified 16:55:55 09 APR 1999 by willj version 1.49
*1703 * Reason: Add a help line for the 'U'se function
*1704 * Modified 18:19:08 09 APR 1999 by willj version 1.50
*1705 * Reason: Mod controller needs to ask reason only if program changed
*1706 * Modified 18:24:46 09 APR 1999 by willj version 1.51
*1707 * Reason: Fix vers counter and auto-comments
*1708 * Modified 18:45:49 09 APR 1999 by willj version 1.52
*1709 * Reason: Label and highlight label for info-line elements
*1710 * Modified 18:49:13 09 APR 1999 by willj version 1.53
*1711 * Reason: Display time and date on the top stack element line if enoug
*     h room
*1712 * Modified 18:50:16 09 APR 1999 by willj version 1.54
*1713 * Reason: Correct bug with time display on top stack element line
*1714 * Modified 18:50:35 09 APR 1999 by willj version 1.55
*1715 * Reason: Correct bug with time display on top stack element line
*1716 * Modified 11:49:00 14 APR 1999 by willj version 1.56
*1717 * Reason: Add Upgrade function and externalize help contact informatio
*1718 * Modified 12:01:21 14 APR 1999 by willj version 1.57
*1719 * Reason: Code for expiration date and Vendor and Client contact infor
*     mation
*1720 * Modified 12:45:54 14 APR 1999 by willj version 1.58
*1721 * Reason:
*1722 * Modified 13:54:42 14 APR 1999 by willj version 1.59
*1723 * Reason:
*1724 * Modified 14:03:52 14 APR 1999 by willj version 1.60
*1725 * Reason: Add Archive function
*1726 * Modified 14:07:53 14 APR 1999 by willj version 1.61
*1727 * Reason: Add Run function
*1728 * Modified 14:09:10 14 APR 1999 by willj version 1.62
*1729 * Reason: Make user acknowledge copyright screen when asking for help
*1730 * Modified 14:48:15 14 APR 1999 by willj version 1.63
*1731 * Reason: Fix minor bug where the .D function didn't know how bug thec
*     urrent stack was
*1732 * Modified 14:55:04 14 APR 1999 by willj version 1.64
*1733 * Reason: Fix minor bug that .G attempts to retrieve stack items thatd
*     on't exist
*1734 * Modified 15:50:05 14 APR 1999 by willj version 1.65
*1735 * Reason: Fix small bug with archive function
*1736 * Modified 15:50:46 14 APR 1999 by willj version 1.66
*1737 * Reason: Fix small bug with dates used in archive function
*1738 * Modified 15:51:59 14 APR 1999 by willj version 1.67
*1739 * Reason: Fix small bug with item name used in archive function
*1740 * Modified 16:06:33 14 APR 1999 by willj version 1.68
*1741 * Reason: If Execute level is not zero, force way out of WS shell
*1742 * Modified 17:44:20 14 APR 1999 by willj version 1.69
*1743 * Reason: Minor display problems fixed
*1744 * Modified 17:55:13 14 APR 1999 by willj version 1.70
*1745 * Reason: Add Makelive function and add Vendor and Client email addres
*     s fields
*1746 * Modified 18:04:53 14 APR 1999 by willj version 1.71
*1747 * Reason: Parameratize names of program files and dev/live accounts an
*     d self
*1748 * Modified 18:07:32 14 APR 1999 by willj version 1.72
*1749 * Reason: Make the copy portion of the Makelive function be silent
*1750 * Modified 18:11:43 14 APR 1999 by willj version 1.73
*1751 * Reason: Add BCOMPARE function
*1752 * Modified 12:02:55 21 APR 1999 by willj version 1.74
*1753 * Reason: Fix error when attempting to log to a non-existant account
*1754 * Modified 12:03:30 21 APR 1999 by willj version 1.75
*1755 * Reason: Fix bug with quoted literal using wrong quote
*1756 * Modified 12:03:50 21 APR 1999 by willj version 1.76
*1757 * Reason: Fix bug with unassigned variable GO.TO
*1758 * Modified 12:04:06 21 APR 1999 by willj version 1.77
*1759 * Reason: Fix bug with unassigned variable GO.ON
*1760 * Modified 12:04:37 21 APR 1999 by willj version 1.78
*1761 * Reason: Fix bug with typo CHAIN.CMD instead of CHAIN CMD
*1762 * Modified 17:24:54 21 APR 1999 by willj version 1.79
*1763 * Reason: The .Gstring function will now not return the top line of th
*     e stack
*1764 * Modified 14:52:35 22 APR 1999 by willj version 1.80
*1765 * Reason: Allow list function to exceed one page
*1766 * Modified 14:53:10 22 APR 1999 by willj version 1.81
*1767 * Reason: Fix minor display bug with list function
*1768 * Modified 16:12:11 05 MAY 1999 by willj version 1.82
*1769 * Reason: Add ability to do BCompare from test to QA to live accounts
*1770 * Modified 16:33:08 05 MAY 1999 by willj version 1.83
*1771 * Reason: Allow Makelive to have dev, QA, and Live account levels
*1772 * Modified 16:36:10 05 MAY 1999 by willj version 1.84
*1773 * Reason: Allow BCOMPARE and MAKELIVE sections to use SET-FILE to ensu
*     re Q-pointers exist
*1774 * Modified 16:41:57 05 MAY 1999 by willj version 1.85
*1775 * Reason: Fix bug with recent multi-account mod
*1776 * Modified 16:51:25 05 MAY 1999 by willj version 1.86
*1777 * Reason: Fix bug where stack file got clobbered by LOGTO a non-exista
*     nt account
*1778 * Modified 08:16:00 13 MAY 1999 by willj version 1.87
*1779 * Reason: Modify method of calling WS for older systems
*1780 * Modified 16:59:13 20 MAY 1999 by FFT version 1.93
*1781 * Reason: Add display of enviroment variables option Z
*1782 * Modified 17:18:27 20 MAY 1999 by FFT version 1.94
*1783 * Reason: Add support for multiple editors
*1784 * Modified 17:24:16 20 MAY 1999 by FFT version 1.95
*1785 * Reason: If there is only one editor, or if the user hits return with
*     out selecting one, then use the only or first one.
*1786 * Modified 17:34:40 20 MAY 1999 by FFT version 1.97
*1787 * Reason: Add display of file and machine variables to environmental v
*     ariable display
*1788 * Modified 17:36:28 20 MAY 1999 by FFT version 1.98
*1789 * Reason: Fix bug with display of machine variables in Z function
*1790 * Modified 17:43:12 20 MAY 1999 by FFT version 1.101
*1791 * Reason: Fix bug with extra compile when self-modifying
*1792 * Modified 12:47:06 21 MAY 1999 by FFT version 1.105
*1793 * Reason: Post new version of WS to stack after self-modification
*1794 * Modified 12:48:01 21 MAY 1999 by FFT version 1.106
*1795 * Reason: Fix bug with non-numeric data at editor selection input
*1796 * Modified 14:09:52 21 MAY 1999 by FFT version 1.107
*1797 * Reason: Add includes for VENDOR, CLIENT and PROGRAM levels of equate
*1798 * Modified 15:57:05 21 MAY 1999 by FFT version 1.108
*1799 * Reason: Add CLIENT, VENDOR, PROGRAM and INSTALL variables to Z funct
*     ion
*1800 * Modified 15:57:57 21 MAY 1999 by FFT version 1.109
*1801 * Reason: Fix bug with Z function, variable unassigned
*1802 * Modified 15:59:43 21 MAY 1999 by FFT version 1.110
*1803 * Reason:
*1804 * Modified 16:05:14 21 MAY 1999 by FFT version 1.111
*1805 * Reason: Fix display of phone numbers and dates
*1806 * Modified 16:06:20 21 MAY 1999 by FFT version 1.112
*1807 * Reason: Indent mailing address
*1808 * Modified 17:00:31 21 MAY 1999 by FFT version 1.114
*1809 * Reason: Do a better job paging the environmental variables
*1810 * Modified 17:02:22 21 MAY 1999 by FFT version 1.115
*1811 * Reason: More mods on display of environmental variables
*1812 * Modified 17:03:35 21 MAY 1999 by FFT version 1.116
*1813 * Reason: Small bug in page it that the line counter wasn't getting se
*     t back to 0
*1814 * Modified 17:11:42 21 MAY 1999 by FFT version 1.117
*1815 * Reason: Add the concept of a component list to WS
*1816 * Modified 17:18:29 21 MAY 1999 by FFT version 1.118
*1817 * Reason: Add self to COMPONENTS list
*1818 * Modified 17:33:58 21 MAY 1999 by FFT version 1.119
*1819 * Reason: Move the Machine Equate up to a higher level and allow multi
*     ple Machine entries
*1820 * Modified 17:40:01 21 MAY 1999 by FFT version 1.120
*1821 * Reason: Put Machine Equate in proper position
*1822 * Modified 18:15:43 21 MAY 1999 by FFT version 1.121
*1823 * Reason: Add all INCLUDED components to component lists
*1824 * Modified 18:17:31 21 MAY 1999 by FFT version 1.122
*1825 * Reason: Add component listing to environmental display function Z
*1826 * Modified 18:26:00 21 MAY 1999 by FFT version 1.123
*1827 * Reason: Make component list be a sorted one
*1828 * Modified 18:27:23 21 MAY 1999 by FFT version 1.124
*1829 * Reason: Fix bug with sorting component list
*1830 * Modified 18:32:18 21 MAY 1999 by FFT version 1.125
*1831 * Reason:
*1832 * Modified 18:32:55 21 MAY 1999 by FFT version 1.126
*1833 * Reason: Debugging
*1834 * Modified 18:47:25 21 MAY 1999 by FFT version 1.127
*1835 * Reason: Write component list to control file
*1836 * Modified 18:49:09 21 MAY 1999 by FFT version 1.128
*1837 * Reason: Allow premature exit from Environmental listing function Z
*1838 * Modified 18:57:48 21 MAY 1999 by FFT version 1.129
*1839 * Reason: Allow other programs to have auto-version control step 1
*1840 * Modified 19:09:24 21 MAY 1999 by FFT version 1.130
*1841 * Reason: Make the determination of who is the admin of a program exte
*     rnal
*1842 * Modified 19:35:52 21 MAY 1999 by FFT version 1.131
*1843 * Reason: Allow other programs to do self-updating of version numberss
*     tep 2
*1844 * Modified 19:38:30 21 MAY 1999 by FFT version 1.132
*1845 * Reason:
*1846 * Modified 19:51:59 21 MAY 1999 by FFT version 1.133
*1847 * Reason: Allow viewing the controls of programs stacked, using the CO
*      Function
*1848 * Modified 20:02:19 21 MAY 1999 by FFT version 1.134
*1849 * Reason: Allow viewing the controls of other programs
*1850 * Modified 20:02:47 21 MAY 1999 by FFT version 1.135
*1851 * Reason: Fix bug with non-existant label when it was required
*1852 * Modified 20:04:32 21 MAY 1999 by FFT version 1.136
*1853 * Reason: Allow suppressing or displaying controls on control-read fai
*     lure
*1854 * Modified 20:07:27 21 MAY 1999 by FFT version 1.137
*1855 * Reason: Display real id to control file on read failure
*1856 * Modified 20:18:03 21 MAY 1999 by FFT version 1.138
*1857 * Reason: Allow controls for a program to be known under a different n
*     ame in the CO function
*1858 * Modified 20:26:23 21 MAY 1999 by FFT version 1.139
*1859 * Reason: Correct bug with renameing auto-version update compliant pro
*     grams
*1860 * Modified 20:30:16 21 MAY 1999 by FFT version 1.140
*1861 * Reason: Externalize a new include called GET.MY.CONTROLS
*1862 * Modified 13:10:42 22 MAY 1999 by FFT version 1.141
*1863 * Reason: Add three more stacks, parameterize stack names and remove l
*     ast hard-coded references to the name of the program being WS except a
*     t the top
*1864 * Modified 13:11:19 22 MAY 1999 by FFT version 1.142
*1865 * Reason: Allow selecting stack by number or name, and show numbers an
*     d names in help screen
*1866 * Modified 13:12:44 22 MAY 1999 by FFT version 1.143
*1867 * Reason: Correct display of stack numbers and names
*1868 * Modified 13:14:19 22 MAY 1999 by FFT version 1.144
*1869 * Reason: Show the name of the current stack as the prompt
*1870 * Modified 13:19:52 22 MAY 1999 by FFT version 1.145
*1871 * Reason: Allow insert to stack (.I) prompt to change based on which s
*     tack you are in
*1872 * Modified 15:12:36 23 MAY 1999 by FFT version 1.146
*1873 * Reason: Fix bug where the INSTALL tag was in the child instead of th
*     e parent program
*1874 * Modified 15:18:33 23 MAY 1999 by FFT version 1.147
*1875 * Reason: Allow for the case where children re-directed by CO to paren
*     ts with no INSTALL CONTROL tag can still have a VERS name tag
*1876 * Modified 16:05:47 23 MAY 1999 by FFT version 1.148
*1877 * Reason: Bring IF ERROR out of GET.MY.CONTROLS include
*1878 * Modified 17:47:16 23 MAY 1999 by FFT version 1.149
*1879 * Reason: Initialize the value of components with using the CO functio
*     n and reset it at the end
*1880 * Modified 19:22:23 23 MAY 1999 by FFT version 1.150
*1881 * Reason: Allow programs to use version control without forcing them t
*     o be re
*1882 * Modified 19:45:15 23 MAY 1999 by FFT version 1.151
*1883 * Reason: ON .Gstring say which stack item number is being moved to th
*     e top
*1884 * Modified 19:53:02 23 MAY 1999 by FFT version 1.152
*1885 * Reason: Fix logic on RECALL that ignored first line of stack
*1886 * Modified 19:53:32 23 MAY 1999 by FFT version 1.153
*1887 * Reason: Fix bug with syntax missing a parenthesis
*1888 * Modified 19:54:54 23 MAY 1999 by FFT version 1.154
*1889 * Reason: Use the ABORT.WITH.INPUT include
*1890 * Modified 20:13:23 23 MAY 1999 by FFT version 1.155
*1891 * Reason: Write old version of non-version-named programs to archive w
*     ith old version name
*1892 * Modified 20:25:03 23 MAY 1999 by FFT version 1.156
*1893 * Reason: Fix small bug in positioning pointer when using .Gstring toi
*     gnore first line
*1894 * Modified 20:28:01 23 MAY 1999 by FFT version 1.157
*1895 * Reason: Improve statement upon finding no stack item matches stringe
*     xcept first when using .Gstr
*1896 * Modified 10:44:03 24 MAY 1999 by FFT version 1.158
*1897 * Reason: Fix bug in getting stack item using .Gstr
*1898 * Modified 13:18:32 24 MAY 1999 by FFT version 1.159
*1899 * Reason: Add HELP line for .C command, globalize setting of T.STACK,T
*     .FILE and T.ITEM variables
*1900 * Modified 13:22:35 24 MAY 1999 by FFT version 1.160
*1901 * Reason: Fix bug with .C option help line
*1902 * Modified 13:25:04 24 MAY 1999 by FFT version 1.161
*1903 * Reason: Add help lines for V and Z commands
*1904 * Modified 13:26:40 24 MAY 1999 by FFT version 1.162
*1905 * Reason: Add CRT to end of breaking input in HELP output display
*1906 * Modified 15:31:46 24 MAY 1999 by FFT version 1.163
*1907 * Reason: Line up items listed when using Z environment variable listi
*     ng
*1908 * Modified 15:33:41 24 MAY 1999 by FFT version 1.164
*1909 * Reason: Indent Z option environment variables a little more
*1910 * Modified 16:16:39 24 MAY 1999 by FFT version 1.165
*1911 * Reason: Allow Quit out of BCOMPARE subroutine
*1912 * Modified 16:17:12 24 MAY 1999 by FFT version 1.166
*1913 * Reason: Fix bug with allowing Quit out of BCOMPARE subroutine
*1914 * Modified 16:31:14 24 MAY 1999 by FFT version 1.167
*1915 * Reason: Move DELETE'd stack items to a special new DELETED stack for
*      easy recovery
*1916 * Modified 16:32:17 24 MAY 1999 by FFT version 1.168
*1917 * Reason: Allow multi-line delete
*1918 * Modified 16:41:27 24 MAY 1999 by FFT version 1.169
*1919 * Reason: Fix bug with multi-line delete only deleting single line bec
*     ause of typo
*1920 * Modified 16:43:14 24 MAY 1999 by FFT version 1.170
*1921 * Reason: Fix bug where multi-line delete stacked deleted lines in rev
*     erse order in new DELETED stack
*1922 * Modified 17:30:37 24 MAY 1999 by FFT version 1.171
*1923 * Reason: Correct bug when putting new name of version controlled prog
*     ram onto stack that it assumed same program filename as WS shell has
*1924 * Modified 17:51:59 24 MAY 1999 by FFT version 1.172
*1925 * Reason: Allow the VERS line in the program (during version control)t
*     o be preceded by whatever
*1926 * Modified 18:19:48 24 MAY 1999 by FFT version 1.173
*1927 * Reason: If there are any errors passed out then print them
*1928 * Modified 18:23:40 24 MAY 1999 by FFT version 1.174
*1929 * Reason: Remove OPEN of MD file
*1930 * Modified 19:30:04 24 MAY 1999 by FFT version 1.175
*1931 * Modified 17:04:31 26 MAY 1999 by willj version 1.176
*1932 * Reason: Install to SCCOE and make mods applicable
*1933 * Modified 18:50:33 26 MAY 1999 by willj version 1.189
*1934 * Reason: Use montgomery's MAKELIVE routine
*1935 * Modified 13:21:34 27 MAY 1999 by willj version 1.190
*1936 * Reason: Fix logic of how to find VERSION.CONTROL tag the new way
*1937 * Modified 13:26:42 27 MAY 1999 by willj version 1.191
*1938 * Reason: Press key before showing will expire or has expired message
*1939 * Modified 13:27:35 27 MAY 1999 by willj version 1.192
*1940 * Reason: Add return after press key message that comes with will expi
*     re or has expired
*1941 * Modified 13:28:17 27 MAY 1999 by willj version 1.193
*1942 * Reason: Add carriage return after will expire or has expired message
*1943 * Modified 13:35:07 27 MAY 1999 by willj version 1.194
*1944 * Reason: Fix problem with syntax of old VERSION CONTROL tag
*1945 * Modified 13:39:59 27 MAY 1999 by willj version 1.195
*1946 * Reason: When using the CO function, assume the components GLOBAL and
*      ENVIRONMENT
*1947 * Modified 14:00:57 27 MAY 1999 by willj version 1.196
*1948 * Reason: Remove reference to GLOBAL.OPENS include
*1949 * Modified 14:59:53 27 MAY 1999 by willj version 1.197
*1950 * Reason: When showing the environment variables, show the stack and c
*     ontrol file first
*1951 * Modified 15:19:43 27 MAY 1999 by willj version 1.198
*1952 * Reason: Display the control file keys for each control when using th
*     e Z environment function
*1953 * Modified 15:20:40 27 MAY 1999 by willj version 1.199
*1954 * Reason: Debug
*1955 * Modified 15:26:14 27 MAY 1999 by willj version 1.200
*1956 * Reason: Limit display of client name in environment display (Z) to 3
*     0 chars
*1957 * Modified 15:35:20 27 MAY 1999 by willj version 1.201
*1958 * Reason: Fix logic of paging during display of environmental variable
*     s (function Z)
*1959 * Modified 15:47:03 27 MAY 1999 by willj version 1.202
*1960 * Reason: Allow display of vendor info to be centered or not centered
*1961 * Modified 15:47:37 27 MAY 1999 by willj version 1.203
*1962 * Reason: Fix typo with display of vendor info
*1963 * Modified 15:48:09 27 MAY 1999 by willj version 1.204
*1964 * Reason: Fix indent on display of vendor info
*1965 * Modified 15:48:54 27 MAY 1999 by willj version 1.205
*1966 * Reason: Make indent on about to expire and has expired match display
*      of vendor info
*1967 * Modified 15:49:23 27 MAY 1999 by willj version 1.206
*1968 * Reason: Fix missing quote in literal display
*1969 * Modified 16:42:10 27 MAY 1999 by willj version 1.207
*1970 * Reason: Begin to enhance contact stack item
*1971 * Modified 17:01:26 27 MAY 1999 by willj version 1.208
*1972 * Reason: Add contact-entry control
*1973 * Modified 17:02:46 27 MAY 1999 by willj version 1.209
*1974 * Reason: Creating new contact was calling an invalid global routine
*1975 * Modified 17:07:40 27 MAY 1999 by willj version 1.210
*1976 * Reason: Add new CONTACT equate include
*1977 * Modified 17:09:00 27 MAY 1999 by willj version 1.211
*1978 * Reason: Initialize K.CONTACT with FFT
*1979 * Modified 17:15:47 27 MAY 1999 by willj version 1.212
*1980 * Reason: If the primary contact (ie FFT) is not in the CONTACTS stack
*      then put them in at the top
*1981 * Modified 17:17:05 27 MAY 1999 by willj version 1.213
*1982 * Reason: Fix bug with last mod where attempt to insert was made befor
*     e stack was read
*1983 * Modified 13:32:06 30 MAY 1999 by FFT version 1.214
*1984 * Reason:
*1985 * Modified 14:56:25 30 MAY 1999 by FFT version 1.215
*1986 * Reason: Fix typo in comments
*1987 * Modified 17:06:24 30 MAY 1999 by FFT version 1.216
*1988 * Reason: Audit the code.includes file
*1989 * Modified 17:12:45 30 MAY 1999 by FFT version 1.217
*1990 * Reason: Audit the we SEGMENT.FILE ("BP")
*1991 * Modified 18:01:42 30 MAY 1999 by FFT version 1.218
*1992 * Reason:
*1993 * Modified 18:10:39 30 MAY 1999 by FFT version 1.219
*1994 * Reason: Add MODS command to show all mods done today
*1995 * Modified 18:11:58 30 MAY 1999 by FFT version 1.220
*1996 * Reason: Print a heading for the MODS command and if no mods say so
*1997 * Modified 18:12:37 30 MAY 1999 by FFT version 1.221
*1998 * Reason: Print an extra return at end of MODS command, and indent res
*     ults
*1999 * Modified 18:16:28 30 MAY 1999 by FFT version 1.222
*2000 * Reason: When auditing program changes, write the name of the NEW ite
*     m to the audit
*2001 * Modified 21:48:40 30 MAY 1999 by FFT version 1.223
*2002 * Reason: Remove the machine-dependent CONVERT function
*2003 * Modified 21:51:25 30 MAY 1999 by FFT version 1.224
*2004 * Reason: Remove the machine-dependent UNASSIGNED function
*2005 * Modified 22:01:49 30 MAY 1999 by FFT version 1.225
*2006 * Reason: Change machine-dependent CHANGE to basic logic change
*2007 * Modified 22:02:50 30 MAY 1999 by FFT version 1.226
*2008 * Reason: Fix comments
*2009 * Modified 22:30:23 30 MAY 1999 by FFT version 1.227
*2010 * Reason:
*2011 * Modified 22:31:30 30 MAY 1999 by FFT version 1.228
*2012 * Reason: Add display of PROC BUFFER once upon entry
*2013 * Modified 22:42:37 30 MAY 1999 by FFT version 1.229
*2014 * Reason: Rebuild change cmd logic so that it was machine-independent
*2015 * Modified 22:43:19 30 MAY 1999 by FFT version 1.230
*2016 * Reason: Fix bad named variable in change cmd logic
*2017 * Modified 22:45:22 30 MAY 1999 by FFT version 1.231
*2018 * Reason: Fix bad variable reference in new change cmd logic
*2019 * Modified 22:46:23 30 MAY 1999 by FFT version 1.232
*2020 * Reason: Fix bad logic in change cmd
*2021 * Modified 11:30:54 31 MAY 1999 by FFT version 1.233
*2022 * Reason:
*2023 * Modified 11:36:22 31 MAY 1999 by FFT version 1.234
*2024 * Reason: Add more comments to edit command
*2025 * Modified 11:55:35 31 MAY 1999 by FFT version 1.235
*2026 * Reason: Add automatic update of version registry file
*2027 * Modified 12:02:21 31 MAY 1999 by FFT version 1.236
*2028 * Reason: Allow new auto-update of version registry file to update sep
*     erate machine-dependent includes properly
*2029 * Modified 12:04:54 31 MAY 1999 by FFT version 1.237
*2030 * Reason: Allow edit program to know the name of the main program file
*2031 * Modified 12:07:22 31 MAY 1999 by FFT version 1.238
*2032 * Reason: Fix logic in auto version registry update for includes thata
*     re not multi-datalevel
*2033 * Modified 12:09:05 31 MAY 1999 by FFT version 1.239
*2034 * Reason: DEBUG
*2035 * Modified 12:09:19 31 MAY 1999 by FFT version 1.240
*2036 * Reason: DEBUG
*2037 * Modified 12:09:46 31 MAY 1999 by FFT version 1.241
*2038 * Reason: DEBUG
*2039 * Modified 12:19:25 31 MAY 1999 by FFT version 1.243
*2040 * Reason: Fix logic in placement of automatic update to version regist
*     ry, (was put too low in edit logic)
*2041 * Modified 12:26:00 31 MAY 1999 by FFT version 1.244
*2042 * Reason: DEBUG
*2043 * Modified 12:32:39 31 MAY 1999 by FFT version 1.245
*2044 * Reason: DEBUG
*2045 * Modified 12:38:06 31 MAY 1999 by FFT version 1.246
*2046 * Reason: Re-arrange order of processing in edit program to correctlyr
*     ecord changes to MODS
*2047 * Modified 12:38:20 31 MAY 1999 by FFT version 1.247
*2048 * Reason: DEBUG
*2049 * Modified 12:39:02 31 MAY 1999 by FFT version 1.248
*2050 * Reason: DEBUG
*2051 * Modified 12:39:23 31 MAY 1999 by FFT version 1.249
*2052 * Reason: DEBUG
*2053 * Modified 12:41:01 31 MAY 1999 by FFT version 1.250
*2054 * Reason: Fix variable in basic logic, who is self that I should chain
*      to him
*2055 * Modified 12:44:19 31 MAY 1999 by FFT version 1.251
*2056 * Reason: Fix logic with determining who am i and who am i when im a n
*     ew version of myself
*2057 * Modified 13:12:33 31 MAY 1999 by FFT version 1.252
*2058 * Reason: Remove open of version registry, it will be done in the glob
*     al include
*2059 * Modified 14:07:37 31 MAY 1999 by FFT version 1.253
*2060 * Reason: Display error if it occurs when using CO function
*2061 * Modified 14:11:47 31 MAY 1999 by FFT version 1.254
*2062 * Reason: Show more of the control file structure when using the ENVIR
*     ONMENT routine
*2063 * Modified 14:14:07 31 MAY 1999 by FFT version 1.255
*2064 * Reason: Show flag variables when using the ENVIRONMENT routine
*2065 * Modified 15:14:00 31 MAY 1999 by FFT version 1.256
*2066 * Reason: Fix logic that determine self-compilation
*2067 * Modified 18:19:00 31 MAY 1999 by FFT version 1.257
*2068 * Reason: Fix when you use the insert function, getting extra carriage
*      returns
*2069 * Modified 18:50:09 31 MAY 1999 by FFT version 1.258
*2070 * Reason: Build logic for auto-archiving programs with VERSION HOLDERt
*     ags
*2071 * Modified 15:49:02 03 JUN 1999 by willj version 1.259
*2072 * Reason: Replace EXECUTE.WITHDEFSEL with CALL EXECUTE routine
*2073 * Modified 15:52:10 03 JUN 1999 by willj version 1.260
*2074 * Reason: Fix bug with use of R.WHOAMI variable not getting assigned
*2075 * Modified 16:25:12 03 JUN 1999 by willj version 1.261
*2076 * Reason: Add O function to output stack program
*2077 * Modified 16:35:02 03 JUN 1999 by willj version 1.262
*2078 * Reason: Allow O function to send E-mail
*2079 * Modified 16:35:36 03 JUN 1999 by willj version 1.263
*2080 * Reason: Fix typo in name of sendmail verb variable
*2081 * Modified 16:35:57 03 JUN 1999 by willj version 1.264
*2082 * Reason: Fix typo in name of LINE variable
*2083 * Modified 16:38:30 03 JUN 1999 by willj version 1.265
*2084 * Reason: Fix error where contact record couldn't be read from control
*      file when using O fuction to send E-mail to first contact
*2085 * Modified 16:40:52 03 JUN 1999 by willj version 1.266
*2086 * Reason: Fix bug where contact companyname was misnamed causing it no
*     t to appear when using O function to send email to first contact
*2087 * Modified 16:55:48 03 JUN 1999 by willj version 1.267
*2088 * Reason: Fix typo in name of control record to read when using O func
*     tion to send email to first contact
*2089 * Modified 17:46:11 03 JUN 1999 by willj version 1.268
*2090 * Reason: Replace older EXECUTE subroutine with newer one
*2091 * Modified 17:51:53 03 JUN 1999 by willj version 1.269
*2092 * Reason: Fix bug where auto-version control being not too picky was o
*     ver-stamping the wrong line
*2093 * Modified 17:59:02 03 JUN 1999 by willj version 1.270
*2094 * Reason: EXECUTE routine was not functioning because it was passing t
*     he wrong variable as the WHICH trigger
*2095 * Modified 18:05:20 03 JUN 1999 by willj version 1.271
*2096 * Reason: Bug where existing select list on Universe would not get pas
*     sed to next executed command
*2097 * Modified 18:09:23 03 JUN 1999 by willj version 1.272
*2098 * Reason: Fix bug where on universe previously selected lists were get
*     ting blown away
*2099 * Modified 18:10:45 03 JUN 1999 by willj version 1.273
*2100 * Reason: DEBUG
*2101 * Modified 18:14:19 03 JUN 1999 by willj version 1.274
*2102 * Reason: Fix bug where a select list was getting blown-away on UNIVER
*     SE
*2103 * Modified 18:14:48 03 JUN 1999 by willj version 1.275
*2104 * Reason: Fix typo that was preventing compilation
*2105 * Modified 18:16:48 03 JUN 1999 by willj version 1.276
*2106 * Reason:
*2107 * Modified 18:18:17 03 JUN 1999 by willj version 1.277
*2108 * Reason:
*2109 * Modified 18:27:59 03 JUN 1999 by willj version 1.278
*2110 * Reason: Turn on L and GL functions inside the O function
*2111 * Modified 18:28:24 03 JUN 1999 by willj version 1.279
*2112 * Reason: Fix variable name of control file that had typo in it
*2113 * Modified 18:30:48 03 JUN 1999 by willj version 1.280
*2114 * Reason: Turn on O function inside O Email function
*2115 * Modified 21:33:20  04 JUN 1999 by FFT version K.2
*2116 * Reason:
*2117 * Modified 21:47:16  04 JUN 1999 by FFT version 1.281
*2118 * Reason: Fix bug where a new contact was not getting their contact id
*      set properly
*2119 * Modified 23:12:57  04 JUN 1999 by FFT version 1.282
*2120 * Reason: Use FFTFORMAT program
*2121 * Modified 14:53:19  07 JUN 1999 by FFT version 1.283
*2122 * Reason: Start changes necessary to allow copying a file to a hostpat
*2123 * Modified 14:55:35  07 JUN 1999 by FFT version 1.284
*2124 * Reason: Fix problem with VERSION CONTROL tag
*2125 * Modified 15:00:10  07 JUN 1999 by FFT version 1.285
*2126 * Reason: Finish draft of changes necessary to copy a file to a hostpa
*     th location
*2127 * Modified 15:01:00  07 JUN 1999 by FFT version 1.286
*2128 * Reason: Add O function to HELP display
*2129 * Modified 15:02:43  07 JUN 1999 by FFT version 1.287
*2130 * Reason: Correct typo in name of hostpaths stack in new O to hostpath
*      function
*2131 * Modified 15:08:03  07 JUN 1999 by FFT version 1.288
*2132 * Reason: Add code after O, H, B sequence to actually do the copy
*2133 * Modified 16:16:51  07 JUN 1999 by FFT version 1.289
*2134 * Reason:
*2135 * Modified 16:18:18  07 JUN 1999 by FFT version 1.290
*2136 * Reason: Fix bug that tohostpath verb doesn't use stacked input
*2137 * Modified 16:25:17  07 JUN 1999 by FFT version 1.291
*2138 * Reason: When writing item using tohost function in O output function
*     , write to same directory and item and with a .txt extension
*2139 * Modified 16:32:06  07 JUN 1999 by FFT version 1.292
*2140 * Reason: When using the tohostpath function of the output function, c
*     hange name of file and item if they have embedded periods in them
*2141 * Modified 17:53:40  07 JUN 1999 by FFT version 1.294
*2142 * Reason: Add call to new translate punctuation program for windows fi
*     le names
*2143 * Modified 17:55:40  07 JUN 1999 by FFT version 1.295
*2144 * Reason: Add error flag to translate punctuation routine
*2145 * Modified 13:30:45  08 JUN 1999 by FFT version 1.296
*2146 * Reason: Rough draft at logic to store and display mods details recor
*2147 * Modified 13:32:24  08 JUN 1999 by FFT version 1.297
*2148 * Reason: Add missing carriage return to new mods display logic
*2149 * Modified 13:34:10  08 JUN 1999 by FFT version 1.298
*2150 * Reason: Fix logic setting wrong progname into mod detail item
*2151 * Modified 13:47:18  08 JUN 1999 by FFT version 1.299
*2152 * Reason: Allow mods function to accept dates other than today
*2153 * Modified 13:47:39  08 JUN 1999 by FFT version 1.300
*2154 * Reason: Fix missing quote in new mods logic
*2155 * Modified 13:49:31  08 JUN 1999 by FFT version 1.301
*2156 * Reason: Fix bad logic in update to mods details control record
*2157 * Modified 13:51:19  08 JUN 1999 by FFT version 1.302
*2158 * Reason: Display more appropriate message if no mods on a certain pas
*     t date, was just always saying NO MODS TODAY
*2159 * Modified 13:53:45  08 JUN 1999 by FFT version 1.303
*2160 * Reason: Fix logic of what happens when mods details is initially non
*     -existent, was not putting result in correct attribute
*2161 * Modified 16:56:50  08 JUN 1999 by FFT version 1.304
*2162 * Reason: Fix logic in recording mod details, wasn't recording name on
*      detail line and was using wrong version variable
*2163 * Modified 17:01:45  08 JUN 1999 by FFT version 1.305
*2164 * Reason: Line up mod details
*2165 * Modified 17:02:41  08 JUN 1999 by FFT version 1.306
*2166 * Reason: Fix logic in lining up mod details
*2167 * Modified 17:05:40  08 JUN 1999 by FFT version 1.307
*2168 * Reason: Fix logic in lining up mods details if parts of the detailsa
*     re missing
*2169 * Modified 17:06:20  08 JUN 1999 by FFT version 1.308
*2170 * Reason: Add extra carraige return to mod details function
*2171 * Modified 17:12:25  08 JUN 1999 by FFT version 1.310
*2172 * Reason: DEBUGGING
*2173 * Modified 17:12:51  08 JUN 1999 by FFT version 1.311
*2174 * Reason: DEBUGGING
*2175 * Modified 17:31:48  08 JUN 1999 by FFT version 1.314
*2176 * Reason: Fix logic in auto-archive wasn't generating correct old vers
*      program name
*2177 * Modified 17:42:19  08 JUN 1999 by FFT version 1.316
*2178 * Reason: Fix logic in determining record id in auto archive
*2179 * Modified 17:46:34  08 JUN 1999 by FFT version 1.318
*2180 * Reason: Fix logic regarding the building of the old ids in the autoa
*     rchive function
*2181 * Modified 17:47:55  08 JUN 1999 by FFT version 1.319
*2182 * Reason: DEBUGGING
*2183 * Modified 20:45:03  08 JUN 1999 by FFT version 1.320
*2184 * Reason: Change all @AM into AM
*2185 * Modified 20:47:10  08 JUN 1999 by FFT version 1.321
*2186 * Reason: DEBUGGING
*2187 * Modified 20:47:22  08 JUN 1999 by FFT version 1.322
*2188 * Reason: DEBUGGING
*2189 * Modified 20:49:03  08 JUN 1999 by FFT version 1.323
*2190 * Reason: Turn on final step of auto-archive, to delete from primary c
*     ode file
*2191 * Modified 20:59:16  08 JUN 1999 by FFT version 1.324
*2192 * Reason: Allow premature exit from list command on Q or ctrl-x
*2193 * Modified 21:00:07  08 JUN 1999 by FFT version 1.325
*2194 * Reason: Fix logic that allowed premature exit from list command, was
*      not recognizing ctrl-x
*2195 * Modified 14:41:18 09 JUN 1999 by willj version 1.326
*2196 * Reason: Write NOVERS to the mod details item for programs that do no
*     t use version control
*2197 * Modified 17:10:10 09 JUN 1999 by willj version 1.327
*2198 * Reason: Create my own makelive program
*2199 * Modified 17:19:07 09 JUN 1999 by willj version 1.328
*2200 * Reason: Fix bug where install admin was not getting properly read wh
*     en trying to edit a program
*2201 * Modified 17:50:54  11 JUN 1999 by FFT version 1.329
*2202 * Reason: Move location of K.PROGRAM variable up
*2203 * Modified 18:57:04  11 JUN 1999 by FFT version 1.330
*2204 * Reason: Change the stack file name variable and its pointer name tou
*     se the new ws variables
*2205 * Modified 12:42:24  13 JUN 1999 by FFT version 1.331
*2206 * Reason: Add WS version as a component of itself
*2207 * Modified 14:02:06  13 JUN 1999 by FFT version 1.332
*2208 * Reason: Replace use of SET-FILE verb with coding the logic right int
*     o this program
*2209 * Modified 11:27:13  14 JUN 1999 by FFT version 1.334
*2210 * Reason:
*2211 * Modified 12:48:53  14 JUN 1999 by FFT version 1.335
*2212 * Reason: Add control stack
*2213 * Modified 13:06:34  14 JUN 1999 by FFT version 1.336
*2214 * Reason: Allow modifying controls added to control stack
*2215 * Modified 13:14:15  14 JUN 1999 by FFT version 1.337
*2216 * Reason: Fix bug that insert was allowing null lines
*2217 * Modified 13:16:39  14 JUN 1999 by FFT version 1.338
*2218 * Reason: Fix bug that control stack was getting install control withw
*     rong id
*2219 * Modified 13:24:55  14 JUN 1999 by FFT version 1.339
*2220 * Reason: Allow an item in the controls stack to be edited with the Ef
*     unction and block stacks other then controls and program from using th
*     e E funct
*2221 * Modified 14:34:57  14 JUN 1999 by FFT version 1.340
*2222 * Reason: Fix display of weburl when one is present
*2223 * Modified 14:36:51  14 JUN 1999 by FFT version 1.341
*2224 * Reason:
*2225 * Modified 14:37:44  14 JUN 1999 by FFT version 1.342
*2226 * Reason: Fix bug that E-mail address was not appearing when user sele
*     cted V option
*2227 * Modified 15:49:47  14 JUN 1999 by FFT version 1.343
*2228 * Reason: Move program name variable higher
*2229 * Modified 20:21:10  14 JUN 1999 by FFT version 1.344
*2230 * Reason: Change all references to machine array to be just seperate m
*     achine variables
*2231 * Modified 11:03:05  15 JUN 1999 by FFT version 1.345
*2232 * Reason: Change all PRINT statements before char input into CRT state
*     ments
*2233 * Modified 12:46:31  15 JUN 1999 by FFT version 1.346
*2234 * Reason: Make help dependent of os and database
*2235 * Modified 12:46:52  15 JUN 1999 by FFT version 1.347
*2236 * Reason:
*2237 * Modified 12:57:17  15 JUN 1999 by FFT version 1.348
*2238 * Reason: Make bcompare, format and makelive toggle if they don't exis
*     t on this account
*2239 * Modified 12:58:17  15 JUN 1999 by FFT version 1.349
*2240 * Reason: Fix logic in making format and makelive toggle, was using wr
*     ong names for programs
*2241 * Modified 13:29:28  15 JUN 1999 by FFT version 1.350
*2242 * Reason: Add first step of tutor mode
*2243 * Modified 13:30:11  15 JUN 1999 by FFT version 1.351
*2244 * Reason: Fix logic in setting tutor mode, should be boolean, wasnt
*2245 * Modified 13:30:59  15 JUN 1999 by FFT version 1.352
*2246 * Reason: Add tutor command processed on command line
*2247 * Modified 13:31:56  15 JUN 1999 by FFT version 1.353
*2248 * Reason: Fix logic in setting tutor mode, wasnt allowing a TUTOR requ
*     est to be processed
*2249 * Modified 13:34:09  15 JUN 1999 by FFT version 1.354
*2250 * Reason: Fix logic in starting tutor, wasnt setting step properly ifu
*     ser requests tutor
*2251 * Modified 13:35:44  15 JUN 1999 by FFT version 1.355
*2252 * Reason:
*2253 * Modified 13:44:27  15 JUN 1999 by FFT version 1.356
*2254 * Reason:
*2255 * Modified 13:45:17  15 JUN 1999 by FFT version 1.357
*2256 * Reason:
*2257 * Modified 13:48:27  15 JUN 1999 by FFT version 1.358
*2258 * Reason: Add a tutor step for the ?
*2259 * Modified 13:48:48  15 JUN 1999 by FFT version 1.359
*2260 * Reason:
*2261 * Modified 13:55:27  15 JUN 1999 by FFT version 1.360
*2262 * Reason: Line up the help text
*2263 * Modified 13:56:20  15 JUN 1999 by FFT version 1.361
*2264 * Reason:
*2265 * Modified 14:01:03  15 JUN 1999 by FFT version 1.362
*2266 * Reason: Line up help
*2267 * Modified 14:13:18  15 JUN 1999 by FFT version 1.363
*2268 * Reason: Add help descriptions for TUTOR and UPGRADE
*2269 * Modified 14:16:19  15 JUN 1999 by FFT version 1.364
*2270 * Reason: Page on each major section of shell help
*2271 * Modified 15:02:56  15 JUN 1999 by FFT version 1.365
*2272 * Reason:
*2273 * Modified 15:03:23  15 JUN 1999 by FFT version 1.366
*2274 * Reason:
*2275 * Modified 15:08:28  15 JUN 1999 by FFT version 1.367
*2276 * Reason: Make tutor steps an external subroutine
*2277 * Modified 15:12:57  15 JUN 1999 by FFT version 1.368
*2278 * Reason:
*2279 * Modified 15:14:30  15 JUN 1999 by FFT version 1.369
*2280 * Reason: Change tutor mode settings from OFF/ON to ZEROED/SET
*2281 * Modified 15:15:29  15 JUN 1999 by FFT version 1.370
*2282 * Reason: Add components and error to arguments to TUTOR
*2283 * Modified 15:18:35  15 JUN 1999 by FFT version 1.371
*2284 * Reason: Add a visual message to prompt environment when tutor is on
*2285 * Modified 15:20:59  15 JUN 1999 by FFT version 1.372
*2286 * Reason: Fix logic when tutor mode is off, was getting vnab on tutors
*     tep
*2287 * Modified 15:23:53  15 JUN 1999 by FFT version 1.373
*2288 * Reason: Make prompt into a variable
*2289 * Modified 15:39:08  15 JUN 1999 by FFT version 1.374
*2290 * Reason: Add a maxstep argument to the tutor
*2291 * Modified 15:40:31  15 JUN 1999 by FFT version 1.375
*2292 * Reason:
*2293 * Modified 15:48:56  15 JUN 1999 by FFT version 1.376
*2294 * Reason: Add a message when the tutor ends
*2295 * Modified 15:50:40  15 JUN 1999 by FFT version 1.377
*2296 * Reason: Add more descriptive text at the end of the tutor
*2297 * Modified 15:50:47  15 JUN 1999 by FFT version 1.378
*2298 * Reason:
*2299 * Modified 16:18:45  15 JUN 1999 by FFT version 1.379
*2300 * Reason:
*2301 * Modified 16:35:37  15 JUN 1999 by FFT version 1.380
*2302 * Reason: Display name of stacks in /Z environmental settings
*2303 * Modified 16:36:26  15 JUN 1999 by FFT version 1.381
*2304 * Reason: Add spacing before display of stack names in environmental s
*     ettings display function
*2305 * Modified 16:53:24  15 JUN 1999 by FFT version 1.382
*2306 * Reason: Center the upgrade message
*2307 * Modified 17:51:51  15 JUN 1999 by FFT version 1.383
*2308 * Reason: Move the processing of the tutor step to the top of the proc
*     ess loop
*2309 * Modified 17:54:55  15 JUN 1999 by FFT version 1.384
*2310 * Reason:
*2311 * Modified 17:55:41  15 JUN 1999 by FFT version 1.385
*2312 * Reason: Add center flag before calling display vendor info when tuto
*     r step is out-of-synce
*2313 * Modified 17:58:41  15 JUN 1999 by FFT version 1.386
*2314 * Reason:
*2315 * Modified 18:32:24  15 JUN 1999 by FFT version 1.387
*2316 * Reason: Enhance the tutor error message
*2317 * Modified 18:33:31  15 JUN 1999 by FFT version 1.388
*2318 * Reason: Add a clear screen to end of tutor error message
*2319 * Modified 19:08:11  15 JUN 1999 by FFT version 1.389
*2320 * Reason: Only show the TTY in the prompt area if this is a Unix syste
*     m
*2321 * Modified 19:11:16  15 JUN 1999 by FFT version 1.390
*2322 * Reason: Add program name and version to prompt environment, add TUTO
*     R to prompt environment
*2323 * Modified 19:56:11  15 JUN 1999 by FFT version 2.1
*2324 * Reason:
*2325 * Modified 08:36:54  16 JUN 1999 by FFT version 2.2
*2326 * Reason: Make tutor step start off at zero
*2327 * Modified 14:51:45 16 JUN 1999 by willj version 2.3
*2328 * Reason:
*2329 * Modified 17:51:15 16 JUN 1999 by willj version 2.4
*2330 * Reason: Remove extraneous EXECUTE where old SET-FILE used to be that
*      is now gone
*2331 * Modified 10:58:18 17 JUN 1999 by willj version 2.5
*2332 * Reason: Remove expanded GET.SENTENCE
*2333 * Modified 13:28:55 17 JUN 1999 by willj version 2.6
*2334 * Reason:
*2335 * Modified 13:31:01 17 JUN 1999 by willj version 2.7
*2336 * Reason: Assign defaultlist to internal variable on universe
*2337 * Modified 13:34:32 17 JUN 1999 by willj version 2.8
*2338 * Reason:
*2339 * Modified 14:40:45 17 JUN 1999 by willj version 2.9
*2340 * Reason: Add more components to the component listing
*2341 * Modified 14:43:15 17 JUN 1999 by willj version 2.10
*2342 * Reason: Fix name of component
*2343 * Modified 15:17:12 17 JUN 1999 by willj version 2.11
*2344 * Reason: Change default numbers of lines to list in stack from 20 to1
*     8 to accomodate larger prompt environment
*2345 * Modified 17:56:49 17 JUN 1999 by willj version 2.12
*2346 * Reason: Add the program control for tutor to the component list
*2347 * Modified 11:32:23  20 JUN 1999 by FFT version 2.13
*2348 * Reason: Parameterize name and number of stacks
*2349 * Modified 11:32:39  20 JUN 1999 by FFT version 2.14
*2350 * Reason:
*2351 * Modified 11:39:17  20 JUN 1999 by FFT version 2.15
*2352 * Reason: Fix unassigned var if wsoptions is null
*2353 * Modified 11:43:13  20 JUN 1999 by FFT version 2.16
*2354 * Reason:
*2355 * Modified 11:50:12  20 JUN 1999 by FFT version 2.17
*2356 * Reason:
*2357 * Modified 11:54:14  20 JUN 1999 by FFT version 2.18
*2358 * Reason: Add the .E function, make the reading of stacks an internals
*     ubroutine
*2359 * Modified 11:54:45  20 JUN 1999 by FFT version 2.19
*2360 * Reason:
*2361 * Modified 12:38:14  20 JUN 1999 by FFT version 2.20
*2362 * Reason: Treat the installer as a plug-in, and when you switch stacks
*      to it, display its unique commands
*2363 * Modified 12:39:16  20 JUN 1999 by FFT version 2.21
*2364 * Reason:
*2365 * Modified 12:40:19  20 JUN 1999 by FFT version 2.22
*2366 * Reason:
*2367 * Modified 12:42:42  20 JUN 1999 by FFT version 2.23
*2368 * Reason:
*2369 * Modified 12:46:29  20 JUN 1999 by FFT version 2.24
*2370 * Reason: Correct display of installer cmdlist on first switching to i
*     t
*2371 * Modified 12:55:24  20 JUN 1999 by FFT version 2.25
*2372 * Reason: Make several intrinsic commands only work on the PROG stack
*2373 * Modified 12:55:54  20 JUN 1999 by FFT version 2.26
*2374 * Reason:
*2375 * Modified 12:56:29  20 JUN 1999 by FFT version 2.27
*2376 * Reason:
*2377 * Modified 13:13:47  20 JUN 1999 by FFT version 2.28
*2378 * Reason: Set commands relevant only to program stack into a subroutin
*     e
*2379 * Modified 13:34:25  20 JUN 1999 by FFT version 2.29
*2380 * Reason:
*2381 * Modified 13:35:46  20 JUN 1999 by FFT version 2.30
*2382 * Reason:
*2383 * Modified 13:37:32  20 JUN 1999 by FFT version 2.31
*2384 * Reason: Set stack dependent help on entry to stacker
*2385 * Modified 13:39:52  20 JUN 1999 by FFT version 2.32
*2386 * Reason:
*2387 * Modified 13:43:29  20 JUN 1999 by FFT version 2.33
*2388 * Reason: Add logic to call installer plug-in if stack is installer an
*     d a special command is execute
*2389 * Modified 19:01:06  21 JUN 1999 by FFT version 2.34
*2390 * Reason: Only execute a command against a stack if its valid, otherwi
*     se execute it against TCL
*2391 * Modified 19:04:10  21 JUN 1999 by FFT version 2.35
*2392 * Reason: Set stack dependent help on every switch of the stack
*2393 * Modified 19:46:11  21 JUN 1999 by FFT version 2.36
*2394 * Reason:
*2395 * Modified 19:48:55  21 JUN 1999 by FFT version 2.37
*2396 * Reason: Write new files variable out as a control
*2397 * Modified 15:30:43  22 JUN 1999 by FFT version 2.38
*2398 * Reason: Add variable for hostpath delimiter so uninstaller doesn't t
*     rip on seeing a backslash
*2399 * Modified 15:33:26  22 JUN 1999 by FFT version 2.39
*2400 * Reason:
*2401 * Modified 15:44:13  22 JUN 1999 by FFT version 2.40
*2402 * Reason:
*2403 * Modified 18:45:15  22 JUN 1999 by FFT version 2.41
*2404 * Reason: Fix logic of first-time to allow installing, exiting and run
*     ning to be considered a first-tiem
*2405 * Modified 11:53:10 24 JUN 1999 by willj version 2.42
*2406 * Reason: Call newest version of installer
*2407 * Modified 12:56:36 24 JUN 1999 by willj version 2.43
*2408 * Reason:
*2409 * Modified 16:24:46 25 JUN 1999 by Administrator version 2.44
*2410 * Reason: Add writing of CONTROLS type record to control file
*2411 * Modified 16:25:07 25 JUN 1999 by Administrator version 2.45
*2412 * Reason:
*2413 * Modified 18:40:53 25 JUN 1999 by Administrator version 2.46
*2414 * Reason:
*2415 * Modified 18:47:13 25 JUN 1999 by Administrator version 2.47
*2416 * Reason:
*2417 * Modified 18:47:40 25 JUN 1999 by Administrator version 2.48
*2418 * Reason:
*2419 * Modified 18:51:28 25 JUN 1999 by Administrator version 2.49
*2420 * Reason: Allow any punctuation char to be the delimiter in the change
*      cmd
*2421 * Modified 18:53:54 25 JUN 1999 by Administrator version 2.50
*2422 * Reason: Make a null command only valid when in tutor mode
*2423 * Modified 21:01:50 25 JUN 1999 by Administrator version 2.69
*2424 * Reason: A whole bunch of debugging to make the double-line execute/s
*     elect logic work on Universe for Windows NT
*2425 * Modified 18:33:30 27 JUN 1999 by Administrator version 2.70
*2426 * Reason: Create three levels of version control and also fix the bug 
*     that version control programs were compiling twice per change
*2427 * Modified 19:33:18 27 JUN 1999 by Administrator version 2.70.1
*2428 * Reason: Fix bug where list stack command would ask for a keystroke t
*     o page even though its at the end of user's selection
*2429 * Modified 19:34:39 27 JUN 1999 by Administrator version 2.70.2
*2430 * Reason: DEBUG last change
*2431 * Modified 20:11:34 27 JUN 1999 by Administrator version 2.70.4
*2432 * Reason: If this is a Universe running Ideal flavor then add the LOCA
*     L directive to the catalog command
*2433 * Modified 21:15:27 27 JUN 1999 by Administrator version 2.70.5
*2434 * Reason: Add the edit capability back to the controls stack
*2435 * Modified 21:15:48 27 JUN 1999 by Administrator version 2.70.6
*2436 * Reason: Remove the redundant display of the 1/2/3 options on changes
*2437 * Modified 21:18:14 27 JUN 1999 by Administrator version 2.70.7
*2438 * Reason: Allow the edit command to be handled by the controls stack
*2439 * Modified 21:22:25 27 JUN 1999 by Administrator version 2.70.8
*2440 * Reason: Add methods for determining the keys to client and vendor co
*     ntrols to the edit control logic
*2441 * Modified 21:43:36 27 JUN 1999 by Administrator version 2.71.0
*2442 * Reason: Reinstate the ability to execute any command from the data o
*     r tcl stacks
*2443 * Modified 21:46:28 27 JUN 1999 by Administrator version 2.72.0
*2444 * Reason: Allow the use of the use directive on the data and tcl stack
*     s
*2445 * Modified 13:03:57 29 JUN 1999 by Administrator version 2.72.1
*2446 * Reason: Change reference to installer back to INSTALLER from INSTALL
*     ER.2.0
147:
LINE = "BASIC FFT.BP WS#VERS2.72.1"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP WS#VERS2.72.1"; GOSUB PROCESS.COMMAND
ITEMLIST = "WS"
LINE = "ADD FFT.BP"
I.STACK = 150; GOSUB PROCESS.COMMAND
GOTO 150
*!VERSION 2.45.7
*!ZIPSTAMP = 15:30:47 29 JUN 1999
*!STARTNEWITEM
*WS
*0001 * COPYRIGHT 1992-1999 FAST FORWARD TECHNOLOGIES
*0002 * LIMITED LICENSE IS PROVIDED TO :
*0003 *   The Santa Clara County Office of Education
*0004 * WARNING! WARNING! WARNING!
*0005 * This program may not be duplicated, sold, given, exchanged, modified
*0006 * transferred, downloaded, decompiled, or otherwise made available to
*0007 * any third party without the express writen and notarized consent of
*0008 * FAST FORWARD TECHNOLOGIES, INC.
*0009 * Written in the distant past by
*0010 * Will Johnson
*0011 *
*0012 ******
*0013       EQUATE AM TO CHAR(254)
*0014       VERS ='2.72.1'
*0015       COMPONENTS = 'MD FFT':AM:'FFT.BP WS':AM:'FFT.BP WSOLD'
*0016       ERROR = ''
*0017       CALL.ID = 'WS#VERS':VERS
*0018       CALL @CALL.ID(VERS,COMPONENTS,ERROR)
150:
LINE = "BASIC FFT.BP WS"; GOSUB PROCESS.COMMAND
LINE = "CATALOG FFT.BP WS"; GOSUB PROCESS.COMMAND
LINE = "CHAIN WS"; GOSUB PROCESS.COMMAND
GOSUB WRAPUP; STOP
Personal tools
MOOCOW
Google AdSense