[11,10]DRPFN.MAC/-AU=[11,10]OLDDRPFN.MAC -5,5 .IDENT /X1.11B/ -18,18 ; 0002 0 MODULE DRPFN (IDENT = 'X1.11B' -79 ; ; Johnny Billquist 29-May-1993 1.11B ; ; BQT001 - Changed MERGE to do an append if directory-spec gives ; a subdirectory-spec in one of the fields. ; Also changed common_parse to set do_directory_defaulting ; if the primary file-spec starts on a '.' or '-'. ; -592,592 .IDENT /X1.11B/ -617 .EVEN SFDDIR: .BLKB 64 -2038 ; IF .merge_directory_flag THEN do_directory_defaulting = true; ; -2908,2908 BEQ 2901$ MOV #1,DO.DIRECTORY.DEFAULTING 2901$: BIT #1,DO.DIRECTORY.DEFAULTING ; 1500 -3679 ; ; If the secondary directory string ends on a '.', copy it, followed ; by the primary string into SFDDIR. ; And then change pointers to give this new string as primary. ; -3764 ; ; Here we append primary and secondary directory, if secondary dir ends on a '.' ; -4010,4010 4$: ; ; Here the new code comes... ; TST PRI.PB+14 ; No primary directory? BEQ 201$ ; Nope. TST SCR.PB+14 ; Secondary directory? BEQ 201$ ; Nope. MOV SCR.PB+16,R0 ; Get pointer to secondary. ADD SCR.PB+14,R0 ; Point at end of string. DEC R0 ; Point at last real char of directory. CMPB -(R0),#'. ; Did the string end on a '.'? BNE 201$ ; Nope. ; ; Okay, now we know we have an incomplete dir-spec as default. ; MOV SCR.PB+16,R0 ; Source pointer. MOV #SFDDIR,R1 ; Destination. MOV SCR.PB+14,R2 ; Length. CLR R3 ; Total length output. DEC R2 ; Don't take last char of source. 202$: MOVB (R0)+,(R1)+ ; Move byte INC R3 ; Bump size written. CMP R3,#63. ; Buffer full? BEQ 205$ ; Yes. SOB R2,202$ ; No, repeat. MOV PRI.PB+16,R0 ; Now copy primary... MOV PRI.PB+14,R2 INC R0 ; Skip initial bracket. SUB #2,R2 ; Skip both brackets... 203$: MOVB (R0)+,(R1)+ ; Copy. INC R3 ; Bump total length. CMP R3,#63. ; Full? BEQ 205$ ; Yes. SOB R2,203$ ; No. Repeat. 205$: MOVB SFDDIR,R0 ; Time to put and end to the directory string. ADD #2,R0 ; The character we want... MOVB R0,(R1)+ ; Save it. INC R3 ; And bump length. MOV #SFDDIR,PRI.PB+16 ; Save pointer. MOV R3,PRI.PB+14 ; And length. MOV SCR.PB+2,R0 ; And fix flags. BIC #176677,R0 BIS R0,PRI.PB+2 ; ; Done! ; 201$: TST PRI.PB+14 ; 2328 /