Commit Graph

51 Commits

Author SHA1 Message Date
Benjamin Kosnik 54c1bf7801 Makefile.am (std_headers): Remove cXXX from list.
2002-01-04  Benjamin  Kosnik  <bkoz@redhat.com>

	* include/Makefile.am (std_headers): Remove cXXX from list.
	(c_base_srcdir): No bits subdirectory.
	(c_base_builddir): Same.
	(c_base_headers): Adjust names, add ciso646.
	(bits_headers): Remove std_xxx.h headers.
	* include/Makefile.in: Regenerate.

	* include/ext/iterator: Adjust includes.
	* include/ext/ropeimpl.h: Same.
	* include/ext/stl_hash_fun.h: Same.
	* include/ext/algorithm: Same.

	* include/backward/bvector.h: Adjust includes.
	* include/backward/vector.h: Same.
	* include/backward/strstream: Same.
	* include/backward/streambuf.h: Same.
	* include/backward/stack.h: Same.
	* include/backward/set.h: Same.
	* include/backward/queue.h: Same.
	* include/backward/multiset.h: Same.
	* include/backward/multimap.h: Same.
	* include/backward/map.h: Same.
	* include/backward/list.h: Same.
	* include/backward/iterator.h: Same.
	* include/backward/iostream.h: Same.
	* include/backward/iomanip.h: Same.
	* include/backward/fstream.h: Same.
	* include/backward/deque.h: Same.
	* include/backward/complex.h: Same.

	* include/bits/std_algorithm.h: Move to...
	* include/std/algorithm: ...here.
	* include/bits/std_iosfwd.h, std_locale.h, std_stack.h,
	std_bitset.h, std_ios.h, std_map.h, std_stdexcept.h,
	std_complex.h, std_iostream.h, std_memory.h, std_streambuf.h,
	std_deque.h, std_istream.h, std_numeric.h, std_string.h,
	std_fstream.h, std_ostream.h, std_utility.h, std_iterator.h,
	std_queue.h, std_valarray.h, std_functional.h, std_limits.h,
	std_set.h, std_vector.h, std_iomanip.h, std_list.h, std_sstream.h:
	Same.

	* include/c_std/bits/std_cassert.h: Move to...
	* include/c_std/cassert: Here.
	* include/c_std/std_cctype.h, std_cerrno.h, std_cfloat.h,
	std_climits.h, std_clocale.h, std_cmath.h, std_csetjmp.h,
	std_csignal.h, std_cstdarg.h, std_cstddef.h, std_cstdio.h,
	std_cstdlib.h, std_cstring.h, std_ctime.h, std_cwchar.h,
	std_cwctype.h: Same.
	* include/c_std/cmath: Adjust cmath.tcc include.
	* include/c_std/cstdlib: Adjust includes.
	* include/c_std/cwchar: Same.
	* include/c_std/ctime: Same.
	* include/c_std/cstring: Same.
	* include/c_std/cstdio: Same.
	* include/c_std/bits: Remove directory.

	* include/c/bits/std_cassert.h: Move to...
	* include/c/cassert: Here.
	* include/c/std_cctype.h, std_cerrno.h, std_cfloat.h,
	std_climits.h, std_clocale.h, std_cmath.h, std_csetjmp.h,
	std_csignal.h, std_cstdarg.h, std_cstddef.h, std_cstdio.h,
	std_cstdlib.h, std_cstring.h, std_ctime.h, std_cwchar.h,
	std_cwctype.h: Same.
	* include/c/bits: Remove directory.

	* include/std/cwctype: Remove.
	* include/std/cwchar: Remove.
	* include/std/ctime: Remove.
	* include/std/cstring: Remove.
	* include/std/cstdlib: Remove.
	* include/std/cstdio: Remove.
	* include/std/cstddef: Remove.
	* include/std/cstdarg: Remove.
	* include/std/csignal: Remove.
	* include/std/csetjmp: Remove.
	* include/std/cmath: Remove.
	* include/std/clocale: Remove.
	* include/std/climits: Remove.
	* include/std/ciso646: Remove.
	* include/std/cfloat: Remove.
	* include/std/cerrno: Remove.
	* include/std/cctype: Remove.
	* include/std/cassert: Remove.

	* include/bits/fpos.h: Adjust includes, removing <bits/std_xxx.h>
	files and subsituting <.xxx>
	* include/bits/valarray_array.h: Same.
	* include/bits/stl_uninitialized.h: Same.
	* include/bits/stl_alloc.h: Same.
	* include/bits/stl_algobase.h: Same.
	* include/bits/sstream.tcc: Same.
	* include/bits/pthread_allocimpl.h: Same.
	* include/bits/ostream.tcc: Same.
	* include/bits/localefwd.h: Same.
	* include/bits/locale_facets.tcc: Same.
	* include/bits/locale_facets.h: Same.
	* include/bits/istream.tcc: Same.
	* include/bits/char_traits.h: Same.
	* include/bits/boost_concept_check.h: Same.
	* include/bits/basic_file.h: Same.
	* include/std/bitset: Same.
	* include/std/complex: Same.
	* include/std/fstream: Same.
	* include/std/functional: Same.
	* include/std/ios: Same.
	* include/std/iostream: Same.
	* include/std/ostream: Same.
	* include/std/sstream: Same.
	* include/std/streambuf: Same.
	* include/std/string: Same.
	* include/std/iterator: Same.
	* include/std/valarray: Same.

	* src/ios.cc: Adjust includes.
	* src/valarray-inst.cc: Same.
	* src/string-inst.cc: Same.
	* src/stl-inst.cc: Same.
	* src/stdexcept.cc: Same.
	* src/misc-inst.cc: Same.
	* src/localename.cc: Same.
	* src/locale-inst.cc: Same.
	* src/locale.cc: Same.
	* src/limits.cc: Same.
	* src/concept-inst.cc: Same.
	* src/complex_io.cc: Same.
	* src/codecvt.cc: Same.
	* src/bitset.cc: Same.
	* src/cmath.cc: Same.

From-SVN: r48544
2002-01-04 21:27:36 +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
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
Benjamin Kosnik bf3b866e31 ctype_inline.h: Remove spaces.
2001-12-11  Benjamin Kosnik  <bkoz@redhat.com>

	* config/os/generic/bits/ctype_inline.h: Remove spaces.
	* config/os/gnu-linux/bits/ctype_noninline.h: Same.
	* include/bits/locale_facets.h (__num_base): Move double data
	members to first in class.
	* include/bits/locale_facets.tcc: Re-arrange, tweak.
	* src/locale.cc: Clean.
	*include/bits/stl_vector.h: Space typedefs.

From-SVN: r47918
2001-12-12 03:22:25 +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 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
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
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 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 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
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
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 31bfa17776 backport: basic_string.h: Qualify symbols with 'template'.
2001-07-19  Phil Edwards  <pme@sources.redhat.com>
            Mark Mitchell <mark@codesourcery.com>

	Merge from cp-parser-branch.
	* include/bits/basic_string.h:  Qualify symbols with 'template'.
	* include/bits/basic_string.tcc:  Likewise.
	* include/bits/fstream.tcc:  Likewise.
	* include/bits/istream.tcc:  Likewise.
	* include/bits/sstream.tcc:  Likewise.
	* include/bits/std_istream.h:  Likewise.
	* include/bits/stl_iterator.h:  Likewise.
	* include/bits/streambuf.tcc:  Likewise.
	* src/gen-num-limits.cc:  Add 'template<>' to specializations.
	* src/locale.cc:  Likewise.

Co-Authored-By: Mark Mitchell <mark@codesourcery.com>

From-SVN: r44167
2001-07-20 00:09:31 +00:00
Benjamin Kosnik 1f46fc8e90 localefwd.h: Format.
2001-07-03  Benjamin Kosnik  <bkoz@redhat.com>

	* include/bits/localefwd.h: Format.
	* include/bits/locale_facts.tcc (locale::combine): Adjust.
	* src/locale.cc (locale::locale::(_Impl)): Don't call
	_M_add_reference.
	(locale::facet::_M_remove_reference): Simplify.
	* src/globals.cc (locale_impl_c): New. Format.
	(locale_c): New.
	* src/ios.cc (ios_base::Init::Init): Increment _S_ios_base_init last.

From-SVN: r43747
2001-07-04 02:39:02 +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 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
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
Phil Edwards d53d7f6e61 algo.h: Use std not __STD.
2001-03-04  Phil Edwards  <pme@sources.redhat.com>

	http://gcc.gnu.org/ml/libstdc++/2001-03/msg00015.html
	* include/backward/algo.h:  Use std not __STD.  Remove unneeded
	macros and "never happens" code.  Adjust to C++STYLE guidelines.
	* include/backward/algobase.h:  Likewise.
	* include/backward/alloc.h:  Likewise.
	* include/backward/bvector.h:  Likewise.
	* include/backward/deque.h:  Likewise.
	* include/backward/function.h:  Likewise.
	* include/backward/hash_map.h:  Likewise.
	* include/backward/hash_set.h:  Likewise.
	* include/backward/hashtable.h:  Likewise.
	* include/backward/heap.h:  Likewise.
	* include/backward/iterator.h:  Likewise.
	* include/backward/list.h:  Likewise.
	* include/backward/map.h:  Likewise.
	* include/backward/multimap.h:  Likewise.
	* include/backward/multiset.h:  Likewise.
	* include/backward/pair.h:  Likewise.
	* include/backward/rope.h:  Likewise.
	* include/backward/set.h:  Likewise.
	* include/backward/slist.h:  Likewise.
	* include/backward/stack.h:  Likewise.
	* include/backward/strstream:  Likewise.
	* include/backward/tempbuf.h:  Likewise.
	* include/backward/tree.h:  Likewise.
	* include/backward/vector.h:  Likewise.
	* include/bits/basic_ios.h:  Likewise.
	* include/bits/basic_ios.tcc:  Likewise.
	* include/bits/basic_string.h:  Likewise.
	* include/bits/c++config:  Likewise.
	* include/bits/concept_checks.h:  Likewise.
	* include/bits/fpos.h:  Likewise.
	* include/bits/fstream.tcc:  Likewise.
	* include/bits/functexcept.h:  Likewise.
	* include/bits/ios_base.h:  Likewise.
	* include/bits/istream.tcc:  Likewise.
	* include/bits/mask_array.h:  Likewise.
	* include/bits/ostream.tcc:  Likewise.
	* include/bits/pthread_allocimpl.h:  Likewise.
	* include/bits/sbuf_iter.h:  Likewise.
	* include/bits/slice.h:  Likewise.
	* include/bits/slice_array.h:  Likewise.
	* include/bits/sstream.tcc:  Likewise.
	* include/bits/std_bitset.h:  Likewise.
	* include/bits/std_fstream.h:  Likewise.
	* include/bits/std_iomanip.h:  Likewise.
	* include/bits/std_ios.h:  Likewise.
	* include/bits/std_istream.h:  Likewise.
	* include/bits/std_iterator.h:  Likewise.
	* include/bits/std_memory.h:  Likewise.
	* include/bits/std_ostream.h:  Likewise.
	* include/bits/std_sstream.h:  Likewise.
	* include/bits/std_streambuf.h:  Likewise.
	* include/bits/std_string.h:  Likewise.
	* include/bits/std_valarray.h:  Likewise.
	* include/bits/stl_algo.h:  Likewise.
	* include/bits/stl_algobase.h:  Likewise.
	* include/bits/stl_alloc.h:  Likewise.
	* include/bits/stl_construct.h:  Likewise.
	* include/bits/stl_deque.h:  Likewise.
	* include/bits/stl_function.h:  Likewise.
	* include/bits/stl_heap.h:  Likewise.
	* include/bits/stl_iterator.h:  Likewise.
	* include/bits/stl_iterator_base.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_pair.h:  Likewise.
	* include/bits/stl_pthread_alloc.h:  Likewise.
	* include/bits/stl_queue.h:  Likewise.
	* include/bits/stl_raw_storage_iter.h:  Likewise.
	* include/bits/stl_relops.h:  Likewise.
	* include/bits/stl_set.h:  Likewise.
	* include/bits/stl_stack.h:  Likewise.
	* include/bits/stl_tempbuf.h:  Likewise.
	* include/bits/stl_threads.h:  Likewise.
	* include/bits/stl_tree.h:  Likewise.
	* include/bits/stl_uninitialized.h:  Likewise.
	* include/bits/stl_vector.h:  Likewise.
	* include/bits/streambuf.tcc:  Likewise.
	* include/bits/type_traits.h:  Likewise.
	* include/bits/valarray_meta.h:  Likewise.
	* include/ext/bvector:  Likewise.
	* include/ext/hash_map:  Likewise.
	* include/ext/hash_set:  Likewise.
	* include/ext/ropeimpl.h:  Likewise.
	* include/ext/slist:  Likewise.
	* include/ext/stl_bvector.h:  Likewise.
	* include/ext/stl_hash_fun.h:  Likewise.
	* include/ext/stl_hashtable.h:  Likewise.
	* include/ext/stl_rope.h:  Likewise.
	* src/complex_io.cc:  Likewise.
	* src/ios.cc:  Likewise.
	* src/locale-inst.cc:  Likewise.
	* src/locale.cc:  Likewise.
	* src/localename.cc:  Likewise.
	* src/misc-inst.cc:  Likewise.
	* src/stdexcept.cc:  Likewise.
	* src/stl-inst.cc:  Likewise.
	* src/strstream.cc:  Likewise.
	* src/valarray-inst.cc:  Likewise.

From-SVN: r40239
2001-03-04 21:34:02 +00:00
Peter Schmid 758c46c9f5 locale.cc: initialise __ret with zero
2001-03-02  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

        * src/locale.cc: initialise __ret with zero
        * src/strstream.cc:cast gptr to int_type

From-SVN: r40188
2001-03-02 17:18:54 +00:00
Benjamin Kosnik e2c094827c Add support for -fno-exceptions.
2001-02-15  Benjamin Kosnik  <bkoz@redhat.com>

	Add support for -fno-exceptions.
	* include/bits/exception_support.h: Remove.
	* include/bits/basic_string.h: Remove exception_support.
	(string::_M_check): Replace __OUTOFRANGE with __throw_out_of_range.
	(string::at): Same.
	(string::substr): Same.
	* include/bits/basic_string.tcc (string::reserve): Replace
	__LENGTHERROR with __throw_length_error.
	(string::_S_create): Same.
	(string::resize): Same.
	(string::_M_replace): Same.
	(string::replace): Same.
	(string::copy): Replace __OUTOFRANGE with __throw_out_of_range.
	(string::compare): Same.
	* include/bits/stl_vector.h: Remove exception_support.
	* src/Makefile.am (base_headers): Remove here.
	* src/Makefile.in: Regenerate.

	* include/bits/stl_range_errors.h: Remove.
	* include/bits/stl_deque.h: Use __throw_range_error.
	* include/bits/std_deque.h: Include functexcept.h.
	* include/bits/std_vector.h: Same.
	* src/Makefile.am (base_headers): Remove here.
	* src/Makefile.in: Regenerate.
	* include/ext/stl_bvector.h (class __BVECTOR): Use __throw_range_error.
	* include/ext/bvector: Remove stl_range_errors.h

	* include/bits/c++config (_GLIBCPP_USE_EXCEPTIONS): Remove.

	* include/bits/functexcept.h: New file.
	* src/functexcept.cc: New file. Definitions for function-based
	exception routines.
	* src/Makefile.am (sources): Add functexcept.cc.
	* src/Makefile.in: Regenerate.

	* include/bits/stl_config.h (__STL_USE_EXCEPTIONS): Wrap with
	__EXCEPTIONS.

	* include/bits/localefwd.h: Include functexcept.h.
	* include/bits/std_iosfwd.h: Same.

	* include/bits/basic_ios.h: Use __throw_ios_failure instead of
	throw basic_ios::failure.
	* include/bits/fstream.tcc (filebuf::_M_allocate_buffers):
	Use __throw_exception_again.
	(filebuf::_M_filebuf_init): Same.
	* include/bits/streambuf.tcc (__copy_streambufs): Same.
	* include/bits/ostream.tcc (ostream::operator<<): Same.
	* include/bits/istream.tcc (istream::operator>>): Same.
	* include/bits/basic_string.tcc (string::_M_mutate): Same.
	(string::_S_construct): Same.
	(string::_M_clone): Same.
	* include/bits/locale_facets.tcc (use_facet(const locale&)): Use
	__throw_bad_cast.
	(num_put<_CharT, _OutIter>::do_put): Use __throw_exception_again.
	* src/localename.cc (locale::_Imp::_Imp(const _Impl&, size_t): Use
	__throw_exception_again.
	(locale::_Imp::_Imp(string, size_t): Same.
	(locale::_Imp::_M_replace_facet): Use __throw_runtime_error.
	* src/locale.cc (locale::_M_coalesce): Use __throw_exception_again.
	(locale::locale(const char*)): Use __throw_runtime_error.
	(locale::classic): Use __throw_exception_again.
	(locale::_S_normalize_category): Use __throw_runtime_error.

	* src/stdexcept.cc: Remove cruft.

	* libsupc++/exception_defines.h: New file.
	* libsupc++/new_opnt.cc: Include exception_defines.h.
	* libsupc++/vec.cc: Same.
	(__cxa_vec_new2): Use __throw_exception_again.
	(__cxa_vec_new3): Same.
	(__cxa_vec_ctor): Same.
	(__cxa_vec_delete3): Same.
	(__cxa_vec_cctor): Same.
	(__cxa_vec_delete2): Same.
	(__cxa_vec_dtor): Same.
	* libsupc++/exception_support.cc: Include exception_defines.h. Only
	compile exception-handling bits if __EXCEPTIONS is defined.
	Remove old ABI support.
	* libsupc++/new_op.cc (new): Include exception_defines.h. Use
	std::__throw_bad_alloc() instead of throw bad_alloc.
	* libsupc++/Makefile.am: Add exception_defines.h.
	* libsupc++/Makefile.in: Reformat.
	* libsupc++/*: Format.

From-SVN: r39730
2001-02-16 00:44:44 +00:00
Mark Mitchell 11662aaaa5 * src/locale.cc: Remove bogus locale::id definitions.
From-SVN: r39598
2001-02-12 09:06:39 +00:00
Benjamin Kosnik 72ed283692 acinclude.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Deal with library install locations too.
2001-02-06  Benjamin Kosnik  <bkoz@fillmore.constant.com>

	* acinclude.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Deal with library
	install locations too.
	* aclocal.m4: Regeneate.
	* configure.in: Remove USE_LIBDIR.
	* configure: Regenerate.
	* src/Makefile.am (toolexecdir): Simplify, use
	glibcpp_toolexecdir, glibcpp_toolexeclibdir.
	* src/Makefile.in: Regenerate.
	* libsupc++/Makefile.am: Same.
	* libsupc++/Makefile.in: Regenerate.

	* src/Makefile.am: Just remove special rules for locale-inst.cc and
	misc-inst.cc as no longer necessary.

	Follow C++STYLE for naming non-static functions.
	* include/bits/ostream.tcc (_S_pad_char): Not static, rename to
	__pad_char.
	* include/bits/streambuf.tcc: Same.
	* include/bits/ostream.tcc: Same.
	* include/bits/istream.tcc: Same.
	* include/bits/locale_facets.tcc (_S_pad_numeric): To __pad_numeric.
	(_S_output_float): To __output_float.
	* include/bits/std_streambuf.h (_S_copy_streambufs): To
	__copy_streambufs.
	* include/bits/locale_facets.tcc (_S_build_float_format): To
	__build_float_format.
	(_S_format): To __output_integer.
	(_S_fill): To __pad.
	* src/locale.cc: Same.
	* src/misc-inst.cc: Fix formatting. Fix signature for wchar_t. Correct
	names.
	* include/bits/locale_facets.tcc (_S_group_digits): To
	__group_digits.
	* src/locale-inst.cc: Fixup names. Add use_facet instantiations
	for collate, numpunct.

From-SVN: r39508
2001-02-07 01:54:21 +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
Benjamin Kosnik d358ecd01f [multiple changes]
2001-01-05  Benjamin Kosnik  <bkoz@redhat.com>

	Fix 27_io/filebuf_members.cc
	* src/localename.cc (locale::_Impl::_Impl(const _Impl& __imp,
	const string& __name, category __cat, size_t __refs): Set
	_M_has_name with _M_name.
	* include/bits/localefwd.h (locale::operator!=): Protect member
	function call with this->.
	* src/locale.cc (locale::operator==): Make fast checks first.
	* include/bits/basic_ios.tcc (basic_ios::init): Simplify.

	* include/bits/ios_base.h (_M_synced_with_stdio): Add data member
	to ios_base::Init.
	* src/ios.cc (ios_base::Init::Init): Initialize here.
	(ios_base::sync_with_stdio): Set here.

2001-01-04  Loren J. Rittle  <ljrittle@acm.org>

        * config/c_io_stdio.cc (__basic_file<_CharT>::sys_open()): On
        systems that support it, call dup() before fdopen().

From-SVN: r38742
2001-01-06 02:44:11 +00:00
Benjamin Kosnik 0a31609b5a Attempt to make locale visible in gdb.
2000-12-22  Benjamin Kosnik  <bkoz@fillmore.redhat.com>

	Attempt to make locale visible in gdb.
	* include/bits/std_locale.h: Remove codecvt.h include.
	* include/bits/locale_facets.h: Add here, after ctype decls.
	* include/bits/codecvt.h: Remove std namespace, as assumed to be
	in std now.

	* include/bits/locale_facets.h: Consistently move generic static
	member definitions directly after generic facet declarations.
	* include/bits/locale_facets.tcc: From here.

	* src/locale.cc: Organize locale::id static definitions for
	required facets.
	* src/codecvt.cc (codecvt<char...>): Remove locale::id definition.
	(codecvt<wchar_t...>): Same.
	* src/localename: And here.

	* include/bits/localefwd.h (_Count_ones): Change _S_count to _M_count.
	Same for _M_halfcount.
	(std): make locale::_Impl protected. CHANGE BACK

From-SVN: r38449
2000-12-22 11:03:33 +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 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
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 d83c7eb40d locale.cc: Match orderings for static members.
2000-11-02  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* src/locale.cc: Match orderings for static members.
	* include/bits/fstream.tcc: Fixes for cin.

From-SVN: r37200
2000-11-02 08:05:16 +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
Benjamin Kosnik 697649eab1 Makefile.am (exception): Change exception.cc to exception_support.cc.
2000-10-18   Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* libsupc++/Makefile.am (exception): Change exception.cc to
	exception_support.cc.
	(CXXLINK): Remove bogus --tag CC.
	* libsupc++/Makefile.in: Regenerate.
	* libsupc++/exception.cc: Move to...
	* libsupc++/exception_support.cc: ...here.

	* src/Makefile.am: Remove bogus --tag CC.
	* src/Makefile.in: Regenerate.

	* include/bits/locale_facets.tcc (use_facet): Simplify.
	* include/bits/locale_facets.h (use_facet<ctype<char> >): Correct
	use_facet declaration. Replace 'const ctype<T>' with ctype<T>.
	(use_facet<ctype<wchar_t> >): Same.
	* src/locale-inst.cc: Remove explicit instantiation.
	* src/locale.cc: Correct signature here too.
	(_Bad_use_facet::what()): Correct error string.
	* include/bits/localefwd.h: Correct comment.

	* mkcheck.in (C_DIR): Change libsupc++/include to libsupc++.

From-SVN: r36943
2000-10-18 23:26:22 +00:00
Benjamin Kosnik a6863e2538 Makefile.am (LIBSUPCXX_INCLUDES): Adjust.
2000-10-10  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* Makefile.am (LIBSUPCXX_INCLUDES): Adjust.
	* libsupc++/include: Remove
	* libsupc++/include/*: Move to ...
	* libsupc++: Here.
	* libsupc++/Makefile.am (glibcppinstall_HEADERS): Install headers.
	(glibcppinstalldir): New.

	* src/Makefile.am (c_base_headers): New.
	(c_shadow_headers): New
	(c_headers): New.
	(myinstallheaders): Correct install issues.
	* src/Makefile.in: Regenerate.

	* Makefile.am (CSHADOW_INCLUDES): Simplify.
	* Makefile.in: Regenerate.
	* acinclude.m4 (GLIBCPP_ENABLE_SHADOW): Add c_include_dir.
	* aclocal.m4: Regenerate.
	* mkcheck.in (SRC_DIR): Use it.

	* include/bits/std_stdexcept.h: And here.
	* include/bits/std_ios.h: Change std_exception.h to exception.
	* src/locale.cc: And here.
	* src/locale-inst.cc: And here.

	* include/bits/valarray_array.h: And here.
	* include/bits/stl_alloc.h: And here.
	* include/bits/stl_algobase.h: And here.
	* include/bits/pthread_allocimpl.h: And here.
	* include/bits/stl_construct.h: Change to std_new.h to new.

	* include/bits/locale_facets.h: Change std_typeinfo.h to typeinfo.

	* src/Makefile.am (INCLUDES): Add LIBSUPCXX_INCLUDES.
	(headers): Remove duplicated headers.
	(std_headers): And here.
	* src/Makefile.in: Regenerate.
	* libsupc++/Makefile.am (LIBSUPCXX_INCLUDES): Remove.
	* libsupc++/Makefile.in: Regenerate.
	* Makefile.am (LIBSUPCXX_INCLUDES): Add here.
	(AM_MAKEFLAGS): And here.
	* Makefile.in: Regenerate.
	* include/bits/std_typeinfo.h: Remove.
	* include/bits/std_new.h: Remove
	* include/bits/std_exception.h: Remove.
	* std/new: Remove.
	* std/typeinfo: Remove.
	* std/exception: Remove.

	* libio/_G_config.h (__need_ptrdiff_t): Add.

	* libsupc++/include/new: Change stddef.h to cstddef.
	* libsupc++/tinfo.h: Change limits.h to climits.
	* libsupc++/pure.cc: Comment out _GNU_LIBRARY_ bits, as this
	renders the file uncompilable. Add copyright.

	* include/c_std/bits/std_cstddef.h: Don't bring wchar_t into std
	namespace, as it is a fundamental type.

From-SVN: r36833
2000-10-10 23:50:39 +00:00
Benjamin Kosnik e974e9cc80 [multiple changes]
2000-10-07  David Edelsohn  <dje@watson.ibm.com>

	* config/os/aix/bits/atomicity.h: New file.

2000-10-07  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* acinclude.m4: Remove CPU_FLAGS
	* libio/Makefile.am: Here too.
	* Makefile.am: Here too.

	* src/Makefile.am (CONFIG_INCLUDES): Remove.
	(INCLUDES): Remove CONFIG_INCLUDES.
	(cpu_headers): Remove.
	(myinstallheaders): Remove cpu_headers.
	(generated_headers): Rename to build_headers.
	(build_headers): Add atomicity.h, ctype_base.h,
	ctype_specializations.h.

	* config/os: New directory.
	* config/aix: Move to...
	* config/bsd: Move to...
	* config/generic: Move to...
	* config/gnu-linux: Move to...
	* config/irix: Move to...
	* config/newlib: Move to...
	* config/solaris: Move to...
	* config/os/*: Here.

From-SVN: r36778
2000-10-07 18:54:08 +00:00
Benjamin Kosnik 0517cb9903 [multiple changes]
2000-10-02  Steven King  <sxking@uswest.net>

        * mkcshadow: Fixed script to output proper include guard.
        * bits/char_traits.h: Cleaned up types in char_traits<char> functions.
        * libio/_G_config.h: Hacked to make work with shadow heraders.
        * shadow/*: Hacked to make shadow headers work.

2000-10-02  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	Self-compile with shadow headers.
	* acconfig.h (_GLIBCPP_USE_SHADOW_HEADERS): Define. Eventually,
	like _GLIBCPP_USE_NAMESPACES before it, this macro will die when
	it becomes the default way the library is built.
	* acinclude.m4 (GLIBCPP_ENABLE_SHADOW): New macro.
	* config/gnu-linux/bits/ctype_base.h (ctype_base): Use it.
	* config/gnu-linux/ctype.cc (ctype): Use it.

	* src/localename.cc (locale::_Impl::_M_replace_categories): Remove
	call to assert.
	* src/locale.cc: Explicitly cast mbstate_t to void* in calls to
	memset. This should not be necessary, but an ambiguous overload
	with it in.

	* shadow/bits/std_cwchar.h: Fix.
	* shadow/wchar.h: Fix.

	* config/gnu-linux/bits/ctype_base.h (ctype_base): Inject ctype
	enums into namespace std:: for ctype_base enum. Other OS types
	will have to do this as well.
	* config/gnu-linux/ctype.cc (ctype): Inject ctype data into
	namespace std, in particular __ctype_toupper, __ctype_tolower,
	__ctype_b.

	* shadow/iolibio.h: New file.
	* shadow/bits/wrap_iolibio.h: New file.
	* shadow/libioP.h: New file.
	* shadow/bits/wrap_libioP.h: New file.
	* shadow/bits/wrap_fcntl.h: New file.
	* shadow/fcntl.h: New file.
	* shadow/iconv.h: New file. Inject iconv names into the global
	namespace, unmangled for the moment.
	* shadow/bits/wrap_iconv.h: New file.
	* shadow/unistd.h: Remove. Useless.
	* shadow/bits/wrap_unistd.h: Remove.

	* src/Makefile.am: Take out machine-ansi.h, add fcntl.h unistd.h.
	* src/Makefile.in: Regenerate.

	* config/c_io_libio.h (_IO_codecvt): Change to normal C++ decl.

	* shadow/libio.h: Fix.
	* shadow/bits/wrap_libio.h: Fix.

	* shadow/bits/std_clocale.h: Remove typedef struct construct,
	which will not compile.
	* shadow/bits/std_ctime.h: Same.

	* shadow/pthread.h: New file. Put pthreads types and functions
	into global scope, which is probably not the correct long-term
	solution but has to be done at the moment before libio wrappers
	can even be started.
	* shadow/bits/wrap_pthread.h: New file.

	* bits/std_ios.h: Formatting tweak.
	* shadow/bits/std_cstdio.h: Format. Remove extraneous bits.

	* acinclude.m4 (GLIBCPP_CHECK_COMPILER_FEATURES): Add -Werror to
	tests for compiler features.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

	* config/c_io_libio.cc: Remove fcntl.h include, as SEEK_SET
	redefined.
	* libio/libioP.h: Comment out fcntl.h include.

	* shadow/math.h: Add in float and long declarations, as per ISO C9X.

	* bits/c++config: Define _ISOC99_SOURCE.

	* acinclude.m4 (GLIBCPP_ENABLE_SHADOW): Add -fno-builtins to
	CSHADOWFLAGS, as well as _ISOC99_SOURCE.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* src/Makefile.am (CSHADOW_INCLUDES): Enable, again.
	(CSHADOW_INCLUDES): Add -I$(top_srcdir)/std before shadow include dir.
	(CXXCOMPILE): Remove $(DEFS), which searches $(top_srcdir) before
	std or shadow directories.
	(LTCXXCOMPILE): Same.
	(INCLUDES): Add $(top_builddir) before $(top_srcdir).
	(AC_CXXFLAGS): Add CSHADOWFLAGS.
	* src/Makefile.in: Regenerate.

	* src/complex.cc (FCT): Change ::name to name.
	* src/complexl.cc (FCT): Same. Use _GLIBCPP_USE_LONG_LONG here.
	* src/complexf.cc (FCT): Same.

	* src/complexf.cc: Remove FCT define, as things are properly
	overloaded in the std namespace with the shadow headers.
	* src/complexl.cc: Same.
	* src/complex.cc: Same.

From-SVN: r36707
2000-10-04 05:06:32 +00:00
Benjamin Kosnik 22b9554ccd localename.cc (locale::_Imp): Remove typedefs.
2000-09-19  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* src/localename.cc (locale::_Imp) : Remove typedefs.
	* bits/localefwd.h (locale::locale(const locale& __other, _Facet*
	__f): Consistency check,, call _Imp ctor with refererence argument
	of 1.
	* bits/localefwd.h: Change _S_num_categories to
	_S_categories_num. Add new data member, _S_facets_num, which is
	the number of standard facets.

From-SVN: r36550
2000-09-20 08:19:07 +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 b75bedeb2a string.tcc (_Rep::_S_max_size): Use typename for its size_type return type.
2000-09-14  Brendan Kehoe  <brendan@zen.org>

        * bits/string.tcc (_Rep::_S_max_size): Use typename for its size_type
        return type.

        * src/Makefile.an (headers): Also install backward/fstream.h.
        * src/Makefile.in: Regenerate.

        * bits/char_traits.h (char_traits<_CharT>::get_state,
        char_traits<char>::get_state, char_traits<wchar_t>::get_state): Pass
        argument in by reference, not by value. Uglify to _S_get_state.
	(char_traits<*>::__eos): Uglify to _S_eos.
	* bits/std_ostream.h (ends(basic_ostream<_CharT, _Traits>& __os)):
	Change __eos to _S_eos.

From-SVN: r36417
2000-09-14 19:44:03 +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 bf6a611300 codecvt.html: Formatting cleanups.
2000-08-30  Benjamin Kosnik  <bkoz@redhat.com>

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

From-SVN: r36079
2000-08-30 23:13:57 +00:00
Benjamin Kosnik 8c81504d8d locale_facets.h (ctype<char>): Remove __table_type.
2000-08-30  Benjamin Kosnik  <bkoz@redhat.com>

	* bits/locale_facets.h (ctype<char>): Remove __table_type.
	Add include for bits/std_cwctype.h, for wctype_t.
	* src/locale.cc (ctype<wchar_t>): Implement.
	* config/gnu-linux/bits/ctype_base.h (ctype_base): Remove mask
	typedef, instead name enum.
	* config/gnu-linux/bits/ctype_specializations.h: Tweak.
	* config/gnu-linux/ctype.cc: Tweak.
	* testsuite/22_locale/ctype.cc:	Tweak.

	* bits/codecvt.h (__enc_traits): Mangle names.

From-SVN: r36071
2000-08-30 21:01:33 +00:00
Benjamin Kosnik 6351162329 codecvt.h: New file.
2000-08-15  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* bits/codecvt.h: New file.
	* src/codecvt.cc: New file.
	* bits/std_locale.h: Add include here.
	* src/Makefile.am (headers): Add codecvt.h
	(sources): Add codecvt.cc.
	* src/Makefile.in: Regenerate.
	* bits/locale_facets.h (codecvt): Re-implement. Rename _Codecvt to
	__codecvt_abstract_base in an attempt to point some light this way...
	Move __enc_traits and codecvt bits to codecvt.h.
	* src/locale-inst.cc: Remove codecvt<wchar_t, wchar_t, mbstate_t>
	explicit instantiation. Separate out codecvt instantations, simplify.
	* src/locale.cc: Move codecvt bits to codecvt.cc

From-SVN: r35737
2000-08-16 04:12:51 +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 088eb5a274 [multiple changes]
2000-06-12  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* bits/locale_facets.h (ctype<wchar_t>): Remove unnecessary data
	members.
	* src/locale.cc: Add cwchar include here. Remove incorrect
	definitions, and stub them out.
	* config/generic/ctype.cc (ctype): Remove ctype<wchar_t> bits.
	* config/solaris/solaris2.7/ctype.cc (ctype): Same.
	* config/solaris/solaris2.5/ctype.cc (ctype): Same.
	* config/newlib/ctype.cc: Same.
	* config/gnu-linux/ctype.cc: Same.
	* config/bsd/ctype.cc: Same.
	* config/aix/ctype.cc: Same.

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

        * config/solaris/solaris2.6/ctype.cc (do_toupper, do_tolower): Use
        towupper and towlower to convert wide characters.

From-SVN: r34511
2000-06-13 02:13:54 +00:00
Benjamin Kosnik cc4316b532 locale_facets.h: Tweak.
2000-06-02  Benjamin Kosnik  <bkoz@purist.soma.redhat.com>

	* bits/locale_facets.h: Tweak.
	* src/locale.cc (codecvt<wchar_t>): Tweak.

	* bits/locale_facets.h (_Format_cache): _S_ecks -> _S_x.
	* bits/locale_facets.tcc (num_get<char>::_M_extract): Fix for hex.

	* bits/basic_string.h: Move data member up.
	* src/string-inst.cc: Fix instantiations.
	* bits/string.tcc: Fix types.

From-SVN: r34371
2000-06-03 01:52:32 +00:00
Benjamin Kosnik 3840fa2a8f std_cwctype.h: Clean.
2000-06-01  Benjamin Kosnik  <bkoz@gnu.org>

	* bits/std_cwctype.h: Clean.
	* bits/std_cwchar.h: Clean, remove cruft.

	* acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Re-work, add bits
	for beginning iconv support.
	Remove _GLIBCPP_HAS_WCHAR_MIN_MAX, roll into _GLIBCPP_USE_WCHAR_T
	macro.
	* acconfig.h: Remove _GLIBCPP_HAS_WCHAR_MIN_MAX.
	* bits/limits_generic.h: Remove.
	* src/gen-num-limits.cc: Same.

	* src/locale.cc: Tweaks.

	* bits/char_traits.h: Tweaks.

From-SVN: r34352
2000-06-02 07:24:15 +00:00