home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #1 / monster.zip / monster / BBS_UTIL / BM0406_A.ZIP / 0406.ZIP / RSB50406.MRG < prev   
Text File  |  1994-04-06  |  125KB  |  2,407 lines

  1. * ------------[ BLED merge (c) Ken Goosens ]-------------
  2. * Merge this against RBBSSUB5.BAS to produce RBBSSUB5.BAS
  3. * RBBSSUB5.BAS:  Date 6-20-1992  Size 116575 bytes
  4. * BusiMod (tm) mods for RBBS v17.4 - (c) 1993,94 by respective authors
  5. * RBBS v17.4 (c) 1986,1992 by D Thomas Mack
  6. * ------------[ Created 04-06-1994 22:00:00 ]------------
  7. * REPLACING old line(s) by new
  8. ' $linesize:132
  9. ' $title: 'RBBSSUB5.BAS 17.4, Copyright 1986 - 92 by D. Thomas Mack'
  10. '  Copyright 1991 by D. Thomas Mack, all rights reserved.
  11. '  Name ...............: RBBSSUB5.BAS
  12. '  First Released .....: June 21, 1992
  13. '  Subsequent Releases.: 
  14. '  Copyright ..........: 1986 - 1992
  15. '  Purpose.............: The Remote Bulletin Board System for the IBM PC,
  16. '     RBBS-PC.BAS utilizes a lot of common subroutines.  Those that do not
  17. '     require error trapping are incorporated within RBBSSUB 2-5 as
  18. '     separately callable subroutines in order to free up as much
  19. '     code as possible within the 64K code segment used by RBBS-PC.BAS.
  20. '  Parameters..........: Most parameters are passed via a COMMON statement.
  21. '
  22. ' Subroutine  Line               Function of Subroutine
  23. '   Name     Number
  24. * ------[ first line different ]------
  25. '  BreakFileName  63300  Break file name into component parts
  26. '  ChkAddedTime   63056  Check whether ok to extend time remaining   ' SK01601
  27. ' CmdStackPushPop 63500  Save/Restore command stack
  28. '  DoorReturn     63100  Process door requests
  29. '  FdMacExe       63462  Executes a found macro
  30. '  FileSystem     20117  File System for RBBS-PC
  31. '  FileLister     65009  To handle list of files for uploading       ' BTCH174
  32. ' HSAddFileSearch 65110  Search additional U/L files for duplication ' BTCH174/RM111001
  33. '  HSFile         65099  Checks XFER%node%-DEF for extra HS uploaded files ' BTCH174
  34. '  MultiFile      91000  Check user entry for a range of numbers' ' DGS110301-DS
  35. '  NoExt          65140  Rejects files with extensions SysOp defines ' NEXT174/RM112001
  36. '  RestoreCom     63310  Restore comm port after external program
  37. '  ReadMacro      63330  Read and process macro
  38. '  TStats         65004  Display file transfer stats                 ' XFER174
  39. '  WildDown          50  Find matches to input for download
  40. '  WildMark       90000  edit marked files after wildcard marking     ' DGS102703-DS
  41. '  WildShow       87000  Show the marked wildcard files to the user   ' DGS102703-DS
  42. '
  43. '  $INCLUDE: 'RBBS-VAR.BAS'
  44. '
  45. * INSERTING new line(s)
  46. 50  ' $SUBTITLE: 'WildDown - searches for wildcard files'
  47. ' $PAGE
  48. '
  49. '  NAME    -- WildDown
  50. '
  51. '  INPUTS  --     PARAMETER                    MEANING
  52. '
  53. '
  54. '
  55. '  OUTPUTS --  List of files matching wilcard input string
  56. '
  57. '
  58. '  PURPOSE --  To search the directories listed in CONFIG, the
  59. '              Location Index and the WildDown configuration file
  60. '              for files which match the string input by the user
  61. '
  62. ' * Originaly by Richard Todd (1:3612/299)
  63. ' * Changes for BusiMods by Dan Shore and Richie Molinelli
  64. ' *
  65. '
  66. ' ***  WILDDOWN  -  Find matches to input for download  ***
  67. '
  68. '
  69. ' * read in the config file
  70. '
  71.  
  72. 100   SUB WILDDOWN (FilName$,MarkedFiles$,FastFileList$,Found)       ' RM03139401
  73.       Found = ZFalse
  74.       IF LEN(MID$(FilName$,1,INSTR(FilName$,".") - 1)) > 8 THEN _
  75.          CALL QuickTPut1 (ZFG6$ + "File search string " + ZFG7$ + FilName$ + _
  76.                ZFG6$ + " exceeds allowable characters!" + ZEmphasizeOff$) : _ ' RM03259401
  77.                EXIT SUB
  78.       CALL QuickTPut (ZFG5$ + "Looking for Matches to " + _
  79.                   ZFGB$ + FilName$ + ZFG5$ + SPACE$(3) + ZEmphasizeOn$ + _
  80.                   "(<CTRL-X> Aborts)" + ZEmphasizeOff$,0)
  81.       NumDots = 0
  82.       CfgFileName$ = LEFT$(FastFileList$, INSTR(FastFileList$, ".") -1) + ".CFG" ' RM03279401
  83.       CALL LinesInFile (CfgFileName$,LineCount)                      ' RM03059401
  84.       IF LineCount < 10 THEN _                                       ' RM03199401
  85.          LineCount = 10                                              ' RM03199401
  86.       IF UBOUND(ZOutTxt$) < LineCount THEN _                         ' RM03289401
  87.          REDIM ZOutTxt$(LineCount)                                   ' RM03059401
  88.       FilNum = FREEFILE                                              ' RM03049401
  89.       CALL OpenWork (FilNum,CfgFileName$)                            ' RM03049401
  90.       CALL ReadDir (FilNum,1)                                        ' RM03049401
  91.       MaxFiles = VAL(MID$(ZOutTxt$,1,INSTR(ZOutTxt$,",")-1))         ' DGS101801-DS
  92.       IF MaxFiles > 100 THEN _                                       ' RM03289401
  93.          MaxFiles = 100                                              ' RM03289401
  94.       IF UBOUND(ZUserIn$) < MaxFiles THEN _                          ' RM03289401
  95.          REDIM PRESERVE ZUserIn$(MaxFiles)                           ' RM03289401
  96.       Comma = INSTR(ZOutTxt$,",")                                    ' DGS101801-DS
  97.       IF Comma > 0 THEN _                                            ' DGS101801-DS
  98.          MaxLines = VAL(MID$(ZOutTxt$,Comma+1)) _                    ' DGS101801-DS
  99.       ELSE MaxLines = 9999                                           ' DGS101801-DS
  100. '
  101. ' * check for previously marked files
  102. '
  103.       IF LEN(MarkedFiles$) > MaxFiles * 13 THEN                      ' RM03279401
  104.          CALL SkipLine (1)
  105.          CALL QuickTPut1(ZFGF$ + ZBG4$ + _
  106.                        "Too Many Files Already Marked!" + _
  107.                        ZEmphasizeOff$)
  108.          FilName$ = ""                                               ' RM03139401
  109.          CLOSE FilNum                                                ' RM03049401
  110.          EXIT SUB
  111.       END IF
  112. '
  113. ' * save the current list of marked files
  114. '
  115.    HoldMarkedFiles$ = MarkedFiles$                                   ' RM03279401
  116. '
  117. ' * read in the directories from the FIDX.CFG and check Security Level
  118. '
  119.       Index = 1
  120.       DO WHILE NOT EOF(FilNum)                                       ' RM03049401
  121.          CALL ReadDir (FilNum,1)                                     ' RM03049401
  122.          Level = INSTR(ZOutTxt$,",")
  123.          IF ZUserSecLevel >= VAL(LEFT$(ZOutTxt$,Level-1)) THEN
  124.             ZOutTxt$(Index) = RIGHT$(ZOutTxt$,LEN(ZOutTxt$)-Level)
  125.             Index = Index + 1
  126.          END IF
  127.       LOOP
  128.       CLOSE FilNum                                                   ' RM03049401
  129. '
  130. ' * search in the Upload and Download Directories listed in the FIDX.CFG
  131. '
  132. 200 TotalMatch = 0
  133.       SearchDir = 1
  134.       MarkedFiles$ = ""                                              ' RM03279401
  135.       DO WHILE SearchDir < Index
  136.          GOSUB 700
  137.          IF KillSearch THEN GOTO 400
  138.          MatchFile$ = ""
  139.          FILESPEC$ = ZOutTxt$(SearchDir) + FilName$                  ' RM03139401
  140.          IF SearchDir = 1 THEN
  141.             CALL SkipLine (1)
  142.             CALL QuickTPut (ZFG5$ + "Searching " + _
  143.                           ZFGB$ + "for Files ",0)
  144.          END IF
  145.          CALL MarkTime (NumDots)
  146.          MatchFile$ = DIR$(FILESPEC$)                                ' RM03039401
  147.          IF MatchFile$ <> "" THEN
  148.             IF INSTR(MarkedFiles$,MatchFile$) > 0 OR _               ' RM03279401
  149.                INSTR(HoldMarkedFile$,MatchFile$) > 0 THEN _          ' RM03039401
  150.                GOTO 210                                              ' RM03039401
  151.             CALL Trim(MatchFile$)
  152.             MarkedFiles$ = MarkedFiles$ + MatchFile$ + _             ' RM03279401
  153.                           SPACE$(12-LEN(MatchFile$)) + CHR$(13)
  154.             TotalMatch = TotalMatch + 1
  155. 210         MatchFile$ = DIR$                                        ' RM03039401
  156.             DO WHILE MatchFile$ <> ""
  157.                IF INSTR(Markedfiles$,MatchFile$) > 0 OR _            ' RM03279401
  158.                   INSTR(HoldMarkedFile$,MatchFile$) > 0 THEN _       ' RM03039401
  159.                   GOTO 220                                           ' RM03039401
  160.                CALL MarkTime (NumDots)
  161.                CALL Trim(MatchFile$)
  162.                MarkedFiles$ = MarkedFiles$ + MatchFile$ + _          ' RM03279401
  163.                              SPACE$(12-LEN(MatchFile$)) + CHR$(13)
  164.                TotalMatch = TotalMatch + 1
  165. 220            MatchFile$ = DIR$                                     ' RM03039401
  166.                IF TotalMatch => MaxFiles THEN
  167.                   CALL QuickTPut (ZBackSpace$,0)
  168.                   CALL SkipLine (1)
  169.                   CALL QuickTPut1(ZFGF$ + ZBG4$ + _
  170.                                 "Too Many Matching Files!" + _
  171.                                 ZEmphasizeOff$)
  172.                   FilName$ = ""                                      ' RM03139401
  173.                   GOTO 400
  174.                END IF
  175.             LOOP
  176.          END IF
  177.          SearchDir = SearchDir + 1
  178.       LOOP
  179.       CALL QuickTPut (ZBackSpace$,0)
  180. 300   IF NOT ZFastFileSearch THEN _
  181.          GOTO 400
  182.       TFastFileList$ = FastFileList$                                 ' RM03279401
  183.       GOSUB 310                      ' setup FFS System and search for matches
  184.       GOTO 400                       ' exit routine and display number of matches
  185. 310   FSize = 21
  186.       FilNum = FREEFILE                                              ' RM03049401
  187.       CALL OpenRSeq (TFastFileList$,HighRec&,WasX,21,FilNum)         ' DGS011701-DS/RM03049401
  188.       FIELD #FilNum, 12 AS SearchFile$, _                            ' RM03049401
  189.                       4 AS SearchPath$, _
  190.                       3 AS SearchDate$, _
  191.                       2 AS SearchCrLf$
  192.       GET FilNum,1                                                   ' RM03049401
  193.       IF SearchCrLf$ <> ZCRLf$ THEN
  194.          FSize = 18
  195.          CALL OpenRSeq (TFastFileList$,HighRec&,WasX,18,FilNum)      ' DGS011701-DS/RM03049401
  196.          FIELD #FilNum, 12 AS SearchFile$, _
  197.                          4 AS SearchPath$, _
  198.                          2 AS SearchCrLf$                            ' RM03049401
  199.       END IF
  200. '
  201. '   Set the LowRec value to 1 before checking for the tabs file low value.
  202. '
  203.     LowRec& = 1                                                      ' DGS-050401/DS
  204. '
  205. '   See if the Tabs File exists by checking for the proper size.
  206. '   The file ZFastTabs$ is created in line 108 of RBBS-PC.
  207. '
  208.       IF LEN(ZFastTabs$) < 160 THEN _                                ' DGS101801-DS
  209.          GOTO 350                                                    ' DGS-050401/DS
  210. '
  211. '   Now check to see if the first letter is not a wildcard, to make
  212. '   the searching of the FIDX file by the first letter, instead of
  213. '   a sequential search.  This code was taken from SUB5 with
  214. '   variable names changed to work in this sub with no conflict.
  215. '
  216.       FirstLetter$ = LEFT$(FilName$,1)                               ' DGS101801-DS/RM03139401
  217.       FirstLet = INSTR("!#$0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_",FirstLetter$) ' DGS101801-DS
  218.       IF FirstLet > 0 THEN _                                         ' DGS101801-DS
  219.          LowRec& = CVL(MID$(ZFastTabs$,1+4*(FirstLet-1),4)) - 1 : _  ' DGS101801-DS
  220.          IF FirstLet < 40 THEN _                                     ' DGS101801-DS
  221.             HighRec& = CVL(MID$(ZFastTabs$,1+4*FirstLet,4))          ' DGS101801-DS
  222.       IF LowRec& = 0 THEN _                                          ' DGS021501-DS
  223.          LowRec& = 1                                                 ' DGS021501-DS
  224. 350   FOR Count& = LowRec& TO HighRec&                               ' DGS101801-DS
  225.          GET FilNum, Count&                                          ' DGS011701-DS/RM03049401
  226.          GOSUB 700
  227.          IF KillSearch THEN EXIT FOR
  228.          CALL MarkTime (NumDots)
  229.          FileName$ = SearchFile$
  230.          CALL Trim (FileName$)
  231.          CALL WildFile (FilName$,FileName$,DoesMatch)                ' RM03139401
  232.          IF DoesMatch AND (VAL(SearchPath$) <= MaxLines) AND _
  233.            INSTR(MarkedFiles$,FileName$) = 0 AND _                   ' RM03279401
  234.            INSTR(HoldMarkedFiles$,FileName$) = 0 THEN                ' DGS101801-DS/RM03049401
  235.             MarkedFiles$ = MarkedFiles$ + FileName$ + _              ' RM03279401
  236.                    SPACE$(12-LEN(FileName$)) + CHR$(13)
  237.             TotalMatch = TotalMatch + 1
  238.          END IF
  239.  
  240.          IF TotalMatch => MaxFiles THEN
  241.             CALL QuickTPut (ZBackSpace$,0)
  242.             EXIT FOR
  243.          END IF
  244.       NEXT
  245.       RETURN
  246. 400   CALL QuickTPut (ZBackSpace$,0)
  247. '
  248. ' * display number of matches found and end sub
  249. '
  250. 600   FilName$ = ""                                                  ' RM03139401
  251.       CLOSE FilNum                                                   ' DGS102601-DS/RM03049401
  252.       FilNum = FREEFILE                                              ' RM03049401
  253.       CALL KillWork  (ZNodeWorkDrvPath$ + "WILD" + ZNodeId$ + ".DEF") ' DGS102601-DS
  254.       CALL OpenWorkB (FilNum,ZNodeWorkDrvPath$ + "WILD" + ZNodeId$ + ".DEF") ' DGS102601-DS/RM03049401
  255.       CALL PrintWorkB (FilNum,MarkedFiles$)                          ' RM03049401/RM03279401
  256.       CLOSE FilNum                                                   ' RM03049401
  257.       CALL SkipLine(1)                                               ' DGS021002-DS
  258.       ZOutTxt$ = ZFGE$ + STR$(TotalMatch) + ZFGA$ + " Matches Found" ' DGS021002-DS
  259.       IF TotalMatch => MaxFiles THEN _                               ' DGS021002-DS
  260.          ZOutTxt$ = ZOutTxt$ + ZFGF$ + " - " + ZFGC$ + _             ' DGS021002-DS
  261.                   "Maximum Allowed Matches Reached!"                 ' DGS021002-DS
  262.       ZOutTxt$ = ZOutTxt$ + ZEmphasizeOff$                           ' DGS021002-DS
  263.       Call QuickTPut1 (ZOutTxt$)                                     ' DGS021002-DS
  264.  
  265.       IF MarkedFIles$ <> "" THEN _                                   ' RM03279401
  266.          Found = ZTrue
  267.       MarkedFiles$ = HoldMarkedFiles$                                ' RM03279401
  268.       EXIT SUB
  269. '
  270. ' * routine to find user break
  271. '
  272. 700   CALL FindFKey
  273.       KillSearch = ZFalse
  274.       IF ZKeyPressed$ = CHR$(24) THEN _
  275.          KillSearch = ZTrue
  276.       IF ZLocalUser THEN _
  277.          RETURN
  278.       IF ZCommPortStack$ <> "" THEN _
  279.          IF LEFT$(ZCommPortStack$,LEN(ZCommPortStack$)-1) = CHR$(24) THEN _
  280.             KillSearch = ZTrue
  281.       CALL EofComm (Char)
  282.       IF Char <> -1 THEN _
  283.          CALL GetCom (WasX$) : _
  284.          IF WasX$ = CHR$(24) THEN _
  285.             KillSearch = ZTrue
  286.       CALL FlushCom (ZCommPortStack$)
  287.       RETURN
  288.       END SUB
  289. '
  290. * REPLACING old line(s) by new
  291. 20117 ' $SUBTITLE: 'FileSystem -- subroutine for RBBS-PC's file system'
  292. ' $PAGE
  293. '
  294. ' NAME    -- FileSystem
  295. '
  296. ' INPUTS  --       PARAMETER                 MEANING
  297. '             ZFileSysParm = 1  LIST THE SYSOP'S COMMENTS FILE
  298. '                                 2  L)IST DIRECTORY COMMAND
  299. '                                 3  D)OWNLOAD COMMAND
  300. '                                 4  RETURN FROM EXTERNAL PROTOCOLS
  301. '                                 5  U)PLOAD COMMAND
  302. '                                 6  S)CAN DIRECTORY COMMAND
  303. '                                 7  P)ERSONAL FILES COMMAND
  304. '                                 8  N)EW FILES COMMAND
  305. '                                 9  RETURN FROM EXTENDED DESCRIPTION
  306. '
  307. ' OUTPUTS -- ZFileSysParm = 1  COMMAND PROCESSED SUCCESSFULLY
  308. '                                2  RECYCLE TO TOP OF RBBS-PC (202)
  309. '                                3  PROCESS NEXT COMMAND (1200)
  310. '                                4  DENY USER ACCESS (1380)
  311. '                                5  HANDLE EXTENDED DESCRIP. (2008)
  312. '                                6  USER'S TIME EXCEEDED (10553)
  313. '                                7  Carrier DROPPED (10595)
  314. '
  315. ' PURPOSE -- To handle the RBBS-PC file system commands
  316. '
  317.       SUB FileSystem STATIC
  318.       ZFF = ZFileSysParm
  319.       ZFileSysParm = 1
  320. * ------[ first line different ]------
  321.       CALL SaveUserActivity("F", ZNodeRecIndex, ZFalse)              ' RCHAT401
  322.       ZActiveFMSDir$ = ""
  323.       UploadFirst = ZFalse                                           ' BTCH174
  324.       DownloadFirst = ZFalse                                         ' BTCH174
  325.       BatchOff = 0                                                   ' BTCH174/RM101501
  326.       ON ZFF GOSUB 20119, _  ' HANDLER TO LIST COMMENTS TO SYSOP
  327.                   20150, _  ' L)IST DIRECTORY COMMAND HANDLER
  328.                   20180, _  ' D)OWNLOAD COMMAND HANDLER
  329.                   20263, _  ' RETURN FROM EXTERNAL Protocol'S
  330.                   20400, _  ' U)PLOAD COMMAND HANDLER
  331.                   21800, _  ' S)CAN DIRECTORY COMMAND HANDLER
  332.                   21850, _  ' P)ERSONAL FILES COMMAND HANDLER
  333.                   21860, _  ' N)EW FILES COMMAND HANDLER
  334.                   20705, _  ' RETURN FROM EXTENDED DESCRIPTIONS      ' RM01179401
  335.                   20202     ' Download marked files exiting subboard ' RM01179401
  336.       GOTO 21920
  337. * REPLACING old line(s) by new
  338. 20140 LastOK = ZTrue
  339. * ------[ first line different ]------
  340.       CALL ColorDir (ZOutTxt$,"Y")                                   ' DGS
  341.       GOSUB 21650
  342.       IF ZFileSysParm > 1 THEN _
  343.          RETURN
  344.       IF ZLinesPrinted > MaxPrint THEN _
  345.          ZTurboKey = -ZTurboKeyUser : _
  346.          CALL AskMore (",M)ark",ZTrue,ZTrue,ZAnsIndex,ZFalse) : _
  347.          IF ZNo THEN _
  348.             ZErrCode = 0 : _
  349.             RETURN _
  350.          ELSE Temp$ = ZUserIn$(1) : _
  351.               CALL AskItems ("M",Temp$,ZTrue,"file",ZMarkedFiles$,ZPersonalDnld) : _ ' RM01209401
  352.               ZUserIn$(1) = ""
  353.       IF ZJumpSearching THEN _
  354.          IF LEFT$(ZOutTxt$,1) <> " " THEN _
  355.             PrevSearch$ = WasRS$ : _
  356.             PrevCK = WasCK : _
  357.             WasCK = 2 : _
  358.             WasRS$ = ZJumpTo$
  359.       IF NOT ZRet THEN _
  360.          GOTO 20124
  361. * REPLACING old line(s) by new
  362. 20155 IF ListNew OR ZAnsIndex > 255 THEN _
  363.          RETURN
  364. * ------[ first line different ]------
  365.       IF ZFileSysParm = 4 THEN _                                     ' RM01049401
  366.          RETURN                                                      ' RM01049401
  367.       CALL GetDirs (ShowDirOfDir)
  368.       IF ZWasQ = 0 THEN _
  369.          RETURN
  370.       IF ZUserIn$(ZAnsIndex) = "P" THEN _                            ' RM032601
  371.          GOTO 21850                                                  ' RM032601
  372.       ShowDirOfDir = ZFalse
  373.       CALL ConvertDir (ZAnsIndex)
  374.       WasQX = ZLastIndex
  375. * REPLACING old line(s) by new
  376. 20159 IF ZAnsIndex < ZLastIndex THEN _
  377.          GOTO 20155
  378.       ZSearchingAll = ZFalse
  379.       CALL CmdStackPushPop (1)
  380.       ZLastIndex = 0
  381.       IF ZNo OR InFMS OR (ZFileNameHold$ = ZDirPrefix$) THEN _
  382.          GOTO 20155
  383.       GOSUB 20178
  384.       CALL QuickTPut (ZEmphasizeOff$,0)
  385.       ZTurboKey = - ZTurboKeyUser
  386.       ZOutTxt$ = "End list.  L)ist, M)ark, D)nld, [Q]uit"
  387.       GOSUB 21667
  388.       CALL AraAllCaps (ZUserIn$(),1)
  389.       IF ZUserIn$(1) = "L" THEN _
  390.          ZUserIn$(ZAnsIndex) = WasA1$ : _
  391.          GOTO 20161
  392.       Temp$ = ZUserIn$(1)
  393.       Temp = (ZUserIn$(1) = "D")
  394. * ------[ first line different ]------
  395.       CALL AskItems ("MD",Temp$,ZTrue,"file",ZMarkedFiles$,ZPersonalDnld) ' RM01209401
  396.       IF ZWasQ = 0 OR ZUserSecLevel < ZOptSec(19 - 20 * (ZMenuIndex = 6)) THEN _
  397.          GOTO 20160
  398.       IF Temp$ = "M" THEN _                                          ' RM01229401
  399.          RETURN                                                      ' RM01229401
  400.       IF Temp THEN _
  401.          GOSUB 20202 _
  402.       ELSE IF LEN(ZUserIn$(1)) > 1 THEN _
  403.          ZAnsIndex = 1 : _
  404.          GOSUB 20202
  405. * REPLACING old line(s) by new
  406. 20162 CALL CmdStackPushPop (1)         ' save dir list list processing
  407.       CALL FMS (ZWasZ$,SearchString$,SearchDate$,InFMS, _
  408.                 ZCategoryName$(),ZCategoryCode$(),ZCategoryDesc$(),_
  409.                 DnldFlag,CatFound,ZAnsIndex)
  410. * ------[ first line different ]------
  411.       IF ZFileSysParm = 4 THEN _                                     ' RM01209401
  412.          RETURN                                                      ' RM01209401/RM01229401
  413.       WHILE DnldFlag > 0 AND ZSubParm > -1
  414.          GOSUB 20202
  415.          IF ZFileSysParm > 1 THEN _
  416.             RETURN
  417.          WasX$ = ZCategoryCode$(CatFound)
  418.          CALL DispUpDir (WasX$,SearchString$,SearchDate$,DnldFlag,ZAnsIndex)
  419.          IF ZFileSysParm = 4 THEN _                                  ' RM01209401
  420.             RETURN                                                   ' RM01209401
  421.          CALL CheckTimeRemain (MinsRemaining)
  422.          IF ZSubParm = -1 THEN _
  423.             ZFileSysParm = 6 : _
  424.             RETURN
  425.          CALL Carrier
  426.       WEND
  427.       IF ZSubParm = -1 THEN _
  428.          ZFileSysParm = 7 : _
  429.          RETURN
  430.       IF ZAnsIndex > 255 OR ZRet THEN _
  431.          ZLastIndex = 0 : _
  432.          RETURN
  433.       CALL CmdStackPushPop (2)        ' restore dir list list processing
  434.       ZActiveFMSDir$ = ""
  435.       IF InFMS THEN _
  436.          GOTO 20159
  437.       IF ZUserSecLevel < ZMinSecToView THEN _
  438.          IF ZFileNameHold$ = ZUpldDirCheck$ THEN _
  439.             ZFileNameHold$ = "of uploads" : _
  440.             GOTO 20172
  441.       ZFileNameHold$ = ZUserIn$(ZAnsIndex)
  442.       IF ZLimitSearchToFMS THEN _
  443.          GOTO 20166
  444.       IF NOT ZSearchingAll THEN _
  445.          IF ZFileNameHold$ = "ALL" OR ZFileNameHold$ = "A" THEN _
  446.             ZSearchingAll = ZTrue : _
  447.             GOSUB 21890 : _
  448.             GOTO 20157
  449.       CALL BadFile (ZFileNameHold$,BadFileNameIndex)
  450.       ON BadFileNameIndex GOTO 20163,20172,20176
  451. * INSERTING new line(s)
  452. 20177 Call WildShow (WildMarkedFiles$,WildParm) ' WildCard Support   ' DGS/WILDCARD/RM03279401
  453.       CALL Carrier                                                   ' DGS/WILDCARD
  454.       IF ZSubParm = -1 THEN _                                        ' DGS/WILDCARD
  455.          EXIT SUB                                                    ' RM03139401
  456.       RETURN                                                         ' RM03129401
  457. * REPLACING old line(s) by new
  458. 20178 ZListOnly = ZFalse
  459.       ZExtraDnldTime = 0
  460.       ZFreeDnld = ZFalse
  461.       ZPersonalDnld = ZFalse
  462.       RETURN
  463. * ------[ first line different ]------
  464. * INSERTING new line(s)
  465. 20179 ZBatchTransfer = ZFalse                                        ' BTCH174
  466.       ZCmdTransfer$ = ""                                             ' BTCH174
  467.       CALL KillWork (ZDownloadWorkFile$)                             ' BTCH174
  468.       CALL KillWork (ZDownloadWorkFile$ + ".DET")                    ' MARK174
  469.       CALL KillWork (ZNodeWorkDrvPath$ + "WILD" + ZNodeId$ + ".DEF") ' RM03199401
  470.       IF ZCDRom THEN _                                               ' RM03249401
  471.          CALL KillCDWork                                             ' RM03249401
  472.       ZErrCode = 0                                                   ' BTCH174
  473.       RETURN                                                         ' BTCH174
  474. '
  475. ' *  D - COMMAND FROM FILES MENU (SEARCH FOR FILE TO DOWNLOAD)
  476. '
  477. * REPLACING old line(s) by new
  478. 20180 Temp$ = "D"
  479. * ------[ first line different ]------
  480.       IF NOT ZGlobalSysOp THEN                                       ' RM032603
  481.          ZFileName$ = ZHelpPath$ + "DNMSG.HLP"                       ' RM032603
  482.          CALL Graphic2 (ZFileName$)                                  ' RM032603/RM03199402
  483.          IF ZOK THEN _                                               ' RM03199402
  484.             ZNonStop = ZTrue : _                                     ' RM032603
  485.             CALL BufFile2 (ZFileName$, ZWasX)                        ' RM032603/RM08259301/RM03199402
  486.          ZFileName$ = ""                                             ' RM08259301
  487.       END IF                                                         ' RM03199402
  488.       CALL AskItems ("D",Temp$,ZFalse,"file",ZMarkedFiles$,ZPersonalDnld) ' RM01209401
  489.       GOSUB 20178
  490.       IF ZFileSysParm > 1 THEN _
  491.          RETURN
  492.       IF ZWasQ = 0 THEN                                              ' BTCH174/RM040301
  493.          IF ZHighSpeedTransfer AND UploadFirst THEN _                ' BTCH174/RM040301
  494.             ZOutTxt$ = "Continue with transfer ([Y],N)" : _          ' BTCH174/RM040501
  495.             ZTurboKey = -ZTurboKeyUser : _                           ' BTCH174/RM040501
  496.             GOSUB 21668 : _                                          ' BTCH174/RM040501
  497.             IF NOT ZNo THEN _                                        ' BTCH174/RM040501
  498.                UploadFirst = ZFalse : _                              ' BTCH174/RM040301
  499.                GOTO 20501                                            ' BTCH174/RM040301
  500.          GOSUB 20179                                                 ' BTCH174/RM040301
  501.          RETURN                                                      ' BTCH174/RM040301
  502.       ENDIF                                                          ' BTCH174/RM040301
  503. * REPLACING old line(s) by new
  504. 20202 IF (ZTimeLock AND 2) AND (NOT TimeLockExempt) AND NOT ZHasPrivDoor THEN _
  505.          CALL TimeLock : _
  506.          IF NOT ZOK THEN _
  507.             RETURN
  508.       LastDnld = ZLastIndex
  509.       FirstDnld = ZAnsIndex
  510.       ZCmdTransfer$ = ""
  511.       IF ZAutoDownYes THEN _
  512.          ZCmdTransfer$ = "X"
  513.       ZAutoDownInProgress = ZAutoDownYes
  514.       ZAnsIndex = ZLastIndex
  515.       GOSUB 20470
  516. * ------[ first line different ]------
  517.       LastDnld = LastDnld + (WasX > 0)                               ' BTCH174/RM082501
  518.       BatchBytes# = 0
  519.       BatchBlocks# = 0
  520.       ZDownFiles = 0
  521.       CALL KillWork (ZDownloadWorkFile$)                             ' BTCH174
  522.       CALL KillWork (ZDownloadWorkFile$ + ".DET")                    ' MARK174
  523.       CALL KillWork (ZNodeWorkDrvPath$ + "WILD" + ZNodeId$ + ".DEF") ' RM03199401
  524.       IF ZCDRom THEN _                                               ' RM03249401
  525.          CALL KillCDWork                                             ' RM03249401
  526.       ZErrCode = 0
  527.       ZAnsIndex = FirstDnld
  528. * REPLACING old line(s) by new
  529. 20203 IF ZAnsIndex > LastDnld THEN _
  530.             GOTO 20204
  531. * ------[ first line different ]------
  532.       IF ZMarkedFiles$ <> "" AND ZAnsIndex = FirstDnld THEN          ' RM01049401/RM03139401
  533.          IF UCASE$(ZUserIn$(LastDnld)) <> "M" AND UCASE$(ZUserIn$(FirstDnld)) <> "M" THEN ' RM01099401
  534.             Temp$ = UCASE$(ZUserIn$(FirstDnld))                      ' RM04099401
  535.             ZLastIndex = LastDnld                                    ' BTCH174/RM082802
  536.             CALL SkipLine (1)                                        ' RM01049401
  537.             ZOutTxt$ = ZFG5$ + "ADD your Marked Files to this DOWNLOAD? [Y]" + _
  538.                         ZFG5$ + ",N " + ZEmphasizeOff$               ' RM01049401/DGS011201-DS/RM03069401
  539.             GOSUB 21660                                              ' RM01049401
  540.             IF NOT ZNo THEN _                                        ' RM01049401
  541.                ZWasZ$ = "M" : _                                      ' RM01049401
  542.                ZLastIndex = ZLastIndex + 1 : _                       ' RM01049401
  543.                LastDnld = ZLastIndex : _                             ' RM01049401
  544.                CALL UnMarkItems (ZMarkedFiles$,LastDnld,ZLastIndex,FoundMarked,ZTrue) : _ ' RM01049401
  545.                LastDnld = ZLastIndex
  546.             ZUserIn$(FirstDnld) = Temp$                              ' RM04099401
  547.             ZAnsIndex = FirstDnld                                    ' RM04099401
  548.          END IF                                                      ' RM04099401
  549.       END IF                                                         ' RM04099401
  550.       GOSUB 20470
  551.       GOSUB 20205
  552.       IF ReStart THEN _
  553.          Restart = ZFalse : _
  554.          GOTO 20202
  555. '     ZCmdTransfer$ = ZWasFT$
  556.       CALL Line25
  557.       IF ZFileSysParm > 1 OR ZInternalProt$ = "N" THEN _
  558.          GOTO 20204
  559.       ZAnsIndex = ZAnsIndex + 1
  560.       GOTO 20203
  561. * REPLACING old line(s) by new
  562. * ------[ first line different ]------
  563. 20204 ZLastIndex = 0                                                 ' BTCH174
  564.       LastDnld = 0                                                   ' BTCH174
  565.       GOSUB 20179                                                    ' BTCH174
  566.       RETURN
  567. '                                                                    ' WILD
  568. ' * WildCard Download Support                                        ' WILD
  569. '                                                                    ' WILD
  570. * REPLACING old line(s) by new
  571. * ------[ first line different ]------
  572. 20205 ZFileName$ = ZUserIn$(ZAnsIndex)
  573.       CALL Remove (ZFileName$,", ")
  574.       CALL AllCaps (ZFileName$)                                      ' BTCH174
  575.       IF INSTR(ZMarkedFiles$,ZFileName$) > 0 THEN _                  ' RM01069401
  576.          CALL QuickTPut1 (ZFG3$ + ZFileName$ + ZFG5$ + " is already " + _
  577.                           "marked for downloading!" + ZEmphasizeOff$) : _ ' RM01069401
  578.          RETURN                                                      ' RM01069401
  579.       IF INSTR(ZFileName$,"*") <> 0 THEN                             ' WILD
  580.          FileName$ = ZFileName$                                      ' RM03139401
  581.          IF INSTR(FileName$, ".") = 0 THEN                           ' DGS020701-DS/RM03139401
  582.             FileName$ = FileName$ + ".*"                             ' DGS020701-DS/RM03139401
  583.          END IF                                                      ' DGS020701-DS
  584.          IF ZWildDownOK AND NOT ZPersonalDnld THEN                   ' WILD
  585.             ZSuspendAutoLogoff = ZTrue                               ' RM03279401
  586.             CALL WildDown(FileName$,WildMarkedFiles$,ZFastFileList$,Found) ' WILD/RM03139401/RM03279401
  587.             IF Found THEN                                            ' WILD
  588.                CALL CmdStackPushPop (1)                              ' RM03129401
  589.                GOSUB 20177                                           ' DD030301/WILD/RM03129401
  590.                CALL CmdStackPushPop (2)                              ' RM03129401
  591.                CALL KillWork (ZNodeWorkDrvPath$ + "WILD" + ZNodeId$ + ".DEF")  ' DGS102702-DS
  592.                IF WildParm <> 0 THEN                                 ' RM03129401
  593.                   ZWasZ$ = "M"                                       ' RM03129401
  594.                   CALL UnMarkItems (WildMarkedFiles$,ZAnsIndex,LastDnld,FoundMarked,ZTrue) ' RM03129401/RM03279401
  595.                   ZFileName$ = ZUserIn$(ZAnsIndex)                   ' RM03139401
  596.                   ZLastIndex = LastDnld                              ' RM03139401
  597.                ELSE                                                  ' RM03139401
  598.                   FirstDnld = FirstDnld + 1                          ' RM03139401
  599.                END IF                                                ' RM03129401
  600.             END IF                                                   ' WILD
  601.             ZSuspendAutoLogoff = ZFalse                              ' RM03279401
  602.          END IF                                                      ' WILD
  603.       END IF                                                         ' WILD
  604.       MarkingTime = (ZAnsIndex = FirstDnld OR NOT ZConcatFIles)
  605.       ZViolation$ = "Download "
  606.       IF ZListOnly THEN _
  607.          CALL BreakFileName (ZFileName$,DR$,ZWasY$,WasX$,ZTrue) : _
  608.          ZFileNameHold$ = ZWasY$ + _
  609.                            WasX$ : _
  610.          GOTO 20235
  611.       ZFileNameHold$ = ZFileName$
  612.       CALL BadFile (ZFileName$,BadFileNameIndex)
  613.       ON BadFileNameIndex GOTO 20220,20231,20233
  614. * REPLACING old line(s) by new
  615. 20225 IF ZOK THEN _
  616.          GOTO 20235
  617. * ------[ first line different ]------
  618.       IF ZAbort THEN _                                               ' RM03219401
  619.          ZAbort = ZFalse : _                                         ' RM03219401
  620.          IF ZBatchTransfer AND ZAnsIndex >= LastDnld THEN _          ' RM03219401
  621.             GOTO 20262 _                                             ' RM03219401
  622.          ELSE ZAutoLogoffReq = ZFalse : _                            ' RM03219401
  623.               RETURN                                                 ' RM03219401
  624.       IF ZDotFlag THEN _
  625.          RETURN
  626.       IF FileNameAlt$ <> "" THEN _
  627.          ZFileName$ = FileNameAlt$ : _
  628.          FileNameAlt$ = "" : _
  629.          ZFileNameHold$ = ZFileName$ : _
  630.          GOTO 20222
  631. * REPLACING old line(s) by new
  632. 20231 ZOutTxt$ = ZFileNameHold$ + _
  633.            " not found!"
  634.       CALL UpdtCalr (ZOutTxt$,2)
  635.       IF ZAutoDownInProgress THEN _
  636.          ZOutTxt$ = ZOutTxt$ + _
  637.               " during AUTODOWNLOAD" : _
  638.          GOSUB 21640 : _
  639.          RETURN
  640.       ZOutTxt$ = ZOutTxt$ + _
  641.            " Correct name"+ZPressEnterExpert$
  642.       ZSuspendAutoLogoff = ZTrue
  643.       GOSUB 21660
  644.       ZSuspendAutoLogoff = ZFalse
  645.       IF ZFileSysParm > 1 THEN _
  646.          RETURN
  647.       IF ZWasQ=0 THEN _
  648.          IF ZBatchTransfer AND ZAnsIndex >= LastDnld THEN _
  649.             GOTO 20262 _
  650. * ------[ first line different ]------
  651.          ELSE ZAutoLogoffReq = ZFalse : _
  652.               RETURN
  653.       ZUserIn$(ZAnsIndex) = ZUserIn$(1)
  654.       GOTO 20205
  655. * REPLACING old line(s) by new
  656. 20247 ZWasDF = 0
  657.       CALL BreakFileName (ZFileName$,DR$,WasX$,Extension$,ZFalse)
  658.       IF ZAutoDownInProgress THEN _
  659.          ZUserIn$(ZAnsIndex) = WasX$ + "." + Extension$ : _
  660.          ZOutTxt$ = "Transferring -- " + _
  661.               ZUserIn$(ZAnsIndex) : _
  662.          GOSUB 21640 : _
  663.          IF ZFileSysParm > 1 THEN _
  664.             RETURN
  665. * ------[ first line different ]------
  666.       IF INSTR("...WRK.FW .ARC.EXE.COM.OBJ.WKS.LBR.ZIP.PAK.ZOO.LZH.ARJ.GIF.MAC.","."+Extension$+".") > 2 OR _  ' BTCH174/RM040601
  667.          MID$(Extension$,2,1) = "Q" OR _
  668.          (ZRequireNonASCII AND Extension$ = "BAS") THEN _
  669.             ZWasDF = ZTrue
  670. * REPLACING old line(s) by new
  671. 20248 ZOutTxt$ = ""
  672.       IF ZBatchTransfer THEN _
  673.          IF ZAnsIndex < LastDnld THEN _
  674.             GOTO 20260
  675. * ------[ first line different ]------
  676.       IF ZHighSpeedTransfer AND UploadFirst THEN _                   ' BTCH174
  677.          GOTO 20260                                                  ' BTCH174
  678.       CALL XferType (2,ZTrue)
  679.       IF ZFF THEN _
  680.          GOTO 20260
  681.       CALL XferType (1,ZTrue)
  682.       IF ZSubParm = -1 THEN _
  683.          ZFileSysParm = 7 : _
  684.          RETURN
  685. * REPLACING old line(s) by new
  686. * ------[ first line different ]------
  687. 20260 IF ZHighSpeedTransfer AND NOT UploadFirst THEN _               ' BTCH174
  688.          DownLoadFirst = ZTrue                                       ' BTCH174
  689.       ZTransferFunction = 1
  690.       GOSUB 21790
  691.       IF ZFileSysParm > 1 THEN _
  692.          RETURN
  693.       ZBatchTransfer = (ZBatchProto AND (LastDnld > FirstDnld))
  694.       IF ZBatchTransfer AND ZCmdTransfer$ = "" THEN _
  695.          ZCmdTransfer$ = ZWasFT$
  696.       ON INSTR("AXCYN",ZInternalProt$) GOTO _
  697.          20340, _              ' ASCII DOWNLOAD
  698.          20290, _              ' Xmodem
  699.          20290, _              ' Xmodem CRC
  700.          20270, _              ' YMODEM
  701.          21700                 ' NONE - CANCEL
  702. '
  703. ' *  EXTERNAL Protocol Downloads/Uploads
  704. '
  705. * REPLACING old line(s) by new
  706. 20262 IF ZBatchTransfer THEN _
  707.          IF ZAnsIndex < LastDnld THEN _
  708.             RETURN _
  709.          ELSE ZBlocksInFile# = BatchBlocks# : _
  710.               ZBytesInFile# = BatchBytes# : _
  711.               ZNumDnldBytes! = BatchBytes# : _
  712.               IF ZBytesInFile# < 1 THEN _
  713.                  RETURN _
  714.               ELSE GOSUB 20780 : _
  715.                    IF ZFileSysParm > 1 OR NOT ZOK THEN _
  716.                       RETURN
  717.       IF ZAutoDownInProgress THEN _
  718.          CALL SendName : _
  719.          IF ZAbort THEN _
  720.             DnldCompleted = ZFalse : _
  721.             GOSUB 21760 : _
  722.             RETURN
  723.       GOSUB 20337
  724. * ------[ first line different ]------
  725.       IF BatchOff <> ZFalse THEN _                                   ' BTCH174
  726.          ZAutoLogoffReq = BatchOff                                   ' BTCH174
  727.       IF ZHighSpeedTransfer AND DownloadFirst THEN _                 ' BTCH174
  728.          CALL SkipLine (1) : _                                       ' BTCH174
  729.          ZSuspendAutoLogoff = ZTrue : _                              ' RM101501
  730.          LastDnld = 0 : _                                            ' RM03069401
  731.          GOTO 20400                                                  ' BTCH174
  732. * REPLACING old line(s) by new
  733. * ------[ first line different ]------
  734. 20263 IF ZWasBatchTransfer THEN _                                    ' BTCH174
  735.          CALL UpdtCalr ("Batch Upload started at " + ZTime$,2)       ' BTCH174
  736.       CALL Transfer
  737.       IF ZExtFileSysProcessor THEN _                                 ' RM02269401
  738.          CALL KillWork ("XFER-" + ZNodeID$ + ".DEF") : _             ' RM02279401
  739.          ZGetDescAfterTransfer = ZGetDescAfterTransferSave : _       ' RM02269401
  740.          RETURN                                                      ' RM02269401
  741.       IF ZPrivateDoor THEN _
  742.          ZCmdTransfer$ = ZWasFT$ : _
  743.          CALL XferType (2,ZTrue) : _
  744.          ZCmdTransfer$ = ""
  745.       CALL OpenWork (2,"XFER-" + ZNodeID$ + ".DEF")
  746.       IF ZErrCode <> 0 THEN _
  747.          GOTO 20267
  748.       CALL ReadParms (ZWorkAra$(), ZFailureParm, 1)
  749.       IF ZErrCode <> 0 THEN _
  750.          CLOSE 2 : _                                                 ' BTCH174
  751.          CALL KillWork ("XFER-" + ZNodeID$ + ".DEF") : _             ' BTCH174
  752.          GOTO 20267
  753.       CLOSE 2
  754.       IF NOT ZFakeXRpt THEN _                                        ' XFER174
  755.          CALL TStats                                                 ' XFER174
  756.       IF ZHighSpeedTransfer OR ZWasBatchTransfer THEN _              ' BTCH174/RM082902
  757.          CALL HSFile                                                 ' BTCH174
  758.       CALL KillWork ("XFER-" + ZNodeID$ + ".DEF")
  759. * REPLACING old line(s) by new
  760. 20265 IF ZTransferFunction = 2 THEN _
  761.          IF INSTR(ZWorkAra$(ZFailureParm),ZFailureString$) <> 1 THEN _
  762. * ------[ first line different ]------
  763.             CALL QuickTPut1 (ZEmphasizeOn$ + "UPLOAD successful!" + ZEmphasizeOff$) : _ ' BTCH174
  764.             GOTO 20700 _
  765.          ELSE _
  766.             AutoLogoffReq = ZFalse : _                               ' BTCH174
  767.             GOTO 20730                                               ' BTCH174
  768.       IF ZTransferFunction = 1 THEN _
  769.          DnldCompleted = (INSTR(ZWorkAra$(ZFailureParm),ZFailureString$) <> 1)
  770.       GOSUB 21760
  771.       CALL Carrier
  772.       IF ZSubParm = -1 THEN _
  773.          ZFileSysParm = 7
  774.       RETURN
  775. '
  776. ' *  XFER FILE NOT Found
  777. '
  778. * REPLACING old line(s) by new
  779. 20330 IF ZAutoDownInProgress THEN _
  780.          RETURN
  781.       GOSUB 20337
  782. * ------[ first line different ]------
  783.       ZOutTxt$ = ZFG6$ + ZProtoPrompt$ +ZFG7$ + _
  784.             " " + WasA1$ + ZFG6$ + _
  785.             " of " + ZFG7$ + _
  786.             ZFileNameHold$ + ZFG6$ + _
  787.             " ready.  <Ctrl X> aborts" + ZEmphasizeOff$              ' RM052301
  788.       GOSUB 21650
  789. * REPLACING old line(s) by new
  790. * ------[ first line different ]------
  791. 20400 ZUpBatchTransfer = ZFalse                                      ' BTCH174
  792.       ZWasBatchTransfer = ZFalse                                     ' BTCH174
  793.       ZGetExtDesc = ZFalse                                           ' BTCH174
  794.       ZWhoToSet = ZFalse                                             ' BTCH174
  795.       IF ZHighSpeedTransfer AND DownloadFirst THEN _                 ' RM03069401
  796.          ZAnsIndex = ZLastIndex                                      ' RM03069401
  797.       IF DownloadFirst THEN _                                        ' RM101501
  798.          BatchOff = ZAutoLogoffReq                                   ' BTCH174
  799.       Temp$ = "U"                                                    ' BTCH174
  800.       IF NOT ZSysOp THEN                                             ' UPMSG2/RM022103
  801.          ZFileName$ = ZHelpPath$ + "UPMSG.HLP"                       ' UPMSG2
  802.          CALL Graphic2 (ZFileName$)                                  ' UPMSG2/RM03199402
  803.          IF ZOK THEN _                                               ' RM03199402
  804.             ZNonStop = ZTrue : _                                     ' UPMSG2
  805.             CALL BufFile2 (ZFileName$, ZWasX) : _                    ' UPMSG2/RM03199402
  806.             CALL Delaytime (2)                                       ' RM021301/RM08259301
  807.          ZFileName$ = ""                                             ' RM08259301
  808.       END IF                                                         ' RM03199402
  809.       CALL AskItems ("U",Temp$,ZFalse,"file",ZMarkedFiles$,ZFalse)   ' BTCH174/RM01209401
  810.       IF ZFileSysParm > 1 THEN _                                     ' BTCH174
  811.          RETURN                                                      ' BTCH174
  812.       IF ZWasQ = 0 THEN                                              ' BTCH174/RM040501
  813.          IF ZHighSpeedTransfer AND DownloadFirst THEN _              ' BTCH174/RM040301
  814.             ZOutTxt$ = "Continue with transfer ([Y],N)" : _          ' BTCH174/RM040501
  815.             ZTurboKey = -ZTurboKeyUser : _                           ' BTCH174/RM040501
  816.             GOSUB 21668 : _                                          ' BTCH174/RM040501
  817.             IF NOT ZNo THEN _                                        ' BTCH174/RM040501
  818.                DownloadFirst = ZFalse : _                            ' BTCH174/RM040301
  819.                GOTO 20263                                            ' BTCH174/RM040301
  820.          LastDnld = 0                                                ' RM03069401
  821.          RETURN                                                      ' BTCH174/RM040301
  822.       ENDIF                                                          ' BTCH174/RM040501
  823.       FirstUpld = ZAnsIndex                                          ' BTCH174
  824.       LastUpld = ZLastIndex                                          ' BTCH174
  825.       CALL KillWork (ZNodeWorkFile$)                                 ' BTCH174
  826.       CALL KillWork (ZUploadWorkFile$)                               ' BTCH174
  827.       CALL KillWork (ZNodeWorkDrvPath$ + "NODE" + ZNodeID$ + "FUP.LST") ' BTCH174
  828.       CALL KillWork (ZNodeWorkDrvPath$ + "NODE" + ZNodeID$ + "DIZ")  ' BTCH174/RM102901
  829.       ZErrCode = 0                                                   ' BTCH174
  830.       ZAlreadyGiven = ZFalse                                         ' BTCH174
  831.       CALL TimeBack (1)                                              ' BTCH174
  832.       GOTO 20430
  833. * REPLACING old line(s) by new
  834. * ------[ first line different ]------
  835. 20420 RETURN                                                         ' BTCH174
  836. '
  837. ' *  SEARCH FOR DUPLICATE FILENAME
  838. '
  839. * REPLACING old line(s) by new
  840. 20430 ZAnsIndex = ZLastIndex
  841. * ------[ first line different ]------
  842.       GOSUB 20470                                                    ' BTCH174
  843.       ZLastIndex = ZLastIndex + (WasX > 0)
  844.       LastUpld = ZLastIndex
  845.       IF FirstUpld <> LastUpld THEN _                                ' BTCH174
  846.          ZUpBatchTransfer = ZTrue                                    ' BTCH174
  847.       IF NOT DownloadFirst THEN _                                    ' BTCH174/RM101501
  848.          BatchOff = ZAutoLogoffReq                                   ' BTCH174
  849.       ZAutoLogoffReq = 0                                             ' BTCH174
  850. * REPLACING old line(s) by new
  851. 20432 FOR ZAnsIndex = FirstUpld TO LastUpld
  852.          IndexSave = ZAnsIndex
  853.          GOSUB 20471
  854.          GOSUB 20435
  855.          FirstUpld = FirstUpld + 1
  856.          IF ZFileSysParm > 1 THEN _
  857.             IndexSave = LastUpld + 1
  858.          ZAnsIndex = IndexSave
  859.       NEXT
  860. * ------[ first line different ]------
  861.       ZWasBatchTransfer = ZFalse                                     ' BTCH174
  862.       ZUpBatchTransfer = ZFalse                                      ' BTCH174
  863.       ZWhoToSet = ZFalse                                             ' BTCH174/RM102701
  864.       GOSUB 20179                                                    ' BTCH174
  865.       RETURN
  866. * REPLACING old line(s) by new
  867. 20435 ZFileNameHold$ = ZUserIn$(ZAnsIndex)
  868.       ExtSrch = ZFalse
  869.       IF INSTR(ZFileNameHold$,".") = 0 THEN _
  870.          ZFileNameHold$ = ZFileNameHold$ + "." + ZDefaultExtension$
  871.       CALL AllCaps(ZFileNameHold$)
  872.       ZFileName$ = ZFileNameHold$
  873. * ------[ first line different ]------
  874.       CALL NoExt (ZFileName$,Found)                                  ' NEXT174/RM112001
  875.       IF Found THEN _                                                ' NEXT174/RM112001
  876.          RETURN                                                      ' NEXT174/RM112001
  877.       ZViolation$ = "Upload "
  878.       CALL NoPath (ZFileName$,BadFileNameIndex)
  879.       IF BadFileNameIndex THEN _
  880.          GOTO 20451
  881.       CALL BadFile (ZFileName$,BadFileNameIndex)
  882.       ON BadFileNameIndex GOTO 20440,20451,20515
  883. * REPLACING old line(s) by new
  884. 20440 CALL RotorsDir (ZFileName$,ZSubDir$(),ZSubDirCount,ZTrue,"U")
  885. * ------[ first line different ]------
  886.       IF NOT ZOK AND (ZSysOp OR ZUserSecLevel >= ZMinSecPersUpld) THEN  ' RM01209401
  887.          CALL BreakFileName (ZFileName$,DR$,WasX$,Extension$,ZTrue)  ' RM01209401
  888.          Temp$ = ZPersonalDrvPath$ + WasX$ + Extension$              ' RM01209401
  889.          CALL FindFile (Temp$,ZOK)                                   ' RM01209401
  890.          IF ZOK THEN _                                               ' RM01219401
  891.             ZFileName$ = Temp$                                       ' RM01219401
  892.       END IF                                                         ' RM01219401
  893.       IF ZAbort THEN _                                               ' RM03219401
  894.          GOTO 20476                                                  ' RM03219401
  895. * REPLACING old line(s) by new
  896. 20450 IF Extension$ <> Check$ THEN _
  897.          CALL RotorsDir (WasX$ + "." + Check$,ZSubDir$(),ZSubDirCount,ZTrue,"U") : _
  898.          IF ZOK THEN _
  899.             ExtSrch = ZTrue : _
  900.             GOTO 20452
  901. * ------[ first line different ]------
  902.       IF ZAbort THEN _                                               ' RM03219401
  903.          GOTO 20476                                                  ' RM03219401
  904.       GOTO 20447
  905. * REPLACING old line(s) by new
  906. * ------[ first line different ]------
  907. 20454 CALL QuickTPut1 (ZFG6$ + "Thanks, but we already have " + ZFG7$ + _
  908.                        ZFileNameHold$ + ZEmphasizeOff$)              ' RM052001
  909.       CALL UpdtCalr ("Upload duplicate " + ZFileNameHold$,1)
  910.       RETURN
  911. * REPLACING old line(s) by new
  912. 20455 ZOutTxt$ = "Add new directory entry (Y,[N])"
  913.       ZTurboKey = - ZTurboKeyUser
  914.       GOSUB 21660
  915.       IF ZFileSysParm > 1 THEN _
  916.          RETURN
  917.       IF NOT ZYes THEN _
  918.          RETURN
  919. * ------[ first line different ]------
  920.       ZAddingDescOnly = ZTrue                                        ' RM01289401
  921.       ZUpBatchTransfer = ZFalse                                      ' BTCH174/RM112501
  922.       ZWasBatchTransfer = ZFalse                                     ' BTCH174
  923.       ZWasFT$ = "l"
  924.       IF ZGetDescAfterTransfer THEN _                                ' RM02269401
  925.          CALL FileLister (1) _                                       ' RM02269401
  926.       ELSE _                                                         ' RM02269401
  927.          CALL UpdtUpload (ZCategoryName$(),ZCategoryCode$(),ZLinesInMsg,1) ' BTCH174
  928.       IF ZAbort THEN _                                               ' BTCH174/RM102201
  929.          ZAddingDescOnly = ZFalse : _                                ' BTCH174/RM102201/RM01289401
  930.          ZAbort = ZFalse : _                                         ' BTCH174/RM102201
  931.          RETURN                                                      ' BTCH174/RM102201
  932.       IF ZWhoTo$ = "" AND NOT ZGetDescAfterTransfer THEN _           ' BTCH174/RM103101/RM02269401
  933.          IndexSave = LastUpld + 1 : _                                ' BTCH174/RM103101
  934.          RETURN                                                      ' BTCH174/RM102701
  935.       GOSUB 20702
  936.       ZWhoToSet = ZFalse                                             ' BTCH174/RM112501
  937.       RETURN
  938. * REPLACING old line(s) by new
  939. 20460 '                                                              ' BTCH174/RM102701
  940. * REPLACING old line(s) by new
  941. 20475 ZWasZ$ = ZUpldDriveFile$
  942.       CALL FindFree
  943.       IF VAL(ZFreeSpace$) < 4096 THEN _
  944.          GOSUB 21895 : _
  945.          IndexSave = ZLastIndex + 1 : _
  946.          RETURN
  947. * ------[ first line different ]------
  948.       IF (NOT ZUpBatchTransfer) OR (ZUpBatchTransfer AND ZAnsIndex >= LastUpld) THEN _ ' RM03019401
  949.          ZOutTxt$ = "Upload disk has" + _
  950.               ZFreeSpace$ : _                                        ' RM03019401
  951.          GOSUB 21640 _
  952.       ELSE _                                                         ' RM03019401
  953.          CALL SkipLine (1)                                           ' RM03019401
  954.       IF ZFileSysParm > 1 THEN _
  955.          RETURN
  956.       IF ZGetDescAfterTransfer THEN _                                ' RM02269401
  957.          CALL FileLister (1) _                                       ' RM02269401
  958.       ELSE _                                                         ' RM02269401
  959.          CALL UpdtUpload (ZCategoryName$(),ZCategoryCode$(),ZLinesInMsg,1) ' BTCH174
  960. * INSERTING new line(s)
  961. 20476 IF ZAbort THEN _                                               ' BTCH174
  962.          IF NOT ZUpBatchTransfer OR (ZUpBatchTransfer AND ZAnsIndex = LastUpld) THEN _ ' BTCH174
  963.             GOSUB 20179 : _                                          ' BTCH174
  964.             ZAbort = ZFalse : _                                      ' BTCH174
  965.             RETURN _                                                 ' BTCH174
  966.          ELSE _                                                      ' BTCH174
  967.             ZAbort = ZFalse : _                                      ' BTCH174
  968.             RETURN                                                   ' BTCH174
  969.       IF NOT ZGetDescAfterTransfer THEN _                            ' RM02269401
  970.          IF ZWhoTo$ = "" THEN _                                      ' BTCH174/RM103101
  971.             IndexSave = LastUpld + 1 : _                             ' BTCH174/RM103101
  972.             RETURN                                                   ' BTCH174/RM102701
  973.       IF ZUpBatchTransfer AND ZAnsIndex < LastUpld THEN _            ' BTCH174
  974.          RETURN                                                      ' BTCH174
  975.       ZLine25$ = "(U) " + _
  976.                  ZFileNameHold$
  977.       ZSubParm = 2
  978.       CALL Line25
  979.       ZOutTxt$ = ""
  980.       ZOK = ZTrue
  981. * REPLACING old line(s) by new
  982. * ------[ first line different ]------
  983. 20477 IF ZHighSpeedTransfer and DownloadFirst THEN _                 ' BTCH174
  984.          GOTO 20500                                                  ' BTCH174
  985.       CALL XferType (2,ZTrue)                                        ' BTCH174
  986.       IF ZFF THEN _
  987.          GOTO 20500
  988.       CALL XferType (1,ZTrue)
  989.       IF ZSubParm = -1 THEN _
  990.          ZFileSysParm = 7 : _
  991.          RETURN
  992. * REPLACING old line(s) by new
  993. * ------[ first line different ]------
  994. 20500 IF ZHighSpeedTransfer THEN                                     ' BTCH174
  995.          IF NOT DownloadFirst THEN _                                 ' BTCH174
  996.             UploadFirst = ZTrue : _                                  ' BTCH174
  997.             CALL SkipLine (1) : _                                    ' BTCH174
  998.             GOTO 20180                                               ' BTCH174
  999.          ZAutoLogoffReq = BatchOff                                   ' RM101501
  1000.          ZSuspendAutoLogoff = ZFalse                                 ' RM101501
  1001.          GOTO 20263                                                  ' BTCH174
  1002.       END IF                                                         ' BTCH174
  1003. * INSERTING new line(s)
  1004. 20501 ZTransferFunction = 2                                          ' BTCH174/RM040501
  1005.       ZAutoDownInProgress = ZFalse
  1006.       GOSUB 21790
  1007.       IF ZFileSysParm > 1 THEN _
  1008.          RETURN
  1009.       IF ZInternalProt$ <> "N" THEN _
  1010.          IF NOT ZGetDescAfterTransfer THEN _                         ' RM02269401
  1011.             IF ZWhoTo$ = "" THEN _                                   ' BTCH174/RM102701
  1012.                GOTO 20735
  1013.       ON INSTR("AXCYN",ZInternalProt$) GOTO _
  1014.          20560, _         ' ASCII UPLOAD
  1015.          20542, _         ' Xmodem
  1016.          20542, _         ' Xmodem CRC
  1017.          20542, _         ' YMODEM
  1018.          20735            ' NONE - CANCEL
  1019.       GOTO 20261
  1020. * REPLACING old line(s) by new
  1021. 20560 LineACK = (ZDefaultLineACK$ <> "")
  1022.       IF LineACK THEN _
  1023.          ZOutTxt$ = "Acknowledge each line ([Y],N)" : _
  1024.          ZTurboKey = - ZTurboKeyUser : _
  1025.          LineACK = NOT ZNo : _
  1026.          GOSUB 21660 : _
  1027.          IF ZFileSysParm > 1 THEN _
  1028.             RETURN
  1029.       GOSUB 20337
  1030.       CALL QuickTPut1 ("Transfer MUST end with a <Ctrl-K>")
  1031. * ------[ first line different ]------
  1032.       CALL QuickTPut1 (ZFG6$ + ZProtoPrompt$ + ZFG7$ + " RECEIVE" + ZFG6$ + _
  1033.              " of " + ZFG7$ + ZFileNameHold$ + ZFG6$ + " ready" + ZEmphasizeOff$) ' RM052301
  1034.       ZOK = ZFalse
  1035.       XOff = ZFalse
  1036.       CALL OpenOutW(ZFileName$)
  1037.       IF ZErrCode <> 0 AND ZErrCode <> 53 THEN _
  1038.          ZWasEL = 20560 : _
  1039.          GOTO 21900
  1040.       GOSUB 20510
  1041.       IF ZFileSysParm > 1 THEN _
  1042.          RETURN
  1043. * REPLACING old line(s) by new
  1044. * ------[ first line different ]------
  1045. 20700 IF ZExtFileSysProcessor THEN _                                 ' RM02269401
  1046.          RETURN                                                      ' RM02269401
  1047.       GOSUB 21780                                                    ' RM02269401
  1048.       IF ZFileSysParm > 1 THEN _
  1049.          RETURN
  1050. * REPLACING old line(s) by new
  1051. * ------[ first line different ]------
  1052. 20702 CALL FileLister (2)                                            ' BTCH174/RM111502
  1053.       IF NOT ZAddingDescOnly THEN _                                  ' RM01289401
  1054.          ZUpldSubDir$ = ZUpldSubDirTemp$                             ' RM01219401/RM01289401
  1055. * INSERTING new line(s)
  1056. 20703 IF NOT ZGetExtDesc THEN _                                      ' BTCH174
  1057.          ZPrivateDoor = ZFalse : _
  1058.          GOTO 20710
  1059.       ZMsgHeader$ = "Extended Description for " + ZFileNameHold$
  1060.       ZSysopComment = ZTrue
  1061.       ZMaxMsgLines = ZMaxExtendedLines
  1062.       WasLL = ZRightMargin
  1063.       ZRightMargin = 30 + ZMaxDescLen
  1064.       IF ZRightMargin > 74 THEN _
  1065.          ZRightMargin = 74
  1066.       MParm = 12                                                     ' RM02279401
  1067.       CALL MsgSys (MParm, ActionFlag, LogOff$, LogonMailNew, UtilMarginChange) ' RM02279401
  1068. * REPLACING old line(s) by new
  1069. 20705 ZMaxMsgLines = ZMaxMsgLinesDef
  1070.       ZRightMargin = WasLL
  1071. * ------[ first line different ]------
  1072.       CALL UpdtUpload (ZCategoryName$(),ZCategoryCode$(),ZLinesInMsg,3) ' BTCH174
  1073. * REPLACING old line(s) by new
  1074. * ------[ first line different ]------
  1075. 20710 ZAddingDescOnly = ZFalse                                       ' RM01289401
  1076.       RETURN                                                         ' BTCH174/RM101501
  1077. * REPLACING old line(s) by new
  1078. 20730 GOSUB 21780
  1079. * ------[ first line different ]------
  1080.       CALL QuickTPut1 (ZEmphasizeOn$ + "Upload aborted" + ZEmphasizeOff$) ' RM052001
  1081.       LastUpld = 0
  1082.       ZPrivateDoor = ZFalse
  1083. * REPLACING old line(s) by new
  1084. * ------[ first line different ]------
  1085. 20750 IF ZCDRom AND ZUseCDWorkDrive THEN                             ' RM03239401/RM03299401
  1086.          CALL SkipLine (1)                                           ' RM03249401
  1087.          CALL QuickTPut1 (ZFG6$ + "Please be patient..Copying " +  ZFG7$ + _
  1088.             ZFileNameHold$ + ZFG6$ + " from CD-ROM to Download Directory..." + ZEmphasizeOff$)  ' RM03239401
  1089.          CALL SkipLine (1)                                           ' RM03249401
  1090.          X = 1                                                       ' RM03259402
  1091.          WasX = 0                                                    ' RM04099401
  1092.          NoticeSent = ZFalse                                         ' RM04099401
  1093. * INSERTING new line(s)
  1094. 20754    CALL Findfile ("CDWORK" + ZLibDrive$ + ".WRK",Found)        ' RM03259402
  1095.          IF Found THEN                                               ' RM03259402
  1096.             CALL Carrier                                             ' RM04099401
  1097.             IF ZSubParm = -1 THEN _                                  ' RM04099401
  1098.                EXIT SUB                                              ' RM04099401
  1099.             IF NOT NoticeSent THEN _                                 ' RM04099401
  1100.                CALL QuickTPut (ZFG3$ + "CD ROM Drive is busy...please wait" + _
  1101.                                  ZEmphasizeOff$,0) : _               ' RM04099401
  1102.                NoticeSent = ZTrue                                    ' RM04099401
  1103.             CALL Delaytime (1)                                       ' RM03259402
  1104.             CALL MarkTime (WasX)                                     ' RM04099401
  1105.             X = X + 1                                                ' RM03259402
  1106.             IF X = 30 THEN _          ' Allow 30 seconds for clear   ' RM03259402
  1107.                CALL QuickTPut1 (ZEmphasizeOn$ + "File " + ZFileNameHold$ + _
  1108.                                 " currently unavailable..notify SysOp!" + _
  1109.                                  ZEmphasizeOff$) : _                 ' RM03259402
  1110.                GOTO 20792 _                                          ' RM03259402
  1111.             ELSE _                                                   ' RM03259402
  1112.                GOTO 20754                                            ' RM03259402
  1113.          END IF                                                      ' RM03259402
  1114.          CALL CopyFile (ZFileName$,ZCDRomWorkDir$,1)                 ' RM03239401
  1115.       END IF                                                         ' RM03259401
  1116.       ZStartOfHeader$ = CHR$(1 - (ZInternalProt$ = "Y"))             ' RM04059401
  1117.       CALL OpenRSeq (ZFileName$,MaxBlock,ZWasDF,ZFLen,2)             ' RM01139402
  1118. * REPLACING old line(s) by new
  1119. 20760 IF ZErrCode <> 0 THEN _
  1120.          CALL QuickTPut1 ("Unable to access "+ZFileNameHold$) : _
  1121.          CALL UpdtCalr ("Unable to access "+ZFileName$,2) : _
  1122.          ZOK = ZFalse : _
  1123.          ZErrCode = 0 : _
  1124.          ZBytesInFile# = 0 : _
  1125.          RETURN
  1126.       ZBytesInFile# = LOF(2)
  1127.       ZNumDnldBytes! = LOF(2)
  1128.       ZOK = ZTrue
  1129.       IF SizeOnly THEN _
  1130.          SizeOnly = ZFalse : _
  1131.          RETURN
  1132.       ZBlocksInFile# = MaxBlock
  1133. * ------[ first line different ]------
  1134.       CALL OpenWorkB (10,ZDownloadWorkFile$)                         ' BTCH174
  1135.       CALL PrintWorkB (10,ZFileName$)                                ' BTCH174
  1136.       CLOSE 10                                                       ' BTCH174
  1137.       Blocks# = ZBlocksInFile# / _
  1138.            VAL(MID$("00000300045012002400480072009601200144016801920216024002640288038405760", -4 * ZCBPS, 4)) ' RM08269301/BB09039301/RM11279301
  1139.       Blocks# = Blocks# * ZFLen / ZSpeedFactor!                      ' MARK174
  1140.       Estimate$ = RIGHT$(SPACE$(5) + STR$(INT(Blocks#/60)),5) + ":" + _
  1141.                   RIGHT$(STRING$(2,48) + _
  1142.                   LTRIM$(STR$(INT(Blocks#-(INT(Blocks# / 60) * 60)))),2) ' MARK174
  1143.       CALL OpenWorkB (11,ZDownloadWorkFile$ + ".DET")                ' MARK174
  1144.       CALL PrintWorkB (11,ZFilenameHold$ + SPACE$(14-LEN(ZFilenameHold$)) + _ ' RM05199301
  1145.                       STR$(ZBytesInFile#) + _
  1146.                       SPACE$(12-LEN(STR$(ZBytesInFile#))) + _
  1147.                       Estimate$)                                     ' MARK174/RM05199301
  1148.       CLOSE 11                                                       ' MARK174
  1149.       IF ZBatchTransfer THEN _                                       ' BTCH174
  1150.          BatchBlocks# =  BatchBlocks# + ZBlocksInFile# : _
  1151.          BatchBytes# = BatchBytes# + ZBytesInFile# : _
  1152.          ZDownFiles = ZDownFiles + 1 : _
  1153.          RETURN
  1154.       ZDownFiles = 1
  1155. * REPLACING old line(s) by new
  1156. 20780 ZOutTxt$ = "File Size    :"
  1157.       ZOK = ZTrue
  1158.       IF ZBlockSize > 0 THEN _
  1159. * ------[ first line different ]------
  1160.          ZOutTxt$ = ZFG5$ + ZOutTxt$ + ZFG7$ + _
  1161.               STR$(FIX(ZBlocksInFile#)) + ZFG5$ + _
  1162.               " blocks "                                             ' RM052001
  1163. * REPLACING old line(s) by new
  1164. 20785 ZBlocksInFile# = ZBlocksInFile# / _
  1165. * ------[ first line different ]------
  1166.          VAL(MID$("00000300045012002400480072009601200144016801920216024002640288038405760", -4 * ZCBPS, 4)) ' BB08219301/BB09039301/RM11279301
  1167.       ZBlocksInFile# = ZBlocksInFile# * ZFLen / ZSpeedFactor!
  1168.       IF (ZAnsIndex > 1 AND ZConcatFIles) THEN _
  1169.          RETURN
  1170.       ZOutTxt$ = ZOutTxt$ + ZFG7$ + _
  1171.            STR$(ZBytesInFile#) + ZFG5$ + _
  1172.            " bytes" + ZEmphasizeOff$                                 ' RM052001
  1173.       GOSUB 21650
  1174.       IF ZFileSysParm > 1 THEN _
  1175.          RETURN
  1176.       IF ZBytesInFile# < 1 THEN _
  1177.          RETURN
  1178. * REPLACING old line(s) by new
  1179. 20790 ZSubParm = 2
  1180.       CALL Line25
  1181. * ------[ first line different ]------
  1182.       ZOutTxt$ = ZFG5$ + "Transfer Time:" + ZFG7$ + _
  1183.          STR$(INT(ZBlocksInFile# / 60)) + ZFG5$ + _
  1184.          " min," + ZFG7$ + _
  1185.          STR$(INT(ZBlocksInFile# - (INT(ZBlocksInFile# / 60) * 60))) + _
  1186.          ZFG5$ + " sec (approx)" + ZEmphasizeOff$                    ' RM052001
  1187.       GOSUB 21650
  1188.       IF ZFileSysParm > 1 THEN _
  1189.          RETURN
  1190. * REPLACING old line(s) by new
  1191. 20791 CALL CheckTimeRemain (MinsRemaining)
  1192.       IF ZSubParm = -1 THEN _
  1193.          ZFileSysParm = 6 : _
  1194.          RETURN
  1195.       ZOK = ZTrue
  1196.       Temp = ZExtraDnldTime
  1197.       CALL ChkAddedTime (Temp)
  1198.       Temp = MinsRemaining + Temp
  1199.       ZWasA = INT(ZBlocksInFile# / 60) + 1
  1200.       IF ZWasA <= Temp THEN _
  1201.          GOTO 20793
  1202. * ------[ first line different ]------
  1203.       ZOutTxt$ = ZFG5$ + "Not enough time left!  Need" + ZFG7$ + STR$(ZWasA) + _
  1204.                  ZFG5$ + " mins. and you have" + ZFG7$ + STR$(Temp) + _
  1205.                  ZFG5$ + " mins." + ZEmphasizeOff$                   ' RM052501
  1206.       CALL QuickTPut1 (ZOutTxt$)
  1207.       IF ZTimeBankInActive THEN _                                    ' RM09039301
  1208.          ZOutTxt$ = ZFG5$ + "Time Bank NOT available at this time!" + ZEmphasizeOff$ : _ ' RM09039301
  1209.          CALL QuickTPut1 (ZOutTxt$)                                  ' RM09039301
  1210.       IF NOT ZTimeBankInActive THEN                                    ' BB09039301
  1211.          IF ZGlobalBankTime + temp > ZWasA THEN _                    ' QWK-N-EZ
  1212.             Temp = ZGlobalBankTime : _                               ' QWK-N-EZ
  1213.             IF Temp > 0 THEN _                                       ' QWK-N-EZ
  1214.                ZOutTxt$ = ZFG7$ + _                                  ' QWK-N-EZ
  1215.                           " - Access the Time Bank ([Y]" + ZFG5$ + ",N) " + _ ' QNQWK-N-EZ
  1216.                           ZEmphasizeOff$ : _                         ' QWK-N-EZ
  1217.                ZTurboKey = -ZTurboKeyUser : _                        ' QWK-N-EZ
  1218.                CALL TGet : _                                         ' QWK-N-EZ
  1219.                IF ZSubParm = -1 THEN _                               ' QWK-N-EZ
  1220.                   ZFileSysParm = 7 : _                               ' QWK-N-EZ/RM03309401
  1221.                   RETURN _                                           ' QWK-N-EZ
  1222.                ELSE IF NOT(ZNo) THEN _                               ' QWK-N-EZ
  1223.                        CALL BankTime : _                             ' QWK-N-EZ
  1224.                        IF ZGlobalBankTime < Temp THEN _              ' QWK-N-EZ
  1225.                           GOTO 20791                                 ' QWK-N-EZ
  1226.       ENDIF                                                          ' BB09039301
  1227.       IF ZDownFiles < 2 THEN _
  1228.          GOTO 20792
  1229.       ZLastIndex = 0
  1230.       ZOutTxt$ = "Edit files to download ([Y],N)"
  1231.       ZTurboKey = - ZTurboKeyUser
  1232.       GOSUB 21668
  1233.       IF ZNo THEN _
  1234.          LastDnld = 0 : _
  1235.          GOTO 20792
  1236.       Temp = 0
  1237.       CALL OpenWork (2,ZDownloadWorkFile$ + ".DET")                  ' MARK174
  1238.       CALL SkipLine (2)                                              ' MARK174
  1239.       CALL QuickTPut1 (ZFG6$ + "Files you marked for DL are as follows ..." + ZCrLF$) ' MARK174
  1240.       CALL QuickTPut1 (ZFG7$ + "FileName       Bytes        DL Time" + ZCrLf$ + _
  1241.            ZFG5$ + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + ZEmphasizeOff$) ' yb040193
  1242.       WHILE NOT EOF(2)                                               ' MARK174
  1243.             LINE INPUT #2, FilesMarked$                              ' MARK174
  1244.             CALL QuickTPut1 (ZFG4$ + FilesMarked$ + ZEmphasizeOff$)  ' MARK174
  1245.       WEND                                                           ' MARK174
  1246.       CLOSE #2                                                       ' MARK174
  1247.       CALL SkipLine (2)                                              ' MARK174
  1248.       CALL OpenWork (2,ZDownloadWorkFile$)                           ' BTCH174
  1249.       WHILE NOT EOF(2)
  1250.          CALL ReadDir (2,1)
  1251.          CALL BreakFileName (ZOutTxt$,DR$,ZWasY$,WasX$,ZTrue)
  1252.          ZFileName$ = ZWasY$ + WasX$
  1253.          ZOutTxt$ = "Download " + ZFileName$ + " (Y,[N])"
  1254.          ZTurboKey = - ZTurboKeyUser
  1255.          GOSUB 21668
  1256.          IF ZYes THEN _
  1257.             Temp = Temp + 1 : _
  1258.             ZOutTxt$(Temp) = ZFileName$
  1259.       WEND
  1260.       CLOSE 2
  1261.       ZCmdTransfer$ = ZWasFT$                                        ' RM03199401
  1262.       ZAnsIndex = 1
  1263.       ReStart = (Temp > 0)
  1264.       LastDnld = Temp
  1265.       ZLastIndex = Temp
  1266.       FOR WasX = 1 TO  Temp
  1267.          ZUserIn$(WasX) = ZOutTxt$(WasX)
  1268.       NEXT
  1269. * REPLACING old line(s) by new
  1270. 20850 CALL CheckTime (ZDelay!, TempElapsed!, 1)
  1271. * ------[ first line different ]------
  1272.       IF TempElapsed! > 0 THEN _                                     ' RM08089302
  1273.          CALL GoIdle : _                                             ' RM08089302
  1274.          GOTO 20840
  1275. * REPLACING old line(s) by new
  1276. 20900 WasX$ = ""
  1277.       Sec = 1
  1278.       'CALL OpenOutW (ZFileName$)
  1279.       IF ZFLen > ZWriteBufDef THEN _
  1280.          WriteBuf = ZFLen _
  1281.       ELSE WriteBuf = ZWriteBufDef
  1282. * ------[ first line different ]------
  1283.       CALL OpenRSeq (ZFileName$,WasY,ZWasDF,WriteBuf,2)              ' RM01139402
  1284.       IF ZErrCode <> 0 AND ZErrCode <> 53 THEN _
  1285.          ZWasEL = 20900 : _
  1286.          GOTO 21900
  1287.       FIELD #2, WriteBuf AS ZUpldRec$
  1288.       RecsWrit = 0
  1289.       NumInBuff = 0
  1290.       TransferAbort! = TIMER + ZWaitBeforeDisconnect
  1291.       Year$ = " " + _
  1292.             CHR$(1) + _
  1293.             CHR$(2) + _
  1294.             ZEndTransmission$ + _
  1295.             ZCancel$
  1296. * REPLACING old line(s) by new
  1297. 21220 IF NumInBuff < 1 THEN _
  1298.          GOTO 21225
  1299.       WasWK$ = LEFT$(ZUpldRec$,NumInBuff)
  1300. * ------[ first line different ]------
  1301.       CALL OpenRSeq (ZFileName$,MaxBlock,ZWasDF,128,2)               ' RM01139402
  1302.       IF ZErrCode > 0 THEN _
  1303.          ZWasEL = 21220 : _
  1304.          GOTO 21900
  1305.       LastBlock = MaxBlock
  1306.       FIELD #2, 128 AS ZUpldRec$
  1307.       MaxBlock = CDBL(RecsWrit) * WriteBuf / 128
  1308.       FOR WasI = 1 TO NumInBuff/128
  1309.          CALL PutWork (MID$(WasWK$,128*WasI-127,128),MaxBlock,128)
  1310.          IF ZErrCode > 0 THEN _
  1311.             ZWasEL = 21220 : _
  1312.             GOTO 21900
  1313.       NEXT
  1314.       CLOSE 2
  1315. * REPLACING old line(s) by new
  1316. 21415 CALL EofComm (Char)
  1317.       IF Char <> -1 THEN _
  1318.          GOTO 21420
  1319.       GOSUB 21460
  1320.       IF ZFileSysParm > 1 THEN _
  1321.          RETURN
  1322.       IF ZKeyPressed$ = ZEscape$ THEN _
  1323.          RETURN
  1324. * ------[ first line different ]------
  1325.       CALL GoIdle                                                    ' RM01109403
  1326.       CALL CheckTime (TransferAbort!, TempElapsed!, 1)
  1327.       ON ZSubParm GOTO 21415,21455
  1328. * REPLACING old line(s) by new
  1329. 21470 CALL QuickLPrnt ("OK Sent Blk #",WasSO)
  1330. * ------[ first line different ]------
  1331.       CALL GoIdle                                                    ' RM01109403
  1332. * REPLACING old line(s) by new
  1333. 21700 ZErrCode = 0
  1334.       ZLastIndex = 0
  1335. * ------[ first line different ]------
  1336.       GOSUB 20179                                                    ' BTCH174
  1337.       RETURN
  1338. '
  1339. ' **** COMMON LOCAL DISPLAY PRINT ***
  1340. '
  1341. '  (formerly lines 1315 to 1320 in RBBS-PC.BAS
  1342. * REPLACING old line(s) by new
  1343. 21760 GOSUB 21780
  1344.       IF ZFileSysParm > 1 THEN _
  1345.          RETURN
  1346.       IF ZBatchTransfer THEN _
  1347. * ------[ first line different ]------
  1348.          CALL LinesInFile (ZDownloadWorkFile$,ZDownFiles) _          ' BTCH174
  1349.       ELSE ZDownFiles = 1
  1350.       IF NOT DnldCompleted THEN _
  1351.          ZAutoLogoffReq = ZFalse : _
  1352.          ZWasDF$ = " Aborted" : _
  1353.          GOTO 21768
  1354.       CALL LogPDown (ZPersonalDnld,1+ZAnsIndex-FirstDnld)
  1355.       WasX = ((ZRatioRestrict# > 0) AND ZEnforceRatios AND ZFreeDnld)
  1356.       IF NOT WasX THEN _
  1357.          ZDnlds = ZDnlds + ZDownFiles : _
  1358.          ZGlobalDLToday! = ZGlobalDLToday! + ZDownFiles : _
  1359.          ZGlobalDnlds = ZGlobalDnlds + ZDownFiles : _
  1360.          ZDLBytes! = ZDLBytes! + ZNumDnldBytes! : _
  1361.          ZGlobalDLBytes! = ZGlobalDLBytes! + ZNumDnldBytes! : _
  1362.          ZDLToday! = ZDLToday! + ZDownFiles : _
  1363.          ZBytesToday! = ZBytesToday! + ZNumDnldBytes! : _
  1364.          ZGlobalBytesToday! = ZGlobalBytesToday! + ZNumDnldBytes!
  1365.       ZNumDnldBytes! = 0
  1366.       CALL Muzak (6)
  1367.       ZWasDF$ = " Downloaded"
  1368.       IF (ZAnsIndex = LastDnld OR NOT ZConcatFIles) THEN _
  1369.          CALL SkipLine (1) : _
  1370.          CALL QuickTPut1 (ZFG8$ + "Download successful!" + ZEmphasizeOff$) : _ ' RM052001
  1371.          IF WasX THEN _
  1372.             CALL QuickTPut1 (ZFG5$ + "but not counted against ratios" + ZEmphasizeOff$) ' RM052001
  1373. * REPLACING old line(s) by new
  1374. 21770 CALL AMorPM
  1375. * ------[ first line different ]------
  1376.       CALL OpenWork (2,ZDownloadWorkFile$)                           ' BTCH174
  1377.       IF ZErrCode > 0 THEN _
  1378.          RETURN
  1379.       ZWasQ = 0
  1380.       WHILE NOT EOF(2)
  1381.          CALL ReadAny
  1382.          ZWasQ = ZWasQ + 1
  1383.          ZUserIn$(ZWasQ) = ZOutTxt$
  1384.       WEND
  1385. * REPLACING old line(s) by new
  1386. 21772 IF ZWasQ < 1 THEN _
  1387.          ZBatchTransfer = ZFalse : _
  1388. * ------[ first line different ]------
  1389.          GOTO 21775                                                  ' BTCH174
  1390.       CALL OpenWork (2,ZUserIn$(ZWasQ))
  1391.       IF ZErrCode > 0 THEN _
  1392.          ZErrCode = 0 : _
  1393.          ZWasQ = ZWasQ - 1 : _
  1394.          GOTO 21772
  1395.       ZBytesInFile# = LOF(2)
  1396.       ZFileName$ = ZUserIn$(ZWasQ)
  1397. * REPLACING old line(s) by new
  1398. * ------[ first line different ]------
  1399. 21774 IF ZMenuIndex = 6 AND NOT ZCDRom THEN _                        ' RM03259401
  1400.          IF DnldCompleted THEN _
  1401.             ZOutTxt$ = WasX$ : _
  1402.             ZSubParm = 5 : _
  1403.             CALL Library
  1404. * INSERTING new line(s)
  1405. 21775 IF ZHighSpeedTransfer THEN _                                   ' BTCH174
  1406.          GOTO 20700                                                  ' BTCH174
  1407.       RETURN                                                         ' BTCH174
  1408. '
  1409. ' *****   TURN ON INTERMEDIATE ECHO   ****
  1410. '
  1411. '  (formerly line 50620 in RBBS-PC.BAS
  1412. * REPLACING old line(s) by new
  1413. * ------[ first line different ]------
  1414. 21810 ZOutTxt$ = ZFG9$ + "Search string or filename (wildcards OK), [ENTER]" + _
  1415.          ZFG9$ + " quits)" + ZEmphasizeOff$                        ' RM10079303
  1416.       ZMacroMin = 99
  1417.       GOSUB 21668
  1418.       IF ZWasQ = 0 THEN _
  1419.          RETURN
  1420. * REPLACING old line(s) by new
  1421. 21820 WasRS$ = ZUserIn$(ZAnsIndex)
  1422. * ------[ first line different ]------
  1423.       IF LEN(WasRS$) > 30 THEN _                                     ' RM031201
  1424.          CALL SkipLine (1) : _                                       ' RM031201
  1425.          CALL QuickTPut1 (ZFG5$ + "Search String Too Long! (Max. " + _
  1426.                ZFG7$ + "30" + ZFG5$ + " chrs)" + ZEmphasizeOff$) : _ ' RM031201
  1427.          ZAnsIndex = ZLastIndex : _                                  ' RM031201
  1428.          RETURN                                                      ' RM031201
  1429.       WildSearch = (INSTR(WasRS$,"*") > 0 OR INSTR(WasRS$,"?") > 0)
  1430.       CALL AllCaps (WasRS$)
  1431.       IF RIGHT$(WasRS$,1) = "*" THEN _
  1432.          IF RIGHT$(WasRS$,2) <> ".*" THEN _
  1433.             WasRS$ = WasRS$ + ".*"
  1434.       SearchString$ = WasRS$
  1435.       SearchDate$ = ""
  1436.       ZJumpSearching = ZFalse
  1437.       WasA1$ = WasRS$
  1438.       ZExtendedOff = ZFalse
  1439.       GOTO 21867
  1440. '
  1441. ' *****  P - personal download  ****
  1442. '
  1443. '  (formerly lines 52950 to 52952 in RBBS-PC.BAS
  1444. * REPLACING old line(s) by new
  1445. 21850 IF ZPersonalBegin < 1 OR ZPersonalLen < 1 THEN _
  1446.          RETURN
  1447.       DnldFlag = 0
  1448.       ZPersonalDnld = ZTrue
  1449. * ------[ first line different ]------
  1450.       ZFileWaiting = ZFalse                                          ' RM032601
  1451.       ZFreeDnld = ZPersonalDnld                                      ' RM032601
  1452.       ZListOnly = ZPersonalDnld                                      ' RM032601
  1453.       ZExtraDnldTime = -60 * ZPersonalDnld                           ' RM032601
  1454. * REPLACING old line(s) by new
  1455. 21852 ZActiveFMSDir$ = ZPersonalDir$
  1456. * ------[ first line different ]------
  1457.       IF ZSysOp THEN _                                               ' RM02049403
  1458.          Temp$ = "SYSOP" _                                           ' RM02049403
  1459.       ELSE _                                                         ' RM02049403
  1460.          Temp$ = MID$(ZUserRecord$,ZPersonalBegin,ZPersonalLen)      ' RM02049403
  1461.       CALL PersFile (Temp$,DnldFlag)                                 ' RM02049403
  1462.       IF ZFileSysParm = 4 THEN _                                     ' RM01209401
  1463.          RETURN                                                      ' RM01209401
  1464.       IF ZSubParm = -1 THEN _
  1465.          ZFileSysParm = 7: _
  1466.          RETURN
  1467.       IF ZAnsIndex > ZLastIndex OR ZRet THEN _                       ' BTCH174/RM041001
  1468.          GOTO 21854
  1469.       ZConcatFIles = ZPersonalConcat
  1470.       ZStopInterrupts = ZTrue
  1471.       TimeLockExempt = ZTrue
  1472.       GOSUB 20202
  1473.       IF ZFileSysParm > 1 THEN _
  1474.          GOTO 21854
  1475.       TimeLockExempt = ZFalse
  1476.       ZConcatFIles = ZFalse
  1477.       GOTO 21852
  1478. * REPLACING old line(s) by new
  1479. * ------[ first line different ]------
  1480. 21854 GOSUB 20178                                                    ' RM032601
  1481.       RETURN
  1482. '
  1483. ' *  WasN - COMMAND FROM FILES MENU (DISPLAY NEW FILES SINCE Last DIR DISPLAY)
  1484. '
  1485. '  (formerly lines 53000 to 53070 in RBBS-PC.BAS
  1486. * REPLACING old line(s) by new
  1487. 21862 WasA1$ = RIGHT$(ZWasLM$,4) +_
  1488.             LEFT$(ZWasLM$,2)
  1489. * ------[ first line different ]------
  1490.       ZOutTxt$ = ZFG9$ + "Files on/after MMDDYY, [S]" + ZFG9$ + "ince = " + _
  1491.            ZFG7$ + WasA1$ + ZEmphasizeOff$                           ' RM10079303
  1492.       GOSUB 21668
  1493.       CALL AraAllCaps (ZUserIn$(),ZAnsIndex)
  1494.       IF ZWasQ = 0 OR ZUserIn$(ZAnsIndex) = "S" THEN _
  1495.          WasRS$ = ZWasLM$ : _
  1496.          GOTO 21866
  1497. * REPLACING old line(s) by new
  1498. * ------[ first line different ]------
  1499. 21867 DirPromptSave$ = ZDirPrompt$                                   ' RM02049404
  1500.       ZDirPrompt$ = MID$(ZDirPrompt$,1,(INSTR(ZDirPrompt$,"P") - 1)) + _
  1501.         MID$(ZDirPrompt$,INSTR(ZDirPrompt$,"P") + 6,LEN(ZDirPrompt$) - (INSTR(ZDirPrompt$,"P") + 5)) ' RM02049404
  1502. * INSERTING new line(s)
  1503. 21869 CALL GetDirs (NOT ZExpertUser)
  1504.       IF ZWasQ = 0 THEN _
  1505.          ZDirPrompt$ = DirPromptSave$ : _                            ' RM02049404
  1506.          RETURN
  1507.       IF ZUserIn$(ZAnsIndex) = "P" THEN _                            ' RM02049404
  1508.          GOTO 21869                                                  ' RM02049404
  1509. * REPLACING old line(s) by new
  1510. 21880 WasQX = ZAnsIndex
  1511.       GOSUB 20157
  1512.       IF ZFileSysParm > 1 THEN _
  1513.          RETURN
  1514.       ZAnsIndex = ZAnsIndex + 1
  1515.       IF ZAnsIndex <= ZLastIndex THEN _
  1516.          GOTO 21875
  1517. * ------[ first line different ]------
  1518.       ZDirPrompt$ = DirPromptSave$                                   ' RM02049404
  1519.       ListNew = ZFalse
  1520.       SearchString$ = ""
  1521.       SearchDate$ = ""
  1522.       RETURN
  1523. * REPLACING old line(s) by new
  1524. * ------[ first line different ]------
  1525. 21895 CALL QuickTPut1 (ZEmphasizeOn$ + "No room for uploads. Try tomorrow" + ZEmphasizeOff$) ' RM052001
  1526.       RETURN
  1527. '
  1528. ' *  MAIN FILE SYSTEM ERROR TRAP - ALL ERRORS PASS THROUGH THIS ROUTINE
  1529. '
  1530. '  (formerly lines 13000 to 13500 in RBBS-PC.BAS
  1531. * REPLACING old line(s) by new
  1532. 63100 ' $SUBTITLE: 'DoorReturn - Subroutine to process requests from a door'
  1533. ' $PAGE
  1534. '
  1535. '  NAME    -- DoorReturn
  1536. '
  1537. '  INPUTS  -- PARAMETER                      MEANING
  1538. '             DOUTx.DEF               File of requests
  1539. '
  1540. '  OUTPUTS -- ZUserSecLevel     Revised Security Level
  1541. '
  1542. '  PURPOSE -- To give Doors a stable way to make requests
  1543. '             to the host.
  1544. '
  1545.       SUB DoorReturn STATIC
  1546.       IF NOT ZExitToDoors THEN _
  1547.          EXIT SUB
  1548.       CALL OpenUser (ZHighestUserRecord)
  1549.       FIELD 5, 128 AS ZUserRecord$
  1550.       FIELD 5,31 AS ZUserName$, _
  1551.               15 AS ZPswd$, _
  1552.                2 AS ZSecLevel$, _
  1553.               14 AS ZUserOption$,  _
  1554.               24 AS ZCityState$, _
  1555. * ------[ first line different ]------
  1556.                1 AS MachineType$, _                                  ' DROP174
  1557.                1 AS ZDropTimes$, _                                   ' DROP174
  1558.                1 AS ZBankTime$,_
  1559.                4 AS ZTodayDl$, _
  1560.                4 AS ZTodayBytes$, _
  1561.                4 AS ZDlBytes$, _
  1562.                4 AS ZULBytes$, _
  1563.               14 AS ZLastDateTimeOn$, _
  1564.                3 AS ZListNewDate$, _
  1565.                2 AS ZUserDnlds$, _
  1566.                2 AS ZUserUplds$, _
  1567.                2 AS ZElapsedTime$
  1568.       ZSubParm = 6
  1569.       CALL FileLock
  1570.       GET 5,ZUserFileIndex
  1571.       ZTimesLoggedOn = CVI(MID$(ZUserOption$,1,2))
  1572.       CALL SetSysOp
  1573.       CALL SetUserPref
  1574.       CALL SetUserUpDn
  1575.       ZGlobalsSet = ZFalse
  1576.       CALL SetGlobalUpDn
  1577.       ZElapsedTime = CVI(MID$(ZUserRecord$,127,2))
  1578.       ZFileName$ = "DOUT" + ZNodeID$ + ".DEF"
  1579.       CALL FindIt (ZFileName$)
  1580.       IF NOT ZOK THEN _
  1581.          GOTO 63197
  1582. * REPLACING old line(s) by new
  1583. 63110 WasX$ = LEFT$(ZOutTxt$(2),1)         ' ZWasSL = Security Level
  1584.       CALL CheckInt (ZOutTxt$(2))
  1585.       IF ZErrCode > 0 THEN _
  1586.          GOTO 63105
  1587.       IF WasX$ = "+" OR WasX$ = "-" THEN _
  1588.          ZWasA = ZUserSecLevel + ZTestedIntValue _
  1589.       ELSE ZWasA = ZTestedIntValue
  1590.       IF ZWasA < ZSysopSecLevel THEN _
  1591.          ZAdjustedSecurity = (ZWasA <> ZUserSecLevel) : _
  1592.          IF ZAdjustedSecurity THEN _
  1593.             ZUserSecLevel = ZWasA : _
  1594.             MID$(ZUserRecord$,47,2) = MKI$(ZWasA) : _
  1595.             CALL QuickTPut1 ("Security changed to" + STR$(ZWasA)) : _
  1596. * ------[ first line different ]------
  1597.             CALL UpdtCalr ("Door reset security to "+STR$(ZWasA),2) : _ ' SS01229401
  1598.             CALL SetPrivileges                                       ' SS01229401
  1599.       GOTO 63105
  1600. * DELETING old line(s)
  1601. 63200
  1602. 63285
  1603. 63286
  1604. 63287
  1605. 63288
  1606. 63289
  1607. * REPLACING old line(s) by new
  1608. 63310 ' $SUBTITLE: 'RestoreCom - sub to restore comm port'
  1609. ' $PAGE
  1610. '
  1611. '  NAME    -- RestoreCom
  1612. '
  1613. '  INPUTS  -- none
  1614. '
  1615. '  OUTPUTS -- none
  1616. '
  1617. '  PURPOSE -- To restore communications port after an external
  1618. '             program may have left it in altered state
  1619. '
  1620. * ------[ first line different ]------
  1621.       SUB RestoreCom                                                 ' RM11159302
  1622.       Parity$ = MID$(",N,8,1,E,7,1",7 + 6 * ZEightBit,6)
  1623.       IF ZLocalUser THEN _
  1624.          EXIT SUB
  1625.       CALL SetBaud
  1626.       IF NOT ZFossil THEN _
  1627.          CALL OpenCom(ZTalkToModemAt$,Parity$)
  1628.       END SUB
  1629. * DELETING old line(s)
  1630. 63320
  1631. * REPLACING old line(s) by new
  1632. 63330 ' $SUBTITLE: 'ReadMacro - sub to read macro'
  1633. ' $PAGE
  1634. '
  1635. '  NAME    -- ReadMacro
  1636. '
  1637. '  INPUTS  -- PARAMETER             MEANING
  1638. '
  1639. '  OUTPUTS -- ZOutTxt$               LINE TO PROCESS IN MACRO
  1640. '             ZMacroActive           FLAG WHETHER IN A MACRO
  1641. '
  1642. '  PURPOSE -- Reads in a line from macro file (#6) and processes
  1643. '             macro commands, which are:
  1644. '             *0 - display what follows, no carriage return
  1645. '             *1 - display what follows with carriage return
  1646. '             *B - display block that follows
  1647. '             *F - display File
  1648. '             WT - wait specified # of seconds
  1649. '             >> - append following block to specified file
  1650. '             ST - stack following (with carriage return)
  1651. '             ON - define case
  1652. '             == - case value that applies to following block
  1653. '             M! - execute following macro
  1654. '             M@ - abort macro processing
  1655. '             EY - Echo on (yes)
  1656. '             EN - Echo off (no)
  1657. '             /* - comment line skipped in processing
  1658. '             TK - Turbo key on (if user preference)
  1659. '             << - Read from file into a form
  1660. '             := - Assign value to work variable
  1661. '             LO - Set the location of a file
  1662. * ------[ first line different ]------
  1663. '             AT - Abort a file transfer                             ' RM03219401
  1664. '
  1665.       SUB ReadMacro STATIC
  1666.       IF ZMacroTemplate$ <> "" THEN _
  1667.          GOTO 63392
  1668.       IF ZDistantTGet = 2 THEN _
  1669.          GOTO 63349
  1670. * REPLACING old line(s) by new
  1671. 63336 GOSUB 63395
  1672.       IF NOT ZMacroActive THEN _
  1673.          ZMacroEcho = ZTrue : _
  1674.          EXIT SUB
  1675.       IF CompareVar > 0 THEN _
  1676.          IF NOT CaseExecute THEN _
  1677.             IF LEFT$(ZOutTxt$,3) = ZSmartTextCode$+"==" THEN _
  1678.                WasX$ = RIGHT$(ZOutTxt$,LEN(ZOutTxt$)-3) : _
  1679.                GOTO 63370 _
  1680.             ELSE IF LEFT$(ZOutTxt$,7) = ZSmartTextCode$ + "END ON" THEN _
  1681.                     CompareVar = 0 : _
  1682.                     GOTO 63336 _
  1683.                   ELSE GOTO 63336
  1684.       IF LEN(ZOutTxt$) < 3 THEN _
  1685.          GOTO 63398
  1686.       WasX$ = RIGHT$(ZOutTxt$,LEN(ZOutTxt$)-3)
  1687.       IF LEFT$(ZOutTxt$,1) <> ZSmartTextCode$ THEN _
  1688.          GOTO 63398
  1689.       CALL CheckInt (MID$(ZOutTxt$,2))
  1690.       IF ZErrCode > 0 THEN _
  1691.          GOTO 63398
  1692.       IF ZTestedIntValue > 0 AND ZTestedIntValue <= ZMaxWorkVar THEN _
  1693.          ZOutTxt$ = WasX$ : _  ' Macro command ask
  1694.          ZForceKeyboard = ZTrue : _
  1695.          ZMacroSave = ZTestedIntValue : _
  1696.          ZLinesPrinted = 1 : _
  1697.          ZNonStop = (ZPageLength < 1) : _
  1698.          EXIT SUB
  1699. * ------[ first line different ]------
  1700.       ON (1+INSTR("*0*1*B*FWT>>STON==M!M@EYEN/*TK<<:=LVNVCVLOAT",MID$(ZOutTxt$,2,2)))\2 GOTO _ ' RM03219401
  1701.          63345, _  ' Display with no Carriage Return
  1702.          63347, _  ' Display with Carriage Return
  1703.          63340, _  ' Display Block
  1704.          63348, _  ' Display File
  1705.          63343, _  ' Wait # of seconds
  1706.          63350, _  ' Append to file
  1707.          63355, _  ' Stack
  1708.          63360, _  ' Case
  1709.          63370, _  ' Case Comparison
  1710.          63375, _  ' Macro execute
  1711.          63380, _  ' Macro Abort
  1712.          63383, _  ' Macro Echo on
  1713.          63385, _  ' Macro Echo off
  1714.          63336, _  ' Macro Comment
  1715.          63387, _  ' Turbo Key allowed
  1716.          63390, _  ' Form read
  1717.          63362, _  ' Assign value to work var
  1718.          63363, _  ' LV list verify
  1719.          63364, _  ' NV number verify
  1720.          63364, _  ' CV character verify
  1721.          63367, _  ' LO assign file location
  1722.          63368     ' AT abort a file transfer                        ' RM03219401
  1723.       GOTO 63398
  1724. * REPLACING old line(s) by new
  1725. * ------[ first line different ]------
  1726. 63355 CALL GlobalSrchRepl (WasX$,"|",ZCarriageReturn$,ZTrue)         ' KG011201
  1727.       ZCommPortStack$ = ZCommPortStack$ + WasX$ + ZCarriageReturn$  ' STack
  1728.       GOTO 63336
  1729. * INSERTING new line(s)
  1730. 63368 IF ZFileSysParm > 0 THEN _                                     ' RM03219401
  1731.          ZAbort = ZTrue                                              ' RM03219401
  1732.       GOTO 63336                                                     ' RM03219401
  1733. * DELETING old line(s)
  1734. 63400
  1735. 63410
  1736. 63420
  1737. 63422
  1738. 63440
  1739. 63450
  1740. 63460
  1741. * REPLACING old line(s) by new
  1742. 63462 ' Unconditionally executes a macro
  1743. * ------[ first line different ]------
  1744.       SUB FDMACEXE STATIC                                            ' RM061101
  1745.       ZOutTxt$ = ""
  1746.       ZMacroEcho = ZFalse
  1747.       ZSubParm = 1
  1748.       CALL TGet
  1749.       END SUB
  1750. * DELETING old line(s)
  1751. 63465
  1752. 63470
  1753. 63480
  1754. 63490
  1755. 63495
  1756. * REPLACING old line(s) by new
  1757. 63500 ' $SUBTITLE: 'CmdStackPushPop - Save/restore command stack'
  1758. ' $PAGE
  1759. '
  1760. '  NAME    -- CmdStackPushPop
  1761. '
  1762. '  INPUTS  -- Index    = 1    Save command stack
  1763. '                      = 2    Restore command stack
  1764. '             ZAnsIndex
  1765. '             ZLastIndex
  1766. '             ZUserIn$()
  1767. '
  1768. '  OUTPUTS -- ZUserIn$()                  Stacked commands
  1769. '             ZAnsIndex
  1770. '             ZLastIndex
  1771. '
  1772. '  PURPOSE -- Save restore a command stack list when need to input
  1773. '             another list in middle of previous list processing
  1774. '
  1775.       SUB CmdStackPushPop (Index) STATIC
  1776. * ------[ first line different ]------
  1777.       ON INDEX GOTO 63501,63505
  1778. * INSERTING new line(s)
  1779. 63501 Temp = UBOUND(ZOutTxt$)  ' Save ZOutTxt$() original dimension ' RM03119401
  1780.       Temp1 = UBOUND(ZUserIn$) ' Get dimension of ZUserIn$()        ' RM03119401
  1781.       IF Temp < Temp1 THEN _                                        ' RM03289401
  1782.          REDIM ZOutTxt$(Temp1) ' Match dimesions of arrays          ' RM03119401
  1783.       IF Index = 1 THEN _
  1784.          OrigLastIndex = ZLastIndex : _  ' save
  1785.          OrigIndex = ZAnsIndex : _
  1786.          FOR WasI = 1 TO OrigLastIndex : _
  1787.              ZOutTxt$(WasI) = ZUserIn$(WasI) : _
  1788.          NEXT : _
  1789.          EXIT SUB
  1790. 63505 ZLastIndex = OrigLastIndex        ' restore
  1791.       ZAnsIndex = OrigIndex
  1792.       FOR WasI = 1 TO OrigLastIndex
  1793.          ZUserIn$(WasI) = ZOutTxt$(WasI)
  1794.       NEXT
  1795.       IF Temp < Temp1 THEN _     ' Check to see if restore in order ' RM03289401
  1796.          REDIM ZOutTxt$(Temp) ' Redimension ZOutTxt$ to orginal size ' RM03119401
  1797.       END SUB
  1798. * DELETING old line(s)
  1799. 63510
  1800. 63520
  1801. 63522
  1802. 63530
  1803. 63540
  1804. 63542
  1805. 63550
  1806. 63560
  1807. * REPLACING old line(s) by new
  1808. 63572 ZOutTxt$ = "Extension reduced to"+ STR$(TimeToAdd) + _
  1809.                  " due to " + ZOutTxt$ + " Event" : _
  1810.       CALL RingCaller
  1811.       END SUB
  1812. * ------[ first line different ]------
  1813. '                                                                    ' XFER174
  1814. ' $SUBTITLE: 'TStats --- Display Transfer Stats from XFER-? file'    ' XFER174
  1815. ' $PAGE                                                              ' XFER174
  1816. '                                                                    ' XFER174
  1817. * DELETING old line(s)
  1818. 63580
  1819. 63581
  1820. 63582
  1821. 63583
  1822. 63585
  1823. 63590
  1824. 63592
  1825. 63594
  1826. 63595
  1827. 63600
  1828. 63605
  1829. 63610
  1830. 63615
  1831. 63620
  1832. 63625
  1833. 63630
  1834. 63632
  1835. 63635
  1836. 63640
  1837. 63645
  1838. 63650
  1839. 63652
  1840. 63654
  1841. 63656
  1842. 63658
  1843. 63659
  1844. 63675
  1845. 63700
  1846. 63705
  1847. 63710
  1848. 63715
  1849. 63720
  1850. * INSERTING new line(s)
  1851. 65004 SUB TStats                                                     ' XFER174/RM11159302
  1852.       CALL OpenWork (2,"XFER-" + ZNodeID$ + ".DEF")                  ' XFER174
  1853.       CALL SkipLine (2)                                              ' XFER174
  1854.       CALL QuickTPut1 (ZFG6$ + " Stats on this Transfer are as Follows........"+ZCrLF$) ' XFER174
  1855.       CALL QuickTPut1 (ZFG7$ + "FileName         Bytes  Dtr Rate   CPS      Errors " + ZCrLf$ + _ ' XFER174
  1856.            ZFG5$ + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + ZEmphasizeOff$)  ' XFER174
  1857.       WHILE NOT EOF(2)                                               ' XFER174
  1858.          LINE INPUT #2,Stat$                                         ' XFER174
  1859.          WasS = INSTR(Stat$,"rs ")                                   ' XFER174
  1860.          IF WasS > 0 THEN _                                          ' XFER174
  1861.             WasX$ = MID$(Stat$,2,WasS) _                             ' XFER174/RM031201
  1862.          ELSE _                                                      ' XFER174/RM031201
  1863.             GOTO 65006                                               ' XFER174/RM031201
  1864.          Match = INSTR(Stat$, ".")                                   ' XFER174
  1865.          IF Match > 0 THEN _                                         ' XFER174
  1866.             WasZyX$ = MID$(Stat$, Match - 8, 12)                     ' XFER174
  1867.          Match = 0                                                   ' XFER174
  1868.          Start = 1                                                   ' XFER174
  1869.          DO                                                          ' XFER174
  1870.             Match = INSTR(Start, WasZyX$, "\")                       ' XFER174
  1871.             IF Match = 0 THEN _                                      ' XFER174
  1872.                Match = INSTR(Start, WasZyX$, "/")                    ' XFER174
  1873.             IF Match = 0 THEN _                                      ' XFER174
  1874.                Match = INSTR(Start, WasZyX$, " ")                    ' XFER174
  1875.             WasZyX$ = RIGHT$(WasZyX$, LEN(WasZyX$) - Match)          ' XFER174
  1876.             LOOP WHILE Match                                         ' XFER174
  1877.             WasXy = LEN(WasZyX$)                                     ' XFER174
  1878.             CALL QuickTPut1 (ZFG1$ + WasZyX$ + SPACE$(15-WasXy) + _  ' XFER174
  1879.                              WasX$ + ZEmphasizeOff$)                 ' XFER174
  1880. 65006 WEND                                                           ' XFER174/RM031201
  1881.       CALL SkipLine (1)                                              ' XFER174
  1882.       CLOSE 2                                                        ' XFER174
  1883.       END SUB                                                        ' XFER174
  1884. 65009 ' $SUBTITLE: 'FileLister - subroutine to handle list of upload files' ' BTCH174
  1885. ' $PAGE                                                              ' BTCH174
  1886. '                                                                    ' BTCH174
  1887. '  NAME    -- FileLister                                             ' BTCH174
  1888. '                                                                    ' BTCH174
  1889. '                 PARAMETER                    MEANING               ' BTCH174
  1890. '                                                                    ' BTCH174
  1891. '  INPUTS  --  ZFileName$            File name and path              ' BTCH174
  1892. '              ZFileNameHold$        File name                       ' BTCH174
  1893. '              ZDesc$                file description                ' BTCH174
  1894. '              ZUCat$                file category                   ' BTCH174
  1895. '              ZWhoTo$               who file is to                  ' BTCH174/RM111502
  1896. '              WasFF                 1 = store file info             ' BTCH174/RM111502
  1897. '                                    2 = read file info              ' BTCH174/RM111502
  1898. '                                                                    ' BTCH174
  1899. '  OUTPUTS --                                                        ' BTCH174
  1900. '                                                                    ' BTCH174
  1901. '  PURPOSE --  To list files, description and category for uploading ' BTCH174
  1902. '                                                                    ' BTCH174
  1903. '  WRITTEN BY: R. Molinelli                                          ' BTCH174
  1904. '                                                                    ' BTCH174
  1905. 65010 SUB FileLister (WasFF)                                         ' BTCH174/RM111502/RM11159302
  1906.       ON WasFF GOTO 65012,65014                                      ' BTCH174
  1907. 65012 CALL OpenWorkA (ZNodeWorkDrvPath$ + "NODE" + ZNodeID$ + "FUP.LST") ' BTCH174
  1908.       CALL PrintWorkA (ZFileName$)                                   ' BTCH174
  1909.       CALL PrintWorkA (ZFileNameHold$)                               ' BTCH174
  1910.       CALL PrintWorkA (ZDesc$)                                       ' BTCH174
  1911.       CALL PrintWorkA (ZUCat$)                                       ' BTCH174
  1912.       CALL PrintWorkA (ZWhoTo$)                                      ' BTCH174/RM103101
  1913.       CLOSE 2                                                        ' BTCH174
  1914.       CALL OpenWorkA (ZUploadWorkFile$)                              ' BTCH174
  1915.       CALL PrintWorkA (ZFileName$)                                   ' BTCH174
  1916.       CLOSE 2                                                        ' BTCH174
  1917.       IF ZAnsIndex = ZLastIndex AND ZUpBatchTransfer THEN _          ' BTCH174
  1918.          ZUpBatchTransfer = ZFalse : _                               ' BTCH174
  1919.          ZWasBatchTransfer = ZTrue                                   ' BTCH174
  1920.       EXIT SUB                                                       ' BTCH174
  1921. 65014 CALL KillWork (ZUploadWorkFile$)                               ' BTCH174
  1922.       ZErrCode = 0                                                   ' BTCH174
  1923.       Temp$ = ZNodeWorkDrvPath$ + "NODE" + ZNodeID$ + "FUP.LST"      ' BTCH174
  1924.       CALL OpenWork (8,Temp$)                                        ' BTCH174
  1925.       IF ZErrCode = 0 THEN                                           ' BTCH174/RM040601
  1926.          WHILE NOT EOF(8)                                            ' BTCH174
  1927.             LINE INPUT #8,ZFileName$                                 ' BTCH174
  1928.             LINE INPUT #8,ZFileNameHold$                             ' BTCH174
  1929.             LINE INPUT #8,ZDesc$                                     ' BTCH174
  1930.             LINE INPUT #8,ZUCat$                                     ' BTCH174
  1931.             LINE INPUT #8,ZWhoTo$                                    ' BTCH174/RM103101
  1932.             Found = ZFalse                                           ' BTCH174/RM032501
  1933.             CALL FindFile (ZFileName$,Found)                         ' BTCH174/RM032501
  1934.             IF Found THEN _                                          ' BTCH174/RM032501
  1935.                CALL UpdtUpload (ZCategoryName$(),ZCategoryCode$(),ZLinesInMsg,2) _ ' BTCH174
  1936.             ELSE _                                                   ' BTCH174
  1937.                IF ZWasBatchTransfer THEN _                           ' BTCH174
  1938.                   CALL UpdtCalr (ZFileNameHold$ + " Aborted during Batch Upload",2) _ ' BTCH174
  1939.                ELSE _                                                ' BTCH174
  1940.                   ZGetExtDesc = ZFalse : _                           ' BTCH174/RM033001
  1941.                   CALL UpdtCalr (ZFileNameHold$ + " Aborted during Upload",2) ' BTCH174
  1942.          WEND                                                        ' BTCH174
  1943.          CLOSE 8                                                     ' BTCH174
  1944.          IF ZWasBatchTransfer THEN _                                 ' BTCH174
  1945.             CALL UpdtCalr ("Batch Upload Completed at " + ZTime$,2)  ' BTCH174
  1946.          CALL KillWork (Temp$)                                       ' BTCH174
  1947.       ENDIF                                                          ' RM040601
  1948.       ZErrCode = 0                                                   ' BTCH174
  1949.       END SUB                                                        ' BTCH174
  1950. 65099 ' $SUBTITLE: 'HSFile - subroutine to check XFER-%.DEF file for extra files'
  1951. ' $PAGE                                                              ' BTCH174
  1952. '                                                                    ' BTCH174
  1953. '  NAME    -- HSFile                                                 ' BTCH174
  1954. '                                                                    ' BTCH174
  1955. '                 PARAMETER                    MEANING               ' BTCH174
  1956. '                                                                    ' BTCH174
  1957. '  INPUTS  __                                                        ' BTCH174
  1958. '                                                                    ' BTCH174
  1959. '  OUTPUTS --                                                        ' BTCH174
  1960. '                                                                    ' BTCH174
  1961. '  PURPOSE --  To check XFER-%.DEF file for extra uploads that the   ' BTCH174
  1962. '              user did not tell the system he was sending.          ' BTCH174
  1963. '                                                                    ' BTCH174
  1964. '  WRITTEN BY: R. Molinelli 8-15-92                                  ' BTCH174
  1965. '                                                                    ' BTCH174
  1966. 65100 SUB HSFile                                                     ' BTCH174/RM11159302
  1967.       CALL OpenWork (10,"XFER-" + ZNodeID$ + ".DEF")                 ' BTCH174
  1968.       IF ZErrCode <> 0 THEN _                                        ' BTCH174
  1969.          ZErrCode = 0 : _                                            ' BTCH174
  1970.          EXIT SUB                                                    ' BTCH174
  1971.       ZFoundExtra = ZFalse                                           ' RM082901
  1972.       ZSuspendAutoLogoff = ZTrue                                     ' BTCH174/RM101501
  1973.       BatchOff = ZAutoLogoffReq                                      ' BTCH174/RM101501
  1974. 65101 WHILE NOT EOF(10)                                              ' BTCH174
  1975.          LINE INPUT #10,Line$                                        ' BTCH174
  1976.          Match = INSTR(Line$, ".")                                   ' BTCH174
  1977.          IF Match > 0 THEN _                                         ' BTCH174
  1978.             ZFileNameHold$ = MID$(Line$, Match - 8, 12)              ' BTCH174
  1979.          Match = 0                                                   ' BTCH174
  1980.          Start = 1                                                   ' BTCH174
  1981.          DO                                                          ' BTCH174
  1982.             Match = INSTR(Start, ZFileNameHold$, "\")                ' BTCH174
  1983.             IF Match = 0 THEN _                                      ' BTCH174
  1984.                Match = INSTR(Start, ZFileNameHold$, "/")             ' BTCH174
  1985.             IF Match = 0 THEN _                                      ' BTCH174
  1986.                Match = INSTR(Start, ZFileNameHold$, " ")             ' BTCH174
  1987.             ZFileNameHold$ = RIGHT$(ZFileNameHold$, LEN(ZFileNameHold$) - Match) ' BTCH174
  1988.          LOOP WHILE Match                                            ' BTCH174
  1989.          CALL AllCaps (ZFileNameHold$)                               ' RM083001
  1990.          CALL OpenWork (11,ZUploadWorkFile$)                         ' BTCH174
  1991.          IF ZErrCode = 0 THEN                                        ' BTCH174/RM040601
  1992.             WHILE NOT EOF(11)                                        ' BTCH174
  1993.                LINE INPUT #11,Line$                                  ' BTCH174
  1994.                Match = INSTR(Line$,ZFileNameHold$)                   ' BTCH174
  1995.                IF Match > 0 THEN _                                   ' BTCH174
  1996.                   ZFileNameHold$ = "" : _                            ' BTCH174
  1997.                   CLOSE 11 : _                                       ' BTCH174
  1998.                   GOTO 65107                                         ' BTCH174/RM082902
  1999.             WEND                                                     ' BTCH174
  2000.             CLOSE 11                                                 ' BTCH174
  2001.          ENDIF                                                       ' BTCH174/4M040601
  2002.          ZErrCode = 0                                                ' BTCH174/RM040601
  2003.          CALL OpenWork (11,ZDownloadWorkFile$)                       ' BTCH174
  2004.          IF ZErrCode <> 0 THEN _                                     ' RM082902
  2005.             ZErrCode = 0 : _                                         ' RM082902
  2006.             GOTO 65102                                               ' RM082902
  2007.          WHILE NOT EOF(11)                                           ' BTCH174
  2008.             LINE INPUT #11,Line$                                     ' BTCH174
  2009.             Match = INSTR(Line$,ZFileNameHold$)                      ' BTCH174
  2010.             IF Match > 0 THEN _                                      ' BTCH174
  2011.                ZFileNameHold$ = "" : _                               ' BTCH174
  2012.                CLOSE 11 : _                                          ' BTCH174
  2013.                GOTO 65107                                            ' BTCH174/RM082902
  2014.          WEND                                                        ' BTCH174
  2015.          CLOSE 11                                                    ' BTCH174
  2016. 65102    ZFileName$ = ZUpldSubDir$ + "\" + ZFileNameHold$            ' BTCH174/RM08249301
  2017.          CALL FindFile (ZFileName$,Found)                            ' BTCH174/RM08249301
  2018.          IF NOT Found THEN _                                         ' BTCH174/RM08249301
  2019.             GOTO 65107                                               ' BTCH174/RM08249301
  2020. 65103    GOSUB 65109                                                 ' BTCH174/RM082902
  2021.          BatchOff = ZFalse                                           ' BTCH174/RM101501
  2022.          CALL SkipLine (1)                                           ' BTCH174
  2023.          CALL HSAddFileSearch (Found)                                ' BTCH174/RM111001
  2024.          IF Found THEN _                                             ' BTCH174/RM111001
  2025.             CALL QuickTPut1 (ZEmphasizeOn$ + "Additional File " + _
  2026.               ZFileNameHold$ + " already exists here!" + ZEmphasizeOff$) : _ ' BTCH174/RM111001
  2027.             CALL QuickTPut1 (ZEmphasizeOn$ + "Deleting file and removing credits!" + _
  2028.                           ZEmphasizeOff$) : _                        ' BTCH174/RM111001
  2029.             CALL SkipLine (1) : _                                    ' BTCH174/RM111001
  2030.             GOTO 65107                                               ' BTCH174/RM111001
  2031.          CALL Carrier                                                ' BTCH174
  2032.          IF ZSubParm = -1 THEN _                                     ' BTCH174
  2033.             ZDesc$ = " >>> Description Unavailable <<< " : _         ' BTCH174
  2034.             ZUCat$ = "***" : _                                       ' BTCH174/RM111002
  2035.             ZWhoTo$ = "SYSOP" : _                                    ' BTCH174/RM111102
  2036.             CALL OpenWorkA (ZNodeWorkDrvPath$ + "NODE" + ZNodeID$ + "FUP.LST") : _ ' BTCH174
  2037.             CALL PrintWorkA (ZFileName$) : _                         ' BTCH174
  2038.             CALL PrintWorkA (ZFileNameHold$) : _                     ' BTCH174
  2039.             CALL PrintWorkA (ZDesc$) : _                             ' BTCH174
  2040.             CALL PrintWorkA (ZUCat$) : _                             ' BTCH174
  2041.             CALL PrintWorkA (ZWhoTo$) : _                            ' BTCH174/RM111102
  2042.             CLOSE 2 : _                                              ' BTCH174
  2043.             GOTO 65107                                               ' BTCH174/RM082902
  2044. 65105    IF ZWasBatchTransfer THEN _                                 ' BTCH174/RM082902
  2045.             ZWasBatchTransfer = ZFalse : _                           ' BTCH174
  2046.             ZUpBatchTransfer = ZTrue: _                              ' BTCH174
  2047.             ZAnsIndex = 1 : _                                        ' BTCH174
  2048.             ZLastIndex = 1                                           ' BTCH174
  2049.          IF ZGetDescAfterTransfer THEN _                             ' RM02269401
  2050.             CALL FileLister(1) _                                     ' RM02269401
  2051.          ELSE _                                                      ' RM02269401
  2052.             CALL UpdtUpload (ZCategoryName$(),ZCategoryCode$(),ZLinesInMsg,1) ' BTCH174
  2053.          IF ZAbort THEN _                                            ' BTCH174
  2054.             ZAbort = ZFalse : _                                      ' BTCH174
  2055.             GOTO 65103                                               ' BTCH174/RM092902
  2056.          ZFileName$ = ""                                             ' BTCH174
  2057.          ZFileNameHold$ = ""                                         ' BTCH174
  2058. 65107 ZFoundExtra = ZFalse                                           ' RM082901
  2059.       WEND                                                           ' BTCH174  old #65103
  2060.       CLOSE 10                                                       ' BTCH174
  2061.       IF ZUpBatchTransfer THEN _                                     ' RM082901
  2062.          ZUpBatchTransfer = ZFalse : _                               ' RM082901
  2063.          ZWasBatchTransfer = ZTrue                                   ' RM082901
  2064.       ZSuspendAutoLogoff = ZFalse                                    ' BTCH174/RM101501
  2065.       ZAutoLogoffReq = BatchOff                                      ' BTCH174/RM101501
  2066.       EXIT SUB                                                       ' BTCH174
  2067. 65109 CALL SkipLine (1)                                              ' RM082901
  2068.       CALL QuickTPut1 (ZEmphasizeOn$ + "Additional File " + ZFileNameHold$ + _
  2069.                        " Detected!" + ZEmphasizeOff$)                ' BTCH174/RM082901
  2070.       ZFoundExtra = ZTrue                                            ' RM082901
  2071.       ZGetExtDesc = ZFalse                                           ' RM082901
  2072.       RETURN                                                         ' BTCH174
  2073.       END SUB                                                        ' BTCH174
  2074. '                                                                    ' BTCH174/RM111001
  2075. 65110 ' $SUBTITLE: 'HSAddFileSearch - search for duplicate files'
  2076. ' $PAGE                                                              ' BTCH174/RM111001
  2077. '                                                                    ' BTCH174/RM111001
  2078. '  NAME    --  HSAddFileSearch                                       ' BTCH174/RM111001
  2079. '                                                                    ' BTCH174/RM111001
  2080. '                 PARAMETER                    MEANING               ' BTCH174/RM111001
  2081. '                                                                    ' BTCH174/RM111001
  2082. '  INPUTS  __  ZFileNameHold$              Found Uploaded File       ' BTCH174/RM111001
  2083. '              ZFileName$                  File with path            ' BTCH174/RM111001
  2084. '                                                                    ' BTCH174/RM111001
  2085. '  OUTPUTS --  Found                       True if file is duplicate ' BTCH174/RM111001
  2086. '                                                                    ' BTCH174/RM111001
  2087. '  PURPOSE --  To check additional files uploaded during a batch     ' BTCH174/RM111001
  2088. '              upload to see if they already exist on the system.    ' BTCH174/RM111001
  2089. '              If found to be duplicate(s), will delete the file(s). ' BTCH174/RM111001
  2090. '                                                                    ' BTCH174/RM111001
  2091. '  WRITTEN BY: R. Molinelli 11-10-92                                 ' BTCH174/RM111001
  2092. '                                                                    ' BTCH174/RM111001
  2093.       SUB HSAddFileSearch (Found)                                    ' BTCH174/RM111001/RM11159302
  2094.       Found = ZFalse                                                 ' BTCH174/RM111001
  2095.       FileSearch$ = ZFileName$                                       ' BTCH174/RM111001
  2096.       FileSearchHold$ = ZFileNameHold$                               ' BTCH174/RM111001
  2097.       AddTemp$ = ZUpldSubDir$ + "\NODE" + ZNodeID$ + "TMP.FIL"       ' BTCH174/RM111001
  2098.       NAME ZFileName$ AS AddTemp$                                    ' BTCH174/RM111001
  2099.       CALL RotorsDir (FileSearchHold$,ZSubDir$(),ZSubDirCount,ZFalse,"") ' BTCH174/RM111001
  2100.       IF ZOK THEN _                                                  ' BTCH174/RM111001
  2101.          GOTO 65120                                                  ' BTCH174/RM111001/RM111201
  2102.       IF INSTR(FileSearchHold$,".") = 0 THEN _                       ' BTCH174/RM111001
  2103.          NAME AddTemp$ AS ZFileName$ : _                             ' BTCH174/RM111001
  2104.          GOTO 65125                                                  ' BTCH174/RM111001/RM111201
  2105.       CALL BreakFileName (FileSearch$,DR$,WasX$,Extension$,ZFalse)   ' BTCH174/RM111001
  2106.       WasI = 1                                                       ' BTCH174/RM111001
  2107. 65115 WasJ = INSTR(MID$(ZCompressedExt$+". ",WasI),".")              ' BTCH174/RM111001
  2108.       IF WasJ = 0 THEN _                                             ' BTCH174/RM111001
  2109.          NAME AddTemp$ AS ZFileName$ : _                             ' BTCH174/RM111001
  2110.          GOTO 65125                                                  ' BTCH174/RM111001/RM111201
  2111.       Check$ = MID$(ZCompressedExt$,WasI,WasJ-1)                     ' BTCH174/RM111001
  2112.       WasI = WasI + WasJ                                             ' BTCH174/RM111001
  2113.       IF Extension$ <> Check$ THEN _                                 ' BTCH174/RM111001
  2114.          CALL RotorsDir (WasX$ + "." + Check$,ZSubDir$(),ZSubDirCount,ZFalse,"") : _ ' BTCH174/RM111001
  2115.          IF ZOK THEN _                                               ' BTCH174/RM111001
  2116.             GOTO 65120                                               ' BTCH174/RM111001/RM111201
  2117.       GOTO 65115                                                     ' BTCH174/RM111001
  2118. 65120 CALL KillWork (AddTemp$)                                       ' BTCH174/RM111001
  2119.       Found = ZTrue                                                  ' BTCH174/RM111101
  2120.       CALL UpdtCalr ("Duplicate additional file " + ZFileNameHold$ + " deleted!",2) ' BTCH174/RM111101
  2121. 65125 EXIT SUB                                                       ' BTCH174/RM111101
  2122.       END SUB                                                        ' BTCH174/RM111001
  2123. '                                                                    ' NEXT174/RM112001
  2124. 65140 ' $SUBTITLE: 'NoExt - refuse file if type not permitted'
  2125. ' $PAGE                                                              ' NEXT174/RM112001
  2126. '                                                                    ' NEXT174/RM112001
  2127. '  NAME    --  NoExt                                                 ' NEXT174/RM112001
  2128. '                                                                    ' NEXT174/RM112001
  2129. '              PARAMETER            MEANING                          ' NEXT174/RM112001
  2130. '                                                                    ' NEXT174/RM112001
  2131. '  INPUTS  __  ZFileName$           File to be uploaded              ' NEXT174/RM112001
  2132. '                                                                    ' NEXT174/RM112001
  2133. '  OUTPUTS --  Found                True if file type not permitted  ' NEXT174/RM112001
  2134. '
  2135. '                                                                    ' NEXT174/RM112001
  2136. '  PURPOSE --  To check file extension against a list of extensions  ' NEXT174/RM112001
  2137. '              which the SysOp has chosen to not permit.             ' NEXT174/RM112001
  2138. '                                                                    ' NEXT174/RM112001
  2139. '  WRITTEN BY: R. Molinelli 11-20-92                                 ' NEXT174/RM112001
  2140. '                                                                    ' NEXT174/RM112001
  2141.       SUB NoExt (FileName$,Found)                                    ' NEXT174/RM112001/RM11159302
  2142.       Found = ZFalse                                                 ' NEXT174/RM112001
  2143.       CALL FindFile ("NOEXT.DEF",OK)                                 ' NEXT174/RM112001
  2144.       IF OK THEN                                                     ' NEXT174/RM112001
  2145.          Temp$ = "NOEXT.DEF"                                         ' NEXT174/RM112001
  2146.          CALL BreakFileName (FileName$,DR$,Body$,Ext$,ZFalse)        ' NEXT174/RM112001
  2147.          CALL OpenWork (8,Temp$)                                     ' NEXT174/RM112001
  2148.          WHILE NOT EOF(8)                                            ' NEXT174/RM112001
  2149.             CALL ReadDir(8,1)                                        ' NEXT174/RM112001
  2150.             CALL AllCaps (ZOutTxt$)                                  ' NEXT174/RM112301
  2151.             IF Ext$ = ZOutTxt$ THEN _                                ' NEXT174/RM112001
  2152.                Found = ZTrue : _                                     ' NEXT174/RM112001
  2153.                CLOSE 8 : _                                           ' NEXT174/RM112001
  2154.                CALL UpdtCalr ("Refused file " + ZFileName$,2) : _    ' NEXT174/RM112001
  2155.                CALL SkipLine (1) : _                                 ' NEXT174/RM112001
  2156.                CALL QuickTPut1 (ZFG3$ + "Sorry, we do not permit " + ZFG7$ + _
  2157.                     "." + Ext$ + ZFG3$ + " files here." + ZEmphasizeOff$) : _ ' NEXT174/RM112001
  2158.                CALL SkipLine (1) : _                                 ' NEXT174/RM112001
  2159.                CALL DelayTime (2) : _                                ' NEXT174/RM112001
  2160.                EXIT SUB                                              ' NEXT174/RM112001
  2161.          WEND                                                        ' NEXT174/RM112001
  2162.          CLOSE 8                                                     ' NEXT174/RM112001
  2163.       END IF                                                         ' NEXT174/RM112001
  2164. 65150 END SUB                                                        ' NEXT174/RM112001
  2165. '
  2166. 87000 ' $SUBTITLE: 'WildShow - Show the marked wildcard files to the user' ' DGS102703-DS
  2167. ' $PAGE
  2168. '
  2169. '  NAME    -- WildShow
  2170. '                                  MEANING
  2171. '  INPUTS  --
  2172. '
  2173. '  OUTPUTS -- WildParm             0 = No files Marked
  2174. '                                  1 = File(s) Marked
  2175. '
  2176. '  PURPOSE -- To show the files that matched the WildCard Download
  2177. '             search and give the user an opportunity to select
  2178. '             which files to add to their marked file list.
  2179. '             The user can also edit the marked file list
  2180. '             which only contains the files from WildCard marking
  2181. '             as the "other" marked file list is kept in a temp
  2182. '             variable to be combined after the user quits the
  2183. '             wildshow function.
  2184. '
  2185.       SUB WildShow (FileList$,WildParm)                              ' RM03279401
  2186.       WildParm = 0
  2187.       WildMenu$ = "WILD.MNU"                                         ' DGS022001-DS/RM03199401
  2188. 87100 WildLineCount = 0
  2189.       CALL SkipLine(1)
  2190.       CALL QuickTPut1 (ZFGA$ + " Here are the files that matched your request" + ZEmphasizeOff$) ' RM03049401
  2191.       CALL QuickTPut1 (ZFGF$ + "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" + _
  2192.                  ZEmphasizeOff$)                                     ' RM03049401
  2193.       InList = ZFalse
  2194.       LowRec& = 1
  2195.       CountRec& = 0
  2196.       TempRec& = 1
  2197.       WildPrint = ZPageLength - 1
  2198.       WildLineCount = WildLineCount + 5
  2199.       ZNonStop = ZFalse
  2200.       IF ZRightMargin > 50 THEN _
  2201.          WildCol = 3
  2202.       IF ZRightMargin > 30 AND ZRightMargin < 51 THEN _
  2203.          WildCol = 2
  2204.       IF ZRightMargin < 31 THEN _
  2205.          WildCol = 1
  2206.       ZJumpSupported = ZFalse
  2207. 87110 WildName$ = ZNodeWorkDrvPath$ + "WILD" + ZNodeId$ + ".DEF"
  2208.       FilNum = FREEFILE                                              ' RM03049401
  2209.       CALL OpenRSeq (WildName$,HighRec&,DGSWasX,13,FilNum)           ' DGS011601-DS/RM03049401
  2210.       FIELD FilNum, 12 AS WildFileName$, _                           ' DGS011601-DS/RM03049401
  2211.                      1 AS WildCr$                                    ' DGS011601-DS/RM03049401
  2212.       LowRec& = TempRec&
  2213.       FOR Count& = LowRec& TO HighRec&-1
  2214.           IF InList THEN _
  2215.              InList = ZFalse : _
  2216.              GOTO 87120
  2217.           GET FilNum, Count&                                         ' DGS011601-DS/RM03049401
  2218.           IF (Count& MOD WildCol) = 0 OR Count& = HighRec&-1 THEN _
  2219.              ZSubParm = 5 : _
  2220.              WildLineCount = WildLineCount + 1 _
  2221.           ELSE ZSubParm = 4
  2222.           ZOutTxt$ = ZFGA$ + STR$(Count&) + "."
  2223.           ZOutTxt$ = ZOutTxt$ + SPACE$(5-LEN(STR$(Count&))) + ZFGF$ + _
  2224.                      WildFileName$ + SPACE$(5) + ZEmphasizeOff$
  2225.           CALL TPut
  2226.           IF WildLineCount > WildPrint AND ZNonStop = ZFalse THEN
  2227. 87120        CALL AskMore (",M)ark",ZTrue,ZFalse,WasX,ZFalse)
  2228.                   IF ZNo OR WasX = 32000 THEN _
  2229.                      EXIT FOR _
  2230.                   ELSE WildLineCount = 0
  2231.                        WasX$ = LEFT$(ZUserIn$(1),1)
  2232.                        CALL AllCaps (WasX$)
  2233.                        IF WasX$ = "M" THEN _
  2234.                           InList = ZTrue : _
  2235.                           GOSUB 87150 : _
  2236.                           GOTO 87110
  2237.           END IF
  2238.       NEXT
  2239.       CLOSE FilNum                                                   ' DGS011601-DS/RM03049401
  2240.       InList = ZFalse
  2241.       GOTO 87200
  2242. 87150 CALL SkipLine(1)
  2243.       CALL QuickTPut1 (ZFGC$ + "Enter" + ZFGF$ + " File NUMBER(s)" + _
  2244.                  ZFGC$+ " to Mark," + ZEmphasizeOff$)                ' RM03049401
  2245.       ZOutTxt$ = ZFGF$ + "Ex: " + ZFGA$ + "1 2 5-9 14 " + _          ' RM03049401
  2246.                           ZFGF$ + "etc." + ZFGC$ + " (" + _
  2247.                           ZFGA$ + ZFGF$ + "[ENTER]" + _
  2248.                           ZFG0$ + ZFGC$ + " Quits)" + ZEmphasizeOff$
  2249.       ZStackC = ZTrue                                                ' RM03139401
  2250.       ZTurbokey = -ZTurboKeyUser                                     ' RM03139401
  2251.       CALL PopCmdStack
  2252.       UseMultiCheck = ZFalse
  2253.       FOR Temp = ZAnsIndex to ZLastIndex
  2254.         Test = VAL(ZUserIn$(Temp))
  2255.         IF Test = 0 THEN
  2256.            CALL SkipLine(1)
  2257.            CALL QuickTPut1 (ZFGA$ + "***  Please use " + ZFGF$ + _
  2258.                       "FILE NUMBERS" + ZFGA$ + " when marking WildCard files" + _
  2259.                        ZEmphasizeOff$ + ZBellRinger$)                ' RM03049401
  2260.            CALL DelayTime(2)
  2261.            ZLastIndex = 1
  2262.            GOTO 87150
  2263.         END IF
  2264.         IF INSTR(ZUserIn$(Temp),"-") > 1 THEN _                      ' RM03199401
  2265.            UseMultiCheck = ZTrue
  2266.       NEXT
  2267.       IF ZSubParm < 0 THEN _                                         ' RM03059401
  2268.          EXIT SUB                                                    ' RM03059401
  2269.       TempRec& = Count&
  2270.       IF ZWasQ = 0 THEN _
  2271.          IF InList THEN _
  2272.             RETURN _
  2273.           ELSE GOTO 87200
  2274.       TempMarked$ = FileList$                                        ' RM03279401
  2275.       IF UseMultiCheck THEN _
  2276.          CALL MultiFile                                              ' DGS110301-DS
  2277.       CALL AskItems ("W","W",ZFalse,"wild",FileList$,ZPersonalDnld)  ' RM03279401
  2278.       IF TempMarked$ <> FileList$ THEN _                             ' RM03279401
  2279.          WildLineCount = 0 : _
  2280.          WildParm = 1
  2281.       IF InList THEN _
  2282.          RETURN
  2283. 87200 CALL SkipLine(1)
  2284.       IF ZExpertUser THEN _                                          ' RM03059401
  2285.          GOTO 87220                                                  ' RM03059401
  2286. 87210 CALL Graphic2 (WildMenu$)                                      ' DGS022001-DS/RM03059401/RM03199402
  2287.       IF ZOK THEN _                                                  ' RM03059401
  2288.          CALL BufFile2 (WildMenu$,X)                                 ' DGS022001-DS/RM03199402
  2289. 87220 ZOutTxt$ = "WildCommand: " + LEFT$("M)ark",-4 * (NOT ZExpertUser) + 1) + _
  2290.         LEFT$(",E)dit Files",-10 * (NOT ZExpertUser) + 2) + _
  2291.         LEFT$(",R)elist Files",-12 * (NOT ZExpertUser) + 2) + _
  2292.         LEFT$(",[Q]uit",-3 * (NOT ZExpertUser) + 4) + ",?" + _
  2293.         LEFT$(",H)elp",-4 * (NOT ZExpertUser) + 2)                   ' RM03059401
  2294.       ZStackC = ZTrue                                                ' RM03059401
  2295.       ZTurboKey = -ZTurboKeyUser
  2296.       CALL PopCmdStack                                               ' DGS010501-DS
  2297.       IF ZSubParm < 0 THEN _                                         ' RM03059401
  2298.          EXIT SUB                                                    ' RM03059401
  2299.       WildLineCount = 7
  2300.       CALL AllCaps(ZUserIn$(ZAnsIndex))                              ' RM03059401
  2301.       IF ZWasQ = 0 THEN _                                            ' RM03059401
  2302.          GOTO 87400
  2303.       ON INSTR("QMREH?",ZUserIn$(ZAnsIndex)) GOTO 87400,87150,87100,87300,87210,87210 ' RM03059401
  2304.       GOTO 87220                                                     ' DGS010501-DS
  2305. 87300 CALL WildMark (FileList$)                                      ' RM03279401
  2306.       GOTO 87200
  2307. 87400 EXIT SUB
  2308.       END SUB
  2309. '
  2310. 90000 ' $SUBTITLE: 'WildMark - edit marked files after wildcard marking' ' DGS102703-DS
  2311. ' $PAGE
  2312. '
  2313. '  NAME    -- WildMark
  2314. '                                  MEANING
  2315. '
  2316. '  INPUTS  -- ZMarkedFiles$        List of files that were marked
  2317. '                                  from the wildcard file display
  2318. '
  2319. '  OUTPUTS -- ZMarkedFiles$        Modified list of marked files
  2320. '                                  which only contain the files
  2321. '                                  the user answered yes to keep
  2322. '                                  in the marked files list
  2323. '
  2324. '  PURPOSE -- To read the ZMarkedFiles$ variable and give the user
  2325. '             an opportunity to edit the files in it.
  2326. '
  2327. '
  2328.       SUB WildMark (FileList$)                                       ' RM03279401
  2329.       IF FileList$ = "" THEN _                                       ' RM03279401
  2330.          CALL SkipLine(1) : _
  2331.          CALL QuickTPut (ZFGC$ + "You have not marked any files " + _
  2332.                          "to be able to edit" + ZEmphasizeOff$,2) : _
  2333.          CALL AskMore ("",ZTrue,ZFalse,WasX,ZTrue) : _               ' DGS022004-DS/WildEdit
  2334.          EXIT SUB
  2335.       ZWasZ$ = "M"
  2336.       ZAnsIndex = 1
  2337.       LastDnld = 1
  2338.       CALL UnMarkItems (FileList$,ZAnsIndex,LastDnld,FoundMarked,ZTrue) ' RM03279401
  2339.       IF NOT FoundMarked THEN _
  2340.          EXIT SUB
  2341. 90100 FOR Temp = ZAnsIndex TO LastDnld
  2342.           TempName$ = ZUserIn$(Temp)
  2343.           ZOutTxt$ = ZFGC$ + "Keep " + ZFGF$ + TempName$ + _
  2344.                      ZFGC$ + " in marked file list?" + ZEmphasizeOff$ + _
  2345.                      " (Y,[N])"
  2346.           ZTurboKey = - ZTurboKeyUser
  2347.           CALL PopCmdStack
  2348.           IF ZSubParm < 0 THEN _
  2349.              EXIT SUB
  2350.           IF ZYes THEN
  2351.              FileList$ = FileList$ + TempName$ + ZCarriageReturn$    ' RM03279401
  2352.          END IF
  2353.       NEXT
  2354.       END SUB
  2355. '
  2356. 91000 ' $SUBTITLE: 'MultiFile - Check user entry for a range of numbers' ' DGS110301-DS
  2357. ' $PAGE
  2358. '
  2359. '  NAME    -- WildMark
  2360. '                                  MEANING
  2361. '
  2362. '  INPUTS  -- ZUserIn$()           User entered data in this array
  2363. '             ZAnsIndex            Starting number of array values
  2364. '             ZLastIndex           Ending number of array values
  2365. '
  2366. '  OUTPUTS -- ZUserIn$()           Modified array of data
  2367. '             ZLastIndex           Modified to reflect true
  2368. '                                  number of array values
  2369. '
  2370. '
  2371. '  PURPOSE --  To process user input (when marking files) in
  2372. '              wildcard downloading to see if one of the entries
  2373. '              is for a range of files (ex. 2-12 would be to mark
  2374. '              files 2 through 12 inclusive).
  2375. '
  2376. '
  2377.       SUB MultiFile                                                  ' DGS110301-DS
  2378.       HoldInfo$ = ""
  2379.       FOR Count = ZAnsIndex TO ZLastIndex
  2380.           HyphLoc = INSTR(ZUserIn$(Count),"-")
  2381.           IF HyphLoc > 1 THEN                                        ' RM03199401
  2382.              StartNum = VAL(MID$(ZUserIn$(Count),1,HyphLoc-1))
  2383.              EndNum = VAL(MID$(ZUserIn$(Count),HyphLoc+1))
  2384.              IF EndNum > StartNum THEN
  2385.                 FOR Count2 = StartNum TO EndNum
  2386.                     HoldInfo$ = HoldInfo$ + STR$(Count2) + ZCarriageReturn$
  2387.                 NEXT
  2388.              END IF
  2389.           ELSE
  2390.              HoldInfo$ = HoldInfo$ + ZUserIn$(Count) + ZCarriageReturn$
  2391.           END IF
  2392.       NEXT
  2393.       StartFile = 1
  2394.       EndFile = LEN (HoldInfo$)
  2395.       Count = 1
  2396.       ZUserIn$ = ""
  2397.       WHILE StartFile < EndFile
  2398.         Temp = INSTR(StartFile,HoldInfo$,ZCarriageReturn$)
  2399.         Temp$ = MID$(HoldInfo$,StartFile,Temp-StartFile)
  2400.         ZUserIn$(Count) = Temp$
  2401.         Count = Count + 1
  2402.         StartFile = Temp + 1
  2403.       WEND
  2404.       ZAnsIndex = 1                                                  ' DGS010501-DS
  2405.       ZLastIndex = Count - 1
  2406.       END SUB
  2407.