New module 'unictype/property-cased'.
authorBruno Haible <bruno@clisp.org>
Sun, 9 Jan 2011 10:18:42 +0000 (11:18 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 9 Jan 2011 10:35:43 +0000 (11:35 +0100)
* modules/unictype/property-cased: New file.
* lib/unictype/pr_cased.c: New file.
* lib/unictype/pr_cased.h: New file, automatically generated by
gen-uni-tables.
* modules/unictype/property-cased-tests: New file.
* tests/unictype/test-pr_cased.c: New file, automatically generated by
gen-uni-tables.

ChangeLog
lib/unictype/pr_cased.c [new file with mode: 0644]
lib/unictype/pr_cased.h [new file with mode: 0644]
modules/unictype/property-cased [new file with mode: 0644]
modules/unictype/property-cased-tests [new file with mode: 0644]
tests/unictype/test-pr_cased.c [new file with mode: 0644]

index f888b0f..8fa7214 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2011-01-09  Bruno Haible  <bruno@clisp.org>
 
+       New module 'unictype/property-cased'.
+       * modules/unictype/property-cased: New file.
+       * lib/unictype/pr_cased.c: New file.
+       * lib/unictype/pr_cased.h: New file, automatically generated by
+       gen-uni-tables.
+       * modules/unictype/property-cased-tests: New file.
+       * tests/unictype/test-pr_cased.c: New file, automatically generated by
+       gen-uni-tables.
+
+2011-01-09  Bruno Haible  <bruno@clisp.org>
+
        Update to Unicode 5.2.0.
        * lib/gen-uni-tables.c (output_predicate, output_category,
        output_combclass, output_bidi_category, output_decimal_digit_test,
diff --git a/lib/unictype/pr_cased.c b/lib/unictype/pr_cased.c
new file mode 100644 (file)
index 0000000..075ebd0
--- /dev/null
@@ -0,0 +1,35 @@
+/* Properties of Unicode characters.
+   Copyright (C) 2002, 2006-2007, 2009-2011 Free Software Foundation, Inc.
+   Written by Bruno Haible <bruno@clisp.org>, 2011.
+
+   This program is free software: you can redistribute it and/or modify it
+   under the terms of the GNU Lesser General Public License as published
+   by the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include <config.h>
+
+/* Specification.  */
+#include "unictype.h"
+
+#include "bitmap.h"
+
+/* Define u_property_cased table.  */
+#include "pr_cased.h"
+
+bool
+uc_is_property_cased (ucs4_t uc)
+{
+  return bitmap_lookup (&u_property_cased, uc);
+}
+
+const uc_property_t UC_PROPERTY_CASED =
+  { &uc_is_property_cased };
diff --git a/lib/unictype/pr_cased.h b/lib/unictype/pr_cased.h
new file mode 100644 (file)
index 0000000..19ceec0
--- /dev/null
@@ -0,0 +1,343 @@
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* Properties of Unicode characters.  */
+/* Generated automatically by gen-uni-tables.c for Unicode 5.2.0.  */
+#define header_0 16
+#define header_2 9
+#define header_3 127
+#define header_4 15
+static const
+struct
+  {
+    int header[1];
+    int level1[2];
+    short level2[2 << 7];
+    /*unsigned*/ int level3[15 << 4];
+  }
+u_property_cased =
+{
+  { 2 },
+  {
+        3 * sizeof (int) / sizeof (short) +     0,
+        3 * sizeof (int) / sizeof (short) +   128
+  },
+  {
+        3 +   256 * sizeof (short) / sizeof (int) +     0,
+        3 +   256 * sizeof (short) / sizeof (int) +    16,
+        3 +   256 * sizeof (short) / sizeof (int) +    32,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+        3 +   256 * sizeof (short) / sizeof (int) +    48,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+        3 +   256 * sizeof (short) / sizeof (int) +    64,
+        3 +   256 * sizeof (short) / sizeof (int) +    80,
+        3 +   256 * sizeof (short) / sizeof (int) +    96,
+       -1,
+        3 +   256 * sizeof (short) / sizeof (int) +   112,
+       -1,
+       -1,
+       -1,
+        3 +   256 * sizeof (short) / sizeof (int) +   128,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+        3 +   256 * sizeof (short) / sizeof (int) +   144,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+        3 +   256 * sizeof (short) / sizeof (int) +   160,
+       -1,
+        3 +   256 * sizeof (short) / sizeof (int) +   176,
+       -1,
+       -1,
+        3 +   256 * sizeof (short) / sizeof (int) +   192,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+        3 +   256 * sizeof (short) / sizeof (int) +   208,
+        3 +   256 * sizeof (short) / sizeof (int) +   224,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1,
+       -1
+  },
+  {
+    0x00000000, 0x00000000, 0x07FFFFFE, 0x07FFFFFE,
+    0x00000000, 0x04200400, 0xFF7FFFFF, 0xFF7FFFFF,
+    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
+    0xFFFFFFFF, 0xF7FFFFFF, 0xFFFFFFF0, 0xFFFFFFFF,
+    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
+    0xFFEFFFFF, 0x01FFFFFF, 0x00000003, 0x0000001F,
+    0x00000000, 0x00000000, 0x00000020, 0x3CCF0000,
+    0xFFFFD740, 0xFFFFFFFB, 0xFFFFFFFF, 0xFFBFFFFF,
+    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
+    0xFFFFFC03, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
+    0xFFFFFFFF, 0xFFFE003F, 0x007FFFFF, 0xFFFFFFFE,
+    0x000000FF, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0xFFFFFFFF, 0x0000003F, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
+    0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x00000000,
+    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
+    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
+    0x3F3FFFFF, 0xFFFFFFFF, 0xAAFF3F3F, 0x3FFFFFFF,
+    0xFFFFFFFF, 0x5FDFFFFF, 0x0FCF1FDC, 0x1FDC1FFF,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x001F0000, 0x00000000, 0x00000000, 0x00000000,
+    0x3E2FFC84, 0xF21FBD50, 0x000043E0, 0xFFFFFFFF,
+    0x00000018, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0xFFC00000, 0xFFFFFFFF, 0x000003FF,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0xFFFFFFFF, 0xFFFF7FFF, 0x7FFFFFFF, 0xFFFFFFFF,
+    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000781F,
+    0xFFFFFFFF, 0x0000003F, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0xFFFFFFFF, 0x00003FFC,
+    0x00FFFFFF, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0xFFFFFFFC, 0xFFFFFFFF, 0xFFFFFFFF,
+    0x000018FF, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00F8007F, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x07FFFFFE, 0x07FFFFFE, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0xFFFFFFFF, 0xFFFFFFFF, 0x0000FFFF, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0xFFFFFFFF, 0xFFFFFFFF, 0xFFDFFFFF, 0xFFFFFFFF,
+    0xDFFFFFFF, 0xEBFFDE64, 0xFFFFFFEF, 0xFFFFFFFF,
+    0xDFDFE7BF, 0x7BFFFFFF, 0xFFFDFC5F, 0xFFFFFFFF,
+    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
+    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
+    0xFFFFFFFF, 0xFFFFFF3F, 0xF7FFFFFD, 0xF7FFFFFF,
+    0xFFDFFFFF, 0xFFDFFFFF, 0xFFFF7FFF, 0xFFFF7FFF,
+    0xFFFFFDFF, 0xFFFFFDFF, 0x00000FF7, 0x00000000
+  }
+};
diff --git a/modules/unictype/property-cased b/modules/unictype/property-cased
new file mode 100644 (file)
index 0000000..caf51ca
--- /dev/null
@@ -0,0 +1,28 @@
+Description:
+Test whether a Unicode character is "cased".
+
+Files:
+lib/unictype/pr_cased.c
+lib/unictype/pr_cased.h
+lib/unictype/bitmap.h
+
+Depends-on:
+unictype/base
+
+configure.ac:
+AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_MODULE([0.9.4], [unictype/property-cased])
+
+Makefile.am:
+if LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_CASED
+lib_SOURCES += unictype/pr_cased.c
+endif
+
+Include:
+"unictype.h"
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
diff --git a/modules/unictype/property-cased-tests b/modules/unictype/property-cased-tests
new file mode 100644 (file)
index 0000000..73d336b
--- /dev/null
@@ -0,0 +1,15 @@
+Files:
+tests/unictype/test-pr_cased.c
+tests/unictype/test-predicate-part1.h
+tests/unictype/test-predicate-part2.h
+tests/macros.h
+
+Depends-on:
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-pr_cased
+check_PROGRAMS += test-pr_cased
+test_pr_cased_SOURCES = unictype/test-pr_cased.c
+test_pr_cased_LDADD = $(LDADD) $(LIBUNISTRING)
diff --git a/tests/unictype/test-pr_cased.c b/tests/unictype/test-pr_cased.c
new file mode 100644 (file)
index 0000000..3b1e9b7
--- /dev/null
@@ -0,0 +1,132 @@
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* Test the Unicode character type functions.
+   Copyright (C) 2007 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
+
+#include "test-predicate-part1.h"
+
+    { 0x0041, 0x005A },
+    { 0x0061, 0x007A },
+    { 0x00AA, 0x00AA },
+    { 0x00B5, 0x00B5 },
+    { 0x00BA, 0x00BA },
+    { 0x00C0, 0x00D6 },
+    { 0x00D8, 0x00F6 },
+    { 0x00F8, 0x01BA },
+    { 0x01BC, 0x01BF },
+    { 0x01C4, 0x0293 },
+    { 0x0295, 0x02B8 },
+    { 0x02C0, 0x02C1 },
+    { 0x02E0, 0x02E4 },
+    { 0x0345, 0x0345 },
+    { 0x0370, 0x0373 },
+    { 0x0376, 0x0377 },
+    { 0x037A, 0x037D },
+    { 0x0386, 0x0386 },
+    { 0x0388, 0x038A },
+    { 0x038C, 0x038C },
+    { 0x038E, 0x03A1 },
+    { 0x03A3, 0x03F5 },
+    { 0x03F7, 0x0481 },
+    { 0x048A, 0x0525 },
+    { 0x0531, 0x0556 },
+    { 0x0561, 0x0587 },
+    { 0x10A0, 0x10C5 },
+    { 0x1D00, 0x1DBF },
+    { 0x1E00, 0x1F15 },
+    { 0x1F18, 0x1F1D },
+    { 0x1F20, 0x1F45 },
+    { 0x1F48, 0x1F4D },
+    { 0x1F50, 0x1F57 },
+    { 0x1F59, 0x1F59 },
+    { 0x1F5B, 0x1F5B },
+    { 0x1F5D, 0x1F5D },
+    { 0x1F5F, 0x1F7D },
+    { 0x1F80, 0x1FB4 },
+    { 0x1FB6, 0x1FBC },
+    { 0x1FBE, 0x1FBE },
+    { 0x1FC2, 0x1FC4 },
+    { 0x1FC6, 0x1FCC },
+    { 0x1FD0, 0x1FD3 },
+    { 0x1FD6, 0x1FDB },
+    { 0x1FE0, 0x1FEC },
+    { 0x1FF2, 0x1FF4 },
+    { 0x1FF6, 0x1FFC },
+    { 0x2090, 0x2094 },
+    { 0x2102, 0x2102 },
+    { 0x2107, 0x2107 },
+    { 0x210A, 0x2113 },
+    { 0x2115, 0x2115 },
+    { 0x2119, 0x211D },
+    { 0x2124, 0x2124 },
+    { 0x2126, 0x2126 },
+    { 0x2128, 0x2128 },
+    { 0x212A, 0x212D },
+    { 0x212F, 0x2134 },
+    { 0x2139, 0x2139 },
+    { 0x213C, 0x213F },
+    { 0x2145, 0x2149 },
+    { 0x214E, 0x214E },
+    { 0x2160, 0x217F },
+    { 0x2183, 0x2184 },
+    { 0x24B6, 0x24E9 },
+    { 0x2C00, 0x2C2E },
+    { 0x2C30, 0x2C5E },
+    { 0x2C60, 0x2CE4 },
+    { 0x2CEB, 0x2CEE },
+    { 0x2D00, 0x2D25 },
+    { 0xA640, 0xA65F },
+    { 0xA662, 0xA66D },
+    { 0xA680, 0xA697 },
+    { 0xA722, 0xA787 },
+    { 0xA78B, 0xA78C },
+    { 0xFB00, 0xFB06 },
+    { 0xFB13, 0xFB17 },
+    { 0xFF21, 0xFF3A },
+    { 0xFF41, 0xFF5A },
+    { 0x10400, 0x1044F },
+    { 0x1D400, 0x1D454 },
+    { 0x1D456, 0x1D49C },
+    { 0x1D49E, 0x1D49F },
+    { 0x1D4A2, 0x1D4A2 },
+    { 0x1D4A5, 0x1D4A6 },
+    { 0x1D4A9, 0x1D4AC },
+    { 0x1D4AE, 0x1D4B9 },
+    { 0x1D4BB, 0x1D4BB },
+    { 0x1D4BD, 0x1D4C3 },
+    { 0x1D4C5, 0x1D505 },
+    { 0x1D507, 0x1D50A },
+    { 0x1D50D, 0x1D514 },
+    { 0x1D516, 0x1D51C },
+    { 0x1D51E, 0x1D539 },
+    { 0x1D53B, 0x1D53E },
+    { 0x1D540, 0x1D544 },
+    { 0x1D546, 0x1D546 },
+    { 0x1D54A, 0x1D550 },
+    { 0x1D552, 0x1D6A5 },
+    { 0x1D6A8, 0x1D6C0 },
+    { 0x1D6C2, 0x1D6DA },
+    { 0x1D6DC, 0x1D6FA },
+    { 0x1D6FC, 0x1D714 },
+    { 0x1D716, 0x1D734 },
+    { 0x1D736, 0x1D74E },
+    { 0x1D750, 0x1D76E },
+    { 0x1D770, 0x1D788 },
+    { 0x1D78A, 0x1D7A8 },
+    { 0x1D7AA, 0x1D7C2 },
+    { 0x1D7C4, 0x1D7CB }
+
+#define PREDICATE(c) uc_is_property_cased (c)
+#include "test-predicate-part2.h"