Commit Graph

24 Commits

Author SHA1 Message Date
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
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
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
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 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 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
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
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
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