cut-and-paste is not good idea, removed duplicated code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1392,8 +1392,8 @@ WXDLLEXPORT wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_pt
|
|||||||
// missing C RTL functions
|
// missing C RTL functions
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined( __MWERKS__ ) && !defined(__MACH__)
|
#if (defined(__MWERKS__) && !defined(__MACH__) && (__MSL__ < 0x00008000)) || \
|
||||||
#if __MSL__ < 0x00008000
|
defined(__WXWINCE__)
|
||||||
char *strdup(const char *s)
|
char *strdup(const char *s)
|
||||||
{
|
{
|
||||||
char *dest = (char*) malloc( strlen( s ) + 1 ) ;
|
char *dest = (char*) malloc( strlen( s ) + 1 ) ;
|
||||||
@@ -1402,21 +1402,15 @@ char *strdup(const char *s)
|
|||||||
return dest ;
|
return dest ;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if (defined(__MWERKS__) && !defined(__MACH__)) || defined(__WXWINCE__)
|
||||||
int isascii( int c )
|
int isascii( int c )
|
||||||
{
|
{
|
||||||
return ( c >= 0 && c < 128 );
|
return ( c >= 0 && c < 128 );
|
||||||
}
|
}
|
||||||
#endif // __MWERKS__
|
#endif
|
||||||
|
|
||||||
#ifdef __WXWINCE__
|
|
||||||
char* strdup(const char* s)
|
|
||||||
{
|
|
||||||
char *dest = (char*) malloc( strlen( s ) + 1 ) ;
|
|
||||||
if ( dest )
|
|
||||||
strcpy( dest , s ) ;
|
|
||||||
return dest ;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
#if defined(__WXWINCE__)
|
||||||
void *calloc( size_t num, size_t size )
|
void *calloc( size_t num, size_t size )
|
||||||
{
|
{
|
||||||
void** ptr = (void **)malloc(num * size);
|
void** ptr = (void **)malloc(num * size);
|
||||||
@@ -1428,11 +1422,4 @@ int isspace(int c)
|
|||||||
{
|
{
|
||||||
return (c == ' ');
|
return (c == ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
int isascii( int c )
|
|
||||||
{
|
|
||||||
return ( c >= 0 && c < 128 ) ;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user