From feeb8165970889f393d4a1bf2dae2a1505fd5e4c Mon Sep 17 00:00:00 2001 From: David Webster Date: Thu, 9 Sep 1999 21:22:51 +0000 Subject: [PATCH] Latest OS/2 compiler bug fixes for common and generic git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/image.h | 16 +++++++++++++++- include/wx/socket.h | 2 +- src/common/extended.c | 2 ++ src/common/imagpng.cpp | 8 ++++---- src/common/unzip.c | 2 ++ src/generic/proplist.cpp | 18 +++++++++--------- 6 files changed, 33 insertions(+), 15 deletions(-) diff --git a/include/wx/image.h b/include/wx/image.h index b02c3dddfe..4f2ae49885 100644 --- a/include/wx/image.h +++ b/include/wx/image.h @@ -106,6 +106,9 @@ public: virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE ); virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE ); virtual bool CanRead( wxInputStream& stream ); +private: + // hiding base class virtuals again! + inline bool CanRead( const wxString& name ) { return(wxImageHandler::CanRead(name)); }; #endif }; #endif @@ -133,6 +136,9 @@ public: virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE ); virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE ); virtual bool CanRead( wxInputStream& stream ); +private: + // hiding base class virtuals again! + inline bool CanRead( const wxString& name ) { return(wxImageHandler::CanRead(name)); }; #endif }; #endif @@ -158,6 +164,9 @@ public: #if wxUSE_STREAMS virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE ); virtual bool CanRead( wxInputStream& stream ); +private: + // hiding base class virtuals again! + inline bool CanRead( const wxString& name ) { return(wxImageHandler::CanRead(name)); }; #endif }; @@ -166,7 +175,6 @@ public: //----------------------------------------------------------------------------- #if wxUSE_LIBGIF - class WXDLLEXPORT wxGIFHandler : public wxImageHandler { DECLARE_DYNAMIC_CLASS(wxGIFHandler) @@ -185,6 +193,9 @@ public: virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE ); virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE ); virtual bool CanRead( wxInputStream& stream ); +private: + // hiding base class virtuals again! + inline bool CanRead( const wxString& name ) { return(wxImageHandler::CanRead(name)); }; #endif }; #endif @@ -212,6 +223,9 @@ public: virtual bool LoadFile( wxImage *image, wxInputStream& stream, bool verbose=TRUE ); virtual bool SaveFile( wxImage *image, wxOutputStream& stream, bool verbose=TRUE ); virtual bool CanRead( wxInputStream& stream ); +private: + // hiding base class virtuals again! + inline bool CanRead( const wxString& name ) { return(wxImageHandler::CanRead(name)); }; #endif }; #endif diff --git a/include/wx/socket.h b/include/wx/socket.h index 77a04e2f24..9103aeb2f2 100644 --- a/include/wx/socket.h +++ b/include/wx/socket.h @@ -48,7 +48,7 @@ enum { wxSOCKET_INPUT_FLAG = GSOCK_INPUT_FLAG, wxSOCKET_OUTPUT_FLAG = GSOCK_OUTPUT_FLAG, wxSOCKET_CONNECTION_FLAG = GSOCK_CONNECTION_FLAG, - wxSOCKET_LOST_FLAG = GSOCK_LOST_FLAG, + wxSOCKET_LOST_FLAG = GSOCK_LOST_FLAG }; typedef GSocketEventFlags wxSocketEventFlags; diff --git a/src/common/extended.c b/src/common/extended.c index 6de1ae2aa8..c691e6b1a5 100644 --- a/src/common/extended.c +++ b/src/common/extended.c @@ -1,4 +1,6 @@ +#if !defined(__VISAGECPP__) # pragma warning(disable:4001) /* non standard extension used: single line comment */ +#endif #include "wx/setup.h" #include diff --git a/src/common/imagpng.cpp b/src/common/imagpng.cpp index 7609aae068..5c3f19eeee 100644 --- a/src/common/imagpng.cpp +++ b/src/common/imagpng.cpp @@ -78,7 +78,7 @@ static void LINKAGEMODE _PNG_stream_writer( png_structp png_ptr, png_bytep data, // from pngerror.c // so that the libpng doesn't send anything on stderr void -png_silent_error(png_structp png_ptr, png_const_charp WXUNUSED(message)) +LINKAGEMODE png_silent_error(png_structp png_ptr, png_const_charp WXUNUSED(message)) { #ifdef USE_FAR_KEYWORD { @@ -92,7 +92,7 @@ png_silent_error(png_structp png_ptr, png_const_charp WXUNUSED(message)) } void -png_silent_warning(png_structp WXUNUSED(png_ptr), png_const_charp WXUNUSED(message)) +LINKAGEMODE png_silent_warning(png_structp WXUNUSED(png_ptr), png_const_charp WXUNUSED(message)) { } @@ -349,8 +349,8 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos bool wxPNGHandler::CanRead( wxInputStream& stream ) { unsigned char hdr[4]; - - stream.Read(&hdr, 4); + + stream.Read(&hdr, 4); stream.SeekI(-4, wxFromCurrent); return (hdr[0] == 0x89 && hdr[1] == 'P' && hdr[2] == 'N' && hdr[3] == 'G'); } diff --git a/src/common/unzip.c b/src/common/unzip.c index 5d27912453..4faeb06a33 100644 --- a/src/common/unzip.c +++ b/src/common/unzip.c @@ -4,7 +4,9 @@ Read unzip.h for more info */ +#if !defined(__VISAGECPP__) # pragma warning(disable:4001) /* non standard extension used: single line comment */ +#endif #include "wx/setup.h" #if wxUSE_ZLIB && wxUSE_ZIPSTREAM diff --git a/src/generic/proplist.cpp b/src/generic/proplist.cpp index b35a76fb74..30c31e44a6 100644 --- a/src/generic/proplist.cpp +++ b/src/generic/proplist.cpp @@ -433,7 +433,7 @@ bool wxPropertyListView::CreateControls() // panel->SetClientData((char *)this); wxBoxSizer *mainsizer = new wxBoxSizer( wxVERTICAL ); - + // top row with optional buttons and input line wxBoxSizer *topsizer = new wxBoxSizer( wxHORIZONTAL ); @@ -456,11 +456,11 @@ bool wxPropertyListView::CreateControls() topsizer->Add( m_cancelButton, 0, wxLEFT|wxTOP|wxBOTTOM | wxEXPAND, buttonborder ); } - m_valueText = new wxPropertyTextEdit(this, panel, wxID_PROP_TEXT, "", + m_valueText = new wxPropertyTextEdit(this, panel, wxID_PROP_TEXT, "", wxPoint(-1, -1), wxSize(-1, smallButtonSize.y), wxPROCESS_ENTER); m_valueText->Enable(FALSE); topsizer->Add( m_valueText, 1, wxALL | wxEXPAND, buttonborder ); - + if (m_buttonFlags & wxPROP_PULLDOWN) { m_editButton = new wxButton(panel, wxID_PROP_EDIT, "...", wxPoint(-1, -1), smallButtonSize); @@ -481,7 +481,7 @@ bool wxPropertyListView::CreateControls() m_propertyScrollingList->SetFont(* boringFont); m_middleSizer->Add( m_propertyScrollingList, 1, wxALL|wxEXPAND, buttonborder ); - mainsizer->Add( m_middleSizer, 1, wxEXPAND ); + mainsizer->Add( m_middleSizer, 1, wxEXPAND ); // bottom row with buttons @@ -492,7 +492,7 @@ bool wxPropertyListView::CreateControls() { wxBoxSizer *bottomsizer = new wxBoxSizer( wxHORIZONTAL ); buttonborder = 5; - + if (m_buttonFlags & wxPROP_BUTTON_OK) { m_windowCloseButton = new wxButton(panel, wxID_OK, _("OK"), wxPoint(-1, -1), largeButtonSize ); @@ -533,16 +533,16 @@ void wxPropertyListView::ShowTextControl(bool show) void wxPropertyListView::ShowListBoxControl(bool show) { if (!m_valueList) return; - + m_valueList->Show(show); - + if (m_buttonFlags & wxPROP_DYNAMIC_VALUE_FIELD) { if (show) m_middleSizer->Prepend( m_valueList, 0, wxTOP|wxLEFT|wxRIGHT | wxEXPAND, 3 ); else m_middleSizer->Remove( 0 ); - + m_propertyWindow->Layout(); } } @@ -1840,7 +1840,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPropertyModule,wxModule) bool wxPropertyModule::OnInit() { -#ifdef __WXMSW__ +#if defined(__WXMSW__) || defined(__WXOS2__) gs_tickBitmap = new wxBitmap("tick_bmp", wxBITMAP_TYPE_RESOURCE); gs_crossBitmap = new wxBitmap("cross_bmp", wxBITMAP_TYPE_RESOURCE); #else -- 2.45.2