Commit b5028f5e by Danny Smith Committed by Benjamin Kosnik

ctype_inline.h (is): Don't offset _M_table.


2002-08-02 Danny Smith  <dannysmith@users.sourceforge.net>

	* config/os/newlib/ctype_inline.h (is): Don't offset _M_table.
	(scan_is): Use this->is.
	(scan_not): Likewise.

From-SVN: r55989
parent 49bc23b7
2002-08-02 Danny Smith <dannysmith@users.sourceforge.net>
* config/os/newlib/ctype_inline.h (is): Don't offset _M_table.
(scan_is): Use this->is.
(scan_not): Likewise.
2002-08-02 Benjamin Kosnik <bkoz@redhat.com>
Revert PR libstdc++/6594
......
......@@ -37,14 +37,14 @@
bool
ctype<char>::
is(mask __m, char __c) const
{ return (_M_table + 1)[static_cast<unsigned char>(__c)] & __m; }
{ return _M_table[static_cast<unsigned char>(__c)] & __m; }
const char*
ctype<char>::
is(const char* __low, const char* __high, mask* __vec) const
{
while (__low < __high)
*__vec++ = (_M_table + 1)[static_cast<unsigned char>(*__low++)];
*__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
return __high;
}
......@@ -52,8 +52,7 @@
ctype<char>::
scan_is(mask __m, const char* __low, const char* __high) const
{
while (__low < __high
&& !((_M_table + 1)[static_cast<unsigned char>(*__low)] & __m))
while (__low < __high && !this->is(__m, *__low))
++__low;
return __low;
}
......@@ -62,8 +61,7 @@
ctype<char>::
scan_not(mask __m, const char* __low, const char* __high) const
{
while (__low < __high
&& ((_M_table + 1)[static_cast<unsigned char>(*__low)] & __m) != 0)
while (__low < __high && this->is(__m, *__low) != 0)
++__low;
return __low;
}
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