ithout restriction with the inclusion & ! of this copyright notice. This program is provided "AS-IS" as a & ! service to the RSTS community and is without warranty, expressed or & ! implied. & ! & ! AUTHOR: Michael Mayfield, Northwest Digital Software Inc. & ! & ! EDIT HISTORY: & ! 00 18-SEP-84 MEM Original version. & ! & ! VARIABLE USAGE: & ! FILENAME$ Current filename for file open & ! PRGM.DEV$ Device name for spawn, in FIP format & ! PRGM.NAME.TYP$ Program name for spawn, in RAD50 & ! PRGM.PPN$ Program PPN for spawn, in FIP format & ! SKIP% Number of file specifications to skip & 10 ! List of files and UFDs to open: & DATA "SY0:[1,2]PIP.SAV", & "SY0:[1,2]NOTICE.TXT", & "LB:" & 99 DATA "*END*" ! *END* must be the last entry in the table. & 100 SKIP%=0% & ! We don't need to skip any entries the first time FSTOPN is run. & 1000 ON ERROR GOTO 32000 & \ Z$=SYS(CHR$(12%)) & \ PRGM.DEV$=MID(Z$,23%,4%) & \ PRGM.PPN$=MID(Z$,5%,2%) & \ PRGM.NAME.TYP$=MID(Z$,7%,6%) & \ Z$=SYS(CHR$(6%)+CHR$(-13%)+CHR$(255%)+CHR$(255%)+CHR$(-16%)) & \ IF SKIP%=0% THEN & PRINT "Detaching..." & \ Z$=SYS(CHR$(6%)+CHR$(7%)+CHR$(128%)) & ! Get our program name specification to use in spawning a new copy & ! of ourselves. Change our priority to -16 in case of error. If & ! this is the first run, tell them we are detaching and detach. & 1010 READ Z$ FOR Z%=1% TO SKIP% & \ FOR Z%=1% TO 12% 1020 READ FILENAME$ & \ GOTO 1030 IF FILENAME$="*END*" & \ OPEN FILENAME$ FOR INPUT AS FILE Z%, & RECORDSIZE 32767%+3%, MODE 4096% & \ SKIP%=SKIP%+1% & \ NEXT Z% & \ READ Z$ & \ GOTO 1030 IF Z$="*END*" & \ Z$=SYS(CHR$(8%)+CVT%$(SKIP%)) & \ Z$=SYS(CHR$(6%)+CHR$(24%)+CHR$(192%)+CHR$(0%)+PRGM.PPN$+PRGM.NAME.TYP$+ & STRING$(10%,0%)+PRGM.DEV$+CVT%$(SWAP%(30001%+32767%))) & ! Skip the files already opened by a previous run of FSTOPN. Read up & ! to 12 filenames and open them in read-regardless mode (Note that & ! read-regardless mode is ignored for UFD opens). If there are more & ! files to open, spawn a new copy of FSTOPN and tell it where to start & ! in the list of files to open. & 1030 SLEEP 32767% UNTIL 0% & ! Sleep forever. & ! & ! ** FEATURE PATCH: If you want all files opened by FSTOPN to be & ! closed immediately if SHUTUP is run or logins turned off, replace & ! line 1030 with the following: & ! & ! 1030 SLEEP 32767% & ! \ GOTO 1030 IF & ! (SWAP%(PEEK(SWAP%(CVT$%(MID(SYS(CHR$(6%)+CHR$(-12%)), & ! 13%,2%))))) AND 255%)>1% & ! \ CLOSE #Z% FOR Z%=1% TO 12% & ! \ Z$=SYS(CHR$(6%)+CHR$(8%)+STRING$(25%,0%)+CHR$(255%)) & ! \ SLEEP 32767 UNTIL 0% & ! Sleep for 32767 seconds (9 hours) or until logins are & ! disabled. See if logins were disabled. If not, go back to & ! sleep. Else, close all of our files and kill our job. If & ! the kill failed, go to sleep until SHUTUP kills us. & 30000 ! ** SPAWN ENTRY POINT ** & & SKIP%=CVT$%(LEFT(SYS(CHR$(7%)),2%)) & \ GOTO 1000 & ! Get the skip count passed in core common. Start the program using & ! the specified skip count. & 32000 ! ** ERROR TRAP ENTRY POINT ** & & IF ERR=5% AND ERL=1020% THEN & Z$=SYS(CHR$(6%)+CHR$(-5%)+CHR$(0%)+ & "%% FSTOPN: Unable to open file: "+FILENAME$+ & CHR$(7%)+CHR$(13%)+CHR$(10%)) & \ RESUME 1020 & ! "?Can't find file or account": Broadcast a message to KB0: telling & ! them about the error, then ignore the file. & 32766 Z$=SYS(CHR$(6%)+CHR$(-5%)+CHR$(0%)+"%% FSTOPN: Fatal error"+ & NUM$(ERR)+"at line "+NUM1$(ERL)+". Aborting..."+ & CHR$(7%)+CHR$(13%)+CHR$(10%)) & \ ON ERROR GOTO 0 & ! All other errors are fatal. Broadcast a message to KB0: telling & ! them we are aborting, then abort and hybernate. & 32767 END FSTOPNBAS[.050010]FSTOPN.BAS[.050010]   X14|H [4;Ik(&'( k ߫H&P` \RrPP2PPzPP{PPPPP2P~\$\\TD 0D \~ hi) +\ ^( n ^( np\^txY\^ˀ\!kVk<\F˰<˴ˬ\VVkˤ1`@lP ABCDEFGHIJKLMNOPQRSTUVWXYZ$.?0123456789<@<SЬTЬ UQS>