Commit f4dad842 by Loren J. Rittle Committed by Benjamin Kosnik

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
parent 45ce1b34
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> 2000-04-24 Nathan Myers <ncm@cantrip.org>
* src/string-inst.cc: More fixing. * src/string-inst.cc: More fixing.
......
...@@ -42,14 +42,14 @@ ...@@ -42,14 +42,14 @@
char char
ctype<char>::do_toupper(char __c) const ctype<char>::do_toupper(char __c) const
{ return _S_toupper[(int) __c]; } { return toupper((int) __c); }
const char* const char*
ctype<char>::do_toupper(char* __low, const char* __high) const ctype<char>::do_toupper(char* __low, const char* __high) const
{ {
while (__low < __high) while (__low < __high)
{ {
*__low = _S_toupper[(int) *__low]; *__low = toupper((int) *__low);
++__low; ++__low;
} }
return __high; return __high;
...@@ -57,14 +57,14 @@ ...@@ -57,14 +57,14 @@
char char
ctype<char>::do_tolower(char __c) const ctype<char>::do_tolower(char __c) const
{ return _S_tolower[(int) __c]; } { return tolower((int) __c); }
const char* const char*
ctype<char>::do_tolower(char* __low, const char* __high) const ctype<char>::do_tolower(char* __low, const char* __high) const
{ {
while (__low < __high) while (__low < __high)
{ {
*__low = _S_tolower[(int) *__low]; *__low = tolower((int) *__low);
++__low; ++__low;
} }
return __high; return __high;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment