diff options
author | Paolo Carlini <pcarlini@unitus.it> | 2003-07-06 13:24:43 +0200 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2003-07-06 11:24:43 +0000 |
commit | 6623b2f26dd64817454896e5b20a793e8d6ac14c (patch) | |
tree | 4286fb9953f97df2c47795c2236e847a4de109f2 | |
parent | fdd9b6ba91ef7130b1c1c36bc8a50bd344bc9dd7 (diff) | |
download | gcc-6623b2f26dd64817454896e5b20a793e8d6ac14c.zip gcc-6623b2f26dd64817454896e5b20a793e8d6ac14c.tar.gz gcc-6623b2f26dd64817454896e5b20a793e8d6ac14c.tar.bz2 |
std_fstream.h (xsputn): Don't call _M_destroy_pback...
2003-07-06 Paolo Carlini <pcarlini@unitus.it>
* include/std/std_fstream.h (xsputn): Don't call _M_destroy_pback:
if output is at all possible (!_M_reading), cannot be active.
* include/std/std_fstream.h: Tweak comments to doxygen style.
From-SVN: r69001
-rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/include/std/std_fstream.h | 49 |
2 files changed, 36 insertions, 20 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 9ab1587..2773588 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,12 @@ 2003-07-06 Paolo Carlini <pcarlini@unitus.it> + * include/std/std_fstream.h (xsputn): Don't call _M_destroy_pback: + if output is at all possible (!_M_reading), cannot be active. + + * include/std/std_fstream.h: Tweak comments to doxygen style. + +2003-07-06 Paolo Carlini <pcarlini@unitus.it> + * include/bits/locale_classes.h: Fully qualify standard functions with std::, thus avoiding Koenig lookup. * include/bits/locale_facets.tcc: Likewise. diff --git a/libstdc++-v3/include/std/std_fstream.h b/libstdc++-v3/include/std/std_fstream.h index 0e9f99c..209be67 100644 --- a/libstdc++-v3/include/std/std_fstream.h +++ b/libstdc++-v3/include/std/std_fstream.h @@ -177,9 +177,13 @@ namespace std // Cached codecvt facet. const __codecvt_type* _M_codecvt; - // Initializes pback buffers, and moves normal buffers to safety. - // Assumptions: - // _M_in_cur has already been moved back + /** + * @if maint + * Initializes pback buffers, and moves normal buffers to safety. + * Assumptions: + * _M_in_cur has already been moved back + * @endif + */ void _M_create_pback() { @@ -192,9 +196,13 @@ namespace std } } - // Deactivates pback buffer contents, and restores normal buffer. - // Assumptions: - // The pback buffer has only moved forward. + /** + * @if maint + * Deactivates pback buffer contents, and restores normal buffer. + * Assumptions: + * The pback buffer has only moved forward. + * @endif + */ void _M_destroy_pback() throw() { @@ -400,10 +408,7 @@ namespace std // [documentation is inherited] virtual streamsize xsputn(const char_type* __s, streamsize __n) - { - _M_destroy_pback(); - return __streambuf_type::xsputn(__s, __n); - } + { return __streambuf_type::xsputn(__s, __n); } /** * @if maint @@ -413,16 +418,20 @@ namespace std void _M_output_unshift(); - // This function sets the pointers of the internal buffer, both get - // and put areas. Typically: - // - // __off == egptr() - eback() upon underflow/uflow ('read' mode); - // __off == 0 upon overflow ('write' mode); - // __off == -1 upon open, setbuf, seekoff/pos ('uncommitted' mode). - // - // NB: epptr() - pbase() == _M_buf_size - 1, since _M_buf_size - // reflects the actual allocated memory and the last cell is reserved - // for the overflow char of a full put area. + /** + * @if maint + * This function sets the pointers of the internal buffer, both get + * and put areas. Typically: + * + * __off == egptr() - eback() upon underflow/uflow ('read' mode); + * __off == 0 upon overflow ('write' mode); + * __off == -1 upon open, setbuf, seekoff/pos ('uncommitted' mode). + * + * NB: epptr() - pbase() == _M_buf_size - 1, since _M_buf_size + * reflects the actual allocated memory and the last cell is reserved + * for the overflow char of a full put area. + * @endif + */ void _M_set_buffer(streamsize __off) { |