Add wxIsascii() function and use it instead of isascii() in our code.

isascii() is non-ANSI and is not available under all platforms. While we
currently define it ourselves in wx/wxcrtbase.h in this case, it's not a good
idea as this can't be easily done correctly for all platforms so start
transitioning away from using isascii() by adding wxIsascii() and using it in
our own code.

The only remaining occurrences of isascii() are in Scintilla code which we
probably don't want to modify.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63165 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-01-18 00:28:11 +00:00
parent f030eeed1e
commit 7a0079d5a4
7 changed files with 16 additions and 17 deletions

View File

@@ -387,7 +387,7 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
XmTextVerifyCallbackStruct *textStruct =
(XmTextVerifyCallbackStruct *) m_tempCallbackStruct;
textStruct->doit = True;
if (isascii(event.m_keyCode) && (textStruct->text->length == 1))
if (wxIsascii(event.m_keyCode) && (textStruct->text->length == 1))
{
textStruct->text->ptr[0] = (char)((event.m_keyCode == WXK_RETURN) ? 10 : event.m_keyCode);
}