%ls and %lc in scanf.c
Artem B. Bityuckiy
abityuckiy@yandex.ru
Tue Nov 25 19:08:00 GMT 2003
Hello,
We've added widechar support to vfscanf - %S, %ls, %C, %lc modifiers.
The code was given from FreeBSD's vfprintf.c - since
Newlib's license is BSD, I think this is legal.
The patch was tested a little bit - with default locale and UTF8-based
locale. If mbsrtowcs and mbrtowc work well, this should work too.
One issue that I've met - '#ifndef CYGNUS_NEC' macro that surrounds
__srefill function. I've added it to %C and %S-related code
(analogiously as it is in %c and %s-related code) but not sure if this
is correct.
Please, see, and enjoy :-))
--
Best Regards,
Artem B. Bityuckiy,
St.-Petersburg, Russia.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: vfscanf.diff
URL: <http://sourceware.org/pipermail/newlib/attachments/20031125/5723dc38/attachment.ksh>
More information about the Newlib
mailing list