vfprintf multibyte
Artem B. Bityuckiy
abityuckiy@yandex.ru
Fri Nov 21 19:49:00 GMT 2003
Hello.
I offer some optimization.
Look at CVS-Newlib newlib/libc/stdio/vfprintf.c line 553 for example.
mbtowc call is used. This is needed to support multibyte format string.
But usually in newlib such things are placed in #ifdef MB_CAPABLE/#endif
pair. And this is right because it excludes junk code if Newlib is
configured without multibyte support (if MB_CAPABLE isn't defined then
the only multibyte is US_ASCII or, possibly, other 1 byte encoding like iso-8859-x).
I offer the patch that excludes mbtowc calls if newlib shouldn't support
multibyte.
Please, see, check, comment.
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vfprintf.diff
URL: <http://sourceware.org/pipermail/newlib/attachments/20031121/ab04792b/attachment.ksh>
More information about the Newlib
mailing list