This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: %ls and %lc in scanf.c
- From: "J. Johnston" <jjohnstn at redhat dot com>
- To: "Artem B. Bityuckiy" <abityuckiy at yandex dot ru>
- Cc: newlib at sources dot redhat dot com
- Date: Mon, 24 Nov 2003 19:57:39 -0500
- Subject: Re: %ls and %lc in scanf.c
- Organization: Red Hat Inc.
- References: <3FC226E1.6020806@yandex.ru>
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.