%ls and %lc in scanf.c

J. Johnston jjohnstn@redhat.com
Tue Nov 25 19:11:00 GMT 2003

Artem B. Bityuckiy wrote:
> 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.

I am looking into the CYGNUS_NEC references.

Is there any reason why you didn't segregate the code under the MB_CAPABLE macro 
like you did recently for vfprintf.c?  It would make sense to do it in 
conjunction with this change.

I also notice a number of formatting changes where the only change is moving the 
opening braces.  Is this due to your original code base?

-- Jeff J.

More information about the Newlib mailing list