diff options
author | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-15 23:43:15 +0000 |
---|---|---|
committer | bkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-15 23:43:15 +0000 |
commit | 8269436806f71de563bd0de5af7a45bd7b94f5ca (patch) | |
tree | f1d8e25813e00141dae73bc128d0ead3c9d03c2c /libstdc++-v3/testsuite/27_io | |
parent | 0c9b635fcefb57b7ace4a97d2c7210c8c8138953 (diff) | |
download | gcc-8269436806f71de563bd0de5af7a45bd7b94f5ca.tar.gz |
2003-05-15 Paolo Carlini <pcarlini@unitus.it>
Nathan Myers <ncm@cantrip.org>
* include/bits/fstream.tcc (_M_overflow): Rewrote to call
_M_convert_to_external only once (_M_buf_size is now the size of
the put area + 1 for the overflow char of a full area); call
_M_set_buffer instead of _M_set_indeterminate.
(setbuf): Don't accept a buffer smaller than 2 chars.
(_M_underflow): Refill _M_buf_size - 1 chars; call _M_set_buffer,
instead of _M_set_determinate.
(open): Call _M_set_buffer, instead of _M_set_indeterminate.
(seekoff): Likewise.
* include/ext/stdio_filebuf.h (stdio_filebuf(int,
std::ios_base::openmode, bool, size_t),
stdio_filebuf(std::__c_file*, std::ios_base::openmode, size_t):
Likewise.
* include/std/std_fstream.h (_M_set_indeterminate): Remove.
(_M_set_determinate): Rename as _M_set_buffer, _M_buf_size ->
_M_buf_size - 1.
* include/std/std_streambuf.h: Tweak _M_out_lim comment.
* testsuite/27_io/basic_filebuf/sgetn/char/1.cc: Tweak, taking
into account that, for _M_buf_size == BUFSIZ == 8192, the size of
the put area is now BUFSIZ - 1.
* testsuite/ext/stdio_filebuf_2.cc: Tweak, taking into account
that now the smallest _M_buf_size is 2 (still fails, for the same
reason, with 3.2.3)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66848 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/testsuite/27_io')
-rw-r--r-- | libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1.cc index 05fbd23a573..d890f3e7dcf 100644 --- a/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1.cc +++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/sgetn/char/1.cc @@ -123,11 +123,11 @@ void test05() VERIFY( c7 == c2 ); // n != i strmsz_1 = fb_03.sgetn(carray1, 10); VERIFY( !strmsz_1 ); //zero - strmsz_1 = fb_01.in_avail(); + strmsz_1 = fb_01.in_avail(); // N.B.: _M_in_end - _M_in_beg == BUFSIZ - 1 strmsz_2 = fb_01.sgetn(carray2, strmsz_1 + 5); VERIFY( strmsz_1 == strmsz_2 - 5 ); c4 = fb_01.sgetc(); // buffer should have underflowed from above. - VERIFY( c4 == 'i' ); + VERIFY( c4 == 'h' ); strmsz_1 = fb_01.in_avail(); VERIFY( strmsz_1 > 0 ); strmsz_2 = fb_01.sgetn(carray2, strmsz_1 + 5); |