#if wxUSE_UNICODE && !defined(wxHAVE_TCHAR_SUPPORT) && !defined(HAVE_WPRINTF)
#define wxNEED_WPRINTF
#endif
+#if wxUSE_UNICODE && !defined(wxHAVE_TCHAR_SUPPORT) && !defined(HAVE_VSWSCANF)
+ #define wxNEED_VSWSCANF
+#endif
#if defined(wxNEED_WPRINTF)
int wxCRT_ScanfW(const wchar_t *format, ...);
int wxCRT_SscanfW(const wchar_t *str, const wchar_t *format, ...);
int wxCRT_FscanfW(FILE *stream, const wchar_t *format, ...);
- int wxCRT_VsscanfW(const wchar_t *str, const wchar_t *format, va_list ap);
#else
#define wxCRT_ScanfW wxVMS_USE_STD wscanf
#define wxCRT_SscanfW wxVMS_USE_STD swscanf
#define wxCRT_FscanfW wxVMS_USE_STD fwscanf
+#endif
+#ifdef wxNEED_VSWSCANF
+ int wxCRT_VsscanfW(const wchar_t *str, const wchar_t *format, va_list ap);
+#else
#define wxCRT_VsscanfW wxVMS_USE_STD vswscanf
#endif
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") );
#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
// ----------------------------------------------------------------------------