aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Smith <dannysmith@users.sourceforge.net>2002-08-02 16:10:12 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2002-08-02 16:10:12 +0000
commitb5028f5e8b688acb83c4052a3bf4147c174473c0 (patch)
tree420315ba2055cc3ee53561772cfab3f8e90c117f
parent49bc23b7f971a6a8b24d9bfec359e837b069a8d7 (diff)
downloadgcc-b5028f5e8b688acb83c4052a3bf4147c174473c0.zip
gcc-b5028f5e8b688acb83c4052a3bf4147c174473c0.tar.gz
gcc-b5028f5e8b688acb83c4052a3bf4147c174473c0.tar.bz2
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
-rw-r--r--libstdc++-v3/ChangeLog6
-rw-r--r--libstdc++-v3/config/os/newlib/ctype_inline.h10
2 files changed, 10 insertions, 6 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 1fd251d..afd67a1 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,9 @@
+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
diff --git a/libstdc++-v3/config/os/newlib/ctype_inline.h b/libstdc++-v3/config/os/newlib/ctype_inline.h
index cd3e9ba..8381ace 100644
--- a/libstdc++-v3/config/os/newlib/ctype_inline.h
+++ b/libstdc++-v3/config/os/newlib/ctype_inline.h
@@ -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;
}