From e02afc7a273702ca567431b209415b7bd2b290d0 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 20 Jan 1999 15:04:56 +0000 Subject: [PATCH] wxUSE_STREAM corrected to wxUSE_STREAMS git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/image.cpp | 30 +++++++++++++++--------------- src/common/variant.cpp | 40 ++++++++++++++++++++-------------------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/src/common/image.cpp b/src/common/image.cpp index 4dea748e12..e749f5d39d 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -100,12 +100,12 @@ wxImage::wxImage( const wxString& name, long type ) LoadFile( name, type ); } -#if wxUSE_STREAM +#if wxUSE_STREAMS wxImage::wxImage( wxInputStream& stream, long type ) { LoadFile( stream, type ); } -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS wxImage::wxImage( const wxImage& image ) { @@ -312,7 +312,7 @@ int wxImage::GetHeight() const bool wxImage::LoadFile( const wxString& filename, long type ) { -#if wxUSE_STREAM +#if wxUSE_STREAMS if (wxFileExists(filename)) { wxFileInputStream stream(filename); @@ -324,24 +324,24 @@ bool wxImage::LoadFile( const wxString& filename, long type ) return FALSE; } -#else // !wxUSE_STREAM +#else // !wxUSE_STREAMS return FALSE; -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS } bool wxImage::SaveFile( const wxString& filename, int type ) { -#if wxUSE_STREAM +#if wxUSE_STREAMS wxFileOutputStream stream(filename); if ( stream.LastError() == wxStream_NOERROR ) return SaveFile(stream, type); else -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS return FALSE; } -#if wxUSE_STREAM +#if wxUSE_STREAMS bool wxImage::LoadFile( wxInputStream& stream, long type ) { UnRef(); @@ -375,7 +375,7 @@ bool wxImage::SaveFile( wxOutputStream& stream, int type ) return handler->SaveFile( this, stream ); } -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS void wxImage::AddHandler( wxImageHandler *handler ) { @@ -473,7 +473,7 @@ void wxImage::CleanUpHandlers() IMPLEMENT_DYNAMIC_CLASS(wxImageHandler,wxObject) #endif -#if wxUSE_STREAM +#if wxUSE_STREAMS bool wxImageHandler::LoadFile( wxImage *WXUNUSED(image), wxInputStream& WXUNUSED(stream) ) { return FALSE; @@ -483,7 +483,7 @@ bool wxImageHandler::SaveFile( wxImage *WXUNUSED(image), wxOutputStream& WXUNUSE { return FALSE; } -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS //----------------------------------------------------------------------------- // wxPNGHandler @@ -496,7 +496,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxPNGHandler,wxImageHandler) #endif -#if wxUSE_STREAM +#if wxUSE_STREAMS static void _PNG_stream_reader( png_structp png_ptr, png_bytep data, png_size_t length ) { ((wxInputStream*) png_get_io_ptr( png_ptr )) -> Read(data, length); @@ -749,7 +749,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream ) } return TRUE; } -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS #endif @@ -763,7 +763,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream ) IMPLEMENT_DYNAMIC_CLASS(wxBMPHandler,wxImageHandler) #endif -#if wxUSE_STREAM +#if wxUSE_STREAMS bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream ) { unsigned char *data, *ptr; @@ -1113,7 +1113,7 @@ bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream ) return TRUE; } -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS #ifdef __WXMSW__ diff --git a/src/common/variant.cpp b/src/common/variant.cpp index 86da34aa78..2612f8db24 100644 --- a/src/common/variant.cpp +++ b/src/common/variant.cpp @@ -299,10 +299,10 @@ public: virtual bool Read(istream& str); virtual bool Write(ostream& str) const; -#if wxUSE_STREAM +#if wxUSE_STREAMS virtual bool Read(wxInputStream& str); virtual bool Write(wxOutputStream &str) const; -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS virtual wxString GetType() const { return "long"; }; @@ -350,7 +350,7 @@ bool wxVariantDataLong::Read(istream& str) return TRUE; } -#if wxUSE_STREAM +#if wxUSE_STREAMS bool wxVariantDataLong::Write(wxOutputStream& str) const { str << m_value; @@ -362,7 +362,7 @@ bool wxVariantDataLong::Read(wxInputStream& str) str >> m_value; return TRUE; } -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS bool wxVariantDataLong::Read(wxString& str) { @@ -390,10 +390,10 @@ public: virtual bool Write(ostream& str) const; virtual bool Write(wxString& str) const; virtual bool Read(istream& str); -#if wxUSE_STREAM +#if wxUSE_STREAMS virtual bool Read(wxInputStream& str); virtual bool Write(wxOutputStream &str) const; -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS virtual wxString GetType() const { return "double"; }; protected: @@ -440,7 +440,7 @@ bool wxVariantDataReal::Read(istream& str) return TRUE; } -#if wxUSE_STREAM +#if wxUSE_STREAMS bool wxVariantDataReal::Write(wxOutputStream& str) const { str << m_value; @@ -452,7 +452,7 @@ bool wxVariantDataReal::Read(wxInputStream& str) str >> (float&)m_value; return TRUE; } -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS bool wxVariantDataReal::Read(wxString& str) { @@ -480,10 +480,10 @@ public: virtual bool Write(wxString& str) const; virtual bool Read(wxString& str); virtual bool Read(istream& str); -#if wxUSE_STREAM +#if wxUSE_STREAMS virtual bool Read(wxInputStream& str); virtual bool Write(wxOutputStream& str) const; -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS virtual wxString GetType() const { return "bool"; }; protected: @@ -531,7 +531,7 @@ bool wxVariantDataBool::Read(istream& WXUNUSED(str)) return FALSE; } -#if wxUSE_STREAM +#if wxUSE_STREAMS bool wxVariantDataBool::Write(wxOutputStream& str) const { str << (char)m_value; @@ -543,7 +543,7 @@ bool wxVariantDataBool::Read(wxInputStream& str) str >> (char&)m_value; return TRUE; } -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS bool wxVariantDataBool::Read(wxString& str) { @@ -571,10 +571,10 @@ public: virtual bool Write(ostream& str) const; virtual bool Read(wxString& str); virtual bool Write(wxString& str) const; -#if wxUSE_STREAM +#if wxUSE_STREAMS virtual bool Read(wxInputStream& str); virtual bool Write(wxOutputStream& str) const; -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS virtual wxString GetType() const { return "char"; }; protected: @@ -622,7 +622,7 @@ bool wxVariantDataChar::Read(istream& WXUNUSED(str)) return FALSE; } -#if wxUSE_STREAM +#if wxUSE_STREAMS bool wxVariantDataChar::Write(wxOutputStream& str) const { str << m_value; @@ -634,7 +634,7 @@ bool wxVariantDataChar::Read(wxInputStream& str) str >> m_value; return TRUE; } -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS bool wxVariantDataChar::Read(wxString& str) { @@ -671,10 +671,10 @@ public: virtual bool Read(wxString& str); virtual bool Write(wxString& str) const; virtual bool Read(istream& str); -#if wxUSE_STREAM +#if wxUSE_STREAMS virtual bool Read(wxInputStream& str); virtual bool Write(wxOutputStream& str) const; -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS virtual wxString GetType() const { return "string"; }; protected: @@ -717,7 +717,7 @@ bool wxVariantDataString::Read(istream& str) return TRUE; } -#if wxUSE_STREAM +#if wxUSE_STREAMS bool wxVariantDataString::Write(wxOutputStream& str) const { str << (const char*) m_value; @@ -729,7 +729,7 @@ bool wxVariantDataString::Read(wxInputStream& str) str >> m_value; return TRUE; } -#endif // wxUSE_STREAM +#endif // wxUSE_STREAMS bool wxVariantDataString::Read(wxString& str) { -- 2.45.2