]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/wxchar.h
Since this class is fully inline don't specify an import/export policy
[wxWidgets.git] / include / wx / wxchar.h
index eb2dd42e9ce4875d08c2985fdafbb2648de30590..3a126dad6ee3bb00955e82e48f1190dbc57964e1 100644 (file)
     #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"