changeset 14159:432b930d3cb4

New module 'unictype/property-changes-when-casemapped'. * modules/unictype/property-changes-when-casemapped: New file. * lib/unictype/pr_changes_when_casemapped.c: New file. * lib/unictype/pr_changes_when_casemapped.h: New file, automatically generated by gen-uni-tables. * modules/unictype/property-changes-when-casemapped-tests: New file. * tests/unictype/test-pr_changes_when_casemapped.c: New file, automatically generated by gen-uni-tables.
author Bruno Haible <bruno@clisp.org>
date Sun, 09 Jan 2011 11:28:10 +0100
parents 8243c94bd828
children 500ae32859c1
files ChangeLog lib/unictype/pr_changes_when_casemapped.c lib/unictype/pr_changes_when_casemapped.h modules/unictype/property-changes-when-casemapped modules/unictype/property-changes-when-casemapped-tests tests/unictype/test-pr_changes_when_casemapped.c
diffstat 6 files changed, 541 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2011-01-09  Bruno Haible  <bruno@clisp.org>
 
+	New module 'unictype/property-changes-when-casemapped'.
+	* modules/unictype/property-changes-when-casemapped: New file.
+	* lib/unictype/pr_changes_when_casemapped.c: New file.
+	* lib/unictype/pr_changes_when_casemapped.h: New file, automatically
+	generated by gen-uni-tables.
+	* modules/unictype/property-changes-when-casemapped-tests: New file.
+	* tests/unictype/test-pr_changes_when_casemapped.c: New file,
+	automatically generated by gen-uni-tables.
+
 	New module 'unictype/property-changes-when-casefolded'.
 	* modules/unictype/property-changes-when-casefolded: New file.
 	* lib/unictype/pr_changes_when_casefolded.c: New file.
new file mode 100644
--- /dev/null
+++ b/lib/unictype/pr_changes_when_casemapped.c
@@ -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_changes_when_casemapped table.  */
+#include "pr_changes_when_casemapped.h"
+
+bool
+uc_is_property_changes_when_casemapped (ucs4_t uc)
+{
+  return bitmap_lookup (&u_property_changes_when_casemapped, uc);
+}
+
+const uc_property_t UC_PROPERTY_CHANGES_WHEN_CASEMAPPED =
+  { &uc_is_property_changes_when_casemapped };
new file mode 100644
--- /dev/null
+++ b/lib/unictype/pr_changes_when_casemapped.h
@@ -0,0 +1,335 @@
+/* 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[13 << 4];
+  }
+u_property_changes_when_casemapped =
+{
+  { 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,
+       -1,
+       -1,
+       -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, 0x00200000, 0xFF7FFFFF, 0xFF7FFFFF,
+    0xFFFFFFFF, 0xFEFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
+    0xF7FFDFFF, 0xB3FFF3FF, 0xFFFFFFF0, 0xFFFFFFFF,
+    0xFFFFFFFF, 0xFC0FFFFD, 0x0ADFFFFF, 0x20268B09,
+    0x00041F09, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000020, 0x38CF0000,
+    0xFFFFD740, 0xFFFFFFFB, 0xFFE3FFFF, 0xEFB7FFFF,
+    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,
+    0x00000000, 0x00000000, 0x00000000, 0x22000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
+    0x4FFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF,
+    0x3F3FFFFF, 0xFFFFFFFF, 0xAAFF3F3F, 0x3FFFFFFF,
+    0xFFFFFFFF, 0x5FDFFFFF, 0x0FCF1FDC, 0x1FDC1FFF,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00040C40, 0x00004000, 0xFFFFFFFF,
+    0x00000018, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0xFFC00000, 0xFFFFFFFF, 0x000003FF,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0xFFFFFFFF, 0xFFFF7FFF, 0x7FFFFFFF, 0xC06DFFFF,
+    0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x0000780F,
+    0xFFFFFFFF, 0x0000003F, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0x00000000, 0xFFFFFFFF, 0x00003FFC,
+    0x00FFFFFF, 0x00000000, 0x00000000, 0x00000000,
+    0x00000000, 0xFFFCFFFC, 0xFFFFFFFF, 0xFE00FFFF,
+    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
+  }
+};
new file mode 100644
--- /dev/null
+++ b/modules/unictype/property-changes-when-casemapped
@@ -0,0 +1,28 @@
+Description:
+Test whether a Unicode character changes when casemapped.
+
+Files:
+lib/unictype/pr_changes_when_casemapped.c
+lib/unictype/pr_changes_when_casemapped.h
+lib/unictype/bitmap.h
+
+Depends-on:
+unictype/base
+
+configure.ac:
+AC_REQUIRE([AC_C_INLINE])
+gl_LIBUNISTRING_MODULE([0.9.4], [unictype/property-changes-when-casemapped])
+
+Makefile.am:
+if LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_CHANGES_WHEN_CASEMAPPED
+lib_SOURCES += unictype/pr_changes_when_casemapped.c
+endif
+
+Include:
+"unictype.h"
+
+License:
+LGPL
+
+Maintainer:
+Bruno Haible
new file mode 100644
--- /dev/null
+++ b/modules/unictype/property-changes-when-casemapped-tests
@@ -0,0 +1,15 @@
+Files:
+tests/unictype/test-pr_changes_when_casemapped.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_changes_when_casemapped
+check_PROGRAMS += test-pr_changes_when_casemapped
+test_pr_changes_when_casemapped_SOURCES = unictype/test-pr_changes_when_casemapped.c
+test_pr_changes_when_casemapped_LDADD = $(LDADD) $(LIBUNISTRING)
new file mode 100644
--- /dev/null
+++ b/tests/unictype/test-pr_changes_when_casemapped.c
@@ -0,0 +1,119 @@
+/* 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 },
+    { 0x00B5, 0x00B5 },
+    { 0x00C0, 0x00D6 },
+    { 0x00D8, 0x00F6 },
+    { 0x00F8, 0x0137 },
+    { 0x0139, 0x018C },
+    { 0x018E, 0x019A },
+    { 0x019C, 0x01A9 },
+    { 0x01AC, 0x01B9 },
+    { 0x01BC, 0x01BD },
+    { 0x01BF, 0x01BF },
+    { 0x01C4, 0x0220 },
+    { 0x0222, 0x0233 },
+    { 0x023A, 0x0254 },
+    { 0x0256, 0x0257 },
+    { 0x0259, 0x0259 },
+    { 0x025B, 0x025B },
+    { 0x0260, 0x0260 },
+    { 0x0263, 0x0263 },
+    { 0x0268, 0x0269 },
+    { 0x026B, 0x026B },
+    { 0x026F, 0x026F },
+    { 0x0271, 0x0272 },
+    { 0x0275, 0x0275 },
+    { 0x027D, 0x027D },
+    { 0x0280, 0x0280 },
+    { 0x0283, 0x0283 },
+    { 0x0288, 0x028C },
+    { 0x0292, 0x0292 },
+    { 0x0345, 0x0345 },
+    { 0x0370, 0x0373 },
+    { 0x0376, 0x0377 },
+    { 0x037B, 0x037D },
+    { 0x0386, 0x0386 },
+    { 0x0388, 0x038A },
+    { 0x038C, 0x038C },
+    { 0x038E, 0x03A1 },
+    { 0x03A3, 0x03D1 },
+    { 0x03D5, 0x03F2 },
+    { 0x03F4, 0x03F5 },
+    { 0x03F7, 0x03FB },
+    { 0x03FD, 0x0481 },
+    { 0x048A, 0x0525 },
+    { 0x0531, 0x0556 },
+    { 0x0561, 0x0587 },
+    { 0x10A0, 0x10C5 },
+    { 0x1D79, 0x1D79 },
+    { 0x1D7D, 0x1D7D },
+    { 0x1E00, 0x1E9B },
+    { 0x1E9E, 0x1E9E },
+    { 0x1EA0, 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 },
+    { 0x2126, 0x2126 },
+    { 0x212A, 0x212B },
+    { 0x2132, 0x2132 },
+    { 0x214E, 0x214E },
+    { 0x2160, 0x217F },
+    { 0x2183, 0x2184 },
+    { 0x24B6, 0x24E9 },
+    { 0x2C00, 0x2C2E },
+    { 0x2C30, 0x2C5E },
+    { 0x2C60, 0x2C70 },
+    { 0x2C72, 0x2C73 },
+    { 0x2C75, 0x2C76 },
+    { 0x2C7E, 0x2CE3 },
+    { 0x2CEB, 0x2CEE },
+    { 0x2D00, 0x2D25 },
+    { 0xA640, 0xA65F },
+    { 0xA662, 0xA66D },
+    { 0xA680, 0xA697 },
+    { 0xA722, 0xA72F },
+    { 0xA732, 0xA76F },
+    { 0xA779, 0xA787 },
+    { 0xA78B, 0xA78C },
+    { 0xFB00, 0xFB06 },
+    { 0xFB13, 0xFB17 },
+    { 0xFF21, 0xFF3A },
+    { 0xFF41, 0xFF5A },
+    { 0x10400, 0x1044F }
+
+#define PREDICATE(c) uc_is_property_changes_when_casemapped (c)
+#include "test-predicate-part2.h"