]> gcc.gnu.org Git - gcc.git/commitdiff
fstream.tcc (basic_filebuf::showmanyc, [...]): Fix test for synced buffer.
authorPaolo Carlini <pcarlini@unitus.it>
Sun, 30 Mar 2003 08:32:11 +0000 (10:32 +0200)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 30 Mar 2003 08:32:11 +0000 (08:32 +0000)
2003-03-30  Paolo Carlini  <pcarlini@unitus.it>

* include/bits/fstream.tcc (basic_filebuf::showmanyc,
_M_convert_to_external, _M_really_overflow, seekoff): Fix
test for synced buffer.
* include/std/std_fstream.h (sync): Likewise.
* src/fstream.cc (basic_filebuf<char>::_M_underflow_common,
basic_filebuf<wchar_t>::_M_underflow_common): Likewise.

From-SVN: r65038

libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/fstream.tcc
libstdc++-v3/include/std/std_fstream.h
libstdc++-v3/src/fstream.cc

index 30a8b3ba689a30dfcea7c5bd8ae8af93cdbf2009..09ef061d96ff04d3698eb1e6c2ae9ced53584cbb 100644 (file)
@@ -1,3 +1,12 @@
+2003-03-30  Paolo Carlini  <pcarlini@unitus.it>
+
+       * include/bits/fstream.tcc (basic_filebuf::showmanyc,
+       _M_convert_to_external, _M_really_overflow, seekoff): Fix
+       test for synced buffer.
+       * include/std/std_fstream.h (sync): Likewise.
+       * src/fstream.cc (basic_filebuf<char>::_M_underflow_common,
+       basic_filebuf<wchar_t>::_M_underflow_common): Likewise.
+
 2003-03-28  Benjamin Kosnik  <bkoz@redhat.com>
 
        * include/std/std_sstream.h (basic_istringstream): Adjust
index b5529de35ef3381800e9f5dd74d64436b367126e..f1b65a1a5580f6f4f089f9dec1f0a899377deeae 100644 (file)
@@ -160,7 +160,7 @@ namespace std
       const locale __loc = this->getloc();
       const __codecvt_type& __cvt = use_facet<__codecvt_type>(__loc);
       // Sync with stdio.
-      bool __sync = this->_M_buf_size == 1;
+      bool __sync = this->_M_buf_size <= 1;
 
       if (__testin && this->is_open())
        {
@@ -285,7 +285,7 @@ namespace std
       const locale __loc = this->getloc();
       const __codecvt_type& __cvt = use_facet<__codecvt_type>(__loc);
       // Sync with stdio.
-      bool __sync = this->_M_buf_size == 1;
+      bool __sync = this->_M_buf_size <= 1;
 
       if (__cvt.always_noconv() && __ilen)
        {
@@ -358,7 +358,7 @@ namespace std
       bool __testput = this->_M_out_cur && this->_M_out_beg < this->_M_out_lim;
       bool __testunbuffered = _M_file.is_open() && !this->_M_buf_size_opt;
       // Sync with stdio.
-      bool __sync = this->_M_buf_size == 1;
+      bool __sync = this->_M_buf_size <= 1;
 
       if (__testput || __testunbuffered)
        {
@@ -448,7 +448,7 @@ namespace std
       bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
       bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
       // Sync with stdio.
-      bool __sync = this->_M_buf_size == 1;
+      bool __sync = this->_M_buf_size <= 1;
       
       // Should probably do has_facet checks here.
       int __width = use_facet<__codecvt_type>(this->_M_buf_locale).encoding();
index 845a9147b8fe69239ecd8c7d24b1a5cf1e4da750..ecbaba4c510a340c6c8452023aff2626f1c5b5ae 100644 (file)
@@ -315,7 +315,7 @@ namespace std
        bool __testput = this->_M_out_cur
          && this->_M_out_beg < this->_M_out_lim;
        // Sync with stdio.
-       bool __sync = this->_M_buf_size == 1;
+       bool __sync = this->_M_buf_size <= 1;
 
        // Make sure that the internal buffer resyncs its idea of
        // the file position with the external file.
index 8280a662b70f0fe7a1195929191a319b788e3e45..0f9b2abd2c450665b0eb2b641d4a1efcfda4c2ba 100644 (file)
@@ -44,7 +44,7 @@ namespace std
       bool __testin = _M_mode & ios_base::in;
       bool __testout = _M_mode & ios_base::out;
       // Sync with stdio.
-      bool __sync = _M_buf_size == 1;
+      bool __sync = _M_buf_size <= 1;
 
       if (__testin)
        {
@@ -126,7 +126,7 @@ namespace std
       bool __testin = _M_mode & ios_base::in;
       bool __testout = _M_mode & ios_base::out;
       // Sync with stdio.
-      bool __sync = _M_buf_size == 1;
+      bool __sync = _M_buf_size <= 1;
 
       if (__testin)
        {
This page took 0.106367 seconds and 5 git commands to generate.