1 Mar 2003 02:20
buff_t cleanup
David Relson <relson <at> osagesoftware.com>
2003-03-01 01:20:08 GMT
2003-03-01 01:20:08 GMT
Matthias, I did a bit of cleaning up of the buff_t code. Since struct field 'pos' is never used, I removed it. The t.leng field shows how much data is actually _in_ the buffer and any additional data added to the buffer is at the end of the buffer's data. Since this is so, buff_fgetsl() now uses buff->t.leng when it calls xfgetsl() to read more text. This change also allowed removing any code (outside of buff.c) that set buff->read. However, bogofilter does need to know about the most recently read line (to save it for passthrough and to print it for debugging), so buff_fgetsl() savees the start position of the line in buff->read. These changes put more of the "bookkeeping code" for buff_t in buff.c and simplify the use of the struct. This should help maintain the code. David --------------------------------------------------------------------- FAQ: http://bogofilter.sourceforge.net/bogofilter-faq.html To unsubscribe, e-mail: bogofilter-dev-unsubscribe <at> aotto.com For summary digest subscription: bogofilter-dev-digest-subscribe <at> aotto.com For more commands, e-mail: bogofilter-dev-help <at> aotto.com
2. remove trailing "f" characters after floats. They are misleading
anyways because a) the floating point nature is clearly visible from
the dot (or exponent), b) a trailing "f" in C numeric constant means
"float" as opposed to our expected format "double".
Along with the most recent format.c fix, the current configfile.c and
xato?.c files parse bogofilter.cf.example.
RSS Feed