X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4676948b6814c97b93c431a8cbcd8c0352c87ba9..f1e269209afbcbec4e46ab5df4ba43d902a6bf2f:/src/common/wxchar.cpp diff --git a/src/common/wxchar.cpp b/src/common/wxchar.cpp index 02ca10af2f..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,9 +1402,28 @@ 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 ) ; + return ( c >= 0 && c < 128 ); +} +#endif + +#if defined(__WXWINCE__) +void *calloc( size_t num, size_t size ) +{ + void** ptr = (void **)malloc(num * size); + memset( ptr, 0, num * size); + return ptr; } -#endif // __MWERKS__ +#if (_WIN32_WCE <= 211) +int isspace(int c) +{ + return (c == ' '); +} +#endif + +#endif