bug-grep
[Top][All Lists]
Advanced

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

Re: src/kwset.c (kwsincr): Replace arbitrary array size by proper value


From: Paul Eggert
Subject: Re: src/kwset.c (kwsincr): Replace arbitrary array size by proper value
Date: Tue, 05 Jul 2005 11:12:31 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Charles Levert <address@hidden> writes:

> I chose DEPTH_SIZE because this is unambiguous
> in the context of the C language and its 0-based
> arrays.

OK, that's fine, as long as the comment says that it's derived from an
upper bound.

> My only fear is that there likely already is a
> published paper proving just this, probably in
> a much more elegant way, and that I don't know
> about it.  Does someone here know?

I have a copy of Knuth volume 3, and am willing to look it up, but I
don't know what the algorithm that I'm looking for is.  (I could read
the grep source code, but I figure it's easier to ask you. :-)

> Is #error portable all the way back to older non-standard compilers?

No.  However, #error is portable to C89 and later.  Grep already
assumes C89 and later, so it's OK to use #error now.




reply via email to

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