X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5e0d7b6bce53ad3ceb3c832925c25d2e614a0d62..b0cb01589f81b1794e07b82ff3d23f9757fb33d2:/src/common/wxchar.cpp diff --git a/src/common/wxchar.cpp b/src/common/wxchar.cpp index 260d191fea..6b2a005483 100644 --- a/src/common/wxchar.cpp +++ b/src/common/wxchar.cpp @@ -1009,7 +1009,8 @@ int WXDLLEXPORT wxStricmp(const wxChar *psz1, const wxChar *psz2) #ifndef wxStricmp int WXDLLEXPORT wxStrnicmp(const wxChar *s1, const wxChar *s2, size_t n) { - register wxChar c1, c2; + // initialize the variables just to suppress stupid gcc warning + register wxChar c1 = 0, c2 = 0; while (n && ((c1 = wxTolower(*s1)) == (c2 = wxTolower(*s2)) ) && c1) n--, s1++, s2++; if (n) { if (c1 < c2) return -1; @@ -1373,3 +1374,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__ +