[cvs] bogofilter/src iconvert.c,1.15,1.16
Fast Bayesian spam filter along lines suggested by Paul Graham
Brought to you by:
m-a
From: Matthias A. <m-...@us...> - 2005-12-31 10:22:21
|
Update of /cvsroot/bogofilter/bogofilter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14132/src Modified Files: iconvert.c Log Message: Don't bother to ask iconv() if the output buffer is full if we can do it ourselves. Index: iconvert.c =================================================================== RCS file: /cvsroot/bogofilter/bogofilter/src/iconvert.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- iconvert.c 23 Oct 2005 15:09:52 -0000 1.15 +++ iconvert.c 31 Dec 2005 10:22:13 -0000 1.16 @@ -76,6 +76,9 @@ outbuf = (char *)dst->t.text + dst->t.leng; outbytesleft = dst->size - dst->read - dst->t.leng; + if (outbytesleft == 0) + done = true; + /* * The iconv function converts one multibyte character at a time, and for * each character conversion it increments *inbuf and decrements @@ -164,9 +167,6 @@ if (src->read >= src->t.leng) done = true; - - if (outbytesleft == 0) - done = true; } Z(dst->t.text[dst->t.leng]); /* for easier debugging - removable */ |