]> git.saurik.com Git - wxWidgets.git/commitdiff
moved c-runtime functions for CW here, only add strdup for MSL versions prior to...
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 5 Jul 2003 19:47:07 +0000 (19:47 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 5 Jul 2003 19:47:07 +0000 (19:47 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/wxchar.cpp

index 260d191fea85883f14e25106fc4658c182c7db2b..b2ee62e7322fdd1b4573b5e80864076de4e86b5a 100644 (file)
@@ -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__
+