check for vswscanf(), AIX 5.1 and HP-UX 11.11 don't have it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -281,21 +281,6 @@ static int vwscanf(const wchar_t *format, va_list argptr)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int vswscanf(const wchar_t *ws, const wchar_t *format, va_list argptr)
|
||||
{
|
||||
// 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.
|
||||
|
||||
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") );
|
||||
|
||||
return vsscanf(wxConvLibc.cWX2MB(ws), wxConvLibc.cWX2MB(format), argptr);
|
||||
}
|
||||
|
||||
static int vfwscanf(FILE *stream, const wchar_t *format, va_list argptr)
|
||||
{
|
||||
wxFAIL_MSG( _T("TODO") );
|
||||
@@ -327,6 +312,23 @@ static int vwprintf(const wchar_t *format, va_list argptr)
|
||||
|
||||
#endif // wxNEED_WPRINTF
|
||||
|
||||
#ifdef wxNEED_VSWSCANF
|
||||
static int vswscanf(const wchar_t *ws, const wchar_t *format, va_list argptr)
|
||||
{
|
||||
// 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.
|
||||
|
||||
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") );
|
||||
|
||||
return vsscanf(wxConvLibc.cWX2MB(ws), wxConvLibc.cWX2MB(format), argptr);
|
||||
}
|
||||
#endif
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxPrintf(), wxScanf() and relatives
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user