ctype.cc (do_toupper): Remove dependence on non-portable/non-existent lookup table.

2000-04-24  Loren J. Rittle  <ljrittle@acm.org>

        * config/generic/ctype.cc (do_toupper): Remove dependence on
        non-portable/non-existent lookup table.
        (do_tolower): Same.

From-SVN: r33404
This commit is contained in:
Loren J. Rittle 2000-04-25 07:32:50 +00:00 committed by Benjamin Kosnik
parent 45ce1b3498
commit f4dad842c7
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2000-04-24 Loren J. Rittle <ljrittle@acm.org>
* config/generic/ctype.cc (do_toupper): Remove dependence on
non-portable/non-existent lookup table.
(do_tolower): Same.
2000-04-24 Nathan Myers <ncm@cantrip.org>
* src/string-inst.cc: More fixing.

View File

@ -42,14 +42,14 @@
char
ctype<char>::do_toupper(char __c) const
{ return _S_toupper[(int) __c]; }
{ return toupper((int) __c); }
const char*
ctype<char>::do_toupper(char* __low, const char* __high) const
{
while (__low < __high)
{
*__low = _S_toupper[(int) *__low];
*__low = toupper((int) *__low);
++__low;
}
return __high;
@ -57,14 +57,14 @@
char
ctype<char>::do_tolower(char __c) const
{ return _S_tolower[(int) __c]; }
{ return tolower((int) __c); }
const char*
ctype<char>::do_tolower(char* __low, const char* __high) const
{
while (__low < __high)
{
*__low = _S_tolower[(int) *__low];
*__low = tolower((int) *__low);
++__low;
}
return __high;