Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-02-17 12:14:35 +0300
committerCorinna Vinschen <corinna@vinschen.de>2010-02-17 12:14:35 +0300
commitdc7992f47e546e76dfd3ad12c07daec57839bfff (patch)
tree3fb5a1fdfdd8383e9a04087c5422d668fea33e4a
parentf94e2b9f58e3b3f0cb9d5465262e0db720ea3baf (diff)
* libc/ctype/iswblank.c (iswblank): Remove Unicode characters
U+00A0 and U+200B. Add Unicode character U+180E. Add comment to explain how to generate from Unicode data file. * libc/ctype/iswspace.c (iswspace): Ditto.
-rw-r--r--newlib/ChangeLog7
-rw-r--r--newlib/libc/ctype/iswblank.c7
-rw-r--r--newlib/libc/ctype/iswspace.c7
3 files changed, 17 insertions, 4 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 7729b2c35..f2554c3c4 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,10 @@
+2010-02-16 Corinna Vinschen <corinna@vinschen.de>
+
+ * libc/ctype/iswblank.c (iswblank): Remove Unicode characters
+ U+00A0 and U+200B. Add Unicode character U+180E. Add comment
+ to explain how to generate from Unicode data file.
+ * libc/ctype/iswspace.c (iswspace): Ditto.
+
2010-02-15 Corinna Vinschen <corinna@vinschen.de>
* libc/stdio/vfwprintf.c (_VFWPRINTF_R): Apply previous patch here
diff --git a/newlib/libc/ctype/iswblank.c b/newlib/libc/ctype/iswblank.c
index 2ac907f17..7ca2b6299 100644
--- a/newlib/libc/ctype/iswblank.c
+++ b/newlib/libc/ctype/iswblank.c
@@ -67,10 +67,13 @@ _DEFUN(iswblank,(c), wint_t c)
{
#ifdef _MB_CAPABLE
c = _jp2uc (c);
+ /* Based on Unicode 5.2. Control char 09, plus all characters
+ from general category "Zs", which are not marked as decomposition
+ type "noBreak". */
return (c == 0x0009 || c == 0x0020 ||
- c == 0x00A0 || c == 0x1680 ||
+ c == 0x1680 || c == 0x180e ||
(c >= 0x2000 && c <= 0x2006) ||
- (c >= 0x2008 && c <= 0x200b) ||
+ (c >= 0x2008 && c <= 0x200a) ||
c == 0x205f || c == 0x3000);
#else
return (c < 0x100 ? isblank (c) : 0);
diff --git a/newlib/libc/ctype/iswspace.c b/newlib/libc/ctype/iswspace.c
index 3245813f1..e738cd61d 100644
--- a/newlib/libc/ctype/iswspace.c
+++ b/newlib/libc/ctype/iswspace.c
@@ -67,10 +67,13 @@ _DEFUN(iswspace,(c), wint_t c)
{
#ifdef _MB_CAPABLE
c = _jp2uc (c);
+ /* Based on Unicode 5.2. Control chars 09-0D, plus all characters
+ from general category "Zs", which are not marked as decomposition
+ type "noBreak". */
return ((c >= 0x0009 && c <= 0x000d) || c == 0x0020 ||
- c == 0x00A0 || c == 0x1680 ||
+ c == 0x1680 || c == 0x180e ||
(c >= 0x2000 && c <= 0x2006) ||
- (c >= 0x2008 && c <= 0x200b) ||
+ (c >= 0x2008 && c <= 0x200a) ||
c == 0x2028 || c == 0x2029 ||
c == 0x205f || c == 0x3000);
#else