; This file updates SRDTRP.MAC;1 from SRD V6.3. SRDTRP.MAC;2/AU=SRDTRP.MAC;1 \ -/.IDENT/,. .IDENT -6.4- ; NOV-83 -/CEF001/ ; ; ; VERSION 6.4 - 07-Nov-83 (;BT003) ; ; Bob Turkelson ; SRD Working Group ; ; Add sort by date capability. Merged from Henry Tumblin's ; version of SRD (which does not appear on the SIG tapes). ; Allow specification of major and minor sort keys in any order ; in the /SR:x:x:x switch, also allowing the sort to be either ; ascending or descending for any key (file name, type, version ; date). Ascending and descending capability adopted from ; changes by Dave Sides (Sachs/Freeman Assoc., Inc., c/o ; JHU/Applied Physics Laboratory)(;DJS001). Ideas for ; specifying sort keys came from the version of SRD in the ; U. S. Forest Service collection of programs appearing on the ; Spring 1982 SIG tape. The implementation here is quite ; different. ; Added the command file generation switch /CM, taken from the ; version of SRD submitted to the Spring 1982 SIG tape in the ; U. S. Forest Service collection of programs. ; For files with multiple headers, calculate the number of ; allocated blocks from the retrieval pointers (as has been ; done for any file when the header attributes show zero blocks ; allocated). Read each extension header into a buffer which ; starts at the beginning of the retrieval pointer area of the ; buffer for the first header. Only 51. additional words are ; needed for the buffer since the overlap is 205. words. ; When the date stored in the file header is corrupt, issue a ; non-fatal diagnostic message. (Previously the same fatal ; message was issued for this situation as was given for when ; an invalid date was specified in the command line.) ; Use three letters of the task name in the program prompt and in ; error messages. ; Eliminate the extra zero byte appearing at the end of a ; diagnostic message. ; In diagnostic messages which refer to specific files include ; the UIC and file name in the message. ; Form a UIC string when the directory is opened in SRDOPR for ; use in UIC headings and diagnostic messages. % -,,/;BT003/ -/PSECT...SRDATA/,/MES1:/ -/TRAP0:/ -/MOV...#SERV/,. MOV #ERSERV,R1 ; Point at severity indicator -/10$:/ -/MOV...#MES1/,. MOV #ERMES1,R2 ; Start of variable message area -/20$:/ -/MOV...#MESG/,/SUB...R1,R2/ DEC R2 ; Back up to zero byte DEC R2 ; And then back to last byte in message CMPB #'%,(R2)+ ; Is last byte in message special symbol? BNE 18$ ; NE - no DEC R2 ; Point back to special symbol to be replaced MOV #UICHD,R1 ; Point to UIC string 14$: MOVB (R1)+,(R2)+ ; Fill in UIC string BNE 14$ ; NE - more of UIC to copy DEC R2 ; Back up to zero byte MOV LENNTV,R0 ; Get length of name-type-version BEQ 18$ ; NE - name not present MOV LSTFDB+F.NRBD+2,R1 ; Point to start of name 16$: MOVB (R1)+,(R2) ; Fill in file name CMPB #40,(R2)+ ; Was character a blank? BNE 17$ ; NE - no DEC R2 ; Remove the blank 17$: SOB R0,16$ ; Fill in entire name 18$: MOV #ERMESG,R1 ; Start of message SUB R1,R2 ; Calculate length of message -/ERRTAB:/ -/.WORD...20$,/,. .WORD 20$,21$,22$,23$,24$,25$,26$,27$ .WORD 30$,31$,32$,33$,34$,35$,36$ -/999$:/,. .IF DF D$$CAL 999$: MESG$ .IFF 999$: MESG$ .ENDC -/16$:/,/17$:/ 16$: MESG$ 17$: MESG$ -/25$:/,/30$:/ 25$: MESG$ 26$: MESG$ 27$: MESG$ 30$: MESG$ 31$: MESG$ 32$: MESG$ 33$: MESG$ 34$: MESG$ 35$: MESG$ 36$: MESG$ /