wchar.h missing functions

Jeff Johnston jjohnstn@redhat.com
Tue Dec 16 10:28:00 GMT 2008


Patch applied with changes to Makefile.am and documentation.

-- Jeff J.

Howland Craig D (Craig) wrote:
> A trivial correction to the new, proposed wcstok.c is included in this
> newer patch file.  I originally only pointed out C99 compliance.  This
> update adds POSIX.1-2001 to the comments.
> Craig
>
>
> -----Original Message-----
> From: newlib-owner@sourceware.org [mailto:newlib-owner@sourceware.org]
> On Behalf Of Howland Craig D (Craig)
> Sent: Wednesday, December 10, 2008 7:34 PM
> To: newlib@sourceware.org
> Subject: wchar.h missing functions
>
> While checking what Corinna has supplied as the starting point for
> the basic wide char stdio, I noticed that the following functions
> required by C99 for wchar.h are missing from it and newlib:
>
> fwprintf
> fwscanf
> swprintf
> swscanf
> vfwprintf
> vfwscanf
> vswprintf
> vswscanf
> vwprintf
> vwscanf
> wprintf
> wscanf
>  
> wcstod
> wcstof
> wcstold
> wcsftime
> wcstok
>
> The former group are presumably the next step that Corinna is planning
> to take, as the first patch added the character I/O functions and the
> request that started this was someone asking about swprintf.  However,
> the last 5 have not otherwise been mentioned--not being I/O.
>
> I made wcstok from strtok_r.  See the attached patch file.  I don't know
> how to add the new file to all the makefiles and other things properly,
> so I left that to Jeff.  (I could do Makefile.am, but Corinna's last
> add had CHEWOUT_FILES that I know nothing about.)  There is no need for
> a wcstok_r as it is thread safe as it is.  By the way, I used a form
> that Eric Blake did earlier for including some tests in the file.
>
> FreeBSD apparently has wcstod and wcsftime.  Since we're copying
> the wide I/O functions from there, should these be copied, too?  Making
> wcstof from wcstod would be easy enough.  wcstold probably could be left
> out for a while, as all of the other long double functions are presently
> missing, anyway.
>  
> Craig
>
>   



More information about the Newlib mailing list