X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Esa A E Peuha Newsgroups: comp.os.msdos.djgpp Subject: Re: Bug in mbstowcs() in DJGPP's C library Date: 25 Jun 2007 01:52:00 +0300 Organization: University of Helsinki Lines: 31 Message-ID: <86pabupynhr.fsf@sirppi.helsinki.fi> References: NNTP-Posting-Host: sirppi.helsinki.fi X-Trace: oravannahka.helsinki.fi 1182725520 14176 128.214.205.27 (24 Jun 2007 22:52:00 GMT) X-Complaints-To: abuse AT helsinki DOT fi NNTP-Posting-Date: 24 Jun 2007 22:52:00 GMT X-Newsreader: Gnus v5.6.43/Emacs 19.34 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Simon Tatham writes: > I believe mbstowcs() in DJGPP's C library is behaving incorrectly. > It appears to be unwilling to fill its entire output buffer with > non-zero wide characters, preferring to stop one character short of > the end of the buffer That's correct. > and write a NUL. But this isn't; from the current source size_t mbstowcs(wchar_t *wcs, const char *s, size_t n) { size_t i; for (i=0; (i+1