wxOS2 with Open Watcom: correct PCH usage, missing headers, warning fixes, source cleaning and other Watcom adjustements.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba 2005-07-21 16:22:28 +00:00
parent 48962b9fdd
commit 7a893a3152
11 changed files with 51 additions and 24 deletions

View 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)

View 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

View 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;

View 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'"),

View 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

View 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

View 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

View 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

View 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

View 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__)

View 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