[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-grep] Re: [Fwd: [Fwd: grep v2.5.1]]
From: |
Elliott Hughes |
Subject: |
Re: [bug-grep] Re: [Fwd: [Fwd: grep v2.5.1]] |
Date: |
Sun, 14 Nov 2004 12:44:16 -0800 |
On Nov 14, 2004, at 12:05, Andreas Schwab wrote:
Elliott Hughes <address@hidden> writes:
as it is, there's a bug in that code, as evidenced by the first
parameter
to the call to error. it's probably supposed to read like this
instead:
The first argument of error is the exit code and error does not return
when it is non-zero.
you're right. that'll teach me not to bother to look for the
definition. it must have just been coincidence that the few examples i
saw returned an exit code equal to the number of printf format
specifiers in their output. i still think this is useful, though:
Index: src/grep.c
===================================================================
RCS file: /cvsroot/grep/grep/src/grep.c,v
retrieving revision 1.81
diff -u -r1.81 grep.c
--- src/grep.c 18 Jan 2003 16:02:30 -0000 1.81
+++ src/grep.c 14 Nov 2004 20:46:15 -0000
@@ -1166,7 +1166,7 @@
setmatcher (char const *m)
{
if (matcher && strcmp (matcher, m) != 0)
- error (2, 0, _("conflicting matchers specified"));
+ error (2, 0, _("conflicting matchers specified: %s and %s"),
matcher, m);
matcher = m;
}
--
http://www.jessies.org/~enh/