Module Name:    src
Committed By:   joerg
Date:           Wed Apr 14 20:30:28 UTC 2010

Modified Files:
        src/usr.bin/gzip: zdiff

Log Message:
Consistently use -- for all programs called. Drop some redundant flags
for the no file argument case.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/usr.bin/gzip/zdiff

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/gzip/zdiff
diff -u src/usr.bin/gzip/zdiff:1.4 src/usr.bin/gzip/zdiff:1.5
--- src/usr.bin/gzip/zdiff:1.4	Wed Apr 14 18:55:12 2010
+++ src/usr.bin/gzip/zdiff	Wed Apr 14 20:30:28 2010
@@ -1,6 +1,6 @@
 #!/bin/sh -
 #
-# $NetBSD: zdiff,v 1.4 2010/04/14 18:55:12 joerg Exp $
+# $NetBSD: zdiff,v 1.5 2010/04/14 20:30:28 joerg Exp $
 #
 # $OpenBSD: zdiff,v 1.2 2003/07/29 07:42:44 otto Exp $
 #
@@ -113,23 +113,23 @@
 		echo "z$prog: unknown suffix" 1>&2
 		exit 1
 	fi
-	$filt -cdfq "$1" | $prog $flags - "$files"
+	$filt -- "$1" | $prog $flags -- - "$files"
 	status=$?
 elif [ $# -eq 2 ]; then
 	# Two files given, compare the two uncompressing as needed
 	check_suffix "$1" files filt
 	check_suffix "$2" files2 filt2
 	if [ -z "$filt" -a -z "$filt2" ]; then
-		$prog $flags "$1" "$2"
+		$prog $flags -- "$1" "$2"
 	elif [ -z "$filt" -a -n "$filt2" -a "$1" != "-" ]; then
-		$filt2 "$2" | $prog $flags "$1" -
+		$filt2 -- "$2" | $prog $flags -- "$1" -
 	elif [ -n "$filt" -a -z "$filt2" -a "$2" != "-" ]; then
-		$filt "$1" | $prog $flags - "$2"
+		$filt -- "$1" | $prog $flags -- - "$2"
 	else
 		tmp=`mktemp -t z$prog.XXXXXXXXXX` || exit 1
 		trap "rm -f $tmp" 0 1 2 3 13 15
-		${filt2:-cat} "$2" > $tmp || exit $?
-		${filt:-cat} "$1" | $prog $flags - "$tmp"
+		${filt2:-cat} -- "$2" > $tmp || exit $?
+		${filt:-cat} -- "$1" | $prog $flags -- - "$tmp"
 	fi
 	status=$?
 else

Reply via email to