Commit b8a2a84b by Egor Duda Committed by Benjamin Kosnik

ctype_noninline.h (ctype<char>::do_toupper(char __c)): Check for proper character class.


2001-11-01  Egor Duda  <deo@logos-m.ru>

	* config/os/newlib/bits/ctype_noninline.h
	(ctype<char>::do_toupper(char __c)): Check for proper character class.
	(ctype<char>::do_tolower(char __c)): Ditto.

From-SVN: r46708
parent 009da785
2001-11-01 Egor Duda <deo@logos-m.ru>
* config/os/newlib/bits/ctype_noninline.h
(ctype<char>::do_toupper(char __c)): Check for proper character class.
(ctype<char>::do_tolower(char __c)): Ditto.
2001-11-01 Phil Edwards <pme@gcc.gnu.org> 2001-11-01 Phil Edwards <pme@gcc.gnu.org>
* acinclude.m4: Fix spacing. * acinclude.m4: Fix spacing.
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
ctype<char>::do_toupper(char __c) const ctype<char>::do_toupper(char __c) const
{ {
int __x = __c; int __x = __c;
return (this->is(ctype_base::upper, __c) ? (__x - 'A' + 'a') : __x); return (this->is(ctype_base::lower, __c) ? (__x - 'a' + 'A') : __x);
} }
const char* const char*
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
ctype<char>::do_tolower(char __c) const ctype<char>::do_tolower(char __c) const
{ {
int __x = __c; int __x = __c;
return (this->is(ctype_base::lower, __c) ? (__x - 'A' + 'a') : __x); return (this->is(ctype_base::upper, __c) ? (__x - 'A' + 'a') : __x);
} }
const char* const char*
......
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