Commit Graph

1150 Commits

Author SHA1 Message Date
Paolo Carlini f53d0ff143 stl_algobase.h (copy_n + helpers, [...]): Move to...
2002-01-02  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/stl_algobase.h (copy_n + helpers,
	lexicographical_compare_3way + helpers):  Move to...
	* include/ext/algorithm:  ...here.
        * include/bits/stl_uninitialized.h (uninitialized_copy_n +
        helpers):  Move to...
        * include/ext/memory:  ...here, new file.
        * include/Makefile.am (ext_headers):  Add new file.
        * include/Makefile.in:  Regenerate.
        * testsuite/ext/headers.cc:  Include <ext/memory>.
	* include/backward/algobase.h:  Include <ext/memory> and
	<ext/algorithm>, tweak.
        * include/ext/ropeimpl.h:  Include <ext/memory>, tweak.
	* include/ext/stl_rope.h:  Include <ext/memory>, tweak.

From-SVN: r48467
2002-01-02 12:16:56 +00:00
Paolo Carlini 6d66e50d52 iterator: Add #include <bits/std_iterator.h>, tweak.
2001-12-31  Paolo Carlini  <pcarlini@unitus.it>

	* include/ext/iterator:  Add #include <bits/std_iterator.h>, tweak.
	* testsuite/ext/headers.cc:  Add <ext/iterator>.

From-SVN: r48430
2001-12-31 19:30:24 +00:00
Paolo Carlini e538847e1c hash_map: Move into __gnu_cxx, tweak, add using declarations.
2001-12-31  Paolo Carlini  <pcarlini@unitus.it>

	* include/ext/hash_map:  Move into __gnu_cxx,
	tweak, add using declarations.
	* include/ext/hash_set:  Ditto.
	* include/ext/ropeimpl.h:  Ditto.
	* include/ext/stl_hash_fun.h:  Ditto.
	* include/ext/stl_hashtable.h:  Ditto.
	* include/ext/stl_rope.h:  Ditto.
	* src/ext-inst.cc: Tweak.
	* testsuite/ext/rope.cc: Tweak.

From-SVN: r48422
2001-12-31 10:22:00 +00:00
Phil Edwards be3996918f re PR libstdc++/2054 (g++-3 rejects legal code, accepted by g++-2.95.2 (functors))
2001-12-28  Phil Edwards  <pme@gcc.gnu.org>

	PR libstdc++/2054
	* include/bits/stl_algo.h (lower_bound):  Relax concept checks.
	* testsuite/ext/concept_checks.cc:  New file.

From-SVN: r48351
2001-12-28 21:57:47 +00:00
Paolo Carlini 2c1bc4ebc9 stl_algo.h (count returning void, [...]): Move to...
2001-12-28  Paolo Carlini  <pcarlini@unitus.it>

        * include/bits/stl_algo.h (count returning void,
        count_if returning void, __random_sample, random_sample,
        random_sample_n, __is_heap, is_heap, is_sorted):  Move to...
        * include/ext/algorithm:  ...here, new file.
	* include/Makefile.am (ext_headers):  Add new file.
        * include/Makefile.in:  Regenerate.
	* testsuite/ext/headers.cc:  Include <ext/algorithm>.

From-SVN: r48350
2001-12-28 18:46:54 +00:00
Paolo Carlini bf95248579 basic_string.h (insert(__pos, __s, __n)): Optimize by avoiding temporaries and working in-place when possible.
2001-12-28  Paolo Carlini  <pcarlini@unitus.it>
            Nathan Myers  <ncm@cantrip.org>

	* include/bits/basic_string.h (insert(__pos, __s, __n)):
	Optimize by avoiding temporaries and working in-place when possible.
	(insert(__pos1, __str)): Call insert(__pos1, __str, __pos2, __n).
	(insert(__pos1, __str, __pos2, __n)): Call insert(__pos, __s, __n).
	* testsuite/21_strings/insert.cc (test02): New testcases.

Co-Authored-By: Nathan Myers <ncm@cantrip.org>

From-SVN: r48345
2001-12-28 14:00:18 +00:00
Phil Edwards bb2ae697ab testsuite_hooks.h (gnu_counting_struct): Add.
2001-12-27  Phil Edwards  <pme@gcc.gnu.org>

	* testsuite/testsuite_hooks.h (gnu_counting_struct):  Add.
	* testsuite/23_containers/deque_ctor.cc:  New file.

From-SVN: r48332
2001-12-27 21:51:28 +00:00
Phil Edwards 2d53d9ebe7 re PR libstdc++/3829 (missing template instantiations)
2001-12-27  Phil Edwards  <pme@gcc.gnu.org>

	PR libstdc++/3829
	* src/misc-inst.cc:  Many additional I/O-related instantiations.
	* testsuite/27_io/instantiations.cc:  New file.

From-SVN: r48324
2001-12-27 07:26:00 +00:00
Benjamin Kosnik f591eb23d1 insert_iterator.cc (test02): Add.
2001-12-26  Benjamin Kosnik  <bkoz@waller.constant.com>

	* testsuite/24_iterators/insert_iterator.cc (test02): Add.
	* testsuite/24_iterators/front_insert_iterator.cc (test02): Add.
	* testsuite/24_iterators/back_insert_iterator.cc (test02): Add.
	* testsuite/24_iterators/reverse_iterator.cc (test02): Add.

	* include/bits/stl_iterator.h (reverse_iterator): Uglify member
	current to _M_current.
	(back_insert_iterator): Ulify member container to _M_container.
	(front_insert_iterator): Same.
	(insert_iterator): Same.

From-SVN: r48318
2001-12-26 21:56:17 +00:00
David Billinghurst c6d96f20fd libstdc++-v3-dg.exp: Append .exe to executable filenames
2001-12-19  David Billinghurst <David.Billinghurst@riotinto.com>

        libstdc++-v3/5148
        * testsuite/lib/libstdc++-v3-dg.exp:  Append .exe to
        executable filenames

From-SVN: r48167
2001-12-18 23:34:06 +00:00
David Billinghurst 9e78e45a8d prune.exp: New file
2001-12-17  David Billinghurst <David.Billinghurst@riotinto.com>

	libstdc++/5136
	* testsuite/lib/prune.exp: New file
	* testsuite/lib/libstdc++-v3-dg.exp: Use it

From-SVN: r48133
2001-12-17 22:39:00 +00:00
Phil Edwards e9c46bb75e basic_file.h (__basic_file::fd): New function.
2001-12-17  Phil Edwards  <pme@gcc.gnu.org>

	* include/bits/basic_file.h (__basic_file::fd):  New function.
	* config/io/basic_file_stdio.h (__basic_file::fd):  Define.
	* include/bits/std_fstream.h (basic_filebuf::fd):  New function.
	* include/bits/fstream.tcc (basic_filebuf::fd):  Define.
	* testsuite/27_io/filebuf_members.cc (test_02):  New test.

From-SVN: r48107
2001-12-17 17:08:57 +00:00
Paolo Carlini 4b428ee570 assign.cc (test01): Add tests.
2001-12-16  Paolo Carlini  <pcarlini@unitus.it>

	* testsuite/21_strings/assign.cc (test01): Add tests.

From-SVN: r48078
2001-12-16 20:21:20 +00:00
Paolo Carlini bd1f473825 2001-12-15 Paolo Carlini <pcarlini@unitus.it>
Nathan Myers  <ncm@cantrip.org>

        * include/bits/basic_string.h
	(assign(__str, __pos, __n), assign(__s, __n)):  Optimize
	by avoiding unnecessary temporaries.
	(assign(__s)): Call assign(__s, __n).
	* include/bits/basic_string.tcc (_M_replace_safe): Adjust comment.
	* include/bits/std_string.h: include stl_function.h.
        * testsuite/21_strings/assign.cc (test02, test03): New tests.

Co-Authored-By: Nathan Myers <ncm@cantrip.org>

From-SVN: r48053
2001-12-16 01:02:17 +00:00
Benjamin Kosnik def9790d51 Clean up initialization and simplfy caching of underlying "C" locale objects.
2001-12-14  Benjamin Kosnik  <bkoz@redhat.com>

	Clean up initialization and simplfy caching of underlying "C"
	locale objects.
	* src/localename.cc (locale::_Impl::_Impl(string, size_t):
	Unconditionally create __clocale object for all named locales,
	including "C" and "POSIX".
	* config/locale/c_locale_generic.cc
	(locale::facet::_S_create_c_locale): Always set __cloc to zero.
	* config/locale/c_locale_gnu.cc: Always delete.
	* include/bits/localefwd.h (locale::facet::_S_c_locale): New.
	* src/locale.cc (locale::classic()): Initialize
	locale::facet::_S_c_locale.
	(locale::facet::_S_c_locale): Define.

	* include/bits/locale_facets.h: Add ctype_byname<wchar_t> ctor
	specialization.
	* src/locale.cc: Add definition here.
	* config/os/gnu-linux/bits/ctype_inline.h: Tweak.
	* config/os/gnu-linux/bits/ctype_noninline.h: Adjust initializations.
	* include/bits/locale_facets.h (ctype<char>::_M_c_locale_ctype): Add.
	Adjust ctors, dtors.
	(ctype<char>::_M_toupper): Remove const&.
	(ctype<char>::_M_tolower): Remove const&.
	(ctype<char>::_M_ctable): Remove const&.

	* include/bits/locale_facets.h (collate): Clean up initialization
	of _M_c_locale_collate in ctors and dtors.
	* config/locale/collate_members_gnu.cc: Always use extended
	functions.

	* include/bits/locale_facets.h (messages): Clean up inits in ctor/dtor.
	(messages_byname): Same.
	* config/locale/messages_members_generic.h (messages::~messages):
	Remove.
	* config/locale/messages_members_gnu.h: Same.

	* include/bits/localefwd.h: Clean. Move dtor definitions to
	* src/locale.cc: Here.
	* testsuite/22_locale/facet.cc: Fix spelling.

	Named locale support for ctype<wchar_t>.
        * acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add variable
        ctype_members_* bits.
        * aclocal.m4: Regenerate.
        * configure: Regenerate.
        * src/Makefile.am (sources): Add ctype.cc.
        * src/Makefile.in: Regenerate.
        * config/locale/ctype_members_generic.cc: New file.
        * config/locale/ctype_members_gnu.cc: New file.
        * src/locale.cc: Remove ctype<wchart_t> definitions.

From-SVN: r48034
2001-12-15 07:05:04 +00:00
Benjamin Kosnik 85230e5255 locale.cc (locale::locale(const char*)): Deal with locales named "".
2001-12-13  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/3679
	* src/locale.cc (locale::locale(const char*)): Deal with locales
	named "".
	* testsuite/22_locale/ctor_copy_dtor.cc (test01): Modify.

From-SVN: r47968
2001-12-13 11:12:56 +00:00
Paolo Carlini 897bb55fe3 ropeimpl.h (rope::_S_leaf_concat_char_iter, [...]): Adjust implicit typename.
2001-12-12  Paolo Carlini  <pcarlini@unitus.it>

	* include/ext/ropeimpl.h (rope::_S_leaf_concat_char_iter,
	_S_destr_leaf_concat_char_iter, _S_tree_concat, _S_concat_char_iter,
	_S_destr_concat_char_iter, _S_concat, _S_substring, _S_balance)
	: Adjust implicit typename.
	* include/ext/stl_rope.h (_Rope_iterator::operator=, rope::npos):
	Adjust implicit typename.
	* testsuite/27_io/streambuf.cc: Adjust implicit typename.

From-SVN: r47958
2001-12-13 00:41:03 +00:00
Benjamin Kosnik 9e5c7dba50 Named locale support for ctype<char>.
2001-12-12  Benjamin Kosnik  <bkoz@redhat.com>

	Named locale support for ctype<char>.
	* config/locale/c_locale_gnu.h (_GLIBCPP_C_LOCALE_GNU): New.
	* config/os/gnu-linux/bits/ctype_noninline.h (ctype<char>): Add
	definitions for alternate constructor.
	* config/os/solaris/solaris2.7/bits/ctype_noninline.h (ctype): Same.
	* config/os/solaris/solaris2.6/bits/ctype_noninline.h (ctype): Same.
	* config/os/solaris/solaris2.5/bits/ctype_noninline.h (ctype): Same.
	* config/os/newlib/bits/ctype_noninline.h (ctype): Same.
	* config/os/irix/irix6.5/bits/ctype_noninline.h (ctype): Same.
	* config/os/irix/irix5.2/bits/ctype_noninline.h (ctype): Same.
	* config/os/hpux/bits/ctype_noninline.h (ctype): Same.
	* config/os/generic/bits/ctype_noninline.h (ctype): Same.
	* config/os/djgpp/bits/ctype_noninline.h (ctype): Same.
	* config/os/bsd/netbsd/bits/ctype_noninline.h (ctype): Same.
	* config/os/bsd/freebsd/bits/ctype_noninline.h (ctype): Same.
	* config/os/aix/bits/ctype_noninline.h (ctype): Same.
	* include/bits/locale_facets.h (ctype<_CharT>): Remove dummy
	definitions for all virtual functions. These are now explicitly
	undefined for non-required factets, ie any non-char, non-wchar_t
	instantiations.
	* src/localename.cc (locale::_Impl::_Impl(string, size_t): Named
	locales use alternate constructor for ctype facet.
	* include/bits/locale_facets.h (ctype<char>::ctype(__c_locale, const
	mask*, bool, size_t): Add.
	(ctype<wchar_t>::ctype(__c_locale, size_t): Add.
	* src/locale.cc (ctype<wchar_t>::ctype(__c_locale, size_t)): Add
	definition.

	* testsuite/22_locale/ctype_members_char.cc (test02): Add, mark
	XFAIL for non-gnu locale models.

From-SVN: r47953
2001-12-12 23:16:35 +00:00
Philip Martin cb93dfb4a0 Ross Smith <r-smith@ihug.co.nz> Paolo Carlini <pcarlini@unitus.it>
2001-12-12  Philip Martin  <philip@codematters.co.uk>
            Ross Smith     <r-smith@ihug.co.nz>
            Paolo Carlini  <pcarlini@unitus.it>

	libstdc++/5045
	* include/bits/std_limits.h (defines, numeric_limits<bool>::digits10):
	Fix digits10 values for integral types.
	* include/bits/locale_facets.tcc (num_get::do_get for integral types):
	Tweak _M_extract_int call.
	* testsuite/27_io/istream_extractor_arith.cc (test13, test12_aux):
	Tweak overflowing number of digits.
	* testsuite/18_support/numeric_limits.cc (test03): New testcase.

Co-Authored-By: Paolo Carlini <pcarlini@unitus.it>
Co-Authored-By: Ross Smith <r-smith@ihug.co.nz>

From-SVN: r47947
2001-12-12 20:23:30 +00:00
Phil Edwards 3c612a619d allocators.cc: New file.
2001-12-11  Phil Edwards  <pme@gcc.gnu.org>

	* testsuite/ext/allocators.cc:  New file.

From-SVN: r47888
2001-12-11 19:04:58 +00:00
Benjamin Kosnik 2a74463013 locale_facets.h (__num_base::_S_scale_hex): Add.
2001-12-09  Benjamin Kosnik  <bkoz@redhat.com>
	    Philip Martin <pmartin@uklinux.net>

	* include/bits/locale_facets.h (__num_base::_S_scale_hex): Add.
	(__num_base::_S_scale_oct): Add.
	* src/locale.cc: Add definitions.
	* testsuite/27_io/istream_extractor_arith.cc (main): Call test13.

	* testsuite/testsuite_hooks.h: Remove duplicate VERIFY define.

Co-Authored-By: Philip Martin <pmartin@uklinux.net>

From-SVN: r47837
2001-12-10 08:41:03 +00:00
Benjamin Kosnik 823b4f7daa [multiple changes]
2001-12-06  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/3720
	* include/bits/locale_facets.tcc (num_put): Clean.
	(num_get::_M_extract_float): Change argument to string.
	(num_get::do_get(float)): Fixup.
	(num_get::do_get(double)): Same.
	(num_get::do_get(long double)): Same.
	(num_get::_M_extract_int): Add maximum length parameter, __max.
	(num_get::_M_extract_float): Correct zeros, use string.
	* include/bits/locale_facets.h (num_get::_M_extract_float): Change
	declaration here.
	* src/locale.cc (__num_base::_S_atoms): Remove x, X.
	* testsuite/27_io/istream_extractor_arith.cc (test13): Add.

2001-12-06  Philip Martin  <pmartin@uklinux.net>

	* testsuite/27_io/istream_extractor_arith.cc (test12): Add
	tests for excess input digits.

From-SVN: r47743
2001-12-07 02:58:36 +00:00
Benjamin Kosnik 0228de0c4f [multiple changes]
2001-12-05  Benjamin Kosnik  <bkoz@redhat.com>

	DR/282
	* include/bits/locale_facets.tcc (num_put::_M_widen_float): Add
	grouping to floating point types.
	* testsuite/27_io/ostream_inserter_arith.cc (test02): Add test.

2001-12-04  Paolo Carlini <pcarlini@unitus.it>

        libstdc++/4402
        * testsuite/27_io/ostream_inserter_arith.cc (test02): add testcase
	from the PR.
        * include/bits/locale_facets.tcc (num_put::_M_convert_float):
        Deal properly with long ios_base::fixed floats.
        (num_put::_M_widen_float): use
	__len in __builtin_alloca call.

From-SVN: r47696
2001-12-05 22:07:36 +00:00
Benjamin Kosnik 5b5e609d03 [multiple changes]
2001-12-04  Benjamin Kosnik  <bkoz@redhat.com>

	* src/Makefile.am (sources): Add ext-inst.cc.
	* src/Makefile.in: Regenerate.
	* src/ext-inst.cc: New file.
	* include/bits/stl_threads.h: Format.
	* src/globals.cc: Add instantiation for _S_swap_lock.

	* testsuite/18_support/numeric_limits.cc: Add numeric_limits<B>
	instantiation.

2001-12-04  John David Anglin  <dave@hiauly1.hia.nrc.ca>

	* testsuite/22_locale/numpunct_members_wchar_t.cc: Only compile
	and execute test01 if _GLIBCPP_USE_WCHAR_T is defined.
	* testsuite/26_numerics/complex_inserters_extractors.cc: Provide
	for explicit instantiation of class std::basic_string<char,
	gnu_char_traits, std::allocator<char> >.

From-SVN: r47622
2001-12-04 20:13:41 +00:00
Benjamin Kosnik dbb27f267a collate.cc: Compile-only.
2001-12-03  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/collate.cc: Compile-only.
	* testsuite/22_locale/time_get.cc: Same.
	* testsuite/22_locale/time_put.cc: Same.
	* testsuite/22_locale/numpunct.cc: Same.
	* testsuite/22_locale/num_put.cc: Same.
	* testsuite/22_locale/num_get.cc: Same.
	* testsuite/22_locale/moneypunct.cc: Same.
	* testsuite/22_locale/money_get.cc: Same.
	* testsuite/22_locale/messages.cc: Same.
	* testsuite/22_locale/ctype.cc: Same.

From-SVN: r47592
2001-12-04 07:15:01 +00:00
Paolo Carlini b334004616 locale_facets.tcc (__pad): Add bool parameter to correctly pad internal-adjusted const char*-type objects.
2001-11-29  Paolo Carlini  <pcarlini@unitus.it>

	libstdc++/3655
	* include/bits/locale_facets.tcc (__pad): Add bool parameter to
	correctly pad internal-adjusted const char*-type objects.
	* include/bits/locale_facts.tcc (num_put::_M_insert): Update call.
	* include/bits/ostream.tcc (operator<<(_CharT , char, const
	_CharT*, const char*, const basic_string&): Update calls.
	* src/locale-inst.tcc: Update declarations.
	* testsuite/27_io/ostream_inserter_arith.cc (test04): Add test.

From-SVN: r47459
2001-11-29 22:31:02 +00:00
Paolo Carlini 5a4c85886a locale_facets.tcc (__pad): correctly output hex numbers internally aligned.
2001-11-28  Paolo Carlini  <pcarlini@unitus.it>

	libstdc++/3655
	* include/bits/locale_facets.tcc (__pad): correctly output hex
	numbers internally aligned.
	* testsuite/27_io/ostream_inserter_arith.cc: Add testcase.

From-SVN: r47433
2001-11-29 00:27:54 +00:00
Benjamin Kosnik 074a8e74dd locale_facets.tcc: Formatting tweaks.
2001-11-27  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.tcc: Formatting tweaks.

	* testsuite/23_containers/map_operators.cc: Don't xfail.
	* testsuite/23_containers/set_operators.cc: Same.
	* testsuite/backward/header_iterator_h.cc: Pass in -Wno-deprecated.
	* testsuite/backward/header_deque_h.cc: Same.

From-SVN: r47401
2001-11-28 06:53:29 +00:00
Benjamin Kosnik 5fd0af8754 locale_facets.tcc: Formatting tweaks.
2001-11-27  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.tcc: Formatting tweaks.

	* testsuite/23_containers/map_operators.cc: Don't xfail.
	* testsuite/23_containers/set_operators.cc: Same.

From-SVN: r47400
2001-11-28 06:35:00 +00:00
Benjamin Kosnik ec9d6e9f45 Numeric facets cleanup.
2001-11-27  Benjamin Kosnik  <bkoz@redhat.com>

	Numeric facets cleanup.
	* include/bits/locale_facets.h (__num_base::_S_atoms): Add, remove
	+ and - signs.
	(__num_base::_M_zero): Add
	(__num_base::_M_e): Add.
	(__num_base::_M_E): Add.
	* include/bits/locale_facets.tcc (num_get::_M_extract): Remove.
	(num_get::_M_extract_float): New.
	(num_get::_M_extract_int): New.
	* src/locale.cc (num_get::_M_extract): Remove.

	* include/bits/locale_facets.tcc (num_put::_M_insert_float):
	Simplify, use _M_insert.
	(num_put::do_put(bool)): Simplify, remove __pad.
	(__pad): Remove.
	(__pad_output): Change to __pad.
	* include/bits/ostream.tcc: And here.
	* src/locale-inst: Remove instantiations.

	* include/bits/locale_facets.h: Move helper functions in to class
	num_put.
	(num_put::_M_insert_float): Same, for __output_integer.
	(num_put::_M_insert_int): Same, for __output_float.
	(num_put::_M_insert): New.
	(__num_base): Add.
	(__num_base::_S_format_float): Move
	__build_float_format into class __num_base.
	(__num_base::_S_format_int): Move __build_int_format into class
	__num_base.
	* include/bits/locale_facets.tcc (__group_digits): Change to
	(__add_grouping): This.
	* src/locale-inst.cc: And here. Tweak instantiations.
	* src/misc-inst.cc: Remove instantiations.

	* include/bits/ostream.tcc (__pad_char): Rename, adjust inserters
	for new calling conventions, move to...
	* include/bits/locale_facets.tcc (__pad_output): Here. Adjust
	signature to make it useful for both ostream and num_put.
	(__pad_numeric): Remove.
	* src/misc-inst.cc: Remove instantiations.
	* src/locale-inst.cc: Same.

	* include/bits/locale_facets.h (_Numeric_get): Remove.
 	(_Numeric_put): Remove.
	(num_get::get(short)): Remove.
	(num_get::get(int)): Remove.
	(num_get::do_get(short)): Remove.
	(num_get::do_get(int)): Remove.
	* include/bits/istream.tcc (istream::operator>>(short)): Fix as
	per DR 118.
	(istream::operator>>(int)): Same.

	* include/bits/locale_facets.h (_Format_cache): Remove.
	* include/bits/locale_facets.tcc: Same.
	* src/locale.cc: Same.
	* src/locale-inst.cc: Same.
	* include/bits/ostream.tcc: Same.
	* src/ios.cc (ios_base::imbue): Remove here as well.

	* testsuite/22_locale/num_get.cc: New file.
	* testsuite/22_locale/num_get_members_char.cc: New file.
	* testsuite/22_locale/num_get_members_wchar_t.cc: New.
	* testsuite/22_locale/numpunct_members_wchar_t.cc: New file.
	* testsuite/22_locale/num_put.cc: New file.
	* testsuite/22_locale/num_put_members_char.cc: New file.
	* testsuite/22_locale/num_put_members_wchar_t.cc: New file.
	* testsuite/27_io/ostream_inserter_arith.cc: Fix.
	* testsuite/27_io/istream_extractor_arith.cc: Fix.

From-SVN: r47399
2001-11-28 06:29:55 +00:00
Benjamin Kosnik 86ade44cb2 Numeric facets cleanup.
2001-11-27  Benjamin Kosnik  <bkoz@redhat.com>

	Numeric facets cleanup.
	* include/bits/locale_facets.h (__num_base::_S_atoms): Add, remove
	+ and - signs.
	(__num_base::_M_zero): Add
	(__num_base::_M_e): Add.
	(__num_base::_M_E): Add.
	* include/bits/locale_facets.tcc (num_get::_M_extract): Remove.
	(num_get::_M_extract_float): New.
	(num_get::_M_extract_int): New.
	* src/locale.cc (num_get::_M_extract): Remove.

	* include/bits/locale_facets.tcc (num_put::_M_insert_float):
	Simplify, use _M_insert.
	(num_put::do_put(bool)): Simplify, remove __pad.
	(__pad): Remove.
	(__pad_output): Change to __pad.
	* include/bits/ostream.tcc: And here.
	* src/locale-inst: Remove instantiations.

	* include/bits/locale_facets.h: Move helper functions in to class
	num_put.
	(num_put::_M_insert_float): Same, for __output_integer.
	(num_put::_M_insert_int): Same, for __output_float.
	(num_put::_M_insert): New.
	(__num_base): Add.
	(__num_base::_S_format_float): Move
	__build_float_format into class __num_base.
	(__num_base::_S_format_int): Move __build_int_format into class
	__num_base.
	* include/bits/locale_facets.tcc (__group_digits): Change to
	(__add_grouping): This.
	* src/locale-inst.cc: And here. Tweak instantiations.
	* src/misc-inst.cc: Remove instantiations.

	* include/bits/ostream.tcc (__pad_char): Rename, adjust inserters
	for new calling conventions, move to...
	* include/bits/locale_facets.tcc (__pad_output): Here. Adjust
	signature to make it useful for both ostream and num_put.
	(__pad_numeric): Remove.
	* src/misc-inst.cc: Remove instantiations.
	* src/locale-inst.cc: Same.

	* include/bits/locale_facets.h (_Numeric_get): Remove.
 	(_Numeric_put): Remove.
	(num_get::get(short)): Remove.
	(num_get::get(int)): Remove.
	(num_get::do_get(short)): Remove.
	(num_get::do_get(int)): Remove.
	* include/bits/istream.tcc (istream::operator>>(short)): Fix as
	per DR 118.
	(istream::operator>>(int)): Same.

	* include/bits/locale_facets.h (_Format_cache): Remove.
	* include/bits/locale_facets.tcc: Same.
	* src/locale.cc: Same.
	* src/locale-inst.cc: Same.
	* include/bits/ostream.tcc: Same.
	* src/ios.cc (ios_base::imbue): Remove here as well.

	* testsuite/22_locale/num_get.cc: New file.
	* testsuite/22_locale/num_get_members_char.cc: New file.
	* testsuite/22_locale/num_get_members_wchar_t.cc: New.
	* testsuite/22_locale/numpunct_members_wchar_t.cc: New file.
	* testsuite/22_locale/num_put.cc: New file.
	* testsuite/22_locale/num_put_members_char.cc: New file.
	* testsuite/22_locale/num_put_members_wchar_t.cc: New file.
	* testsuite/27_io/ostream_inserter_arith.cc: Fix.
	* testsuite/27_io/istream_extractor_arith.cc: Fix.

From-SVN: r47397
2001-11-28 04:07:11 +00:00
Joseph Myers c5504edb75 ChangeLog, [...]: Fix spelling errors.
* ChangeLog, docs/doxygen/maint.cfg.in, docs/doxygen/user.cfg.in,
	docs/doxygen/doxygroups.cc, docs/doxygen/Intro.3,
	docs/html/17_intro/BUGS, docs/html/17_intro/C++STYLE,
	docs/html/17_intro/CHECKLIST, docs/html/17_intro/DESIGN,
	docs/html/17_intro/howto.html, docs/html/17_intro/porting.html,
	docs/html/17_intro/porting.texi, docs/html/18_support/howto.html,
	docs/html/19_diagnostics/howto.html, docs/html/20_util/howto.html,
	docs/html/21_strings/howto.html,
	docs/html/23_containers/howto.html,
	docs/html/26_numerics/howto.html, docs/html/27_io/howto.html,
	docs/html/27_io/binary_iostreams_kuehl.txt,
	docs/html/ext/sgiexts.html, docs/html/faq/index.html,
	docs/html/faq/index.txt, testsuite/24_iterators/iterator.cc,
	include/bits/basic_file.h, include/bits/locale_facets.h,
	include/bits/locale_facets.tcc, include/bits/std_sstream.h,
	include/ext/ropeimpl.h, include/ext/stl_rope.h,
	libsupc++/tinfo.cc, libsupc++/cxxabi.h, libsupc++/typeinfo,
	libsupc++/eh_throw.cc, acinclude.m4, aclocal.m4, configure,
	configure.target, ChangeLog-2000: Fix spelling errors.

From-SVN: r47291
2001-11-23 16:29:02 +00:00
Stephen M. Webb 1fc610939a list_capacity.cc: New file.
2001-11-22  Stephen M. Webb  <stephen@bregmasoft.com>

        * testsuite/23_containers/list_capacity.cc: New file.
        * testsuite/23_containers/list_ctor.cc: New file.
        * testsuite/23_containers/list_modifiers.cc: New file.
        * testsuite/23_containers/list_operators.cc: New file.

2001-11-22  Stephen M. Webb  <stephen@bregmasoft.com>

	* include/bits/stl_list.h: Reformatted according to C++STYLE rules.
	(size): Replaced nonstandard distance() call with the standard one.
	(transfer): Uglified to _M_transfer.

From-SVN: r47277
2001-11-22 19:19:23 +00:00
Paolo Carlini dcc61724f1 re PR libstdc++/4548 (When reserving a string to become smaller, program crashes)
2001-11-21  Paolo Carlini  <pcarlini@unitus.it>

	PR libstdc++/4548
	* include/bits/basic_string.tcc (basic_string::reserve):  Never shrink
	below the current size.
	* testsuite/21_strings/capacity.cc (test02):  Add test.

From-SVN: r47246
2001-11-21 22:04:53 +00:00
Phil Edwards 1b4a6975f7 Intro.3: More notes.
2001-11-19  Phil Edwards  <pme@gcc.gnu.org>

	* docs/doxygen/Intro.3:  More notes.
	* docs/doxygen/style.css:  Update to default style from Doxygen 1.2.10.
	* include/bits/stl_algobase.h:  Add doxygen hooks for functions.
	* include/ext/hash_map:  Add @file hook.
	* include/ext/hash_set:  Likewise.
	* include/ext/rope:  Likewise.
	* include/ext/ropeimpl.h:  Likewise.
	* include/ext/slist:  Likewise.
	* include/ext/stl_hash_fun.h:  Likewise.
	* include/ext/stl_hashtable.h:  Likewise.
	* include/ext/stl_rope.h:  Likewise.

	* docs/html/17_intro/license.html:  Remove "experimental" sentence.
	* docs/html/19_diagnostics/howto.html:  Document new verbose
	terminate handler.
	* testsuite/27_io/filebuf.cc:  Fix comment, move tweakable parameter
	to more visible (closer to description) position.

	* libsupc++/eh_type.cc:  Formatting tweak.
	* libsupc++/exception:  Likewise.
	* src/vterminate.cc:  Likewise.

	* docs/html/17_intro/porting.html:  Regenerate.
	* docs/html/faq/index.txt:  Regenerate.

From-SVN: r47193
2001-11-20 00:51:37 +00:00
Paolo Carlini 2dc8835ac8 ios_manip_fmtflags.cc: Fix for non-interactive output.
2001-11-01  Paolo Carlini  <pcarlini@unitus.it>
	    Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/ios_manip_fmtflags.cc: Fix for non-interactive
	output.
	* include/bits/locale_facets.tcc (num_put::do_put(bool)): Fix.

Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com>

From-SVN: r46709
2001-11-02 03:48:09 +00:00
Benjamin Kosnik c7e2dba59a codecvt.h: Add virtual member function declarations.
2001-10-31  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/4749
	* include/bits/codecvt.h: Add virtual member function declarations.
	* src/codecvt.cc: Tweaks.
	* testsuite/22_locale/codecvt.cc: Test compilation only,
	non-required facets not required to have linkage.

From-SVN: r46685
2001-10-31 20:05:33 +00:00
Paolo Carlini 9a304d1766 basic_string.h: Tweaks.
2001-10-30  Paolo Carlini  <pcarlini@unitus.it>
	    Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/basic_string.h: Tweaks.
	* include/bits/basic_string.tcc (string::_M_replace(iterator,
	iterator, _ForwardIter, _ForwardIter, forward_iterator_tag): Fix.
	* src/string-inst.cc: Tweaks, add instantiation.
	* testsuite/21_strings/replace.cc (test02): Add test.
	* testsuite/21_strings/assign.cc (test01): New file.

0

Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com>

From-SVN: r46674
2001-10-31 08:27:20 +00:00
Benjamin Kosnik 99e9125d77 fstream.tcc (filebuf::showmanyc): Simplify.
2001-10-29  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/3647
	* include/bits/fstream.tcc (filebuf::showmanyc): Simplify.
	* testsuite/27_io/filebuf.cc (test07): New test.
	(test03): Modify showmanyc test.

From-SVN: r46610
2001-10-29 19:29:29 +00:00
Benjamin Kosnik 322821b9ad Make -fno-exceptions work.
2001-10-23  Benjamin Kosnik  <bkoz@redhat.com>

	Make -fno-exceptions work.
	* config/locale/c_locale_gnu.cc: Use functexcept.
	* include/bits/c++config (__stl_assert): Remove.
	(__STL_USE_EXCEPTIONS): Same.
	(__STL_TRY): Same.
	(__STL_CATCH_ALL): Same.
	(__STL_THROW): Same.
	(__STL_RETHROW): Same.
	(__STL_NOTHROW): Same.
	(__STL_UNWIND): Same.
	* include/bits/pthread_allocimpl.h: Fix.
	* include/bits/std_bitset.h: Same.
	* include/bits/std_list.h: Same.
	* include/bits/std_memory.h: Same.
	* include/bits/std_queue.h: Same.
	* include/bits/stl_alloc.h: Same.
	* include/bits/stl_deque.h: Same.
	* include/bits/stl_list.h: Same.
	* include/bits/stl_queue.h: Same.
	* include/bits/stl_tempbuf.h: Same.
	* include/bits/stl_tree.h: Same.
	* include/bits/stl_uninitialized.h: Same.
	* include/bits/stl_vector.h: Same.
	* include/ext/ropeimpl.h: Same.
	* include/ext/slist: Same.
	* include/ext/stl_hashtable.h: Same.
	* include/ext/stl_rope.h: Same.
	* libsupc++/new_op.cc: Include cstdlib.
	* libsupc++/eh_personality.cc: Add exception_defines include. Use
	__throw_exception_again, tweak.
	* libsupc++/eh_aux_runtime.cc: Include stdlib for abort.
	* libsupc++/vec.cc: Tweak.
	* src/functexcept.cc: Remove unused arguments.
	* testsuite/23_containers/bitset_members.cc: Tweak.

From-SVN: r46455
2001-10-24 02:37:56 +00:00
Benjamin Kosnik f295ecef02 limits.h: Move to...
2001-10-22  Benjamin Kosnik  <bkoz@redhat.com>

	* config/cpu/i386/bits/limits.h: Move to...
	* config/cpu/i386/bits/cpu_limits.h: ...here.
	* config/cpu/cris/bits/cpu_limits.h: Same.
	* config/cpu/powerpc/bits/cpu_limits.h: Same.
	* config/cpu/x86-64/bits/cpu_limits.h: Same.
	* config/cpu/alpha/bits/cpu_limits.h: New.
	* config/cpu/m68k/bits/cpu_limits.h: New.
	* config/cpu/s390/bits/cpu_limits.h: New.
	* config/os/aix/bits/os_defines.h: Tweaks.
	* config/os/bsd/freebsd/bits/os_defines.h: Same.
	* config/os/bsd/netbsd/bits/os_defines.h: Same.
	* config/os/djgpp/bits/os_defines.h: Same.
	* config/os/generic/bits/os_defines.h: Same.
	* config/os/gnu-linux/bits/os_defines.h: Same.
	* config/os/hpux/bits/os_defines.h: Same.
	* config/os/irix/irix5.2/bits/os_defines.h: Same.
	* config/os/irix/irix6.5/bits/os_defines.h: Same.
	* config/os/newlib/bits/os_defines.h: Same.
	* config/os/solaris/solaris2.5/bits/os_defines.h: Same.
	* config/os/solaris/solaris2.6/bits/os_defines.h: Same.
	* config/os/solaris/solaris2.7/bits/os_defines.h: Same.

	* include/bits/c++config: Remove include.
	* include/bits/limits_generic.h: Remove.
	* include/bits/std_limits.h: Include cpu_limits.h.
	* include/Makefile.am: Fixup.
	* src/limits.cc: Tweak.
	* src/limits_generic.cc: Remove.
	* src/gen-num-limits.cc: Remove.
	* mknumeric_limits: Remove.

From-SVN: r46445
2001-10-23 21:40:31 +00:00
Dimitris Vyzovitis 8bf4eeece3 stl_threads.h (_Atomic_swap): New function.
* include/bits/stl_threads.h (_Atomic_swap): New function.
	    (_Swap_lock_struct<__dummy>::_S_swap_lock): New data.
	    * testsuite/ext/rope.cc: New file.

From-SVN: r45999
2001-10-03 21:19:31 +00:00
Benjamin Kosnik da5c0f6ef5 time_members_gnu.h: Remove.
2001-10-02  Benjamin Kosnik  <bkoz@redhat.com>

	* config/locale/time_members_gnu.h: Remove.
	* config/locale/time_members_generic.h: Remove.
	* config/locale/time_members_gnu.cc (__timepunct::_M_put_helper): Add.
	* config/locale/time_members_generic.cc: Same.
	* include/bits/locale_facets.h: Add data members.
	(__timepunct::_M_put_helper): Change signature.
	(__timepunct::_M_date_formats): Same.
	(__timepunct::_M_time_formats): Same.
	(__timepunct::_M_ampm): Add.
	(__timepunct::_M_date_time_formats): Add.
	(time_get::_M_extract_via_format): Add.
	(time_get::_M_extract_time): Change to...
	(time_get::_M_extract_num): ... this, modify signature.
	* include/bits/locale_facets.tcc (time_get::do_get_year): Fix.
	(time_get::do_get_time): Fix.
	(time_get::do_get_date): Fix.

	* acinclude.m4: Remove CTIME_H.
	* aclocal.m4: Regenerate.
	* include/Makefile.am: Same.
	* include/Makefile.in: Regenerate.
	* configure: Regenerate.

	* testsuite/22_locale/time_get_members_char.cc: Fix.
	* testsuite/22_locale/time_get_members_wchar_t.cc: Add.
	* testsuite/22_locale/time_put_members_wchar_t.cc: Add.

From-SVN: r45966
2001-10-02 18:44:50 +00:00
Benjamin Kosnik 1ab656771a time_members_gnu.h (__timepunct::_M_get_helper): Add.
2001-09-28  Benjamin Kosnik  <bkoz@redhat.com>

	* config/locale/time_members_gnu.h (__timepunct::_M_get_helper): Add.
	(__timepunct::_M_put_helper): Add.
	* config/locale/time_members_generic.h: Same.
	* include/bits/locale_facets.h (__match_parallel): Remove. Format.
	(__timepunct): Add data members.
	(__timepunct::_M_days): Add.
	(__timepunct::_M_days_abbreviated): Add.
	(__timepunct::_M_months): Add.
	(__timepunct::_M_months_abbreviated): Add.
	(__timepunct::_M_initialize_timepunct): Add.
	* include/bits/locale_facets.tcc: Same.
	* src/locale-inst.cc: Remove instantiations for __match_parallel.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add CTIME_CC.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/22_locale/time_put_members_char.cc: Mark XFAIL.
	* testsuite/22_locale/time_put_members_char.cc (test01): New file.
	* testsuite/22_locale/time_get.cc: New file.

From-SVN: r45868
2001-09-28 23:44:48 +00:00
Rainer Orth c20d89f553 libstdc++-v3-dg.exp (libstdc++-v3-init): Use correct multilib builddir.
* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Use
	correct multilib builddir.
	Properly locate libgcc_s.

From-SVN: r45864
2001-09-28 19:42:12 +00:00
Phil Edwards 4c1805d702 c_strings.cc (test01, test02): Increase `carray' size.
2001-09-25  Phil Edwards  <pme@gcc.gnu.org>

	* testsuite/21_strings/c_strings.cc (test01, test02):  Increase
	`carray' size.

From-SVN: r45817
2001-09-26 01:45:49 +00:00
Benjamin Kosnik 5b66fcf9a9 [multiple changes]
2001-09-20  Scott Johnston <scott@accom.com>
	    Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>

	* include/backward/alloc.h: Conditionally define malloc_alloc
	* testsuite/backward/header_deque_h.cc: New file.

2001-09-20  Sylvain Pion <Sylvain.Pion@sophia.inria.fr>

	* libstdc++-v3/include/bits/locale_facets.tcc (money_put::do_put):
        change variable name so that it works with -fno-for-scope.

From-SVN: r45704
2001-09-20 09:48:24 +00:00
Benjamin Kosnik 9a92330f24 numpunct_members_char.cc (test01): Remove redundant sanity checks.
2001-09-20  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/numpunct_members_char.cc (test01): Remove
	redundant sanity checks.
	* testsuite/22_locale/money_put_members_wchar_t.cc (test01): Same.
	(test02): Same.
	* testsuite/22_locale/money_put_members_char.cc (test01): Same.
	(test02): Same.
	* testsuite/22_locale/moneypunct_members_wchar_t.cc (test01): Same.
	* testsuite/22_locale/moneypunct_members_char.cc (test01): Same.
	* testsuite/22_locale/money_get_members_wchar_t.cc (test01): Same.
	(test02): Same.
	* testsuite/22_locale/money_get_members_char.cc (test01): Same.
	(test02): Same.

From-SVN: r45703
2001-09-20 09:07:37 +00:00
Benjamin Kosnik e08138aae3 Implement std::time_put.
2001-09-19  Benjamin Kosnik  <bkoz@redhat.com>

	Implement std::time_put.
	* include/bits/locale_facets.h: Include time_members.h.
	(__timepunct): New.
	(time_put): Implement.
	* include/bits/locale_facets.tcc (do_put): Put generic versions here.
	* include/bits/localefwd.h: Bump number of facets.
	* config/locale/time_members_generic.h: New file.
	* config/locale/time_members_gnu.h: New file.
	* config/locale/c_locale_generic.h: Include clocale.
	* src/locale-inst.cc: Add use_facet instantiations for __timepunct.
	* src/locale.cc: Add __timepunct initializations.
	* src/localename.cc (locale::_Impl::_Impl(string, size_t)): Same.
	* include/Makefile.am (stamp-target): Add time_members.h.
	* include/Makefile.in: Regenerate.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add CTIME_H.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/22_locale/time_put.cc: New file.
	* testsuite/22_locale/time_put_members_char.cc: New file.

	* docs/html/22_locale/locale.html: Add note.

From-SVN: r45702
2001-09-20 08:30:01 +00:00
Benjamin Kosnik 9775a638f4 moneypunct_members_gnu.cc: Fix initialization of wchar_t members.
2001-09-14  Benjamin Kosnik  <bkoz@redhat.com>

	* config/locale/moneypunct_members_gnu.cc: Fix initialization of
	wchar_t members.
	* testsuite/22_locale/money_get_members_wchar_t.cc (test02): New file.
	* testsuite/22_locale/money_put_members_wchar_t.cc (test02): Fix.

From-SVN: r45615
2001-09-14 22:13:11 +00:00
Benjamin Kosnik 55dea7b149 moneypunct_members_gnu.cc: Fix initialization of wchar_t members.
2001-09-14  Benjamin Kosnik  <bkoz@redhat.com>

	* config/locale/moneypunct_members_gnu.cc: Fix initialization of
	wchar_t members.
	* testsuite/22_locale/money_get_members_wchar_t.cc (test02): New file.
	* testsuite/22_locale/money_put_members_wchar_t.cc (test02): Fix.

From-SVN: r45614
2001-09-14 22:09:35 +00:00
Alexandre Petit-Bianco 7330797589 money_get_members_char.cc: Fixed typo in comment.
2001-09-13  Alexandre Petit-Bianco  <apbianco@redhat.com>

	* testsuite/22_locale/money_get_members_char.cc: Fixed typo in comment.
	* testsuite/22_locale/money_put_members_char.cc: Likewise.
	* testsuite/22_locale/money_put_members_wchar_t.cc: Likewise.

(If only spelling them right would make them go away...)

From-SVN: r45592
2001-09-14 01:38:18 -07:00
Benjamin Kosnik fb67885447 Implement std::money_get.
2001-09-13   Benjamin Kosnik  <bkoz@redhat.com>

	Implement std::money_get.
	* include/bits/locale_facets.tcc (money_get::do_get): Implement.
	* include/bits/locale_facets.h (money_get): Correct signatures.
	* testsuite/22_locale/money_get.cc: New file.
	* testsuite/22_locale/money_get_members_char.cc: New file.

	* include/bits/locale_facets.tcc (__verify_grouping): New
	function. Consolidate num_get and money_get group checking into
	one function.
	(money_get): Use it.
	* src/locale.cc (num_get::_M_extract): Use it.
	* src/locale-inst.cc: Add instantiation.

From-SVN: r45585
2001-09-13 23:21:25 +00:00
Benjamin Kosnik 89c06d5007 Makefile.am (stamp-target): Remove link to self.
2001-09-10  Benjamin Kosnik  <bkoz@redhat.com>

	* include/Makefile.am (stamp-target): Remove link to self.
	* inclulde/Makefile.in: Regenerate.

From-SVN: r45514
2001-09-10 18:13:17 +00:00
Benjamin Kosnik 69971cd850 Implement std::money_put.
2001-09-09  Benjamin Kosnik  <bkoz@redhat.com>

	Implement std::money_put.
	* include/bits/locale_facets.h
	(moneypunct::_M_initialize_moneypunct): Split up specializations
	to account for _Intl.  More grody hacking to get around the
	ill-considered use of const bool as a template parameter.
	* config/locale/moneypunct_members_gnu.cc: And here.
	* config/locale/moneypunct_members_generic.cc: And here.
	* testsuite/22_locale/moneypunct_members_char.cc: Add tests.
	* testsuite/22_locale/moneypunct.cc: Add tests.
	* testsuite/22_locale/money_put_members_wchar_t.cc: New file.
	* testsuite/22_locale/moneypunct_members_wchar_t.cc: New file.

	* src/locale.cc (money_base::_S_construct_pattern): Move into
	gnu-specific file.
	* config/locale/moneypunct_members_gnu.cc: Add here.
	* config/locale/moneypunct_members_generic.cc: Add generic version
	here.

	* include/bits/locale_facets.tcc (money_put::do_put): Move member
	function definitions here.
	* include/bits/locale_facets.h (money_put): Implement.
	* src/locale-inst.cc: Add use_facet instantiations for moneypunct.
	Correct money_get, money_put instantiations.
	* src/locale.cc (money_base::_S_construct_pattern): Handle case
	where __posn == 0.
	* testsuite/22_locale/money_put_members_char.cc: Add tests.

From-SVN: r45496
2001-09-10 01:00:27 +00:00
Phil Edwards 2d25bf5d52 testsuite_flags.in: No longer need to search testsuite builddir.
2001-09-05  Phil Edwards  <pme@sources.redhat.com>

	* testsuite_flags.in:  No longer need to search testsuite builddir.
	* src/stl-inst.cc (__sink_unused_warning):  Unused, remove.
	* Makefile.am:  The testsuite directory never needs to be made here.
	* Makefile.in:  Regenerate.
	* include/Makefile.in:  Regenerate.
	* libio/Makefile.in:  Regenerate.
	* libmath/Makefile.in:  Regenerate.
	* libsupc++/Makefile.in:  Regenerate.
	* po/Makefile.in:  Regenerate.
	* src/Makefile.in:  Regenerate.
	* testsuite/Makefile.in:  Regenerate.

From-SVN: r45426
2001-09-05 22:38:06 +00:00
Scott Johnston 45932d27fb iterator.h: Include <bits/std_iterator.h>, remove reverse_bidirectional_iterator.
2001-09-04  Scott Johnston  <scott@accom.com>
	    Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

	* include/backward/iterator.h: Include <bits/std_iterator.h>,
	remove reverse_bidirectional_iterator.
	* testsuite/backward: New directory.
	* testsuite/backward/header_iterator_h.cc: New file.

Co-Authored-By: Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>

From-SVN: r45389
2001-09-04 22:05:33 +00:00
Benjamin Kosnik 72e2386f87 c_locale_gnu.cc: Move facet info to separate files...
2001-08-27  Benjamin Kosnik  <bkoz@redhat.com>

	* config/locale/c_locale_gnu.cc: Move facet info to separate files...
	* config/locale/c_locale_generic.cc: Same.
	* config/locale/moneypunct_members_gnu.cc: New file.
	* config/locale/moneypunct_members_generic.cc: New file.
	* config/locale/numpunct_members_gnu.cc: New file.
	* config/locale/numpunct_members_generic.cc: New file.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add moneypunct, numpunct
	options.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* src/Makefile.am (sources): And here.
	* src/Makefile.in: Regenerate.

	Rename for consistency with rest of testsuite.
	* testsuite/22_locale/codecvt.cc: New file.
	* testsuite/22_locale/money_put.cc: New file.
	* testsuite/22_locale/money_put_members_char.cc: New file.

From-SVN: r45224
2001-08-28 06:19:35 +00:00
Sylvain Pion f2c333a19d re PR libstdc++/3349 (bug in map::insert(p,t))
2001-08-24  Sylvain Pion <Sylvain.Pion@sophia.inria.fr>
            Phil Edwards  <pme@sources.redhat.com>

	PR libstdc++/3349
	* include/bits/stl_tree.h (insert_unique):  Revert last change.
	Values inserted at begin() must be less, not greater, than *begin()'s.
	* testsuite/23_containers/map_insert.cc:  New file.

Co-Authored-By: Phil Edwards <pme@gcc.gnu.org>

From-SVN: r45155
2001-08-24 17:40:31 +00:00
Benjamin Kosnik 575dd831c7 c_locale_gnu.cc: Minor tweaks.
2001-08-23  Benjamin Kosnik  <bkoz@redhat.com>

	* config/locale/c_locale_gnu.cc: Minor tweaks.
	(moneypunct<wchar_t>): Implement.
	* include/bits/locale_facets.h: Same.
	* testsuite/22_locale/moneypunct.cc: New file.
	* testsuite/22_locale/moneypunct_byname.cc: New file.
	* testsuite/22_locale/moneypunct_char_members.cc: New file.

From-SVN: r45142
2001-08-24 04:11:23 +00:00
Benjamin Kosnik 0bab15bb70 collate_wchar_t_members.cc: Guard with _GLIBCPP_USE_WCHAR_T.
2001-08-22  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/collate_wchar_t_members.cc: Guard
	with _GLIBCPP_USE_WCHAR_T.

From-SVN: r45118
2001-08-23 04:50:55 +00:00
Benjamin Kosnik d1b30231db collate_byname.cc (test01): Fix.
2001-08-21  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/collate_byname.cc (test01): Fix.

From-SVN: r45094
2001-08-22 05:47:35 +00:00
Benjamin Kosnik 9f530faf18 operators.cc: Add test.
2001-08-18  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/operators.cc: Add test.

From-SVN: r45015
2001-08-19 00:20:07 +00:00
Benjamin Kosnik ea0c0b6e1b Implement std::collate.
2001-08-17  Benjamin Kosnik  <bkoz@redhat.com>

	Implement std::collate.
	* config/locale/collate_specializations_gnu.cc: Add here, implement in
	MT-safe way.
	* config/locale/collate_specializations_generic.cc: Add here, but
	in a less sophisticated manner.
	* include/bits/locale_facets.tcc (collate): Add generic definition.
	* include/bits/locale_facets.h (~collate): Mark virtual.
	(collate::_M_compare_helper): New.
	(collate::_M_transform_helper): New.
	* src/locale.cc: Remove unnecessary specializations.
	* src/string-inst.cc: Tweak instantiation of ctors.

	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Do configury for collate.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* src/Makefile.am (sources): Add collate.cc.
	* src/Makefile.in: Regenerate.

	* testsuite/22_locale/collate_byname.cc: New.
	* testsuite/22_locale/collate.cc: New file.
	* testsuite/22_locale/collate_char_members.cc: New file.
	* testsuite/22_locale/collate_wchar_t_members.cc: New file.

From-SVN: r44996
2001-08-18 02:53:13 +00:00
Gabriel Dos Reis 1489e3241e numeric_limits.cc: Add more tests.
* testsuite/18_support/numeric_limits.cc: Add more tests.
      * include/bits/std_limits.h (numeric_limits<char>::max): Fix
      typo.

From-SVN: r44911
2001-08-14 23:34:04 +00:00
Benjamin Kosnik 4e10943dda configure.in (libtool_VERSION): Add.
2001-08-13  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.in (libtool_VERSION): Add.
	(VERSION): Change to
	(release_VERSION): This.
	* configure: Regenerate.
	* src/Makefile.am (libstdc___la_LDFLAGS): Use -version-info with
	libtool_VERSION.
	* src/Makefile.in: Regenerate.

	* intl/Makefile.am: Remove.
	* intl/Makefile.in: Remove.
	* intl: Remove.
	* Makefile.am (SUBDIRS): Remove intl.
	* po/Makefile.am (DISTFILES): Add string_literals.cc
	(MSGFMT): Add.
	* po/string_literals.cc: Add.
	* po/POTFILES.in: Fix path.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Don't call AM_GNU_GETTEXT.
	* aclocal.m4: Regenerate.
	* configure.in: Remove AC_OUTPUT of intl/Makefile.

	* include/backward/backward_warning.h: Clarify message.

	* testsuite_flags.in (--cxxflags): Use same debug flags for
	library and testsuite.

	* include/Makefile.am (c_compatibility): Remove.
	* include/Makefile.in: Regenerate.

From-SVN: r44880
2001-08-14 01:24:30 +00:00
Mark Mitchell 9f3c078ea9 configure.in (LIMITS_INC_SRCDIR): New variable.
* configure.in (LIMITS_INC_SRCDIR): New variable.
	* configure.target (LIMITSH): New variable.
	* porting.texi: Discuss numeric limits.
	* config/cpu/generic/bits/limits.h: New file.
	* config/cpu/i386/bits/limits.h: New file.
	* include/Makefile.am: Install bits/limits.h.
	* include/bits/c++config: Include bits/limits.h.

From-SVN: r44877
2001-08-13 22:26:11 +00:00
H.J. Lu 7db1993723 libstdc++-v3-dg.exp (libstdc++-v3-copy-files): New.
2001-08-13  H.J. Lu  (hjl@gnu.org)

	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-copy-files):
	New. Copy files.
	(libstdc++-v3-init ): Use it.

From-SVN: r44866
2001-08-13 13:43:13 -07:00
Loren J. Rittle b5e58904ae testsuite_hooks.h (__set_testsuite_memlimit): Add dummy default argument to the non-limit implementation.
* testsuite/testsuite_hooks.h (__set_testsuite_memlimit): Add
	dummy default argument to the non-limit implementation.

From-SVN: r44775
2001-08-10 20:29:41 +00:00
Benjamin Kosnik 58b08ac3e1 acconfig.h (_GLIBCPP_MEM_LIMITS): Define.
2001-08-09  Benjamin Kosnik  <bkoz@redhat.com>

	* acconfig.h (_GLIBCPP_MEM_LIMITS): Define.
	* config.h.in: Regenerate.
	* acinclude.m4 (GLIBCPP_CHECK_SETRLIMIT): Check for setrlimit
	function.
	* aclocal.m4: Regenerate.
	* configure.in: Remove duplicate AM_CONFIG_HEADER.
	(AM_CONFIG_HEADER): Remove testsuite/testsuite_hooks.h.
	Only call GLIBCPP_CHECK_SETRLIMIT for native compiles.
	* configure: Regenerate.
	* testsuite_hooks.h.in: Move to...
	* testsuite_hooks.h: Here, include c++config.h. Use it.

	* Makefile.am (SUBDIRS): Move testsuite to last directory.
	* Makefile.in: Regenerate.
	* po/Makefile.am (stamp-po): Add.

From-SVN: r44752
2001-08-10 06:50:34 +00:00
Benjamin Kosnik 33590f13b2 Implement std::messages.
2001-08-07  Benjamin Kosnik  <bkoz@redhat.com>

	Implement std::messages.
	Make config a fully-nested directory.
	* config/locale: New directory.
	* config/c_locale_generic.cc: Move into locale subdirectory.
	* config/c_locale_generic.h: Same.
	* config/c_locale_gnu.cc: Same.
	* config/c_locale_gnu.h: Same.
	* config/c_locale_ieee_1003.1-200x.cc: Same.
	* config/c_locale_ieee_1003.1-200x_.h: Same.
	* config/codecvt_specializations_generic.h: Same.
	* config/codecvt_specializations_ieee_1003.1-200x.h: Same.
	* config/messages_members_gnu.h: Same.
	* config/messaages_members_gnu.cc: Same.
	* config/messages_members_generic.h: Same.
	* config/messaages_members_generic.cc: Same.
	* config/messages_members_ieee_1003.1-200x.h: Same.
	* config/messaages_members_ieee_1003.1-200x.cc: Same.
	* config/io: New directory.
	* config/basic_file_libio.h: Move into io subdirectory.
	* config/basic_file_libio.cc: Same.
	* config/c_io_libio.h: Same.
	* config/c_io_libio_codecvt.c: Same.
	* config/basic_file_stdio.h: Same.
	* config/basic_file_stdio.cc: Same.
	* config/c_io_stdio.h: Same.

	* po: New directory.
	* po/POTFILES.in: New file.
	* po/Makefile.am: New file.
	* po/Makefile.in: New file.
	* po/libstdc++.pot: Generic translation file.
	* po/fr.po: Preliminary French translation.
	* po/de.po: Preliminary German translation.
	* intl: New directory.
	* intl/Makefile.am: New file.
	* intl/Makefile.in: New file.
	* intl/string_literals.cc: New file.
	* acinclude.m4 (GLIBCPP_CONFIGURE): Bump VERSION to 3.1.0. Add
	requisite setup for gettext. Re-arrange.
	* aclocal.m4: Regenerate.
	* configure.in: Don't call GLIBCPP_CHECK_COMPILER_VERSION.
	Output Makefile bits for po and intl.
	* configure: Regenerate.
	* Makefile.am (SUBDIRS): Add intl, po. Add rule for dist.
	* Makefile.in: Regenerate.
	* acconfig.h: Add ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY.
	* config.h.in: Regenerate.

	* acinclude.m4 (AC_REPLACE_STRINGFUNCS): Remove.

	* include/Makefile.am (install-data-local): Don't install Makefile.
	* include/Makefile.in: Regenerate.

	* include/bits/locale_facet.h (locale::facet::_S_clone_c_locale):
	Add member.
	* config/locale/c_locale_gnu.cc (_S_clone_c_locale): Add definition.
	* config/locale/c_locale_generic.cc: Same.
	* config/locale/c_locale_ieee_1003.1-200x.cc: Same.

	* include/bits/codecvt.h: Excise non-standard, non-required
	bits. This includes __enc_traits, and partial specializations of
	codecvt for __enc_traits.
	* src/codecvt.cc (__enc_traits::_S_max_size): Guard
	* config/codecvt_partials_ieee_1003.1-200x.h: New file.
	* config/codecvt_partials_generic.h: New file.
	* include/Makefile.am (allstamps): Add stamp-codecvt_model.
	(stamp-codecvt_model): Add.
	* include/Makefile.in: Regenerate.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add in codecvt configury.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/22_locale/codecvt_unicode_wchar_t.cc: Use macro guard.
	* testsuite/22_locale/codecvt_unicode_char.cc: Same.
	* testsuite/22_locale/ctor_copy_dtor.cc: And here.

	* include/bits/localefwd.h (class locale::facet): Add __enc_traits
	as a friend for _S_*_c_locale functions.
	* include/bits/codecvt.h (__enc_traits::__enc_traits): Add locale
	argument to default constructor so that CODESET information can be
	deduced.
	* include/bits/locale_facets.h (messages_byname):
	Re-implement. Remove specializations.
	* src/locale.cc (messages_byname<char>): Remove specialization.
	(messages_byname<wchar_t>): Same.
	* config/locale/c_locale_ieee_1003.1-200x.cc: New file.
	* config/locale/c_locale_ieee_1003.1-200x.h: New file.
	* config/locale/messages_members_ieee_1003.1-200x.cc: New file.
	* config/locale/messages_members_ieee_1003.1-200x.h: New file.
	* config/locale/messages_members_gnu.cc: New file.
	* config/locale/messages_members_gnu.h: New file.
	* config/locale/messages_members_generic.cc: New file.
	* config/locale/messages_members_generic.h: New file.

	* docs/html/configopts.html: Add documentation for new locale
	model, ieee_1003.1. Adjust other flags for current defaults.
	* docs/html/22_locale/locale.html: Update.
	* docs/html/22_locale/howto.html: Add link to messages.html. Organize.
	* docs/html/22_locale/messages.html: New.

	* src/Makefile.am (sources): Add messages_virtuals.cc.
	* src/Makefile.in: Regenerate.
	* include/Makefile.am (allstamps): Add stamp-messages_model.
	(stamp-messages_model): Add.
	* include/Makefile.in: Regenerate.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add in messages configury.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	* testsuite_flags.in (--cxxflags): Add LOCALEDIR.
	* testsuite/lib/libstdc++-v3-dg.exp: Remove broken LD_LIBRARY_PATH
	bits for Irix.
	* acinclude (GLIBCPP_ENABLE_CLOCALE): Set glibcpp_localedir to the
	build directories message catalog base directory, and export.
	Eventually this should probably be made to deal with build and
	install directories. For now, punt on this as the library itself
	doesn't use message catalogs (yet).
	* testsuite/22_locale/messages.cc: New file.
	* testsuite/22_locale/messages_char_members.cc: New file.
	* testsuite/22_locale/messages_byname.cc: New file.

From-SVN: r44702
2001-08-08 02:49:01 +00:00
Phil Edwards fe413112f8 acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): New macro, calls...
2001-08-06  Phil Edwards  <pme@sources.redhat.com>

	* acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE):  New macro, calls...
	(GLIBCPP_CHECK_SETRLIMIT):  ...this new macro, which also uses...
	(GLIBCPP_CHECK_SETRLIMIT_ancilliary):  ...this new macro.
	* configure.in (AM_CONFIG_HEADER):  Also generate testsuite_hooks.h.
	Call GLIBCPP_CONFIGURE_TESTSUITE.
	* aclocal.m4:  Regenerate.
	* config.h.in:  Regenerate.
	* configure:  Regenerate.

	* testsuite/lib/libstdc++-v3-dg.exp:  Download new header instead
	of old header.

	* testsuite_flags.in:  Add build dir's testsuite to INCLUDES.
	* testsuite/debug_assert.h:  Removed; contents merged into...
	* testsuite/testsuite_hooks.h.in:  ...here.  New file.
	* testsuite/17_intro/header_ciso646.cc:  No longer include
	debug_assert.h, include testsuite_hooks.h instead.
	* testsuite/17_intro/header_fstream.cc:  Likewise.
	* testsuite/17_intro/header_iomanip.cc:  Likewise.
	* testsuite/17_intro/header_ios.cc:  Likewise.
	* testsuite/17_intro/header_iosfwd.cc:  Likewise.
	* testsuite/17_intro/header_iostream.cc:  Likewise.
	* testsuite/17_intro/header_istream.cc:  Likewise.
	* testsuite/17_intro/header_ostream.cc:  Likewise.
	* testsuite/17_intro/header_sstream.cc:  Likewise.
	* testsuite/17_intro/header_streambuf.cc:  Likewise.
	* testsuite/18_support/numeric_limits.cc:  Likewise.
	* testsuite/19_diagnostics/stdexceptions.cc:  Likewise.
	* testsuite/20_util/allocator_members.cc:  Likewise.
	* testsuite/20_util/auto_ptr.cc:  Likewise.
	* testsuite/20_util/pairs.cc:  Likewise.
	* testsuite/21_strings/append.cc:  Likewise.
	* testsuite/21_strings/capacity.cc:  Likewise.
	* testsuite/21_strings/char_traits_requirements.cc:  Likewise.
	* testsuite/21_strings/compare.cc:  Likewise.
	* testsuite/21_strings/ctor_copy_dtor.cc:  Likewise.  Also set up
	call to (disabled) __set_testsuite_memlimit() wrapper.
	* testsuite/21_strings/element_access.cc:  Likewise.
	* testsuite/21_strings/find.cc:  Likewise.
	* testsuite/21_strings/insert.cc:  Likewise.  Also set up call to
	(disabled) __set_testsuite_memlimit() wrapper.
	* testsuite/21_strings/inserters_extractors.cc:  Likewise.
	* testsuite/21_strings/invariants.cc:  Likewise.
	* testsuite/21_strings/nonmember.cc:  Likewise.
	* testsuite/21_strings/operations.cc:  Likewise.
	* testsuite/21_strings/replace.cc:  Likewise.
	* testsuite/21_strings/rfind.cc:  Likewise.
	* testsuite/21_strings/substr.cc:  Likewise.
	* testsuite/22_locale/codecvt_char_char.cc:  Likewise.
	* testsuite/22_locale/codecvt_unicode_char.cc:  Likewise.
	* testsuite/22_locale/codecvt_unicode_wchar_t.cc:  Likewise.
	* testsuite/22_locale/codecvt_wchar_t_char.cc:  Likewise.
	* testsuite/22_locale/ctor_copy_dtor.cc:  Likewise.
	* testsuite/22_locale/ctype_char_members.cc:  Likewise.
	* testsuite/22_locale/ctype_wchar_t_members.cc:  Likewise.
	* testsuite/22_locale/facet.cc:  Likewise.
	* testsuite/22_locale/global_templates.cc:  Likewise.
	* testsuite/22_locale/members.cc:  Likewise.
	* testsuite/22_locale/numpunct_byname.cc:  Likewise.
	* testsuite/22_locale/numpunct_char_members.cc:  Likewise.
	* testsuite/22_locale/operators.cc:  Likewise.
	* testsuite/22_locale/static_members.cc:  Likewise.
	* testsuite/23_containers/bitset_ctor.cc:  Likewise.
	* testsuite/23_containers/bitset_members.cc:  Likewise.
	* testsuite/23_containers/bitset_shift.cc:  Likewise.
	* testsuite/23_containers/vector_capacity.cc:  Likewise.
	* testsuite/23_containers/vector_ctor.cc:  Likewise.
	* testsuite/23_containers/vector_element_access.cc:  Likewise.
	* testsuite/23_containers/vector_modifiers.cc:  Likewise.
	* testsuite/24_iterators/istreambuf_iterator.cc:  Likewise.
	* testsuite/24_iterators/iterator.cc:  Likewise.
	* testsuite/24_iterators/ostreambuf_iterator.cc:  Likewise.
	* testsuite/25_algorithms/binary_search.cc:  Likewise.
	* testsuite/25_algorithms/copy.cc:  Likewise.
	* testsuite/25_algorithms/heap.cc:  Likewise.
	* testsuite/25_algorithms/lower_bound.cc:  Likewise.
	* testsuite/25_algorithms/min_max.cc:  Likewise.
	* testsuite/25_algorithms/partition.cc:  Likewise.
	* testsuite/25_algorithms/rotate.cc:  Likewise.
	* testsuite/25_algorithms/sort.cc:  Likewise.
	* testsuite/26_numerics/c_math.cc:  Likewise.
	* testsuite/26_numerics/complex_inserters_extractors.cc:  Likewise.
	* testsuite/26_numerics/complex_value.cc:  Likewise.
	* testsuite/27_io/filebuf.cc:  Likewise.
	* testsuite/27_io/filebuf_members.cc:  Likewise.
	* testsuite/27_io/filebuf_virtuals.cc:  Likewise.
	* testsuite/27_io/fpos.cc:  Likewise.
	* testsuite/27_io/fstream_members.cc:  Likewise.
	* testsuite/27_io/ifstream_members.cc:  Likewise.
	* testsuite/27_io/ios_base_callbacks.cc:  Likewise.
	* testsuite/27_io/ios_base_members_static.cc:  Likewise.
	* testsuite/27_io/ios_base_storage.cc:  Likewise.
	* testsuite/27_io/ios_ctor.cc:  Likewise.
	* testsuite/27_io/ios_init.cc:  Likewise.
	* testsuite/27_io/ios_manip_basefield.cc:  Likewise.
	* testsuite/27_io/ios_manip_fmtflags.cc:  Likewise.
	* testsuite/27_io/ios_members.cc:  Likewise.
	* testsuite/27_io/istream_extractor_arith.cc:  Likewise.
	* testsuite/27_io/istream_extractor_char.cc:  Likewise.
	* testsuite/27_io/istream_extractor_other.cc:  Likewise.
	* testsuite/27_io/istream_manip.cc:  Likewise.
	* testsuite/27_io/istream_seeks.cc:  Likewise.
	* testsuite/27_io/istream_sentry.cc:  Likewise.
	* testsuite/27_io/istream_unformatted.cc:  Likewise.
	* testsuite/27_io/istringstream_members.cc:  Likewise.
	* testsuite/27_io/narrow_stream_objects.cc:  Likewise.
	* testsuite/27_io/ofstream_members.cc:  Likewise.
	* testsuite/27_io/ostream_inserter_arith.cc:  Likewise.
	* testsuite/27_io/ostream_inserter_char.cc:  Likewise.
	* testsuite/27_io/ostream_inserter_other.cc:  Likewise.
	* testsuite/27_io/ostream_manip.cc:  Likewise.
	* testsuite/27_io/ostream_seeks.cc:  Likewise.
	* testsuite/27_io/ostream_unformatted.cc:  Likewise.
	* testsuite/27_io/ostringstream_members.cc:  Likewise.
	* testsuite/27_io/streambuf.cc:  Likewise.
	* testsuite/27_io/stringbuf.cc:  Likewise.
	* testsuite/27_io/stringbuf_virtuals.cc:  Likewise.
	* testsuite/27_io/stringstream.cc:  Likewise.
	* testsuite/27_io/stringstream_members.cc:  Likewise.
	* testsuite/27_io/wide_stream_objects.cc:  Likewise.

From-SVN: r44679
2001-08-07 03:38:33 +00:00
Peter Schmid 3b73bce168 stl_algo.h: Fix typos.
2001-07-19  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

        * include/bits/stl_algo.h : Fix typos.
	* testsuite/25_algorithms/unique.cc: New file.

From-SVN: r44169
2001-07-20 01:17:13 +00:00
Stephen M. Webb fed3b7b431 ostream.tcc (ostream::put): Fixed error condition check.
2001-07-18  Stephen M. Webb  <stephen@bregmasoft..com>
            Roman Sulzhyk  <roman_sulzhyk@yahoo.com>

        libstdc++/3599
        * include/bits/ostream.tcc (ostream::put): Fixed error condition check.
        * testsuite/27_io/streambuf.cc (test07): Added new regression test.

Co-Authored-By: Roman Sulzhyk <roman_sulzhyk@yahoo.com>

From-SVN: r44122
2001-07-18 17:58:37 +00:00
Stephen M. Webb 02d92e3b70 All occurrences of the __value_type() and __distance_type() functions...
2001-07-17  Stephen M. Webb   <stephen@bregmasoft.com>r

	All occurrences of the __value_type() and __distance_type()
	functions, which were required to support the HP STL, have been
	removed along with all the auxiliary forwarding functions that
	were required to support their use.

	The __iterator_category() function was pretty much left alone
	because there was no benefit to removing it and its use made code
	just a little more readable.

	Incidences of distance() with nonstandard argument list were
	replaced by calls to the standard function (only in the files
	affected by the removal of the other HP functions).

	The signature of the rotate() algorithm was changed to match the
	standard.

	Headers were reformatted under C++STYLE guidelines (indentation,
	linebreaks, typename keyword).

	* include/bits/stl_algo.h: replaced __value_type() and
	__distance_type() with iterator_traits, eliminated auxiliary
	support functions required to support said function usage.
	Changed nonstandard distance() call to standard call.

	* include/bits/stl_algobase.h: Same.
	* include/bits/stl_heap.h: Same.
	* include/bits/stl_numeric.h: Same.
	* include/bits/stl_uninitialized.h: Same.
	* include/bits/stl_iterator_base_types.h (__value_type()):
	Removed.
	(__distance_type()): Removed.
	(value_type()): Gone.
	(distance_type()): Done in.
	(iterator_category()): Hasta la vista, baby.

	* include/bits/stl_iterator_base_funcs.h (iterator_category()):
	Replaced with __iterator_category().
	* include/backward/iterator.h: moved definition of value_type(),
	distance_type(), and iterator_category() out of std:: and into
	here.
	* testsuite/23_containers/vector_ctor.cc (test03): New testcases.
	* testsuite/23_containers/vector_modifiers.cc (test03): New testcases.
	* testsuite/25_algorithms/rotate.cc: New testcase.
	* testsuite/25_algorithms/copy.cc: New testcase.
	* testsuite/25_algorithms/sort.cc: Same.
	* testsuite/25_algorithms/heap.cc: Same.
	* testsuite/25_algorithms/partition.cc: Same.
	* testsuite/25_algorithms/binary_search.cc: Same.
	* testsuite/26_numerics/sum_diff.cc: Ditto.

From-SVN: r44117
2001-07-18 17:09:02 +00:00
Benjamin Kosnik 4fe706d8e0 README: Add notes on naming test cases.
2001-07-17  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/README: Add notes on naming test cases.
	* testsuite/22_locale/members.cc: Mark as xfail.
	* testsuite/22_locale/numpunct_char_members.cc: Same.

From-SVN: r44076
2001-07-17 18:47:34 +00:00
Benjamin Kosnik 2965361b9e README: Add notes on naming test cases.
2001-07-17  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/README: Add notes on naming test cases.
	* testsuite/22_locale/members.cc: Mark as xfail.
	* testsuite/22_locale/numpunct_char_members.cc: Same.

From-SVN: r44074
2001-07-17 18:43:28 +00:00
Phil Edwards 48fe3de0c3 std_sstream.h (basic_stringbuf::basic_stringbuf(string): Initialize _M_string with pointer-and-size constructor, not just pointer.
2001-07-13  Phil Edwards  <pme@sources.redhat.com>

	* include/bits/std_sstream.h (basic_stringbuf::basic_stringbuf(string):
	Initialize _M_string with pointer-and-size constructor, not just
	pointer.  Fix some comments.
	* testsuite/21_strings/ctor_copy_dtor.cc (test03):  New test.
	* testsuite/27_io/stringbuf.cc (test02):  Remove unused variable.
	(test03):  Add embedded-NUL tests.

	* mkcheck.in:  When printing totals, match the order of the tests.
	* include/bits/stringfwd.h:  Use same declaration keywords.
	* include/bits/std_iosfwd.h:  Cosmetic spacing.

From-SVN: r43996
2001-07-13 20:50:03 +00:00
Stephen M. Webb 4a9d51090a Makefile.am: New file encapsulating header generation rules.
2001-07-13  Stephen M. Webb  <stephen@bregmasoft.com>
            Loren J. Rittle  <ljrittle@acm.org>
            Phil Edwards  <pme@sources.redhat.com>

	* include/Makefile.am:  New file encapsulating header generation rules.
	* Makefile.am (SUBDIRS):  Prepend 'include' directory.
	* acinclude.m4:  Moved/removed rules for building various headers.
	* configure.in (AC_OUTPUT):  Add include/Makefile.
	* mkc++config:  Removed.

	* testsuite_flags.in:  Changed build-includes to match new scheme.
	* mknumeric_limits:  Likewise.
	* libio/Makefile.am:  Changed INCLUDES to maatch new header scheme.
	* libmath/Makefile.am:  Likewise.
	* libsupc++/Makefile.am:  Likewise.
	* src/Makefile.am:  Likewise; removed rules to build headers.
	* libmath/mathconf.h:  Changed #include'd header names to match.
	* libmath/stubs.c:  Likewise.
	* src/gen-num-limits.cc:  Likewise.

	* configure:  Regenerated.
	* config.h.in:  Regenerated.
	* aclocal.m4:  Regenerated.
	* Makefile.in:  Regenerated.
	* include/Makefile.in:  Regenerated.
	* libio/Makefile.in:  Regenerated.
	* libmath/Makefile.in:  Regenerated.
	* libsupc++/Makefile.in:  Regenerated.
	* src/Makefile.in:  Regenerated.
	* testsuite/Makefile.in:  Regenerated.

Co-Authored-By: Loren J. Rittle <ljrittle@acm.org>
Co-Authored-By: Phil Edwards <pme@gcc.gnu.org>

From-SVN: r43985
2001-07-13 16:47:56 +00:00
Benjamin Kosnik 213c2316b6 locale.cc (locale::locale(const char*)): Make sure global locales are initialized.
2001-07-02  Benjamin Kosnik  <bkoz@redhat.com>

	* src/locale.cc (locale::locale(const char*)): Make sure global
	locales are initialized.
	* include/bits/locale_facets.tcc (locale::combine): Refcout should
	be zero, not one as it's return-by-value.
	* testsuite/27_io/ios_base_callbacks.cc (test01): Don't check for
	named locales here.
	* testsuite/22_locale/ctor_copy_dtor.cc (test01): Instead, check
	for it here.
	(test02): Add test.
	* libsupc++/eh_alloc.cc: Use climits, not limits.h.

From-SVN: r43713
2001-07-02 23:08:28 +00:00
Benjamin Kosnik 13f83598b3 locale_facets.tcc (locale::combine): Clone _Impl.
2001-06-29  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/locale_facets.tcc (locale::combine): Clone _Impl.
	before replacing facet.
	* include/bits/localefwd.h (locale::_Impl::_M_remove_reference):
	Correct decrement.
	* src/localename.cc (locale::_Impl): Correct ctor initialization
	lists. Initialize ref count with one. Simplify.
	* src/locale.cc: Add comment.
	* testsuite/22_locale/numpunct.cc (test01): Add derivation test.
	* testsuite/22_locale/numpunct_char_members.cc (test01): Add tests.
	* testsuite/22_locale/members.cc (test02): Fix.

From-SVN: r43661
2001-06-30 04:35:49 +00:00
Benjamin Kosnik f2f5472f06 streambuf.tcc (__copy_streambufs): Don't set eofbit.
2001-06-26  Benjamin Kosnik  <bkoz@fillmore.constant.com>
	                     <vakatov@ncbi.nlm.nih.gov>

	libstdc++/3272
	* include/bits/streambuf.tcc (__copy_streambufs): Don't set eofbit.
	* testsuite/27_io/ostream_inserter_other.cc (test04): Add test.
	* testsuite/27_io/istream_extractor_other.cc: Fix.

From-SVN: r43602
2001-06-27 01:07:29 +00:00
Benjamin Kosnik d27bba5e57 sbuf_iter.h: Change to..
2001-06-26  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/sbuf_iter.h: Change to..
	* include/bits/streambuf_iterator.h: This.
	* include/bits/stl_iterator.h: Take out of here...
	* include/bits/stream_iterator.h: Add.
	* src/Makefile.am (base_headers): Add streambuf_iterator,
	stream_iterator.h
	* src/Makefile.in: Regenerate.
	* include/bits/std_string.h: Adjust includes.
	* include/bits/basic_ios.h: Same.
	* include/bits/locale_facets.tcc: Same.
	* include/bits/std_iosfwd.h: Same.

	* include/bits/std_iterator.h: Add istream, ostream includes.
	* include/bits/stl_iterator.h: Tweak.
	* testsuite/24_iterators/ostream_iterator.cc: Add test.
	* testsuite/24_iterators/istream_iterator.cc: Same.
	* testsuite/23_containers/multiset.cc: Add iterator include.

From-SVN: r43592
2001-06-26 21:22:57 +00:00
Benjamin Kosnik f4655693b5 stl_iterator.h (istream_iterator::operator->): Fix return values.
2001-06-26  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_iterator.h (istream_iterator::operator->): Fix
	return values.
	(istream_iterator::operator*): Same.

2001-06-26  Benjamin Kosnik  <bkoz@redhat.com>
            Alexandre Petit-Bianco  <apbianco@redhat.com>

        * testsuite/21_strings/element_access.cc (test01): Chill Out Cafe
        is on 41st, not 14th.

Co-Authored-By: Alexandre Petit-Bianco <apbianco@redhat.com>

From-SVN: r43574
2001-06-26 09:41:53 +00:00
Benjamin Kosnik b581eaf700 std_iterator.h: Include sbuf_iter.h via std_ios.h.
2001-06-26  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/std_iterator.h: Include sbuf_iter.h via std_ios.h.

	* include/bits/stl_iterator.h (istream_iterator): Inherit from
	iterator.
	(ostream_iterator): Same.
	* testsuite/24_iterators/istream_iterator.cc: New file.
	* testsuite/24_iterators/ostream_iterator.cc: New file.

	* include/bits/sbuf_iter.h: Remove self typedef.
	* testsuite/24_iterators/ostreambuf_iterator.cc: Add test.
	* testsuite/24_iterators/istreambuf_iterator.cc: Add test.

	* include/bits/stl_iterator.h (reverse_iterator): Remove
	extraneous typedefs. Add typename.
	(__normal_iterator): Remove typedefs referring to self. Add typename.
	(reverse_bidiretional_iterator): Remove, not longer required.

From-SVN: r43570
2001-06-26 07:01:09 +00:00
Phil Edwards e4bf60773b re PR libstdc++/3377 (missing std::__cmath_power<double>(double,unsigned))
2001-06-25  Phil Edwards  <pme@sources.redhat.com>
            Kurt Garloff <garloff@suse.de>

	PR libstdc++/3377
	* src/cmath.cc:  New [version of an old] file; instantiate
	__cmath_power to start with.
	* src/Makefile.am (sources):  Add cmath.cc (and alphabetize).
	* Makefile.in:  Regenerate.
	* libio/Makefile.in:  Regenerate.
	* libmath/Makefile.in:  Regenerate.
	* libsupc++/Makefile.in:  Regenerate.
	* src/Makefile.in:  Regenerate.
	* testsuite/Makefile.in:  Regenerate.

Co-Authored-By: Kurt Garloff <garloff@suse.de>

From-SVN: r43559
2001-06-25 20:57:51 +00:00
Benjamin Kosnik c766fc5f1c stl_iterator.h (reverse_iterator): Inherit from iterator.
2001-06-22  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_iterator.h (reverse_iterator): Inherit from
	iterator.
	(back_insert_iterator): Same.
	(front_insert_iterator): Same.
	(insert_iterator): Same.

	* testsuite/20_util/raw_storage_iterator.cc: Modify.
	* testsuite/24_iterators/reverse_iterator.cc: New file.
	* testsuite/24_iterators/back_insert_iterator.cc: New file.
	* testsuite/24_iterators/front_insert_iterator.cc: New file.
	* testsuite/24_iterators/insert_iterator.cc: New file.

From-SVN: r43524
2001-06-23 00:08:47 +00:00
Benjamin Kosnik 54da4898cc mknumeric_limits: Add static defintions, format.
2001-06-19  Benjamin Kosnik  <bkoz@redhat.com>

	* mknumeric_limits: Add static defintions, format.
	* testsuite/18_support/numeric_limits.cc (test02): Add test.

	* include/c_std/bits/std_cwchar.h: Include ctime.
	* testsuite/17_intro/header_cwchar.cc : Check.

	* include/c_std/bits/std_cwctype.h: Inject wctype.

From-SVN: r43466
2001-06-20 03:05:31 +00:00
Benjamin Kosnik 3768cee7ca stl_raw_storage_iter.h: Format.
2001-06-18  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/stl_raw_storage_iter.h: Format. Correct derivation.
	* testsuite/20_util/raw_storage_iterator.cc: Same.

        * include/bits/stl_alloc.h (_S_chunk_alloc): Change malloc to
        operator new.
        (__mem_interface): New typedef for switching between malloc and new.
	* testsuite/20_util/allocator_members.cc: New file.

	* testsuite/20_util/comparisons.cc: New file.
	* testsuite/20_util/pairs.cc: New file.

From-SVN: r43451
2001-06-19 01:51:33 +00:00
Gabriel Dos Reis 7c301abf46 slice_array_assignment.cc (main): New test.
* testsuite/26_numerics/slice_array_assignment.cc (main): New test.

        * include/bits/slice_array.h (slice_array<>::operator=): Make
        public and implement.
        (slice_array<>::slice_array): Make copy-constructor public.

        * include/bits/valarray_array.h (__valarray_copy): Add another
        overload to copy between strided arrays.

From-SVN: r43352
2001-06-13 22:16:24 +00:00
Benjamin Kosnik 9aaa9ee026 fpos.h (fpos::operator-): Don't return reference, return original, non-modified version.
2001-06-12  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/fpos.h (fpos::operator-): Don't return reference,
	return original, non-modified version.
	(fpos::operator+): Same.
	* testsuite/27_io/fpos.cc: Add test.

[[Split portion of a mixed commit.]]

From-SVN: r43290.2
2001-06-13 01:50:27 +00:00
Benjamin Kosnik 3b0fd4bcdb basic_string.h (string::compare): Adjust signatures as per DR 5.
2001-06-11  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/3126
	* include/bits/basic_string.h (string::compare): Adjust signatures
	as per DR 5.
	* include/bits/basic_string.tcc: And here.

	libstdc++/2346
	* config/c_io_stdio.h: Remove whitespace.
	* testsuite/27_io/istream_seeks.cc (test03): Add regression.
	(test02): Add regression.
	* testsuite/27_io/istream_seeks-3.tst: New file.

From-SVN: r43240
2001-06-12 02:30:37 +00:00
Benjamin Kosnik d52a984783 ostream.tcc (ostream::seekp): Add error checking as per DR 129.
2001-06-11  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/3114
	* include/bits/ostream.tcc (ostream::seekp): Add error checking as
	per DR 129.
	* include/bits/istream.tcc (istream::seekg): Same.
	* testsuite/27_io/istream_seeks.cc: Fix.

	libstdc++/3113
	* include/bits/stl_function.h (binder2nd): Fix as per DR 109.
	(binder1st): Same.
	* include/bits/std_queue.h: Add c++config.h.
	* testsuite/20_util/binders.cc: New test.

From-SVN: r43201
2001-06-11 19:20:20 +00:00
Benjamin Kosnik de96ac4681 *: Add copyright notice.
2001-06-08  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2767
	libstdc++/2989
	libstdc++/2992
	* include/std/*: Add copyright notice.
	* include/c_std/bits/*: Use using statements instead of extern "C".
	* include/c_std/bits/std_cmath.h: Don't overload double versions
	of math functions with __buitin versions, use global version to
	prevent ambiguities. Remove define hacks.
	* include/c_std/bits/std_cwchar.h: Using declarations for "C"
	functions that have changed signatures and std::
	declarations. Remove define hacks.
	* include/c_std/bits/std_cwchar.h: Same, plus remove ambiguous
	__builtins in std::. Remove define hacks.
	* testsuite/17_intro/headers_c.cc: Add tests.
	* testsuite/17_intro/headers_c++.cc: Add test.

From-SVN: r43061
2001-06-08 23:22:26 +00:00
Benjamin Kosnik 5de197f210 basic_ios.tcc: Formatting tweaks.
2001-06-05  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/3045
	* include/bits/basic_ios.tcc: Formatting tweaks.
	* include/bits/ios_base.h: Formatting tweaks.
	* src/ios.cc (ios_base::Init::_S_ios_create): Use filebufs here.
	(ios_base::Init::_S_ios_destroy): ..and here. Explicitly call dtors.
	* src/globals.cc: Allocate filebufs for standard streams here.
	(buf_cout, buf_cin, buf_cerr): Like so.
	(buf_wcout, buf_wcin, buf_wcerr): And so.
	* testsuite/27_io/ios_init.cc: Add.

From-SVN: r42922
2001-06-06 01:31:58 +00:00
Benjamin Kosnik fdf1b60d2b locale_facets.h (ctype<_CharT>): Add definitions for generic ctype virtuals.
2001-06-04  Brendan Kehoe  <brendan@zen.org>
	    Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/3017
	* include/bits/locale_facets.h (ctype<_CharT>): Add definitions
	for generic ctype virtuals.
	* src/locale.cc: Minor tweaks, naming consistency.
	* testsuite/22_locale/ctype.cc: Add test.

From-SVN: r42872
2001-06-04 19:25:41 +00:00
Brendan Kehoe 84b9f762bb std_bitset.h (bitset::test): Fix __pos >= _Nb comparison; all positions must be < _Nb.
2001-06-04  Brendan Kehoe  <brendan@zen.org>
            Phil Edwards  <pme@sources.redhat.com>

	* include/bits/std_bitset.h (bitset::test):  Fix __pos >= _Nb
	comparison; all positions must be < _Nb.
	* testsuite/23_containers/bitset_members.cc:  New file.

Co-Authored-By: Phil Edwards <pme@gcc.gnu.org>

From-SVN: r42859
2001-06-04 17:42:22 +00:00
Jeffrey Oldham 1007e271a3 char_traits.h (move): Qualify memmove with std::.
2001-06-04  Jeffrey Oldham  <oldham@codesourcery.com>

	* include/bits/char_traits.h (move): Qualify memmove with std::.
	(copy): Qualify memcpy with std::.
	* testsuite/27_io/filebuf_virtuals.cc (test01): Qualify strlen and
	strncmp with std::.
	(test02): Likewise.
	* testsuite/27_io/stringbuf_virtuals.cc (test01): Likewise.

From-SVN: r42854
2001-06-04 15:46:03 +00:00
Benjamin Kosnik bfa1e6b11b acconfig.h (_GLIBCPP_BUGGY_FLOAT_COMPLEX): Remove.
2001-05-30  Benjamin Kosnik  <bkoz@redat.com>

	* acconfig.h (_GLIBCPP_BUGGY_FLOAT_COMPLEX): Remove.
	(_GLIBCPP_BUGGY_COMPLEX): Remove.
	* config.h.in: Regenerate.
	* acinclude.m4 (GLIBCPP_CHECK_COMPLEX_MATH_COMPILER_SUPPORT): Remove.
	* aclocal.m4: Regenerate.
	* configure.in: Don't call it.
	* configure: Regenerate.

	libstdc++/2970
	* src/complex_io.cc (operator<<(ostream&, const complex&): Fix.
	* testsuite/26_numerics/complex_inserters_extractors.cc (test01):
	New test.

	libstdc++/2985
	* include/bits/std_complex.h: Include sstream. Put definitions for
	complex inserters and extractors here, and remove them from...
	* src/complex_io.cc: ...here.
	* include/bits/basic_ios.h (basic_ios::__numput_type): Add _Traits
	parameter.
	(basic_ios::__numget_type): Same.
	* include/bits/std_istream.h: Same.
	* include/bits/std_ostream.h: Same.
	* include/bits/sbuf_iter.h (ostreambuf_iterator): Fix typo in base
	class iterator template arguments.
	* src/locale-inst.cc: Add explicit has_facet instantiations.
	* include/bits/basic_ios.h (basic_ios::_M_get_fctype_ios): Remove.
	(_M_get_fnumput): Remove.
	(_M_get_fnumget): Remove.
	(basic_ios::_M_check_facet): New function.
	(basic_ios::_M_cache_facets): New function.
	* include/bits/basic_ios.tcc: Definition for _M_cache_facets.
	(basic_ios::imbue): Call _M_cache_facets.
	(basic_ios::init): Same.
	* include/bits/istream.tcc: Format, use _M_check_facet.
	* include/bits/ostream.tcc: Same.
	* include/bits/locale_facets.tcc (__output_float): Change
	signature, add _Traits.
	* testsuite/26_numerics/complex_inserters_extractors.cc (test02):
	New test.

From-SVN: r42743
2001-05-31 12:14:56 +00:00
Rainer Orth e944097aae libstdc++-v3-dg.exp (libstdc++-v3-init): Use get_multilibs to find gcc.
2001-05-30  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

        * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Use
        get_multilibs to find gcc.

From-SVN: r42714
2001-05-30 20:25:51 +00:00
Benjamin Kosnik a16ad77946 inserters_extractors.cc (test09): New test.
2001-05-24  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2830
	* testsuite/21_strings/inserters_extractors.cc (test09): New test.
	* include/bits/ostream.tcc: Format to match istream.tcc.
	(operator<<(basic_ostream __out, const basic_string __s)): Fix.

From-SVN: r42557
2001-05-25 04:24:12 +00:00
Mark Mitchell eeff8d2c06 std_cstring.h: #define away all global functions we will redeclare in namespace `std'.
* include/c_std/bin/std_cstring.h: #define away all global
	functions we will redeclare in namespace `std'.
	* libsupc++/eh_alloc.cc (__cxa_allocate_exception): Use
	std::memset, instead of memset.
	* testsuite/19_diagnostics/stdexceptions.cc: Use `std::strcmp',
	not plain `strcmp'.
	* testsuite/21_strings/c_strings.cc: Use `std::strcpy' instead of
	plain `strcpy'.

From-SVN: r42555
2001-05-25 01:33:21 +00:00
Benjamin Kosnik d422980b3f basic_ios.tcc: Small tweak.
2001-05-24  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2832
	* include/bits/basic_ios.tcc: Small tweak.
	* include/bits/std_fstream.h (ifstream): Add buffer member. Adjust
	ctors and dtors, and rdbuf settings.
	(ofstream): Same.
	(fstream): Same.
	* include/bits/std_sstream.h: Same, but for stringstream classes.
	* testsuite/27_io/ostringstream_members.cc: New.
	* testsuite/27_io/stringstream_members.cc: New.
	* testsuite/27_io/fstream_members.cc: New.
	* testsuite/27_io/ifstream_members.cc: Add test.
	* testsuite/27_io/istringstream_members.cc: Add test.
	* testsuite/27_io/ofstream_members.cc: Add test.

From-SVN: r42547
2001-05-24 23:09:53 +00:00
Gabriel Dos Reis cf3e18dd1e c++config (__NO_MATH_INLINES): New macro.
* include/bits/c++config (__NO_MATH_INLINES): New macro.
      * testsuite/26_numerics/fabs_inline.cc (main): New test.

From-SVN: r42533
2001-05-24 18:38:20 +00:00
Benjamin Kosnik ec233c75fb libstdc++-v3-dg.exp (libstdc++-v3-init): Set ld_library_path.
2001-05-22  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2841
	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Set
	ld_library_path.
	(libstdc++-v3_set_ld_library_path): New, copied from g++.exp.
	(libstdc++-v3-finish): Remove.
	(libstdc++-v3_exit): Remove.

From-SVN: r42487
2001-05-23 07:05:14 +00:00
Benjamin Kosnik 990101f973 mkcheck.in (static_fail): Remove S_FLAG decoration on output.
2001-05-21  Benjamin Kosnik  <bkoz@redhat.com>

	* mkcheck.in (static_fail): Remove S_FLAG decoration on output.

	* include/bits/std_sstream.h (stringbuf::setbuf): Require both
	arguments to be non-null.
	* include/bits/fstream.tcc (filebuf::_M_allocate_buffers): Only
	try allocations if allocated size is greater than zero.
	(filebuf::_M_filebuf_init): Change to
	(filebuf::_M_allocate_file): Which is what it does now.
	(filebuf::_M_allocate_bufers): Change to
	(filebuf::_M_allocate_internal_buffer): This, and create
	(filebuf::_M_allocate_pback_buffer): New.
	(filebuf::_M_destroy_internal_buffer): New.
	(filebuf::_M_buf_allocated): New data member.
	(filebuf::setbuf): Use new logic, allow use of external buffer.
	* testsuite/27_io/stringbuf_virtuals.cc: New file.
	* testsuite/27_io/filebuf_virtuals.cc: New file.

From-SVN: r42458
2001-05-22 18:48:19 +00:00
Benjamin Kosnik d4fae8b1f0 c_strings.cc (main): Fix.
2001-05-21  Benjamin Kosnik  <bkoz@kredhat.com>

	* testsuite/21_strings/c_strings.cc (main): Fix.

From-SVN: r42420
2001-05-22 04:58:14 +00:00
Benjamin Kosnik 662d942545 README: Add notes.
2001-05-18  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/README: Add notes.

	* src/Makefile.am (libstdc++.INC): Remove.
	* src/Makefile.in: Regenerate.

	Phil Edwards <pedwards@disaster.jaj.com>
	* mkcheck.in: Add missing '#'.

From-SVN: r42298
2001-05-19 03:42:53 +00:00
Angela Marie Thomas 28e8acb68f libstdc++-v3-dg.exp (libstdc++-v3-init): Set flags appropriately for remote testing and testing installed files without...
2001-05-18  Angela Marie Thomas <angela@cygnus.com>

        * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Set flags
        appropriately for remote testing and testing installed files without
        a build dir.

From-SVN: r42272
2001-05-18 18:55:44 +00:00
Gabriel Dos Reis 5c542b4a19 std_valarray.h (valarray<>::operator[] const): Return a const reference.
* include/bits/std_valarray.h (valarray<>::operator[] const):
        Return a const reference.
        * testsuite/26_numerics/valarray_const_bracket.cc: New test.

From-SVN: r42245
2001-05-18 05:47:46 +00:00
Angela Marie Thomas 256e7e85b0 libstdc++-v3-dg.exp (libstdc++-v3-dg-test): Set output_file based on the name of the testcase.
2001-05-18  Angela Marie Thomas <angela@cygnus.com>

        * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-dg-test):  Set
        output_file based on the name of the testcase.

2001-05-18  Angela Marie Thomas <angela@cygnus.com>

        * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init):  Build
        gluefile and use it if needs_status_wrapper is set.

From-SVN: r42240
2001-05-18 05:37:43 +00:00
Zack Weinberg 7edc73b46a inserters_extractors.cc, [...]: Replace multi-line string constants with C89-style concatenated string constants.
2001-05-15  Zack Weinberg  <zackw@stanford.edu>

        * testsuite/21_strings/inserters_extractors.cc,
        testsuite/27_io/istream_unformatted.cc,
        testsuite/27_io/stringstream.cc:
        Replace multi-line string constants with C89-style
        concatenated string constants.

From-SVN: r42116
2001-05-15 20:46:50 +00:00
Benjamin Kosnik c6192d882f Switch over to new harness.
2001-05-13   Benjamin Kosnik  <bkoz@redhat.com>

	Switch over to new harness.
	* testsuite_flags.in: Tweaks via Gaby.
	* testsuite/Makefile.am: Change tool to libstdc++-v3.
	(EXPECT): Quote directly.
	(RUNTEST): Same.
	* configure.in: Output testsuite_flags.
	* acinclude.m4: Substitute src, bld, and prefix dirs.
	Remove glibcpp_expect, glibcpp_runtestflags.
	* Makefile.am (RUNTESTFLAGS): Pass this down to subdirs.
	* mkcheck.in: Port to new interface.

	* aclocal.m4: Regerate.
	* configure: Regnerate.
	* Makefile.in: Regnerate.
	* */Makefile.in: Regenerate.

	* tests_flags.in: Remove.
	* testsuite/lib/libstdc++.exp: Remove.
	* testsuite/libstdc++.tests/tests.exp: Remove.

From-SVN: r42055
2001-05-14 01:15:36 +00:00
Benjamin Kosnik 602928d139 Switch over to new harness.
2001-05-13   Benjamin Kosnik  <bkoz@redhat.com>

	Switch over to new harness.
	* testsuite_flags.in: Tweaks via Gaby.
	* testsuite/Makefile.am: Change tool to libstdc++-v3.
	(EXPECT): Quote directly.
	(RUNTEST): Same.
	* configure.in: Output testsuite_flags.
	* acinclude.m4: Substitute src, bld, and prefix dirs.
	Remove glibcpp_expect, glibcpp_runtestflags.
	* Makefile.am (RUNTESTFLAGS): Pass this down to subdirs.
	* mkcheck.in: Port to new interface.

	* aclocal.m4: Regerate.
	* configure: Regnerate.
	* Makefile.in: Regnerate.
	* */Makefile.in: Regenerate.

	* tests_flags.in: Remove.
	* testsuite/lib/libstdc++.exp: Remove.

From-SVN: r42054
2001-05-14 01:07:38 +00:00
Benjamin Kosnik c66ce1f5b7 testsuite_flags.in: New, simplified interface.
2001-05-11   Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite_flags.in: New, simplified interface.
	* testsuite/lib/libstdc++-v3-dg.exp: New test harness.
	* testsuite/libstdc++-v3.dg: Add.
	* testsuite/libstdc++-v3.dg/dg.exp: Add.

From-SVN: r41999
2001-05-12 17:49:16 +00:00
Benjamin Kosnik 04d930e6d4 *.cc: Remove spaces, make sure testcases return zero.
2001-05-11   Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/*/*.cc: Remove spaces, make sure testcases return zero.
	* testsuite/config/default.exp: Update bugs email address.

From-SVN: r41997
2001-05-12 16:53:08 +00:00
Benjamin Kosnik 8850521be3 libstdc++.exp: Use libgloss.exp.
2001-05-09  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/lib/libstdc++.exp: Use libgloss.exp. Call
	libgloss_link_flags to find crt0.o for targets that use libgloss
	instead of newlib.
	Change LDFLAGS to LIBS.
	Consistently name procedures libstdc++-XXX.
	* testsuite/libstdc++.tests/tests.exp: Use new procedure names.

From-SVN: r41938
2001-05-10 08:55:50 +00:00
Benjamin Kosnik eea790f7b3 std_cstring.h (memchr): Correct definitions.
2001-05-08  Benjamin Kosnik  <bkoz@fillmore.constant.com>

	* include/c_std/bits/std_cstring.h (memchr): Correct definitions.
	(strchr): Same.
	(strpbrk): Same.
	(strrchr): Same.
	(strstr): Same.
	* include/c_std/bits/std_cwchar.h (wcschr): Same.
	(wcsbrk): Same.
	(wcsrchr): Same.
	(wcsstr): Same.
	(wmemchr): Same.
	* testsuite/21_strings/c_strings.cc: Add tests.

From-SVN: r41919
2001-05-08 23:53:55 +00:00
Benjamin Kosnik ee2f20b9c5 std_fstream.h (basic_filebuf): Change signature.
2001-05-07  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2523
	* include/bits/std_fstream.h (basic_filebuf): Change signature.
	* include/bits/fstream.tcc (basic_filebuf): Change bool argument
	to int_type, pass in buffer size info.
	* include/bits/std_streambuf.h (_M_is_indeterminate): Check for
	unbuffered situation.
	(underflow): Remove codecvt bits for the time being.
	* include/bits/istream.tcc (istream::sentry): Avoid sputbackc call.
	* include/bits/locale_facets.tcc (_M_extract): Cache dereference
	values from iterators, clean.
	* src/locale.cc: Ditto.
	* include/bits/sbuf_iter.h: Format.
	* src/ios.cc: Explicitly pass in buffer sizes at creation time.
	* testsuite/27_io/narrow_stream_objects.cc: Add tests.
	* testsuite/27_io/filebuf.cc: Tweaks.
	* testsuite/27_io/filebuf_members.cc: Tweaks.

From-SVN: r41909
2001-05-08 03:39:50 +00:00
Benjamin Kosnik 39003c9902 std_fstream.h (basic_filebuf): Change signature.
2001-05-07  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2523
	* include/bits/std_fstream.h (basic_filebuf): Change signature.
	* include/bits/fstream.tcc (basic_filebuf): Change bool argument
	to int_type, pass in buffer size info.
	* include/bits/std_streambuf.h (_M_is_indeterminate): Check for
	unbuffered situation.
	(underflow): Remove codecvt bits for the time being.
	* include/bits/istream.tcc (istream::sentry): Avoid sputbackc call.
	* include/bits/locale_facets.tcc (_M_extract): Cache dereference
	values from iterators, clean.
	* src/locale.cc: Ditto.
	* include/bits/sbuf_iter.h: Format.
	* src/ios.cc: Explicitly pass in buffer sizes at creation time.
	* testsuite/27_io/narrow_stream_objects.cc: Add tests.
	* testsuite/27_io/filebuf.cc: Tweaks.
	* testsuite/27_io/filebuf_members.cc: Tweaks.

From-SVN: r41908
2001-05-08 03:07:56 +00:00
Alexandre Oliva f8e4b51d36 configure.in (LIBSUPCXX_PICFLAGS): Set it to -prefer-pic or -prefer-non-pic depending on whether libtool has...
* configure.in (LIBSUPCXX_PICFLAGS): Set it to -prefer-pic or
-prefer-non-pic depending on whether libtool has shared libraries
enabled or disabled.
* libsupc++/Makefile.am (LIBSUPCXX_CXXFLAGS): Set to
$(LIBSUPCXX_PICFLAGS).
* configure, */Makefile.in: Rebuilt.

From-SVN: r41806
2001-05-03 20:35:18 +00:00
Benjamin Kosnik a85afd69a3 sbuf_iter.h (istreambuf_iterator): Correct.
2001-05-01  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/sbuf_iter.h (istreambuf_iterator): Correct.
	* testsuite/24_iterators/istreambuf_iterator.cc (test02): Add test.

	* include/bits/std_sstream.h (stringbuf): Leak
	copied string.
	* testsuite/24_iterators/ostreambuf_iterator.cc: Correct.

From-SVN: r41755
2001-05-02 05:50:20 +00:00
Gabriel Dos Reis 358c9f4b42 * testsuite/libstdc++.tests/tests.exp: Add comment.
From-SVN: r41730
2001-05-01 17:28:02 +00:00
Gabriel Dos Reis 55a0ab4ac6 * testsuite/libstdc++.tests/tests.exp: Set ulimits.
From-SVN: r41727
2001-05-01 15:01:50 +00:00
Benjamin Kosnik b85381b911 ostreambuf_iterator.cc: New file.
2001-04-30  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2627
	* testsuite/24_iterators/ostreambuf_iterator.cc: New file.
	* include/bits/sbuf_iter.h (ostreambuf_iterator): Remove bogus
	specializations.

From-SVN: r41694
2001-04-30 20:53:31 +00:00
Benjamin Kosnik 5db6f3de56 std_cmath.h (std): Explicitly inject c99 names.
2001-04-25  Benjamin Kosnik  <bkoz@redhat.com>

	* include/c_std/bits/std_cmath.h (std): Explicitly inject c99 names.
	* include/c_std/bits/std_cstdlib.h (std): Same, except for llabs.
	* include/c_std/bits/std_cwchar.h (std): Same.
	* acconfig.h (std): Remove c99 injection into std.
	* config.h.in: Regenerate.

	* testsuite/README: Fix typo.

	* include/bits/codecvt.h: Remove warnings.

From-SVN: r41568
2001-04-26 02:23:52 +00:00
Benjamin Kosnik 4b3db7c50c acinclude.m4 (GLIBCPP_ENABLE_LONG_LONG): Make sure required C99 support is enabled correctly before long long is activated.
2001-04-20  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4 (GLIBCPP_ENABLE_LONG_LONG): Make sure required C99
	support is enabled correctly before long long is activated.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	* include/backward/backward_warning.h: Format correctly.

	* testsuite/26_numerics/c99_classification_macros_c.cc: Add.
	* testsuite/26_numerics/c99_classification_macros_c++.cc: Add.
	* testsuite/26_numerics/c99_macros.cc: Remove.

From-SVN: r41469
2001-04-20 22:19:57 +00:00
Benjamin Kosnik 7cda84dc70 acconfig.h (_GLIBCPP_USE_C99): Add.
2001-04-19  Benjamin Kosnik  <bkoz@redhat.com>

	* acconfig.h (_GLIBCPP_USE_C99): Add.
	* config.h.in: Regenerate.
	* acinclude.m4 (GLIBCPP_ENABLE_C99): New macro. Test for ISO/IEC
	9899: 1999 support.
	* aclocal.m4: Regenerate.
	* configure.in (GLIBCPP_ENABLE_C99): Use it, on by default.
	* configure: Regenerate.
	* configure.in (GLIBCPP_ENABLE_LONG_LONG): Set default to yes.
	* configure: Regenerate.
	* include/c_std/bits/std_cwchar.h: Put wcstold, wcstoll, wcstoull
	into c99.
	* include/c_std/bits/std_cmath.h: Bring C99 functions into c99
	namespace.
	* include/c_std/bits/std_cstdlib.h: Same.
	* docs/html/configopts.html: Update.
	* testsuite/26_numerics/c99_macros.cc: Edit, use cmath instead of
	math.h
	(test_c99_classify): Add.
	* config/os/gnu-linux/bits/os_defines.h (_GNU_SOURCE): Remove.
	(_ISOC99_SOURCE): Remove.

	* include/bits/stl_algo.h: Use _GLIBCPP_HAVE_DRAND48.
	* include/bits/c++config (__STL_ASSERTIONS): Simplify.
	* acinclude.m4 (GLIBCPP_CHECK_STDLIB_SUPPORT): Add check for drand48.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

From-SVN: r41451
2001-04-20 08:59:25 +00:00
Loren J. Rittle 599d54fd8e * testsuite/27_io/istream_seeks.cc: Inform DejaGnu of required files.
From-SVN: r41402
2001-04-18 05:13:33 +00:00
Benjamin Kosnik 47e982b247 map_operators.cc: Add dg-excess-errors.
2001-04-17  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/23_containers/map_operators.cc: Add dg-excess-errors.
	* testsuite/23_containers/set_operators.cc: Same.

	* include/bits/c++config: Add _GLIBCPP_CONCEPT_CHECKS. Disable by
	default.
	(__GLIBCPP__): Bump from value of last release.
	* include/bits/concept_check.h: Default to off, edit comments.
	* src/stl-inst.cc: Use _GLIBCPP_CONCEPT_CHECKS.
	* src/Makefile.am (AM_CXXFLAGS): Remove _GLIBCPP_NO_CONCEPT_CHECKS.
	* src/Makefile.in: Regenerate.

From-SVN: r41397
2001-04-18 01:06:05 +00:00
Gabriel Dos Reis d72274e411 set_operators.cc: Just try to compile.
* testsuite/23_containers/set_operators.cc: Just try to compile.
	Mark as XFAIL.
	* testsuite/23_containers/map_operators.cc: Same.

From-SVN: r41318
2001-04-13 02:14:11 +00:00
Jason Merrill d93aa33514 libstdc++.exp (libstdc++-dg-test): Prepend "./" to output_file.
* testsuite/lib/libstdc++.exp (libstdc++-dg-test): Prepend "./" to
        output_file.
        (dg-test): Revert rth's change.

From-SVN: r41301
2001-04-12 09:35:24 -04:00
Gabriel Dos Reis e98d0ceafc * testsuite/README: Add DejaGnu specific documentation.
From-SVN: r41274
2001-04-11 23:42:57 +00:00
Benjamin Kosnik 46840bcd52 acinclude.m4: AC_CHECK_TOOL for expect.
2001-04-11  Benjamin Kosnik  <bkoz@redhat.com>

	* acinclude.m4: AC_CHECK_TOOL for expect.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.am (RUNTEST): Use substituted.
	(EXPECT): Same.

	* configure.in: Remove xcompiling substitution.
	* tests_flags.in (CROSS_LIB_PATH): Remove.
	(xcompiling): Remove.
	(CXX): Use substituted CXX.

From-SVN: r41262
2001-04-11 18:52:31 +00:00
Richard Henderson a14fd7f564 libstdc++.exp (dg-test): Explicitly run the program in the current directory.
* testsuite/lib/libstdc++.exp (dg-test): Explicitly run
        the program in the current directory.

From-SVN: r41234
2001-04-10 17:03:51 -07:00
Gabriel Dos Reis a1fae79477 equal.cc: New test.
2001-04-06  Gabriel Dos Reis  <gdr@codesourcery.com>

	* testsuite/25_algorithms/equal.cc: New test.

From-SVN: r41169
2001-04-06 22:20:03 +00:00
Gabriel Dos Reis e521873c0e std_cmath.h: Get rid of C99 math macros.
* include/c_std/bits/std_cmath.h: Get rid of C99 math macros.
        * testsuite/26_numerics/c99_macros.cc: Add test.

From-SVN: r41159
2001-04-06 19:14:27 +00:00
Benjamin Kosnik baac9fce7d Warn when using backward headers.
2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>

	Warn when using backward headers.
	* include/backward/algo.h: Include warning file.
	* include/backward/vector.h: Same.
	* include/backward/tree.h: Same.
	* include/backward/tempbuf.h: Same.
	* include/backward/strstream: Same.
	* include/backward/streambuf.h: Same.
	* include/backward/stream.h: Same.
	* include/backward/stack.h: Same.
	* include/backward/slist.h: Same.
	* include/backward/set.h: Same.
	* include/backward/rope.h:
	* include/backward/queue.h: Same.
	* include/backward/pair.h: Same.
	* include/backward/ostream.h: Same.
	* include/backward/new.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/istream.h: Same.
	* include/backward/iostream.h:
	* include/backward/iomanip.h:
	* include/backward/heap.h: Same.
	* include/backward/hashtable.h:
	* include/backward/hash_set.h:
	* include/backward/hash_map.h:
	* include/backward/function.h:
	* include/backward/fstream.h:
	* include/backward/deque.h:
	* include/backward/defalloc.h: Same.
	* include/backward/complex.h: Same.
	* include/backward/bvector.h:
	* include/backward/alloc.h:
	* include/backward/algobase.h: Same.

	* include/backward/backward_warning.h: New file.
	* src/Makefile.am (backward_headers): Add backward_warning.h
	* src/Makefile.in: Regenerate.

2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>

	* src/Makefile.am (myinstalldirs): Make sure backward directory is
	created.
	(myinstallheaders): Install backward headers in backward directory.
	* src/Makefile.in: Regenerate.

From-SVN: r41139
2001-04-06 06:08:17 +00:00
Benjamin Kosnik 127644626f fstream.tcc: Add bool parameter to filebuf ctor.
2001-04-03  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/fstream.tcc: Add bool parameter to filebuf ctor.
	* include/bits/ios_base.h(ios_base::Init): Remove _M_cout, _M_cin,
	_M_cerr, _M_wcout, _M_wcin, _M_wcerr.
	(ios_base::Init::_S_ios_create): New.
	(ios_base::Init::_S_ios_destroy): New.
	* include/bits/std_fstream.h: Change ctor args.
	* src/ios.cc (ios_base::Init::Init): Use _S_ios_create.
	(ios_base::Init::~Init): Use _S_ios_destroy.
	(ios_base::sync_with_stdio): Use new members.
	* testsuite/27_io/filebuf_members.cc: Fix calling conventions for
	filebuf ctor.

From-SVN: r41072
2001-04-04 01:02:26 +00:00
Phil Edwards 30a20a1ee0 New concept checking implementation.
2001-04-02  Phil Edwards  <pme@sources.redhat.com>

	New concept checking implementation.
	* docs/html/19_diagnostics/howto.html:  Document.
	* docs/html/17_intro/concept_check.diff:  New file, for reference.
	* include/bits/boost_concept_check.h:  New file from Boost.
	* include/bits/c++config:  Update comments.

	* include/bits/concept_check.h:  New file.
	* include/bits/concept_checks.h:  Removed.
	* include/bits/container_concepts.h:  Removed.
	* include/bits/sequence_concepts.h:  Removed.
	* include/bits/stl_iterator_base.h:  Removed; split into...
	* include/bits/stl_iterator_base_funcs.h:  ...this new file...
	* include/bits/stl_iterator_base_types.h:  ...and this new file.

	* include/bits/sbuf_iter.h:  Update to use new implementation.
	* include/bits/std_iterator.h:  Likewise.
	* include/bits/std_memory.h:  Likewise.
	* include/bits/stl_algo.h:  Likewise.
	* include/bits/stl_algobase.h:  Likewise.
	* include/bits/stl_construct.h:  Likewise.
	* include/bits/stl_deque.h:  Likewise.
	* include/bits/stl_heap.h:  Likewise.
	* include/bits/stl_list.h:  Likewise.
	* include/bits/stl_map.h:  Likewise.
	* include/bits/stl_multimap.h:  Likewise.
	* include/bits/stl_multiset.h:  Likewise.
	* include/bits/stl_numeric.h:  Likewise.
	* include/bits/stl_queue.h:  Likewise.
	* include/bits/stl_set.h:  Likewise.
	* include/bits/stl_stack.h:  Likewise.
	* include/bits/stl_uninitialized.h:  Likewise.
	* include/bits/stl_vector.h:  Likewise.
	* include/ext/hash_map:  Likewise.
	* include/ext/hash_set:  Likewise.
	* include/ext/slist:  Likewise.
	* include/ext/stl_hashtable.h:  Likewise.

	* src/Makefile.am (base_headers):  Update list of headers.
	* Makefile.in:  Regenerated.
	* src/Makefile.in:  Regenerated.
	* libio/Makefile.in:  Regenerated.
	* libmath/Makefile.in:  Regenerated.
	* libsupc++/Makefile.in:  Regenerated.
	* testsuite/Makefile.in:  Regenerated.

	* docs/html/install.html:  Update contact information.
	* docs/html/17_intro/howto.html:  Ditto.
	* docs/html/18_support/howto.html:  Ditto.
	* docs/html/20_util/howto.html:  Ditto.
	* docs/html/21_strings/howto.html:  Ditto.
	* docs/html/22_locale/howto.html:  Ditto.
	* docs/html/23_containers/howto.html:  Ditto.
	* docs/html/24_iterators/howto.html:  Ditto.
	* docs/html/25_algorithms/howto.html:  Ditto.
	* docs/html/26_numerics/howto.html:  Ditto.
	* docs/html/27_io/howto.html:  Ditto.
	* docs/html/faq/index.html:  Ditto, plus info on new checking code.
	* docs/html/ext/howto.html:  Ditto, plus info on new checking code.
	* docs/html/faq/index.txt:  Regenerated.

From-SVN: r41031
2001-04-03 00:26:58 +00:00
Zack Weinberg 9f4a318c36 libstdc++.exp (dg-test): Annotate result messages with $which_library as well as $tool_flags and...
* testsuite/lib/libstdc++.exp (dg-test): Annotate result
	messages with $which_library as well as $tool_flags and
	${dg-extra-tool-flags}.  Factor out annotation text into
	a single variable.

From-SVN: r41029
2001-04-02 23:40:01 +00:00
Stephen M. Webb 57df35602e std_cstring.h: Fix for const-correctness.
2001-04-02  Stephen M. Webb  <stephen@bregmasoft.com>

	* include/c_std/bits/std_cstring.h: Fix for const-correctness.
	* include/c_std/bits/std_cwchar.h: Same.
	* testsuite/21_strings/c_strings.cc: Add.

From-SVN: r41018
2001-04-02 22:01:52 +00:00
Benjamin Kosnik 9b7e0d0005 [multiple changes]
2001-03-31  Benjamin Kosnik  <bkoz@redhat.com>

	* configure.target: Remove duplicate aix entry.

2001-03-30  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/stl_bvector.h: Move to...
	* include/bits/stl_vector.h: ...here.
	* include/ext/bvector: Move to...
	* include/backward/bvector.h: ...here.
	* include/bits/std_vector.h: Change stl_bvector include.
	* include/bits/std_queue.h: Remove bvector include.
	* include/ext/tree: Insert using rb_tree, move to...
	* include/backward/tree.h: ...here.
	* include/backward/hash_map.h: Include ext/hash_map.
	* include/backward/hash_set.h: Include ext/hash_set.
	* include/backward/queue.h: New file.
	* include/backward/stack.h: Edit.
	* include/backward/algo.h: Same.
	* include/backward/algobase.h: Same.
	* include/backward/alloc.h: Same.
	* include/backward/function.h: Same.
	* include/backward/iomanip.h: Same.
	* include/backward/istream.h: Same.
	* include/backward/iterator.h: Same.
	* include/backward/list.h: Same.
	* include/backward/map.h: Same.
	* include/backward/multimap.h: Same.
	* include/backward/multiset.h: Same.
	* include/backward/ostream.h: Same.
	* include/backward/pair.h: Same
	* include/backward/rope.h: Same.
	* include/backward/set.h: Same.
	* include/backward/stream.h: Same.
	* include/backward/strstream.h: Same.
	* include/backward/tempbuf.h: Same.
	* src/Makefile.am (ext_headers): Edit.
	* src/Makefile.in: Regenerate.
	* testsuite/ext/headers.cc (main): Fix.
	* mkcheck.in: Fix.

From-SVN: r40979
2001-03-31 20:15:43 +00:00
Benjamin Kosnik 62f079c57e mkcheck.in (LIBTOOL): Don't construct -B argument here...
2001-03-28  Benjamin Kosnik  <bkoz@redhat.com>

	* mkcheck.in (LIBTOOL): Don't construct -B argument here...
	* tests_flags.in (CXX): Construct here.
	(static_fail): Don't remove compile.out. Format with spaces.
	(INCLUDES): Deal with xcompiling.
	* configure.in (xcompiling): Substitute.
	* testsuite/Makefile.am: Snake libjava configury.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/23_containers/map_operators.cc: Tweaks.
	* testsuite/23_containers/set_operators.cc: Tweaks.

From-SVN: r40972
2001-03-30 17:41:33 +00:00
Benjamin Kosnik 755f30f40c [multiple changes]
2001-03-28  Benjamin Kosnik  <bkoz@redhat.com>

	* mkcheck.in (LIBTOOL): Don't construct -B argument here...
	* tests_flags.in (CXX): Construct here.
	(static_fail): Don't remove compile.out. Format with spaces.
	(INCLUDES): Deal with xcompiling.
	* configure.in (xcompiling): Substitute.
	* testsuite/Makefile.am: Snake libjava configury.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/23_containers/map_operators.cc: Tweaks.
	* testsuite/23_containers/set_operators.cc: Tweaks.

2001-03-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>

	Enable dejagnu testing framework.
	* configure.in: Generate testsuite/Makefile.
	* configure: Regenerate.
	* Makefile.am (check-install): Change rule from this...
	(check-script-install): ...to this.
	(check): Change rule from this...
	(check-script):...to this.
	* Makefile.in: Regenerate.

From-SVN: r40960
2001-03-30 08:14:15 +00:00
Benjamin Kosnik 5fa9abc3e9 basic_file.h (get_fileno): Remove.
2001-03-26  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/basic_file.h (get_fileno): Remove.
	(_M_fileno): Remove.
	(_M_cfile_created): Add.
	(basic_file::basic_file(__c_file_type*, openmode): Add.
	(basic_file::basic_file(int, const char*, openmode): Remove.
	* include/bits/fstream.tcc (basic_fstream::basic_filebuf(int __fd,
	const char*, ios_base::openmode): Don't allocate
	internal buffers. Turn off internal buffers.
	(basic_filebuf::overflow): Remove test for null buffer.
	(basic_filebuf::_M_really_overflow): Same. Allow unbuffered use.
	* include/bits/streambuf.cc: Tweak.
	* include/bits/std_ostream.h: Tweak.
	* config/basic_file_libio.h: Same.
	* config/basic_file_stdio.h: Same.
	* src/ios.cc (ios_base::Init::Init()): Unbuffer stdout by default.
	* testsuite/27_io/filebuf_members.cc: Tweaks.
	* testsuite/27_io/ios_base_members_static.cc: Tweaks.

From-SVN: r40863
2001-03-27 03:48:17 +00:00
Benjamin Kosnik 69302d8b5e std_streambuf.h: Remove cached locale facets.
2001-03-14  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2020
	* include/bits/std_streambuf.h: Remove cached locale facets.
	(basic_streambuf::_M_buf_fctype): Remove.
	(basic_streambuf::~basic_streambuf): Remove here.
	(basic_streambuf::basic_streambuf): Same.
	(basic_streambuf::imbue): Same.
	* include/bits/fstream.tcc (filebuf::imbue): Remove _M_buf_fctype.
	* include/bits/std_fstream.h (basic_filebuf::_M_fcvt): Remove.
	(basic_filebuf::~basic_filebuf()): Remove here.
	* include/bits/fstream.tcc (basic_filebuf::basic_filebuf): Same.
	(basic_filebuf::imbue): Same.
	* include/bits/localefwd.h (_Count_ones): Remove.
	(locale::_S_num_categories): Just use 6, since this doesn't
	actually change, ever.
	* include/bits/locale_facets.tcc (has_facet): Simplify.
	(use_facet): Same.
	* testsuite/27_io/filebuf.cc (test06): Add tests.

From-SVN: r40472
2001-03-14 20:46:34 +00:00
Benjamin Kosnik 0e061da691 [multiple changes]
2001-03-09  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>

	* include/bits/istream.tcc ( basic_istream<_CharT, _Traits>&
	operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)):
	Use streamsize, not int_type.

2001-03-08  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/streambuf.cc (test06): New test, disabled at the
	moment.

From-SVN: r40358
2001-03-10 01:36:23 +00:00
Benjamin Kosnik d32c94be18 std_iosfwd.h: Remove string forward decls here.
2001-03-07  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/std_iosfwd.h: Remove string forward decls here.
	* include/bits/stringfwd.h: Add forward decls for char_traits
	specializations.
	* config/c_io_libio.h (wstreamoff): Delete.
	* config/c_io_stdio.h (wstreamoff): Same.
	* include/bits/char_traits.h: Use streamoff not wstreamoff for
	char_traits<wchar_t>::off_type.
	Remove duplicate typedefs.
	* include/bits/fpos.h: Define streampos/wstreampos here.
	* testsuite/27_io/istream_seeks.cc (test04): Explicitly cast int
	values to off_type.
	(test05): Same.
	Changeup output files.
	* testsuite/27_io/istream_unformatted.cc: Change output files.
	* testsuite/27_io/istream_seeks-1.txt: Add.
	* testsuite/27_io/istream_seeks-2.tst: Add.
	* testsuite/27_io/istream_seeks-1.tst: Add.
	* testsuite/27_io/istream_unformatted-2.tst: Delete.
	* testsuite/27_io/istream_unformatted-3.tst: Delete.
	* testsuite/27_io/istream_unformatted-3.txt: Delete.

From-SVN: r40303
2001-03-07 22:22:41 +00:00
Benjamin Kosnik 2077a6c51e istream.tcc (basic_istream<_CharT, [...]): Don't use sentry.
2001-03-06  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/2181
	* include/bits/istream.tcc (basic_istream<_CharT, _Traits>::
	operator>>(__istream_type& (*__pf)(__istream_type&)): Don't use
	sentry.
	(basic_istream<_CharT, _Traits>:: operator>>(__ios_type&
	(*__pf)(__ios_type&)): Same.
	(basic_istream<_CharT, _Traits>:: operator>>(ios_base&
	(*__pf)(ios_base&))): Same.
	* testsuite/27_io/istream_extractor_other.cc: Add tests.
	* testsuite/27_io/istream_manip.cc (test01): Fix.

From-SVN: r40281
2001-03-07 02:08:59 +00:00
Nathan Myers d3688a0232 std_cerrno.h: Don't define errno in std::.
2001-03-06  Nathan Myers  <ncm@cantrip.org>
	    Benjamin Kosnik  <bkoz@redhat.com>

	* include/c_std/bits/std_cerrno.h: Don't define errno in std::.
	* testsuite/17_intro/header_cerrno.cc (test01): New file.
	* testsuite/17_intro/header_cassert.cc (test01): New file.
	* testsuite/17_intro/header_cstddef.cc (test01): New file.
	* testsuite/17_intro/header_csetjmp.cc (test01): New file.
	* testsuite/17_intro/header_cstdarg.cc (test01): New file.

Co-Authored-By: Benjamin Kosnik <bkoz@redhat.com>

From-SVN: r40270
2001-03-06 23:32:59 +00:00
Scott Snyder 21aaf8bffc std_cmath.h: Move abs(long), div(long,long) from here...
2001-03-05  scott snyder  <snyder@fnal.gov>

	libstdc++/2190
        * include/c_std/bits/std_cmath.h: Move abs(long), div(long,long)
        from here...
        * include/c_std/bits/std_cstdlib.h: ... to here.
	* testsuite/17_intro/header_cstdlib.cc: Add test.

From-SVN: r40254
2001-03-06 02:51:15 +00:00
Benjamin Kosnik c0a26060f6 basic_file.h: Include basic_file_model.h.
2001-02-27  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/1886
	* include/bits/basic_file.h: Include basic_file_model.h.
	* config/c_io_libio.cc: Move to...
	* config/basic_file_libio.cc: Here.
	* config/basic_file_libio.h: New file.
	* config/c_io_stdio.cc: Move to...
	* config/basic_file_stdio.cc: Here.
	* config/basic_file_stdio.h: New file.
	* config/c_io_libio.h: Tweak.
	* config/c_io_stdio.h: Tweak.
	* src/Makefile.am (build_headers): Add basic_file_model.h.
	(sources): Add basic_file.cc, remove c++io.cc.
	* src/Makefile.in: Regenerate.
	* acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Add support for
	basic_file_model.h and basic_file.cc.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/27_io/filebuf.cc (test05): Add regression.

From-SVN: r40108
2001-02-28 03:20:36 +00:00
Benjamin Kosnik 9dd3d53c9a std_stdexcept.h (runtime_error): Make string member non-const.
2001-02-27  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/std_stdexcept.h (runtime_error): Make string
	member non-const.
	(logic_error): Same.
	* testsuite/19_diagnostics/stdexceptions.cc (test04): Add test.
	(test03): Fix.

From-SVN: r40098
2001-02-27 23:00:35 +00:00
Benjamin Kosnik 0db54514fa stdexceptions.cc (test03): Fix.
2001-02-27  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/19_diagnostics/stdexceptions.cc (test03): Fix.

From-SVN: r40095
2001-02-27 16:16:12 +00:00
Benjamin Kosnik 00035ba5e2 std_stdexcept.h (logic_error::logic_error): Use string object, not reference.
2001-02-26  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/1972
	libstdc++/2089
	* include/bits/std_stdexcept.h (logic_error::logic_error): Use
	string object, not reference.
	(runtime_error::runtime_error): Same.

From-SVN: r40082
2001-02-27 04:28:36 +00:00
Benjamin Kosnik 0349df29f0 std_stdexcept.h (logic_error::logic_error): Use string object, not reference.
2001-02-26  Benjamin Kosnik  <bkoz@redhat.com>

	libstdc++/1972
	libstdc++/2089
	* include/bits/std_stdexcept.h (logic_error::logic_error): Use
	string object, not reference.
	(runtime_error::runtime_error): Same.
	* testsuite/19_diagnostics/stdexceptions.cc: New file.

From-SVN: r40079
2001-02-27 04:13:17 +00:00
Benjamin Kosnik b8f971fc25 char_traits.cc: Move to ...
2001-02-16  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/21_strings/char_traits.cc: Move to ...
	* testsuite/21_strings/char_traits_requirements.cc: ..here.
	* testsuite/21_strings/char_traits-int_type.cc: Move to ...
	* testsuite/21_strings/char_traits_typedefs.cc: ..here.

From-SVN: r39784
2001-02-16 23:58:28 +00:00
Gabriel Dos Reis 78e3e6aca3 libstdc++.exp (dg-test): Lift, temporarily, out of dejagnu/dg.exp.
* testsuite/lib/libstdc++.exp(dg-test): Lift, temporarily, out of
        dejagnu/dg.exp.  Adapt to log options used to run testcases.

From-SVN: r39704
2001-02-15 03:57:39 +00:00
Gabriel Dos Reis b80253d7c0 char_traits.h (char_traits<char>::int_type): Change to `int' to match 21.1.3.1/2.
2001-02-11  Gabriel Dos Reis  <gdr@codesourcery.com>

	* include/bits/char_traits.h char_traits<char>::int_type: Change
	to `int' to match 21.1.3.1/2.

	* testsuite/21_strings/char_traits-int_type.C: New test.

From-SVN: r39581
2001-02-11 04:43:44 +00:00
Gabriel Dos Reis 7f98c6bc32 Makefile.am: New file.
2001-02-10  Gabriel Dos Reis  <gdr@codesourcery.com>

        * testsuite/Makefile.am: New file.

From-SVN: r39574
2001-02-10 00:58:16 +00:00
Phil Edwards 58f60b5c91 ios_base_members_static.cc: Swap order of tests.
2001-02-05  Phil Edwards  <pme@sources.redhat.com>

	* testsuite/27_io/ios_base_members_static.cc:  Swap order of tests.

From-SVN: r39466
2001-02-05 22:08:47 +00:00
Gabriel Dos Reis 0ba434e0f8 default.exp: New file.
* testsuite/config/default.exp: New file.
        * testsuite/config: New directory.

From-SVN: r39447
2001-02-05 02:48:17 +00:00
Benjamin Kosnik 0214010c60 Preliminary named locales.
2001-01-29  Benjamin Kosnik  <bkoz@redhat.com>

	Preliminary named locales.
	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): New macro.
	* aclocal.m4: Regenerate.
	* configure.in: Use it.
	* configure: Regerate.
	* src/Makefile.am (sources): Add c++locale.cc.
	(build_headers): Add c++locale.h.
	* src/Makefile.in: Regenerate.
	* config/c_locale_gnu.h: New file.
	* config/c_locale_gnu.cc: New file. Non-inline member functions
	for named locales, gnu-specific.
	* config/c_locale_generic.h: New file.
	* config/c_locale_generic.cc: New file. Non-inline member
	functions for named locales, generic version.
	* docs/html/configopts.html: Add documentation on new options.

	* include/bits/locale_facets.h (class _Messages): Remove.
	(class _Moneypunct): Remove.
	* src/locale-inst.cc: Remove.

	* include/bits/locale_facets.h (class _Collate): Remove.
	* src/locale-inst.cc (std): Remove.
	* src/locale.cc: And here.

	* include/bits/localefwd.h (locale::_M_coalesce): New
	function. Correctly put together multi-name locales.
	(_Impl(const _Impl&, category, size_t)): Remove.

	* include/bits/localefwd.h (locale::_Impl): Remove _M_construct_*
	member functions.
	(_M_normalize_category_names): Remove.
	(_M_replace_categories): Fix.

	* src/localename.cc (locale::_Impl::_M_construct_collate): Remove.
	(locale::_Impl::_M_construct_ctype): Remove.
	(locale::_Impl::_M_construct_monetary): Remove.
	(locale::_Impl::_M_construct_numeric): Remove.
	(locale::_Impl::_M_construct_time): Remove.
	(locale::_Impl::_M_construct_messages): Remove.

	* include/bits/locale_facets.h (_Bad_use_facet): Remove.
	(_Use_facet_failure_handle): Remove.
	* src/locale.cc: Remove definitions.
	* src/locale-inst.cc: And here.

	* testsuite/22_locale/ctor_copy_dtor.cc (test01): Fixup. Add tests.

	* src/localename.cc (locale::facet::_S_create_c_locale): Properly
	create and error-check underlying locale object.
	(locale::facet::_S_destroy_c_locale): Add, take care of properly
	tearing down underlying locale object.
	* include/bits/localefwd.h (locale::facet): Declare.
	* testsuite/22_locale/members.cc: Don't test "fr_FR" locale for
	correctness, as glibc apparently has incorrect info in it. Test
	with it when it works again.....

	* include/bits/localefwd.h (locale::_Impl::__vec_string):
	Remove. Number of categories is fixed at six, so just simplify and
	make this an array of strings.
	(locale::_Impl::_M_has_name): Remove.
	(locale::_Impl::_M_name): Remove.
	(locale::_Impl::_M_category_names): Turns into...
	(locale::_Impl::_M_names): ...this.
	(locale::_Impl::_M_has_same_name()): New function.
	* src/localename.cc (locale::_Impl::~_Impl()): Remove here.
	(locale::_Impl::_Impl(size_t __refs, string __str)): Simplify
	signature.
	* src/locale.cc (locale::name()): Construct mangled name
	accurately reflecting combined locale categories.

	* src/locale.cc (locale::classic()): Don't initialize here.
	* src/localename.cc (locale::_Impl::_Impl(size_t __num, size_t
	__refs, bool __has_name, string __str): Do it here.

	* include/bits/localefwd.h: _S_categories_num to
	_S_num_categories. _S_facets_num to _S_num_facets.
	(locale:🆔:id()): Explicitly set _M_index to zero.
	* src/locale.cc: Same.

	* src/locale.cc: (locale::locale(const char*)): Construct named
	locales uniquely.

	* src/locale.cc: Remove numpunct_byname ctors.
	* testsuite/22_locale/numpunct_byname.cc: New file.
	* testsuite/22_locale/numpunct.cc: New file.

	* include/bits/localefwd.h (class locale): Change data members to
	protected, from private.
	(_Impl::_M_get_c_locale): Add member function.
	(locale::facet::_M_get_global_impl()): Add member function.
	* include/bits/locale_facets.h (numpunct::_M_init): Change to take
	a __c_locale pointer.
	(numpunct::numpunct( __c_locale*, size_t)): Add additonal ctor for
	named locales.
	* testsuite/22_locale/members.cc: New file, test name and combine.

	* include/bits/locale_facets.h (class numpunct): Remove class
	_Punct and _Numpunct. Rewrite class numpunct to be correct for
	named locales.
	* include/bits/localefwd.h (locale::_Imp::_M_c_locale): Add.
	* src/localename.cc (_Impl::~_Impl()): Call __frelocale.
	(_Imp::_Impl(size_t, size_t, bool, string)) Initialize _M_c_locale.
	* src/locale-inst.cc: Remove _Numpunct, _Punct instantiations.
	* testsuite/22_locale/numpunct_char_members.cc: New file.

From-SVN: r39347
2001-01-30 09:18:51 +00:00
Gabriel Dos Reis 4870f47246 README: Add more comment.
2001-01-28  Gabriel Dos Reis  <gdr@codesourcery.com>

        * testsuite/README: Add more comment.
        * testsuite/lib/libstdc++.exp: Tweak comment.

From-SVN: r39321
2001-01-28 15:13:08 +00:00
Loren J. Rittle 31e1e0a652 inserters_extractors.cc: Remove explicit reference to 'testsuite/'.
2001-01-25  Loren J. Rittle  <ljrittle@acm.org>

        * testsuite/21_strings/inserters_extractors.cc: Remove
        explicit reference to 'testsuite/'.

From-SVN: r39292
2001-01-26 23:31:57 +00:00
Gabriel Dos Reis db353c2c69 *.cc: Remove explicit reference to 'testsuite/' in testcases.
* testsuite/27_io/*.cc: Remove explicit reference to 'testsuite/'
       in testcases.  Prepare for the DejaGnu based framework.
       * mkcheck.in: Adjust call to tests_flags.  Don't mmkdir testsuite
       directory -- it is now mkcheck working directory.
       * tests_flags.in: Remove reference to $(top_srcdir).  Use
       ${SRC_DIR} instead.
       * Makefile.am (check, check-install): Change mkcheck invocation
       logic.
       * Makefile.in: Regenerate.

From-SVN: r39255
2001-01-25 04:09:22 +00:00
Gabriel Dos Reis 152353171a libstdc++.exp: Improve.
* testsuite/lib/libstdc++.exp: Improve.  Add support for @xxx#
        keyword capability.

        * testsuite/README: Add comment.

From-SVN: r39192
2001-01-23 02:48:27 +00:00
Gabriel Dos Reis 0109cb7553 tests.exp: New file.
2001-01-20  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>

	* testsuite/libstdc++.tests/tests.exp: New file.
	* testsuite/lib/libstdc++.exp: Itou.
	* testsuite/README: Itou.

From-SVN: r39149
2001-01-20 05:09:08 +00:00
Gabriel Dos Reis db4a7a8acf 17_intro: Prepare testcases for new style DejaGnu framework.
2001-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>

	* testsuite/17_intro: Prepare testcases for new style DejaGnu
	framework.

From-SVN: r39124
2001-01-19 02:52:27 +00:00
Benjamin Kosnik 824a91091e mkcheck.in: Construct file names that match $objdir structure.
2001-01-17  Loren J. Rittle  <ljrittle@acm.org>

        * mkcheck.in: Construct file names that match $objdir structure.
        * testsuite/27_io/filebuf_members-1.txt: New file.
        * testsuite/27_io/ifstream_members-1.txt: New file.
        * testsuite/27_io/ostream_inserter_char-1.txt: New file.

	* testsuite/27_io/ios_base_members_static.cc (test02): Add test.
	* testsuite/27_io/ios_base_members_static-1.tst: Add expected output.

From-SVN: r39110
2001-01-18 07:24:16 +00:00
Peter Schmid 86b4d21106 istream_sentry.cc (test02): Fix.
2001-01-17  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

	* testsuite/27_io/istream_sentry.cc (test02): Fix.

From-SVN: r39089
2001-01-17 08:30:25 +00:00
Benjamin Kosnik 13187a454d C++STYLE (classname): Add more existing and stylish patterns.
2001-01-16  Benjamin Kosnik  <bkoz@redhat.com>

	* docs/html/17_intro/C++STYLE (classname): Add more existing
	and stylish patterns.

	libstdc++/944
	* include/bits/istream.tcc (istream::sentry::sentry()): Set
	failbit if the state of the stream is not good.
	* testsuite/27_io/istream_sentry.cc (test02): Add test.
	* testsuite/27_io/istream_manip.cc (test01): Modify.

	libstdc++/1019
	reported by Paolo Carlini <pcarlini@unitus.it>
	* include/bits/istream.tcc (operator>>(istream&, string&)): Fix.
	* testsuite/21_strings/inserters_extractors.cc (test08): Add test.

	libstdc++/1057
	* include/bits/std_streambuf.h (setp): Set _M_buf_size correctly.
	* include/bits/streambuf.tcc (xsputn): Remove outside if clause.
	(xsgetn): Same. Simplify.
	* testsuite/27_io/streambuf.cc (test04): Add testcases.

	reported by Larry Evans <jcampbell3@prodigy.net>
	* include/bits/streambuf.tcc (streambuf::xsputn): Just check for
	equality with eof on returned value from overflow.

From-SVN: r39059
2001-01-16 07:55:26 +00:00
Benjamin Kosnik e9049f5741 std_cwctype.h: Include std_cwchar.h for wint_t.
2001-01-03  Benjamin Kosnik  <bkoz@redhat.com>

	* include/c_std/bits/std_cwctype.h: Include std_cwchar.h for wint_t.
	* testsuite/17_intro/header_cwctype.cc (main): New file.

	* src/Makefile.am (base_headers): Change.
	* include/bits/std_string.h: And here.
	* include/bits/string.tcc: Tweaks, move to...
	* include/bits/basic_string.tcc: ...Here.
	* src/string-inst.cc: Simplify, just instantiate the whole class,
	not member-by-member.

From-SVN: r38693
2001-01-04 21:57:30 +00:00
Benjamin Kosnik 7b33122850 std_cwchar.h: Same.
2001-01-01  Benjamin Kosnik  <bkoz@fillmore.redhat.com>

	* include/c_std/bits/std_cwchar.h: Same.
	* testsuite/17_intro/header_cwchar.cc: Same.
	* include/c_std/bits/std_ctime.h: Same.
	* testsuite/17_intro/header_ctime.cc: Same.
	* include/c_std/bits/std_cstdlib.h: Same.
	Clean up undefs, make consistent with cwchar and cmath, etc.
	* testsuite/17_intro/header_cstdlib.cc: Same.
	* include/c_std/bits/std_cstdio.h: Same here.
	* testsuite/17_intro/header_cstring.cc: Same.
	* include/c_std/bits/std_cstring.h: Include std_cstddef.h for size_t.
	* testsuite/17_intro/header_cstring.cc: New file. Check for
	size_t in namespace std.

	* include/c_std/bits/std_cwchar.h: Explicit checks for mbstate_t.
	* acconfig.h (HAVE_MBSTATE_T): Add.
	* config.h.in: Regenerate.
	* acinclude.m4(GLIBCPP_CHECK_WCHAR_T_SUPPORT): Always test for
	mbstate_t.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* testsuite/17_intro/headers_c++.cc: New file.
	* testsuite/17_intro/headers_c.cc: Small changes.

From-SVN: r38614
2001-01-02 07:38:47 +00:00
Joseph Myers a9ab8db153 acinclude.m4, [...]: Change sourceware.cygnus.com and sources.redhat.com URLs for libstdc++ web...
* acinclude.m4, configure.in, mkcheck.in,
	testsuite/21_strings/ctor_copy_dtor.cc,
	testsuite/21_strings/inserters_extractors.cc,
	testsuite/23_containers/map_operators.cc,
	testsuite/23_containers/vector_element_access.cc,
	testsuite/25_algorithms/lower_bound.cc,
	testsuite/27_io/ifstream_members.cc,
	testsuite/27_io/istream_extractor_arith.cc,
	testsuite/27_io/istream_unformatted.cc,
	testsuite/27_io/ofstream_members.cc,
	testsuite/27_io/ostream_inserter_char.cc,
	testsuite/27_io/ostream_inserter_other.cc,
	testsuite/27_io/ostream_manip.cc, testsuite/27_io/streambuf.cc:
	Change sourceware.cygnus.com and sources.redhat.com URLs for
	libstdc++ web pages and list archives to point to gcc.gnu.org
	* aclocal.m4, configure: Regenerate.

From-SVN: r38428
2000-12-21 22:08:39 +00:00
Benjamin Kosnik 713c16f860 [multiple changes]
2000-12-20  Benjamin Kosnik  <bkoz@fillmore.constant.com>

	* testsuite/17_intro/headers_c.cc (main): New file.

	* acinclude.m4 (SECTION_FLAGS): Only set if --enable-debug is not
	passed.
	(OPT_LDFLAGS): And here.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

2000-12-19  Curtis Janssen  <cljanss@ca.sandia.gov>

	* src/ios.cc (ios_base::_M_grow_words(int ix)): Fix libstdc++/1089.
	* testsuite/27_io/ios_base_storage.cc (test01): New file.

From-SVN: r38392
2000-12-20 08:24:40 +00:00
Benjamin Kosnik 205c6f1709 [multiple changes]
2000-12-19  Benjamin Kosnik  <bkoz@fillmore.constant.com>

	* configure.in: Don't turn on long long by default.
	* configure: Regenerate.
	* include/c/bits/std_cstdio.h: Remove c++config.h include.
	* src/locale.cc: Formatting tweaks.
	* testsuite/22_locale/ctype.cc (char<unsigned char>): Provide
	member functions.

2000-12-19  Loren J. Rittle  <ljrittle@acm.org>

        * testsuite/22_locale/ctype.cc (test01): Correct ~ operator usage.

From-SVN: r38388
2000-12-19 22:55:07 +00:00
Benjamin Kosnik 62f4333a68 ctype_inline.h (is): Same.
2000-12-19  Benjamin Kosnik  <bkoz@fillmore.redhat.com>

	* config/os/solaris/solaris2.5/bits/ctype_inline.h (is): Same.
	* config/os/solaris/solaris2.6/bits/ctype_inline.h (is): Same.
	* config/os/solaris/solaris2.7/bits/ctype_inline.h (is): Same.
	* config/os/newlib/bits/ctype_inline.h (is): Same.
	* config/os/irix/bits/ctype_inline.h (is): Same.
	* config/os/bsd/netbsd/bits/ctype_inline.h (is): Same.
	* config/os/bsd/freebsd/bits/ctype_inline.h (is): Same.
	* config/os/aix/bits/ctype_inline.h (is): Same.
	* config/os/gnu-linux/bits/ctype_inline.h (is): Revert.
	* config/os/generic/bits/ctype_inline.h (is): Non-table based
	implementation.

	* testsuite/22_locale/ctype_char_members.cc (test01): Use binary
	operator correctly.
	(test01): Check 'A' for alnum, upper, alpha.

From-SVN: r38385
2000-12-19 19:49:00 +00:00
Benjamin Kosnik d9ab8adb37 ctype_base.h (ctype_base): Consistency with linux.
2000-12-13  Benjamin Kosnik  <bkoz@redhat.com>

	* config/os/generic/bits/ctype_base.h (ctype_base): Consistency
	with linux.
	* config/os/generic/bits/ctype_inline.h (is): Same.
	* config/os/solaris/solaris2.5/bits/ctype_inline.h (is): Same.
	* config/os/solaris/solaris2.5/bits/ctype_base.h: Same.
	* config/os/solaris/solaris2.6/bits/ctype_inline.h (is): Same.
	* config/os/solaris/solaris2.6/bits/ctype_base.h: Same.
	* config/os/solaris/solaris2.7/bits/ctype_inline.h (is): Same.
	* config/os/solaris/solaris2.7/bits/ctype_base.h: Same.
	* config/os/irix/bits/ctype_inline.h (is): Same.
	* config/os/irix/bits/ctype_base.h (ctype_base): Same.
	* config/os/aix/bits/ctype_inline.h (is): Same.
	* config/os/aix/bits/ctype_base.h (ctype_base): Same.
	* config/os/bsd/netbsd/bits/ctype_inline.h (is): Same.
	* config/os/bsd/netbsd/bits/ctype_base.h (ctype_base): Same.
	* config/os/bsd/freebsd/bits/ctype_base.h (ctype_base): Same.
	* config/os/bsd/freebsd/bits/ctype_inline.h (is): Same.
	* config/os/newlib/bits/ctype_inline.h (is): Same.
	* config/os/newlib/bits/ctype_base.h (ctype_base): Same.

	* testsuite/22_locale/ctype_char_members.cc (test01): Add tests, fix.
	* testsuite/22_locale/ctype.cc (test01): Add tests for
	ctype_base::mask bitmask features.
	* src/locale.cc: Define const static data for ctype_base.
	* config/os/gnu-linux/bits/ctype_base.h (ctype_base): Make
	ctype_base::mask type an integer type, not an enum.
	* config/os/gnu-linux/bits/ctype_inline.h (is): Implement correctly.
	* include/bits/locale_facets.h: Tweaks.

	* include/bits/ios_base.h: Formatting tweaks.

	* docs/html/17_intro/C++STYLE: Add.

From-SVN: r38243
2000-12-14 07:20:37 +00:00
Jason Merrill 913ac9fa8e auto_ptr.cc (test07): Remove test that tries to copy-initialize an auto_ptr<Base> from an...
* testsuite/20_util/auto_ptr.cc (test07): Remove test that tries
        to copy-initialize an auto_ptr<Base> from an auto_ptr<Derived>; it
        isn't supposed to work anymore.

From-SVN: r38171
2000-12-10 06:23:50 -05:00
Benjamin Kosnik 167ed88f7a locale_facets.h (ctype): Remove _Ctype_nois and _Ctype and replace with common __ctype_abstract_base.
2000-12-06  Benjamin Kosnik  <bkoz@kredhat.com>

	* include/bits/locale_facets.h (ctype): Remove _Ctype_nois and
	_Ctype and replace with common __ctype_abstract_base.
	(ctype<wchar_t>::_M_convert_to_wmask): Move to locale.cc.
	* config/os/gnu-linux/bits/ctype_noninline.h (ctype<char>::ctype):
	And here.
	* config/os/solaris/solaris2.7/bits/ctype_noninline.h (ctype): Same.
	* config/os/solaris/solaris2.6/bits/ctype_noninline.h (ctype): Same.
	* config/os/solaris/solaris2.5/bits/ctype_noninline.h (ctype): Same.
	* config/os/newlib/bits/ctype_noninline.h (ctype): Same.
	* config/os/irix/bits/ctype_noninline.h (ctype): Same.
	* config/os/hpux/bits/ctype_noninline.h (ctype): Same.
	* config/os/generic/bits/ctype_noninline.h (ctype): Same.
	* config/os/aix/bits/ctype_noninline.h (ctype): Same.
	* config/os/bsd/netbsd/bits/ctype_noninline.h (ctype): Same.
	* config/os/bsd/freebsd/bits/ctype_noninline.h (ctype): Same.
	* src/locale-inst.cc: Clean instantiations.
	* src/locale.cc (ctype<char>): Add definitions here.
	(ctype<wchar_t>::_M_wmask): Move definitions here.

	* config/os/generic/bits/ctype_inline.h (ctype<char>::is):
	Implement in a generic way, with only "C" functionality and no
	knowlege of the target os.
	* config/os/generic/bits/os_defines.h: Change comments to C++ style.
	* testsuite/22_locale/ctype_char_members.cc (test01): Add tests.

	* include/bits/codecvt.h (ctype_byname): Remove specializations,
	as not required.
	* include/bits/localefwd.h (codecvt_byname): And here.
	* src/codecvt.cc: Remove codecvt_byname specializations.

	* include/c/bits/std_cstdio.h: Include c++config.h.

From-SVN: r38100
2000-12-07 06:44:49 +00:00
Benjamin Kosnik 8ce10512a9 tests_flags.in (LTCXX): Change CXX_FLAG to CXXFLAGS.
2000-11-27  Benjamin Kosnik  <bkoz@redhat.com>

	* tests_flags.in (LTCXX): Change CXX_FLAG to CXXFLAGS.

	* testsuite/22_locale/ctor_copy_dtor.cc: Adjust formatting.
	* testsuite/27_io/istream_extractor_arith.cc (test11): New
	testcase, based on libstdc++/90.

From-SVN: r37813
2000-11-28 09:34:08 +00:00
Benjamin Kosnik 158227a66a istream_unformatted.cc (test05): Fixup.
2000-11-26  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/27_io/istream_unformatted.cc (test05): Fixup.

From-SVN: r37769
2000-11-27 03:02:00 +00:00
Joseph Myers 7ee9826b89 acinclude.m4: Change C9X references to refer to C99.
* acinclude.m4: Change C9X references to refer to C99.
	* aclocal.m4, configure: Regenerate.
	* config/os/gnu-linux/bits/os_defines.h, src/complex.cc,
	testsuite/22_locale/codecvt_wchar_t_char.cc,
	include/bits/stl_config.h, include/c/bits/std_cwchar.h,
	libmath/mathconf.h: Change C9X references to refer to C99.

From-SVN: r37743
2000-11-25 19:36:53 +00:00
Benjamin Kosnik 35a63b9486 codecvt_wchar_t_char.cc (main): Add _GLIBCPP_USE_WCHAR_T guards.
2000-11-24  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* testsuite/22_locale/codecvt_wchar_t_char.cc (main): Add
	_GLIBCPP_USE_WCHAR_T guards.

	* configure.in (AC_OUTPUT_COMMANDS): Remove, just run scripts as
	is, so that checks for existence of generated files actually work.
	* configure: Regenerate.

From-SVN: r37723
2000-11-24 23:48:45 +00:00
Benjamin Kosnik cd9c4fee8e mkcheck.in (explanation): Don't paste output of passing compiles into log file.
2000-11-20  Benjamin Kosnik  <bkoz@redhat.com>

	* mkcheck.in (explanation): Don't paste output of passing compiles
	into log file.

	* testsuite/23_containers/vector_ctor.cc (test02): Fix thinko.

From-SVN: r37604
2000-11-21 06:17:15 +00:00
Benjamin Kosnik 5e90dd7193 std_complex.h: Tweaks, include cmath for abs overloads.
2000-11-20  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/std_complex.h: Tweaks, include cmath for abs overloads.
	* src/complex.cc: Remove cmath include, formatting tweaks, remove
	dead code.
	* include/c/bits/std_cmath.h: Formatting tweaks.
	* testsuite/26_numerics/complex_value.cc: New file, for catching
	bits gleaned from libstdc++/106.

	* testsuite/23_containers/vector_ctor.cc (test02): Add test from
	libstdc++/102.

From-SVN: r37591
2000-11-20 21:13:45 +00:00
Theodore Papadopoulo c55d267039 stl_tree.h: Overload operators == and != to be able to handle the case...
2000-11-17  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>

	* include/bits/stl_tree.h: Overload operators == and != to be able
	to handle the case (const_iterator,iterator) and
	(iterator,const_iterator), thus fixing libstdc++/737 and the like.
	* testsuite/23_containers/map_operators.cc (test02): New tests.

From-SVN: r37532
2000-11-17 22:59:03 +00:00
Mark Mitchell ce881b7fe4 codecvt_unicode_char.cc: Don't run it if not _GLIBCPP_USE_WCHAR_T.
* testsuite/22_locale/codecvt_unicode_char.cc: Don't run it
	if not _GLIBCPP_USE_WCHAR_T.
	* testsuite/22_locale/codecvt_unicode_wchar_t.cc: Likewise.
	* testsuite/22_locale/ctor_copy_dtor.cc: Likewise.
	* testsuite/22_locale/ctype_wchar_t_members.cc: Likewise.

From-SVN: r37216
2000-11-03 02:28:07 +00:00
Benjamin Kosnik 4bc950092b [multiple changes]
2000-10-30  Benjamin Kosnik  <bkoz@redhat.com>

	* src/complex_io.cc : Remove ancient defines.
	* config/os/gnu-linux/bits/os_defines.h: Add defines.
	* libsupc++/tinfo2.cc: Change to cstddef.

	* include/bits/codecvt.h: Add include of c++config.h, so that
	__USE_GNU gets defined. (Important for alpha.)

	* include/c/bits/std_cwctype.h: Same.
	* include/c/bits/std_ctime.h: And here.
	* include/c/bits/std_cstdarg.h: Same.
	* include/c/bits/std_csignal.h: Same.
	* include/c/bits/std_csetjmp.h: Same.
	* include/c/bits/std_clocale.h: Same.
	* include/c/bits/std_climits.h: Touch.
	* include/c/bits/std_cfloat.h: Same.
	* include/c/bits/std_cerrno.h: Same.
	* include/c/bits/std_cwchar.h: Same.
	* include/c/bits/std_cassert.h: Same.
	* include/c/bits/std_cctype.h: Same.
	* include/c/bits/std_cstddef.h: And here.
	* include/c/bits/std_cstdlib.h: And here.
	* include/c/bits/std_cstdio.h: Same.
	* include/c/bits/std_cstring.h: Add names to namespace std::.

	* include/bits/c++config (_GNU_SOURCE): Move linux-specific macros
	from here...
	(_ISOC99_SOURCE): And this one....
	* config/os/gnu-linux/bits/os_defines.h: ...to here.

	* include/bits/codecvt.h (codecvt<_InternT, _ExternT,
	__enc_traits>::do_in): Don't cast to const, this is a bug in glibc
	prior to 2.2.
	(codecvt<_InternT, _ExternT, __enc_traits>::do_out): Same.
	* include/c/bits/std_cwchar.h: Add using declarations for mbstate_t.

2000-10-30  Steven King  <sxking@uswest.net>

	* include/bits/codecvt.h: Add cast.
	* include/c_std/stdio.h: Re-add printf using declaration.
	* include/c_std/bits/std_cstdio.h: Same
	* testsuite/22_locale/codecvt_wchar_t_char.cc: Fixup testsuite.
	* testsuite/22_locale/ctor_copy_dtor.cc: Same.
	* testsuite/22_locale/facet.cc: Same.
	* testsuite/22_locale/global_templates.cc: Same.
	* testsuite/22_locale/operators.cc: Same.
	* testsuite/22_locale/static_members.cc: Same.
	* testsuite/26_numerics/c_math.cc: Same.
	* testsuite/26_numerics/complex_inserters_extractors.cc: Same.
	* testsuite/27_io/fpos.cc: Same.
	* testsuite/27_io/istream_extractor_arith.cc: Same.
	* testsuite/27_io/istream_unformatted.cc: Same.
	* testsuite/27_io/ostream_inserter_arith.cc: Same.
	* testsuite/27_io/streambuf.cc: Same.

From-SVN: r37149
2000-10-31 01:26:06 +00:00
Benjamin Kosnik 9aa1d5ac5e stl_pair.h (make_pair): Add LWG solution.
2000-10-24  Benjamin Kosnik  <bkoz@redhat.com>

        * include/bits/stl_pair.h (make_pair): Add LWG solution.

        * testsuite/21_strings/compare.cc (test01): Inject namespace std
	into the mix.

	* mkcheck.in (MAX_MEM_USAGE): Bump up to 3072. Strangely enough,
	this works.

From-SVN: r37049
2000-10-25 12:48:34 +00:00
Benjamin Kosnik dcc41852e1 compare.cc (test01): Add using declarations.
2000-10-23  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/21_strings/compare.cc (test01): Add using declarations.

	* include/c_std/bits/std_cerrno.h: And here.
	* include/c_std/bits/std_cassert.h: Tweaks.

	* mkcheck.in: Simplify.

	* acinclude.m4 (GLIBCPP_ENABLE_LONG_DOUBLE): Simplify.
	(GLIBCPP_ENABLE_LONG_LONG): Same.
	* aclocal.m4: Regenerate.

	* src/Makefile.am (c_shadow_headers): Add features.h,
	bits/wrap_features.h.
	* src/Makefile.in: Regenerate.
	* include/c_std/features.h: New file.
	* include/c_std/bits/wrap_features.h (_CPP_WRAP_FEATURES_H): New
	file. Need to have c++config.h included before this file so
	_ISOC99_SOURCE around.

	* include/c_std/sys/cdefs.h: Hack.
	* include/c_std/stdlib.h: Same, use c++config.h.
	* include/c_std/bits/std_cstdlib.h: Use _GLIBCPP_HAVE_STRTOLD.

	* include/c_std/bits/std_cassert.h: Fix.
	* include/c_std/bits/std_cerrno.h: Make consistent.

	* include/c_std/bits/std_csetjmp.h (setjmp): Unscope global
	declaration from ::_C_legacy to _C_legacy.

	* include/c_std/bits/std_cstdio.h: same with printf.
	* include/c_std/stdio.h: And here.

	* include/c_std/bits/std_cstdlib.h: abort, exit comment.
	* include/c_std/stdlib.h: Same here.

From-SVN: r37035
2000-10-24 17:00:59 +00:00
Benjamin Kosnik 6b76f569a3 [multiple changes]
2000-10-21  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* docs/links.html: Add links to defects list, standards FAQ.

	* testsuite/21_strings/ctor_copy_dtor.cc (test01): Disable tests
	with string creation that allocate huge ammounts of memory.

	* include/c/bits/std_cstddef.h: Put size_t, ptrdiff_t in
	namepace std.

2000-10-21  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>

    	* libsupc++/exception.cc: Use namespace std.
    	* libsupc++/new: DITTO.
    	* libsupc++/new_op.cc: DITTO.
    	* libsupc++/new_opnt.cc: DITTO.
    	* libsupc++/new_opv.cc: DITTO.
    	* libsupc++/new_opvnt.cc: DITTO.
    	* libsupc++/tinfo.cc: DITTO.
    	* libsupc++/tinfo.h: DITTO.
    	* libsupc++/vec.cc: DITTO.
    	* libsupc++/Makefile.am: Blank lines removal.

From-SVN: r36995
2000-10-21 16:50:29 +00:00
Benjamin Kosnik 7dc08a20ed codecvt_unicode_char.cc (test01): Adjust creation of state_type for unicode_codecvt to take into account the byte...
2000-10-19  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* testsuite/22_locale/codecvt_unicode_char.cc (test01): Adjust
	creation of state_type for unicode_codecvt to take into account
	the byte order markings. Add distinct tests for UCS-2BE and UCS-2LE.
	* testsuite/22_locale/codecvt_unicode_wchar_t.cc (test01): Same.
	* include/bits/codecvt.h (__enc_traits): Add support for encodings
	that need a byte order marker. Needed for correct unicode support.

	* src/locale.cc: Remove explicit qualification std::.
	(locale::locale(const char* __name)): Revert, as named locale
	support not finished.
	* src/localename.cc (locale::_Impl:: _Impl(size_t __numfacets,
	size_t __refs, bool __has_name = false, string __name): Move
	default argument...
	* include/bits/localefwd.h: Here.

From-SVN: r36959
2000-10-20 06:52:00 +00:00
Martin Buchholz 189244a414 * testsuite/27_io/istream_seeks.cc: Fix spelling typo. * testsuite/27_io/ostream_seeks.cc: Similarly.
From-SVN: r36919
2000-10-17 20:07:54 -06:00
Brent Verner 7c7688c76a istream.tcc: Removed test for _M_gcount < in_avail()...
2000-10-05  Brent Verner  <brent@rcfile.org>

        * bits/istream.tcc [basic_istream::get(basic_streambuf&)]: Removed
	test for _M_gcount < in_avail(), as in_avail() only reports info
	for current buffer, causing method to return at end of buffer.
	* testsuite/27_io/istream_unformatted.cc [test07()]: New test.
	* testsuite/27_io/istream_unformatted-3.txt: New file.
	* testsuite/27_io/istream_unformatted-3.tst: New file.

From-SVN: r36752
2000-10-06 07:12:32 +00:00
Brent Verner 3a1ed6a1d1 istream.tcc: Removed test for _M_gcount < in_avail()...
2000-10-03  Brent Verner  <brent@rcfile.org>

        * bits/istream.tcc [basic_istream::get(basic_streambuf&)]: Removed
	test for _M_gcount < in_avail(), as in_avail() only reports info
	for current buffer, causing method to return at end of buffer.
	* testsuite/27_io/istream_unformatted.cc [test07()]: New test.
	* testsuite/27_io/istream_unformatted-3.txt: New file.
	* testsuite/27_io/istream_unformatted-3.tst: New file.

From-SVN: r36751
2000-10-06 07:11:26 +00:00
Benjamin Kosnik 8bc603eeeb locale-inst.cc: Add time_put_byname and time_get_byname instantiations.
2000-09-18  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* src/locale-inst.cc: Add time_put_byname and
	time_get_byname instantiations.
	* bits/locale_facets.h: Correct default, private derivation to
	public derivation in _byname declarations.
	* src/locale.cc (locale::classic()): Simplify.
	* src/localename.cc (locale::_Impl:: _Impl(const _Impl& __other,
	const string& __name, category __cat, size_t __refs): Re-work for
	named locales.
	(_M_normalize_category_names): Remove.

	* testsuite/22_locale/global_templates.cc (test01): Tweaks.
	* testsuite/22_locale/ctor_copy_dtor.cc (test01): More tests.

From-SVN: r36526
2000-09-19 06:47:52 +00:00
Benjamin Kosnik d9fbca261e locale.cc (locale::locale(const char* __name)): Consolidate name setting.
2000-09-15  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

        * src/locale.cc (locale::locale(const char* __name)): Consolidate
        name setting. Add checks for NULL __name pointers. Remove calls to
        _S_initialize() as initial locale initialization can either be
        assumed, or needs to be made consistent throughout locale
        constructors.
        (locale::locale(const locale& __other, const char* __name,
        category __cat): Add checks for NULL name. Add checks for
        assignment to self.
        * src/localename.cc (locale::_Impl:: _Impl(const _Impl& __other,
        const string& __name, category __cat, size_t __refs)): Set correct
        name, has_name values.
        * testsuite/22_locale/ctor_copy_dtor.cc (test01): More tests.
        * docs/22_locale/locale.html: New file, more unfinished docs...

From-SVN: r36451
2000-09-15 22:52:52 +00:00
Benjamin Kosnik e4cc865929 locale.cc (locale::name()): Implement.
2000-09-14  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* src/locale.cc (locale::name()): Implement.
	(_Impl(size_t __numfacets, size_t __refs, bool __namep = false,
	string __name = "*")): Change signature.
	(locale::classic): Initialize the "C" locale as a named locale.
	* bits/localefwd.h (locale): Change _M_num_references to
	_M_references. Eliminate _M_cached_name_ok. Rename _M_cached_name
	to _M_name.
	* bits/localefwd.h: Tweaks.
	* src/localename.cc: Tweaks.
	* testsuite/22_locale/ctor_copy_dtor.cc (test01): Add tests.
	(test01): Fix.

	* bits/basic_string.h: Consistency check, change _M_state ->
	_M_references.

From-SVN: r36426
2000-09-15 07:06:46 +00:00
Benjamin Kosnik 8a17a7b460 static_members.cc: New file.
2000-09-13  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/static_members.cc: New file.
	* testsuite/22_locale/ctor_copy_dtor.cc: New file.
	* src/locale.cc: Minor formatting tweaks.

From-SVN: r36415
2000-09-14 19:11:14 +00:00
Benjamin Kosnik 3e80ddc742 global_templates.cc (test01): Add negative tests for use_facet.
2000-09-12  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* testsuite/22_locale/global_templates.cc (test01): Add negative
	tests for use_facet.

	* bits/localefwd.h (locale::operator()): Minor tweaks.
	* bits/locale_facets.tcc (locale::operator()): Same.
	* testsuite/22_locale/operators.cc: New file.

	* testsuite/22_locale/facet.cc (output_iterator): Remove
	gnu_input_iterator, gnu_output_iterator.

From-SVN: r36372
2000-09-12 18:50:16 +00:00
Benjamin Kosnik 5219f16233 acinclude.m4 (GLIBCPP_CHECK_GNU_MAKE): Remove test != "0".
2000-09-11  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* acinclude.m4 (GLIBCPP_CHECK_GNU_MAKE): Remove test != "0".
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	* bits/c++config (__GLIBCPP__): Update, in the hopes of making a
	snapshot release soon.
	(_GNU_SOURCE): Define this in the header files, as ISO C99 support
	is pretty much assumed.

	* testsuite/22_locale/global_templates.cc: New file. Add tests for
	use_facet and has_facet.

	* bits/codecvt.h (codecvt<_InT, _ExT, __enc_traits>::do_out):
	Modify/correct iconv signatures for glibc2.2.

From-SVN: r36344
2000-09-12 01:06:03 +00:00
Brad Garcia 3eea1aed40 000-09-07 Brad Garcia <bgarcia@laurelnetworks.com>
* bits/stl_tree.h: Make operators !=, == type safe for map, set.
	* testsuite/23_containers/set_operators.cc: New file. Should not
	compile.
	* testsuite/23_containers/map_operators.cc: New file. Ditto.

From-SVN: r36246
2000-09-07 21:07:56 +00:00
Benjamin Kosnik f133a43eab acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Force glibc_satisfactory to no...
2000-09-06  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Force glibc_satisfactory
	to no, so that libstdc++-v3's libio will be built on glibc-2.2
	systems.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* */Makefile.in: Regenerate.

	* bits/std_cwctype.h: Put in temporary hack to work around -O2 +
	glibc 2.1.x unsigned errors. Or disable -Werror by default...

	* testsuite/23_containers/vector_element_access.cc: New file.
	* bits/stl_config.h (__STL_THROW_RANGE_ERRORS): Define.

From-SVN: r36218
2000-09-07 01:02:01 +00:00
Benjamin Kosnik 0479a46292 locale_facets.tcc (_S_build_float_format): Move ...
2000-08-31  Benjamin Kosnik  <bkoz@cygnus.com>

	* bits/locale_facets.tcc (_S_build_float_format): Move ...
	* src/locale.cc: Here.
	* bits/locale_facets.tcc (num_get::_M_extract): Clean up generic
	definition. Move specialization to ...
	* src/locale.cc: Here.
	* bits/locale_facets.tcc: Move _Format_cache specializations to ...
	* src/locale.cc: Here.
	* bits/locale_facets.tcc: Move use_facet<ctype> specializations to ...
	* src/locale.cc: Here.

	* bits/std_locale.h: Note that locale_facets.tcc should be
	included here, for standards conformance. It may increase
	compile times though. For the time being, enable.
	* testsuite/22_locale/facet.cc: New file, some parts commented out
	for the time being.

	* mkcheck.in: Append total time to test summary file.

	* bits/sbuf_iter.h : Formatting tweaks.

	Clean up static const data member definitions.
	* src/locale.cc: Add definitions for all missing locale,
	locale::_Imp, and locale::id static data members.
	(ctype<char>): Add table_size define.
	(money_base): Add _S_default_pattern, uglify.
	* bits/localefwd.h: Add definitions for static members of _Count_ones.
	* bits/locale_facets.h: Tweaks.
	* bits/locale_facets.tcc: Tweaks.
	* bits/string.tcc: Add definition for npos.
	* bits/ios_base.h: Tweaks.
	* bits/ios_base.h (ios_base::Init::_M_ios_base_init): Change to
	_S_ios_base_init.
	* src/ios.cc: And here. Add _S_local_words definition.
	Add definitions for __ios_flags const static data.
	* src/codecvt.cc: Same for __enc_traits.
	* src/locale-inst.cc: Remove money_base data member definition
	here.

From-SVN: r36093
2000-09-01 08:58:07 +00:00
Benjamin Kosnik e203a9886a ctype_wchar_t_members.cc (test01): New file.
2000-08-30  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/22_locale/ctype_wchar_t_members.cc (test01): New file.

	* docs/22_locale/codecvt.html: Re-number.
	* docs/22_locale/howto.html: Add entry for ctype
	documentation. Add entry for Nathan's introduction to locales
	paper.
	* docs/22_locale/ctype.html: New file. In progress...

	* docs/22_locale/codecvt.html: Formatting cleanups.
	* src/locale.cc (ctype<wchar_t>::do_is): Fix thinko.

From-SVN: r36082
2000-08-31 01:17:53 +00:00
Benjamin Kosnik ffe9f7851e codecvt.html: Add more bits, format.
2000-08-28  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* docs/22_locale/codecvt.html: Add more bits, format.
	* bits/codecvt.h: Add copy ctor, rename types.
	* testsuite/22_locale/codecvt_unicode_char.cc: Tweak.

	* libio/iofwide.c: Tweak.

From-SVN: r36032
2000-08-29 07:57:10 +00:00
Benjamin Kosnik 985287b87c codecvt.h: Tweaks.
2000-08-23  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* bits/codecvt.h: Tweaks.
	* testsuite/22_locale/codecvt_unicode_wchar_t.cc (test01): Fix up
	initial string literals for UCS4.

From-SVN: r35936
2000-08-24 06:13:51 +00:00
Benjamin Kosnik ae658d47a4 locale-inst.cc: Add codecvt<unicode_t...
2000-08-22  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* src/locale-inst.cc: Add codecvt<unicode_t, wchar_t,
	__enc_traits> instantiations for has_facet and use_facet.
	* testsuite/22_locale/codecvt_unicode_wchar_t.cc: New file, for
	testing two-byte unicode encodings converted to four-byte UCS4
	encodings.

	* bits/codecvt.h (codecvt<__enc_traits>): Fix do_unshift.
	* testsuite/22_locale/codecvt_unicode_char.cc (test01): Add
	correct state/encoding information.

	* acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Add wcsrtombs,
	mbsrtowcs checks as codecvt<wchar_t, char, mbstate_t> needs them
	now.
	Add checks for langinfo.h, nl_langinfo function call.
	* libio/iofwide.c (_IO_fwide): Simplify, as nl_langinfo is assumed.

From-SVN: r35897
2000-08-22 23:44:23 +00:00
Benjamin Kosnik 6f322d2778 codecvt.h: Implement codecvt<wchar_t, char, mbstate_t>.
2000-08-21  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* bits/codecvt.h: Implement codecvt<wchar_t, char, mbstate_t>. Fix
	up __enc_traits template so as to be marginally useful.
	* src/codecvt.cc: And here.
	* bits/char_traits: Tweak.
	* bits/locale_facets.h: Tweak.
	* bits/locale_facets.tcc: Tweak.
	* bits/localefwd.h: Tweak.
	* src/locale-inst.cc: Add use_facet/has_facet instantiations here.
	* testsuite/22_locale/codecvt_wchar_t_cc.cc: New file.
	* testsuite/22_locale/codecvt_char_char.cc: New file.
	* testsuite/22_locale/codecvt_unicode_char.cc: New file.

From-SVN: r35871
2000-08-22 08:19:00 +00:00
Benjamin Kosnik f60ded13ef stringstream.cc (test02): Fix.
2000-08-14  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* testsuite/27_io/stringstream.cc (test02): Fix.

From-SVN: r35690
2000-08-14 21:14:19 +00:00
Brent Verner b6767a49b4 debug_assert.h: new file
2000-08-14  Brent Verner <brent@rcfile.org>

	* testsuite/debug_assert.h: new file
	* testsuite/*/*.cc: s/test\s*&=([^;]+);/VERIFY($1);/g
	changed conditional #include <c?assert.?h?> to
	unconditional #include <debug_assert.h>
	* mkcheck.in: added $SRC_DIR/testsuite to include search path
	for testsuite compile command.

From-SVN: r35688
2000-08-14 20:56:06 +00:00
Brent Verner aa1b2f7d95 debug_assert.h: new file
2000-08-14  Brent Verner <brent@rcfile.org>

	* testsuite/debug_assert.h: new file
	* testsuite/*/*.cc: s/test\s*&=([^;]+);/VERIFY($1);/g
	changed conditional #include <c?assert.?h?> to
	unconditional #include <debug_assert.h>
	* mkcheck.in: added $SRC_DIR/testsuite to include search path
	for testsuite compile command.

From-SVN: r35682
2000-08-14 19:59:26 +00:00
Levente Farkas 5312a1d9d1 std_fstream.h: Remove duplicate typdefs for ofstream and wofstream...
2000-08-14  Levente Farkas  <lfarkas@mindmaker.hu>

	* bits/std_fstream.h: Remove duplicate typdefs for ofstream and
	wofstream, filebuf, wfilebuf, fstream, wfstream.
	* bits/std_streambuf.h: Same for streambuf, wstreambuf.
	* bits/std_sstream.h: Same for stringstream and wstringstream.
	Same for stringbuf, wstringbuf, istringstream, wistringstream,
	ostringstream, wostringstream.

	* testsuite/26_numerics/valarray.cc: Add test.

From-SVN: r35681
2000-08-14 19:46:44 +00:00
Benjamin Kosnik 8901ac210e [multiple changes]
2000-08-09  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	Preliminary wchar_t implementation, with trivial encodings.
	* docs/configopts.html: Add bits about canonical configure option
	checking.

	* testsuite/27_io/iostream_objects.cc: Replace this file (which
	has newly-declared-illegal mixing of wide/narrow stdstreams) with...
	* testsuite/27_io/narrow_stream_objects.cc: New file.
	* testsuite/27_io/wide_stream_objects.cc: New file.

	* bits/fstream.tcc (underflow): Temporarily hack a solution
	together that writes from the external file to the internal
	buffers. This removes codecvt from the loop, and is incorrect.
	(_M_really_overflow): Same here.

	* testsuite/21_strings/inserters_extractors.cc (test05): Tweaks.

2000-08-08  Benjamin Kosnik  <bkoz@cygnus.com>
	    Ulrich Drepper  <drepper@cygnus.com>

	* config/c_io_libio.h: Tweak.
	* config/c_io_libio_codecvt.c: New file.
	* libio/Makefile.am: Add c_codecvt.c.
	* libio/Makefile.in: Regenerate.
	* libio/genops.c (_IO_unbuffer_write): Don't call _IO_SETBUF if the
	stream is not orientated.

	* acinclude.m4: Add config/c_io_libio_codecvt.c dummy file, until
	encoding gets fleshed out.

	* bits/basic_file.h: Add specialization declarations.
	* config/c_io_libio.cc: Add specializations for pbackfail, uflow.

	* config/c_io_libio.h: Add __c_wfile_type.
	* bits/basic_file.h: Add _M_wfile.

	* config/c_io_libio.cc (__basic_file<char>): Initialize the
	streams without setting the orientation of the underlying FILE to
	either wide or narrow.
	(__basic_file<wchar_t>)): Enable tricky wchar_t io bits.

From-SVN: r35584
2000-08-09 07:33:39 +00:00
Benjamin Kosnik 86b8dde633 Finish preliminary wchar_t implementation, with trivial encodings.
2000-08-09  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	Finish preliminary wchar_t implementation, with trivial encodings.
	* docs/configopts.html: Add bits about canonical configure option
	checking.

	* testsuite/27_io/iostream_objects.cc: Replace this file (which
	has newly-declared-illegal mixing of wide/narrow stdstreams) with...
	* testsuite/27_io/narrow_stream_objects.cc: New file.
	* testsuite/27_io/wide_stream_objects.cc: New file.

	* bits/fstream.tcc (underflow): Temporarily hack a solution
	together that writes from the external file to the internal
	buffers. This removes codecvt from the loop, and is incorrect.
	(_M_really_overflow): Same here.

	* testsuite/21_strings/inserters_extractors.cc (test05): Tweaks.

From-SVN: r35582
2000-08-09 07:28:54 +00:00
Benjamin Kosnik 99b5135954 [multiple changes]
2000-07-23  Brent Verner <brent@rcfile.org>

        * bits/istream.tcc: istream::getline(char_type*, streamsize,
	char_type) make compliant
        * testsuite/27_io/istream_unformatted.cc: test for compliant behavior

2000-07-23  Benjamin Kosnik  <bkoz@haight.constant.com>

	* acinclude.m4 (enable_cshadow_headers): Fix problems with blddir
	and srcdir used to define CSHADOW_INCLUDES..

	* configure.in: For consistency, change .sanity_warned to
	stamp-sanity-warned.

	* acinclude.m4: Tweak formatting.
	* Makefile.am (check): Call mkcheck with full pathname for build
	directory...
	(check-install): And here.
	* Makefile.in: Regenerate.

From-SVN: r35227
2000-07-24 16:34:00 +00:00
Benjamin Kosnik 11489a9595 stl-inst.cc: Change __sink_unused_warning to unsigned int for alpha.
2000-07-21  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

        * src/stl-inst.cc: Change __sink_unused_warning to unsigned int
        for alpha.

        * testsuite/26_numerics/complex_inserters_extractors.cc (testall):
        Change return type to void.
        * testsuite/25_algorithms/lower_bound.cc: Add return values.
	* testsuite/17_intro/header_ciso646.cc: Modify.
        * bits/locale_facets.h: Add return values for the generic cases.

From-SVN: r35193
2000-07-22 17:08:46 +00:00
Benjamin Kosnik 05298deabe stl-inst.cc: Change __sink_unused_warning to unsigned int for alpha.
2000-07-21  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* src/stl-inst.cc: Change __sink_unused_warning to unsigned int
	for alpha.

	* testsuite/26_numerics/complex_inserters_extractors.cc (testall):
	Change return type to void.
	* testsuite/25_algorithms/lower_bound.cc: Add return values.
	* bits/locale_facets.h: Add return values for the generic cases.

From-SVN: r35183
2000-07-22 01:27:11 +00:00
Benjamin Kosnik 7be50fd30f [multiple changes]
2000-07-20  Benjamin Kosnik  <bkoz@cygnus.com>

	* bits/std_streambuf.h: Add bits for pback buffers here, so that
	in_avail, etc can use them.
	* bits/std_fstream.h: Ditto.
	* bits/fstream.tcc: Ditto.
	* testsuite/27_io/filebuf.cc: Tweaks.
	* testsuite/27_io/filebuf-3.tst: Correct for pbackfail bits.

2000-07-19  Benjamin Kosnik  <bkoz@cygnus.com>

	* src/localename.cc: Same.
	* src/locale.cc: Same.
	* bits/localefwd.h: _M_init_facet to _M_facet_init.

	* bits/locale_facets.h: _M_init_boolnames to _M_boolnames_init.

	* bits/std_sstream.h: Change _M_init_stringbuf to _M_stringbuf_init.

	* bits/fstream.tcc: Change _M_init_filebuf to _M_filebuf_init.
	* bits/std_fstream.h: Same.

	* bits/basic_string.h: Tweaks.

From-SVN: r35157
2000-07-21 00:06:51 +00:00
Benjamin Kosnik 75555da78d [multiple changes]
2000-07-07   brent verner  <brent@rcfile.org>

	* testsuite/27_io/istream_unformatted.cc (test05): New test.

2000-07-07  Benjamin Kosnik  <bkoz@gnu.org>

	* bits/istream.tcc (istream::getline): Minor tweaks.

From-SVN: r34913
2000-07-07 21:21:57 +00:00
Benjamin Kosnik 42d18a47a0 [multiple changes]
2000-07-05  brent verner  <brent@rcfile.org>

	* testsuite/27_io/ifstream_members.cc (test01): Add tests.
	* testsuite/27_io/ofstream_members.cc (test01): Add tests.
	* config/c_io_libio.cc (__basic_file::open): Unset
	~_IO_DELETE_DONT_CLOSE.

2000-07-05  Zack Weinberg  <zack@wolery.cumb.org>

        * bits/gslice_array.h, bits/indirect_array.h, bits/mask_array.h,
        bits/slice_array.h, bits/std_valarray.h, bits/valarray_meta.h:
        Do not paste anything after 'operator' keyword.

From-SVN: r34877
2000-07-05 23:59:02 +00:00
Benjamin Kosnik f22ad9d09e [multiple changes]
2000-07-03  scott snyder  <snyder@fnal.gov>

        * bits/locale_facets.tcc (_M_extract): Only figure out the base
        from the input if base == 0.
        * testsuite/27_io/istream_extractor_arith.cc: Test reading a
        number with a leading `0' in hex mode.

	* shadow/bits/std_cmath.h: Fix typo in _GLIBCPP_HAVE_CEILL test.

        * mkinclosure: Change `==' to `=' in test.

2000-07-03  Chip Salzenberg  <chip@valinux.com>

        * src/Makefile.am (libio_headers): _G_config.h is found in srcdir,
        not builddir.
        * src/Makefile.in: Regenerate.

From-SVN: r34860
2000-07-04 02:24:54 +00:00
Benjamin Kosnik fbd5f73b3e ostream_manip.cc (test02): Add tests.
2000-06-29  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* testsuite/27_io/ostream_manip.cc (test02): Add tests.
	* bits/ostream.tcc: Tweak.
	* bits/std_fstream.h (basic_filebuf::setbuf): Reset
	_M_buf_size_opt too.
	* bits/std_streambuf.h (basic_streambuf::~basic_streambuf): Zero
	out _M_buf_size_opt.
	* bits/std_sstream.h (basic_stringbuf::_M_init_stringbuf): Set
	_M_buf_size_opt out here.
	* bits/char_traits.h (char_traits::eos): Non standard member
	function, uglify to __eos. Return char_type().
	* bits/std_ostream.h: Change.

	* testsuite/27_io/ostream_seeks.cc: New file.
	* testsuite/27_io/ostream_seeks-1.tst: New file.
	* testsuite/27_io/istream_unformatted.cc (main): Move test04 and
	test05 to...
	* testsuite/27_io/istream_seeks.cc: New file.

From-SVN: r34801
2000-06-30 02:47:19 +00:00
Scott Snyder b6a89402e3 2000-06-29 scott snyder <snyder@fnal.gov>
* bits/concept_checks.h
        (__less_then_comparable_requirement_violation): Only check for <.
	* testsuite/25_algorithms/lower_bound.cc: New file.

From-SVN: r34798
2000-06-30 00:49:12 +00:00
Benjamin Kosnik 4a2f4b128f ostream_manip.cc (test02): Add tests.
2000-06-29  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* testsuite/27_io/ostream_manip.cc (test02): Add tests.
	* bits/ostream.tcc: Tweak.
	* bits/std_fstream.h (basic_filebuf::setbuf): Reset
	_M_buf_size_opt too.
	* bits/std_streambuf.h (basic_streambuf::~basic_streambuf): Zero
	out _M_buf_size_opt.
	* bits/std_sstream.h (basic_stringbuf::_M_init_stringbuf): Zero
	_M_buf_size_opt out here.
	* bits/char_traits.h (char_traits::eos): Non standard member
	function, uglify to __eos. Return char_type().
	* bits/std_ostream.h: Change.

From-SVN: r34797
2000-06-30 00:38:09 +00:00
Benjamin Kosnik ab30ba5c23 filebuf.cc: Tweak.
2000-06-28  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* testsuite/27_io/filebuf.cc: Tweak.
	* testsuite/27_io/filebuf_members.cc (test_01): Fix.
	* config/c_io_libio.cc (__basic_file::~__basic_file): Match libio
	filebuf dtor.
	(__basic_file::basic_file): Clean, add calls similar to
	_IO_file_attach.
	(__basic_file::open): Clean.
	(__basic_file::sys_open): Clean.

	* bits/std_fstream.h: Revert.
	* bits/fstream.tcc (filebuf::close()): Revert.
	(filebuf::basic_filebuf()): Revert.

From-SVN: r34786
2000-06-29 18:20:55 +00:00
Benjamin Kosnik 644638bc02 [multiple changes]
2000-06-13  Brent Verner <brent@rcfile.org>

	* bits/string.tcc (string::rfind): Fix.
	* testsuite/21_strings/rfind.cc: New file.

2000-06-26  Anthony Williams  <anthony@anthonyw.cjb.net>

	* testsuite/21_strings/ctor_copy_dtor.cc: Fixed logic error.

2000-06-26  Branko Cibej  <branko.cibej@hermes.si>

        * testsuite/27_io/filebuf_members.cc (test_01): Fixed typos.

        * mkcheck.in: Make the *.txt and *.tst files writable after
	  copying them to $TEST_DIR.

        * testsuite/27_io/ostream_inserter_arith.cc: Renamed
          __TEST_NUMPUT_VERBOSE to TEST_NUMPUT_VERBOSE.
        Define TEST_NUMPUT_VERBOSE only if DEBUG_ASSERT.

From-SVN: r34719
2000-06-26 20:22:01 +00:00
Brent Verner 913c27bf98 string.tcc (string::rfind): Fix.
2000-06-13  Brent Verner <brent@rcfile.org>

	* bits/string.tcc (string::rfind): Fix.
	* testsuite/21_strings/rfind.cc: New file.

From-SVN: r34718
2000-06-26 20:21:34 +00:00
Benjamin Kosnik ba5fbc87e3 filebuf_members.cc: New file.
2000-06-23  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* testsuite/27_io/filebuf_members.cc: New file.
	* testsuite/27_io/filebuf_members-1.tst: New file.
	* bits/fstream.tcc (basic_filebuf::basic_filebuf(fd)): Use it.
	(basic_filebuf::close): Use it.
	* bits/std_fstream.h (basic_filebuf): Remove default arguments for
	filebuf ctor.
	(basic_filebuf): Add _M_fileno_based data member.

	* bits/std_fstream.h: Formatting tweaks.
	* testsuite/27_io/ofstream_members.cc: New file.
	* testsuite/27_io/ofstream_members-1.tst: New file.
	* testsuite/27_io/ifstream_members.cc: New file.
	* testsuite/27_io/ifstream_members-1.tst: New file.

From-SVN: r34672
2000-06-24 00:53:06 +00:00
Benjamin Kosnik b16810bfe2 std_fstream.h: Formatting tweaks.
2000-06-23  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* bits/std_fstream.h: Formatting tweaks.
	* testsuite/27_io/ofstream_members.cc: New file.
	* testsuite/27_io/ofstream_members-1.tst: New file.
	* testsuite/27_io/ifstream_members.cc: New file.
	* testsuite/27_io/ifstream_members-1.tst: New file.

From-SVN: r34671
2000-06-23 22:21:47 +00:00
Benjamin Kosnik 5f34904248 [multiple changes]
2000-06-22  Anthony Williams  <anthony@anthonyw.cjb.net>

	* testsuite/21_strings/find.cc: Patch.

2000-06-22  Benjamin Kosnik  <bkoz@soma.redhat.com>

	* acinclude.m4 (GLIBCPP_CHEC_LINKER_FEATURES): Use gcc + -x c++ as
	an easy way to get at g++ without having to link in libstdc++.

From-SVN: r34649
2000-06-22 17:27:57 +00:00
Benjamin Kosnik 60df8b81b3 [multiple changes]
2000-06-20  Anthony Williams  <anthony@anthonyw.cjb.net>

	* bits/string.tcc: Fix find.
	* testsuite/21_strings/find.cc: Patch.

2000-06-20  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* docs/install.html: Update where to get automake, where to get
	binutils.
	* acinclude.m4: Need -fno-builtins too, so gcc doesn't recognize
	builtins.

From-SVN: r34622
2000-06-20 23:14:37 +00:00
Russell Davidson 7f1063f8ec istream_extractor_arith.cc: Patch.
2000-06-19  Russell Davidson  <russell@ehess.cnrs-mrs.fr>

	* testsuite/27_io/istream_extractor_arith.cc: Patch.
	* bits/locale_factets.tcc: Tweak.

From-SVN: r34612
2000-06-20 01:24:46 +00:00
Benjamin Kosnik 7626c23703 find.cc: Empty strings can be found at all positions.
2000-06-19  Anthony Williams  <anthony@anthonyw.cjb.net>

	* testsuite/21_strings/find.cc: Empty strings can be found at all
	positions. Modified.

From-SVN: r34600
2000-06-19 20:05:48 +00:00
Branko Cibej 3ef9fe6118 20_utilities: New directory.
2000-06-19  Branko Cibej  <branko.cibej@hermes.si>

        * testsuite/20_utilities: New directory.
        * testsuite/20_utilities/auto_ptr.cc: New file.

From-SVN: r34599
2000-06-19 19:58:53 +00:00
Anthony Williams 97e0a05a9d bitset_ctor.cc: Qualify reverse wth std::.
2000-06-13  Anthony Williams  <anthony@anthonyw.cjb.net>

	* testsuite/23_containers/bitset_ctor.cc: Qualify reverse wth std::.

	* testsuite/27_io/filebuf.cc: Changed calls to
	fpos<>._M_position() to implicit calls to operator streamoff().
	* testsuite/27_io/iostream_objects.cc: Removed #include <ciso646>,
	as not needed. Revert, as part of standard.
	* testsuite/27_io/ostream_inserter_arith.cc: Replaced explicit
	call to numpunct<>._M_init() with overrides of the appropriate
	virtual functions.

	* testsuite/27_io/stringstream.cc: Removed unnecessary char *
	pointers from test01, so no need to call base(), which isn't
	guaranteed to be implemented as iterators may themselves be pointers
	* testsuite/27_io/stringbuf.cc: Removed unnecessary calls to
	_M_position() - use implicit conversion to streamoff instead

From-SVN: r34535
2000-06-13 23:48:29 +00:00
Brent Verner 96cbf48b35 streambuf.tcc: repaired _S_copy_streambufs()
2000-06-13  Brent Verner <brent@rcfile.org>

	* bits/streambuf.tcc: repaired _S_copy_streambufs()
	* testsuite/27_io/ostream_inserter_other.cc (test03): Added testcase.

From-SVN: r34528
2000-06-13 22:20:56 +00:00
Phil Edwards 5c61f0f2a8 complex_inserters_extractors.cc: Need cmath.
2000-06-08  Phil Edwards  <pme@sourceware.cygnus.com>

	* testsuite/26_numerics/complex_inserters_extractors.cc:  Need cmath.

From-SVN: r34460
2000-06-08 18:05:39 +00:00
Anthony Williams 3ce7458060 replace.cc (test01): Qualify find with std::.
2000-06-02  Anthony Williams  <anthony@anthonyw.cjb.net>

	* testsuite/21_strings/replace.cc (test01): Qualify find with std::.

From-SVN: r34363
2000-06-02 18:31:44 +00:00
Benjamin Kosnik 64cdd351dd locale_facets.tcc (num_get<char>::_M_extract): Fix signage, exponent, and scientific formatting issues.
2000-05-31  Russell Davidson  <russell@ehess.cnrs-mrs.fr>

	* bits/locale_facets.tcc (num_get<char>::_M_extract): Fix signage,
	exponent, and scientific formatting issues.
	* testsuite/27_io/istream_extractor_arith.cc (test09): Add tests.

From-SVN: r34328
2000-06-01 02:55:30 +00:00
Benjamin Kosnik 811e551b36 [multiple changes]
2000-05-17  Nathan C. Myers  <ncm@cantrip.org>

	* bits/std_cmath.h: fix sqrt(float)

2000-05-16  Loren J. Rittle  <ljrittle@acm.org>

        * bits/std_cassert.h: Use system_header pragma.
        * bits/std_cctype.h: Likewise.
        * bits/std_cerrno.h: Likewise.
        * bits/std_cfloat.h: Likewise.
        * bits/std_climits.h: Likewise.
        * bits/std_clocale.h: Likewise.
        * bits/std_cmath.h: Likewise.
        * bits/std_csetjmp.h: Likewise.
        * bits/std_csignal.h: Likewise.
        * bits/std_cstdarg.h: Likewise.
        * bits/std_cstddef.h: Likewise.
        * bits/std_cstdio.h: Likewise.
        * bits/std_cstdlib.h: Likewise.
        * bits/std_cstring.h: Likewise.
        * bits/std_ctime.h: Likewise.
        * bits/std_cwchar.h: Likewise.
        * bits/std_cwctype.h: Likewise.
        * bits/std_exception.h: Likewise.
        * bits/std_new.h: Likewise.
        * bits/std_typeinfo.h: Likewise.
        * shadow/bits/std_cassert.h: Likewise.
        * shadow/bits/std_cctype.h: Likewise.
        * shadow/bits/std_cerrno.h: Likewise.
        * shadow/bits/std_cfloat.h: Likewise.
        * shadow/bits/std_climits.h: Likewise.
        * shadow/bits/std_clocale.h: Likewise.
        * shadow/bits/std_cmath.h: Likewise.
        * shadow/bits/std_csetjmp.h: Likewise.
        * shadow/bits/std_csignal.h: Likewise.
        * shadow/bits/std_cstdarg.h: Likewise.
        * shadow/bits/std_cstddef.h: Likewise.
        * shadow/bits/std_cstdio.h: Likewise.
        * shadow/bits/std_cstdlib.h: Likewise.
        * shadow/bits/std_cstring.h: Likewise.
        * shadow/bits/std_ctime.h: Likewise.
        * shadow/bits/std_cwchar.h: Likewise.
        * shadow/bits/std_cwctype.h: Likewise.
        * shadow/bits/wrap_libio.h: Likewise.
        * shadow/bits/wrap_unistd.h: Likewise.
        * shadow/sys/cdefs.h: Likewise.

2000-05-16  Nathan C. Myers  <ncm@cantrip.org>

        It appears that gcc-2.96 supports the keyword "and" now.
	* bits/std_ciso646.h: remove.
	* std/ciso646: gut.
	* testsuite/17_intro/header_ciso646.c: enable testing.
	* src/Makefile.am, src/Makefile.in: remove mention of
	bits/std_ciso646.h

From-SVN: r33967
2000-05-17 21:46:40 +00:00
Benjamin Kosnik 991a40fcc2 std_cmath.h: Tweaks.
2000-05-10  Benjamin Kosnik  <bkoz@redhat.com>

	* bits/std_cmath.h: Tweaks.
	* math/mathconf.h: Tweaks and fixes for HP-UX 11.
	(sqrtf): Define away iff !builtin and !in <math.h>.
	(sinf): Same.
	(cosf): Same.
	(fabsf): Same.
	At some point this directory should be converted to c++, the
	autoconf tests should be run by the c++ compiler (not c), and
	<cmath> should be used instead of math.h.
	Move declaration of nan() here.
	* math/complex-stub.h (cabsl): Remove nan() declaration.

	Finish up FreeBSD4.0 support.
	* config/bsd/ctype.cc: Scope out toupper, tolower calls.
	* config/generic/ctype.cc: And here.
	* testsuite/21_strings/char_traits.cc (test02): Guard with
	_GLIBCPP_USE_WCHAR_T.

	via Phil Edwards  <pme@sourceware.cygnus.com>
	* bits/std_cctype.h: Remove _GLIBCPP_USE_NAMESPACES.
	* acconfig.h: And here.
	* acinclude.m4: Same.
	* testsuite/27_io/istream.cc: And here.
	* testsuite/27_io/ostream.cc: And here.

From-SVN: r33835
2000-05-11 02:40:34 +00:00
Benjamin Kosnik f035fae1ed Finish up FreeBSD4.0 support.
2000-05-10  Benjamin Kosnik  <bkoz@redhat.com>

	Finish up FreeBSD4.0 support.
	* config/bsd/ctype.cc: Scope out toupper, tolower calls.
	* config/generic/ctype.cc: And here.
	* testsuite/21_strings/char_traits.cc (test02): Guard with
	_GLIBCPP_USE_WCHAR_T.

From-SVN: r33831
2000-05-10 20:23:27 +00:00
Vadim Egorov c0b84d79d2 streambuf.tcc (basic_streambuf::xsgetn): Fix uflow case.
2000-05-09  Vadim Egorov  <egorovv@mailandnews.com>
	    Benjamin Kosnik  <bkoz@gnu.org>
	    Nathan Myers  <ncm@cantrip.org>
	    Dietmar Kuehl  <dietmar_kuehl@yahoo.com>

        * bits/streambuf.tcc (basic_streambuf::xsgetn): Fix uflow case.
	(basic_streambuf::xsputn): Make consistent.
	* testsuite/27_io/filebuf.cc: Add tests.

Co-Authored-By: Benjamin Kosnik <bkoz@gnu.org>
Co-Authored-By: Dietmar Kuehl <dietmar_kuehl@yahoo.com>
Co-Authored-By: Nathan Myers <ncm@cantrip.org>

From-SVN: r33794
2000-05-09 07:19:14 +00:00
Steven King 8445e42a24 2000-0508 Steven King <sxking@uswest.net>
* bits/char_traits.h: use wchar_t utility functions for
        char_traits<wchar_t> methods.
        * testsuite/21_string/char_traits.cc: New (test02): test
        char_traits<wchar_t>

2000-05-08  Benjamin Kosnik  <bkoz@cygnus.com>

	* acinclude.m4 (GLIBCPP_CXXFLAGS): Add bits for solaris2.8.

From-SVN: r33783
2000-05-09 01:15:14 +00:00
Benjamin Kosnik d207c3f7ff fstream.tcc (filebuf::_M_init_filebuf): Don't set _M_buf_size based on macro, instead use _M_buf_size_opt.
2000-05-08  Benjamin Kosnik  <bkoz@cygnus.com>

	* bits/fstream.tcc (filebuf::_M_init_filebuf): Don't set
	_M_buf_size based on macro, instead use _M_buf_size_opt.
	* bits/std_streambuf.h (basic_streambuf): Add _M_buf_size_opt.
	(basic_streambuf()): Set _M_buf_size_opt.
	* testsuite/27_io/filebuf.cc (filebuf): Use _M_buf_size_opt
	instead of _M_buf_size.

From-SVN: r33768
2000-05-08 17:23:37 +00:00
Benjamin Kosnik b2dad0e372 libstdc++-v3: New directory.
2000-04-21  Benjamin Kosnik  <bkoz@redhat.com>

	* libstdc++-v3: New directory.

From-SVN: r33317
2000-04-21 20:33:34 +00:00