; This file updates SRDATA.MAC;1 from SRD V6.3. SRDATA.MAC;2/AU=SRDATA.MAC;1 \ -/.IDENT/,. .IDENT -6.4- ; DEC-83 -/.LIST/,. -/CEF001/+1 ; ; ; VERSION 6.4 - 07-Nov-83 (;BT003) ; ; Bob Turkelson ; SRD Working Group ; ; Use additional LUN for reading headers. For directories too ; large to fit into memory, the directory is kept open while ; processing it in pieces. Thus the directory LUN can not be ; re-used for reading the headers. ; 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. ; Search forward in the sorted directory to determine the number ; of versions when highest or obsolete version selection is ; required, and remember where a new file name and type is ; found. Necessary to take care of ascending version ; numbers. (Replaces code which compared each entry with ; both the previous and the next entries.) A check for end ; of directory is performed. (Previously possible to get a ; memory protection violation error when checking last entry ; of a dense directory which exactly filled the last block.) ; 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. ; Added the /GT:n switch to select files with allocated sizes of ; at least n. blocks. ; Added the /FI:n switch to select by file ID. ; Added the /FO:[g,m] switch to select files by file owner, with ; /FO defaulting to files owned by the directory being listed; ; may be negated to select files with different file owners. ; Reference double word (rather than single word) values in the ; file headers to report a file's used and allocated blocks. ; 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. ; Use three letters of the task name in the program prompt and in ; error messages. ; Form a UIC string when the directory is opened in SRDOPR for ; use in UIC headings and diagnostic messages. ; Move the error message buffer so that it overlaps the prompt- ; for-selective-delete buffer. % -,,/;BT003/ -/.MCALL...FDAT$A,/,. .MCALL FDAT$A,NMBLK$,FHDOF$,FCSBT$,FDOF$L,QIOW$,SPWN$ .PSECT $DATA,RW,D,LCL,REL,CON FHDOF$ DEF$L -/IOSB$::/ IOSBSV::.BLKB 1 ; I/O status block byte saved here if header read error .EVEN -/PARBF$::/,/.ENDC/,/;BT003/ PARBF$::.BLKW 16. ; GPRT$ parmeters (3 words); also GTSK$ (16. words) ; ; ; --- Note: All words in the following section are zeroed --- ; in SRDINI before getting the command line. -/VRSNS$:/,. -/VRSCT$:/ VRSRM$::.BLKW 1 ; Number of file versions remaining (including current) VRSLMT::.BLKW 1 ; Number of file versions remaining when at point ; ; separating files wanted and not wanted by /SV:n ; ; or /OV:n switches SKBUF$::.BLKW 5 ; Sort key specification from /SR: switch SKEND$==. FIBUF$::.BLKW 4 ; /FI: switch values (File-IDs requested) .WORD 0 ; Signal end of /FI: switch values GTBUF$::.WORD 0,0 ; Minimum file size to list, double word (from /GT:) CMFLG$::.BLKW 1 ; Flag word used in /CM: processing CMBUF$::.BLKB 3 ; First /CM: switch value .BYTE 0 ; String terminator (needed if value entered is 3 chars) CMBF2$::.BLKB 5 ; Second /CM: switch value .BYTE 0 ; String terminator .EVEN FOGBF$::.BLKW 1 ; Group number specified in 1st /FO: value (0 for all) FOMBF$::.BLKW 1 ; Member number specified in 2nd /FO: value (0 for all) FOGRP$::.BLKB 1 ; Group number to use in file owner comparisons FOMEM$::.BLKB 1 ; Member number to use in file owner comparisons GRPBIN::.BLKB 1 ; Directory group (binary) MEMBIN::.BLKB 1 ; Directory member (binary) GRPASC::.BLKB 3 ; Directory group (ASCII with leading zeros) .BYTE 0 ; Binary zero separator GRPMEM::.BLKB 3 ; Directory member (ASCII with leading zeros) .BYTE 0 ; Binary zero separator USEDSZ::.BLKW 2 ; File blocks used, double word ALOCSZ::.BLKW 2 ; File blocks allocated, double word LENNMF::.BLKW 1 ; Length of name field of file name LENTYF::.BLKW 1 ; Length of type field of file name (including period) LENNTV::.BLKW 1 ; Length of name-type-version UICHD:: .BLKB 10. ; Area for UIC string [g,m] without leading zeros, ; ; terminating with zero byte -/LENCLR==/ ; ; --- End of section of data zeroed in SRDINI before command line processing --- ; ; -/READHD::/,. READHD::QIOW$ IO.RAT,HDRLUN,EFN1,,IOSB$,,<0,ATTLST> -/ATTLST:/ -/.WORD...HDBUF$/,. HDPTR$::.BLKW 1 ; Pointer to header buffer - HDBUF$ or HDBF2$ address ; ; Note: this word is part of the parameter block -/MFDBK$==/,/MFDBF$==/ HDBF2$==HDBUF$+S.HDHD+S.IDHD+M.RTRV ; Read second and later headers into a ; ; buffer which begins where the first header ; ; retrieval pointers begin. Thus only 51. additional ; ; words (146 octal bytes) are needed to read in other ; ; headers. .BLKB ; Allocation for end of additional header .EVEN -/PRMPT::/,. .EVEN ERMESG::.ASCII /SRD -- */ ERSERV::.BLKB 4 .ASCII /* / ERMES1:: PRMPT:: .BLKB 132. ; Buffer used for: ; ; (a) Prompting in selective delete processing; ; ; (b) In /CM processing to hold file name temporarily; ; ; (c) For error messages .EVEN -/SRDVER:/,. SRDVER::.ASCII <12><15>"SRD -- Version WG-6.4, December 1983"<12><15> /