X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0be9ace27e0a278272cbb1e9daa988b65898eca1..1d73f41603de8103218a8460792f244230c6a7b1:/src/common/wxchar.cpp?ds=sidebyside diff --git a/src/common/wxchar.cpp b/src/common/wxchar.cpp index 326c34dbe6..d8772fce24 100644 --- a/src/common/wxchar.cpp +++ b/src/common/wxchar.cpp @@ -9,7 +9,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "wxchar.h" #endif @@ -1205,7 +1205,7 @@ WXDLLEXPORT long int wxStrtol(const wxChar *nptr, wxChar **endptr, int base) } #endif // wxNEED_WX_STRING_H -#if defined(__WXMAC__) && !defined(__DARWIN__) +#if defined(__WXMAC__) && !defined(__DARWIN__) && !defined(wxUSE_UNICODE) WXDLLEXPORT FILE * wxFopen(const wxChar *path, const wxChar *mode) { return fopen( wxMacStringToCString(path), mode ); @@ -1392,8 +1392,8 @@ WXDLLEXPORT wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_pt // missing C RTL functions // ---------------------------------------------------------------------------- -#if defined( __MWERKS__ ) && !defined(__MACH__) -#if __MSL__ < 0x00008000 +#if (defined(__MWERKS__) && !defined(__MACH__) && (__MSL__ < 0x00008000)) || \ + defined(__WXWINCE__) char *strdup(const char *s) { char *dest = (char*) malloc( strlen( s ) + 1 ) ; @@ -1402,21 +1402,16 @@ char *strdup(const char *s) return dest ; } #endif + +#if (defined(__MWERKS__) && !defined(__MACH__)) || (defined(__WXWINCE__) && _WIN32_WCE <= 211) + int isascii( int c ) { - return ( c >= 0 && c < 128 ) ; -} -#endif // __MWERKS__ - -#ifdef __WXWINCE__ -char* strdup(const char* s) -{ - char *dest = (char*) malloc( strlen( s ) + 1 ) ; - if ( dest ) - strcpy( dest , s ) ; - return dest ; + return ( c >= 0 && c < 128 ); } +#endif +#if defined(__WXWINCE__) void *calloc( size_t num, size_t size ) { void** ptr = (void **)malloc(num * size); @@ -1424,15 +1419,11 @@ void *calloc( size_t num, size_t size ) return ptr; } +#if (_WIN32_WCE <= 211) int isspace(int c) { return (c == ' '); } - -int isascii( int c ) -{ - return ( c >= 0 && c < 128 ) ; -} #endif - +#endif