head	1.7;
access;
symbols
	RELENG_6_4_0_RELEASE:1.6.14.1
	RELENG_6_4:1.6.14.1.0.4
	RELENG_6_4_BP:1.6.14.1
	RELENG_6_3_0_RELEASE:1.6.14.1
	RELENG_6_3:1.6.14.1.0.2
	RELENG_6_3_BP:1.6.14.1
	RELENG_6_2_0_RELEASE:1.6
	RELENG_6_2:1.6.0.22
	RELENG_6_2_BP:1.6
	RELENG_5_5_0_RELEASE:1.6
	RELENG_5_5:1.6.0.20
	RELENG_5_5_BP:1.6
	RELENG_6_1_0_RELEASE:1.6
	RELENG_6_1:1.6.0.18
	RELENG_6_1_BP:1.6
	RELENG_6_0_0_RELEASE:1.6
	RELENG_6_0:1.6.0.16
	RELENG_6_0_BP:1.6
	RELENG_6:1.6.0.14
	RELENG_6_BP:1.6
	RELENG_5_4_0_RELEASE:1.6
	RELENG_5_4:1.6.0.12
	RELENG_5_4_BP:1.6
	RELENG_4_11_0_RELEASE:1.5.2.1
	RELENG_4_11:1.5.2.1.0.12
	RELENG_4_11_BP:1.5.2.1
	RELENG_5_3_0_RELEASE:1.6
	RELENG_5_3:1.6.0.10
	RELENG_5_3_BP:1.6
	RELENG_5:1.6.0.8
	RELENG_5_BP:1.6
	RELENG_4_10_0_RELEASE:1.5.2.1
	RELENG_4_10:1.5.2.1.0.10
	RELENG_4_10_BP:1.5.2.1
	RELENG_5_2_1_RELEASE:1.6
	RELENG_5_2_0_RELEASE:1.6
	RELENG_5_2:1.6.0.6
	RELENG_5_2_BP:1.6
	RELENG_4_9_0_RELEASE:1.5.2.1
	RELENG_4_9:1.5.2.1.0.8
	RELENG_4_9_BP:1.5.2.1
	RELENG_5_1_0_RELEASE:1.6
	RELENG_5_1:1.6.0.4
	RELENG_5_1_BP:1.6
	RELENG_4_8_0_RELEASE:1.5.2.1
	RELENG_4_8:1.5.2.1.0.6
	RELENG_4_8_BP:1.5.2.1
	RELENG_5_0_0_RELEASE:1.6
	RELENG_5_0:1.6.0.2
	RELENG_5_0_BP:1.6
	RELENG_4_7_0_RELEASE:1.5.2.1
	RELENG_4_7:1.5.2.1.0.4
	RELENG_4_7_BP:1.5.2.1
	RELENG_4_6_2_RELEASE:1.5.2.1
	RELENG_4_6_1_RELEASE:1.5.2.1
	RELENG_4_6_0_RELEASE:1.5.2.1
	RELENG_4_6:1.5.2.1.0.2
	RELENG_4_6_BP:1.5.2.1
	RELENG_4_5_0_RELEASE:1.5.8.1
	RELENG_4_5:1.5.0.8
	RELENG_4_5_BP:1.5
	RELENG_4_4_0_RELEASE:1.5
	RELENG_4_4:1.5.0.6
	RELENG_4_4_BP:1.5
	RELENG_4_3_0_RELEASE:1.5
	RELENG_4_3:1.5.0.4
	RELENG_4_3_BP:1.5
	RELENG_4_2_0_RELEASE:1.5
	RELENG_4_1_1_RELEASE:1.5
	PRE_SMPNG:1.5
	RELENG_4_1_0_RELEASE:1.5
	RELENG_3_5_0_RELEASE:1.3.12.2
	RELENG_4_0_0_RELEASE:1.5
	RELENG_4:1.5.0.2
	RELENG_4_BP:1.5
	RELENG_3_4_0_RELEASE:1.3.12.2
	RELENG_3_3_0_RELEASE:1.3.12.2
	RELENG_3_2_PAO:1.3.0.14
	RELENG_3_2_PAO_BP:1.3
	RELENG_3_2_0_RELEASE:1.3
	RELENG_3_1_0_RELEASE:1.3
	RELENG_3:1.3.0.12
	RELENG_3_BP:1.3
	RELENG_2_2_8_RELEASE:1.3
	RELENG_3_0_0_RELEASE:1.3
	RELENG_2_2_7_RELEASE:1.3
	RELENG_2_2_6_RELEASE:1.3
	RELENG_2_2_5_RELEASE:1.3
	RELENG_2_2_2_RELEASE:1.3
	RELENG_2_2_1_RELEASE:1.3
	RELENG_2_2_0_RELEASE:1.3
	RELENG_2_1_7_RELEASE:1.3
	RELENG_2_1_6_1_RELEASE:1.3
	RELENG_2_1_6_RELEASE:1.3
	RELENG_2_2:1.3.0.10
	RELENG_2_2_BP:1.3
	RELENG_2_1_5_RELEASE:1.3
	RELENG_2_1_0_RELEASE:1.3
	RELENG_2_1_0:1.3.0.8
	RELENG_2_1_0_BP:1.3
	RELENG_2_0_5_RELEASE:1.3
	RELENG_2_0_5:1.3.0.6
	RELENG_2_0_5_BP:1.3
	RELENG_2_0_5_ALPHA:1.3
	RELEASE_2_0:1.3
	BETA_2_0:1.3
	ALPHA_2_0:1.3.0.4
	MOVED_NEWCVS:1.3
	FINAL_1_1_5:1.3
	ALPHA_1_1_5:1.3
	FINAL_1_1:1.3
	GAMMA_1_1:1.3
	BETA_1_1:1.3.0.2
	BP_BETA_1_1:1.3
	FINAL_1_0:1.3
	EPSILON_1_0:1.2
	GAMMA_1_0:1.2
	BETA_1_0:1.2
	ALPHA_1_0:1.2
	GZIP_1_1:1.1.1.1
	GNU:1.1.1;
locks; strict;
comment	@# @;


1.7
date	2007.01.31.03.44.42;	author delphij;	state dead;
branches;
next	1.6;

1.6
date	2002.01.25.15.02.01;	author nectar;	state Exp;
branches
	1.6.14.1;
next	1.5;

1.5
date	99.08.27.23.35.54;	author peter;	state Exp;
branches
	1.5.2.1
	1.5.4.1
	1.5.6.1
	1.5.8.1;
next	1.4;

1.4
date	99.05.28.13.23.18;	author kris;	state Exp;
branches;
next	1.3;

1.3
date	93.10.14.00.33.29;	author nate;	state Exp;
branches
	1.3.12.1;
next	1.2;

1.2
date	93.06.19.00.22.40;	author nate;	state Exp;
branches;
next	1.1;

1.1
date	93.06.18.18.39.39;	author nate;	state Exp;
branches
	1.1.1.1;
next	;

1.6.14.1
date	2007.02.20.08.33.30;	author delphij;	state dead;
branches;
next	;

1.5.2.1
date	2002.01.28.01.21.12;	author nectar;	state Exp;
branches;
next	1.5.2.2;

1.5.2.2
date	2012.11.17.07.23.06;	author svnexp;	state Exp;
branches;
next	;

1.5.4.1
date	2002.01.28.01.29.22;	author nectar;	state Exp;
branches;
next	;

1.5.6.1
date	2002.01.28.01.28.24;	author nectar;	state Exp;
branches;
next	;

1.5.8.1
date	2002.01.28.01.26.09;	author nectar;	state Exp;
branches;
next	;

1.3.12.1
date	99.06.07.14.07.29;	author kris;	state Exp;
branches;
next	1.3.12.2;

1.3.12.2
date	99.08.29.14.33.32;	author peter;	state Exp;
branches;
next	;

1.1.1.1
date	93.06.18.18.39.40;	author nate;	state Exp;
branches;
next	;


desc
@@


1.7
log
@Remove GNU gzip left-offs, they are no longer necessary.
@
text
@#!/bin/sh
# sh is buggy on RS/6000 AIX 3.2. Replace above line with #!/bin/ksh

# Zcmp and zdiff are used to invoke the cmp or the  diff  pro-
# gram  on compressed files.  All options specified are passed
# directly to cmp or diff.  If only 1 file is specified,  then
# the  files  compared  are file1 and an uncompressed file1.gz.
# If two files are specified, then they are  uncompressed  (if
# necessary) and fed to cmp or diff.  The exit status from cmp
# or diff is preserved.
#
# $FreeBSD: src/gnu/usr.bin/gzip/zdiff,v 1.6 2002/01/25 15:02:01 nectar Exp $

prog=`echo $0 | sed 's|.*/||'`
case "$prog" in
  *cmp) comp=${CMP-cmp}   ;;
  *)    comp=${DIFF-diff} ;;
esac

OPTIONS=
FILES=
for ARG
do
    case "$ARG" in
    -*)	OPTIONS="$OPTIONS $ARG";;
     *)	if test -f "$ARG"; then
            FILES="$FILES $ARG"
        else
            echo "${prog}: $ARG not found or not a regular file"
	    exit 1
        fi ;;
    esac
done
if test -z "$FILES"; then
	echo "Usage: $prog [${comp}_options] file [file]"
	exit 1
fi
set $FILES
if test $# -eq 1; then
	FILE=`echo "$1" | sed 's/[-.][zZtga]*$//'`
	gzip -cd "$1" | $comp $OPTIONS - "$FILE"
	STAT="$?"

elif test $# -eq 2; then
	case "$1" in
        *[-.]gz* | *[-.][zZ] | *.t[ga]z)
                case "$2" in
	        *[-.]gz* | *[-.][zZ] | *.t[ga]z)
			F=`echo "$2" | sed 's|.*/||;s|[-.][zZtga]*||'`
                        tmp=`mktemp -t "$F"`
                        gzip -cdfq "$2" > "$tmp"
                        gzip -cdfq "$1" | $comp $OPTIONS - "$tmp"
                        STAT="$?"
			/bin/rm -f "$tmp";;

                *)      gzip -cdfq "$1" | $comp $OPTIONS - "$2"
                        STAT="$?";;
                esac;;
        *)      case "$2" in
	        *[-.]gz* | *[-.][zZ] | *.t[ga]z)
                        gzip -cdfq "$2" | $comp $OPTIONS "$1" -
                        STAT="$?";;
                *)      $comp $OPTIONS "$1" "$2"
                        STAT="$?";;
                esac;;
	esac
        exit "$STAT"
else
	echo "Usage: $prog [${comp}_options] file [file]"
	exit 1
fi
@


1.6
log
@Use mktemp(1) when creating temporary files.
@
text
@d12 1
a12 1
# $FreeBSD$
@


1.6.14.1
log
@MFC: Replace gzip(1) with the BSD licensed version found in -HEAD.

Discussed with:	re, so, portmgr (kris)

All bugs are mine.
@
text
@d12 1
a12 1
# $FreeBSD: src/gnu/usr.bin/gzip/zdiff,v 1.6 2002/01/25 15:02:01 nectar Exp $
@


1.5
log
@$Id$ -> $FreeBSD$
@
text
@d50 3
a52 2
                        gzip -cdfq "$2" > /tmp/"$F".$$
                        gzip -cdfq "$1" | $comp $OPTIONS - /tmp/"$F".$$
d54 1
a54 1
			/bin/rm -f /tmp/"$F".$$;;
@


1.5.4.1
log
@MFC 1.6: Use mktemp(1) when creating temporary files.
@
text
@d50 2
a51 3
                        tmp=`mktemp -t "$F"`
                        gzip -cdfq "$2" > "$tmp"
                        gzip -cdfq "$1" | $comp $OPTIONS - "$tmp"
d53 1
a53 1
			/bin/rm -f "$tmp";;
@


1.5.6.1
log
@MFC 1.6: Use mktemp(1) when creating temporary files.
@
text
@d50 2
a51 3
                        tmp=`mktemp -t "$F"`
                        gzip -cdfq "$2" > "$tmp"
                        gzip -cdfq "$1" | $comp $OPTIONS - "$tmp"
d53 1
a53 1
			/bin/rm -f "$tmp";;
@


1.5.8.1
log
@MFC 1.6: Use mktemp(1) when creating temporary files.

Approved by:	re
@
text
@d50 2
a51 3
                        tmp=`mktemp -t "$F"`
                        gzip -cdfq "$2" > "$tmp"
                        gzip -cdfq "$1" | $comp $OPTIONS - "$tmp"
d53 1
a53 1
			/bin/rm -f "$tmp";;
@


1.5.2.1
log
@MFC 1.6: Use mktemp(1) when creating temporary files.

Approved by:	re
@
text
@d50 2
a51 3
                        tmp=`mktemp -t "$F"`
                        gzip -cdfq "$2" > "$tmp"
                        gzip -cdfq "$1" | $comp $OPTIONS - "$tmp"
d53 1
a53 1
			/bin/rm -f "$tmp";;
@


1.5.2.2
log
@Switch importer
@
text
@d12 1
a12 1
# $FreeBSD: stable/4/gnu/usr.bin/gzip/zdiff 89893 2002-01-28 01:26:09Z nectar $
@


1.4
log
@Fixes from OpenBSD:

Add $Id$
Removes temp file exploits in gzexe (predictable filenames)
Fixes some typos
Fixes a buffer overrun in gzip -S
Don't prepend /usr/local/bin to path in scripts
Correct location of /usr/share/misc/termcap

Obtained from:	OpenBSD
@
text
@d12 1
a12 1
# $Id$
@


1.3
log
@Updated gzip from version 1.2.2 to 1.2.4 due to popular demand
@
text
@d11 2
a13 1
PATH="/usr/local/bin:$PATH"; export PATH
@


1.3.12.1
log
@MFC: Fixes from OpenBSD:

Add $Id$
Removes temp file exploits in gzexe (predictable filenames)
Fixes some typos
Fixes a buffer overrun in gzip -S
Don't prepend /usr/local/bin to path in scripts
Correct location of /usr/share/misc/termcap
@
text
@a10 2
#
# $Id: zdiff,v 1.4 1999/05/28 13:23:18 kris Exp $
d12 1
@


1.3.12.2
log
@$Id$ -> $FreeBSD$
@
text
@d12 1
a12 1
# $FreeBSD$
@


1.2
log
@Updated gzip from 1.1 to 1.2.2
@
text
@d45 1
a45 1
        *[-.]gz | *[-.][zZ] | *.t[ga]z)
d47 4
a50 4
	        *[-.]gz | *[-.][zZ] | *.t[ga]z)
			F=`echo "$2" | sed 's|.*/||;s|[-.][zZtga]*$||'`
                        gzip -cd "$2" > /tmp/"$F".$$
                        gzip -cd "$1" | $comp $OPTIONS - /tmp/"$F".$$
d54 1
a54 1
                *)      gzip -cd "$1" | $comp $OPTIONS - "$2"
d58 2
a59 2
	        *[-.]gz | *[-.][zZ] | *.t[ga]z)
                        gzip -cd "$2" | $comp $OPTIONS "$1" -
@


1.1
log
@Initial revision
@
text
@d2 1
d12 1
@


1.1.1.1
log
@Gzip 1.1
@
text
@@
