1. made CRT wrappers definitions indepenent of wxUSE_UNICODE: both ANSI and Unicode variants are now defined

2. split wxcrt.h into wxcrtbase.h with lowlevel compiler-specific definitions and wxcrt.h with ANSI- and Unicode-compatible wx wrappers


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2007-06-10 17:14:14 +00:00
parent c475be6dfa
commit 52de37c78f
31 changed files with 1742 additions and 1643 deletions

View File

@@ -634,9 +634,9 @@ static struct cclass {
*/
#define Tcl_UniChar wxChar
Tcl_UniChar Tcl_UniCharToUpper(int ch) { return wxToupper(ch); }
Tcl_UniChar Tcl_UniCharToLower(int ch) { return wxTolower(ch); }
Tcl_UniChar Tcl_UniCharToTitle(int ch) { return wxToupper(ch); }
Tcl_UniChar Tcl_UniCharToUpper(int ch) { return wxCRT_ToupperNative(ch); }
Tcl_UniChar Tcl_UniCharToLower(int ch) { return wxCRT_TolowerNative(ch); }
Tcl_UniChar Tcl_UniCharToTitle(int ch) { return wxCRT_ToupperNative(ch); }
#endif /* !wxUSE_UNICODE */
@@ -703,7 +703,7 @@ element(v, startp, endp)
/* search table */
for (cn=cnames; cn->name!=NULL; cn++) {
if (wxStrlen_(cn->name)==len && wxStrncmp(cn->name, startp, len)==0) {
if (wxCRT_StrlenNative(cn->name)==len && wxCRT_StrncmpNative(cn->name, startp, len)==0) {
break; /* NOTE BREAK OUT */
}
}
@@ -871,8 +871,8 @@ cclass(v, startp, endp, cases)
* Remap lower and upper to alpha if the match is case insensitive.
*/
if (cases && len == 5 && (wxStrncmp(_T("lower"), np, 5) == 0
|| wxStrncmp(_T("upper"), np, 5) == 0)) {
if (cases && len == 5 && (wxCRT_StrncmpNative(_T("lower"), np, 5) == 0
|| wxCRT_StrncmpNative(_T("upper"), np, 5) == 0)) {
np = _T("alpha");
}
@@ -882,7 +882,7 @@ cclass(v, startp, endp, cases)
index = -1;
for (namePtr=classNames,i=0 ; *namePtr!=NULL ; namePtr++,i++) {
if ((wxStrlen_(*namePtr) == len) && (wxStrncmp(*namePtr, np, len) == 0)) {
if ((wxCRT_StrlenNative(*namePtr) == len) && (wxCRT_StrncmpNative(*namePtr, np, len) == 0)) {
index = i;
break;
}
@@ -1057,11 +1057,11 @@ int cases; /* case-independent? */
/* find the name */
len = endp - startp;
np = startp;
if (cases && len == 5 && (wxStrncmp(_T("lower"), np, 5) == 0 ||
wxStrncmp(_T("upper"), np, 5) == 0))
if (cases && len == 5 && (wxCRT_StrncmpNative(_T("lower"), np, 5) == 0 ||
wxCRT_StrncmpNative(_T("upper"), np, 5) == 0))
np = _T("alpha");
for (cc = cclasses; cc->name != NULL; cc++)
if (wxStrlen_(cc->name) == len && wxStrncmp(cc->name, np, len) == 0)
if (wxCRT_StrlenNative(cc->name) == len && wxCRT_StrncmpNative(cc->name, np, len) == 0)
break; /* NOTE BREAK OUT */
if (cc->name == NULL) {
ERR(REG_ECTYPE);

View File

@@ -38,7 +38,7 @@
/* must include this after ctype.h inclusion for CodeWarrior/Mac */
#include "wx/defs.h"
#include "wx/chartype.h"
#include "wx/wxcrt.h"
#include "wx/wxcrtbase.h"
/*
* Do not insert extras between the "begin" and "end" lines -- this