-+-+-+-+-+-+-+-+ START OF PART 2 -+-+-+-+-+-+-+-+ X X4. Rationalised code in module TAR that calculates the checksum of an X archive record. Made the routine that examines a header record more X robust. $ CALL UNPACK NEW-FEATURES-TAR-1.2;1 1564179261 $ create 'f' X! TAR.CLD -`09Definition of TAR verb X! X! Copyright:`09Copyright 1989,1990, Victoria College Computer Services. X!`09`09All rights reserved except those granted in the file X!`09`09AAAREADME.1ST, which is distributed with this file. X! X! Author:`09Tim Cook (timcc@viccol.edu.au) X XDEFINE TYPE map_mode_keyword X KEYWORD`09prefix, DEFAULT X KEYWORD`09absolute X KEYWORD`09root X XDEFINE SYNTAX tar_extract X PARAMETER`09p1, LABEL=option, VALUE (REQUIRED) X PARAMETER`09p2, LABEL=filespec, PROMPT="File(s)", VALUE (LIST) X QUALIFIER`09literal, PLACEMENT=POSITIONAL X QUALIFIER`09confirm X QUALIFIER`09archive, NONNEGATABLE, VALUE (TYPE=$FILE, REQUIRED) X XDEFINE SYNTAX tar_write X PARAMETER`09p1, LABEL=option, VALUE (REQUIRED) X PARAMETER`09p2, LABEL=filespec, PROMPT="File(s)", VALUE (LIST, TYPE=$FILE V, X`09`09 DEFAULT="*.*") X QUALIFIER`09confirm X QUALIFIER`09scan X QUALIFIER`09version X QUALIFIER`09map_mode, DEFAULT, VALUE (TYPE=map_mode_keyword, X`09`09 DEFAULT="PREFIX") X QUALIFIER`09archive, NONNEGATABLE, VALUE (TYPE=$FILE, REQUIRED) X XDEFINE SYNTAX tar_append X PARAMETER`09p1, LABEL=option, VALUE (REQUIRED) X PARAMETER`09p2, LABEL=filespec, PROMPT="File(s)", VALUE (LIST, TYPE=$FILE V, X`09`09 DEFAULT="*.*") X QUALIFIER`09confirm X QUALIFIER`09scan X QUALIFIER `09version X QUALIFIER`09map_mode, DEFAULT, VALUE (TYPE=map_mode_keyword, X`09`09 DEFAULT="PREFIX") X QUALIFIER`09archive, NONNEGATABLE, VALUE (TYPE=$FILE, REQUIRED) X XDEFINE SYNTAX tar_list X PARAMETER`09p1, LABEL=option, VALUE (REQUIRED) X PARAMETER`09p2, LABEL=filespec, PROMPT="File(s)", VALUE (LIST) X QUALIFIER`09literal, PLACEMENT=POSITIONAL X QUALIFIER`09full X QUALIFIER`09output, NONNEGATABLE, VALUE (TYPE=$FILE, DEFAULT="SYS$OUTPUT" V) X QUALIFIER`09archive, NONNEGATABLE, VALUE (TYPE=$FILE, REQUIRED) X XDEFINE TYPE tar_options X KEYWORD`09extract,`09SYNTAX=tar_extract X KEYWORD`09write,`09`09SYNTAX=tar_write X KEYWORD`09append,`09`09SYNTAX=tar_append X KEYWORD`09list,`09`09SYNTAX=tar_list X XDEFINE VERB tar X IMAGE`09"CS_SYSTEM:TAR"`09`09! This should be modified X PARAMETER`09p1, LABEL=option, PROMPT="Option", X VALUE (REQUIRED, TYPE=tar_options) $ CALL UNPACK TAR.CLD;1 989863376 $ create 'f' X! TAR.HLP -`09Description of the TAR command X! X! Copyright:`09Copyright 1989,1990, Victoria College Computer Services. X!`09`09All rights reserved except those granted in the file X!`09`09AAAREADME.1ST, which is distributed with this file. X! X! Author:`09Tim Cook (timcc@viccol.edu.au) X! X1 TAR XVMS TAR is a utility that emulates the UNIX tar, or Tape ARchive utility, Xwhich is used to store a set of files in a single file, usually on an Xoffline medium, such as 9-track tape. X XVMS TAR automatically performs conversion of files to and from the UNIX Xfile format, and converts between UNIX and VMS file protections and Xmodification times. X XFormat: X X X TAR keyword `5Bfile-spec`5B,...`5D`5D X! X2 Parameters Xkeyword X X One of the keywords APPEND, EXTRACT, LIST or WRITE. Each keyword has a X different function. See the help for each keyword. X Xfile-spec X X The specification of any file(s) to be APPENDed, EXTRACTed, LISTed or X WRITten. X X On an APPEND or WRITE operation, this is a wildcarded VMS file- X specification. X X On an EXTRACT or LIST operation, the file-spec parameter is interpreted X as a UNIX Bourne shell would interpret it, as per the following rules: X X * Matches any any string (including a null string) that does X not contain '/'. X X ? Matches any single character, except '/'. X X `5Bab0-9`5D Matches any one of 'ab0123456789'. X X If you want TAR to interpret the characters *, ? or `5B as normal X characters, use the /LITERAL qualifier on the particular file-spec X parameter. X X If you do not specify a file-spec parameter, TAR will WRITE or APPEND all X files in the current directory, or it will EXTRACT or LIST all files in X the nominated archive. X! X2 Examples X For all TAR operations direct to or from tape, the tape must be MOUNTed X as in the following EXTRACT example: X X $ ALLOCATE MF,MS,MT tar_archive X %DCL-I-ALLOC, _$1$MSA0: allocated X $ MOUNT /FOREIGN /RECORD_SIZE=512 /BLOCK_SIZE=10240 tar_archive X %MOUNT-I-MOUNTED, mounted on _$1$MSA0: X $ TAR EXTRACT "*.c", "*.h" /CONFIRM X Extract alloc.c ? (Y/N) `5BY`5D: n X Extract main.c ? (Y/N) `5BY`5D: X %TAR-S-CREATED, created DISK:`5BUSER`5DMAIN.C;1 (2573 records) X Extract misc.c ? (Y/N) `5BY`5D: X %TAR-S-CREATED, created DISK:`5BUSER`5DMISC.C;1 (523 records) X Extract misc.h ? (Y/N) `5BY`5D: Yes X %TAR-S-CREATED, created DISK:`5BUSER`5DMISC.H;1 (28 records) X %TAR-S-TOTAL, total of 3 files created, 4 files scanned X $ DISMOUNT tar_archive X $ DEALLOCATE tar_archive X X X If you wanted to create an archive that would later be copied to a tape, X the following sequence of commands might be used: X X $ TAR WRITE *.pas /ARCHIVE=PASCAL.TAR X X and later: X X $ ALLOCATE MSA0: X %DCL-I-ALLOC, _$1$MSA0: allocated X $ MOUNT /FOREIGN /RECORD_SIZE=512 /BLOCK_SIZE=10240 MSA0: X %MOUNT-I-MOUNTED, BLANK1 mounted on _$1$MSA0: X $ COPY/LOG PASCAL.TAR MSA0: X %COPY-S-COPIED, CS:`5BSTAFF.FRED`5DPASCAL.TAR copied to _$1$MSA0: X (315 records). X $ (dismount and deallocate) X X The /BLOCK_SIZE qualifier is important for mounting TAR tapes. UNIX uses X a default blocking factor of 20, which makes the block size 10240. A X UNIX tar archive might have been created with a different blocking X factor, though. This may be discovered by mounting such an archive tape X without a /BLOCK_SIZE qualifier and DUMPing the tape drive (DUMP will X display the block size). X X If you are going to write to a tape that has previously been used for an X unusual format (like VMS BACKUP), you should initialize the tape, using X the INITIALIZE command: X X $ ALLOCATE MF,MS,MT TAR_ARCHIVE X %DCL-I-ALLOC, _$1$MSA0: allocated X $ INIT TAR_ARCHIVE FREDDO X! X2 Supported_Files X Files readable by TAR include: X X Record format Carriage control X ------------- ---------------- X X variable-length carriage-return, stream-lf X variable-fixed-control (VFC) print-file X fixed-length none X X Variable-length VMS files are written to an archive with linefeeds X ('newline's or '\n' to UNIX) as record terminators, which is consistent X with the UNIX text file format, whereas fixed-length VMS files are not. X Extraction of files that used to be fixed-length is extremely difficult X (see Caveats), as they are indistinguishable from text files when stored X in tar format. A feature may be added to VMS TAR in future to counter X this. X X Other file types may be supported, but a file with FORTRAN carriage X control for example, may be transmitted in a useless format. Note that X any file EXTRACTed by tar will always be recreated with the VMS standard X text file attributes; variable-length records and carriage-return X carriage control. X! X2 Caveats XTAR_TIMEZONE X X To assist in the conversion of file modification times, TAR uses time X zone information. TAR gets the local time zone from the logical names X SYS$TIME_ZONE or TAR_TIMEZONE (the latter is used if the former is not X defined). The format of these logicals is "`5Bs`5D`5B`5Bh`5Dmm`5D", where V s is a X sign (+ or -), h is the number of hours (1-18) and mm the number of X minutes (00-59) to be added to GMT to give the local time. An example is X "+1000" for Australian Eastern Standard Time, which is 10 hours ahead of X GMT. X X I'm not sure about the history of SYS$TIME_ZONE. I saw it somewhere, but X I can't remember where. It is not defined on our systems. X X XThe /SCAN qualifier. X X When writing a file with variable-length records to an archive, TAR's X normal behaviour is first to copy the file into a temporary file, in the X TAR format. When this is done, TAR knows the size of the file in bytes, X so it can then write a header record to the real archive, and quickly X load the contents of the temporary file into the archive. X X The presence of the /SCAN qualifier makes TAR read through the whole of X the input file to get its size in bytes, then load it into the archive. X X The first method should save on processing, but the second method X should save on I/O, and could help in a situation of stretched disk X quota. I thought both were useful, so I coded both and made the /SCAN X qualifier. X X Incidentally, if the input file has fixed-length records, its size is X computed using the record size and the size in blocks of the file. This X may not be a completely safe algorithm, as it presumes there are no X record delimiters in fixed-length record files. X X X!'Directory not found' when EXTRACTing files X! X! If you try to make TAR EXTRACT a file into a directory that does not X! exist (it may not have been put in the archive), it will say so, X! then extract it into the file '`5B`5DOUT_FILE.DAT'. This wasn't actuall Vy X! explicitly coded into TAR by me (a side effect), but it seems a X! sensible thing to do until I implement a qualifier to tell TAR to X! create the directories it needs (like UNIX tar and BACKUP). X! X! `5B TAR now automatically creates any necessary directories `5D X! XInternal errors X X If TAR tells you it has encountered an internal error, it means it has X caught a Pascal run-time error that it doesn't have a way of handling.`20 X Generally, this means you have done something strange with TAR that I X haven't done myself in testing. The code supplied in the INTERNERR X message corresponds to a VAX Pascal status code, and I would like it if X you notify me of how you caused the error and the value of that code. X X XOutput file record wrapping X X VMS TAR has no way of knowing if a file originally had fixed-length X records, so it always assumes a file in an archive is to be EXTRACTed X with variable-length records, and interprets any LF's it finds X accordingly. But, if a record is longer than a certain number of bytes X (currently 8192), the superfluous bytes are used to make a new record in X the file (they are wrapped). The user is told of this if and when it X happens during the extraction of a file. Note however that the user will X only be notified the first time it happens to each file. X X XExceeding disk quota X X When a sequential file is written to by VAX RMS, it automatically X extends, or allocates more blocks to the file as necessary. I have X seen RMS be overly generous in doing this; to the point where I am X fairly sure there are a few bugs deep down in RMS. This generosity X could cause a user's disk quota to be exceeded when creating a TAR X archive or extracting files from an archive. To combat this, you can X enter the following DCL command before using TAR: X X $ SET RMS_DEFAULT/EXTEND=n X X Where n is a fairly low number, like 1 or 2. The RMS default is 32, X but I have seen files with more than 31 allocated but unused blocks X attached to them. X X These superflous extents only exist when the file is being written to, X they are removed when the file is closed. X! X2 APPEND X This function is the same as WRITE, except that files written to the X archive are appended (see WRITE). X! X3 Qualifiers X! X/ARCHIVE X X Specifies the archive to which files are to be APPENDed. The default X is 'TAR_ARCHIVE', which might be a logical name pointing to a tape X drive (see Examples). The archive file specified must be a valid TAR X archive file. X X/CONFIRM X X If the /CONFIRM qualifier is given on the APPEND keyword, the user is X prompted each time TAR is about to append a file to the archive. The X user may then confirm or abort the archiving of the file. X X/MAP_MODE X /MAP_MODE=PREFIX (Default) X X The MAP_MODE keyword tells TAR how to map VMS file specifications to X UNIX pathnames when writing files to an archive. The available modes X and their behaviours follows: X X PREFIX File names in the archive are relative, any directories X in the pathname of a file that are common to all files X to be written (a common prefix) are removed. X X ABSOLUTE The VMS device, directory, name and type fields are X mapped to an absolute UNIX pathname (one beginning with X '/'). A file called 'DISK:`5BUSER.SUB`5DFOO.BAR' would be X mapped to '/disk/user/sub/foo.bar'. X X ROOT The (logical or physical) device specification is omitted X from the UNIX pathname, but the directory, name and type X are used to form a relative pathname. The file X 'DISK:`5BUSER.SUB`5DFOO.BAR' would be mapped to X 'user/sub/foo.bar'. X X/SCAN X X Instructs TAR not to use a temporary archive file for the purpose of X writing a file with variable-length records to an archive. See TAR X Caveats. X X/VERSION X X Instructs TAR to include the version number at the end of each file X name (excluding directories) and to write all versions of a file when X writing to an archive. Version numbers are usually excluded because X Unix does not have a file version mechanism, and the semi-colon (;), X used by VMS to denote a following version number, is interpreted by X Unix shells as a command separator. X! X2 EXTRACT X This function reads files from an archive, and creates VMS files in your X current directory with names, protections and modification dates as X similar as possible to their UNIX names. As each file is created, its X size in records is logged. X X Directories are created if found in the archive, or as necessary, but X links are ignored (they are noted though). This is because VMS does not X use links as much as Unix. If you want the links, you must create them X yourself, using logical names (or see SET FILE/ENTER). See also LIST. X! X3 Qualifiers X! X/ARCHIVE X X Specifies the archive from which files are to be EXTRACTed. The X default is 'TAR_ARCHIVE', which might be a logical name pointing to a X tape-drive (see Examples). X X/CONFIRM X X If the /CONFIRM qualifier is given on the EXTRACT keyword, the user is X prompted each time TAR is about to extract a file. The user may then X confirm or abort the creation of the file. X X/LITERAL X X Instructs TAR to interpret any file-specification literally, i.e., not X to interpret any embedded wildcards. This qualifier is positional, so X can be used on particular file-specifications. X! X2 LIST X This function lists all files, and their sizes in bytes, in an archive X that match file-spec. If file-spec is not supplied, LIST lists all files X in the archive. X X If an archive entry is a link to another file, the file-spec will be X followed by the string " -> ", then the name of the file that the entry X is linked to. If the /FULL qualifier is used, a link will also be X denoted by a "l" as the first protection character. Hard links are not X distinguished from symbolic links, but hard links usually have the same X size and protection as the original file, while symbolic links usually X have a size of 0, and can have a different protection. X! X3 Qualifiers X! X/ARCHIVE X X Specifies the archive TAR is to search for files. The default is X 'TAR_ARCHIVE', which might be a logical name pointing to a tape-drive X (see Examples). X X/FULL X X If the /FULL qualifier is specified on a LIST operation, a more X detailed listing of the archive contents is returned; specifically, X the protection, owner id-number, group id-number, size and name of the X file. X X/LITERAL X X Instructs TAR to interpret any file-specification literally, i.e., not X to interpret any embedded wildcards. This qualifier is positional, so X can be used on particular file-specifications. X X/OUTPUT X X Instructs TAR to direct the output of the LISTing to a file (the X default file type for this file is .LIS). X! X2 WRITE X This function writes files to an archive, copying the modification X date/time and the read and write permission bits (the execute permission X is present in most places where the read permission is under VMS, and is X therefore almost meaningless). The user and group id's are set to 0 X (root). As each file is written, its size in bytes (under UNIX) is X logged. X! X3 Qualifiers X! X/ARCHIVE X X Specifies the archive to which files are to be WRITten. The default is X 'TAR_ARCHIVE', which might be a logical name pointing to a tape-drive X (see Examples). X X/CONFIRM X X If the /CONFIRM qualifier is given on the WRITE keyword, the user is X prompted each time TAR is about to write a file to the archive. The X user may then confirm or abort the archiving of the file. X X/MAP_MODE X /MAP_MODE=PREFIX (Default) X X The MAP_MODE keyword tells TAR how to map VMS file specifications to X UNIX pathnames when writing files to an archive. The available modes X and their behaviours follows: X X PREFIX File names in the archive are relative, any directories X in the pathname of a file that are common to all files X to be written (a common prefix) are removed. X X ABSOLUTE The VMS device, directory, name and type fields are X mapped to an absolute UNIX pathname (one beginning with X '/'). A file called 'DISK:`5BUSER.SUB`5DFOO.BAR' would be X mapped to '/disk/user/sub/foo.bar'. X X ROOT The (logical or physical) device specification is omitted X from the UNIX pathname, but the directory, name and type X are used to form a relative pathname. The file X 'DISK:`5BUSER.SUB`5DFOO.BAR' would be mapped to X 'user/sub/foo.bar'. X X/SCAN X X Instructs TAR not to use a temporary archive file for the purpose of X writing a file with variable-length records to an archive. See TAR X Caveats. X X/VERSION X X Instructs TAR to include the version number at the end of each file X name (excluding directories) and to write all versions of a file when X writing to an archive. Version numbers are usually excluded because X Unix does not have a file version mechanism, and the semi-colon (;), X used by VMS to denote a following version number, is interpreted by X Unix shells as a command separator. $ CALL UNPACK TAR.HLP;1 187990190 $ create 'f' Xtar`09tar.obj tar_list.obj tar_extract.obj tar_write.obj tarmsg.obj X$`09LINK?l/NOTRACE/EXE=TAR tar, tar_list, tar_extract, tar_write, tarmsg, - X`09 vclib_olb/LIB X Xtar.obj`09tar.pas tar.pen X$`09PASCALL ?c tar X Xtar.pen tar.pas X$`09PASCALL ?c tar X Xtar_list.obj tar_list.pas tar.pen X$`09PASCALL ?c tar_list X Xtar_extract.obj tar_extract.pas tar.pen X$`09PASCALL ?c tar_extract X Xtar_write.obj tar_write.pas tar.pen X$`09PASCALL ?c tar_write X Xtarmsg.obj tarmsg.msg X$`09MESSAGE tarmsg X Xcommand`09tar.cld X$`09SET COMMAND tar X Xcleanup X$`09pu/log tar.pas, tar_*.pas, tar.obj, tar_.obj, tarmsg.*, tar.exe $ CALL UNPACK TAR.MAKE;1 422205773 $ create 'f' X! MMS script for TAR, Tim Cook, 20-JUN-1989 X X.OBJ.EXE : X`09$(LINK) $(LINKFLAGS) $(MMS$SOURCE_LIST) X XLINKFLAGS = $(LINKFLAGS)/NOTRACE X XTAR_OBJECTS = tar.obj, tar_write.obj, tar_extract.obj, tar_list.obj, tarmsg. Vobj X XMISC_OBJECTS = vcdefs.obj, dss.obj, libiferr.obj, libitmlst.obj, libparse.ob Vj X XENVIRONMENTS = SYS$LIBRARY:STARLET.PEN, tar.pen, dss.pen, vcdefs.pen X XSTARLET_MLB = SYS$LIBRARY:STARLET.MLB X X! VAXCRTL.OPT should be a one-line file containing "SYS$SHARE:VAXCRTL/SHARE" Xtar.exe :`09$(TAR_OBJECTS), $(MISC_OBJECTS), vaxcrtl.opt X`09$(LINK) $(LINKFLAGS) $(TAR_OBJECTS), $(MISC_OBJECTS), vaxcrtl.opt/OPT X Xtar_write.obj :`09tar_write.pas, $(ENVIRONMENTS) X Xtar_extract.obj : tar_extract.pas, $(ENVIRONMENTS) X Xtar_list.obj :`09tar_list.pas, $(ENVIRONMENTS) X Xtar.obj, tar.pen : tar.pas, SYS$LIBRARY:STARLET.PEN, vcdefs.pen X`09$(PASCAL) $(PFLAGS) $(MMS$SOURCE) X Xdss.obj, dss.pen : dss.pas X`09$(PASCAL) $(PFLAGS) $(MMS$SOURCE) X Xvcdefs.obj, vcdefs.pen : vcdefs.pas, SYS$LIBRARY:STARLET.PEN X`09$(PASCAL) $(PFLAGS) $(MMS$SOURCE) X Xtarmsg.obj :`09tarmsg.msg X Xlibiferr.obj :`09libiferr.mar, $(STARLET_MLB) X Xlibitmlst.obj :`09libitmlst.mar, $(STARLET_MLB) X Xlibparse.obj :`09libparse.mar, $(STARLET_MLB) $ CALL UNPACK TAR.MMS;1 406675306 $ create 'f' X`7B TAR.PAS -`09Manipulates Unix 'tar' format archive files. X! X! Abstract:`09A proggie to work with Unix 'tar' (Tape ARchive) files on X!`09`09VMS. Reads and writes files to/from a file 'TAR_ARCHIVE' X!`09`09(if not specified differently on command line), so if the tape X!`09`09drive is MOUNTed/FOREIGN/RECORD=512/BLOCK=10240 (tar default), X!`09`09and pointed to by a logical 'TAR_ARCHIVE', tar will read from X!`09`09the tape-drive. X! X! Copyright:`09Copyright 1989,1990, Victoria College Computer Services. X!`09`09All rights reserved except those granted in the file X!`09`09AAAREADME.1ST, which is distributed with this file. X! X! Author:`09Tim Cook (timcc@viccol.edu.au) X`7D X X`5BINHERIT ('SYS$LIBRARY:STARLET', 'VCDEFS'), X ENVIRONMENT ('TAR'), X %INCLUDE 'TAR_VERSION.PAS'`5D X XPROGRAM tar (input, output, archive, archive_temp) ; X X X CONST X record_size = 512 ; X tar_record_size = record_size ; X VMS_block_size = 512 ; X tar_multi_block_count = 32 ;`09`7B Maximum 127 `7D X space = ' ' ; X null = chr (0) ; X lf = chr (10) ; X crlf = chr (10) + chr (13) ; X colon = ':' ; X dot = '.' ; X dollar = '$' ; X underscore = '_' ; X slash = '/' ; X dot_slash = dot + slash ; X X tar_archive_kt = 'TAR_ARCHIVE' ; X dot_tar_kt = '.TAR' ; X dot_dir_1_kt = '.DIR;1' ; X lnm$file_dev_kt = 'LNM$FILE_DEV' ; X sys$scratch_kt = 'SYS$SCRATCH:' ; X X archive_kt = 'ARCHIVE' ; X confirm_kt = 'CONFIRM' ; X filespec_kt = 'FILESPEC' ; X full_kt = 'FULL' ; X literal_kt = 'LITERAL' ; X map_mode_kt = 'MAP_MODE' ; X option_kt = 'OPTION' ; X output_kt = 'OUTPUT' ; X version_kt = 'VERSION' ; X scan_kt = 'SCAN' ; X X power_32_quad = 4294967296q0 ; `7B 2`5E32 `7D X UNIX_epoch_quad = 35067168q9 ; `7B 1-JAN-1970 in VMS time `7D X X VAR X X `7B VMS Error status codes for TAR `7D X X `7B Success `7D X tar__created, X tar__createdir, X tar__written, X tar__writdir, X tar__appended, X tar__appendir, X tar__totcreat, X tar__totwrite, X tar__totappend, X X `7B Informational `7D X tar__empty, X tar__hardlink, X tar__symlink, X X `7B Warning `7D X tar__nofiles, X tar__wrapped, X tar__rectoolong, X X `7B Error `7D X tar__errcredir, X X `7B Fatal `7D X tar__parse, X tar__openin, X tar__close, X tar__createrr, X tar__badheader, X tar__badarchive, X tar__errread, X tar__errwrite, X tar__invtimzon, X tar__internerr X : `5BEXTERNAL,VALUE`5D sts_type ; X X TYPE X fab_rfm_type = `5BBYTE`5D (undefined, fixed_length, variable_length, X variable_fixed_control, stream, stream_lf, stream_cr) ; X X oat_8 = RECORD `7B Octal Ascii, Terminated by space and null V `7D X value : PACKED ARRAY `5B1..6`5D OF char ; X fill_space : char ; X fill_null : char END ; X tar_record_type = PACKED RECORD CASE integer OF X0:( name : PACKED ARRAY `5B1..100`5D OF char ; X mode, uid, gid : oat_8 ; X siz, mtime : PACKED ARRAY `5B1..12`5D OF char ; X chksum : oat_8 ; X linkflag : char ; X linkname : PACKED ARRAY `5B1..100`5D OF char ; X filler : PACKED ARRAY `5B1..175`5D OF char) ; X1:( data : PACKED ARRAY `5B1..tar_record_size`5D OF char) END ; X X file_mode_type = RECORD CASE integer OF X0:( value : unsigned) ; X1:( mask : PACKED ARRAY `5B0..31`5D OF `5BBIT`5D boolean) END ; X X tar_record_ptr = `5Etar_record_type ; X tar_file_type = FILE OF tar_record_type ; X tar_block_type = ARRAY `5B1..20`5D OF tar_record_type ; X broken_time_type = lib_numtim_type ; X class_protection_type = PACKED RECORD X noread, nowrite, noexecute, nodelete : `5BBIT`5D boolean END ; X file_protection_type = PACKED RECORD X system, owner, group, world : class_protection_type END ; X fixed_string_100 = PACKED ARRAY `5B1..100`5D OF char ; X small_string = VARYING `5B50`5D OF char ; X medium_string = VARYING `5B256`5D OF char ; X filespec_type = medium_string ; `7B 1 > NAM$C_MAXRSS, but aligned V `7D X fixed_filespec_type = PACKED ARRAY `5B1..256`5D OF char ; X large_string = VARYING `5B4100`5D OF char ; X map_mode_type = (prefix_mode, absolute_mode, root_mode, X single_dir_mode) ; X match_node_type = RECORD X next : `5Ematch_node_type ; X literal : boolean ; X string : fixed_filespec_type END ; +-+-+-+-+-+-+-+- END OF PART 2 +-+-+-+-+-+-+-+-