]> git.saurik.com Git - wxWidgets.git/commitdiff
wxOS2 with Open Watcom: correct PCH usage, missing headers, warning fixes, source...
authorWłodzimierz Skiba <abx@abx.art.pl>
Thu, 21 Jul 2005 16:22:28 +0000 (16:22 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Thu, 21 Jul 2005 16:22:28 +0000 (16:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/cshelp.cpp
src/common/debugrpt.cpp
src/common/filefn.cpp
src/common/filename.cpp
src/common/imagfill.cpp
src/common/imagpng.cpp
src/common/mimecmn.cpp
src/common/quantize.cpp
src/common/textcmn.cpp
src/generic/colrdlgg.cpp
src/generic/dbgrptg.cpp

index 31af18593eccb88fb6c91207a4619f393198d0d6..b8d7e4b7b2a17d4b85d8bad9a02ab2129a0085b4 100644 (file)
@@ -254,6 +254,8 @@ bool wxContextHelp::DispatchEvent(wxWindow* win, const wxPoint& pt)
  * to put the application into context help mode.
  */
 
+#ifndef __WXPM__
+
 static const char * csquery_xpm[] = {
 "12 11 2 1",
 "  c None",
@@ -270,6 +272,8 @@ static const char * csquery_xpm[] = {
 "     ..     ",
 "            "};
 
+#endif
+
 IMPLEMENT_CLASS(wxContextHelpButton, wxBitmapButton)
 
 BEGIN_EVENT_TABLE(wxContextHelpButton, wxBitmapButton)
index e9d477c1fa9baa1556d77855057edcfe7328d42e..0717408f4fc52d045a70a1777350039a0fca8c46 100644 (file)
@@ -103,7 +103,7 @@ TextElement(wxXmlNode *node, const wxChar *name, const wxString& value)
 {
     wxXmlNode *nodeChild = new wxXmlNode(wxXML_ELEMENT_NODE, name);
     node->AddChild(nodeChild);
-    nodeChild->AddChild(new wxXmlNode(wxXML_TEXT_NODE, _T(""), value));
+    nodeChild->AddChild(new wxXmlNode(wxXML_TEXT_NODE, wxEmptyString, value));
 }
 
 static inline void
@@ -690,4 +690,3 @@ bool wxDebugReportUpload::DoProcess()
 #endif // wxUSE_ZIPSTREAM
 
 #endif // wxUSE_DEBUGREPORT
-
index 7b7a499f5f25168209b3a15b18928c11d53c61ba..fc1dc7dc9504f36d2443477d5108534e70b7ceca 100644 (file)
@@ -1151,6 +1151,7 @@ bool wxMkdir(const wxString& dir, int perm)
     if ( mkdir(wxFNCONV(dirname), perm) != 0 )
   #endif
 #elif defined(__OS2__)
+    wxUnusedVar(perm);
     if (::DosCreateDir((PSZ)dirname, NULL) != 0) // enhance for EAB's??
 #elif defined(__DOS__)
   #if defined(__WATCOMC__)
@@ -1228,7 +1229,7 @@ bool wxDirExists(const wxChar *pszPathName)
 
     return (ret != (DWORD)-1) && (ret & FILE_ATTRIBUTE_DIRECTORY);
 #elif defined(__OS2__)
-    return (::DosSetCurrentDir((PSZ)(WXSTRINGCAST strPath)));
+    return (bool)(::DosSetCurrentDir((PSZ)(WXSTRINGCAST strPath)));
 #else // !__WIN32__
 
     wxStructStat st;
@@ -1406,7 +1407,7 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz)
                                       ,cbuf + 3
                                       ,(PULONG)&sz
                                      );
-            cbuf[0] = 'A' + (ulDriveNum - 1);
+            cbuf[0] = char('A' + (ulDriveNum - 1));
             cbuf[1] = ':';
             cbuf[2] = '\\';
             ok = rc == 0;
index c1a128ffc155dbbb1d0c6af8ae80f7ced90cba44..9af9313ac4f282b6474e4cb8640855be8fe2cdaa 100644 (file)
@@ -1910,6 +1910,9 @@ bool wxFileName::SetTimes(const wxDateTime *dtAccess,
         return true;
     }
 #else // other platform
+    wxUnusedVar(dtAccess);
+    wxUnusedVar(dtMod);
+    wxUnusedVar(dtCreate);
 #endif // platforms
 
     wxLogSysError(_("Failed to modify file times for '%s'"),
@@ -2000,6 +2003,9 @@ bool wxFileName::GetTimes(wxDateTime *dtAccess,
         return true;
     }
 #else // other platform
+    wxUnusedVar(dtAccess);
+    wxUnusedVar(dtMod);
+    wxUnusedVar(dtCreate);
 #endif // platforms
 
     wxLogSysError(_("Failed to retrieve file times for '%s'"),
index bfe5345247156609630ba84a5c80c64f3da45aa6..9545f46ed4cee3ec0310c97923dd31e7e79c81c6 100644 (file)
@@ -62,7 +62,7 @@ static void LINKAGEMODE
 wxImageFloodFill(wxImage *image,
                  wxCoord x, wxCoord y, const wxBrush & fillBrush,
                  const wxColour& testColour, int style,
-                int LogicalFunction)
+                 int WXUNUSED(LogicalFunction))
 {
     /* A diamond flood-fill using a circular queue system.
     Each pixel surrounding the current pixel is added to
@@ -309,4 +309,3 @@ bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y,
 }
 
 #endif // wxUSE_IMAGE
-
index 007bfadaf0e275d247f8761ec13f9405681430aa..bf3b40ab493b5cb8422a49ec8f4e4760425f5b3d 100644 (file)
@@ -109,7 +109,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPNGHandler,wxImageHandler)
 #if wxUSE_STREAMS
 
 #ifndef PNGLINKAGEMODE
-    #ifdef __WATCOMC__
+    #if defined(__WATCOMC__) && defined(__WXMSW__)
         // we need an explicit cdecl for Watcom, at least according to
         //
         // http://sf.net/tracker/index.php?func=detail&aid=651492&group_id=9863&atid=109863
index e6ca2e5f6352d815104f1e3bed4417471cd188a4..3ac318ce0bf3a76c3d63f987e0f2292f2bde9a6c 100644 (file)
@@ -412,12 +412,16 @@ bool wxFileType::Unassociate()
 #endif
 }
 
-bool wxFileType::SetCommand(const wxString& cmd, const wxString& verb,
-bool overwriteprompt)
+bool wxFileType::SetCommand(const wxString& cmd,
+                            const wxString& verb,
+                            bool overwriteprompt)
 {
 #if defined (__WXMSW__)  || defined(__UNIX__)
     return m_impl->SetCommand(cmd, verb, overwriteprompt);
 #else
+    wxUnusedVar(cmd);
+    wxUnusedVar(verb);
+    wxUnusedVar(overwriteprompt);
     wxFAIL_MSG(_T("not implemented"));
     return false;
 #endif
@@ -437,8 +441,8 @@ bool wxFileType::SetDefaultIcon(const wxString& cmd, int index)
 #if defined (__WXMSW__) || defined(__UNIX__)
     return m_impl->SetDefaultIcon (cmd, index);
 #else
+    wxUnusedVar(index);
     wxFAIL_MSG(_T("not implemented"));
-
     return false;
 #endif
 }
@@ -506,6 +510,7 @@ wxMimeTypesManager::Associate(const wxFileTypeInfo& ftInfo)
 #if defined(__WXMSW__) || defined(__UNIX__)
     return m_impl->Associate(ftInfo);
 #else // other platforms
+    wxUnusedVar(ftInfo);
     wxFAIL_MSG( _T("not implemented") ); // TODO
     return NULL;
 #endif // platforms
index 37674b2c4b40a8e078d5cab68d55bc7c9cbd64ad..c230b983d9d8d04aeca96563d0ed43c484611ad1 100644 (file)
@@ -77,7 +77,7 @@
 
 typedef unsigned short UINT16;
 typedef signed short INT16;
-#ifndef __WATCOMC__
+#if !(defined(__WATCOMC__) && defined(__WXMSW__))
 typedef signed int INT32;
 #endif
 
@@ -1656,4 +1656,3 @@ bool wxQuantize::Quantize(const wxImage& src,
 
 #endif
     // wxUSE_IMAGE
-
index a9f1f0b34d169a0027749e674291b7ce579dd9e7..4ff84d8a285005908e5fb948973e06f3d19c2015 100644 (file)
@@ -362,7 +362,7 @@ bool wxTextCtrlBase::EmulateKeyPress(const wxKeyEvent& event)
         case WXK_NUMPAD7:
         case WXK_NUMPAD8:
         case WXK_NUMPAD9:
-            ch = _T('0') + keycode - WXK_NUMPAD0;
+            ch = (wxChar)(_T('0') + keycode - WXK_NUMPAD0);
             break;
 
         case WXK_MULTIPLY:
@@ -523,4 +523,3 @@ wxTextCtrlBase::HitTest(const wxPoint& WXUNUSED(pt),
 DEFINE_EVENT_TYPE(wxEVT_COMMAND_TEXT_UPDATED)
 
 #endif // wxUSE_TEXTCTRL/!wxUSE_TEXTCTRL
-
index b75a681dea703b9cfffc8e5549a003dfe8ed9bf5..6ac7e393d8c214a4840599921c2961714035b63e 100644 (file)
@@ -211,15 +211,17 @@ void wxGenericColourDialog::OnMouseEvent(wxMouseEvent& event)
 void wxGenericColourDialog::OnPaint(wxPaintEvent& event)
 {
 #if !defined(__WXMOTIF__) && !defined(__WXPM__) && !defined(__WXCOCOA__)
-  wxDialog::OnPaint(event);
+    wxDialog::OnPaint(event);
+#else
+    wxUnusedVar(event);
 #endif
 
-  wxPaintDC dc(this);
+    wxPaintDC dc(this);
 
-  PaintBasicColours(dc);
-  PaintCustomColours(dc);
-  PaintCustomColour(dc);
-  PaintHighlight(dc, true);
+    PaintBasicColours(dc);
+    PaintCustomColours(dc);
+    PaintCustomColour(dc);
+    PaintHighlight(dc, true);
 }
 
 void wxGenericColourDialog::CalculateMeasurements()
@@ -597,4 +599,3 @@ void wxGenericColourDialog::OnBlueSlider(wxCommandEvent& WXUNUSED(event))
 #endif // wxUSE_SLIDER
 
 #endif // wxUSE_COLOURDLG && !defined(__WXGTK20__)
-
index efb75d241b0c6c3d9d73433ad15a999cbab2a68d..fae5ccd21f3bc5311956915c9584eba73078e3c1 100644 (file)
@@ -131,14 +131,21 @@ public:
     wxString m_command;
 
 private:
+
+#if wxUSE_FILEDLG
     void OnBrowse(wxCommandEvent& event);
+#endif // wxUSE_FILEDLG
 
     DECLARE_EVENT_TABLE()
     DECLARE_NO_COPY_CLASS(wxDumpOpenExternalDlg)
 };
 
 BEGIN_EVENT_TABLE(wxDumpOpenExternalDlg, wxDialog)
+
+#if wxUSE_FILEDLG
     EVT_BUTTON(wxID_MORE, wxDumpOpenExternalDlg::OnBrowse)
+#endif
+
 END_EVENT_TABLE()
 
 
@@ -180,12 +187,17 @@ wxDumpOpenExternalDlg::wxDumpOpenExternalDlg(wxWindow *parent,
                               );
     sizerH->Add(command,
                     wxSizerFlags(1).Align(wxALIGN_CENTER_VERTICAL));
+
+#if wxUSE_FILEDLG
+
     wxButton *browse = new wxButton(this, wxID_MORE, wxT(">>"),
                                     wxDefaultPosition, wxDefaultSize,
                                     wxBU_EXACTFIT);
     sizerH->Add(browse,
                 wxSizerFlags(0).Align(wxALIGN_CENTER_VERTICAL). Border(wxLEFT));
 
+#endif // wxUSE_FILEDLG
+
     sizerTop->Add(sizerH, wxSizerFlags(0).Expand().Border());
 
     sizerTop->Add(new wxStaticLine(this), wxSizerFlags().Expand().Border());
@@ -204,6 +216,8 @@ wxDumpOpenExternalDlg::wxDumpOpenExternalDlg(wxWindow *parent,
     command->SetFocus();
 }
 
+#if wxUSE_FILEDLG
+
 void wxDumpOpenExternalDlg::OnBrowse(wxCommandEvent& )
 {
     wxFileName fname(m_command);
@@ -222,6 +236,7 @@ void wxDumpOpenExternalDlg::OnBrowse(wxCommandEvent& )
     }
 }
 
+#endif // wxUSE_FILEDLG
 
 // ----------------------------------------------------------------------------
 // wxDebugReportDialog: class showing debug report to the user
@@ -401,7 +416,7 @@ bool wxDebugReportDialog::TransferDataFromWindow()
 void wxDebugReportDialog::OnView(wxCommandEvent& )
 {
     const int sel = m_checklst->GetSelection();
-    wxCHECK_RET( sel != -1, _T("invalid selection in OnView()") );
+    wxCHECK_RET( sel != wxNOT_FOUND, _T("invalid selection in OnView()") );
 
     wxFileName fn(m_dbgrpt.GetDirectory(), m_files[sel]);
     wxString str;
@@ -417,7 +432,7 @@ void wxDebugReportDialog::OnView(wxCommandEvent& )
 void wxDebugReportDialog::OnOpen(wxCommandEvent& )
 {
     const int sel = m_checklst->GetSelection();
-    wxCHECK_RET( sel != -1, _T("invalid selection in OnOpen()") );
+    wxCHECK_RET( sel != wxNOT_FOUND, _T("invalid selection in OnOpen()") );
 
     wxFileName fn(m_dbgrpt.GetDirectory(), m_files[sel]);
 
@@ -498,4 +513,3 @@ bool wxDebugReportPreviewStd::Show(wxDebugReport& dbgrpt) const
 }
 
 #endif // wxUSE_DEBUGREPORT
-