-static int LINKAGEMODE CompareCharsetItems(const void *i1, const void *i2)
+extern "C" int LINKAGEMODE CompareCharsetItems(const void *i1, const void *i2)
{
return ( ((CharsetItem*)i1) -> u - ((CharsetItem*)i2) -> u );
}
m_Table[128 + i] = (wchar_t)(128 + i);
#else
m_Table[128 + i] = (char)(128 + i);
-#endif
+#endif
}
delete[] rev;
return;
}
- wxASSERT_MSG(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!"));
+ wxCHECK_RET(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!"));
for (i = input, o = output; *i != 0;)
*(o++) = (char)(m_Table[(wxUint8)*(i++)]);
return;
}
- wxASSERT_MSG(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!"));
+ wxCHECK_RET(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!"));
for (i = input, o = output; *i != 0;)
*(o++) = (wchar_t)(m_Table[(wxUint8)*(i++)]);
return;
}
- wxASSERT_MSG(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!"));
+ wxCHECK_RET(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!"));
for (i = input, o = output; *i != 0;)
*(o++) = (char)(m_Table[(wxUint16)*(i++)]);
return;
}
- wxASSERT_MSG(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!"));
+ wxCHECK_RET(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!"));
for (i = input, o = output; *i != 0;)
*(o++) = (wchar_t)(m_Table[(wxUint8)*(i++)]);
wxString s;
const wxChar *i;
- wxASSERT_MSG(m_Table != NULL, wxT("You must call wxEncodingConverter::Init() before actually converting!"));
+ wxCHECK_MSG(m_Table != NULL, s,
+ wxT("You must call wxEncodingConverter::Init() before actually converting!"));
if (m_UnicodeInput)
+ {
for (i = input.c_str(); *i != 0; i++)
s << (wxChar)(m_Table[(wxUint16)*i]);
+ }
else
+ {
for (i = input.c_str(); *i != 0; i++)
s << (wxChar)(m_Table[(wxUint8)*i]);
+ }
+
return s;
}