391cd0955e
2003-02-24 Paolo Carlini <pcarlini@unitus.it> Nathan Myers <ncm@cantrip.org> PR libstdc++/9404, PR libstdc++/9701 (partial) (aka pptr == epptr implies overflow) * include/bits/fstream.tcc (_M_allocate_internal_buffer): Consistently, _M_out_end points to the end of the buffer just created. (overflow): Tweak to use _M_out_buf_size(). (_M_convert_to_external): The role of the old _M_out_end is now played by _M_out_lim. (_M_really_overflow): Likewise. (seekoff): Likewise. (setbuf): _M_out_end points to the end of the external buffer. * include/bits/sstream.tcc (overflow): Rewrote, taking into account the resolution of DR 169 (TC). (seekoff): Use _M_string.capacity(); ios_base::end is now _M_out_lim. (seekpos): Use _M_string.capacity(); tweak. * include/bits/streambuf.tcc (sputc, xsputn): Remove comments. * include/std/std_fstream.h (sync): The role of the old _M_out_end is now played by _M_out_lim. (_M_set_indeterminate): Use _M_set_determinate. (_M_set_determinate): _M_out_end is now _M_out_lim. (_M_is_indeterminate): Likewise. * include/std/std_sstream.h (str()): _M_out_end is now _M_out_lim. (_M_stringbuf_init): Don't set _M_buf_size, unused for sstreams, which have the information readily available as _M_string.capacity(); for ate and app modes, pass the string size to _M_really_sync. (_M_really_sync): Consistently set _M_out_end and _M_out_lim, to point to the end of the buffer (i.e., epptr) and to the string end, respectively. * include/std/std_streambuf.h: tweak comments, add _M_out_lim, which points to the right limit of the used put area. (_M_out_cur_move): The role of the old _M_out_end is now played by _M_out_lim. (_M_out_buf_size): Simplify: now (when _M_out_cur) return simply _M_out_end - _M_out_cur (i.e., pptr), _very_ close to the letter of the standard. (basic_streambuf()): Initialize _M_out_lim too. * testsuite/27_io/filebuf_virtuals.cc (test10): Trivial tweak. * testsuite/27_io/filebuf_virtuals.cc (test11): Add. * testsuite/27_io/stringbuf_virtuals.cc (test09): Add. Co-Authored-By: Nathan Myers <ncm@cantrip.org> From-SVN: r63367 |
||
---|---|---|
.. | ||
istream_extractor_arith | ||
filebuf_members-1.tst | ||
filebuf_members-1.txt | ||
filebuf_members.cc | ||
filebuf_virtuals-1.tst | ||
filebuf_virtuals-1.txt | ||
filebuf_virtuals-2.tst | ||
filebuf_virtuals-3.tst | ||
filebuf_virtuals.cc | ||
filebuf.cc | ||
fpos.cc | ||
fstream_members.cc | ||
fstream.cc | ||
ifstream_members-1.tst | ||
ifstream_members-1.txt | ||
ifstream_members.cc | ||
ifstream.cc | ||
instantiations.cc | ||
ios_base_callbacks.cc | ||
ios_base_members_static-1.tst | ||
ios_base_members_static.cc | ||
ios_base_storage.cc | ||
ios_base_types.cc | ||
ios_ctor.cc | ||
ios_init.cc | ||
ios_manip_basefield.cc | ||
ios_manip_fmtflags.cc | ||
ios_members.cc | ||
ios.cc | ||
iostream_members.cc | ||
iostream.cc | ||
istream_extractor_char.cc | ||
istream_extractor_other-1.tst | ||
istream_extractor_other-1.txt | ||
istream_extractor_other-2.tst | ||
istream_extractor_other.cc | ||
istream_manip.cc | ||
istream_seeks-1.tst | ||
istream_seeks-1.txt | ||
istream_seeks-2.tst | ||
istream_seeks-3.tst | ||
istream_seeks.cc | ||
istream_sentry.cc | ||
istream_unformatted-1.tst | ||
istream_unformatted-1.txt | ||
istream_unformatted.cc | ||
istream.cc | ||
istringstream_members.cc | ||
istringstream.cc | ||
narrow_stream_objects.cc | ||
ofstream_members-1.tst | ||
ofstream_members.cc | ||
ofstream.cc | ||
ostream_inserter_arith.cc | ||
ostream_inserter_char-1.tst | ||
ostream_inserter_char-1.txt | ||
ostream_inserter_char.cc | ||
ostream_inserter_other-1.tst | ||
ostream_inserter_other-2.tst | ||
ostream_inserter_other.cc | ||
ostream_manip.cc | ||
ostream_seeks-1.tst | ||
ostream_seeks.cc | ||
ostream_sentry.cc | ||
ostream_unformatted.cc | ||
ostream.cc | ||
ostringstream_members.cc | ||
ostringstream.cc | ||
standard_manipulators.cc | ||
streambuf_members.cc | ||
streambuf.cc | ||
stringbuf_members.cc | ||
stringbuf_virtuals.cc | ||
stringbuf.cc | ||
stringstream_members.cc | ||
stringstream.cc | ||
wide_stream_objects.cc |