gcc/libstdc++-v3/config/os/djgpp/ctype_noninline.h

92 lines
2.9 KiB
C
Raw Normal View History

// Locale support -*- C++ -*-
stl_iterator.h (reverse_iterator::_M_current): Deuglify, should be current. 2002-01-16 Benjamin Kosnik <bkoz@redhat.com> Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de> * include/bits/stl_iterator.h (reverse_iterator::_M_current): Deuglify, should be current. (back_insert_iterator::_M_container): Deuglify, should be container. (front_insert_iterator::_M_container): Same. (insert_iterator::_M_container): Same. * testsuite/24_iterators/reverse_iterator.cc: Add check. * testsuite/24_iterators/back_insert_iterator.cc: Add check. * testsuite/24_iterators/front_insert_iterator.cc: Same. * testsuite/24_iterators/insert_iterator.cc: Same. 2002-01-16 Benjamin Kosnik <bkoz@redhat.com> * include/bits/locale_facets.h (ctype<char>::classic_table): Make static. (ctype<char>::_M_ctable): Make static, change name to _S_ctable. * config/os/gnu-linux/bits/ctype_noninline.h: Define _S_ctable. * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same. * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same. * config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same. * config/os/newlib/bits/ctype_noninline.h: Same. * config/os/irix/irix6.5/bits/ctype_noninline.h: Same. * config/os/irix/irix5.2/bits/ctype_noninline.h: Same. * config/os/hpux/bits/ctype_noninline.h: Same. * config/os/djgpp/bits/ctype_noninline.h: Same. * config/os/bsd/netbsd/bits/ctype_noninline.h: Same. * config/os/bsd/freebsd/bits/ctype_noninline.h: Same. * config/os/aix/bits/ctype_noninline.h: Same. Testcase by Dietmar K�hl via Peter Schmid * testsuite/22_locale/ctype_members_char.cc (char>): Add test for classic_table(). Co-Authored-By: Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de> From-SVN: r48938
2002-01-17 04:59:42 +01:00
// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 2, or (at your option)
// any later version.
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License along
// with this library; see the file COPYING. If not, write to the Free
// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
// As a special exception, you may use this file as part of a free software
// library without restriction. Specifically, if other files instantiate
// templates or use macros or inline functions from this file, or you compile
// this file and link it with other files to produce an executable, this
// file does not by itself cause the resulting executable to be covered by
// the GNU General Public License. This exception does not however
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
//
// ISO C++ 14882: 22.1 Locales
//
// Information as gleaned from DJGPP <ctype.h>
const ctype_base::mask*
ctype<char>::classic_table() throw()
{ return 0; }
stl_iterator.h (reverse_iterator::_M_current): Deuglify, should be current. 2002-01-16 Benjamin Kosnik <bkoz@redhat.com> Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de> * include/bits/stl_iterator.h (reverse_iterator::_M_current): Deuglify, should be current. (back_insert_iterator::_M_container): Deuglify, should be container. (front_insert_iterator::_M_container): Same. (insert_iterator::_M_container): Same. * testsuite/24_iterators/reverse_iterator.cc: Add check. * testsuite/24_iterators/back_insert_iterator.cc: Add check. * testsuite/24_iterators/front_insert_iterator.cc: Same. * testsuite/24_iterators/insert_iterator.cc: Same. 2002-01-16 Benjamin Kosnik <bkoz@redhat.com> * include/bits/locale_facets.h (ctype<char>::classic_table): Make static. (ctype<char>::_M_ctable): Make static, change name to _S_ctable. * config/os/gnu-linux/bits/ctype_noninline.h: Define _S_ctable. * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same. * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same. * config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same. * config/os/newlib/bits/ctype_noninline.h: Same. * config/os/irix/irix6.5/bits/ctype_noninline.h: Same. * config/os/irix/irix5.2/bits/ctype_noninline.h: Same. * config/os/hpux/bits/ctype_noninline.h: Same. * config/os/djgpp/bits/ctype_noninline.h: Same. * config/os/bsd/netbsd/bits/ctype_noninline.h: Same. * config/os/bsd/freebsd/bits/ctype_noninline.h: Same. * config/os/aix/bits/ctype_noninline.h: Same. Testcase by Dietmar K�hl via Peter Schmid * testsuite/22_locale/ctype_members_char.cc (char>): Add test for classic_table(). Co-Authored-By: Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de> From-SVN: r48938
2002-01-17 04:59:42 +01:00
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
: facet(__refs), _M_del(__table != 0 && __del),
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-13 00:16:35 +01:00
_M_toupper(__dj_ctype_toupper), _M_tolower(__dj_ctype_tolower),
stl_iterator.h (reverse_iterator::_M_current): Deuglify, should be current. 2002-01-16 Benjamin Kosnik <bkoz@redhat.com> Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de> * include/bits/stl_iterator.h (reverse_iterator::_M_current): Deuglify, should be current. (back_insert_iterator::_M_container): Deuglify, should be container. (front_insert_iterator::_M_container): Same. (insert_iterator::_M_container): Same. * testsuite/24_iterators/reverse_iterator.cc: Add check. * testsuite/24_iterators/back_insert_iterator.cc: Add check. * testsuite/24_iterators/front_insert_iterator.cc: Same. * testsuite/24_iterators/insert_iterator.cc: Same. 2002-01-16 Benjamin Kosnik <bkoz@redhat.com> * include/bits/locale_facets.h (ctype<char>::classic_table): Make static. (ctype<char>::_M_ctable): Make static, change name to _S_ctable. * config/os/gnu-linux/bits/ctype_noninline.h: Define _S_ctable. * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same. * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same. * config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same. * config/os/newlib/bits/ctype_noninline.h: Same. * config/os/irix/irix6.5/bits/ctype_noninline.h: Same. * config/os/irix/irix5.2/bits/ctype_noninline.h: Same. * config/os/hpux/bits/ctype_noninline.h: Same. * config/os/djgpp/bits/ctype_noninline.h: Same. * config/os/bsd/netbsd/bits/ctype_noninline.h: Same. * config/os/bsd/freebsd/bits/ctype_noninline.h: Same. * config/os/aix/bits/ctype_noninline.h: Same. Testcase by Dietmar K�hl via Peter Schmid * testsuite/22_locale/ctype_members_char.cc (char>): Add test for classic_table(). Co-Authored-By: Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de> From-SVN: r48938
2002-01-17 04:59:42 +01:00
_M_table(__table ? __table : __dj_ctype_flags)
{
memset(_M_widen, 0, sizeof(_M_widen));
_M_widen_ok = 0;
memset(_M_narrow, 0, sizeof(_M_narrow));
_M_narrow_ok = 0;
}
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-13 00:16:35 +01:00
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
: facet(__refs), _M_del(__table != 0 && __del),
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-13 00:16:35 +01:00
_M_toupper(__dj_ctype_toupper), _M_tolower(__dj_ctype_tolower),
stl_iterator.h (reverse_iterator::_M_current): Deuglify, should be current. 2002-01-16 Benjamin Kosnik <bkoz@redhat.com> Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de> * include/bits/stl_iterator.h (reverse_iterator::_M_current): Deuglify, should be current. (back_insert_iterator::_M_container): Deuglify, should be container. (front_insert_iterator::_M_container): Same. (insert_iterator::_M_container): Same. * testsuite/24_iterators/reverse_iterator.cc: Add check. * testsuite/24_iterators/back_insert_iterator.cc: Add check. * testsuite/24_iterators/front_insert_iterator.cc: Same. * testsuite/24_iterators/insert_iterator.cc: Same. 2002-01-16 Benjamin Kosnik <bkoz@redhat.com> * include/bits/locale_facets.h (ctype<char>::classic_table): Make static. (ctype<char>::_M_ctable): Make static, change name to _S_ctable. * config/os/gnu-linux/bits/ctype_noninline.h: Define _S_ctable. * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same. * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same. * config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same. * config/os/newlib/bits/ctype_noninline.h: Same. * config/os/irix/irix6.5/bits/ctype_noninline.h: Same. * config/os/irix/irix5.2/bits/ctype_noninline.h: Same. * config/os/hpux/bits/ctype_noninline.h: Same. * config/os/djgpp/bits/ctype_noninline.h: Same. * config/os/bsd/netbsd/bits/ctype_noninline.h: Same. * config/os/bsd/freebsd/bits/ctype_noninline.h: Same. * config/os/aix/bits/ctype_noninline.h: Same. Testcase by Dietmar K�hl via Peter Schmid * testsuite/22_locale/ctype_members_char.cc (char>): Add test for classic_table(). Co-Authored-By: Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de> From-SVN: r48938
2002-01-17 04:59:42 +01:00
_M_table(__table ? __table : __dj_ctype_flags)
{
memset(_M_widen, 0, sizeof(_M_widen));
_M_widen_ok = 0;
memset(_M_narrow, 0, sizeof(_M_narrow));
_M_narrow_ok = 0;
}
char
ctype<char>::do_toupper(char __c) const
{ return _M_toupper[static_cast<int>(__c)+1]; }
const char*
ctype<char>::do_toupper(char* __low, const char* __high) const
{
while (__low < __high)
{
*__low = ::toupper(static_cast<int> (*__low));
++__low;
}
return __high;
}
char
ctype<char>::do_tolower(char __c) const
{ return _M_tolower[static_cast<int>(__c)+1]; }
const char*
ctype<char>::do_tolower(char* __low, const char* __high) const
{
while (__low < __high)
{
*__low = ::tolower(static_cast<int> (*__low));
++__low;
}
return __high;
}