]> git.saurik.com Git - wxWidgets.git/commitdiff
Digital Mars compilation warnings and Unicode fixes (patch 884587)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Feb 2004 15:07:08 +0000 (15:07 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Feb 2004 15:07:08 +0000 (15:07 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25561 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/filefn.h
include/wx/univ/checklst.h
include/wx/univ/combobox.h
include/wx/wxchar.h
src/common/filefn.cpp
src/univ/combobox.cpp

index c59b78a0155bd998c9cbe3c588c7e4c3fbb49d20..eb714186e38f6997629bad6680544a4e8e0b7728 100644 (file)
@@ -75,6 +75,7 @@ enum wxSeekMode
 #if defined( __VISUALC__ ) \
     || ( defined(__MINGW32__) && !defined(__WINE__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \
     || ( defined(__MWERKS__) && defined(__WXMSW__) ) \
+    || ( defined(__DMC__) && defined(__WXMSW__) ) \
     || ( defined(__WATCOMC__) && defined(__WXMSW__) )
     // functions
 #if defined(__BORLANDC__) || defined(__WATCOMC__)
@@ -163,6 +164,9 @@ enum wxSeekMode
 #if defined(__MWERKS__) && defined(macintosh)
        #include <sys/stat.h>
 #endif
+#if defined(__DMC__)
+    typedef unsigned long mode_t;
+#endif
 WXDLLIMPEXP_BASE int wxStat( const wxChar *file_name, wxStructStat *buf );
 WXDLLIMPEXP_BASE int wxAccess( const wxChar *pathname, int mode );
 WXDLLIMPEXP_BASE int wxOpen( const wxChar *pathname, int flags, mode_t mode );
index af878cad02b634807e2486699e43797a91a5bd99..d9a5b32a0a5eccf4156ebcb479330e0e717352a8 100644 (file)
@@ -37,7 +37,7 @@ public:
                    const wxPoint& pos = wxDefaultPosition,
                    const wxSize& size = wxDefaultSize,
                    int nStrings = 0,
-                   const wxString *choices = NULL,
+                   const wxString choices[] = NULL,
                    long style = 0,
                    const wxValidator& validator = wxDefaultValidator,
                    const wxString& name = wxListBoxNameStr)
@@ -60,7 +60,7 @@ public:
                 const wxPoint& pos = wxDefaultPosition,
                 const wxSize& size = wxDefaultSize,
                 int nStrings = 0,
-                const wxString *choices = NULL,
+                const wxString choices[] = (const wxString *) NULL,
                 long style = 0,
                 const wxValidator& validator = wxDefaultValidator,
                 const wxString& name = wxListBoxNameStr);
index bfc643c696d45a06e156ba6171c5719cf53ff12b..52fa4b46b838b48046ad06f51015279fa991fab8 100644 (file)
@@ -221,7 +221,7 @@ public:
                const wxPoint& pos = wxDefaultPosition,
                const wxSize& size = wxDefaultSize,
                int n = 0,
-               const wxString *choices = (const wxString *) NULL,
+               const wxString choices[] = (const wxString *) NULL,
                long style = 0,
                const wxValidator& validator = wxDefaultValidator,
                const wxString& name = wxComboBoxNameStr)
index eb2dd42e9ce4875d08c2985fdafbb2648de30590..ad9d3539908f4d82ceb1cee4ffca610c57b750e8 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
+    #if defined(__DMC__)
+        /* Digital Mars adds count to _stprintf (C99) so it does not fit wxWindows needs */
+        /* Instead of it we can use function from MSW api (FIXME: doesn't work) */
+        #ifdef wxUSE_UNICODE
+            #define wxSprintf wsprintfW
+        #else
+            #define wxSprintf wsprintfA
+        #endif
+    #else
     #define  wxSprintf   _stprintf
+    #endif
     #define  wxSscanf    _stscanf
     #define  wxTmpnam    _ttmpnam
     #define  wxUngetc    _tungetc
index 92692711ad1f04d62ee085db6db1ac0ab97cba9c..c9daf16772c19ce2335b3ee73848bbef22a05149 100644 (file)
@@ -1303,6 +1303,7 @@ bool wxRemoveFile(const wxString& file)
 #if defined(__VISUALC__) \
  || defined(__BORLANDC__) \
  || defined(__WATCOMC__) \
+ || defined(__DMC__) \
  || defined(__GNUWIN32__)
   int res = wxRemove(file);
 #elif defined(__WXMAC__)
index 6c3be430e55b27f6f2a82ae27fda0adf7071e668..83ecde8dc1266749838e93fd2741802828a1f64c 100644 (file)
@@ -694,7 +694,7 @@ bool wxComboBox::Create(wxWindow *parent,
                         const wxPoint& pos,
                         const wxSize& size,
                         int n,
-                        const wxString *choices,
+                        const wxString choices[],
                         long style,
                         const wxValidator& validator,
                         const wxString& name)