This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: %ls and %lc in scanf.c


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]