From 4e0f1c33cc99de63a1f7d539f691f0c98b958f6f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 1 Jul 2004 22:52:39 +0000 Subject: [PATCH] fix wxTolower/upper() behaviour with signed chars > 0x7f with VC++ 6 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/wxchar.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/wx/wxchar.h b/include/wx/wxchar.h index 5e65c13bce..dd6ca93a71 100644 --- a/include/wx/wxchar.h +++ b/include/wx/wxchar.h @@ -254,8 +254,13 @@ #define wxIsspace _istspace #define wxIsupper _istupper #define wxIsxdigit _istxdigit - #define wxTolower _totlower - #define wxToupper _totupper + + /* + There is a bug in VC6 C RTL: toxxx() functions dosn't do anything with + signed chars < 0, so "fix" it here. + */ + #define wxTolower(c) _totlower((wxUChar)(c)) + #define wxToupper(c) _totupper((wxUChar)(c)) /* locale.h functons */ #define wxSetlocale _tsetlocale -- 2.50.0