head	1.6;
access;
symbols
	RELENG_6_4_0_RELEASE:1.5.34.1
	RELENG_6_4:1.5.34.1.0.4
	RELENG_6_4_BP:1.5.34.1
	RELENG_6_3_0_RELEASE:1.5.34.1
	RELENG_6_3:1.5.34.1.0.2
	RELENG_6_3_BP:1.5.34.1
	RELENG_6_2_0_RELEASE:1.5
	RELENG_6_2:1.5.0.42
	RELENG_6_2_BP:1.5
	RELENG_5_5_0_RELEASE:1.5
	RELENG_5_5:1.5.0.40
	RELENG_5_5_BP:1.5
	RELENG_6_1_0_RELEASE:1.5
	RELENG_6_1:1.5.0.38
	RELENG_6_1_BP:1.5
	RELENG_6_0_0_RELEASE:1.5
	RELENG_6_0:1.5.0.36
	RELENG_6_0_BP:1.5
	RELENG_6:1.5.0.34
	RELENG_6_BP:1.5
	RELENG_5_4_0_RELEASE:1.5
	RELENG_5_4:1.5.0.32
	RELENG_5_4_BP:1.5
	RELENG_4_11_0_RELEASE:1.5
	RELENG_4_11:1.5.0.30
	RELENG_4_11_BP:1.5
	RELENG_5_3_0_RELEASE:1.5
	RELENG_5_3:1.5.0.28
	RELENG_5_3_BP:1.5
	RELENG_5:1.5.0.26
	RELENG_5_BP:1.5
	RELENG_4_10_0_RELEASE:1.5
	RELENG_4_10:1.5.0.24
	RELENG_4_10_BP:1.5
	RELENG_5_2_1_RELEASE:1.5
	RELENG_5_2_0_RELEASE:1.5
	RELENG_5_2:1.5.0.22
	RELENG_5_2_BP:1.5
	RELENG_4_9_0_RELEASE:1.5
	RELENG_4_9:1.5.0.20
	RELENG_4_9_BP:1.5
	RELENG_5_1_0_RELEASE:1.5
	RELENG_5_1:1.5.0.18
	RELENG_5_1_BP:1.5
	RELENG_4_8_0_RELEASE:1.5
	RELENG_4_8:1.5.0.16
	RELENG_4_8_BP:1.5
	RELENG_5_0_0_RELEASE:1.5
	RELENG_5_0:1.5.0.14
	RELENG_5_0_BP:1.5
	RELENG_4_7_0_RELEASE:1.5
	RELENG_4_7:1.5.0.12
	RELENG_4_7_BP:1.5
	RELENG_4_6_2_RELEASE:1.5
	RELENG_4_6_1_RELEASE:1.5
	RELENG_4_6_0_RELEASE:1.5
	RELENG_4_6:1.5.0.10
	RELENG_4_6_BP:1.5
	RELENG_4_5_0_RELEASE:1.5
	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.6
date	2007.01.31.03.44.42;	author delphij;	state dead;
branches;
next	1.5;

1.5
date	99.08.27.23.35.56;	author peter;	state Exp;
branches
	1.5.2.1
	1.5.34.1;
next	1.4;

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

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

1.2
date	93.06.19.00.22.44;	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.5.2.1
date	2012.11.17.07.23.06;	author svnexp;	state Exp;
branches;
next	;

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

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

1.3.12.2
date	99.08.29.14.33.36;	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.6
log
@Remove GNU gzip left-offs, they are no longer necessary.
@
text
@#!/bin/sh
#
# $FreeBSD: src/gnu/usr.bin/gzip/zmore,v 1.5 1999/08/27 23:35:56 peter Exp $

if test "`echo -n a`" = "-n a"; then
  # looks like a SysV system:
  n1=''; n2='\c'
else
  n1='-n'; n2=''
fi
oldtty=`stty -g 2>/dev/null`
if stty -cbreak 2>/dev/null; then
  cb='cbreak'; ncb='-cbreak'
else
  # 'stty min 1' resets eof to ^a on both SunOS and SysV!
  cb='min 1 -icanon'; ncb='icanon eof ^d'
fi
if test $? -eq 0 -a -n "$oldtty"; then
   trap 'stty $oldtty 2>/dev/null; exit' 0 2 3 5 10 13 15
else
   trap 'stty $ncb echo 2>/dev/null; exit' 0 2 3 5 10 13 15
fi

if test $# = 0; then
    if test -t 0; then
	echo usage: zmore files...
    else
	gzip -cdfq | eval ${PAGER-more}
    fi
else
    FIRST=1
    for FILE
    do
	if test $FIRST -eq 0; then
		echo $n1 "--More--(Next file: $FILE)$n2"
		stty $cb -echo 2>/dev/null
		ANS=`dd bs=1 count=1 2>/dev/null` 
		stty $ncb echo 2>/dev/null
		echo " "
		if test "$ANS" = 'e' -o "$ANS" = 'q'; then
			exit
		fi
	fi
	if test "$ANS" != 's'; then
		echo "------> $FILE <------"
		gzip -cdfq "$FILE" | eval ${PAGER-more}
	fi
	if test -t; then
		FIRST=0
	fi
    done
fi
@


1.5
log
@$Id$ -> $FreeBSD$
@
text
@d3 1
a3 1
# $FreeBSD$
@


1.5.2.1
log
@Switch importer
@
text
@d3 1
a3 1
# $FreeBSD: stable/4/gnu/usr.bin/gzip/zmore 50472 1999-08-27 23:37:10Z peter $
@


1.5.34.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
@d3 1
a3 1
# $FreeBSD: src/gnu/usr.bin/gzip/zmore,v 1.5 1999/08/27 23:35:56 peter Exp $
@


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
@d3 1
a3 1
# $Id$
@


1.3
log
@Updated gzip from version 1.2.2 to 1.2.4 due to popular demand
@
text
@d2 2
a4 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
@a1 2
#
# $Id: zmore,v 1.4 1999/05/28 13:23:24 kris Exp $
d3 1
@


1.3.12.2
log
@$Id$ -> $FreeBSD$
@
text
@d3 1
a3 1
# $FreeBSD$
@


1.2
log
@Updated gzip from 1.1 to 1.2.2
@
text
@d24 3
d28 1
@


1.1
log
@Initial revision
@
text
@d3 1
d10 1
d17 5
a21 2
oldtty=`stty -g`
trap 'stty -g $oldtty 2>/dev/null; exit' 0 2 3 5 10 13 15
d24 1
a24 1
	gzip -cd | eval ${PAGER-more}
d41 1
a41 1
		gzip -cd "$FILE" | eval ${PAGER-more}
@


1.1.1.1
log
@Gzip 1.1
@
text
@@
