// defined when the regex lib uses 'char' but 'wxChar' is wide
#if wxUSE_UNICODE && !defined(__REG_NOFRONT)
-# define WX_NEED_CONVERT
+# define WXREGEX_CONVERT_TO_MB
#endif
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// the character type used by the regular expression engine
-#ifndef WX_NEED_CONVERT
+#ifndef WXREGEX_CONVERT_TO_MB
typedef wxChar wxRegChar;
#else
typedef char wxRegChar;
wxString wxRegExImpl::GetErrorMsg(int errorcode, bool badconv) const
{
-#ifdef WX_NEED_CONVERT
+#ifdef WXREGEX_CONVERT_TO_MB
// currently only needed when using system library in Unicode mode
if ( badconv )
{
wxCHECK_MSG( IsValid(), wxNOT_FOUND, _T("must successfully Compile() first") );
// the input string
-#ifndef WX_NEED_CONVERT
+#ifndef WXREGEX_CONVERT_TO_MB
const wxChar *textstr = text->c_str();
size_t textlen = text->length();
#else
if (result.capacity() < result.length() + start + textNew.length())
result.reserve(2 * result.length());
-#ifndef WX_NEED_CONVERT
+#ifndef WXREGEX_CONVERT_TO_MB
result.append(*text, matchStart, start);
#else
result.append(wxString(textstr + matchStart, *wxConvCurrent, start));
matchStart += len;
}
-#ifndef WX_NEED_CONVERT
+#ifndef WXREGEX_CONVERT_TO_MB
result.append(*text, matchStart, wxString::npos);
#else
result.append(wxString(textstr + matchStart, *wxConvCurrent));
{
wxCHECK_MSG( IsValid(), false, _T("must successfully Compile() first") );
-#ifndef WX_NEED_CONVERT
+#ifndef WXREGEX_CONVERT_TO_MB
return m_impl->Matches(str, flags, wxStrlen(str));
#else
return m_impl->Matches(wxConvertWX2MB(str), flags, wxStrlen(str));