gcc/libstdc++-v3/include/bits/sstream.tcc

280 lines
9.2 KiB
Plaintext
Raw Normal View History

// String based streams -*- C++ -*-
// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
/** @file sstream.tcc
* This is an internal header file, included by other library headers.
* You should not attempt to use it directly.
*/
//
// ISO C++ 14882: 27.7 String-based streams
//
#ifndef _SSTREAM_TCC
#define _SSTREAM_TCC 1
#pragma GCC system_header
Makefile.am (std_headers): Remove cXXX from list. 2002-01-04 Benjamin Kosnik <bkoz@redhat.com> * include/Makefile.am (std_headers): Remove cXXX from list. (c_base_srcdir): No bits subdirectory. (c_base_builddir): Same. (c_base_headers): Adjust names, add ciso646. (bits_headers): Remove std_xxx.h headers. * include/Makefile.in: Regenerate. * include/ext/iterator: Adjust includes. * include/ext/ropeimpl.h: Same. * include/ext/stl_hash_fun.h: Same. * include/ext/algorithm: Same. * include/backward/bvector.h: Adjust includes. * include/backward/vector.h: Same. * include/backward/strstream: Same. * include/backward/streambuf.h: Same. * include/backward/stack.h: Same. * include/backward/set.h: Same. * include/backward/queue.h: Same. * include/backward/multiset.h: Same. * include/backward/multimap.h: Same. * include/backward/map.h: Same. * include/backward/list.h: Same. * include/backward/iterator.h: Same. * include/backward/iostream.h: Same. * include/backward/iomanip.h: Same. * include/backward/fstream.h: Same. * include/backward/deque.h: Same. * include/backward/complex.h: Same. * include/bits/std_algorithm.h: Move to... * include/std/algorithm: ...here. * include/bits/std_iosfwd.h, std_locale.h, std_stack.h, std_bitset.h, std_ios.h, std_map.h, std_stdexcept.h, std_complex.h, std_iostream.h, std_memory.h, std_streambuf.h, std_deque.h, std_istream.h, std_numeric.h, std_string.h, std_fstream.h, std_ostream.h, std_utility.h, std_iterator.h, std_queue.h, std_valarray.h, std_functional.h, std_limits.h, std_set.h, std_vector.h, std_iomanip.h, std_list.h, std_sstream.h: Same. * include/c_std/bits/std_cassert.h: Move to... * include/c_std/cassert: Here. * include/c_std/std_cctype.h, std_cerrno.h, std_cfloat.h, std_climits.h, std_clocale.h, std_cmath.h, std_csetjmp.h, std_csignal.h, std_cstdarg.h, std_cstddef.h, std_cstdio.h, std_cstdlib.h, std_cstring.h, std_ctime.h, std_cwchar.h, std_cwctype.h: Same. * include/c_std/cmath: Adjust cmath.tcc include. * include/c_std/cstdlib: Adjust includes. * include/c_std/cwchar: Same. * include/c_std/ctime: Same. * include/c_std/cstring: Same. * include/c_std/cstdio: Same. * include/c_std/bits: Remove directory. * include/c/bits/std_cassert.h: Move to... * include/c/cassert: Here. * include/c/std_cctype.h, std_cerrno.h, std_cfloat.h, std_climits.h, std_clocale.h, std_cmath.h, std_csetjmp.h, std_csignal.h, std_cstdarg.h, std_cstddef.h, std_cstdio.h, std_cstdlib.h, std_cstring.h, std_ctime.h, std_cwchar.h, std_cwctype.h: Same. * include/c/bits: Remove directory. * include/std/cwctype: Remove. * include/std/cwchar: Remove. * include/std/ctime: Remove. * include/std/cstring: Remove. * include/std/cstdlib: Remove. * include/std/cstdio: Remove. * include/std/cstddef: Remove. * include/std/cstdarg: Remove. * include/std/csignal: Remove. * include/std/csetjmp: Remove. * include/std/cmath: Remove. * include/std/clocale: Remove. * include/std/climits: Remove. * include/std/ciso646: Remove. * include/std/cfloat: Remove. * include/std/cerrno: Remove. * include/std/cctype: Remove. * include/std/cassert: Remove. * include/bits/fpos.h: Adjust includes, removing <bits/std_xxx.h> files and subsituting <.xxx> * include/bits/valarray_array.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/stl_alloc.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/sstream.tcc: Same. * include/bits/pthread_allocimpl.h: Same. * include/bits/ostream.tcc: Same. * include/bits/localefwd.h: Same. * include/bits/locale_facets.tcc: Same. * include/bits/locale_facets.h: Same. * include/bits/istream.tcc: Same. * include/bits/char_traits.h: Same. * include/bits/boost_concept_check.h: Same. * include/bits/basic_file.h: Same. * include/std/bitset: Same. * include/std/complex: Same. * include/std/fstream: Same. * include/std/functional: Same. * include/std/ios: Same. * include/std/iostream: Same. * include/std/ostream: Same. * include/std/sstream: Same. * include/std/streambuf: Same. * include/std/string: Same. * include/std/iterator: Same. * include/std/valarray: Same. * src/ios.cc: Adjust includes. * src/valarray-inst.cc: Same. * src/string-inst.cc: Same. * src/stl-inst.cc: Same. * src/stdexcept.cc: Same. * src/misc-inst.cc: Same. * src/localename.cc: Same. * src/locale-inst.cc: Same. * src/locale.cc: Same. * src/limits.cc: Same. * src/concept-inst.cc: Same. * src/complex_io.cc: Same. * src/codecvt.cc: Same. * src/bitset.cc: Same. * src/cmath.cc: Same. From-SVN: r48544
2002-01-04 22:27:36 +01:00
#include <sstream>
c++config: Add in revised namespace associations. 2005-12-18 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Add in revised namespace associations. _GLIBCXX_BEGIN_NAMESPACE: New macro. _GLIBCXX_END_NAMESPACE: Same. _GLIBCXX_BEGIN_NESTED_NAMESPACE: Same. _GLIBCXX_END_NESTED_NAMESPACE: Same. * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS]): Add gnu-versioned-namespace. * configure: Regenerated. * config.h.in: Same. * config/abi/pre/gnu-versioned-namespace.ver: New. * config/abi/pre/gnu.ver (GLIBCXX_3.4.7): Add exports for nested debug mode items. * include/Makefile.am (${host_builddir}/c++config.h): Fill in values for __GLIBCXX__ and _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION. * include/Makefile.in: Regnerate. * src/compatibility.cc: Alias new, nested definitions to exported symbols from non-nested __gnu_debug. * src/Makefile.am: Add in ENABLE_SYMVERS_GNU_NAMESPACE. * src/Makefile.in: Regenerate. * docs/html/debug_mode.html: Revise for nested design. * docs/html/debug.html: Use debug qualifications instead of __gnu_debug. * docs/html/configopts.html: Revise documentation for --enable-symvers. * include/debug/formatter: Simplify namespace qualifications for current, nested-only reality. Add top-level namespace alias, namespace debug, for debug-mode containers. * include/debug/safe_iterator.h: Same. * include/debug/set.h: Same. * include/debug/hash_multimap.h: Same. * include/debug/hash_set.h: Same. * include/debug/bitset * include/debug/safe_sequence.h: Same. * include/debug/multiset.h: Same. * include/debug/safe_base.h: Same. * include/debug/functions.h: Same. * include/debug/safe_iterator.tcc * include/debug/hash_multiset.h: Same. * include/debug/vector * include/debug/map.h: Same. * include/debug/deque * include/debug/hash_map.h: Same. * include/debug/string * include/debug/macros.h: Same. * include/debug/list * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * src/debug.cc: Same. * testsuite/23_containers/vector/invalidation/1.cc: Cleanups. * testsuite/23_containers/vector/invalidation/2.cc: Same. * testsuite/23_containers/vector/invalidation/3.cc: Same. * testsuite/23_containers/vector/invalidation/4.cc: Same. * testsuite/23_containers/deque/invalidation/1.cc: Same. * testsuite/23_containers/deque/invalidation/2.cc: Same. * testsuite/23_containers/deque/invalidation/3.cc: Same. * testsuite/23_containers/deque/invalidation/4.cc: Same. * testsuite/23_containers/multiset/invalidation/1.cc: Same. * testsuite/23_containers/multiset/invalidation/2.cc: Same. * testsuite/23_containers/multimap/invalidation/1.cc: Same. * testsuite/23_containers/multimap/invalidation/2.cc: Same. * testsuite/23_containers/bitset/invalidation/1.cc: Same. * testsuite/23_containers/bitset/cons/16020.cc: Same. * testsuite/23_containers/bitset/operations/13838.cc: Same. * testsuite/23_containers/list/invalidation/1.cc: Same. * testsuite/23_containers/list/invalidation/2.cc: Same. * testsuite/23_containers/list/invalidation/3.cc: Same. * testsuite/23_containers/list/invalidation/4.cc: Same. * testsuite/23_containers/set/invalidation/1.cc: Same. * testsuite/23_containers/set/invalidation/2.cc: Same. * testsuite/23_containers/map/invalidation/1.cc: Same. * testsuite/23_containers/map/invalidation/2.cc: Same. * testsuite/23_containers/map/insert/16813.cc: Same. * include/bits/basic_ios.h: Use _GLIBCXX_BEGIN_NAMESPACE(std) and friends. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/localefwd.h: Same. * include/bits/valarray_array.tcc: Same. * include/bits/valarray_after.h: Same. * include/bits/gslice_array.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: Same. * include/bits/locale_facets.tcc: Same. * include/bits/locale_classes.h: Same. * include/bits/stl_set.h: Same. * include/bits/locale_facets.h: Same. * include/bits/stl_stack.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stl_heap.h: Same. * include/bits/indirect_array.h: Same. * include/bits/atomicity.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/concurrence.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/basic_ios.tcc: Same. * include/bits/stl_raw_storage_iter.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_deque.h: Same. * include/bits/istream.tcc: Same. * include/bits/postypes.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/mask_array.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ostream.tcc: Same. * include/bits/slice_array.h: Same. * include/bits/boost_concept_check.h: Same. * include/bits/sstream.tcc: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stringfwd.h: Same. * include/bits/c++config * include/bits/stl_iterator.h: Same. * include/bits/valarray_array.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/basic_string.tcc: Same. * include/bits/list.tcc: Same. * include/bits/streambuf_iterator.h: Same. * include/bits/valarray_before.h: Same. * include/bits/stl_construct.h: Same. * include/bits/stl_function.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/streambuf.tcc: Same. * include/bits/allocator.h: Same. * include/bits/stl_tree.h: Same. * include/bits/fstream.tcc: Same. * include/bits/stl_relops.h: Same. * include/bits/functexcept.h: Same. * include/std/std_valarray.h: Same. * include/std/std_iostream.h: Same. * include/std/std_streambuf.h: Same. * include/std/std_bitset.h: Same. * include/std/std_iosfwd.h: Same. * include/std/std_iomanip.h: Same. * include/std/std_fstream.h: Same. * include/std/std_limits.h: Same. * include/std/std_stdexcept.h: Same. * include/std/std_istream.h: Same. * include/std/std_complex.h: Same. * include/std/std_memory.h: Same. * include/std/std_ostream.h: Same. * include/std/std_sstream.h: Same. * include/c_std/std_csignal.h: Same. * include/c_std/std_cstdlib.h: Same. * include/c_std/std_cstdio.h: Same. * include/c_std/std_cstdarg.h: Same. * include/c_std/std_cctype.h: Same. * include/c_std/std_cmath.h: Same. * include/c_std/std_ctime.h: Same. * include/c_std/std_clocale.h: Same. * include/c_std/std_csetjmp.h: Same. * include/c_std/std_cwchar.h: Same. * include/c_std/std_cstring.h: Same. * include/c_std/std_cstddef.h: Same. * include/c_std/std_cwctype.h: Same. * include/backward/iterator.h: Same. * include/backward/set.h: Same. * include/backward/hashtable.h: Same. * include/backward/fstream.h: Same. * include/backward/tempbuf.h: Same. * include/backward/istream.h: Same. * include/backward/bvector.h: Same. * include/backward/stack.h: Same. * include/backward/rope.h: Same. * include/backward/complex.h: Same. * include/backward/ostream.h: Same. * include/backward/heap.h: Same. * include/backward/iostream.h: Same. * include/backward/function.h: Same. * include/backward/multimap.h: Same. * include/backward/pair.h: Same. * include/backward/stream.h: Same. * include/backward/iomanip.h: Same. * include/backward/strstream * include/backward/slist.h: Same. * include/backward/tree.h: Same. * include/backward/vector.h: Same. * include/backward/deque.h: Same. * include/backward/multiset.h: Same. * include/backward/list.h: Same. * include/backward/map.h: Same. * include/backward/algobase.h: Same. * include/backward/hash_map.h: Same. * include/backward/algo.h: Same. * include/backward/queue.h: Same. * include/backward/streambuf.h: Same. * src/allocator-inst.cc: Same. * src/complex_io.cc: Same. * src/localename.cc: Same. * src/limits.cc: Same. * src/ios_failure.cc: Same. * src/locale-misc-inst.cc: Same. * src/streambuf-inst.cc: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ios_locale.cc: Same. * src/pool_allocator.cc: Same. * src/fstream-inst.cc: Same. * src/istream-inst.cc: Same. * src/string-inst.cc: Same. * src/locale_init.cc: Same. * src/ctype.cc: Same. * src/strstream.cc: Same. * src/ostream-inst.cc: Same. * src/functexcept.cc: Same. * src/streambuf.cc: Same. * src/sstream-inst.cc: Same. * src/ios.cc: Same. * src/valarray-inst.cc: Same. * src/locale.cc: Same. * src/tree.cc: Same. * src/stdexcept.cc: Same. * src/istream.cc: Same. * src/compatibility.cc: Same. * src/locale-inst.cc: Same. * src/globals_io.cc: Same. * src/list.cc: Same. * src/ios_init.cc: Same. * src/locale_facets.cc: Same. * src/codecvt.cc: Same. * include/tr1/unordered_map: Use _GLIBCXX_BEGIN_NAMESPACE(tr1). * include/tr1/boost_shared_ptr.h: Same. * include/tr1/tuple * include/tr1/hashtable * include/tr1/type_traits_fwd.h: Same. * include/tr1/unordered_set * include/tr1/functional * include/tr1/ref_fwd.h: Same. * include/tr1/utility * include/tr1/type_traits * include/tr1/array * include/ext/hashtable.h: Use _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx). * include/ext/typelist.h: Same. * include/ext/hash_map: Same. * include/ext/rc_string_base.h: Same. * include/ext/pool_allocator.h: Same. * include/ext/iterator: Same. * include/ext/rb_tree: Same. * include/ext/numeric: Same. * include/ext/vstring.tcc: Same. * include/ext/sso_string_base.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/algorithm: Same. * include/ext/codecvt_specializations.h: Same. * include/ext/new_allocator.h: Same. * include/ext/array_allocator.h: Same. * include/ext/vstring_util.h: Same. * include/ext/vstring_fwd.h: Same. * include/ext/mt_allocator.h: Same. * include/ext/debug_allocator.h: Same. * include/ext/slist: Same. * include/ext/stdio_sync_filebuf.h: Same. * include/ext/hash_fun.h: Same. * include/ext/malloc_allocator.h: Same. * include/ext/functional: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/pod_char_traits.h: Same. * include/ext/vstring.h: Same. * include/ext/ropeimpl.h: Same. * include/ext/hash_set: Same. * include/ext/memory: Same. * include/ext/rope: Same. * include/bits/boost_concept_check.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/char_traits.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/concurrence.h: Same. * include/bits/atomicity.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/collate_members.cc: Same. * config/locale/gnu/ctype_members.cc: Same. * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/codecvt_members.cc: Same. * config/locale/gnu/messages_members.cc: Same. * config/locale/gnu/c_locale.h: Same. * config/locale/gnu/monetary_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/locale/ieee_1003.1-2001/c_locale.h: Same. * config/locale/generic/numeric_members.cc: Same. * config/locale/generic/collate_members.cc: Same. * config/locale/generic/ctype_members.cc: Same. * config/locale/generic/c_locale.cc: Same. * config/locale/generic/codecvt_members.cc: Same. * config/locale/generic/messages_members.cc: Same. * config/locale/generic/c_locale.h: Same. * config/locale/generic/monetary_members.cc: Same. * config/locale/generic/time_members.cc: Same. * config/os/aix/atomicity.h: Same. * config/os/irix/atomicity.h: Same. * config/cpu/powerpc/atomicity.h: Same. * config/cpu/cris/atomicity.h: Same. * config/cpu/ia64/atomicity.h: Same. * config/cpu/alpha/atomicity.h: Same. * config/cpu/m68k/atomicity.h: Same. * config/cpu/hppa/atomicity.h: Same. * config/cpu/mips/atomicity.h: Same. * config/cpu/sparc/atomicity.h: Same. * config/cpu/i386/atomicity.h: Same. * config/cpu/i486/atomicity.h: Same. * config/cpu/sh/atomicity.h: Same. * config/cpu/generic/atomicity.h: Same. * config/cpu/s390/atomicity.h: Same. * config/io/c_io_stdio.h: Same. * config/io/basic_file_stdio.cc: Same. * config/io/basic_file_stdio.h: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ext-inst.cc: Same. * src/string-inst.cc: Same. * src/pool_allocator.cc: Same. * src/bitmap_allocator.cc: Same. * src/mt_allocator.cc: Same. * libsupc++/exception: Same. * libsupc++/vterminate.cc: Same. * testsuite/ext/hash_map/1.cc: Explicitly qualify __gnu_cxx::hash_map. * testsuite/ext/hash_map/14648.cc: Same. * libsupc++/eh_alloc.cc: Correct comment line spacing. From-SVN: r108775
2005-12-19 01:56:05 +01:00
_GLIBCXX_BEGIN_NAMESPACE(std)
template <class _CharT, class _Traits, class _Alloc>
typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
basic_stringbuf<_CharT, _Traits, _Alloc>::
pbackfail(int_type __c)
{
int_type __ret = traits_type::eof();
if (this->eback() < this->gptr())
{
// Try to put back __c into input sequence in one of three ways.
// Order these tests done in is unspecified by the standard.
const bool __testeof = traits_type::eq_int_type(__c, __ret);
if (!__testeof)
{
const bool __testeq = traits_type::eq(traits_type::
to_char_type(__c),
this->gptr()[-1]);
const bool __testout = this->_M_mode & ios_base::out;
if (__testeq || __testout)
{
this->gbump(-1);
if (!__testeq)
*this->gptr() = traits_type::to_char_type(__c);
__ret = __c;
}
}
else
{
this->gbump(-1);
__ret = traits_type::not_eof(__c);
}
}
return __ret;
}
template <class _CharT, class _Traits, class _Alloc>
typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
basic_stringbuf<_CharT, _Traits, _Alloc>::
overflow(int_type __c)
{
const bool __testout = this->_M_mode & ios_base::out;
PR libstdc++/9404, PR libstdc++/9701 (partial) 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
2003-02-24 19:22:58 +01:00
if (__builtin_expect(!__testout, false))
return traits_type::eof();
Reshuffle 27_io testsuite. 2003-04-09 Benjamin Kosnik <bkoz@redhat.com> Reshuffle 27_io testsuite. * testsuite/27_io/filebuf.cc, 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, fpos.cc, fstream.cc, fstream_members.cc, ifstream.cc, ifstream_members-1.tst, ifstream_members-1.txt, ifstream_members.cc, instantiations.cc, ios.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, iostream.cc, iostream_members.cc, istream.cc, istream_exception.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, istringstream.cc, istringstream_members.cc, narrow_stream_objects.cc, ofstream.cc, ofstream_members-1.tst, ofstream_members.cc, ostream.cc, ostream_exception.cc, ostream_fail.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, ostringstream.cc, ostringstream_members.cc, standard_manipulators.cc, streambuf.cc, streambuf_members.cc, stringbuf.cc, stringbuf_members.cc, stringbuf_virtuals.cc, stringstream.cc, stringstream_members.cc, wide_stream_objects.cc, istream_extractor_arith/01.cc, istream_extractor_arith/02.cc, istream_extractor_arith/03.cc, istream_extractor_arith/06.cc, istream_extractor_arith/07.cc, istream_extractor_arith/08.cc, istream_extractor_arith/09.cc, istream_extractor_arith/10.cc, istream_extractor_arith/11.cc, istream_extractor_arith/12.cc, istream_extractor_arith/13.cc: Split into... * 27_io/basic_filebuf/1.cc: New. * 27_io/basic_filebuf/2.cc: New. * 27_io/basic_filebuf/3.cc: New. * 27_io/basic_filebuf/4.cc: New. * 27_io/basic_filebuf/close/char/1.cc: New. * 27_io/basic_filebuf/close/char/2.cc: New. * 27_io/basic_filebuf/close/char/3.cc: New. * 27_io/basic_filebuf/close/char/4879.cc: New. * 27_io/basic_filebuf/close/char/9964.cc: New. * 27_io/basic_filebuf/imbue/char/1.cc: New. * 27_io/basic_filebuf/imbue/char/9322.cc: New. * 27_io/basic_filebuf/in_avail/char/1.cc: New. * 27_io/basic_filebuf/is_open/char/1.cc: New. * 27_io/basic_filebuf/open/char/1.cc: New. * 27_io/basic_filebuf/open/char/2.cc: New. * 27_io/basic_filebuf/open/char/3.cc: New. * 27_io/basic_filebuf/open/char/9507.cc: New. * 27_io/basic_filebuf/overflow/char/1.cc: New. * 27_io/basic_filebuf/overflow/char/3599.cc: New. * 27_io/basic_filebuf/overflow/char/9169.cc: New. * 27_io/basic_filebuf/overflow/char/9182-2.cc: New. * 27_io/basic_filebuf/overflow/char/9988.cc: New. * 27_io/basic_filebuf/sbumpc/char/1.cc: New. * 27_io/basic_filebuf/sbumpc/char/9825.cc: New. * 27_io/basic_filebuf/seekoff/char/1.cc: New. * 27_io/basic_filebuf/seekoff/char/2.cc: New. * 27_io/basic_filebuf/seekpos/char/1.cc: New. * 27_io/basic_filebuf/seekpos/char/2.cc: New. * 27_io/basic_filebuf/setbuf/char/1.cc: New. * 27_io/basic_filebuf/setbuf/char/2.cc: New. * 27_io/basic_filebuf/setbuf/char/3.cc: New. * 27_io/basic_filebuf/sgetc/char/1.cc: New. * 27_io/basic_filebuf/sgetn/char/1.cc: New. * 27_io/basic_filebuf/sgetn/char/2.cc: New. * 27_io/basic_filebuf/snextc/char/1.cc: New. * 27_io/basic_filebuf/sputbackc/char/1.cc: New. * 27_io/basic_filebuf/sputbackc/char/9425.cc: New. * 27_io/basic_filebuf/sputc/char/1.cc: New. * 27_io/basic_filebuf/sputc/char/1057.cc: New. * 27_io/basic_filebuf/sputc/char/9701-2.cc: New. * 27_io/basic_filebuf/sputn/char/1.cc: New. * 27_io/basic_filebuf/sputn/char/1057.cc: New. * 27_io/basic_filebuf/sputn/char/9701-1.cc: New. * 27_io/basic_filebuf/sungetc/char/1.cc: New. * 27_io/basic_filebuf/sync/char/1057.cc: New. * 27_io/basic_filebuf/sync/char/9182-1.cc: New. * 27_io/basic_filebuf/underflow/char/10097.cc: New. * 27_io/basic_fstream/1.cc: New. * 27_io/basic_fstream/2.cc: New. * 27_io/basic_fstream/3.cc: New. * 27_io/basic_fstream/4.cc: New. * 27_io/basic_fstream/rdbuf/char/2832.cc: New. * 27_io/basic_ifstream/1.cc: New. * 27_io/basic_ifstream/2.cc: New. * 27_io/basic_ifstream/3.cc: New. * 27_io/basic_ifstream/4.cc: New. * 27_io/basic_ifstream/cons/char/1.cc: New. * 27_io/basic_ifstream/open/char/1.cc: New. * 27_io/basic_ifstream/rdbuf/char/2832.cc: New. * 27_io/basic_ios/1.cc: New. * 27_io/basic_ios/2.cc: New. * 27_io/basic_ios/3.cc: New. * 27_io/basic_ios/4.cc: New. * 27_io/basic_ios/clear/char/1.cc: New. * 27_io/basic_ios/cons/char/1.cc: New. * 27_io/basic_ios/cons/char/2.cc: New. * 27_io/basic_ios/cons/char/3.cc: New. * 27_io/basic_ios/copyfmt/char/1.cc: New. * 27_io/basic_ios/copyfmt/char/2.cc: New. * 27_io/basic_ios/exceptions/char/1.cc: New. * 27_io/basic_ios/locales/char/1.cc: New. * 27_io/basic_iostream/1.cc: New. * 27_io/basic_iostream/2.cc: New. * 27_io/basic_iostream/3.cc: New. * 27_io/basic_iostream/4.cc: New. * 27_io/basic_istream/1.cc: New. * 27_io/basic_istream/2.cc: New. * 27_io/basic_istream/3.cc: New. * 27_io/basic_istream/4.cc: New. * 27_io/basic_istream/exceptions/char/9561.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/01.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/02.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/03.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/06.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/07.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/08.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/09.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/10.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/11.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/12.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/13.cc: New. * 27_io/basic_istream/extractors_character/char/1.cc: New. * 27_io/basic_istream/extractors_character/char/2.cc: New. * 27_io/basic_istream/extractors_character/char/3.cc: New. * 27_io/basic_istream/extractors_character/char/9826.cc: New. * 27_io/basic_istream/extractors_other/char/1.cc: New. * 27_io/basic_istream/extractors_other/char/2.cc: New. * 27_io/basic_istream/extractors_other/char/3.cc: New. * 27_io/basic_istream/extractors_other/char/9318-in.cc: New. * 27_io/basic_istream/extractors_other/char/9424-in.cc: New. * 27_io/basic_istream/get/char/1.cc: New. * 27_io/basic_istream/get/char/2.cc: New. * 27_io/basic_istream/getline/char/1.cc: New. * 27_io/basic_istream/getline/char/2.cc: New. * 27_io/basic_istream/getline/char/3.cc: New. * 27_io/basic_istream/ignore/char/1.cc: New. * 27_io/basic_istream/ignore/char/6360.cc: New. * 27_io/basic_istream/ignore/char/7220.cc: New. * 27_io/basic_istream/peek/char/1.cc: New. * 27_io/basic_istream/peek/char/6414.cc: New. * 27_io/basic_istream/putback/char/1.cc: New. * 27_io/basic_istream/read/char/1.cc: New. * 27_io/basic_istream/read/char/2.cc: New. * 27_io/basic_istream/read/char/3.cc: New. * 27_io/basic_istream/readsome/char/6746-1.cc: New. * 27_io/basic_istream/readsome/char/6746-2.cc: New. * 27_io/basic_istream/readsome/char/8258.cc: New. * 27_io/basic_istream/seekg/char/2346-fstream.cc: New. * 27_io/basic_istream/seekg/char/2346-sstream.cc: New. * 27_io/basic_istream/seekg/char/8348-1.cc: New. * 27_io/basic_istream/seekg/char/8348-2.cc: New. * 27_io/basic_istream/seekg/char/fstream.cc: New. * 27_io/basic_istream/seekg/char/sstream.cc: New. * 27_io/basic_istream/sentry/char/1.cc: New. * 27_io/basic_istream/sentry/char/2.cc: New. * 27_io/basic_istream/sentry/char/3.cc: New. * 27_io/basic_istream/sentry/char/3983-fstream.cc: New. * 27_io/basic_istream/sentry/char/3983-sstream.cc: New. * 27_io/basic_istream/tellg/char/1.cc: New. * 27_io/basic_istream/tellg/char/8348.cc: New. * 27_io/basic_istream/tellg/char/fstream.cc: New. * 27_io/basic_istream/tellg/char/sstream.cc: New. * 27_io/basic_istream/ws/char/1.cc: New. * 27_io/basic_istringstream/1.cc: New. * 27_io/basic_istringstream/2.cc: New. * 27_io/basic_istringstream/3.cc: New. * 27_io/basic_istringstream/4.cc: New. * 27_io/basic_istringstream/rdbuf/char/2832.cc: New. * 27_io/basic_istringstream/str/char/1.cc: New. * 27_io/basic_ofstream/1.cc: New. * 27_io/basic_ofstream/2.cc: New. * 27_io/basic_ofstream/3.cc: New. * 27_io/basic_ofstream/4.cc: New. * 27_io/basic_ofstream/cons/char/2.cc: New. * 27_io/basic_ofstream/open/char/1.cc: New. * 27_io/basic_ofstream/rdbuf/char/2832.cc: New. * 27_io/basic_ostream/1.cc: New. * 27_io/basic_ostream/2.cc: New. * 27_io/basic_ostream/3.cc: New. * 27_io/basic_ostream/4.cc: New. * 27_io/basic_ostream/cons/char/9827.cc: New. * 27_io/basic_ostream/endl/char/1.cc: New. * 27_io/basic_ostream/ends/char/1.cc: New. * 27_io/basic_ostream/ends/char/2.cc: New. * 27_io/basic_ostream/exceptions/char/9561.cc: New. * 27_io/basic_ostream/flush/char/1.cc: New. * 27_io/basic_ostream/inserters_arithmetic/char/1.cc: New. * 27_io/basic_ostream/inserters_arithmetic/char/2.cc: New. * 27_io/basic_ostream/inserters_arithmetic/char/3.cc: New. * 27_io/basic_ostream/inserters_arithmetic/char/4.cc: New. * 27_io/basic_ostream/inserters_arithmetic/char/4402.cc: New. * 27_io/basic_ostream/inserters_arithmetic/char/5.cc: New. * 27_io/basic_ostream/inserters_arithmetic/char/6.cc: New. * 27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc: New. * 27_io/basic_ostream/inserters_character/char/1.cc: New. * 27_io/basic_ostream/inserters_character/char/2.cc: New. * 27_io/basic_ostream/inserters_character/char/3.cc: New. * 27_io/basic_ostream/inserters_character/char/4.cc: New. * 27_io/basic_ostream/inserters_character/char/5.cc: New. * 27_io/basic_ostream/inserters_character/char/6.cc: New. * 27_io/basic_ostream/inserters_character/char/8.cc: New. * 27_io/basic_ostream/inserters_character/wchar_t/7.cc: New. * 27_io/basic_ostream/inserters_character/wchar_t/8.cc: New. * 27_io/basic_ostream/inserters_other/char/1.cc: New. * 27_io/basic_ostream/inserters_other/char/2.cc: New. * 27_io/basic_ostream/inserters_other/char/3.cc: New. * 27_io/basic_ostream/inserters_other/char/4.cc: New. * 27_io/basic_ostream/inserters_other/char/9318-out.cc: New. * 27_io/basic_ostream/inserters_other/char/9424-out.cc: New. * 27_io/basic_ostream/sentry/char/1.cc: New. * 27_io/basic_ostream/sentry/char/2.cc: New. * 27_io/basic_ostream/sentry/char/3983-fstream.cc: New. * 27_io/basic_ostream/sentry/char/3983-sstream.cc: New. * 27_io/basic_ostream/tellp/char/1.cc: New. * 27_io/basic_ostream/tellp/char/2.cc: New. * 27_io/basic_ostringstream/1.cc: New. * 27_io/basic_ostringstream/2.cc: New. * 27_io/basic_ostringstream/3.cc: New. * 27_io/basic_ostringstream/4.cc: New. * 27_io/basic_ostringstream/cons/char/3.cc: New. * 27_io/basic_ostringstream/rdbuf/char/2832.cc: New. * 27_io/basic_ostringstream/str/char/1.cc: New. * 27_io/basic_ostringstream/str/char/2.cc: New. * 27_io/basic_streambuf/1.cc: New. * 27_io/basic_streambuf/2.cc: New. * 27_io/basic_streambuf/3.cc: New. * 27_io/basic_streambuf/cons/char/1.cc: New. * 27_io/basic_streambuf/imbue/char/1.cc: New. * 27_io/basic_streambuf/imbue/char/9322.cc: New. * 27_io/basic_streambuf/overflow/char/1.cc: New. * 27_io/basic_streambuf/overflow/char/2.cc: New. * 27_io/basic_streambuf/overflow/char/3599.cc: New. * 27_io/basic_streambuf/sgetc/char/1.cc: New. * 27_io/basic_streambuf/sgetn/char/1.cc: New. * 27_io/basic_streambuf/sputbackc/char/9538.cc: New. * 27_io/basic_streambuf/sputc/char/1057.cc: New. * 27_io/basic_streambuf/sputn/char/1.cc: New. * 27_io/basic_streambuf/sputn/char/1057.cc: New. * 27_io/basic_streambuf/sync/char/1057.cc: New. * 27_io/basic_stringbuf/1.cc: New. * 27_io/basic_stringbuf/2.cc: New. * 27_io/basic_stringbuf/3.cc: New. * 27_io/basic_stringbuf/4.cc: New. * 27_io/basic_stringbuf/5.cc: New. * 27_io/basic_stringbuf/imbue/char/1.cc: New. * 27_io/basic_stringbuf/imbue/char/9322.cc: New. * 27_io/basic_stringbuf/in_avail/char/1.cc: New. * 27_io/basic_stringbuf/overflow/char/2.cc: New. * 27_io/basic_stringbuf/overflow/char/3599.cc: New. * 27_io/basic_stringbuf/overflow/char/9988.cc: New. * 27_io/basic_stringbuf/sbumpc/char/1.cc: New. * 27_io/basic_stringbuf/sbumpc/char/9825.cc: New. * 27_io/basic_stringbuf/seekoff/char/1.cc: New. * 27_io/basic_stringbuf/seekoff/char/2.cc: New. * 27_io/basic_stringbuf/seekpos/char/1.cc: New. * 27_io/basic_stringbuf/seekpos/char/2.cc: New. * 27_io/basic_stringbuf/setbuf/char/1.cc: New. * 27_io/basic_stringbuf/setbuf/char/2.cc: New. * 27_io/basic_stringbuf/setbuf/char/3.cc: New. * 27_io/basic_stringbuf/sgetc/char/1.cc: New. * 27_io/basic_stringbuf/sgetn/char/1.cc: New. * 27_io/basic_stringbuf/snextc/char/1.cc: New. * 27_io/basic_stringbuf/sputbackc/char/1.cc: New. * 27_io/basic_stringbuf/sputbackc/char/9425.cc: New. * 27_io/basic_stringbuf/sputc/char/1.cc: New. * 27_io/basic_stringbuf/sputc/char/1057.cc: New. * 27_io/basic_stringbuf/sputc/char/9404-1.cc: New. * 27_io/basic_stringbuf/sputn/char/1.cc: New. * 27_io/basic_stringbuf/sputn/char/1057.cc: New. * 27_io/basic_stringbuf/sputn/char/9404-2.cc: New. * 27_io/basic_stringbuf/str/char/1.cc: New. * 27_io/basic_stringbuf/str/char/2.cc: New. * 27_io/basic_stringbuf/str/char/3.cc: New. * 27_io/basic_stringbuf/str/char/3955.cc: New. * 27_io/basic_stringbuf/sungetc/char/1.cc: New. * 27_io/basic_stringbuf/sync/char/1057.cc: New. * 27_io/basic_stringstream/1.cc: New. * 27_io/basic_stringstream/2.cc: New. * 27_io/basic_stringstream/3.cc: New. * 27_io/basic_stringstream/4.cc: New. * 27_io/basic_stringstream/rdbuf/char/2832.cc: New. * 27_io/basic_stringstream/str/char/1.cc: New. * 27_io/basic_stringstream/str/char/2.cc: New. * 27_io/basic_stringstream/str/char/3.cc: New. * 27_io/basic_stringstream/str/char/4.cc: New. * 27_io/fpos/1.cc: New. * 27_io/fpos/2.cc: New. * 27_io/fpos/3.cc: New. * 27_io/ios_base/callbacks/1.cc: New. * 27_io/ios_base/state/1.cc: New. * 27_io/ios_base/storage/1.cc: New. * 27_io/ios_base/storage/2.cc: New. * 27_io/ios_base/storage/3.cc: New. * 27_io/ios_base/sync_with_stdio/1.cc: New. * 27_io/ios_base/sync_with_stdio/2.cc: New. * 27_io/manipulators/adjustfield/char/1.cc: New. * 27_io/manipulators/adjustfield/char/2.cc: New. * 27_io/manipulators/basefield/char/1.cc: New. * 27_io/manipulators/standard/char/1.cc: New. * 27_io/manipulators/standard/char/2.cc: New. * 27_io/objects/char/1.cc: New. * 27_io/objects/char/2.cc: New. * 27_io/objects/char/2523-1_xin.cc: New. * 27_io/objects/char/2523-1_xin.in: New. * 27_io/objects/char/2523-2_xin.cc: New. * 27_io/objects/char/2523-2_xin.in: New. * 27_io/objects/char/3045.cc: New. * 27_io/objects/char/3647.cc: New. * 27_io/objects/char/3_xin.cc: New. * 27_io/objects/char/3_xin.in: New. * 27_io/objects/char/4_xin.cc: New. * 27_io/objects/char/4_xin.in: New. * 27_io/objects/char/5268.cc: New. * 27_io/objects/char/5280_xin.cc: New. * 27_io/objects/char/5280_xin.in: New. * 27_io/objects/char/6548_xin.cc: New. * 27_io/objects/char/6548_xin.in: New. * 27_io/objects/char/6648-1_xin.cc: New. * 27_io/objects/char/6648-1_xin.in: New. * 27_io/objects/char/6648-2_xin.cc: New. * 27_io/objects/char/6648-2_xin.in: New. * 27_io/objects/char/7744_xin.cc: New. * 27_io/objects/char/7744_xin.in: New. * 27_io/objects/wchar_t/1.cc: New. * 27_io/types/1.cc: New. * 27_io/types/2.cc: New. * data/filebuf_members-1.tst: New. * data/filebuf_members-1.txt: New. * data/filebuf_virtuals-1.tst: New. * data/filebuf_virtuals-1.txt: New. * data/filebuf_virtuals-2.tst: New. * data/filebuf_virtuals-3.tst: New. * data/ifstream_members-1.tst: New. * data/ifstream_members-1.txt: New. * data/ios_base_members_static-1.tst: New. * data/istream_extractor_other-1.tst: New. * data/istream_extractor_other-1.txt: New. * data/istream_extractor_other-2.tst: New. * data/istream_seeks-1.tst: New. * data/istream_seeks-1.txt: New. * data/istream_seeks-2.tst: New. * data/istream_seeks-3.tst: New. * data/istream_unformatted-1.tst: New. * data/istream_unformatted-1.txt: New. * data/ofstream_members-1.tst: New. * data/ostream_inserter_char-1.tst: New. * data/ostream_inserter_char-1.txt: New. * data/ostream_inserter_other-1.tst: New. * data/ostream_inserter_other-2.tst: New. * data/ostream_seeks-1.tst: New. 2003-04-09 Benjamin Kosnik <bkoz@redhat.com> * include/bits/sstream.tcc (basic_stringbuf::seekpos): Remove requirement that __mode must be strict input or output. * include/std/std_streambuf.h (basic_streambuf::setp): Set _M_out_lim. * include/std/std_sstream.h (basic_strinbuf::str): Zero length output string shouldn't core. (basic_stringbuf::_M_really_sync): Add base argument. Remove rturn type. * include/bits/sstream.tcc: Adjust _M_really_sync bits here. * include/bits/istream.tcc (basic_istream::putback): Set gcount to zero. 2003-04-09 Benjamin Kosnik <bkoz@redhat.com> * testsuite/data: New directory. * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Modify to copy files from the testsuite data directory. (libstdc++-v3-list-sourcefiles): Add another test list filter, for testfiles containing _xin, which now means this is an interactive test and should be run with the interactive dejagnu hooks. * testsuite/Makefile.am: Remove testsuite_* files. * testsuite/Makefile.in: Regenerate. From-SVN: r65421
2003-04-10 09:15:40 +02:00
const bool __testeof = traits_type::eq_int_type(__c, traits_type::eof());
PR libstdc++/9404, PR libstdc++/9701 (partial) 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
2003-02-24 19:22:58 +01:00
if (__builtin_expect(__testeof, false))
return traits_type::not_eof(__c);
const __size_type __capacity = _M_string.capacity();
const __size_type __max_size = _M_string.max_size();
const bool __testput = this->pptr() < this->epptr();
if (__builtin_expect(!__testput && __capacity == __max_size, false))
PR libstdc++/9404, PR libstdc++/9701 (partial) 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
2003-02-24 19:22:58 +01:00
return traits_type::eof();
// Try to append __c into output sequence in one of two ways.
// Order these tests done in is unspecified by the standard.
const char_type __conv = traits_type::to_char_type(__c);
Reshuffle 27_io testsuite. 2003-04-09 Benjamin Kosnik <bkoz@redhat.com> Reshuffle 27_io testsuite. * testsuite/27_io/filebuf.cc, 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, fpos.cc, fstream.cc, fstream_members.cc, ifstream.cc, ifstream_members-1.tst, ifstream_members-1.txt, ifstream_members.cc, instantiations.cc, ios.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, iostream.cc, iostream_members.cc, istream.cc, istream_exception.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, istringstream.cc, istringstream_members.cc, narrow_stream_objects.cc, ofstream.cc, ofstream_members-1.tst, ofstream_members.cc, ostream.cc, ostream_exception.cc, ostream_fail.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, ostringstream.cc, ostringstream_members.cc, standard_manipulators.cc, streambuf.cc, streambuf_members.cc, stringbuf.cc, stringbuf_members.cc, stringbuf_virtuals.cc, stringstream.cc, stringstream_members.cc, wide_stream_objects.cc, istream_extractor_arith/01.cc, istream_extractor_arith/02.cc, istream_extractor_arith/03.cc, istream_extractor_arith/06.cc, istream_extractor_arith/07.cc, istream_extractor_arith/08.cc, istream_extractor_arith/09.cc, istream_extractor_arith/10.cc, istream_extractor_arith/11.cc, istream_extractor_arith/12.cc, istream_extractor_arith/13.cc: Split into... * 27_io/basic_filebuf/1.cc: New. * 27_io/basic_filebuf/2.cc: New. * 27_io/basic_filebuf/3.cc: New. * 27_io/basic_filebuf/4.cc: New. * 27_io/basic_filebuf/close/char/1.cc: New. * 27_io/basic_filebuf/close/char/2.cc: New. * 27_io/basic_filebuf/close/char/3.cc: New. * 27_io/basic_filebuf/close/char/4879.cc: New. * 27_io/basic_filebuf/close/char/9964.cc: New. * 27_io/basic_filebuf/imbue/char/1.cc: New. * 27_io/basic_filebuf/imbue/char/9322.cc: New. * 27_io/basic_filebuf/in_avail/char/1.cc: New. * 27_io/basic_filebuf/is_open/char/1.cc: New. * 27_io/basic_filebuf/open/char/1.cc: New. * 27_io/basic_filebuf/open/char/2.cc: New. * 27_io/basic_filebuf/open/char/3.cc: New. * 27_io/basic_filebuf/open/char/9507.cc: New. * 27_io/basic_filebuf/overflow/char/1.cc: New. * 27_io/basic_filebuf/overflow/char/3599.cc: New. * 27_io/basic_filebuf/overflow/char/9169.cc: New. * 27_io/basic_filebuf/overflow/char/9182-2.cc: New. * 27_io/basic_filebuf/overflow/char/9988.cc: New. * 27_io/basic_filebuf/sbumpc/char/1.cc: New. * 27_io/basic_filebuf/sbumpc/char/9825.cc: New. * 27_io/basic_filebuf/seekoff/char/1.cc: New. * 27_io/basic_filebuf/seekoff/char/2.cc: New. * 27_io/basic_filebuf/seekpos/char/1.cc: New. * 27_io/basic_filebuf/seekpos/char/2.cc: New. * 27_io/basic_filebuf/setbuf/char/1.cc: New. * 27_io/basic_filebuf/setbuf/char/2.cc: New. * 27_io/basic_filebuf/setbuf/char/3.cc: New. * 27_io/basic_filebuf/sgetc/char/1.cc: New. * 27_io/basic_filebuf/sgetn/char/1.cc: New. * 27_io/basic_filebuf/sgetn/char/2.cc: New. * 27_io/basic_filebuf/snextc/char/1.cc: New. * 27_io/basic_filebuf/sputbackc/char/1.cc: New. * 27_io/basic_filebuf/sputbackc/char/9425.cc: New. * 27_io/basic_filebuf/sputc/char/1.cc: New. * 27_io/basic_filebuf/sputc/char/1057.cc: New. * 27_io/basic_filebuf/sputc/char/9701-2.cc: New. * 27_io/basic_filebuf/sputn/char/1.cc: New. * 27_io/basic_filebuf/sputn/char/1057.cc: New. * 27_io/basic_filebuf/sputn/char/9701-1.cc: New. * 27_io/basic_filebuf/sungetc/char/1.cc: New. * 27_io/basic_filebuf/sync/char/1057.cc: New. * 27_io/basic_filebuf/sync/char/9182-1.cc: New. * 27_io/basic_filebuf/underflow/char/10097.cc: New. * 27_io/basic_fstream/1.cc: New. * 27_io/basic_fstream/2.cc: New. * 27_io/basic_fstream/3.cc: New. * 27_io/basic_fstream/4.cc: New. * 27_io/basic_fstream/rdbuf/char/2832.cc: New. * 27_io/basic_ifstream/1.cc: New. * 27_io/basic_ifstream/2.cc: New. * 27_io/basic_ifstream/3.cc: New. * 27_io/basic_ifstream/4.cc: New. * 27_io/basic_ifstream/cons/char/1.cc: New. * 27_io/basic_ifstream/open/char/1.cc: New. * 27_io/basic_ifstream/rdbuf/char/2832.cc: New. * 27_io/basic_ios/1.cc: New. * 27_io/basic_ios/2.cc: New. * 27_io/basic_ios/3.cc: New. * 27_io/basic_ios/4.cc: New. * 27_io/basic_ios/clear/char/1.cc: New. * 27_io/basic_ios/cons/char/1.cc: New. * 27_io/basic_ios/cons/char/2.cc: New. * 27_io/basic_ios/cons/char/3.cc: New. * 27_io/basic_ios/copyfmt/char/1.cc: New. * 27_io/basic_ios/copyfmt/char/2.cc: New. * 27_io/basic_ios/exceptions/char/1.cc: New. * 27_io/basic_ios/locales/char/1.cc: New. * 27_io/basic_iostream/1.cc: New. * 27_io/basic_iostream/2.cc: New. * 27_io/basic_iostream/3.cc: New. * 27_io/basic_iostream/4.cc: New. * 27_io/basic_istream/1.cc: New. * 27_io/basic_istream/2.cc: New. * 27_io/basic_istream/3.cc: New. * 27_io/basic_istream/4.cc: New. * 27_io/basic_istream/exceptions/char/9561.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/01.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/02.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/03.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/06.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/07.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/08.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/09.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/10.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/11.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/12.cc: New. * 27_io/basic_istream/extractors_arithmetic/char/13.cc: New. * 27_io/basic_istream/extractors_character/char/1.cc: New. * 27_io/basic_istream/extractors_character/char/2.cc: New. * 27_io/basic_istream/extractors_character/char/3.cc: New. * 27_io/basic_istream/extractors_character/char/9826.cc: New. * 27_io/basic_istream/extractors_other/char/1.cc: New. * 27_io/basic_istream/extractors_other/char/2.cc: New. * 27_io/basic_istream/extractors_other/char/3.cc: New. * 27_io/basic_istream/extractors_other/char/9318-in.cc: New. * 27_io/basic_istream/extractors_other/char/9424-in.cc: New. * 27_io/basic_istream/get/char/1.cc: New. * 27_io/basic_istream/get/char/2.cc: New. * 27_io/basic_istream/getline/char/1.cc: New. * 27_io/basic_istream/getline/char/2.cc: New. * 27_io/basic_istream/getline/char/3.cc: New. * 27_io/basic_istream/ignore/char/1.cc: New. * 27_io/basic_istream/ignore/char/6360.cc: New. * 27_io/basic_istream/ignore/char/7220.cc: New. * 27_io/basic_istream/peek/char/1.cc: New. * 27_io/basic_istream/peek/char/6414.cc: New. * 27_io/basic_istream/putback/char/1.cc: New. * 27_io/basic_istream/read/char/1.cc: New. * 27_io/basic_istream/read/char/2.cc: New. * 27_io/basic_istream/read/char/3.cc: New. * 27_io/basic_istream/readsome/char/6746-1.cc: New. * 27_io/basic_istream/readsome/char/6746-2.cc: New. * 27_io/basic_istream/readsome/char/8258.cc: New. * 27_io/basic_istream/seekg/char/2346-fstream.cc: New. * 27_io/basic_istream/seekg/char/2346-sstream.cc: New. * 27_io/basic_istream/seekg/char/8348-1.cc: New. * 27_io/basic_istream/seekg/char/8348-2.cc: New. * 27_io/basic_istream/seekg/char/fstream.cc: New. * 27_io/basic_istream/seekg/char/sstream.cc: New. * 27_io/basic_istream/sentry/char/1.cc: New. * 27_io/basic_istream/sentry/char/2.cc: New. * 27_io/basic_istream/sentry/char/3.cc: New. * 27_io/basic_istream/sentry/char/3983-fstream.cc: New. * 27_io/basic_istream/sentry/char/3983-sstream.cc: New. * 27_io/basic_istream/tellg/char/1.cc: New. * 27_io/basic_istream/tellg/char/8348.cc: New. * 27_io/basic_istream/tellg/char/fstream.cc: New. * 27_io/basic_istream/tellg/char/sstream.cc: New. * 27_io/basic_istream/ws/char/1.cc: New. * 27_io/basic_istringstream/1.cc: New. * 27_io/basic_istringstream/2.cc: New. * 27_io/basic_istringstream/3.cc: New. * 27_io/basic_istringstream/4.cc: New. * 27_io/basic_istringstream/rdbuf/char/2832.cc: New. * 27_io/basic_istringstream/str/char/1.cc: New. * 27_io/basic_ofstream/1.cc: New. * 27_io/basic_ofstream/2.cc: New. * 27_io/basic_ofstream/3.cc: New. * 27_io/basic_ofstream/4.cc: New. * 27_io/basic_ofstream/cons/char/2.cc: New. * 27_io/basic_ofstream/open/char/1.cc: New. * 27_io/basic_ofstream/rdbuf/char/2832.cc: New. * 27_io/basic_ostream/1.cc: New. * 27_io/basic_ostream/2.cc: New. * 27_io/basic_ostream/3.cc: New. * 27_io/basic_ostream/4.cc: New. * 27_io/basic_ostream/cons/char/9827.cc: New. * 27_io/basic_ostream/endl/char/1.cc: New. * 27_io/basic_ostream/ends/char/1.cc: New. * 27_io/basic_ostream/ends/char/2.cc: New. * 27_io/basic_ostream/exceptions/char/9561.cc: New. * 27_io/basic_ostream/flush/char/1.cc: New. * 27_io/basic_ostream/inserters_arithmetic/char/1.cc: New. * 27_io/basic_ostream/inserters_arithmetic/char/2.cc: New. * 27_io/basic_ostream/inserters_arithmetic/char/3.cc: New. * 27_io/basic_ostream/inserters_arithmetic/char/4.cc: New. * 27_io/basic_ostream/inserters_arithmetic/char/4402.cc: New. * 27_io/basic_ostream/inserters_arithmetic/char/5.cc: New. * 27_io/basic_ostream/inserters_arithmetic/char/6.cc: New. * 27_io/basic_ostream/inserters_arithmetic/wchar_t/1.cc: New. * 27_io/basic_ostream/inserters_character/char/1.cc: New. * 27_io/basic_ostream/inserters_character/char/2.cc: New. * 27_io/basic_ostream/inserters_character/char/3.cc: New. * 27_io/basic_ostream/inserters_character/char/4.cc: New. * 27_io/basic_ostream/inserters_character/char/5.cc: New. * 27_io/basic_ostream/inserters_character/char/6.cc: New. * 27_io/basic_ostream/inserters_character/char/8.cc: New. * 27_io/basic_ostream/inserters_character/wchar_t/7.cc: New. * 27_io/basic_ostream/inserters_character/wchar_t/8.cc: New. * 27_io/basic_ostream/inserters_other/char/1.cc: New. * 27_io/basic_ostream/inserters_other/char/2.cc: New. * 27_io/basic_ostream/inserters_other/char/3.cc: New. * 27_io/basic_ostream/inserters_other/char/4.cc: New. * 27_io/basic_ostream/inserters_other/char/9318-out.cc: New. * 27_io/basic_ostream/inserters_other/char/9424-out.cc: New. * 27_io/basic_ostream/sentry/char/1.cc: New. * 27_io/basic_ostream/sentry/char/2.cc: New. * 27_io/basic_ostream/sentry/char/3983-fstream.cc: New. * 27_io/basic_ostream/sentry/char/3983-sstream.cc: New. * 27_io/basic_ostream/tellp/char/1.cc: New. * 27_io/basic_ostream/tellp/char/2.cc: New. * 27_io/basic_ostringstream/1.cc: New. * 27_io/basic_ostringstream/2.cc: New. * 27_io/basic_ostringstream/3.cc: New. * 27_io/basic_ostringstream/4.cc: New. * 27_io/basic_ostringstream/cons/char/3.cc: New. * 27_io/basic_ostringstream/rdbuf/char/2832.cc: New. * 27_io/basic_ostringstream/str/char/1.cc: New. * 27_io/basic_ostringstream/str/char/2.cc: New. * 27_io/basic_streambuf/1.cc: New. * 27_io/basic_streambuf/2.cc: New. * 27_io/basic_streambuf/3.cc: New. * 27_io/basic_streambuf/cons/char/1.cc: New. * 27_io/basic_streambuf/imbue/char/1.cc: New. * 27_io/basic_streambuf/imbue/char/9322.cc: New. * 27_io/basic_streambuf/overflow/char/1.cc: New. * 27_io/basic_streambuf/overflow/char/2.cc: New. * 27_io/basic_streambuf/overflow/char/3599.cc: New. * 27_io/basic_streambuf/sgetc/char/1.cc: New. * 27_io/basic_streambuf/sgetn/char/1.cc: New. * 27_io/basic_streambuf/sputbackc/char/9538.cc: New. * 27_io/basic_streambuf/sputc/char/1057.cc: New. * 27_io/basic_streambuf/sputn/char/1.cc: New. * 27_io/basic_streambuf/sputn/char/1057.cc: New. * 27_io/basic_streambuf/sync/char/1057.cc: New. * 27_io/basic_stringbuf/1.cc: New. * 27_io/basic_stringbuf/2.cc: New. * 27_io/basic_stringbuf/3.cc: New. * 27_io/basic_stringbuf/4.cc: New. * 27_io/basic_stringbuf/5.cc: New. * 27_io/basic_stringbuf/imbue/char/1.cc: New. * 27_io/basic_stringbuf/imbue/char/9322.cc: New. * 27_io/basic_stringbuf/in_avail/char/1.cc: New. * 27_io/basic_stringbuf/overflow/char/2.cc: New. * 27_io/basic_stringbuf/overflow/char/3599.cc: New. * 27_io/basic_stringbuf/overflow/char/9988.cc: New. * 27_io/basic_stringbuf/sbumpc/char/1.cc: New. * 27_io/basic_stringbuf/sbumpc/char/9825.cc: New. * 27_io/basic_stringbuf/seekoff/char/1.cc: New. * 27_io/basic_stringbuf/seekoff/char/2.cc: New. * 27_io/basic_stringbuf/seekpos/char/1.cc: New. * 27_io/basic_stringbuf/seekpos/char/2.cc: New. * 27_io/basic_stringbuf/setbuf/char/1.cc: New. * 27_io/basic_stringbuf/setbuf/char/2.cc: New. * 27_io/basic_stringbuf/setbuf/char/3.cc: New. * 27_io/basic_stringbuf/sgetc/char/1.cc: New. * 27_io/basic_stringbuf/sgetn/char/1.cc: New. * 27_io/basic_stringbuf/snextc/char/1.cc: New. * 27_io/basic_stringbuf/sputbackc/char/1.cc: New. * 27_io/basic_stringbuf/sputbackc/char/9425.cc: New. * 27_io/basic_stringbuf/sputc/char/1.cc: New. * 27_io/basic_stringbuf/sputc/char/1057.cc: New. * 27_io/basic_stringbuf/sputc/char/9404-1.cc: New. * 27_io/basic_stringbuf/sputn/char/1.cc: New. * 27_io/basic_stringbuf/sputn/char/1057.cc: New. * 27_io/basic_stringbuf/sputn/char/9404-2.cc: New. * 27_io/basic_stringbuf/str/char/1.cc: New. * 27_io/basic_stringbuf/str/char/2.cc: New. * 27_io/basic_stringbuf/str/char/3.cc: New. * 27_io/basic_stringbuf/str/char/3955.cc: New. * 27_io/basic_stringbuf/sungetc/char/1.cc: New. * 27_io/basic_stringbuf/sync/char/1057.cc: New. * 27_io/basic_stringstream/1.cc: New. * 27_io/basic_stringstream/2.cc: New. * 27_io/basic_stringstream/3.cc: New. * 27_io/basic_stringstream/4.cc: New. * 27_io/basic_stringstream/rdbuf/char/2832.cc: New. * 27_io/basic_stringstream/str/char/1.cc: New. * 27_io/basic_stringstream/str/char/2.cc: New. * 27_io/basic_stringstream/str/char/3.cc: New. * 27_io/basic_stringstream/str/char/4.cc: New. * 27_io/fpos/1.cc: New. * 27_io/fpos/2.cc: New. * 27_io/fpos/3.cc: New. * 27_io/ios_base/callbacks/1.cc: New. * 27_io/ios_base/state/1.cc: New. * 27_io/ios_base/storage/1.cc: New. * 27_io/ios_base/storage/2.cc: New. * 27_io/ios_base/storage/3.cc: New. * 27_io/ios_base/sync_with_stdio/1.cc: New. * 27_io/ios_base/sync_with_stdio/2.cc: New. * 27_io/manipulators/adjustfield/char/1.cc: New. * 27_io/manipulators/adjustfield/char/2.cc: New. * 27_io/manipulators/basefield/char/1.cc: New. * 27_io/manipulators/standard/char/1.cc: New. * 27_io/manipulators/standard/char/2.cc: New. * 27_io/objects/char/1.cc: New. * 27_io/objects/char/2.cc: New. * 27_io/objects/char/2523-1_xin.cc: New. * 27_io/objects/char/2523-1_xin.in: New. * 27_io/objects/char/2523-2_xin.cc: New. * 27_io/objects/char/2523-2_xin.in: New. * 27_io/objects/char/3045.cc: New. * 27_io/objects/char/3647.cc: New. * 27_io/objects/char/3_xin.cc: New. * 27_io/objects/char/3_xin.in: New. * 27_io/objects/char/4_xin.cc: New. * 27_io/objects/char/4_xin.in: New. * 27_io/objects/char/5268.cc: New. * 27_io/objects/char/5280_xin.cc: New. * 27_io/objects/char/5280_xin.in: New. * 27_io/objects/char/6548_xin.cc: New. * 27_io/objects/char/6548_xin.in: New. * 27_io/objects/char/6648-1_xin.cc: New. * 27_io/objects/char/6648-1_xin.in: New. * 27_io/objects/char/6648-2_xin.cc: New. * 27_io/objects/char/6648-2_xin.in: New. * 27_io/objects/char/7744_xin.cc: New. * 27_io/objects/char/7744_xin.in: New. * 27_io/objects/wchar_t/1.cc: New. * 27_io/types/1.cc: New. * 27_io/types/2.cc: New. * data/filebuf_members-1.tst: New. * data/filebuf_members-1.txt: New. * data/filebuf_virtuals-1.tst: New. * data/filebuf_virtuals-1.txt: New. * data/filebuf_virtuals-2.tst: New. * data/filebuf_virtuals-3.tst: New. * data/ifstream_members-1.tst: New. * data/ifstream_members-1.txt: New. * data/ios_base_members_static-1.tst: New. * data/istream_extractor_other-1.tst: New. * data/istream_extractor_other-1.txt: New. * data/istream_extractor_other-2.tst: New. * data/istream_seeks-1.tst: New. * data/istream_seeks-1.txt: New. * data/istream_seeks-2.tst: New. * data/istream_seeks-3.tst: New. * data/istream_unformatted-1.tst: New. * data/istream_unformatted-1.txt: New. * data/ofstream_members-1.tst: New. * data/ostream_inserter_char-1.tst: New. * data/ostream_inserter_char-1.txt: New. * data/ostream_inserter_other-1.tst: New. * data/ostream_inserter_other-2.tst: New. * data/ostream_seeks-1.tst: New. 2003-04-09 Benjamin Kosnik <bkoz@redhat.com> * include/bits/sstream.tcc (basic_stringbuf::seekpos): Remove requirement that __mode must be strict input or output. * include/std/std_streambuf.h (basic_streambuf::setp): Set _M_out_lim. * include/std/std_sstream.h (basic_strinbuf::str): Zero length output string shouldn't core. (basic_stringbuf::_M_really_sync): Add base argument. Remove rturn type. * include/bits/sstream.tcc: Adjust _M_really_sync bits here. * include/bits/istream.tcc (basic_istream::putback): Set gcount to zero. 2003-04-09 Benjamin Kosnik <bkoz@redhat.com> * testsuite/data: New directory. * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Modify to copy files from the testsuite data directory. (libstdc++-v3-list-sourcefiles): Add another test list filter, for testfiles containing _xin, which now means this is an interactive test and should be run with the interactive dejagnu hooks. * testsuite/Makefile.am: Remove testsuite_* files. * testsuite/Makefile.in: Regenerate. From-SVN: r65421
2003-04-10 09:15:40 +02:00
if (!__testput)
{
// NB: Start ostringstream buffers at 512 chars. This is an
// experimental value (pronounced "arbitrary" in some of the
// hipper english-speaking countries), and can be changed to
// suit particular needs.
//
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 169. Bad efficiency of overflow() mandated
// 432. stringbuf::overflow() makes only one write position
// available
const __size_type __opt_len = std::max(__size_type(2 * __capacity),
__size_type(512));
const __size_type __len = std::min(__opt_len, __max_size);
__string_type __tmp;
__tmp.reserve(__len);
if (this->pbase())
__tmp.assign(this->pbase(), this->epptr() - this->pbase());
__tmp.push_back(__conv);
_M_string.swap(__tmp);
_M_sync(const_cast<char_type*>(_M_string.data()),
this->gptr() - this->eback(), this->pptr() - this->pbase());
}
else
*this->pptr() = __conv;
this->pbump(1);
return __c;
}
template <class _CharT, class _Traits, class _Alloc>
typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type
basic_stringbuf<_CharT, _Traits, _Alloc>::
underflow()
{
int_type __ret = traits_type::eof();
const bool __testin = this->_M_mode & ios_base::in;
if (__testin)
{
// Update egptr() to match the actual string end.
_M_update_egptr();
if (this->gptr() < this->egptr())
__ret = traits_type::to_int_type(*this->gptr());
}
return __ret;
}
template <class _CharT, class _Traits, class _Alloc>
typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
basic_stringbuf<_CharT, _Traits, _Alloc>::
seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode)
{
pos_type __ret = pos_type(off_type(-1));
cp-tree.h (lang_type_class): Remove is_partial_instantiation. * cp-tree.h (lang_type_class): Remove is_partial_instantiation. (PARTIAL_INSTANTIATION_P): Remove. (IMPLICIT_TYPENAME_P): Likewise. (IMPLICIT_TYPENAME_TYPE_DECL_P): Likewise. (build_typename_type): Remove declaration. (parmlist_is_exprlist): Likewise. * decl.c (build_typename_type): Make it static, remove third parameter. (push_class_binding): Don't do implicit typename stuff. (make_typename_type): Likewise. (lookup_name_real): Likewise. (grokdeclarator): Don't try to convert declarations into initializations. Don't do implicit typename stuff. (parmlist_is_exprlist): Remove. (xref_basetypes): Simplify. * decl2.c (grokfield): Don't try to convert declarations into initializations. (build_anon_union_vars): Do this while processing templates, too. (finish_anon_union): Likewise. * error.c (dump_type): Remove implicit typename handling. * parser.c (cp_parser_diagnose_invalid_type_name): New method. (cp_parser_primary_expression): Correct handling of names not found by unqualified name lookup in templates. (cp_parser_nested_name_specifier_opt): Avoid checking dependency of types when possible. (cp_parser_simple_declaration): Complain intelligently about some invalid declarations. (cp_parser_member_declaration): Likewise. (cp_parser_constructor_declarator_p): Don't check when we're in a function scope. * pt.c (instantiate_class_template): Remove PARTIAL_INSTANTIATION_P gunk. * search.c (lookup_field_r): Don't build implicit typenames. (marked_pushdecls_p): Don't enter dependent base types. (unmarked_pushdecls_p): Likewise. * semantics.c (begin_class_definition): Remove implicit typename stuff. * config/locale/gnu/messages_members.h: Use this-> to refer to unqualified members of base clasess. * config/locale/ieee_1003.1-2001/codecvt_specializations.h: Likewise. * include/bits/codecvt.h: Likewise. * include/bits/deque.tcc: Likewise. * include/bits/fstream.tcc: Likewise. * include/bits/istream.tcc: Likewise. * include/bits/list.tcc: Likewise. * include/bits/locale_facets.h: Likewise. * include/bits/ostream.tcc: Likewise. * include/bits/sstream.tcc: Likewise. * include/bits/stl_bvector.h: Likewise. * include/bits/stl_deque.h: Likewise. * include/bits/stl_list.h: Likewise. * include/bits/stl_tree.h: Likewise. * include/bits/stl_vector.h: Likewise. * include/bits/vector.tcc: Likewise. * include/ext/ropeimpl.h: Likewise. * include/ext/stdio_filebuf.h: Likewise. * include/ext/stl_rope.h: Likewise. * include/std/std_fstream.h: Likewise. * include/std/std_sstream.h: Likewise. Co-Authored-By: Jeffrey Oldham <oldham@codesourcery.com> From-SVN: r61403
2003-01-16 21:30:50 +01:00
bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
const bool __testboth = __testin && __testout && __way != ios_base::cur;
__testin &= !(__mode & ios_base::out);
__testout &= !(__mode & ios_base::in);
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 453. basic_stringbuf::seekoff need not always fail for an empty stream.
const char_type* __beg = __testin ? this->eback() : this->pbase();
if ((__beg || !__off) && (__testin || __testout || __testboth))
{
_M_update_egptr();
off_type __newoffi = __off;
off_type __newoffo = __newoffi;
if (__way == ios_base::cur)
{
__newoffi += this->gptr() - __beg;
__newoffo += this->pptr() - __beg;
}
else if (__way == ios_base::end)
__newoffo = __newoffi += this->egptr() - __beg;
if ((__testin || __testboth)
&& __newoffi >= 0
&& this->egptr() - __beg >= __newoffi)
{
this->gbump((__beg + __newoffi) - this->gptr());
__ret = pos_type(__newoffi);
}
if ((__testout || __testboth)
&& __newoffo >= 0
&& this->egptr() - __beg >= __newoffo)
{
this->pbump((__beg + __newoffo) - this->pptr());
__ret = pos_type(__newoffo);
}
}
return __ret;
}
template <class _CharT, class _Traits, class _Alloc>
typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
basic_stringbuf<_CharT, _Traits, _Alloc>::
seekpos(pos_type __sp, ios_base::openmode __mode)
{
pos_type __ret = pos_type(off_type(-1));
const bool __testin = (ios_base::in & this->_M_mode & __mode) != 0;
const bool __testout = (ios_base::out & this->_M_mode & __mode) != 0;
const char_type* __beg = __testin ? this->eback() : this->pbase();
if (__beg && (__testin || __testout))
{
_M_update_egptr();
const off_type __pos(__sp);
const bool __testpos = (0 <= __pos
&& __pos <= this->egptr() - __beg);
if (__testpos)
{
if (__testin)
this->gbump((__beg + __pos) - this->gptr());
if (__testout)
this->pbump((__beg + __pos) - this->pptr());
__ret = __sp;
}
}
return __ret;
}
Tune for size. 2002-02-15 Benjamin Kosnik <bkoz@redhat.com> Tune for size. * src/string-inst.cc (string::_Rep::_S_terminal): Remove redundant explicit instantiation. (string::_Rep::_S_max_size): Same. * include/bits/basic_string.tcc: Add extern explicit instantiations for string, wstring. * include/bits/basic_ios.tcc: Add extern explicit instantiations for ios, wios. * include/bits/streambuf.tcc: Same, for streambuf, wstreambuf. * include/bits/istream.tcc: Same, for istream, wistream. * include/bits/ostream.tcc: Same for ostream, wostream, iostream, wiostream. * include/bits/sstream.tcc: Same, for stringbuf, wstringbuf, istringstream, wistringstream, ostringstream, wostringstream, stringstream, wstringstream. * include/bits/fstream.tcc: Same, for filebuf, wfilebuf, ifstream, wifstream, ofstream, wofstream, fstream, wfstream. * src/misc-inst.cc: Correct comments. Add iomanip instantiations for wide streams. * include/std/std_iomanip.h: Same. * include/bits/locale_facets.tcc: Same. * include/std/std_streambuf.h: Correct _GLIBCPP_FULLY_COMPLIANT_HEADERS guard. * include/std/std_sstream.h: Same. * include/std/std_ostream.h: Same. * include/std/std_istream.h: Same. * include/std/std_fstream.h: Same. * include/std/std_streambuf.h: Add definitions for private copy ctor and assignment operator. * include/std/std_istream.h: Remove declared but undefined copy ctor and assignment operator. This is taken care of in ios_base, so adding it in the derived class as well is superfluous. * include/std/std_ostream.h: Same. * include/bits/basic_ios.h (basic_ios::clear): Don't inline. * include/bits/basic_ios.tcc (basic_ios::clear): Move definition here. From-SVN: r49798
2002-02-16 01:19:13 +01:00
template <class _CharT, class _Traits, class _Alloc>
void
basic_stringbuf<_CharT, _Traits, _Alloc>::
_M_sync(char_type* __base, __size_type __i, __size_type __o)
{
const bool __testin = _M_mode & ios_base::in;
const bool __testout = _M_mode & ios_base::out;
char_type* __endg = __base + _M_string.size();
char_type* __endp = __base + _M_string.capacity();
if (__base != _M_string.data())
{
// setbuf: __i == size of buffer area (_M_string.size() == 0).
__endg += __i;
__i = 0;
__endp = __endg;
}
if (__testin)
this->setg(__base, __base + __i, __endg);
if (__testout)
{
this->setp(__base, __endp);
this->pbump(__o);
// egptr() always tracks the string end. When !__testin,
// for the correct functioning of the streambuf inlines
// the other get area pointers are identical.
if (!__testin)
this->setg(__endg, __endg, __endg);
}
}
Tune for size. 2002-02-15 Benjamin Kosnik <bkoz@redhat.com> Tune for size. * src/string-inst.cc (string::_Rep::_S_terminal): Remove redundant explicit instantiation. (string::_Rep::_S_max_size): Same. * include/bits/basic_string.tcc: Add extern explicit instantiations for string, wstring. * include/bits/basic_ios.tcc: Add extern explicit instantiations for ios, wios. * include/bits/streambuf.tcc: Same, for streambuf, wstreambuf. * include/bits/istream.tcc: Same, for istream, wistream. * include/bits/ostream.tcc: Same for ostream, wostream, iostream, wiostream. * include/bits/sstream.tcc: Same, for stringbuf, wstringbuf, istringstream, wistringstream, ostringstream, wostringstream, stringstream, wstringstream. * include/bits/fstream.tcc: Same, for filebuf, wfilebuf, ifstream, wifstream, ofstream, wofstream, fstream, wfstream. * src/misc-inst.cc: Correct comments. Add iomanip instantiations for wide streams. * include/std/std_iomanip.h: Same. * include/bits/locale_facets.tcc: Same. * include/std/std_streambuf.h: Correct _GLIBCPP_FULLY_COMPLIANT_HEADERS guard. * include/std/std_sstream.h: Same. * include/std/std_ostream.h: Same. * include/std/std_istream.h: Same. * include/std/std_fstream.h: Same. * include/std/std_streambuf.h: Add definitions for private copy ctor and assignment operator. * include/std/std_istream.h: Remove declared but undefined copy ctor and assignment operator. This is taken care of in ios_base, so adding it in the derived class as well is superfluous. * include/std/std_ostream.h: Same. * include/bits/basic_ios.h (basic_ios::clear): Don't inline. * include/bits/basic_ios.tcc (basic_ios::clear): Move definition here. From-SVN: r49798
2002-02-16 01:19:13 +01:00
// Inhibit implicit instantiations for required instantiations,
// which are defined via explicit instantiations elsewhere.
Tune for size. 2002-02-15 Benjamin Kosnik <bkoz@redhat.com> Tune for size. * src/string-inst.cc (string::_Rep::_S_terminal): Remove redundant explicit instantiation. (string::_Rep::_S_max_size): Same. * include/bits/basic_string.tcc: Add extern explicit instantiations for string, wstring. * include/bits/basic_ios.tcc: Add extern explicit instantiations for ios, wios. * include/bits/streambuf.tcc: Same, for streambuf, wstreambuf. * include/bits/istream.tcc: Same, for istream, wistream. * include/bits/ostream.tcc: Same for ostream, wostream, iostream, wiostream. * include/bits/sstream.tcc: Same, for stringbuf, wstringbuf, istringstream, wistringstream, ostringstream, wostringstream, stringstream, wstringstream. * include/bits/fstream.tcc: Same, for filebuf, wfilebuf, ifstream, wifstream, ofstream, wofstream, fstream, wfstream. * src/misc-inst.cc: Correct comments. Add iomanip instantiations for wide streams. * include/std/std_iomanip.h: Same. * include/bits/locale_facets.tcc: Same. * include/std/std_streambuf.h: Correct _GLIBCPP_FULLY_COMPLIANT_HEADERS guard. * include/std/std_sstream.h: Same. * include/std/std_ostream.h: Same. * include/std/std_istream.h: Same. * include/std/std_fstream.h: Same. * include/std/std_streambuf.h: Add definitions for private copy ctor and assignment operator. * include/std/std_istream.h: Remove declared but undefined copy ctor and assignment operator. This is taken care of in ios_base, so adding it in the derived class as well is superfluous. * include/std/std_ostream.h: Same. * include/bits/basic_ios.h (basic_ios::clear): Don't inline. * include/bits/basic_ios.tcc (basic_ios::clear): Move definition here. From-SVN: r49798
2002-02-16 01:19:13 +01:00
// NB: This syntax is a GNU extension.
#if _GLIBCXX_EXTERN_TEMPLATE
Tune for size. 2002-02-15 Benjamin Kosnik <bkoz@redhat.com> Tune for size. * src/string-inst.cc (string::_Rep::_S_terminal): Remove redundant explicit instantiation. (string::_Rep::_S_max_size): Same. * include/bits/basic_string.tcc: Add extern explicit instantiations for string, wstring. * include/bits/basic_ios.tcc: Add extern explicit instantiations for ios, wios. * include/bits/streambuf.tcc: Same, for streambuf, wstreambuf. * include/bits/istream.tcc: Same, for istream, wistream. * include/bits/ostream.tcc: Same for ostream, wostream, iostream, wiostream. * include/bits/sstream.tcc: Same, for stringbuf, wstringbuf, istringstream, wistringstream, ostringstream, wostringstream, stringstream, wstringstream. * include/bits/fstream.tcc: Same, for filebuf, wfilebuf, ifstream, wifstream, ofstream, wofstream, fstream, wfstream. * src/misc-inst.cc: Correct comments. Add iomanip instantiations for wide streams. * include/std/std_iomanip.h: Same. * include/bits/locale_facets.tcc: Same. * include/std/std_streambuf.h: Correct _GLIBCPP_FULLY_COMPLIANT_HEADERS guard. * include/std/std_sstream.h: Same. * include/std/std_ostream.h: Same. * include/std/std_istream.h: Same. * include/std/std_fstream.h: Same. * include/std/std_streambuf.h: Add definitions for private copy ctor and assignment operator. * include/std/std_istream.h: Remove declared but undefined copy ctor and assignment operator. This is taken care of in ios_base, so adding it in the derived class as well is superfluous. * include/std/std_ostream.h: Same. * include/bits/basic_ios.h (basic_ios::clear): Don't inline. * include/bits/basic_ios.tcc (basic_ios::clear): Move definition here. From-SVN: r49798
2002-02-16 01:19:13 +01:00
extern template class basic_stringbuf<char>;
extern template class basic_istringstream<char>;
extern template class basic_ostringstream<char>;
extern template class basic_stringstream<char>;
#ifdef _GLIBCXX_USE_WCHAR_T
extern template class basic_stringbuf<wchar_t>;
extern template class basic_istringstream<wchar_t>;
extern template class basic_ostringstream<wchar_t>;
Tune for size. 2002-02-15 Benjamin Kosnik <bkoz@redhat.com> Tune for size. * src/string-inst.cc (string::_Rep::_S_terminal): Remove redundant explicit instantiation. (string::_Rep::_S_max_size): Same. * include/bits/basic_string.tcc: Add extern explicit instantiations for string, wstring. * include/bits/basic_ios.tcc: Add extern explicit instantiations for ios, wios. * include/bits/streambuf.tcc: Same, for streambuf, wstreambuf. * include/bits/istream.tcc: Same, for istream, wistream. * include/bits/ostream.tcc: Same for ostream, wostream, iostream, wiostream. * include/bits/sstream.tcc: Same, for stringbuf, wstringbuf, istringstream, wistringstream, ostringstream, wostringstream, stringstream, wstringstream. * include/bits/fstream.tcc: Same, for filebuf, wfilebuf, ifstream, wifstream, ofstream, wofstream, fstream, wfstream. * src/misc-inst.cc: Correct comments. Add iomanip instantiations for wide streams. * include/std/std_iomanip.h: Same. * include/bits/locale_facets.tcc: Same. * include/std/std_streambuf.h: Correct _GLIBCPP_FULLY_COMPLIANT_HEADERS guard. * include/std/std_sstream.h: Same. * include/std/std_ostream.h: Same. * include/std/std_istream.h: Same. * include/std/std_fstream.h: Same. * include/std/std_streambuf.h: Add definitions for private copy ctor and assignment operator. * include/std/std_istream.h: Remove declared but undefined copy ctor and assignment operator. This is taken care of in ios_base, so adding it in the derived class as well is superfluous. * include/std/std_ostream.h: Same. * include/bits/basic_ios.h (basic_ios::clear): Don't inline. * include/bits/basic_ios.tcc (basic_ios::clear): Move definition here. From-SVN: r49798
2002-02-16 01:19:13 +01:00
extern template class basic_stringstream<wchar_t>;
#endif
#endif
c++config: Add in revised namespace associations. 2005-12-18 Benjamin Kosnik <bkoz@redhat.com> * include/bits/c++config: Add in revised namespace associations. _GLIBCXX_BEGIN_NAMESPACE: New macro. _GLIBCXX_END_NAMESPACE: Same. _GLIBCXX_BEGIN_NESTED_NAMESPACE: Same. _GLIBCXX_END_NESTED_NAMESPACE: Same. * acinclude.m4 (GLIBCXX_ENABLE_SYMVERS]): Add gnu-versioned-namespace. * configure: Regenerated. * config.h.in: Same. * config/abi/pre/gnu-versioned-namespace.ver: New. * config/abi/pre/gnu.ver (GLIBCXX_3.4.7): Add exports for nested debug mode items. * include/Makefile.am (${host_builddir}/c++config.h): Fill in values for __GLIBCXX__ and _GLIBCXX_NAMESPACE_ASSOCIATION_VERSION. * include/Makefile.in: Regnerate. * src/compatibility.cc: Alias new, nested definitions to exported symbols from non-nested __gnu_debug. * src/Makefile.am: Add in ENABLE_SYMVERS_GNU_NAMESPACE. * src/Makefile.in: Regenerate. * docs/html/debug_mode.html: Revise for nested design. * docs/html/debug.html: Use debug qualifications instead of __gnu_debug. * docs/html/configopts.html: Revise documentation for --enable-symvers. * include/debug/formatter: Simplify namespace qualifications for current, nested-only reality. Add top-level namespace alias, namespace debug, for debug-mode containers. * include/debug/safe_iterator.h: Same. * include/debug/set.h: Same. * include/debug/hash_multimap.h: Same. * include/debug/hash_set.h: Same. * include/debug/bitset * include/debug/safe_sequence.h: Same. * include/debug/multiset.h: Same. * include/debug/safe_base.h: Same. * include/debug/functions.h: Same. * include/debug/safe_iterator.tcc * include/debug/hash_multiset.h: Same. * include/debug/vector * include/debug/map.h: Same. * include/debug/deque * include/debug/hash_map.h: Same. * include/debug/string * include/debug/macros.h: Same. * include/debug/list * include/debug/debug.h: Same. * include/debug/multimap.h: Same. * src/debug.cc: Same. * testsuite/23_containers/vector/invalidation/1.cc: Cleanups. * testsuite/23_containers/vector/invalidation/2.cc: Same. * testsuite/23_containers/vector/invalidation/3.cc: Same. * testsuite/23_containers/vector/invalidation/4.cc: Same. * testsuite/23_containers/deque/invalidation/1.cc: Same. * testsuite/23_containers/deque/invalidation/2.cc: Same. * testsuite/23_containers/deque/invalidation/3.cc: Same. * testsuite/23_containers/deque/invalidation/4.cc: Same. * testsuite/23_containers/multiset/invalidation/1.cc: Same. * testsuite/23_containers/multiset/invalidation/2.cc: Same. * testsuite/23_containers/multimap/invalidation/1.cc: Same. * testsuite/23_containers/multimap/invalidation/2.cc: Same. * testsuite/23_containers/bitset/invalidation/1.cc: Same. * testsuite/23_containers/bitset/cons/16020.cc: Same. * testsuite/23_containers/bitset/operations/13838.cc: Same. * testsuite/23_containers/list/invalidation/1.cc: Same. * testsuite/23_containers/list/invalidation/2.cc: Same. * testsuite/23_containers/list/invalidation/3.cc: Same. * testsuite/23_containers/list/invalidation/4.cc: Same. * testsuite/23_containers/set/invalidation/1.cc: Same. * testsuite/23_containers/set/invalidation/2.cc: Same. * testsuite/23_containers/map/invalidation/1.cc: Same. * testsuite/23_containers/map/invalidation/2.cc: Same. * testsuite/23_containers/map/insert/16813.cc: Same. * include/bits/basic_ios.h: Use _GLIBCXX_BEGIN_NAMESPACE(std) and friends. * include/bits/stl_list.h: Same. * include/bits/stl_map.h: Same. * include/bits/stl_algobase.h: Same. * include/bits/localefwd.h: Same. * include/bits/valarray_array.tcc: Same. * include/bits/valarray_after.h: Same. * include/bits/gslice_array.h: Same. * include/bits/stl_queue.h: Same. * include/bits/gslice.h: Same. * include/bits/locale_facets.tcc: Same. * include/bits/locale_classes.h: Same. * include/bits/stl_set.h: Same. * include/bits/locale_facets.h: Same. * include/bits/stl_stack.h: Same. * include/bits/stl_iterator_base_types.h: Same. * include/bits/stl_heap.h: Same. * include/bits/indirect_array.h: Same. * include/bits/atomicity.h: Same. * include/bits/stream_iterator.h: Same. * include/bits/concurrence.h: Same. * include/bits/basic_string.h: Same. * include/bits/stl_multimap.h: Same. * include/bits/stl_pair.h: Same. * include/bits/basic_ios.tcc: Same. * include/bits/stl_raw_storage_iter.h: Same. * include/bits/stl_vector.h: Same. * include/bits/stl_numeric.h: Same. * include/bits/ios_base.h: Same. * include/bits/stl_deque.h: Same. * include/bits/istream.tcc: Same. * include/bits/postypes.h: Same. * include/bits/stl_multiset.h: Same. * include/bits/mask_array.h: Same. * include/bits/stl_uninitialized.h: Same. * include/bits/ostream.tcc: Same. * include/bits/slice_array.h: Same. * include/bits/boost_concept_check.h: Same. * include/bits/sstream.tcc: Same. * include/bits/stl_iterator_base_funcs.h: Same. * include/bits/char_traits.h: Same. * include/bits/stl_algo.h: Same. * include/bits/stringfwd.h: Same. * include/bits/c++config * include/bits/stl_iterator.h: Same. * include/bits/valarray_array.h: Same. * include/bits/stl_tempbuf.h: Same. * include/bits/vector.tcc: Same. * include/bits/deque.tcc: Same. * include/bits/stl_bvector.h: Same. * include/bits/basic_string.tcc: Same. * include/bits/list.tcc: Same. * include/bits/streambuf_iterator.h: Same. * include/bits/valarray_before.h: Same. * include/bits/stl_construct.h: Same. * include/bits/stl_function.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/streambuf.tcc: Same. * include/bits/allocator.h: Same. * include/bits/stl_tree.h: Same. * include/bits/fstream.tcc: Same. * include/bits/stl_relops.h: Same. * include/bits/functexcept.h: Same. * include/std/std_valarray.h: Same. * include/std/std_iostream.h: Same. * include/std/std_streambuf.h: Same. * include/std/std_bitset.h: Same. * include/std/std_iosfwd.h: Same. * include/std/std_iomanip.h: Same. * include/std/std_fstream.h: Same. * include/std/std_limits.h: Same. * include/std/std_stdexcept.h: Same. * include/std/std_istream.h: Same. * include/std/std_complex.h: Same. * include/std/std_memory.h: Same. * include/std/std_ostream.h: Same. * include/std/std_sstream.h: Same. * include/c_std/std_csignal.h: Same. * include/c_std/std_cstdlib.h: Same. * include/c_std/std_cstdio.h: Same. * include/c_std/std_cstdarg.h: Same. * include/c_std/std_cctype.h: Same. * include/c_std/std_cmath.h: Same. * include/c_std/std_ctime.h: Same. * include/c_std/std_clocale.h: Same. * include/c_std/std_csetjmp.h: Same. * include/c_std/std_cwchar.h: Same. * include/c_std/std_cstring.h: Same. * include/c_std/std_cstddef.h: Same. * include/c_std/std_cwctype.h: Same. * include/backward/iterator.h: Same. * include/backward/set.h: Same. * include/backward/hashtable.h: Same. * include/backward/fstream.h: Same. * include/backward/tempbuf.h: Same. * include/backward/istream.h: Same. * include/backward/bvector.h: Same. * include/backward/stack.h: Same. * include/backward/rope.h: Same. * include/backward/complex.h: Same. * include/backward/ostream.h: Same. * include/backward/heap.h: Same. * include/backward/iostream.h: Same. * include/backward/function.h: Same. * include/backward/multimap.h: Same. * include/backward/pair.h: Same. * include/backward/stream.h: Same. * include/backward/iomanip.h: Same. * include/backward/strstream * include/backward/slist.h: Same. * include/backward/tree.h: Same. * include/backward/vector.h: Same. * include/backward/deque.h: Same. * include/backward/multiset.h: Same. * include/backward/list.h: Same. * include/backward/map.h: Same. * include/backward/algobase.h: Same. * include/backward/hash_map.h: Same. * include/backward/algo.h: Same. * include/backward/queue.h: Same. * include/backward/streambuf.h: Same. * src/allocator-inst.cc: Same. * src/complex_io.cc: Same. * src/localename.cc: Same. * src/limits.cc: Same. * src/ios_failure.cc: Same. * src/locale-misc-inst.cc: Same. * src/streambuf-inst.cc: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ios_locale.cc: Same. * src/pool_allocator.cc: Same. * src/fstream-inst.cc: Same. * src/istream-inst.cc: Same. * src/string-inst.cc: Same. * src/locale_init.cc: Same. * src/ctype.cc: Same. * src/strstream.cc: Same. * src/ostream-inst.cc: Same. * src/functexcept.cc: Same. * src/streambuf.cc: Same. * src/sstream-inst.cc: Same. * src/ios.cc: Same. * src/valarray-inst.cc: Same. * src/locale.cc: Same. * src/tree.cc: Same. * src/stdexcept.cc: Same. * src/istream.cc: Same. * src/compatibility.cc: Same. * src/locale-inst.cc: Same. * src/globals_io.cc: Same. * src/list.cc: Same. * src/ios_init.cc: Same. * src/locale_facets.cc: Same. * src/codecvt.cc: Same. * include/tr1/unordered_map: Use _GLIBCXX_BEGIN_NAMESPACE(tr1). * include/tr1/boost_shared_ptr.h: Same. * include/tr1/tuple * include/tr1/hashtable * include/tr1/type_traits_fwd.h: Same. * include/tr1/unordered_set * include/tr1/functional * include/tr1/ref_fwd.h: Same. * include/tr1/utility * include/tr1/type_traits * include/tr1/array * include/ext/hashtable.h: Use _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx). * include/ext/typelist.h: Same. * include/ext/hash_map: Same. * include/ext/rc_string_base.h: Same. * include/ext/pool_allocator.h: Same. * include/ext/iterator: Same. * include/ext/rb_tree: Same. * include/ext/numeric: Same. * include/ext/vstring.tcc: Same. * include/ext/sso_string_base.h: Same. * include/ext/stdio_filebuf.h: Same. * include/ext/algorithm: Same. * include/ext/codecvt_specializations.h: Same. * include/ext/new_allocator.h: Same. * include/ext/array_allocator.h: Same. * include/ext/vstring_util.h: Same. * include/ext/vstring_fwd.h: Same. * include/ext/mt_allocator.h: Same. * include/ext/debug_allocator.h: Same. * include/ext/slist: Same. * include/ext/stdio_sync_filebuf.h: Same. * include/ext/hash_fun.h: Same. * include/ext/malloc_allocator.h: Same. * include/ext/functional: Same. * include/ext/bitmap_allocator.h: Same. * include/ext/pod_char_traits.h: Same. * include/ext/vstring.h: Same. * include/ext/ropeimpl.h: Same. * include/ext/hash_set: Same. * include/ext/memory: Same. * include/ext/rope: Same. * include/bits/boost_concept_check.h: Same. * include/bits/stl_iterator.h: Same. * include/bits/char_traits.h: Same. * include/bits/cpp_type_traits.h: Same. * include/bits/concurrence.h: Same. * include/bits/atomicity.h: Same. * config/locale/gnu/numeric_members.cc: Same. * config/locale/gnu/collate_members.cc: Same. * config/locale/gnu/ctype_members.cc: Same. * config/locale/gnu/c_locale.cc: Same. * config/locale/gnu/codecvt_members.cc: Same. * config/locale/gnu/messages_members.cc: Same. * config/locale/gnu/c_locale.h: Same. * config/locale/gnu/monetary_members.cc: Same. * config/locale/gnu/time_members.cc: Same. * config/locale/ieee_1003.1-2001/c_locale.h: Same. * config/locale/generic/numeric_members.cc: Same. * config/locale/generic/collate_members.cc: Same. * config/locale/generic/ctype_members.cc: Same. * config/locale/generic/c_locale.cc: Same. * config/locale/generic/codecvt_members.cc: Same. * config/locale/generic/messages_members.cc: Same. * config/locale/generic/c_locale.h: Same. * config/locale/generic/monetary_members.cc: Same. * config/locale/generic/time_members.cc: Same. * config/os/aix/atomicity.h: Same. * config/os/irix/atomicity.h: Same. * config/cpu/powerpc/atomicity.h: Same. * config/cpu/cris/atomicity.h: Same. * config/cpu/ia64/atomicity.h: Same. * config/cpu/alpha/atomicity.h: Same. * config/cpu/m68k/atomicity.h: Same. * config/cpu/hppa/atomicity.h: Same. * config/cpu/mips/atomicity.h: Same. * config/cpu/sparc/atomicity.h: Same. * config/cpu/i386/atomicity.h: Same. * config/cpu/i486/atomicity.h: Same. * config/cpu/sh/atomicity.h: Same. * config/cpu/generic/atomicity.h: Same. * config/cpu/s390/atomicity.h: Same. * config/io/c_io_stdio.h: Same. * config/io/basic_file_stdio.cc: Same. * config/io/basic_file_stdio.h: Same. * src/misc-inst.cc: Same. * src/concept-inst.cc: Same. * src/ext-inst.cc: Same. * src/string-inst.cc: Same. * src/pool_allocator.cc: Same. * src/bitmap_allocator.cc: Same. * src/mt_allocator.cc: Same. * libsupc++/exception: Same. * libsupc++/vterminate.cc: Same. * testsuite/ext/hash_map/1.cc: Explicitly qualify __gnu_cxx::hash_map. * testsuite/ext/hash_map/14648.cc: Same. * libsupc++/eh_alloc.cc: Correct comment line spacing. From-SVN: r108775
2005-12-19 01:56:05 +01:00
_GLIBCXX_END_NAMESPACE
#endif