]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/stream.cpp
standard icons for msg boxes
[wxWidgets.git] / src / common / stream.cpp
index 1c34deffff0687d552063a9e1d6141689ebb3aec..cc38a5022b311ecb3afb240f3b2e4c87b50174b0 100644 (file)
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // 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 <ctype.h>
 #include <wx/stream.h>
 #include <wx/datstrm.h>
 #include <wx/objstrm.h>
 
 #include <ctype.h>
 #include <wx/stream.h>
 #include <wx/datstrm.h>
 #include <wx/objstrm.h>
 
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
 #define BUF_TEMP_SIZE 10000
 
 // ----------------------------------------------------------------------------
 #define BUF_TEMP_SIZE 10000
 
 // ----------------------------------------------------------------------------
@@ -340,7 +347,7 @@ size_t wxStreamBuffer::Read(wxStreamBuffer *s_buf)
   if (m_mode == write)
     return 0;
 
   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;
     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
 }
   return stream.Write("\n", 1);
 #endif
 }
+
+#endif
+  // wxUSE_STREAMS