bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-grep] Boyer Moore overflow patch


From: Julian Foad
Subject: Re: [bug-grep] Boyer Moore overflow patch
Date: Wed, 15 Jun 2005 11:28:43 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050217

Paul Eggert wrote:
Julian Foad <address@hidden> writes:
+        Moo that's not _that_ easy; you have to avoid an overflow. */

"Moo"?

Heh! I also wondered what that was, and assumed it was some expression like the "Boy" in the previous sentence. I'll write my own version of that comment.

      for (i = 0; i < kwset->mind; ++i)
-       delta[(unsigned char) kwset->target[i]] = kwset->mind - (i + 1);
+       delta[(unsigned char) kwset->target[i]] =
+         MIN(kwset->mind - (i + 1), UCHAR_MAX);

There should be a space after the "MIN".  (This is the style
recommended by the GNU coding standards.)

The style used in this source file is (almost consistently) no space between a function or macro name and its opening parenthesis, so that's what should be done in any patch to this file.

What we ought to do about the code layout style globally is not relevant to this thread.

Thanks for the comments, though.

- Julian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]