SHA256
1
0
forked from pool/gzip
gzip/zmore.diff
Marcus Meissner aa667cf72c Accepting request 138375 from home:vitezslav_cizek:branches:Base:System
- update to 1.5
  - gzip -cdf mishandles some concatenated input streams: test it
  - gzip -cdf now handles concatenation of gzip'd and uncompressed data
  - gzip: fix a data-loss bug when decompressing with --suffix=''
  - gzip: fix nondeterministic compression results
  - fix "znew -K" to work without use of compress utility
  - Decode FHCRC flag properly, as per Internet RFC 1952.
  - zgrep: fix parsing of -Eh options
  - zgrep: terminate gracefully when a pipeline is interrupted by a signal
  - zgrep: fix shell portability bug with -f; fix mishandling of "-e -"
  - zless: decompress stdin too, if less 429 or later
- dropped gzip-stdio.in.patch, refreshed others

OBS-URL: https://build.opensuse.org/request/show/138375
OBS-URL: https://build.opensuse.org/package/show/Base:System/gzip?expand=0&rev=20
2012-10-17 09:19:18 +00:00

50 lines
1.0 KiB
Diff

Index: zmore.in
===================================================================
--- zmore.in.orig 2012-01-01 09:53:58.000000000 +0100
+++ zmore.in 2012-10-16 13:34:42.842966614 +0200
@@ -55,11 +55,34 @@ else
trap 'stty $ncb echo 2>/dev/null; exit' 0 2 3 5 10 13 15
fi
+opt=
+pager ()
+{
+ eval ${PAGER-more} \$opt
+ cat > /dev/null
+}
+
+while :; do
+ case $1 in
+ --)
+ shift
+ break
+ ;;
+ [-+]*)
+ opt="$opt $1"
+ shift
+ ;;
+ *)
+ break
+ ;;
+ esac
+done
+
if test $# = 0; then
if test -t 0; then
echo >&2 "$0: invalid number of operands; try \`$0 --help' for help"
else
- gzip -cdfq | eval ${PAGER-more}
+ gzip -cdfq | pager
fi
else
FIRST=1
@@ -83,7 +106,7 @@ else
fi
if test "$ANS" != 's'; then
echo "------> $FILE <------"
- gzip -cdfq -- "$FILE" | eval ${PAGER-more}
+ gzip -cdfq -- "$FILE" | pager
fi
if test -t 1; then
FIRST=0