Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 8 Nov 2014 00:51:31 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r274262 - stable/10/usr.bin/gzip
Message-ID:  <201411080051.sA80pVGt065532@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Sat Nov  8 00:51:31 2014
New Revision: 274262
URL: https://svnweb.freebsd.org/changeset/base/274262

Log:
  MFC r273507: Sync with NetBSD.

Modified:
  stable/10/usr.bin/gzip/Makefile
  stable/10/usr.bin/gzip/gzip.1
  stable/10/usr.bin/gzip/gzip.c
  stable/10/usr.bin/gzip/zmore
  stable/10/usr.bin/gzip/zmore.1
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.bin/gzip/Makefile
==============================================================================
--- stable/10/usr.bin/gzip/Makefile	Sat Nov  8 00:49:45 2014	(r274261)
+++ stable/10/usr.bin/gzip/Makefile	Sat Nov  8 00:51:31 2014	(r274262)
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.16 2011/06/21 13:25:45 joerg Exp $
+#	$NetBSD: Makefile,v 1.18 2013/11/13 11:12:24 pettai Exp $
 # $FreeBSD$
 
 .include <bsd.own.mk>
@@ -21,7 +21,8 @@ SCRIPTS=	gzexe zdiff zforce zmore znew
 MLINKS+=	gzip.1 gunzip.1 \
 		gzip.1 gzcat.1 \
 		gzip.1 zcat.1 \
-		zdiff.1 zcmp.1
+		zdiff.1 zcmp.1 \
+		zmore.1 zless.1
 
 LINKS+=		${BINDIR}/gzip ${BINDIR}/gunzip \
 		${BINDIR}/gzip ${BINDIR}/gzcat \

Modified: stable/10/usr.bin/gzip/gzip.1
==============================================================================
--- stable/10/usr.bin/gzip/gzip.1	Sat Nov  8 00:49:45 2014	(r274261)
+++ stable/10/usr.bin/gzip/gzip.1	Sat Nov  8 00:51:31 2014	(r274262)
@@ -1,4 +1,4 @@
-.\"	$NetBSD: gzip.1,v 1.21 2011/06/19 02:22:36 christos Exp $
+.\"	$NetBSD: gzip.1,v 1.23 2014/03/18 18:20:45 riastradh Exp $
 .\"
 .\" Copyright (c) 1997, 2003, 2004 Matthew R. Green
 .\" All rights reserved.

Modified: stable/10/usr.bin/gzip/gzip.c
==============================================================================
--- stable/10/usr.bin/gzip/gzip.c	Sat Nov  8 00:49:45 2014	(r274261)
+++ stable/10/usr.bin/gzip/gzip.c	Sat Nov  8 00:51:31 2014	(r274262)
@@ -1,4 +1,4 @@
-/*	$NetBSD: gzip.c,v 1.105 2011/08/30 23:06:00 joerg Exp $	*/
+/*	$NetBSD: gzip.c,v 1.106 2014/10/18 08:33:30 snj Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green
@@ -158,7 +158,7 @@ static suffixes_t suffixes[] = {
 #define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0])
 #define SUFFIX_MAXLEN	30
 
-static	const char	gzip_version[] = "FreeBSD gzip 20111009";
+static	const char	gzip_version[] = "FreeBSD gzip 20141022";
 
 #ifndef SMALL
 static	const char	gzip_copyright[] = \
@@ -1769,7 +1769,7 @@ handle_stdout(void)
 		return;
 	}
 #endif
-	/* If stdin is a file use it's mtime, otherwise use current time */
+	/* If stdin is a file use its mtime, otherwise use current time */
 	ret = fstat(STDIN_FILENO, &sb);
 
 #ifndef SMALL
@@ -2110,7 +2110,7 @@ static void
 display_license(void)
 {
 
-	fprintf(stderr, "%s (based on NetBSD gzip 20111009)\n", gzip_version);
+	fprintf(stderr, "%s (based on NetBSD gzip 20141018)\n", gzip_version);
 	fprintf(stderr, "%s\n", gzip_copyright);
 	exit(0);
 }

Modified: stable/10/usr.bin/gzip/zmore
==============================================================================
--- stable/10/usr.bin/gzip/zmore	Sat Nov  8 00:49:45 2014	(r274261)
+++ stable/10/usr.bin/gzip/zmore	Sat Nov  8 00:51:31 2014	(r274262)
@@ -1,7 +1,8 @@
 #!/bin/sh -
 #
-# $NetBSD: zmore,v 1.3 2004/03/29 09:59:42 wiz Exp $
-# $OpenBSD: zmore,v 1.4 2003/07/29 07:42:45 otto Exp $
+# $NetBSD: zmore,v 1.5 2013/12/06 13:33:15 pettai Exp $
+#
+# $OpenBSD: zmore,v 1.6 2008/08/20 09:22:02 mpf Exp $
 #
 #-
 # Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -42,15 +43,21 @@ 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 2>&1 | ${PAGER-more} $flags
+	gzip -cdfq 2>&1 | $pager $flags
 	exit 0
 fi
 
 oterm=`stty -g 2>/dev/null`
 while test $# -ne 0; do
-	gzip -cdfq "$1" 2>&1 | ${PAGER-more} $flags
+	gzip -cdfq "$1" 2>&1 | $pager $flags
 	prev="$1"
 	shift
 	if tty -s && test -n "$oterm" -a $# -gt 0; then

Modified: stable/10/usr.bin/gzip/zmore.1
==============================================================================
--- stable/10/usr.bin/gzip/zmore.1	Sat Nov  8 00:49:45 2014	(r274261)
+++ stable/10/usr.bin/gzip/zmore.1	Sat Nov  8 00:51:31 2014	(r274262)
@@ -1,5 +1,5 @@
-.\"	$NetBSD: zmore.1,v 1.3 2003/12/28 12:47:52 wiz Exp $
-.\"	$OpenBSD: zmore.1,v 1.3 2003/06/23 21:00:48 deraadt Exp $
+.\"	$NetBSD: zmore.1,v 1.4 2013/11/12 21:58:37 pettai Exp $
+.\"	$OpenBSD: zmore.1,v 1.10 2009/08/16 09:41:08 sobrado Exp $
 .\"
 .\" Copyright (c) 2003 Todd C. Miller <Todd.Miller@courtesan.com>
 .\"
@@ -20,16 +20,20 @@
 .\" Materiel Command, USAF, under agreement number F39502-99-1-0512.
 .\"
 .\" $FreeBSD$
-.Dd February 6, 2011
+.Dd October 22, 2014
 .Dt ZMORE 1
 .Os
 .Sh NAME
-.Nm zmore
+.Nm zmore ,
+.Nm zless
 .Nd view compressed files
 .Sh SYNOPSIS
 .Nm zmore
 .Op Ar flags
-.Op Ar file ...
+.Op Ar
+.Nm zless
+.Op Ar flags
+.Op Ar
 .Sh DESCRIPTION
 .Nm
 is a filter that allows the viewing of files compressed with Lempel-Ziv
@@ -51,6 +55,14 @@ that are specified are passed to the use
 .Pa /usr/bin/more
 by default).
 .Pp
+.Nm zless
+is equivalent to
+.Nm zmore
+but uses
+.Xr less 1
+as a pager instead of
+.Xr more 1 .
+.Pp
 When multiple files are specified,
 .Nm
 will pause at the end of each file and present the following prompt to the user:
@@ -86,7 +98,11 @@ style compression since there is no suff
 Program used to display files.
 If unset,
 .Pa /usr/bin/more
-is used.
+is used
+.Pq Nm zmore
+or
+.Pa /usr/bin/less
+.Pq Nm zless .
 .El
 .Sh SEE ALSO
 .Xr compress 1 ,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411080051.sA80pVGt065532>