diff options
| -rw-r--r-- | usr.bin/gzip/gzip.1 | 14 | ||||
| -rw-r--r-- | usr.bin/gzip/unbzip2.c | 9 | ||||
| -rw-r--r-- | usr.bin/gzip/znew | 9 |
3 files changed, 18 insertions, 14 deletions
diff --git a/usr.bin/gzip/gzip.1 b/usr.bin/gzip/gzip.1 index a50df2b8746e..73e63e0fa768 100644 --- a/usr.bin/gzip/gzip.1 +++ b/usr.bin/gzip/gzip.1 @@ -27,7 +27,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd June 6, 2007 +.Dd June 30, 2008 .Dt GZIP 1 .Os .Sh NAME @@ -72,10 +72,22 @@ When in compression mode, each will be replaced with another file with the suffix, set by the .Fl S Ar suffix option, added, if possible. +.Pp In decompression mode, each .Ar file will be checked for existence, as will the file with the suffix added. +Each +.Ar file +argument must contain a separate complete archive; +when multiple +.Ar files +are indicated, each is decompressed in turn. +.Pp +In the case of +.Nm gzcat +the resulting data is then concatenated in the manner of +.Xr cat 1 . .Pp If invoked as .Nm gunzip diff --git a/usr.bin/gzip/unbzip2.c b/usr.bin/gzip/unbzip2.c index 1f708c9a42fc..e8990d7b984f 100644 --- a/usr.bin/gzip/unbzip2.c +++ b/usr.bin/gzip/unbzip2.c @@ -1,4 +1,4 @@ -/* $NetBSD: unbzip2.c,v 1.10 2006/10/03 08:20:03 simonb Exp $ */ +/* $NetBSD: unbzip2.c,v 1.11 2008/04/28 20:24:13 martin Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -15,13 +15,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the NetBSD - * Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED diff --git a/usr.bin/gzip/znew b/usr.bin/gzip/znew index e3e4cce29c3a..27bed94274a6 100644 --- a/usr.bin/gzip/znew +++ b/usr.bin/gzip/znew @@ -1,6 +1,6 @@ -#!/bin/ksh - +#!/bin/sh - # -# $NetBSD: znew,v 1.2 2003/12/28 12:43:43 wiz Exp $ +# $NetBSD: znew,v 1.3 2008/04/27 09:07:13 nakayama Exp $ # $OpenBSD: znew,v 1.2 2003/08/05 18:22:17 deraadt Exp $ # #- @@ -60,8 +60,7 @@ process () { trap 'rm -f "$tmp"; exit 1' HUP INT QUIT PIPE TERM # Do the actual work, producing a file "$tmp" - if uncompress -f -c < "$filez" | gzip -f $gzipflags -o "$tmp"; then - + if uncompress -f -c < "$filez" | gzip -f -c $gzipflags > "$tmp"; then if test $kflag -eq 1 && smaller "$filez" "$tmp"; then echo -n "$prog: $filez is smaller than $filegz" echo "; keeping it" @@ -120,7 +119,7 @@ while getopts :ftv9PK i; do esac done -shift OPTIND-1 +shift $((OPTIND - 1)) if test $# -eq 0; then echo "$usage" |
