FWILD.MAC=FWILD.VGN -,,/; *014/ ; this slp file changes the FWILD.MAC on the C structured ; language tapes. The latest version is SPRING81 -23,23 .ident /000014/ -52,67 ; fwild/fnext handle RSX file version numbers correctly. ; Note that version number 0 means the "newest" file, ; while version number -1 means the oldest. (Version numbers are ; not used on RT11 or RSTS/E.) -108,110 ; version number. Version ;0 and ;-1 have ; the normal meanings. ; UIC's may not contain wildcards. -131,136 -215 ; 000014 4-SEP-81 RVT Fixed up RSX version to handle ;0 version properly! ; Also handles ;-1 properly -597,597 -640,655 .page ;;;;;; find wild-card versions 0 & -1 properly!!!!! ; by ray van tassle ; ; find the next one. ; Then find version 0 or -1 (by reset n.next & turn off wild-card) ; and see if that one is the same one we first found. ; if so, use it. If not, forget about it!! ; Isn't this slick? I wonder why nobody else thought of it. 30$: call .find ; Look for something bcs nomore ; Out of the loop if no more MOV N.NEXT(R1),R2 ; SAVE NEXT-CONTEXT MOV N.STAT(R1),R3 ; SAVE WILD-CARD BITS MOV N.FID(R1),-(SP) ; SAVE THE FILE-ID MOV N.FID+2(R1),-(SP) MOV N.FID+4(R1),-(SP) MOV N.FVER(R1),-(SP) ; SAVE THIS VERSION NUMBER -666,700 ; 8 FILE VERSION NUMBER ; 10,12,14 FILE ID ; CLR N.NEXT(R1) ; LOOK THRU THE ENTIRE DIRECTORY CLR N.STAT(R1) ; (FOR SAME FILE-NAME) CLR N.FVER(R1) ; ASSUME VERSION 0 bit #VF$VM1,(r4) ; Version -1?? bEQ 40$ ; Br if NOT DEC N.FVER(R1) ; IT IS VERSION -1 40$: CALL .FIND BCC 35$ IOT ; !!!! THIS CANNOT FAIL !!!! 35$: CMP N.FVER(R1),8.(SP) ; DID WE FIRST FIND THE RIGHT ONE?? BNE 39$ ; NO!! ; THIS ONE IS THE RIGHT ONE. USE IT MOV R2,N.NEXT(R1) MOV R3,N.STAT(R1) ; RESTORE STAT BITS mov (SP)+,N.FNAM+0(r1) ; name mov (SP)+,N.FNAM+2(r1) ; file mov (SP)+,N.FNAM+4(r1) ; and the mov (SP)+,N.FTYP(r1) ; file type (extension) MOV (SP)+,N.FVER(R1) ; THIS VERSION NUMBER MOV (SP)+,N.FID+4(R1) MOV (SP)+,N.FID+2(R1) MOV (SP)+,N.FID(R1) ; THE FILE-ID BR OKEXIT ; THIS ONE IS NOT THE ONE WE WANT; PRETEND WE NEVER SAW IT. 39$: MOV R2,N.NEXT(R1) MOV R3,N.STAT(R1) ; RESTORE STAT BITS mov (SP)+,N.FNAM+0(r1) ; name mov (SP)+,N.FNAM+2(r1) ; file mov (SP)+,N.FNAM+4(r1) ; and the mov (SP)+,N.FTYP(r1) ; file type (extension) MOV (SP)+,N.FVER(R1) ; MOV (SP)+,N.FID+4(R1) MOV (SP)+,N.FID+2(R1) MOV (SP)+,N.FID(R1) ; THE FILE-ID BR 30$ -727,753 /