This is the mail archive of the
cygwin-developers
mailing list for the Cygwin project.
Re: wprintf anybody?
- From: Brian Dessent <brian at dessent dot net>
- To: cygwin-developers at cygwin dot com
- Date: Wed, 09 Apr 2008 14:34:47 -0700
- Subject: Re: wprintf anybody?
- References: <20080409195132.GP23852@calimero.vinschen.de>
- Reply-to: cygwin-developers at cygwin dot com
Corinna Vinschen wrote:
> while we're at it, multibyte/wide chars and all, I just found that it
> would be helpful to have the wprintf family of functions, and possibly
> related stuff like fputwc, fputws, fgetwc, fgetws and fwide. Is anybody
> here interested in adding this to Cygwin or, FWIW, newlib?
I had a tentative spot on my TODO to simply audit Cygwin+newlib for the
current state of C99 wchar_t support, and make a list of what all is
missing. I have a feeling it's a lot, but I agree that low hanging
fruit like wprintf would be a good idea to have. I'm sure that
libstdc++ could benefit from this, since at the moment I think it has
all wide character support disabled due to no underlying libc support.
Oh and that reminds me... There is this little gem in syscalls.cc:
/* FIXME: to do this right, maybe work out the usoft va_list machine
and use wsvprintfW instead?
*/
extern "C" int
wprintf (const char *fmt, ...)
{
va_list ap;
int ret;
va_start (ap, fmt);
ret = vprintf (fmt, ap);
va_end (ap);
return ret;
}
Naturally, we never exported this function so it didn't cause any
damage. But from what I can tell from a dig through the ChangeLogs,
this little guy dates back to at least 1996, and he's just been sitting
there doing nothing and being useless the whole time.
Brian