]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/wxchar.h
fixed wxDebugContext to work with global and static objects (patch 901031)
[wxWidgets.git] / include / wx / wxchar.h
index eb2dd42e9ce4875d08c2985fdafbb2648de30590..5a6263ac63e4b72de93e652bfa87c0965d7ade99 100644 (file)
         #define HAVE_WCHAR_H
     #endif
 #endif
+#if defined(__MWERKS__) && !defined(__MACH__)
+       #ifndef HAVE_WCSLEN
+               #define HAVE_WCSLEN
+       #endif
+#endif
 
 #if wxUSE_WCHAR_T
     #ifdef HAVE_WCHAR_H
     #include <ctype.h>
 #elif defined(__WATCOMC__)
     #define wxHAVE_TCHAR_SUPPORT
+#elif defined(__DMC__)
+    #define wxHAVE_TCHAR_SUPPORT
 #elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 )
     #define wxHAVE_TCHAR_SUPPORT
     #include <stddef.h>
     #define  wxPutchar   _puttchar
     #define  wxPuts      _putts
     #define  wxScanf     _tscanf
-    #define  wxSprintf   _stprintf
+    #if defined(__DMC__)
+        #if wxUSE_UNICODE
+            /* Digital Mars adds count to _stprintf (C99) so prototype conversion see wxchar.cpp */
+            int wxSprintf (wchar_t * __RESTRICT s, const wchar_t * __RESTRICT format, ... ) ;
+        #else
+            /* and there is a bug in D Mars tchar.h prior to 8.39.4n, so define as sprintf */
+            #define wxSprintf sprintf
+        #endif
+    #else
+        #define  wxSprintf   _stprintf
+    #endif
+
     #define  wxSscanf    _stscanf
     #define  wxTmpnam    _ttmpnam
     #define  wxUngetc    _tungetc
         #include <wctype.h>
 
         /* this is probably glibc-specific */
-        #if defined(__WCHAR_TYPE__)
+        #if defined(__WCHAR_TYPE__) && !defined(__MWERKS__)
             /* ctype.h functions (wctype.h) */
             #define  wxIsalnum   iswalnum
             #define  wxIsalpha   iswalpha
             #define  wxCtime     wctime
             /* #define  wxStrftime  wcsftime */
 
-            /*
-            #define wxNEED_FPUTWC
-
-            #include <stdio.h>
-
-            int wxFputs(const wxChar *ch, FILE *stream);
-            int wxPutc(wxChar ch, FILE *stream);
-
-            #define wxPuts(ws) wxFputs(ws, stdout)
-            #define wxPutchar(wch) wxPutc(wch, stdout)
-
-            #define wxNEED_PRINTF_CONVERSION
-            #define wxNEED_WX_STDIO_H
-            #define wxNEED_WX_STDLIB_H
-            */
             #define wxNEED_WX_TIME_H
         #else /* !metrowerks for apple */
             #error  "Please define wide character functions for your environment"