On Tue, Jun 24, 2008 at 10:32:17PM +0200, Gabor Kovesdan wrote:

>                 ch = fgetwc(f);

You must clear errno before and handle EILSEQ possible coming after 
fgetwc() somehow. Perhaps by return ret = 1 (binary), I am not sure.
fgetwc() returns WEOF in that case which is not true end of file.

>         if ((s = mbstowcs(NULL, f->base, 0)) == -1)
>                 return (0);

The same here. Check EILSEQ and return 1

-- 
http://ache.pp.ru/
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to