* ------------[ BLED merge (c) Ken Goosens ]------------- * Merge this against D:\172B\RBBSSUB5.BAS to produce RBBSSUB5.BAS * D:\172B\RBBSSUB5.BAS: Date 2-10-1990 Size 86814 bytes * ------------[ Created 05-20-1990 20:28:31 ]------------ * REPLACING old line(s) by new 20120 ZOutTxt$ = "Scanning Directory " + _ ZFileNameHold$ IF WasRS$ <> "" THEN _ ZOutTxt$ = ZOutTxt$ + " for " + WasRS$ GOSUB 21650 IF ZFileSysParm > 1 THEN _ RETURN * ------[ first line different ]------ CALL AskMore ("",ZTrue,ZTrue,ZAnsIndex,ZFalse) ' KG040901 IF ZNo THEN _ ' KG040901 ZErrCode = 0 : _ ' KG040901 RETURN ' KG040901 WasPG = ZTrue * REPLACING old line(s) by new 20222 CALL RotorsDir (ZFileName$,ZSubDir$(),ZSubDirCount + _ ((ZUserSecLevel < ZMinSecToView) OR _ * ------[ first line different ]------ NOT ZCanDnldFromUp),MarkingTime,"D") ' KG022204 * REPLACING old line(s) by new 20247 ZWasDF = 0 CALL BreakFileName (ZFileName$,DR$,WasX$,Extension$,ZFalse) IF ZAutoDownInProgress THEN _ * ------[ first line different ]------ ZUserIn$(ZAnsIndex) = WasX$ + "." + Extension$ : _ ' RH022501 ZOutTxt$ = "Transferring -- " + _ ZUserIn$(ZAnsIndex) : _ ' RH022501 GOSUB 21640 : _ IF ZFileSysParm > 1 THEN _ RETURN IF INSTR("...WRK.FW .ARC.EXE.COM.OBJ.WKS.LBR.ZIP.PAK.ZOO.LZH.","."+Extension$+".") > 2 OR _ MID$(Extension$,2,1) = "Q" OR _ (ZRequireNonASCII AND Extension$ = "BAS") THEN _ ZWasDF = ZTrue * REPLACING old line(s) by new 20263 IF ZPrivateDoor THEN _ ZCmdTransfer$ = ZWasFT$ : _ CALL XferType (2,ZTrue) : _ ZCmdTransfer$ = "" CALL OpenWork (2,"XFER-" + ZNodeID$ + ".DEF") IF ZErrCode <> 0 THEN _ GOTO 20267 CALL ReadParms (ZWorkAra$(), ZFailureParm, 1) IF ZErrCode <> 0 THEN _ GOTO 20267 * ------[ first line different ]------ CLOSE 2 ' KG040902 CALL KillWork ("XFER-" + ZNodeID$ + ".DEF") * REPLACING old line(s) by new 20330 IF ZAutoDownInProgress THEN _ RETURN * ------[ first line different ]------ GOSUB 20337 ' KG032801 ZOutTxt$ = ZProtoPrompt$ + _ " " + WasA1$ + _ " of " + _ ZFileNameHold$ + _ " ready. aborts" GOSUB 21650 * REPLACING old line(s) by new 20335 IF ZTransferFunction = 1 THEN _ CALL Talk (8,ZOutTxt$) _ ELSE CALL Talk (9,ZOutTxt$) RETURN * ------[ first line different ]------ * INSERTING new line(s) 20337 IF ZProtoMacro$ <> "" THEN _ ' KG032801 ZGSRAra$(1) = MID$("DU ",ZTransferFunction,1) : _ ' KG032801 CALL MacroExe (ZProtoMacro$) ' KG032801 RETURN ' KG032801 ' ' * ASCII DOWNLOAD DRIVER ' * REPLACING old line(s) by new 20340 IF ZWasDF THEN _ ZOutTxt$ = "Switch to a non-ascii protocol" : _ GOSUB 21650 : _ GOTO 21700 GOSUB 20750 IF ZFileSysParm > 1 OR NOT ZOK THEN _ RETURN CALL OpenWork (2,ZFileName$) IF (ZAnsIndex = FirstDnld OR NOT ZConcatFIles) THEN _ * ------[ first line different ]------ GOSUB 20337 : _ ' KG032801 ZOutTxt$ = "^X aborts. ^S suspends ^Q resumes" : _ GOSUB 21640 : _ IF ZFileSysParm > 1 THEN _ RETURN _ ELSE ZOutTxt$ = ZProtoPrompt$ + " SEND of " + _ ZFileNameHold$ + _ " ready. Press Any Key to start" : _ ZTurboKey = 2 : _ ZForceKeyboard = ZTrue : _ ZSuspendAutologoff = ZTrue : _ GOSUB 21660 : _ ZSuspendAutologoff = ZFalse : _ GOSUB 20335 : _ IF ZFileSysParm > 1 THEN _ RETURN * REPLACING old line(s) by new 20440 CALL RotorsDir (ZFileName$,ZSubDir$(),ZSubDirCount,ZTrue,"U") ' KG022204 * REPLACING old line(s) by new 20450 IF Extension$ <> Check$ THEN _ * ------[ first line different ]------ CALL RotorsDir (WasX$ + "." + Check$,ZSubDir$(),ZSubDirCount,ZTrue,"U") : _ ' KG021802 IF ZOK THEN _ GOTO 20452 GOTO 20447 * REPLACING old line(s) by new 20560 LineACK = (ZDefaultLineACK$ <> "") IF LineACK THEN _ ZOutTxt$ = "Acknowledge each line ([Y],N)" : _ ZTurboKey = - ZTurboKeyUser : _ LineACK = NOT ZNo : _ GOSUB 21660 : _ IF ZFileSysParm > 1 THEN _ RETURN * ------[ first line different ]------ GOSUB 20337 ' KG032801 CALL QuickTPut1 ("Transfer MUST end with a ") CALL QuickTPut1 (ZProtoPrompt$+" RECEIVE of " + ZFileNameHold$ + " ready") ZOK = ZFalse XOff = ZFalse CALL OpenOutW(ZFileName$) IF ZErrCode <> 0 AND ZErrCode <> 53 THEN _ ZWasEL = 20560 : _ GOTO 21900 GOSUB 20510 IF ZFileSysParm > 1 THEN _ RETURN * REPLACING old line(s) by new 20735 CALL KillWork (ZFileName$) IF ZErrCode <>0 THEN _ ZWasEL = 20736 : _ GOTO 21900 * ------[ first line different ]------ ZAnsIndex = ZLastIndex + 1 ' KG031501 ZLastIndex = 0 RETURN ' ' * Sysop ABORTED UPLOAD ' * REPLACING old line(s) by new 63330 ' $SUBTITLE: 'ReadMacro - sub to read macro' ' $PAGE ' ' NAME -- ReadMacro ' ' INPUTS -- PARAMETER MEANING ' ' OUTPUTS -- ZOutTxt$ LINE TO PROCESS IN MACRO ' ZMacroActive FLAG WHETHER IN A MACRO ' ' PURPOSE -- Reads in a line from macro file (#6) and processes ' macro commands, which are: ' *0 - display what follows, no carriage return ' *1 - display what follows with carriage return ' *B - display block that follows ' *F - display File ' WT - wait specified # of seconds ' >> - append following block to specified file ' ST - stack following (with carriage return) ' ON - define case ' == - case value that applies to following block ' M! - execute following macro ' M@ - abort macro processing ' EY - Echo on (yes) ' EN - Echo off (no) ' /* - comment line skipped in processing ' TK - Turbo key on (if user preference) ' << - Read from file into a form ' := - Assign value to work variable * ------[ first line different ]------ ' LO - Set the location of a file ' KG022301 ' SUB ReadMacro STATIC IF ZMacroTemplate$ <> "" THEN _ GOTO 63392 IF ZDistantTGet = 2 THEN _ GOTO 63349 * REPLACING old line(s) by new 63336 GOSUB 63395 IF NOT ZMacroActive THEN _ ZMacroEcho = ZTrue : _ * ------[ first line different ]------ EXIT SUB ' KG042501 IF CompareVar > 0 THEN _ IF NOT CaseExecute THEN _ IF LEFT$(ZOutTxt$,3) = ZSmartTextCode$+"==" THEN _ WasX$ = RIGHT$(ZOutTxt$,LEN(ZOutTxt$)-3) : _ ' KG042501 GOTO 63370 _ ELSE IF LEFT$(ZOutTxt$,7) = ZSmartTextCode$ + "END ON" THEN _ CompareVar = 0 : _ GOTO 63336 _ ELSE GOTO 63336 IF LEN(ZOutTxt$) < 3 THEN _ ' KG042501 GOTO 63398 ' KG042501 WasX$ = RIGHT$(ZOutTxt$,LEN(ZOutTxt$)-3) ' KG042501 IF LEFT$(ZOutTxt$,1) <> ZSmartTextCode$ THEN _ GOTO 63398 CALL CheckInt (MID$(ZOutTxt$,2)) IF ZErrCode > 0 THEN _ GOTO 63398 IF ZTestedIntValue > 0 AND ZTestedIntValue <= ZMaxWorkVar THEN _ ZOutTxt$ = WasX$ : _ ' Macro command ask ZForceKeyboard = ZTrue : _ ZMacroSave = ZTestedIntValue : _ ZLinesPrinted = 1 : _ ZNonStop = (ZPageLength < 1) : _ EXIT SUB ON (1+INSTR("*0*1*B*FWT>>STON==M!M@EYEN/*TK<<:=LVNVCVLO",MID$(ZOutTxt$,2,2)))\2 GOTO _ ' KG022301 63345, _ ' Display with no Carriage Return 63347, _ ' Display with Carriage Return 63340, _ ' Display Block 63348, _ ' Display File 63343, _ ' Wait # of seconds 63350, _ ' Append to file 63355, _ ' Stack 63360, _ ' Case 63370, _ ' Case Comparison 63375, _ ' Macro execute 63380, _ ' Macro Abort 63383, _ ' Macro Echo on 63385, _ ' Macro Echo off 63336, _ ' Macro Comment 63387, _ ' Turbo Key allowed 63390, _ ' Form read 63362, _ ' Assign value to work var 63363, _ ' LV list verify 63364, _ ' NV number verify 63364, _ ' CV character verify ' KG022301 63367 ' LO assign file location ' KG022301 GOTO 63398 * REPLACING old line(s) by new * ------[ first line different ]------ 63362 CALL Trim (WasX$) ' KG021803 CALL CheckInt (WasX$) WasX = INSTR(WasX$," ") IF WasX > 0 AND ZTestedIntValue > 0 AND ZTestedIntValue <= ZMaxWorkVar THEN _ ZGSRAra$(ZTestedIntValue) = RIGHT$(WasX$,LEN(WasX$)-WasX) ' KG021803 GOTO 63336 * INSERTING new line(s) 63367 CALL TRIM (WasX$) ' KG022301 ZFileLocation$ = WasX$ ' KG022301 GOTO 63336 ' KG022301