[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: expr say "non integer argument"
From: |
Eric Blake |
Subject: |
Re: expr say "non integer argument" |
Date: |
Thu, 18 Feb 2010 07:18:01 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
According to address@hidden on 2/18/2010 6:54 AM:
> EB> jidanni, it would be a two-line patch to expr.c. Would you care to write
> EB> such a patch, rather than just complaining?
>
> It would be much more efficient for me to just play the role of the bug
> reporter here.... trust me. Thanks.
You are giving up too easily. Your bug reports would go a LOT further if
you would show some effort behind them. What's so hard about:
sed -i 's/non-numeric/non-integer/' src/expr.c
It results in this diff:
diff --git a/src/expr.c b/src/expr.c
index 048c596..1ebb4b9 100644
--- a/src/expr.c
+++ b/src/expr.c
@@ -787,7 +787,7 @@ eval4 (bool evaluate)
if (evaluate)
{
if (!toarith (l) || !toarith (r))
- error (EXPR_INVALID, 0, _("non-numeric argument"));
+ error (EXPR_INVALID, 0, _("non-integer argument"));
if (fxn != multiply && mpz_sgn (r->u.i) == 0)
error (EXPR_INVALID, 0, _("division by zero"));
((fxn == multiply ? mpz_mul
@@ -824,7 +824,7 @@ eval3 (bool evaluate)
if (evaluate)
{
if (!toarith (l) || !toarith (r))
- error (EXPR_INVALID, 0, _("non-numeric argument"));
+ error (EXPR_INVALID, 0, _("non-integer argument"));
(fxn == plus ? mpz_add : mpz_sub) (l->u.i, l->u.i, r->u.i);
}
freev (r);
Now all that's lacking is a changelog-style commit message, and you're done.
--
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
signature.asc
Description: OpenPGP digital signature
- expr say "non integer argument", jidanni, 2010/02/18
- Re: expr say "non integer argument", Chris F.A. Johnson, 2010/02/18
- Re: expr say "non integer argument", jidanni, 2010/02/18
- Re: expr say "non integer argument", Eric Blake, 2010/02/18
- Re: expr say "non integer argument", jidanni, 2010/02/18
- Re: expr say "non integer argument",
Eric Blake <=
- Re: expr say "non integer argument", jidanni, 2010/02/18
- diff "--git", jidanni, 2010/02/18
- Re: diff "--git", Alfred M. Szmidt, 2010/02/18
- Re: diff "--git", jidanni, 2010/02/18
- RE: expr say "non integer argument", Voelker, Bernhard, 2010/02/18
- Re: expr say "non integer argument", Eric Blake, 2010/02/18
- RE: expr say "non integer argument", Voelker, Bernhard, 2010/02/19
- Re: expr say "non integer argument", Jim Meyering, 2010/02/19
- Re: expr say "non integer argument", Eric Blake, 2010/02/25
- Re: expr say "non integer argument", Eric Blake, 2010/02/25