wchar_t working on sparc-sun-solaris2.6
Branko
Branko
Mon Jun 5 06:37:00 GMT 2000
This patch fixes specializations of toupper and tolower.
The rest of the stuff requred to support wchar_t on Solaris is on
the way; the configury has changed a bit so I'm bootstrapping again
to make sure the pathces will be O.K.
2000-06-05 Branko Cibej <branko.cibej@hermes.si>
* config/solaris/solaris2.6/ctype.cc (do_toupper, do_tolower): Use
towupper and towlower to convert wide characters.
Brane
--
Branko Čibej <branko.cibej@hermes.si>
HERMES SoftLab, Litijska 51, 1000 Ljubljana, Slovenia
voice: (+386 1) 586 53 49 fax: (+386 1) 586 52 70
Index: config/solaris/solaris2.6/ctype.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/config/solaris/solaris2.6/ctype.cc,v
retrieving revision 1.1
diff -c -p -r1.1 ctype.cc
*** ctype.cc 2000/04/21 20:33:30 1.1
--- ctype.cc 2000/06/05 13:13:14
***************
*** 70,76 ****
return __high;
}
! #ifdef _GLIBCPP_USE_WCHAR_T
ctype<wchar_t>::ctype(size_t /*__refs*/) throw()
: _M_toupper(__trans_upper), _M_tolower(__trans_lower),
_M_ctable(__ctype_mask)
--- 70,78 ----
return __high;
}
! #ifdef _GLIBCPP_USE_WCHAR_T
! # include <bits/std_cwctype.h>
!
ctype<wchar_t>::ctype(size_t /*__refs*/) throw()
: _M_toupper(__trans_upper), _M_tolower(__trans_lower),
_M_ctable(__ctype_mask)
***************
*** 78,104 ****
wchar_t
ctype<wchar_t>::do_toupper(wchar_t __c) const
! { return (__c < _S_table_size) ? _M_toupper[__c] : __c; }
const wchar_t*
! ctype<wchar_t>::do_toupper(wchar_t* low, const wchar_t* high) const
{
! for (;low < high; ++low)
! if (*low < _S_table_size)
! *low = _M_toupper[*low];
! return high;
}
wchar_t
ctype<wchar_t>::do_tolower(wchar_t __c) const
! { return (__c < _S_table_size) ? _M_tolower[__c] : __c; }
const wchar_t*
ctype<wchar_t>::do_tolower(wchar_t* __low, const wchar_t* __high) const
{
! for (; __low < __high; ++__low)
! if (*__low < _S_table_size)
! *__low = _M_toupper[*__low];
return __high;
}
#endif
--- 80,110 ----
wchar_t
ctype<wchar_t>::do_toupper(wchar_t __c) const
! { return towupper(__c); }
const wchar_t*
! ctype<wchar_t>::do_toupper(wchar_t* __low, const wchar_t* __high) const
{
! while (__low < __high)
! {
! *__low = towupper(*__low);
! ++__low;
! }
! return __high;
}
wchar_t
ctype<wchar_t>::do_tolower(wchar_t __c) const
! { return towlower(__c); }
const wchar_t*
ctype<wchar_t>::do_tolower(wchar_t* __low, const wchar_t* __high) const
{
! while (__low < __high)
! {
! *__low = towlower(*__low);
! ++__low;
! }
return __high;
}
#endif
More information about the Libstdc++
mailing list