diff options
author | Petur Runolfsson <peturr02@ru.is> | 2003-09-03 14:54:03 +0000 |
---|---|---|
committer | Benjamin Kosnik <bkoz@gcc.gnu.org> | 2003-09-03 14:54:03 +0000 |
commit | 149639d4f14ae921b4d14f6e35a840755b29f098 (patch) | |
tree | 171f78496fb967c04d39c1a4fabcdd7216ddcb8c /libstdc++-v3/docs/html | |
parent | 916b57cedabb2d80ac3e947a682efa3bce15cf4e (diff) | |
download | gcc-149639d4f14ae921b4d14f6e35a840755b29f098.zip gcc-149639d4f14ae921b4d14f6e35a840755b29f098.tar.gz gcc-149639d4f14ae921b4d14f6e35a840755b29f098.tar.bz2 |
re PR libstdc++/12048 (unget does not work)
2003-09-03 Petur Runolfsson <peturr02@ru.is>
PR libstdc++/12048
* include/ext/stdio_sync_filebuf.h
(stdio_sync_filebuf::_M_unget_buf): Declare it.
(stdio_sync_filebuf::stdio_sync_filebuf): Initialize _M_unget_buf.
(stdio_sync_filebuf::uflow): Store the returned character in
_M_unget_buf.
(stdio_sync_filebuf::pbackfail): If argument is eof(), pass
_M_unget_buf to syncungetc(). Set _M_unget_buf to eof().
(stdio_sync_filebuf<char>::xsgetn): Store last read character in
_M_unget_buf, if any, else eof().
(stdio_sync_filebuf<wchar_t>::xsgetn: Store last read character in
_M_unget_buf, if any, else eof().
* testsuite/27_io/objects/char/12048.cc: Rename to...
* testsuite/27_io/objects/char/12048-1.cc: ...this.
* testsuite/27_io/objects/char/12048-2.cc: New test.
* testsuite/27_io/objects/char/12048-3.cc: New test.
* testsuite/27_io/objects/char/12048-4.cc: New test.
* testsuite/27_io/objects/char/12048-5.cc: New test. XFAIL.
* testsuite/27_io/objects/wchar_t/12048-1.cc: New test.
* testsuite/27_io/objects/wchar_t/12048-2.cc: New test.
* testsuite/27_io/objects/wchar_t/12048-3.cc: New test.
* testsuite/27_io/objects/wchar_t/12048-4.cc: New test.
* testsuite/27_io/objects/wchar_t/12048-5.cc: New test. XFAIL.
* testsuite/ext/stdio_sync_filebuf_char.cc
(test02, test03, test04, test05): New tests.
* testsuite/ext/stdio_sync_filebuf_wchar_t.cc
(test02, test03, test04, test05): New tests.
2003-09-03 Petur Runolfsson <peturr02@ru.is>
* docs/html/27_io/howto.html: setbuf(0, 0) has no effect on
stringbuf or strstreambuf. Fix typos.
From-SVN: r71026
Diffstat (limited to 'libstdc++-v3/docs/html')
-rw-r--r-- | libstdc++-v3/docs/html/27_io/howto.html | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libstdc++-v3/docs/html/27_io/howto.html b/libstdc++-v3/docs/html/27_io/howto.html index 4a0b6a9..35568c4 100644 --- a/libstdc++-v3/docs/html/27_io/howto.html +++ b/libstdc++-v3/docs/html/27_io/howto.html @@ -185,9 +185,10 @@ <code>setbuf()</code>-ish functions; the classes derived from <code>streambuf</code> each define behavior that "makes sense" for that class: an argument of (0,0) turns off buffering - for <code>filebuf</code> but has undefined behavior for its sibling - <code>stringbuf</code>, and specifying anything other than (0,0) has - varying effects. Other user-defined class derived from streambuf can + for <code>filebuf</code> but does nothing at all for its siblings + <code>stringbuf</code> and <code>strstreambuf</code>, and specifying + anything other than (0,0) has varying effects. + User-defined classes derived from <code>streambuf</code> can do whatever they want. (For <code>filebuf</code> and arguments for <code>(p,s)</code> other than zeros, libstdc++ does what you'd expect: the first <code>s</code> bytes of <code>p</code> are used as a buffer, |