X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/84fff0b395adcfecd09dd65389ba7c1c47dd7eee..1e3698e55d7ee45267b69fa8ed5f94886ad47be9:/src/common/stream.cpp diff --git a/src/common/stream.cpp b/src/common/stream.cpp index 1c34deffff..cc38a5022b 100644 --- a/src/common/stream.cpp +++ b/src/common/stream.cpp @@ -15,15 +15,22 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/defs.h" +#endif + +#if wxUSE_STREAMS + #include #include #include #include -#ifdef __BORLANDC__ -#pragma hdrstop -#endif - #define BUF_TEMP_SIZE 10000 // ---------------------------------------------------------------------------- @@ -340,7 +347,7 @@ size_t wxStreamBuffer::Read(wxStreamBuffer *s_buf) if (m_mode == write) return 0; - while (bytes_read == BUF_TEMP_SIZE) { + while (bytes_read != 0) { bytes_read = Read(buf, bytes_read); bytes_read = s_buf->Write(buf, bytes_read); s += bytes_read; @@ -855,3 +862,6 @@ wxOutputStream& wxEndL(wxOutputStream& stream) return stream.Write("\n", 1); #endif } + +#endif + // wxUSE_STREAMS