Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/gzip Consistently use -- for all programs called. Dr...
details: https://anonhg.NetBSD.org/src/rev/4b6c453c0110
branches: trunk
changeset: 753974:4b6c453c0110
user: joerg <joerg%NetBSD.org@localhost>
date: Wed Apr 14 20:30:28 2010 +0000
description:
Consistently use -- for all programs called. Drop some redundant flags
for the no file argument case.
diffstat:
usr.bin/gzip/zdiff | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
diffs (41 lines):
diff -r aa3e1ac9655e -r 4b6c453c0110 usr.bin/gzip/zdiff
--- a/usr.bin/gzip/zdiff Wed Apr 14 20:08:56 2010 +0000
+++ b/usr.bin/gzip/zdiff Wed Apr 14 20:30:28 2010 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index