X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/10793ebfbb49d48e6a97f8e2d02081f458bd80b4..91885f468ae257fd295ae46750e91719646fa381:/src/common/zstream.cpp diff --git a/src/common/zstream.cpp b/src/common/zstream.cpp index ab71f710f8..55589614a5 100644 --- a/src/common/zstream.cpp +++ b/src/common/zstream.cpp @@ -1,5 +1,5 @@ ////////////////////////////////////////////////////////////////////////////// -// Name: zstream.cpp +// Name: src/common/zstream.cpp // Purpose: Compressed stream classes // Author: Guilhem Lavaux // Modified by: Mike Wetherell @@ -13,24 +13,28 @@ #include "wx/wxprec.h" #ifdef __BORLANDC__ - #pragma hdrstop + #pragma hdrstop #endif #if wxUSE_ZLIB && wxUSE_STREAMS #include "wx/zstream.h" -#include "wx/utils.h" -#include "wx/intl.h" -#include "wx/log.h" + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/log.h" + #include "wx/utils.h" +#endif + // normally, the compiler options should contain -I../zlib, but it is // apparently not the case for all MSW makefiles and so, unless we use // configure (which defines __WX_SETUP_H__) or it is explicitly overridden by // the user (who can define wxUSE_ZLIB_H_IN_PATH), we hardcode the path here #if defined(__WXMSW__) && !defined(__WX_SETUP_H__) && !defined(wxUSE_ZLIB_H_IN_PATH) - #include "../zlib/zlib.h" + #include "../zlib/zlib.h" #else - #include "zlib.h" + #include "zlib.h" #endif enum { @@ -284,8 +288,8 @@ size_t wxZlibOutputStream::OnSysWrite(const void *buffer, size_t size) if (!m_deflate || !m_z_buffer) { + // notice that this will make IsOk() test just below return false m_lasterror = wxSTREAM_WRITE_ERROR; - return 0; } if (!IsOk() || !size) @@ -331,4 +335,3 @@ size_t wxZlibOutputStream::OnSysWrite(const void *buffer, size_t size) #endif // wxUSE_ZLIB && wxUSE_STREAMS -