aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2003-04-13 03:56:20 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2003-04-13 03:56:20 +0000
commit26af0e5d071455ed468c4ac41df3b79e80eae1d7 (patch)
tree2a172b9ea851842161f89e8eba00057194db4d3d
parent6d0c8bb1bc7a4f41ed1b6d57c9ff16f6a84fee69 (diff)
downloadgcc-26af0e5d071455ed468c4ac41df3b79e80eae1d7.zip
gcc-26af0e5d071455ed468c4ac41df3b79e80eae1d7.tar.gz
gcc-26af0e5d071455ed468c4ac41df3b79e80eae1d7.tar.bz2
* os/hpux/ctype_inline.h: Replace with gnu-linux version.
From-SVN: r65542
-rw-r--r--libstdc++-v3/ChangeLog4
-rw-r--r--libstdc++-v3/config/os/hpux/ctype_inline.h30
2 files changed, 14 insertions, 20 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index ea8571c..afe8a1c 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,7 @@
+2003-04-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * os/hpux/ctype_inline.h: Replace with gnu-linux version.
+
2003-04-12 David Edelsohn <edelsohn@gnu.org>
* testsuite/27_io/basic_istream/sentry/char/3983-fstream.cc:
diff --git a/libstdc++-v3/config/os/hpux/ctype_inline.h b/libstdc++-v3/config/os/hpux/ctype_inline.h
index 35cc306..af409c8 100644
--- a/libstdc++-v3/config/os/hpux/ctype_inline.h
+++ b/libstdc++-v3/config/os/hpux/ctype_inline.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 2000 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the
@@ -36,22 +36,15 @@
bool
ctype<char>::
- is(mask __m, char __c) const
- { return _M_table[(unsigned char)(__c)] & __m; }
+ is(mask __m, char __c) const
+ { return _M_table[static_cast<unsigned char>(__c)] & __m; }
const char*
ctype<char>::
- is(const char* __low, const char* __high, mask* __vec) const
+ is(const char* __low, const char* __high, mask* __vec) const
{
- const int __bitmasksize = 11; // Highest bitmask in ctype_base == 10
- for (;__low < __high; ++__vec, ++__low)
- {
- mask __m = _M_table[*__low];
- int __i = 0; // Lowest bitmask in ctype_base == 0
- while (__i < __bitmasksize && !(__m & static_cast<mask>(1 << __i)))
- ++__i;
- *__vec = static_cast<mask>(1 << __i);
- }
+ while (__low < __high)
+ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
return __high;
}
@@ -59,7 +52,8 @@
ctype<char>::
scan_is(mask __m, const char* __low, const char* __high) const
{
- while (__low < __high && !this->is(__m, *__low))
+ while (__low < __high
+ && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
++__low;
return __low;
}
@@ -68,12 +62,8 @@
ctype<char>::
scan_not(mask __m, const char* __low, const char* __high) const
{
- while (__low < __high && this->is(__m, *__low) != 0)
+ while (__low < __high
+ && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
++__low;
return __low;
}
-
-
-
-
-