From: Stefan Csomor Date: Sat, 5 Jul 2003 19:47:07 +0000 (+0000) Subject: moved c-runtime functions for CW here, only add strdup for MSL versions prior to... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2bb1e1f47634c40bd4282962a2c5c40b618bc65b moved c-runtime functions for CW here, only add strdup for MSL versions prior to PRO 8 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/wxchar.cpp b/src/common/wxchar.cpp index 260d191fea..b2ee62e732 100644 --- a/src/common/wxchar.cpp +++ b/src/common/wxchar.cpp @@ -1373,3 +1373,20 @@ WXDLLEXPORT wxChar * wxStrtok(wxChar *psz, const wxChar *delim, wxChar **save_pt #endif // wxStrtok +// ---------------------------------------------------------------------------- +// missing C RTL functions +// ---------------------------------------------------------------------------- + +#if defined( __MWERKS__ ) && !defined(__MACH__) +#if __MSL__ < 0x00008000 +char *strdup(const char *s) +{ + return strcpy( (char*) malloc( strlen( s ) + 1 ) , s ) ; +} +#endif +int isascii( int c ) +{ + return ( c >= 0 && c < 128 ) ; +} +#endif // __MWERKS__ +