#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <wchar.h>
+
+#ifdef __SGI__
+ // wide character functions are declared in std namespace under IRIX
+ using namespace std;
+
+ // and this one is only declared if __c99 is defined which is not the case
+ // for C++ builds, so declare it ourselves
+ extern "C" int vswscanf(const wchar_t *, const wchar_t *, va_list);
+#endif
#ifndef __WXPALMOS5__
#ifndef __WXWINCE__
#include <xlocale.h>
#endif
-#if wxUSE_WCHAR_T
WXDLLIMPEXP_BASE size_t wxMB2WC(wchar_t *buf, const char *psz, size_t n)
{
// assume that we have mbsrtowcs() too if we have wcsrtombs()
return wxWcstombs(NULL, pwz, 0);
#endif
}
-#endif // wxUSE_WCHAR_T
char* wxSetlocale(int category, const char *locale)
{
}
#endif // wxUSE_UNICODE
-#if wxUSE_WCHAR_T
// ----------------------------------------------------------------------------
// ctype.h stuff (currently unused)
}
#endif // !wxCRT_StrftimeW
-#endif // wxUSE_WCHAR_T
-
#ifdef wxLongLong_t
template<typename T>
static wxULongLong_t
#endif // wxLongLong_t
// ----------------------------------------------------------------------------
-// functions which we may need even if !wxUSE_WCHAR_T
+// strtok() functions
// ----------------------------------------------------------------------------
template<typename T>
int wxPuts(const wxString& s)
{
+ // under IRIX putws() takes a non-const argument so use wchar_str() instead
+ // of wc_str()
CALL_ANSI_OR_UNICODE(return,
wxCRT_PutsA(s.mb_str()),
- wxCRT_PutsW(s.wc_str()));
+ wxCRT_PutsW(s.wchar_str()));
}
int wxFputs(const wxString& s, FILE *stream)