File zmore.diff of Package gzip.17500

---
 zmore.in |   25 ++++++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

Index: gzip-1.6/zmore.in
===================================================================
--- gzip-1.6.orig/zmore.in
+++ gzip-1.6/zmore.in
@@ -44,6 +44,29 @@ case $1 in
        exit 1;;
 esac
 
+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
         printf >&2 '%s\n' "$0: missing operands; try '$0 --help' for help"
@@ -57,4 +80,4 @@ do
   test $# -lt 2 ||
     printf '::::::::::::::\n%s\n::::::::::::::\n' "$FILE" || break
   gzip -cdfq -- "$FILE"
-done 2>&1 | eval ${PAGER-more}
+done 2>&1 | pager
openSUSE Build Service is sponsored by