CVS commit: [netbsd-6] src/usr.bin/gzip

2015-02-27 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Feb 28 05:38:38 UTC 2015

Modified Files:
src/usr.bin/gzip [netbsd-6]: gzip.1 gzip.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1261):
usr.bin/gzip/gzip.1: revision 1.24
usr.bin/gzip/gzip.c: revision 1.107
do not use directory paths present in gzip files with the -N flag,
similar to the problem reported in pigz.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.21.4.1 src/usr.bin/gzip/gzip.1
cvs rdiff -u -r1.105 -r1.105.4.1 src/usr.bin/gzip/gzip.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/gzip/gzip.1
diff -u src/usr.bin/gzip/gzip.1:1.21 src/usr.bin/gzip/gzip.1:1.21.4.1
--- src/usr.bin/gzip/gzip.1:1.21	Sun Jun 19 02:22:36 2011
+++ src/usr.bin/gzip/gzip.1	Sat Feb 28 05:38:37 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: gzip.1,v 1.21 2011/06/19 02:22:36 christos Exp $
+.\	$NetBSD: gzip.1,v 1.21.4.1 2015/02/28 05:38:37 snj Exp $
 .\
 .\ Copyright (c) 1997, 2003, 2004 Matthew R. Green
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd June 18, 2011
+.Dd January 13, 2015
 .Dt GZIP 1
 .Os
 .Sh NAME
@@ -191,7 +191,7 @@ program for
 This manual documents
 .Nx
 .Nm
-version 20040427.
+version 20150113.
 .Sh AUTHORS
 This implementation of
 .Nm

Index: src/usr.bin/gzip/gzip.c
diff -u src/usr.bin/gzip/gzip.c:1.105 src/usr.bin/gzip/gzip.c:1.105.4.1
--- src/usr.bin/gzip/gzip.c:1.105	Tue Aug 30 23:06:00 2011
+++ src/usr.bin/gzip/gzip.c	Sat Feb 28 05:38:37 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: gzip.c,v 1.105 2011/08/30 23:06:00 joerg Exp $	*/
+/*	$NetBSD: gzip.c,v 1.105.4.1 2015/02/28 05:38:37 snj Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green
@@ -30,7 +30,7 @@
 #ifndef lint
 __COPYRIGHT(@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006\
  Matthew R. Green.  All rights reserved.);
-__RCSID($NetBSD: gzip.c,v 1.105 2011/08/30 23:06:00 joerg Exp $);
+__RCSID($NetBSD: gzip.c,v 1.105.4.1 2015/02/28 05:38:37 snj Exp $);
 #endif /* not lint */
 
 /*
@@ -160,7 +160,7 @@ static suffixes_t suffixes[] = {
 #define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0])
 #define SUFFIX_MAXLEN	30
 
-static	const char	gzip_version[] = NetBSD gzip 20101018;
+static	const char	gzip_version[] = NetBSD gzip 20150113;
 
 static	int	cflag;			/* stdout mode */
 static	int	dflag;			/* decompress mode */
@@ -1311,7 +1311,7 @@ file_uncompress(char *file, char *outfil
 #ifndef SMALL
 	ssize_t rv;
 	time_t timestamp = 0;
-	unsigned char name[PATH_MAX + 1];
+	char name[PATH_MAX + 1];
 #endif
 
 	/* gather the old name info */
@@ -1372,15 +1372,24 @@ file_uncompress(char *file, char *outfil
 goto lose;
 			}
 			if (name[0] != 0) {
+char *dp, *nf;
+
+/* strip saved directory name */
+nf = strrchr(name, '/');
+if (nf == NULL)
+	nf = name;
+else
+	nf++;
+
 /* preserve original directory name */
-char *dp = strrchr(file, '/');
+dp = strrchr(file, '/');
 if (dp == NULL)
 	dp = file;
 else
 	dp++;
 snprintf(outfile, outsize, %.*s%.*s,
 		(int) (dp - file), 
-		file, (int) rbytes, name);
+		file, (int) rbytes, nf);
 			}
 		}
 	}



CVS commit: [netbsd-6] src/usr.bin/gzip

2013-12-09 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Dec  9 20:24:21 UTC 2013

Modified Files:
src/usr.bin/gzip [netbsd-6]: zmore

Log Message:
Pullup the following revisions, requested by pettai in ticket #982:
usr.bin/gzip/zmore: revision 1.5
fix == compatibility problem


To generate a diff of this commit:
cvs rdiff -u -r1.3.52.1 -r1.3.52.2 src/usr.bin/gzip/zmore

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/gzip/zmore
diff -u src/usr.bin/gzip/zmore:1.3.52.1 src/usr.bin/gzip/zmore:1.3.52.2
--- src/usr.bin/gzip/zmore:1.3.52.1	Thu Dec  5 18:44:26 2013
+++ src/usr.bin/gzip/zmore	Mon Dec  9 20:24:21 2013
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-# $NetBSD: zmore,v 1.3.52.1 2013/12/05 18:44:26 bouyer Exp $
+# $NetBSD: zmore,v 1.3.52.2 2013/12/09 20:24:21 bouyer Exp $
 #
 # $OpenBSD: zmore,v 1.6 2008/08/20 09:22:02 mpf Exp $
 #
@@ -41,7 +41,7 @@ while test $# -ne 0; do
 	esac
 done
 
-if [ `basename $0` == zless ] ; then
+if [ `basename $0` = zless ] ; then
 	pager=${PAGER-less}
 else
 	pager=${PAGER-more}
@@ -49,13 +49,13 @@ fi
 
 # No files means read from stdin
 if [ $# -eq 0 ]; then
-	gzip -cdfq 21 | ${PAGER-more} $flags
+	gzip -cdfq 21 | $pager $flags
 	exit 0
 fi
 
 oterm=`stty -g 2/dev/null`
 while test $# -ne 0; do
-	gzip -cdfq $1 21 | ${PAGER-more} $flags
+	gzip -cdfq $1 21 | $pager $flags
 	prev=$1
 	shift
 	if tty -s  test -n $oterm -a $# -gt 0; then



CVS commit: [netbsd-6] src/usr.bin/gzip

2013-12-05 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Dec  5 18:44:26 UTC 2013

Modified Files:
src/usr.bin/gzip [netbsd-6]: zmore

Log Message:
Pull up following revision(s) (requested by pettai in ticket #982):
distrib/sets/lists/base/mi: revision 1.1049
distrib/sets/lists/man/mi: revision 1.1449
usr.bin/gzip/Makefile: revision 1.17
usr.bin/gzip/Makefile: revision 1.18
usr.bin/gzip/zmore: revision 1.4
usr.bin/gzip/zmore.1: revision 1.4
Added zless(1) - comes in the lastest version of zmore(1) from OpenBSD
(OKed by tron@)
Add zfgrep that fell off from last update


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.52.1 src/usr.bin/gzip/zmore

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/gzip/zmore
diff -u src/usr.bin/gzip/zmore:1.3 src/usr.bin/gzip/zmore:1.3.52.1
--- src/usr.bin/gzip/zmore:1.3	Mon Mar 29 09:59:42 2004
+++ src/usr.bin/gzip/zmore	Thu Dec  5 18:44:26 2013
@@ -1,8 +1,8 @@
 #!/bin/sh -
 #
-# $NetBSD: zmore,v 1.3 2004/03/29 09:59:42 wiz Exp $
+# $NetBSD: zmore,v 1.3.52.1 2013/12/05 18:44:26 bouyer Exp $
 #
-# $OpenBSD: zmore,v 1.4 2003/07/29 07:42:45 otto Exp $
+# $OpenBSD: zmore,v 1.6 2008/08/20 09:22:02 mpf Exp $
 #
 # Copyright (c) 2003 Todd C. Miller todd.mil...@courtesan.com
 #
@@ -41,6 +41,12 @@ while test $# -ne 0; do
 	esac
 done
 
+if [ `basename $0` == zless ] ; then
+	pager=${PAGER-less}
+else
+	pager=${PAGER-more}
+fi
+
 # No files means read from stdin
 if [ $# -eq 0 ]; then
 	gzip -cdfq 21 | ${PAGER-more} $flags