cleaning up strdup/isascii definitions for compilers which lack them (should fix CW CFM build)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2004-10-05 21:57:40 +00:00
parent 3c4e4af64e
commit 27db421056
3 changed files with 42 additions and 40 deletions

View File

@@ -1427,8 +1427,8 @@ WXDLLEXPORT wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_pt
// missing C RTL functions
// ----------------------------------------------------------------------------
#if (defined(__MWERKS__) && !defined(__MACH__) && (__MSL__ < 0x00008000)) || \
defined(__WXWINCE__)
#if wxNEED_STRDUP
char *strdup(const char *s)
{
char *dest = (char*) malloc( strlen( s ) + 1 ) ;
@@ -1436,30 +1436,17 @@ char *strdup(const char *s)
strcpy( dest , s ) ;
return dest ;
}
#endif
#if (defined(__MWERKS__) && !defined(__MACH__)) || (defined(__WXWINCE__) && _WIN32_WCE <= 211)
int isascii( int c )
{
return ( c >= 0 && c < 128 );
}
#endif
#endif // wxNEED_STRDUP
#if defined(__WXWINCE__) && (_WIN32_WCE <= 211)
#if (_WIN32_WCE < 300)
void *calloc( size_t num, size_t size )
{
void** ptr = (void **)malloc(num * size);
memset( ptr, 0, num * size);
return ptr;
}
#endif
int isspace(int c)
{
return (c == ' ');
}
#endif
#endif // __WXWINCE__ <= 211