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:
@@ -653,9 +653,19 @@ int vwscanf(const wxChar *format, va_list argptr)
|
|||||||
|
|
||||||
int vswscanf(const wxChar *ws, 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)
|
int vfwscanf(FILE *stream, const wxChar *format, va_list argptr)
|
||||||
|
Reference in New Issue
Block a user