buff_t code [was: [cvs] ... lexer.c ...]
David Relson
relson at osagesoftware.com
Sat Dec 31 17:46:01 CET 2005
On Sat, 31 Dec 2005 17:36:11 +0100
Matthias Andree wrote:
> On Sat, 31 Dec 2005, David Relson wrote:
>
> > Confession time:-> I don't fully understand the buffering code,
> > myself. When developing it, I started with a vision of what was
> > needed. However as the implementation progressed, various conditions
> > cropped up that needed special handling. The end product is the result
> > of tweaking and "debugging into submission".
>
> OK, let's fork the 1.1 branch in February 2006 or so, and then clean up
> all the buffer handling.
>
> > The "if (c == '\0')" check that you mention is an example of "doing
> > what works". Without this "early out" from the loop, there are
> > problems. Possibly this loop can be written as
> >
> > for (....)
> > if ( !isalnum(c))
> > return false
> >
> > or similar.
>
> OK. We'll leave it as it is now, since we know that fixes the problem,
> but we'll have to do some more debugging.
Cleaning up the buffer handling code sounds like a good idea. Having
time to think about it and plan is a good thing. The cleanup won't be
easy :-< Are you volunteering?
In the meantime, I've got the lexer.c test running and will let you
know where it goes.
More information about the bogofilter-dev
mailing list