Trailing-Edge
-
PDP-10 Archives
-
bb-bt99h-bb
-
foropn.c11
There are 2 other files named foropn.c11 in the archive. Click here to see a list.
INS 1084/2 ;11C1
4211 JLC 2-May-85
Deallocate channels allocated by accident by TOPS-10 on FILOPs
which fail, thus preventing undeserved "out of channels" errors
for programs which open a few files many times. Also, don't
return path information if the path block wasn't filled in,
such as for protection failures.
4212 JLC 2-May-85
Fix yet another DATE75 bug, this one due to the fact that TOPS-10
deposits the rename error code in the right half of .RBEXT, where
the low-order 15 bits of the creation date reside. This happened
only on a rename failure after DIALOG.
4213 JLC 9-May-85
Make sure BLOCKSIZE is an integral multiple of RECL for
fixed-length records on industry magtape; issue fatal error
if not.
REP 22/11 ;11C2
JUMPN T1,CNFMT5 ;Jump if it is specified
WIT
JUMPN T1,CNFBLR ;[4213] Jump if it is specified
INS 26/11 ;11C3
CNFBLR: LOAD T1,BLKSZ(D) ;[4213] GET BLOCKSIZE
CAIN T1,0 ;[4213] IF NOT SPECIFIED FOR FIXED RECORDS
$DCALL BLZ ;[4213] IT IS A FATAL ERROR
MOVE T2,RSIZE(D) ;[4213] GET RECORDSIZE
IDIV T1,T2 ;[4213] DIVIDE BLOCKSIZE BY RECORDSIZE
JUMPE T2,CNFMT5 ;[4213] IF NO REMAINDER, IT'S OK
$DCALL FBR ;[4213] RECORDS MUST FIT EXACTLY INTO BLOCK
REP 30/11 ;11C4
CNFMT3:;LOAD T1,RECT(D) ;Get /RECORDTYPE
WIT
CNFMT3:LOAD T1,RECTP(D) ;[4213] Get /RECORDTYPE
REP 23/51 ;11C5
AOS (P) ;FOUND. SKIP RETURN
PJRST SETPPB ;[4134] POINT BACK TO PATH BLOCK AGAIN
DLERR: SETZM FBLK(D) ;CLEAR CHANNEL INFO
CAIN T1,ERPRT% ;PROTECTION FAILURE?
AOS (P) ;YES. WE REALLY FOUND THE FILE
PJRST SETPPB ;[4134] POINT TO PATH BLOCK AGAIN
WIT
LOOKOK: AOS (P) ;[4211] FOUND. SKIP RETURN
PJRST SETPPB ;[4134] POINT BACK TO PATH BLOCK AGAIN
DLERR: CAIN T1,ERPRT% ;PROTECTION FAILURE?
JRST LOOKOK ;[4211] YES. WE REALLY FOUND THE FILE
PUSH P,T1 ;[4211] SAVE ERROR CODE
PUSHJ P,RELJFN ;[4211] RELEASE THE CHANNEL (IT'S USELESS)
POP P,T1 ;[4211] RESTORE ERROR CODE
PJRST SETPPB ;[4134] POINT BACK TO PATH BLOCK AGAIN
INS 44/51 ;11C6
MOVEM T1,PTHB(D) ;[4211] ALSO IN PATH BLOCK IF FILOP FAILS
INS 101/51 ;11C7
SKIPE PTHB+.PTSTR(D) ;[4211] ANY RETURNED DEVICE?
REP 256/51 ;11C8
$ACALL CLS ;FAILED. TYPE MSG AND DIE
WIT
TRN ;[4211] IT WAS ALREADY GONE!
INS 19/74 ;11C9
PUSH P,T1 ;[4211] SAVE ERROR CODE
PUSHJ P,RELJFN ;[4211] RELEASE THE CHANNEL (IT'S USELESS)
POP P,T1 ;[4211]
REP 3/102 ;11C10
CLDEL: PUSHJ P,DLOOK ;LOOKUP FILE
$DCALL DEL ;CAN'T, SO WE CAN'T DELETE IT
MOVEI T1,.FODLT ;DELETE FILE
HRRM T1,FBLK(D)
WIT
CLDEL: ;[4211]
;[4211]
MOVE T1,[FO.PRV+FO.ASC+.FODLT] ;[4211] DELETE THE FILE
MOVEM T1,FBLK(D) ;[4211]
REP 10/102 ;11C11
$DCALL DEL
WIT
JRST DFAIL ;[4211] FAILED. GO RELEASE CHANNEL
INS 20/102 ;11C12
DFAIL: PUSH P,T1 ;[4211] SAVE ERROR CODE
PUSHJ P,RELJFN ;[4211] RELEASE CHANNEL
POP P,T1 ;[4211] RESTORE ERROR CODE
$DCALL DEL ;[4211] ISSUE ERROR MESSAGE AND RETURN
INS 38/103 ;11C13
MOVE T2,%RNAMD ;[4212] GET RENAME DDB ADDRESS
MOVE T3,LKPB+.RBEXT(D) ;[4212] RESTORE OLD DATE BITS
HRRM T3,LKPB+.RBEXT(T2) ;[4212] RENAME FAILURE BLEW THEM AWAY
SUM 147498