[cvs] bogofilter/src lexer.c,1.10,1.11
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
From: <m-...@us...> - 2003-02-28 00:31:14
|
Update of /cvsroot/bogofilter/bogofilter/src In directory sc8-pr-cvs1:/tmp/cvs-serv14261/src Modified Files: lexer.c Log Message: Fix compile for pre-ISO-C99 compilers. Index: lexer.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/lexer.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- lexer.c 27 Feb 2003 05:06:55 -0000 1.10 +++ lexer.c 28 Feb 2003 00:31:11 -0000 1.11 @@ -214,9 +214,14 @@ if (count >= 5 && memcmp("From ", buf, 5) != 0 && !msg_header && !msg_state->mime_header - && msg_state->mime_type != MIME_TYPE_UNKNOWN) { - word_t line = { buff->t.leng-used, buff->t.text+used }; - int decoded_count = mime_decode(&line); + && msg_state->mime_type != MIME_TYPE_UNKNOWN) + { + word_t line; + int decoded_count; + + line.leng = buff->t.leng - used; + line.text = buff->t.text + used; + decoded_count = mime_decode(&line); /*change buffer size only if the decoding worked */ if (decoded_count != 0 && decoded_count < count) { buff->t.leng -= count - decoded_count; |