home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-08-11 | 53.1 KB | 1,311 lines |
- * ------------[ BLED merge (c) Ken Goosens ]-------------
- * Merge this against RBBSSUB1.BAS to produce RBBSSUB1.NEW
- * RBBSSUB1.BAS: Date 6-20-92 Size 55569 bytes
- * ------------[ Created 08-11-1993 19:34:20 ]------------
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- ' $segment
- ' $linesize:132
- ' $title: 'RBBS-SUB1.BAS 17.4, Copyright 1986-92 by D. Thomas Mack'
- ' Copyright 1990 by D. Thomas Mack, all rights reserved.
- ' Name ...............: RBBSSUB1.BAS
- ' First Released .....: June 21, 1992
- ' Subsequent Releases.:
- ' Copyright ..........: 1986-1992
- ' Purpose.............:
- ' Subprorams that require error trapping are incorporated
- ' within RBBSSUB1.BAS as separately callable subroutines
- ' in order to free up as much code as possible within
- ' the 64WasK code segment used by RBBS-PC.BAS.
- ' Parameters..........: Most parameters are passed via a COMMON statement.
- '
- ' Subroutine Line Function of Subroutine
- ' Name Number
- ' ChangeDir 20101 Change subdirectory
- ' CheckInt 58360 Check input is valid integer
- ' CommPut 59275 Write string to communications port
- ' FindFile 59790 Determine whether a file exists without opening it
- ' FindFree 51098 Find amount of space on the upload disk drive
- ' FindItX 20219 Find if a file exists on a device
- ' FindUser 12598 Find a user in the USERS file
- ' FlushCom 20308 Read all characters in the communications port
- ' GetCom 1418 Read a character from the communications port
- ' GetPassword 58280 Read RBBS-PC's "PASSWORD" file
- ' GETWRK 58330 Read record from file number 2
- ' KillWork 58258 Delete a RBBS-PC "WORK" file
- ' NetBIOS 20898 Lock/Unlock NetBIOS semaphore files
- ' OpenCom 200 Open communications port (number 3)
- ' OpenFMS 58188 Open the upload management system directory
- ' OpenOutW 28218 Open RBBS-PC's "WORK" file (number 2) for output
- ' OpenRSeq 1479 Open a sequential file (number 2) for random I/O
- ' OpenUser 9398 Open the USER file (number 5)
- ' OpenWork 57978 Open RBBS-PC's work file (number 2)
- ' OpenWorkA 58340 Open RBBS-PC's "WORK" file (number 2) for append
- ' Printit 13673 Print line on the local PC printer
- ' PrintWork 58320 Print string to file #2 w/o CR/LF
- ' PrintWorkA 58350 Print string to file #2 with CR/LF
- ' PutCom 59650 Write to the communications port
- ' PutWork 59660 Write to work file randomly
- ' RBBSPlay 59680 Plays a musical string
- ' ReadAny 58310 Read file number 2 into ZOutTxt$
- ' ReadDef 112 Read configuration file
- ' ReadDir 58290 Read entire lines
- ' ReadParmsX 58300 Read certain number of parameters from specified file
- ' Talk 59700 RBBS-PC Voice synthesizer support for sight impaired
- ' SetCall 108 Find where next callers record is
- ' UpdateC 43048 Update the caller's file with elasped session time
- ' UpdtCalr 13661 Update to the caller's file ' Mpl090202
- '
- ' $INCLUDE: 'RBBS-VAR.BAS'
- '
- * REPLACING old line(s) by new
- 108 ' $SUBTITLE: 'SetCall - subroutine to find last callers rec'
- ' $PAGE
- '
- ' NAME -- SetCall
- '
- ' INPUTS -- PARAMETER MEANING
- '
- ' OUTPUTS -- ZCallersFileIndex!
- '
- ' PURPOSE -- To find where to leave off on callers file
- '
- SUB SetCall STATIC
- ON ERROR GOTO 65000
- IF ZPrevCaller$ = ZCallersFile$ OR ZCallersFilePrefix$ = "" THEN _
- EXIT SUB
- ZPrevCaller$ = ZCallersFile$
- ZCallersFileIndex! = 1
- CLOSE 2
- CLOSE 4
- * ------[ first line different ]------
- CLOSE 16 ' DD050701
- IF ZWriteCallersTxt THEN ' DD050701
- CALL BreakFileName (ZCallersFile$,Drive$,Body$,Ext$,ZTrue) ' DD050701
- CALL OpenWorkA (16,Drive$ + Body$ + ".TXT") ' DD050701
- END IF ' DD050701
- IF ZShareIt THEN _
- OPEN ZCallersFile$ FOR RANDOM SHARED AS #4 LEN=64 _
- ELSE OPEN "R",4,ZCallersFile$,64
- FIELD 4,64 AS ZCallersRecord$
- IF LOF(4) > 0 THEN _
- ZCallersFileIndex! = LOF(4) / 64
- IF ZCallersFileIndex! < 1 THEN _
- ZCallersFileIndex! = 0
- ZUserIn$ = STRING$(13,0)
- * REPLACING old line(s) by new
- 117 IF ZSubParm <> -62 THEN _
- IF PrevRead$ = ConfigFile$ THEN _
- EXIT SUB _
- ELSE PrevRead$ = ConfigFile$
- CLOSE 2
- ZBulletinSave$ = ZBulletinMenu$
- CALL OpenWork (2,ConfigFile$)
- ZCurDef$ = ConfigFile$
- INPUT #2,ZWasDF$, _
- ZDnldDrives$, _
- ZSysopPswd1$, _
- ZSysopPswd2$, _
- ZSysopFirstName$, _
- ZSysopLastName$, _
- ZRequiredRings, _
- ZStartOfficeHours, _
- ZEndOfficeHours, _
- ZMinsPerSession, _
- ZWasDF, _
- ZWasDF, _
- ZUpldDir$, _
- * ------[ first line different ]------
- ZSkipMailCheck, _ ' Mpl122301
- ZActiveBulletins, _
- ZPromptBellDef ' DD021903/VGA
- IF ZConfMode OR ZSubBoard THEN ' DD021903/VGA
- INPUT #2, ZWasDF ' DD021903/VGA
- ELSE
- INPUT #2, ZLocalPageLength ' DD021903/VGA
- IF ZLocalPageLength < 25 THEN ' DD021903/VGA
- ZLocalPageLength = 25 ' DD021903/VGA
- END IF
- END IF
- INPUT #2, ZMenusCanPause, _ ' DD021903/VGA
- ZMenu$(1), _
- ZMenu$(2), _
- ZMenu$(3), _
- ZMenu$(4), _
- ZMenu$(5), _
- ZMenu$(6), _
- ZConfMenu$, _
- ZTestANSITime, _
- ZWelcomeInterruptable, _
- ZShowAllWhosOn, _ 'was ZRemindFileXfers ' DD052001
- ZPageLengthDef, _
- ZMaxMsgLinesDef, _
- ZDoorsAvail, _
- ZWasDF$, _
- ZMainMsgFile$, _
- ZMainMsgBackup$
- INPUT #2, WasX$, _
- ZCmntsFile$, _
- ZMainUserFile$, _
- ZWelcomeFile$, _
- ZNewUserFile$, _
- ZMainDirExtension$
- CALL BreakFileName (WasX$,ZWasY$,ZWasDF$,ZWasZ$,ZFalse)
- IF ZWasDF$ <> "" THEN _
- ZCallersFile$ = WasX$
- CALL BreakFileName (ZOrigCallers$,OrigDrive$,OrigBody$,OrigExt$,ZTrue) ' DD042001
- CALL BreakFileName (ZCallersFile$,CallersDrive$,CallersBody$,CallersExt$,ZTrue) ' DD042001
- IF OrigDrive$ <> CallersDrive$ AND ZOrigCallers$ <> "" THEN ' DD042001
- ZCallersFile$ = OrigDrive$ + CallersBody$ + CallersExt$ ' DD042001
- END IF ' DD042001
- INPUT #2, ZWasDF$
- IF ZComPort$ <> "COM0" THEN _
- IF NOT ZConfMode THEN _
- ZComPort$ = ZWasDF$
- INPUT #2, ZBulletinsOptional, _
- ZModemInitCmd$, _
- ZRTS$, _
- ZCallersLst$, _
- ZFG, _
- ZBG, _
- ZBorder
- IF ZConfMode THEN _
- INPUT #2, ZWasDF$, _
- ZWasDF$ _
- ELSE INPUT #2, ZRBBSBat$ , _
- ZRCTTYBat$
- INPUT #2,ZOmitMainDir$, _
- ZFirstNamePrompt$, _
- ZHelp$(3), _
- ZHelp$(4), _
- ZHelp$(7), _
- ZHelp$(9), _
- ZBulletinMenu$, _
- ZBulletinPrefix$, _
- ZWasDF$, _
- ZMsgReminder, _
- ZRequireNonASCII, _
- ZAskExtendedDesc, _
- ZMaxNodes ' KG100701
- IF ZConfMode THEN _ ' KG100701
- INPUT #2, ZwasDF _ ' DD052301
- ELSE INPUT #2, ZNetworkType ' DD052301
- INPUT #2,ZUpdateOnline, _ ' DD052301
- ZWasDF, _
- ZWasDF, _
- ZTrashcanFile$
- INPUT #2,ZMinLogonSec, _
- ZDefaultSecLevel, _
- ZSysopSecLevel, _
- ZFileSecFile$, _
- ZSysopMenuSecLevel, _
- ZConfMailList$, _
- ZMaxViolations, _
- ZOptSec(50), _ ' SECURITY FOR SYSOP COMMANDS 1
- ZOptSec(51), _
- ZOptSec(52), _
- ZOptSec(53), _
- ZOptSec(54), _
- ZOptSec(55), _
- ZOptSec(56), _ ' SYSOP 7
- ZOptSec(57), _ ' DD020602/SFILE
- ZPswdFile$, _
- ZMaxPswdChanges, _
- ZMinSecForTempPswd, _
- ZOverWriteSecLevel, _
- ZDoorsTermType, _
- ZMaxPerDay
- INPUT #2,ZOptSec(1), _ ' SECURITY FOR MAIN MENU COMMANDS 1
- ZOptSec(2), _
- ZOptSec(3), _
- ZOptSec(4), _
- ZOptSec(5), _
- ZOptSec(6), _
- ZOptSec(7), _
- ZOptSec(8), _
- ZOptSec(9), _
- ZOptSec(10), _
- ZOptSec(11), _
- ZOptSec(12), _
- ZOptSec(13), _
- ZOptSec(14), _
- ZOptSec(15), _
- ZOptSec(16), _
- ZOptSec(17), _
- ZOptSec(18), _ ' MAIN COMMAND 18
- ZMinNewCallerBaud, _
- ZWaitBeforeDisconnect
- INPUT #2,ZOptSec(19), _ ' Security for FILE COMMANDS 1
- ZOptSec(20), _
- ZOptSec(21), _
- ZOptSec(22), _
- ZOptSec(23), _
- ZOptSec(24), _
- ZOptSec(25), _
- ZOptSec(26), _ ' FILE COMMAND 8
- ZOptSec(27), _ ' SECURITY FOR UTILITY COMMANDS 1 'bank time
- ZOptSec(28), _ 'whodidit
- ZOptSec(29), _
- ZOptSec(30), _
- ZOptSec(31), _
- ZOptSec(32), _
- ZOptSec(33), _
- ZOptSec(34), _
- ZOptSec(35), _
- ZOptSec(36), _
- ZOptSec(37), _
- ZOptSec(38), _ ' UTIL COMMAND 12
- ZOptSec(46), _ ' SECURITY FOR GLOBAL COMMANDS 1
- ZOptSec(47), _
- ZOptSec(48), _
- ZOptSec(49), _
- ZUpldTimeFactor!, _
- ZShowTimesDownloaded, _ 'was ZComputerType ' DD052301
- ZRemindProfile, _
- ZRBBSName$, _
- ZCmdsBetweenRings, _
- ZCopyrightSecs, _
- ZPagingPtrSupport$
- IF ZConfMode THEN _
- INPUT #2, ZwasDF$ _ 'Pe 04/14/92
- ELSE INPUT #2, ZModemInitBaud$
- IF ZErrCode > 0 THEN _
- EXIT SUB
- * REPLACING old line(s) by new
- 118 INPUT #2, ZTurnPrinterOff,_ ' Turn printer off each recycle
- ZDirPath$, _ ' Where dir files are stored
- ZMinSecToView, _
- ZLimitSearchToFMS, _
- ZDefaultCatCode$, _
- ZDirCatFile$, _
- ZNewFilesCheck, _
- ZMaxDescLen, _
- ZShowSection, _
- ZCmndsInPrompt, _
- ZNewUserSetsDefaults, _
- ZHelpPath$, _
- ZHelpExtension$, _
- ZMainCmds$, _
- ZFileCmd$, _
- ZUtilCmds$, _
- ZGlobalCmnds$, _
- ZSysopCmds$
- INPUT #2, ZRecycleWait, _
- ZOptSec(39), _ ' SECURITY FOR Library COMMANDS 1
- ZOptSec(40), _
- ZOptSec(41), _
- ZOptSec(42), _
- ZOptSec(43), _
- ZOptSec(44), _
- ZOptSec(45), _ ' Library COMMANDS 7
- ZLibDrive$, _
- * ------[ first line different ]------
- ZWasDF$, _ 'was ZLibDirPath$ ' DD071001
- ZWasDF$, _ 'was ZLibDirExtension$ ' DD071001
- ZLibWorkDiskPath$, _
- ZWasDF, _ 'was ZLibMaxDisk ' DD071001
- ZWasDF, _ 'was ZLibMaxDir ' DD071001
- ZWasDF, _ 'was ZLibMaxSubdir ' DD071001
- ZWasDF$, _ 'was ZLibSubdirPrefix$ ' DD071001
- ZWasDF$, _ 'was ZLibArcPath$ ' DD071001
- ZDR5Def$, _ 'was ZLibArcProgram$ ' DD070203
- ZLibCmds$
- '
- ' ***** ESTABLISH COMMUNICATION PORT REGISTERS AND COMMANDS ***
- ' ***** GET DOS SUB-DIRECTORY RBBS-PC OPTIONS ***
- '
- INPUT #2, ZUpldPath$, _ ' Where upl dir goes
- ZMainFMSDir$, _ ' Shared dir in FMS
- ZAnsMenu$, _
- ZReqQues$,_
- ZRememberNewUsers,_
- ZSurviveNoUserRoom,_
- ZPromptHash$,_
- ZStartHash,_
- ZLenHash,_
- ZPromptIndiv$,_
- ZStartIndiv,_
- ZLenIndiv
- INPUT #2, ZBypassMsgs, _
- ZDontShowLogOff, _ 'was ZMusic ' DD062806
- ZRestrictByDate, _
- ZDaysToWarn, _
- ZDaysInRegPeriod, _
- ZVoiceType, _
- ZRestrictValidCmds, _
- ZMinSecPersUpld, _
- ZDistriHelp$, _
- ZDistriPath$, _
- ZFastFileList$, _
- ZFastFileLocator$, _
- ZMsgsCanGrow, _
- ZWrapCallersFile$, _
- ZRedirectIOMethod, _
- ZAutoUpgradeSec, _
- ZHaltOnError, _
- ZNewPublicMsgsSec, _
- ZNewPrivateMsgsSec, _
- SecNeededToChangeMsgs, _
- ZSLCategorizeUplds, _
- ZNoQuoting, _
- ZHourMinToDropToDos, _
- ZExpiredSec, _
- ZDTRDropDelay, _
- ZShowXferTime, _ 'was ZAskID ' DD052301
- ZMaxRegSec, _
- ZBufferSize, _
- ZMLCom, _
- ZNoDoorProtect, _
- ZDefaultExtension$, _
- ZEnableCC, _
- ZMaxBank, _
- ZNetMail$, _
- ZMasterDirName$, _
- ZWasDF$, _
- ZUpcatHelp$, _
- ZAllwaysStrewTo$, _
- ZLastNamePrompt$
- IF ZWasDF$ <> "" THEN _
- ZProtoDef$ = ZWasDF$
- * REPLACING old line(s) by new
- 119 INPUT #2, ZPersonalDrvPath$, _
- ZPersonalDir$, _
- ZPersonalBegin, _
- ZPersonalLen, _
- ZPersonalProtocol$, _
- ZPersonalConcat , _
- ZPrivateReadSec, _
- ZPublicReadSec, _
- ZSecChangeMsg
- IF ZConfMode THEN _
- INPUT #2, ZwasDF _
- ELSE INPUT #2, ZKeepInitBaud
- INPUT #2, ZMainPUI$
- IF ZConfMode THEN _
- INPUT #2, ZWasDF$,ZWasDF$,ZWasDF$ _
- ELSE INPUT #2, ZDefaultEchoer$, _
- ZHostEchoOn$, _
- ZHostEchoOff$
- INPUT #2, ZSwitchBack, _
- ZDefaultLineACK$, _
- ZAltdirExtension$, _
- ZDirPrefix$
- IF ZConfMode THEN _
- INPUT #2, ZWasDF, _
- ZWasDF, _
- ZWasDF _
- ELSE INPUT #2, ZWasDF,_
- ZModemInitWaitTime, _
- ZModemCmdDelayTime
- * ------[ first line different ]------
- INPUT #2, ZNewsInterruptable, _ 'was ZTurboRBBS ' DD051001
- ZSubDirCount, _
- ZWasDF, _
- ZUpldToSubdir, _
- ZWasDF, _
- ZUpldSubdir$, _
- ZMinOldCallerBaud, _
- ZMaxWorkVar, _
- ZDiskFullGoOffline, _
- ZExtendedLogging
- IF ZConfMode THEN _
- INPUT #2, ZWasDF$, _
- ZWasDF$, _
- ZWasDF$, _
- ZWasDF$ _
- ELSE INPUT #2, ZModemResetCmd$, _
- ZModemCountRingsCmd$, _
- ZModemAnswerCmd$, _
- ZModemGoOffHookCmd$
- INPUT #2,ZDiskForDos$, _
- ZDumbModem, _
- ZCmntsAsMsgs
- IF ZConfMode THEN _
- INPUT #2, ZWasDF, _
- ZWasDF, _
- ZWasDF, _
- ZWasDF, _
- ZWasDF, _
- ZWasDF _
- ELSE INPUT #2, ZLSB,_
- ZMSB,_
- ZLineCntlReg,_
- ZModemCntlReg,_
- ZLineStatusReg,_
- ZModemStatusReg
- INPUT #2,ZKeepTimeCredits, _
- ZXOnXOff, _
- ZAllowCallerTurbo, _
- ZUseDeviceDriver$, _
- ZPreLog$, _
- ZNewUserQuestionnaire$, _
- ZEpilog$, _
- ZRegProgram$, _
- ZQuesPath$, _
- ZUserLocation$, _
- ZWasDF$, _
- ZWasDF$, _
- ZWasDF$, _
- ZEnforceRatios, _
- ZSizeOfStack, _
- ZSecExemptFromEpilog, _
- ZWriteCallersTxt, _ 'was ZUseBasicWrites ' DD050701
- ZDosANSI, _
- ZEscapeInsecure, _
- ZUseDirOrder, _
- ZAddDirSecurity, _
- ZMaxExtendedLines, _
- ZOrigCommands$
- INPUT #2,ZLogonMailLevel$, _
- ZMacroDrvPath$, _
- ZMacroExtension$, _
- ZEmphasizeOnDef$, _
- ZEmphasizeOffDef$, _
- ZDR1Def$, _ ' DD070203
- ZDR2Def$, _ ' DD070203
- ZDR3Def$, _ ' DD070203
- ZDR4Def$, _ ' DD070203
- ZSecVioHelp$
- IF ZConfMode THEN _
- INPUT #2,ZWasDF _
- ELSE INPUT #2,ZFossil
- INPUT #2,ZMaxCarrierWait, _
- ZWasDF, _
- ZSmartTextCode, _
- ZTimeLock, _
- ZWriteBufDef, _
- ZSecKillAny, _
- ZDoorsDef$, _
- ZScreenOutMsg$, _
- ZAutoPageDef$, _ ' DD090501
- ZLogUploader, _ ' DD090501
- ZAddNameToDir ' DD090501
- IF ZErrCode > 0 THEN _
- EXIT SUB
- IF LEFT$(ZDR5Def$,1) <> CHR$(27) THEN ' DD070203
- ZDR5Def$ = ZDR4Def$ ' DD070203
- END IF ' DD070203
- ZConfigFileName$ = ConfigFile$
- CALL EditDef
- * INSERTING new line(s)
- 150 MKDIR ZlibWorkDiskPath$ + ZNodeId$ ' Mpl090202
- IF ZErrCode = 75 THEN _ ' Mpl090202
- ZErrCode = 0 ' Mpl090202
- ZArkViewPath$ = ZLibWorkDiskPath$ + ZNodeID$ + CHR$(92) '\ ' DD021301
- ZChatFileName$ = ZLibDrive$ + "RBBSCHAT.DEF" ' DD092401/RCHAT
- END SUB
- * REPLACING old line(s) by new
- 200 ' $SUBTITLE: 'OpenCom - subroutine to open the communications port'
- ' $PAGE
- '
- ' NAME -- OpenCom
- '
- ' INPUTS -- PARAMETER MEANING
- ' BaudRate$ BAUD TO OPEN MODEM
- ' Parity$ PARITY TO OPEN MODEM
- '
- ' OUTPUTS -- BaudTest! BAUD RATE TO SET RS232 AT
- '
- ' PURPOSE -- To open the communications port.
- '
- SUB OpenCom (BaudRate$,Parity$) STATIC
- ON ERROR GOTO 65000
- IF ZFossil THEN _
- IF ZRTS$ = "YES" THEN _
- ZFlowControl = ZTrue : _
- Flow = &H00F2 : _
- CALL FosFlowCtl(ZComPort,Flow)
- * ------[ first line different ]------
- IF INSTR(Parity$,CHR$(78)) THEN _ 'N ' DD021301
- Parity = 2 : _ ' No PARITY
- DataBits = 3 : _ ' 8 DATA BITS
- StopBits = 0 _ ' 1 STOP BIT
- ELSE Parity = 3 : _ ' EVEN PARITY
- DataBits = 2 : _ ' 7 DATA BITS
- StopBits = 0 ' 1 STOP BIT
- IF NOT ZFossil THEN _
- GOTO 202
- IF Baudrate$ = "38400" THEN _
- ComSpeed = &H9600 _
- ELSE ComSpeed = VAL(BaudRate$)
- CALL FosSpeed(ZComPort,ComSpeed,Parity,DataBits,StopBits)
- EXIT SUB
- * REPLACING old line(s) by new
- 202 CLOSE 3
- IF ZRTS$ = "YES" THEN _
- ZFlowControl = ZTrue : _
- * ------[ first line different ]------
- WasX$ = ",TB1024,CS26600,CD,DS" _ ' DD012802
- ELSE WasX$ = ",RS,CD,DS"
- WasX = (VAL(BaudRate$) > 19200)
- IF WasX THEN _
- ZWasY$ = "19200" _
- ELSE ZWasY$ = BaudRate$
- OPEN ZComPort$ + CHR$(58) + ZWasY$ + Parity$ + WasX$ AS #3 ' DD021301
- '
- ' ****************************************************************************
- ' * RAISE THE RTS SIGNAL IF THE MODEM USES RTS FOR MODEM FLOW CONTROL (ONCE
- ' * IT IS RAISED, IT WILL STAY UP UNTIL THE REGISTER IS CLEARED OUT).
- ' ****************************************************************************
- '
- END SUB
- * REPLACING old line(s) by new
- 1479 ' $SUBTITLE: 'OpenRSeq - open sequential file randomly'
- ' $PAGE
- '
- ' NAME -- OpenRSeq
- '
- ' INPUTS -- PARAMETER MEANING
- * ------[ first line different ]------
- ' FilName$ NAME OF SEQUENTIAL FILE TO OPEN ' DD031703
- ' RecLen Length of a record
- ' FileNum File Number to open file as ' DD031703
- '
- ' OUTPUTS -- NumRecs NUMBER OF RECORDS IN THE FILE based on RecLen
- ' LenLastRec NUMBER OF BYTES IN THE LAST RECORD
- ' MAY BE LESS THAN OR EQUAL TO RecLen).
- '
- ' PURPOSE -- Open a sequential file as file #2 and read it randomly
- '
- SUB OpenRSeq (FileNum,FilName$,NumRecs,LenLastRec,RecLen) STATIC ' DD031703
- ON ERROR GOTO 65000
- CALL OpenRand2 (FileNum,FilName$,RecLen) ' DD031703
- IF ZErrCode > 0 THEN _
- EXIT SUB
- FIELD #FileNum, RecLen AS ZDnldRecord$ ' DD031703
- WasI# = LOF(FileNum) ' DD031703
- NumRecs = FIX(WasI#/RecLen)
- LenLastRec = WasI# - CDBL(NumRecs) * RecLen
- IF LenLastRec > 0 THEN _
- NumRecs = NumRecs + 1 _
- ELSE LenLastRec = RecLen
- END SUB
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 1486 SUB OpenRand2 (FileNum,FileToOpen$, FileLen) STATIC ' DD031703
- ON ERROR GOTO 65000
- CLOSE FileNum ' DD031703
- * REPLACING old line(s) by new
- 1487 ZErrCode = 0
- IF ZShareIt THEN _
- * ------[ first line different ]------
- OPEN FileToOpen$ FOR RANDOM SHARED AS #FileNum LEN=FileLen _ ' DD031703
- ELSE OPEN "R",FileNum,FileToOpen$,FileLen ' DD031703
- END SUB
- * REPLACING old line(s) by new
- 9400 CLOSE 5
- IF ZShareIt THEN _
- OPEN ZActiveUserFile$ FOR RANDOM SHARED AS #5 LEN=128 _
- ELSE OPEN "R",5,ZActiveUserFile$,128
- WasI# = LOF(5)
- LastRec = FIX(WasI#/128)
- FIELD 5,31 AS ZUserName$, _
- 15 AS ZPswd$, _
- 2 AS ZSecLevel$, _
- 14 AS ZUserOption$, _
- 24 AS ZCityState$, _
- * ------[ first line different ]------
- 1 AS MachineType$, _ ' DD091401/DROP
- 1 AS ZDropTimes$, _ ' DD091401/DROP
- 1 AS ZBankTime$,_
- 4 AS ZTodayDl$, _
- 4 AS ZTodayBytes$, _
- 4 AS ZDlBytes$, _
- 4 AS ZULBytes$, _
- 14 AS ZLastDateTimeOn$, _
- 3 AS ZListNewDate$, _
- 2 AS ZUserDnlds$, _
- 2 AS ZUserUplds$, _
- 2 AS ZElapsedTime$
- FIELD 5,128 AS ZUserRecord$
- END SUB
- * REPLACING old line(s) by new
- 13661 ' $SUBTITLE: 'UpdtCalr - subroutine to write to CALLERS file'
- ' $PAGE
- '
- ' NAME -- UpdtCalr
- '
- ' INPUTS -- PARAMETER MEANING
- ' ErrMsg$ MESSAGE TO GO IN CALLER LOG
- ' EXTLog = 1 CHECK FOR EXTENDED LOGGING
- ' BEFORE UPDATING.
- ' = 2 UPDATE CALLER LOG WITH ZWasZ$
- ' = 3 Time stamp before logging
- '
- ' OUTPUTS -- ZCurDate$ CURRENT DATE (MM-DD-YY)
- ' ZTime$ CURRENT TIME (I.E. 1:13 PM)
- ' TIME.LOGGEND.ON$ TIME USER LOGGED ON (HH:MM:SS)
- '
- ' PURPOSE -- To update the caller's file and/or print on the
- ' local printer if it is enabled
- '
- SUB UpdtCalr (ErrMsg$,EXTLog) STATIC
- ON ERROR GOTO 65000
- * ------[ first line different ]------
- ' IF ZCallersFilePrefix$ = "" OR (ZLocalUser AND ZSysop) THEN _ ' DD021501
- ' EXIT SUB ' DD021501
- IF ZCallersFilePrefix$ = "" THEN _ ' DD021501
- EXIT SUB
- WasX$ = SPACE$(5) + ErrMsg$ ' DD021301
- * REPLACING old line(s) by new
- 13672 PUT 4,ZCallersFileIndex!
- * ------[ first line different ]------
- IF NOT ZWriteCallersTxt THEN ' DD050701
- EXIT SUB ' DD050701
- END IF ' DD050701
- CALL Trim (WasX$) ' DD050701
- IF INSTR(WasX$,ZActiveUserName$ + " PW fail") <> 0 OR _ ' DD050701
- INSTR(WasX$,"Name/Address") <> 0 OR _ ' DD052103
- INSTR(WasX$,"didn't register") <> 0 OR _ ' DD052103
- ZActiveUserName$ = "" THEN ' DD050701
- EXIT SUB ' DD050701
- END IF ' DD050701
- IF INSTR(WasX$,ZActiveUserName$ + " from") <> 0 THEN ' DD050701
- PRINT #16, STRING$(79,"=") ' DD051402
- DontPrintTxt = ZFalse ' DD041402
- ELSE ' DD050701
- IF INSTR(WasX$,"Logged off") = 0 AND _ ' DD050903
- INSTR(WasX$,"Auto-logoff") = 0 AND _ ' DD050903
- INSTR(WasX$,"Carrier dropped") = 0 AND _ ' DD050903
- INSTR(WasX$,"Sleep disconnect") = 0 THEN ' DD050903
- WasX$ = SPACE$(5) + "* " + WasX$ ' DD050701
- ELSE ' DD051402
- PRINT #16, WasX$ ' DD051402
- DontPrintTxt = ZTrue ' DD051402
- END IF ' DD050903
- END IF ' DD050701
- IF DontPrintTxt = ZFalse THEN ' DD051402
- PRINT #16, WasX$ ' DD050701
- END IF ' DD051402
- END SUB
- * REPLACING old line(s) by new
- 13674 IF ZPrinter THEN _
- LPRINT Strng$
- END SUB
- * ------[ first line different ]------
- '20101 ' $SUBTITLE: 'ChangeDir - subroutine to change subdirectories' ' DD062304
- ' $PAGE
- '
- ' NAME -- ChangeDir
- '
- ' INPUTS -- PARAMETER MEANING
- ' NewDir$ NAME OF SUBDIRECTORY
- '
- ' OUTPUTS -- ZOK TRUE IF CHDIR SUCCESSFUL
- ' ZErrCode ERROR CODE
- '
- ' PURPOSE -- Change subdirectory
- '
- ' SUB ChangeDir (NewDir$) STATIC ' DD062304
- ' ON ERROR GOTO 65000 ' DD062304
- ' ZErrCode = 0 ' DD062304
- ' ZOK = ZTrue ' DD062304
- '20103 CHDIR NewDir$ ' DD062304
- ' END SUB ' DD062304
- * DELETING old line(s)
- 20101
- 20103
- * REPLACING old line(s) by new
- 20219 ' $SUBTITLE: 'FINDITX - subroutine to find if a file exists'
- ' $PAGE
- '
- ' NAME -- FINDITX
- '
- ' INPUTS -- PARAMETER MEANING
- ' FilName$ NAME OF FILE TO FIND
- ' FileNum # TO OPEN FILE AS
- '
- ' OUTPUTS -- ZOK TRUE IF FILE EXISTS
- ' ZErrCode ERROR CODE
- '
- ' PURPOSE -- Determine whether a file exists
- '
- * ------[ first line different ]------
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 20221 SUB FindItX (FilName$,FileNum) STATIC
- ON ERROR GOTO 65000
- ZErrCode = 0
- ZOK = ZFalse
- IF LEN(FilName$) < 1 THEN _
- EXIT SUB
- CALL FindFile (FilName$,ZOK) ' DD051001
- IF ZOK THEN ' DD051001
- CLOSE FileNum ' DD051001
- CALL OpenWork (FileNum,FilName$) ' DD051001
- IF ZErrCode = 64 OR ZErrCode = 76 THEN ' DD051001
- ZOK = ZFalse ' DD051001
- EXIT SUB ' DD051001
- END IF ' DD051001
- ELSE ' DD051001
- EXIT SUB ' DD051001
- END IF ' DD051001
- END SUB
- '
- * DELETING old line(s)
- 20222
- 20223
- * REPLACING old line(s) by new
- 51098 ' $SUBTITLE: 'FindFree - subroutine to find space on a device'
- ' $PAGE
- '
- ' NAME -- FindFree
- '
- ' INPUTS -- PARAMETER MEANING
- ' ZWasZ$ NAME OF FILE TO FIND
- '
- ' OUTPUTS -- ZFreeSpace$ NUMBER OF BYTES FREE
- * ------[ first line different ]------
- ' OUTPUTS -- ZFreeSpaceK$ NUMBER OF K-BYTES FREE
- ' OUTPUTS -- ZFreeSpaceM$ NUMBER OF M-BYTES FREE
- '
- ' PURPOSE -- To determine amount of free space on a device
- '
- SUB FindFree STATIC
- ON ERROR GOTO 65000
- ZErrCode = 0
- * REPLACING old line(s) by new
- * ------[ first line different ]------
- 52000 WasAX = 0 ' DD051001
- WasBX = 0
- WasCX = 0
- WasDX = 0
- IF MID$(ZWasZ$,2,1) = CHR$(58) THEN _ ': ' DD021301
- WasAX = ASC(ZWasZ$) - ASC("A") + 1
- CALL RBBSFree (WasAX,WasBX,WasCX,WasDX)
- WasI# = CDBL(WasAX) * (WasBX + 65536! * (-(WasBX < 0)))
- WasI# = WasI# * WasCX
- WasK# = CDBL(WasI# / 1000!) ' DD090901
- WasM# = CDBL(WasI# / 1000000!) ' DD090901
- ZFreeSpaceK$ = STR$(WasK#) ' DD090901
- ZFreeSpaceK$ = LEFT$(ZFreeSpaceK$,INSTR(ZFreeSpaceK$,CHR$(46)) - 1) ' DD021301
- ZFreeSpaceK$ = ZFreeSpaceK$ + CHR$(75) 'K ' DD021301
- ZFreeSpaceM$ = STR$(WasM#) ' DD090901
- ZFreeSpaceM$ = LEFT$(ZFreeSpaceM$,INSTR(ZFreeSpaceM$,CHR$(46)) - 1) ' DD021301
- ZFreeSpaceM$ = ZFreeSpaceM$ + CHR$(77) 'M ' DD021301
- ZFreeSpace$ = STR$(WasI#) + _
- " bytes" ' DD080202
- END SUB
- * DELETING old line(s)
- 52001
- 52002
- 52003
- * REPLACING old line(s) by new
- 58190 ' $SUBTITLE: 'OpenFMS - subroutine to open the FMS directory'
- ' $PAGE
- '
- ' NAME -- OpenFMS
- '
- ' INPUTS -- PARAMETER MEANING
- ' ZShareIt DOS SHARING FLAG
- ' ZFMSDirectory$ NAME OF FMS DIRECTORY
- '
- ' OUTPUTS -- LastRec NUMBER OF THE Last
- ' RECORD IN THE FILE
- ' CatLen Length of the category code
- '
- ' PURPOSE -- To open the upload directory as a random file and find
- ' the number of the last record in the file.
- '
- SUB OpenFMS (LastRec,CatLen) STATIC
- ON ERROR GOTO 65000
- CLOSE 2
- IF ZActiveFMSDir$ = "" THEN _
- * ------[ first line different ]------
- ZActiveFMSDir$ = ZFMSDirectory$ 'Pe Lib mod
- OldFile = (ZActiveFMSDir$ = PrevFMS$)
- IF OldFile THEN _
- GOTO 58192
- CALL OpenWork (2,ZActiveFMSDir$)
- CALL ReadDir (2,1)
- IF ZErrCode > 0 OR LEN(ZOutTxt$) < 37 THEN _ ' KG091002
- IF ZActiveFMSDir$ = ZPersonalDir$ THEN _
- ZFMSFileLength = 36 + ZMaxDescLen + _ ' DD052301
- (5 * ZShowTimesDownloaded) + _ ' DD052301
- ZPersonalLen _ ' DD052301
- ELSE ZFMSFileLength = 38 + ZMaxDescLen _
- ELSE ZFMSFileLength = LEN(ZOutTxt$) + 2
- IF ZFMSFileLength < (86 - (5 * ZShowTimesDownloaded)) THEN _ ' DD052301
- CalcCatLen = 3 : _ ' KG091002
- ZMaxDescLen = ZFMSFileLength - 38 _ ' KG091002
- ELSE CalcCatLen = ZPersonalLen : _ ' KG091002
- ZMaxDescLen = ZFMSFileLength - 36 - ZPersonalLen + _ ' DD052301
- (-5 * ZShowTimesDownloaded) ' DD052301
- CLOSE 2
- * REPLACING old line(s) by new
- 58192 ZErrCode = 0
- IF ZShareIt THEN _
- OPEN ZActiveFMSDir$ FOR RANDOM SHARED AS #2 LEN=ZFMSFileLength _
- ELSE OPEN "R",2,ZActiveFMSDir$,ZFMSFileLength
- * ------[ first line different ]------
- IF ZErrCode > 0 THEN 'Pe 02/02/90
- ZerrCode = 0 ' Mpl090202
- CALL QuickTPut1 ("Drive/path does not exist or bad name for FMS dir " + _
- ZActiveFMSDir$) ' Mpl090202
- CALL PutCom (ZBellRinger$) ' DD070402
- Call QuickTPut1 ("Error Has Occured, try again!") ' DD070402
- LastRec = 0 ' Mpl090202
- EXIT SUB
- END IF 'Pe 02/02/90
- LastRec = LOF(2)/ZFMSFileLength
- CatLen = CalcCatLen
- IF OldFile THEN _
- EXIT SUB
- PrevFMS$ = ZActiveFMSDir$
- FIELD 2, ZFMSFileLength AS FMSRec$
- GET #2,1
- ZWasA = (LEFT$(FMSRec$,4) <> "\FMS")
- ZUpInc = 2*(INSTR(FMSRec$," TOP ") = 0 OR ZWasA) + 1
- ZDateOrderedFMS = ZWasA OR (INSTR(FMSRec$," NOSORT") = 0)
- ZWasDF = INSTR(FMSRec$,"CH(")
- ZChainedDir$ = ""
- IF ZWasDF > 0 AND (NOT ZWasA) THEN _
- WasX = INSTR(ZWasDF,FMSRec$,CHR$(41)) : _ ') ' DD021301
- IF WasX > 0 THEN _
- ZChainedDir$ = MID$(FMSRec$,ZWasDF+3,WasX-ZWasDF-3) : _
- CALL FindFile (ZChainedDir$,ZOK) : _
- IF NOT ZOK THEN _
- ZChainedDir$ = ""
- IF ZActiveFMSDir$ = ZPersonalDir$ THEN _
- ZFileWaiting = ZFalse
- ZPersonalDnld = ((ZActiveFMSDir$ = ZPersonalDir$) OR _
- (INSTR(FMSRec$," PERS") > 0 AND NOT ZWasA))
- ZFreeDnld = ZPersonalDnld
- IF NOT ZWasA THEN _
- IF INSTR(FMSRec$," NOFREE") > 0 THEN _
- ZFreeDnld = ZFalse _
- ELSE IF INSTR(FMSRec$," FREE") > 0 THEN _
- ZFreeDnld = ZTrue
- ZListOnly = ZPersonalDnld
- IF NOT ZWasA THEN _
- IF INSTR(FMSRec$," LISTONLY ") > 0 THEN _
- ZListOnly = ZTrue
- ZExtraDnldTime = -60 * ZPersonalDnld
- IF NOT ZWasA THEN _
- WasX = INSTR(FMSRec$," TIMEEXTRA ")
- IF WasX > 0 THEN _
- CALL CheckInt (MID$(FMSRec$,WasX+10)) : _
- ZExtraDnldTime = ZTestedIntValue
- END SUB
- * REPLACING old line(s) by new
- 58230 IF ZShareIt THEN _
- OPEN FilName$ FOR OUTPUT SHARED AS #2 _
- ELSE OPEN "O",2,FilName$
- * ------[ first line different ]------
- IF ZErrCode = 64 OR ZErrCode = 76 THEN _ ' DD090802
- ZOK = ZFalse : _ ' DD090802
- EXIT SUB ' DD090802
- * REPLACING old line(s) by new
- 58280 ' $SUBTITLE: 'GetPassword - sub to read the "passwords" file'
- ' $PAGE
- '
- ' NAME -- GetPassword
- '
- ' PARAMETER MEANING
- ' INPUTS -- FILE # 2 OPENED
- '
- ' OUTPUTS -- ZTempPassword$
- ' ZTempSecLevel
- ' ZTempTimeAllowed
- ' ZTempRegPeriod
- ' ZTempMaxPerDay
- '
- ' PURPOSE -- To read the RBBS-PC "PASSWORDS" file
- '
- SUB GetPassword STATIC
- ON ERROR GOTO 65000
- ZErrCode = 0
- INPUT #2,ZTempPassword$, ZTempSecLevel, _
- ZTempTimeAllowed, ZTempMaxPerDay, _
- ZTempRegPeriod, ZTempExpiredSec, _
- ZStartTime, ZEndTime, _
- ZByteMethod, ZRatioRestrict#, _
- ZInitialCredit#, ZTempTimeLock, _
- * ------[ first line different ]------
- ZTempMaxBank, ZDropCarSecChng, _ ' DD091401/DROP
- ZDropIncrement, _ ' DD091401/DROP
- ZPswdChngReqTime, _ ' DD091501/PSWD
- ZTurboOnFirstCall, _ ' DD091802/NOTURBO
- ZUpldTimeFactor! ' DD022002
- * INSERTING new line(s)
- 58296 SUB ReadCommentedDir (FileNum,WhichLine) STATIC ' DD031402
- WasI = 1 ' DD031402
- WHILE WasI <= WhichLine ' DD031402
- LINE INPUT #FileNum,ZExternalString$ ' DD031402
- IF LEFT$(ZExternalString$,1) = CHR$(59) THEN WasI = WasI - 1' DD021402
- WasI = WasI + 1 ' DD031402
- WEND ' DD031402
- END SUB ' DD031402
- * REPLACING old line(s) by new
- 58340 ' $SUBTITLE: 'OpenWorkA - subroutine to open output work file (2)'
- ' $PAGE
- '
- ' NAME -- OpenWorkA
- '
- ' INPUTS -- PARAMETER MEANING
- ' FilName$ NAME OF FILE TO FIND
- ' ZShareIt USE DOS' "SHARE" FACILITIES
- '
- ' OUTPUTS -- ZErrCode ERROR CODE
- '
- ' PURPOSE -- To open RBBS-PC's "work" file (number 2) for appended output
- '
- * ------[ first line different ]------
- SUB OpenWorkA (FileNum,FilName$) STATIC ' DD040601
- ON ERROR GOTO 65000
- CLOSE FileNum ' DD060501
- ZErrCode = 0
- IF ZShareIt THEN _
- OPEN FilName$ FOR APPEND SHARED AS #FileNum _ ' DD040601
- ELSE OPEN "A",FileNum,FilName$ ' DD040601
- * REPLACING old line(s) by new
- 58350 ' $SUBTITLE: 'PrintWorkA - subroutine to print to file 2 with CR'
- ' $PAGE
- '
- ' NAME -- PrintWorkA
- '
- ' PARAMETER MEANING
- ' INPUTS -- FILE # 2 OPENED
- ' STRING TO WRITE OUT
- '
- ' OUTPUTS -- NONE
- '
- ' PURPOSE -- To print a string to file #2 followed by a carriage return
- '
- * ------[ first line different ]------
- SUB PrintWorkA (FileNum,Strng$) STATIC ' DD040601
- ON ERROR GOTO 65000
- ZErrCode = 0
- PRINT #FileNum,Strng$ ' DD040601
- * REPLACING old line(s) by new
- 58360 ' $SUBTITLE: 'CheckInt - subroutine to check input is an integer'
- ' $PAGE
- '
- ' NAME -- CheckInt
- '
- ' PARAMETER MEANING
- ' INPUTS -- Strng$ STRING TO VERIFY CAN BE AN INTEGER
- '
- ' OUTPUTS -- ZErrCode = 0 MEANS IT IS AN INTEGER VALUE
- ' <> 0 MEANS IT IS NOT AN INTEGER VALUE
- ' ZTestedIntValue Integer value of expression
- '
- ' PURPOSE -- To validate that a string represents an integer
- '
- SUB CheckInt (Strng$) STATIC
- ON ERROR GOTO 65000
- ZErrCode = 0
- WasX$ = Strng$
- CALL Trim (WasX$)
- * ------[ first line different ]------
- ZTestedIntValue = VAL(LEFT$(WasX$,INSTR(WasX$+SPACE$(1),SPACE$(1))-1)) ' DD021301
- * REPLACING old line(s) by new
- 59650 ' $SUBTITLE: 'PutCom -- subroutine to write to communications port'
- ' $PAGE
- '
- ' NAME -- PutCom
- '
- ' INPUTS -- PARAMETER MEANING
- ' STRNG$ STRING TO PRINT TO COMM PORT
- ' ZFlowControl WHETHER USING CLEAR TO SEND FOR FLOW
- ' CONTROL BETWEEN THE PC AND THE MODEM
- '
- ' OUTPUTS --
- '
- ' PURPOSE -- Checks for carrier drop and flow control (xon/xoff)
- ' before writing to the communications port.
- '
- SUB PutCom (Strng$) STATIC
- ON ERROR GOTO 65000
- IF ZLocalUser THEN _
- EXIT SUB
- CALL CheckCarrier
- IF ZSubParm = -1 THEN _
- EXIT SUB
- IF NOT ZXOffEd THEN _
- GOTO 59652
- ZSubParm = 1
- CALL Line25
- ZWasY$ = ZXOff$
- * ------[ first line different ]------
- XOffTimeout! = TIMER + ZWaitBeforeDisconnect ' Mpl090202
- WHILE ZWasY$ = ZXOff$ AND ZSubParm <> -1
- Char = -1
- WHILE Char = -1 AND ZSubParm <> -1
- GOSUB 59654
- WEND
- IF Char <> -1 THEN _
- CALL GetCom(ZWasY$) : _
- IF ZXOnXOff AND ZWasY$ <> ZXOn$ THEN _
- ZWasY$ = ZXOff$
- WEND
- ZXOffEd = ZFalse
- ZSubParm = 1
- CALL Line25
- * REPLACING old line(s) by new
- 59654 CALL EofComm (Char)
- CALL GoIdle
- CALL CheckCarrier
- * ------[ first line different ]------
- CALL CheckTime(XOffTimeout!, TempElapsed!,1)
- IF ZSubParm = 2 THEN _
- ZSubParm = -1
- RETURN
- END SUB
- * REPLACING old line(s) by new
- 59700 ' $SUBTITLE: 'Talk -- subroutine for voice response'
- ' $PAGE
- '
- ' NAME -- Talk
- '
- ' INPUTS -- PARAMETER MEANING
- ' ZVoiceType TYPE OF VOICE SYNTHESIZER
- ' VoiceRecord RECORD NUMBER TO RETRIEVE
- '
- ' OUTPUTS --
- '
- ' PURPOSE -- Retrieve voice record and send to voice synthesizer
- '
- * ------[ first line different ]------
- ' SUB Talk (VoiceRecord,StringWork$) STATIC ' DD060401
- ' IF ZVoiceType = 0 THEN _ ' DD060401
- ' EXIT SUB ' DD060401
- ' IF VoiceRecord > 0 THEN _ ' DD060401
- ' GOTO 59720 ' DD060401
- ' CLOSE 9,8 ' DD060401
- ' IF ZVoiceType = 1 THEN _ ' DD060401
- ' OPEN "COM2:2400,E,7,1,CS65535" AS #9 : _ ' DD060401
- ' LPRINT "OPENED COM PORT" ' DD060401
- ' IF ZShareIt THEN _ ' DD060401
- ' OPEN "RBBSTALK.DEF" FOR RANDOM SHARED AS #8 LEN=32 _ ' DD060401
- ' ELSE OPEN "R",8,"RBBSTALK.DEF",32 ' DD060401
- ' FIELD 8,30 AS TalkRecord$,2 AS Dummy$ ' DD060401
- ' EXIT SUB ' DD060401
- '59720 IF NOT ZSnoop THEN _ ' DD060401
- ' EXIT SUB ' DD060401
- ' IF VoiceRecord < 65 THEN _ ' DD060401
- ' GET 8,VoiceRecord : _ ' DD060401
- ' StringWork$ = TalkRecord$ : _ ' DD060401
- ' CALL Trim (StringWork$) ' DD060401
- '59721 IF ZSmartTextCode THEN _ ' DD060401
- ' CALL SmartText (StringWork$, CRFound,ZFalse) ' DD060401
- '59722 IF ZVoiceType = 1 THEN _ ' DD060401
- ' PRINT #9,StringWork$ ' DD060401
- '59723 IF ZVoiceType = 2 THEN _ ' DD060401
- ' CALL RBBSHS (CHR$(LEN(StringWork$)+1)+StringWork$+CHR$(13)) ' DD060401
- ' END SUB ' DD060401
- * DELETING old line(s)
- 59720
- 59721
- 59722
- 59723
- * REPLACING old line(s) by new
- 59791 IF FExists THEN _
- IOErrorCount = 0 : _
- CALL RBBSFind (FilName$,WasZ,WasY,WasM,WasD) : _
- FExists = (WasZ = 0)
- END SUB
- * ------[ first line different ]------
- '
- '
- ' $SUBTITLE: 'Error Handling for separately compiled subroutines'
- ' $PAGE
- '
- '
- ' Error handling for the separately compiled subroutines of RBBS-PC
- '
- '
- * REPLACING old line(s) by new
- 65000 IF ZDebug THEN _
- ZOutTxt$ = "RBBSSUB1 DEBUG Error Trap Entry ERL=" + _
- STR$(ERL) + _
- " ERR=" + _
- STR$(ERR) : _
- IF ZPrinter THEN _
- CALL Printit(ZOutTxt$) _
- ELSE CALL LPrnt(ZOutTxt$,1)
- ZErrCode = ERR
- '
- ' SetCall
- '
- IF ERL = 108 THEN _
- CALL PScrn ("Unable to create callers log " + ZCallersFile$) : _
- SYSTEM
- IF ERL = 110 THEN _
- RESUME NEXT
- '
- ' OPEN CONFIG FILE
- '
- IF ERL => 117 AND ERL <= 119 THEN _
- RESUME NEXT
- '
- * ------[ first line different ]------
- ' Create ArkViewSubdir error handling 'Pe 08/15/91
- ' ' Mpl090202
- IF ERL = 150 and ERR = 75 THEN _ 'Pe 08/15/91
- ZErrCode = ERR : _ ' Mpl090202
- RESUME NEXT 'Pe 08/15/91
- '
- ' Disk Not Ready ' DD042602
- ' ' DD042602
- IF ERR = 71 THEN _ ' DD042602
- ZErrCode = ERR : _ ' DD042602
- CALL QuickTPut1 (ZFGF$ + ZBG4$ + _ ' DD042602
- "ERROR! Disk Not Ready!" + _ ' DD042602
- ZEmphasizeOff$) : _ ' DD042602
- RESUME NEXT ' DD042602
- '
- ' Path not found ' DD090802
- ' ' DD090802
- IF ERR = 76 THEN _ ' DD090802
- ZErrCode = ERR : _ ' DD090802
- CALL QuickTPut1 (ZFGF$ + ZBG4$ + _ ' DD090802
- "ERROR! Path Not Found!" + _ ' DD090802
- ZEmphasizeOff$) : _ ' DD090802
- RESUME NEXT ' DD090802
- '
- ' OPEN COM PORT ERROR HANDLING
- '
- IF ERL = 200 THEN _
- CLS : _
- CALL PScrn (ZComPort$ + " does not exist/not responding- Error" + STR$(ERR)) : _
- STOP
- '
- ' GetCom ERROR HANDLING
- '
- IF ERL = 1420 AND ERR = 57 THEN _
- RESUME NEXT
- IF ERL = 1420 AND ERR = 69 THEN _
- ZSubParm = -1 :_
- RESUME NEXT
- '
- ' OPENRESEQ ERROR HANDLING
- '
- IF ERL = 1487 THEN _ ' Pe 08/25/91
- ZErrCode = ERR : _
- RESUME NEXT
- '
- ' OpenUser ERROR HANDLING
- '
- IF ERL = 9400 AND ERR = 75 AND ZShareIt THEN _
- CALL DelayTime (30) : _
- RESUME
- '
- ' FindUser ERROR HANDLING
- '
- IF ERL = 12610 OR ERL = 12600 THEN _
- RESUME NEXT
- '
- ' UpdtCalr ERROR HANDLING
- '
- IF ERL = 13663 THEN _
- RESUME NEXT
- IF ERL = 13672 AND ERR = 61 THEN _
- CALL QuickTPut1 ("Disk Full") : _
- IF ZDiskFullGoOffline THEN _
- GOTO 65010 _
- ELSE RESUME NEXT
- IF ERL = 13672 THEN _
- ZCallersFileIndex! = ZCallersFileIndex! - 1 : _
- RESUME NEXT
- '
- ' ZPrinter ERROR HANDLING
- '
- IF ERL = 13674 THEN _
- ZPrinter = ZFalse : _
- RESUME
- '
- ' ChangeDir ERROR HANDLING
- '
- ' IF ERL = 20103 THEN _ ' DD062304
- ' ZOK = ZFalse : _ ' DD062304
- ' RESUME NEXT ' DD062304
- '
- ' FindIt ERROR HANDLING
- '
- IF ERL = 20221 THEN _
- RESUME NEXT
- IF ERL = 20223 AND ZErrCode = 58 THEN _
- ZErrCode = 64 : _
- ZOK = ZFalse : _
- RESUME NEXT
- IF ERL = 20223 AND ZErrCode = 76 THEN _
- CALL LPrnt("Bad path. File name is " + FilName$,1) : _
- ZErrCode = 76 : _
- ZOK = ZFalse : _
- RESUME NEXT
- IF ERL => 20221 AND ERL <= 20223 AND ZErrCode = 70 _
- AND ZNetworkType = 6 THEN _
- ZErrCode = 0 : _
- RESUME NEXT
- IF ERL => 20221 AND ERL <= 20223 THEN _
- RESUME
- '
- ' FlushCom ERROR HANDLING
- '
- IF ERL = 20310 AND ERR = 14 THEN _ 'Pe 01/03/90
- RESUME NEXT
- IF ERL = 20311 AND ERR = 57 THEN _ ' Mpl090201
- RESUME NEXT
- IF ERL = 20311 AND ERR = 69 THEN _
- ZAbort = ZTrue : _
- ZSubParm = -1 : _
- RESUME NEXT
- '
- ' NetBIOS ERROR HANDLING
- '
- IF ERL => 29900 AND ERL <= 29920 THEN _
- RESUME NEXT
- '
- ' UpdateC ERROR HANDLING
- '
- IF ERL => 43050 AND ERR <= 43060 AND ERR = 54 THEN _ ' Mpl111401
- RESUME NEXT ' Mpl111401
- IF ERL => 43050 AND ERL <= 43060 AND ERR = 61 THEN _
- ZOutTxt$ = "* Disk full - terminating *" : _
- ZSubParm =2 : _
- CALL TPut : _
- IF ZDiskFullGoOffline THEN _
- GOTO 65010 _
- ELSE SYSTEM
- '
- ' CheckInt ERROR HANDLING
- '
- IF (ERL = 59652 OR ERL = 59727) AND ERR = 24 THEN _
- ZNotCTS = ZTrue : _
- CALL Line25 : _
- ZErrCode = 0 : _
- RESUME
- IF ERL => 52000 AND ERL <= 59725 THEN _
- RESUME NEXT
- '
- ' FindFile ERROR HANDLING
- '
- IF ERL = 59791 THEN _
- IF ERR = 57 THEN _ ' Mpl090202
- CALL DelayTime (1) : _
- CALL UpdtCalr ("SLOW I/O ERROR",1) : _
- IOErrorCount = IOErrorCount + 1 : _
- IF IOErrorCount < 19 THEN _ 'Was 11 Pe 08/05/92
- RESUME
- '
- ' VIEW ARC TXT ERROR HANDLER ' Mpl090202
- ' ' Mpl090202
- ' IF ERL => 60140 AND ERR = 53 THEN _ 'Pe 10/20/91
- ' CALL QuickTPut1 ("ERROR! No Such File, EXITING") : _ ' DD060101
- ' RESUME NEXT ' Mpl090202
- ' IF ERL => 60140 AND ERR = 63 THEN _ 'Pe 10/20/91
- ' CALL QuickTPut1 ("ERROR Occured, Please notify SysOp") : _ ' Mpl090202
- ' RESUME NEXT ' Mpl090202
- '
- ' CATCH ALL OTHER ERRORS
- '
- ZOutTxt$ = "RBBS-SUB1 Untrapped Error" + _
- STR$(ERR) + _
- " in line" + _
- STR$(ERL)
- CALL QuickTPut1 (ZOutTxt$)
- CALL UpdtCalr (ZOutTxt$,2)
- RESUME NEXT
- ' SHARED ROUTINE FOR GOING OFF LINE WHEN DISK FULL
-