X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e83389ff45206ea98efc4b44f783691b54d4fa96..154e1ca1814ff1987caf1d6c4e3967ca6a9548c4:/src/common/zipstrm.cpp diff --git a/src/common/zipstrm.cpp b/src/common/zipstrm.cpp index d01d464df2..6bf4f2aed3 100644 --- a/src/common/zipstrm.cpp +++ b/src/common/zipstrm.cpp @@ -3,7 +3,7 @@ // Purpose: input stream for ZIP archive access // Author: Vaclav Slavik // Copyright: (c) 1999 Vaclav Slavik -// Licence: wxWindows Licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) @@ -77,19 +77,19 @@ wxZipInputStream::~wxZipInputStream() bool wxZipInputStream::Eof() const { - wxASSERT_MSG( m_Pos <= (off_t)m_Size, + wxASSERT_MSG( m_Pos <= (wxFileOffset)m_Size, _T("wxZipInputStream: invalid current position") ); - return m_Pos >= (off_t)m_Size; + return m_Pos >= (wxFileOffset)m_Size; } size_t wxZipInputStream::OnSysRead(void *buffer, size_t bufsize) { - wxASSERT_MSG( m_Pos <= (off_t)m_Size, + wxASSERT_MSG( m_Pos <= (wxFileOffset)m_Size, _T("wxZipInputStream: invalid current position") ); - if ( m_Pos >= (off_t)m_Size ) + if ( m_Pos >= (wxFileOffset)m_Size ) { m_lasterror = wxSTREAM_EOF; return 0; @@ -106,14 +106,14 @@ size_t wxZipInputStream::OnSysRead(void *buffer, size_t bufsize) -off_t wxZipInputStream::OnSysSeek(off_t seek, wxSeekMode mode) +wxFileOffset wxZipInputStream::OnSysSeek(wxFileOffset seek, wxSeekMode mode) { - // NB: since ZIP files don't natively support seeking, we have to + // NB: since ZIP files don't natively support seeking, we have to // implement a brute force workaround -- reading all the data - // between current and the new position (or between beginning of + // between current and the new position (or between beginning of // the file and new position...) - off_t nextpos; + wxFileOffset nextpos; switch ( mode ) { @@ -138,7 +138,7 @@ off_t wxZipInputStream::OnSysSeek(off_t seek, wxSeekMode mode) } toskip = nextpos; } - + if ( toskip > 0 ) { const size_t BUFSIZE = 4096;