From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  7-JUL-1989 10:27
To:	MRGATE::"ARISIA::EVERHART"
Subj:	VMS TAR  patch 1

Received: From KL.SRI.COM ([0.0.0.0]) by CRVAX.SRI.COM with TCP; Fri,  7 JUL 89 06:34:52 PDT
Received: from ucbvax.Berkeley.EDU by KL.SRI.COM with TCP; Fri, 7 Jul 89 06:11:32 PDT
Received: by ucbvax.Berkeley.EDU (5.61/1.37)
	id AA27698; Fri, 7 Jul 89 05:42:28 -0700
Received: from USENET by ucbvax.Berkeley.EDU with netnews
	for info-vax@kl.sri.com (info-vax@kl.sri.com)
	(contact usenet@ucbvax.Berkeley.EDU if you have questions)
Date: 7 Jul 89 21:46:23 GMT
From: murtoa.cs.mu.oz.au!viccol!timcc@uunet.uu.net  (Tim Cook)
Organization: Computer Services, Victoria College, Melbourne
Subject: VMS TAR  patch 1
Message-Id: <622@csv.viccol.edu.au>
Sender: info-vax-request@kl.sri.com
To: info-vax@kl.sri.com

This is Patch 1 to VMS TAR V1.0.  It creates VMS TAR V1.0-1.

This patch fixes the STARLET_PEN problem, the multiple compilation of TAR.PAS,
a problem where VMS TAR did not recognise directories in some TAR archives, and
applies a few other minor changes.  No new functionality is added.

To apply this patch, execute the included VMS_SHARE archive in the directory
where you have the ORIGINAL AS-POSTED (this is important) VMS TAR sources, then
execute the created file TAR-1_0-PATCH1.COM.

Any problems, send me a message (if you have trouble, post it, as I am
currently reading comp.os.vms twice daily, although I'm not sure it is arriving
with its usual regularity).

Tim Cook

$! ------------------ CUT HERE -----------------------
$!
$! This archive created by VMS_SHARE Version 7.0-006  1-MAY-1989
$!   On  7-JUL-1989 16:32   By Tim Cook (timcc@viccol.edu.au)
$!
$! This VMS_SHARE Written by:
$!    Andy Harper, Kings College London UK
$!
$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER
$! AND EXECUTE AS A COMMAND PROCEDURE  (  @name  )
$!
$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:
$!       1. TAR-1_0-PATCH1.COM;1
$!       2. AAAREADME.DIF;1
$!       3. TAR.DIF;1
$!       4. TARMSG.DIF;1
$!       5. TAR_EXTRACT.DIF;1
$!       6. TAR_LIST.DIF;1
$!       7. TAR_WRITE.DIF;1
$!
$f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))
$e="write sys$error  ""%UNPACK"", "
$w="write sys$output ""%UNPACK"", "
$ if f$trnlnm("SHARE_LOG") then $ w = "!"
$ if f$getsyi("version") .ges. "4.4" then $ goto START
$ e "-E-OLDVER, Must run at least VMS 4.4"
$ exit 44
$UNPACK: SUBROUTINE ! P1=filename, P2=checksum
$ if f$search(P1) .eqs. "" then $ goto file_absent
$ e "-W-EXISTS, File ''P1' exists. Skipped."
$ delete/nolog 'f'*
$ exit
$file_absent:
$ if f$parse(P1) .nes. "" then $ goto dirok
$ dn=f$parse(P1,,,"DIRECTORY")
$ w "-I-CREDIR, Creating directory ''dn'."
$ create/dir 'dn'
$ if $status then $ goto dirok
$ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped."
$ delete/nolog 'f'*
$ exit
$dirok:
$ w "-I-PROCESS, Processing file ''P1'."
$ define/user sys$output nl:
$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'
PROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(
SUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");
buff:=CREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(buff))
;LOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(
BEGINNING_OF(buff));g:=0;LOOP EXITIF MARK(NONE)=END_OF(buff);x:=
ERASE_CHARACTER(1);IF g = 0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x=
"V" THEN APPEND_LINE;MOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;
IF x="+" THEN g:=1;ERASE_LINE;ENDIF;ELSE IF x="-" THEN g:=0;ENDIF;ERASE_LINE;
ENDIF;ENDLOOP;p:="`";POSITION(BEGINNING_OF(buff));LOOP r:=SEARCH(p,FORWARD);
EXITIF r=0;POSITION(r);ERASE(r);COPY_TEXT(ASCII(INT(ERASE_CHARACTER(3))));
ENDLOOP;o:=GET_INFO(COMMAND_LINE,"output_file");WRITE_FILE(buff,o);
ENDPROCEDURE;Unpacker;EXIT;
$ delete/nolog 'f'*
$ CHECKSUM 'P1'
$ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT
$ e "-E-CHKSMFAIL, Checksum of ''P1' failed."
$ ENDSUBROUTINE
$START:
$ create/nolog 'f'
X$ SET COMMAND SYS$INPUT:
Xdefine verb SUMSLP`009! Equivalent to a properly defined EDIT/SUM
X   image SUMSLP
X   parameter p1, label=INPUT
X   qualifier LISTING
X      value (type=$outfile)
X   qualifier OUTPUT
X      default
X      value (type=$outfile)
X   qualifier HEADER
X   qualifier UPDATE
X      placement=positional
X      value (list, type=$infile)
X$ SUMSLP TAR.PAS/UPDATE=TAR.DIF
X$ SUMSLP TAR_EXTRACT.PAS/UPDATE=TAR_EXTRACT.DIF
X$ SUMSLP TAR_WRITE.PAS/UPDATE=TAR_WRITE.DIF
X$ SUMSLP TAR_LIST.PAS/UPDATE=TAR_LIST.DIF
X$ SUMSLP TARMSG.MSG/UPDATE=TARMSG.DIF
X$ SUMSLP AAAREADME.1ST/UPDATE=AAAREADME.DIF
X$ WRITE SYS$OUTPUT "Ignore any %SORT-W-BAD_ORDER messages that follow"
X$ MERGE /NODUPLICATES BUILD_TAR.COM BUILD_TAR.COM
X$ WRITE SYS$OUTPUT "VMS TAR V1.0-1 ready to compile"
$ CALL UNPACK TAR-1_0-PATCH1.COM;1 593781760
$ create/nolog 'f'
X-   23,   23
X-   51
XCopyright:
X
XVMS TAR is (c) Copyright 1989 Victoria College Computer Services, as it was
Xwritten on their time, but as I don't see them making a quid on it, the righ
Vt
Xto redistribute and reuse any of its code for any non-commercial pupose is
Xhereby granted.  For your conscience' sake, you should always credit the
Xoriginal author in reused source.
X/
$ CALL UNPACK AAAREADME.DIF;1 1282879793
$ create/nolog 'f'
X-   14,   17
X! Release:`009Version 1.0-1
X!___________________________________________________________________________
V_`125
X
X`091INHERIT ('SYS$LIBRARY:STARLET', 'VCDEFS'),
X-   76
X      tar__errwrite,
X-  762
X         IF type_ = '.' THEN
X            type_ := '' ;
X-  888,  888
X                  bad_header (header_record)
X            ELSE
X               IF (file_spec`091file_spec.length`093 = '/') AND (file_size =
V 0) THEN
X                  directory := true ;
X/
$ CALL UNPACK TAR.DIF;1 1585138736
$ create/nolog 'f'
X-   40
XERRWRITE`009<error writing !AS> /FAO=1
X/
$ CALL UNPACK TARMSG.DIF;1 1261050830
$ create/nolog 'f'
X-    1,    1
X`091INHERIT ('SYS$LIBRARY:STARLET', 'VCDEFS', 'TAR')`093
X-   33,   33
X      VAR file_name : VARYING `091n1`093 OF char ;
X-   66
X            file_name := substr (output_result_spec, 1, out_nam.NAM$B_RSL) ;
X-   81,   81
X            LIB$STOP (tar__createrr, 1, %STDESCR (parsed_spec), status,
X-  186,  186
X               i, status : integer ;
X-  205,  205
X                        status := $PUT (out_rab) ;
X                        IF failure (status) THEN
X                           LIB$STOP (tar__errwrite, 1, %STDESCR (VMS_spec),
X                              out_rab.RAB$L_STS, out_rab.RAB$L_STV) ;
X-  210,  210
X                           status := $PUT (out_rab) ;
X                           IF failure (status) THEN
X                              LIB$STOP (tar__errwrite, 1, %STDESCR (VMS_spec
V),
X                                 out_rab.RAB$L_STS, out_rab.RAB$L_STV) ;
X-  218,  218
X                              status := $PUT (out_rab) ;
X                              IF failure (status) THEN
X                                 LIB$STOP (tar__errwrite, 1,
X                                    %STDESCR (VMS_spec), out_rab.RAB$L_STS,
X                                    out_rab.RAB$L_STV) ;
X-  242,  243
X                     VMS_spec := VMS_filespec (file_spec, absolute) ;
X                     open_output_file (VMS_spec, file_size) ;
X/
$ CALL UNPACK TAR_EXTRACT.DIF;1 1347510695
$ create/nolog 'f'
X-    1,    1
X`091INHERIT ('SYS$LIBRARY:STARLET', 'VCDEFS', 'TAR')`093
X/
$ CALL UNPACK TAR_LIST.DIF;1 1347899660
$ create/nolog 'f'
X-    1,    1
X`091INHERIT ('SYS$LIBRARY:STARLET', 'VCDEFS', 'TAR')`093
X-  387,  387
X               LIB$STOP (tar__errread, 3, 0, 0, %STDESCR (current_file),
X-  400,  400
X               LIB$STOP (tar__errread, 3, 0, 0, %STDESCR (current_file),
X-  409,  409
X               LIB$STOP (tar__errread, 3, 0, 0, %STDESCR (current_file),
X-  418,  418
X               LIB$STOP (tar__errread, 3, 0, 0, %STDESCR (current_file),
X-  438,  438
X               LIB$STOP (tar__errread, 3, 0, 0, %STDESCR (current_file),
X-  490,  490
X                  LIB$STOP (tar__close, 1, %STDESCR (current_file),
X/
$ CALL UNPACK TAR_WRITE.DIF;1 1600797358
$ EXIT

