at least partially implemented vswscanf() -- otherwise wx apps compiled against glibc 2.1 wouldn't run at all

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-10-26 17:42:39 +00:00
parent ae6c0ccf26
commit 63de666d9d

View File

@@ -653,9 +653,19 @@ int vwscanf(const wxChar *format, va_list argptr)
int vswscanf(const wxChar *ws, const wxChar *format, va_list argptr)
{
wxFAIL_MSG( _T("TODO") );
// The best we can do without proper Unicode support in glibc is to
// convert the strings into MB representation and run ANSI version
// of the function. This doesn't work with %c and %s because of difference
// in size of char and wchar_t, though.
return -1;
wxCHECK_MSG( wxStrstr(format, _T("%s")) == NULL, -1,
_T("incomplete vswscanf implementation doesn't allow %s") );
wxCHECK_MSG( wxStrstr(format, _T("%c")) == NULL, -1,
_T("incomplete vswscanf implementation doesn't allow %c") );
va_list argcopy;
wxVaCopy(argcopy, argptr);
return vsscanf(wxConvLibc.cWX2MB(ws), wxConvLibc.cWX2MB(format), argcopy);
}
int vfwscanf(FILE *stream, const wxChar *format, va_list argptr)