#if wxUSE_UNICODE
+namespace
+{
+
#if !wxUSE_UTF8_LOCALE_ONLY
-static int ConvertStringToBuf(const wxString& s, char *out, size_t outsize)
+int wxInternalConvertStringToBuf(const wxString& s, char *out, size_t outsize)
{
const wxWX2WCbuf buf = s.wc_str();
#endif // !wxUSE_UTF8_LOCALE_ONLY
#if wxUSE_UNICODE_UTF8
-static int ConvertStringToBuf(const wxString& s, wchar_t *out, size_t outsize)
+int wxInternalConvertStringToBuf(const wxString& s, wchar_t *out, size_t outsize)
{
const wxWX2WCbuf buf(s.wc_str());
size_t len = wxWcslen(buf);
}
#endif // wxUSE_UNICODE_UTF8
+} // anonymous namespace
+
template<typename T>
static size_t PrintfViaString(T *out, size_t outsize,
const wxString& format, va_list argptr)
wxString s;
s.PrintfV(format, argptr);
- return ConvertStringToBuf(s, out, outsize);
+ return wxInternalConvertStringToBuf(s, out, outsize);
}
#endif // wxUSE_UNICODE
int wxVsprintf(char *str, const wxString& format, va_list argptr)
{
#if wxUSE_UTF8_LOCALE_ONLY
- return vsprintf(str, format.wx_str(), argptr);
+ return wxCRT_VsprintfA(str, format.wx_str(), argptr);
#else
#if wxUSE_UNICODE_UTF8
if ( wxLocaleIsUtf8 )
- return vsprintf(str, format.wx_str(), argptr);
+ return wxCRT_VsprintfA(str, format.wx_str(), argptr);
else
#endif
#if wxUSE_UNICODE
#endif // wxUSE_WCHAR_T
+#ifdef wxLongLong_t
template<typename T>
static wxULongLong_t
wxCRT_StrtoullBase(const T* nptr, T** endptr, int base, T* sign)
{ return wxCRT_DoStrtoull(nptr, endptr, base); }
#endif
+#endif // wxLongLong_t
+
// ----------------------------------------------------------------------------
// functions which we may need even if !wxUSE_WCHAR_T
// ----------------------------------------------------------------------------