+2024-09-13 Bruno Haible <bruno@clisp.org>
+
+ Implement a new property, added by Unicode 16.0.0.
+ * lib/gen-uni-tables.c (is_property_modifier_combining_mark): New
+ function.
+ (output_properties): Output also the property modifier_combining_mark.
+ * lib/unictype.in.h (UC_PROPERTY_MODIFIER_COMBINING_MARK,
+ uc_is_property_modifier_combining_mark): New declarations.
+ * m4/unictype_h.m4 (gl_UNICTYPE_H_REQUIRE_DEFAULTS): Initialize
+ GNULIB_UNICTYPE_PROPERTY_MODIFIER_COMBINING_MARK.
+ * modules/unictype/base (Makefile.am): Substitute
+ GNULIB_UNICTYPE_PROPERTY_MODIFIER_COMBINING_MARK.
+ * lib/unictype/pr_modifier_combining_mark.c: New file.
+ * lib/unictype/pr_modifier_combining_mark.h: New generated file.
+ * modules/unictype/property-modifier-combining-mark: New file.
+ * tests/unictype/test-pr_modifier_combining_mark.c: New generated file.
+ * modules/unictype/property-modifier-combining-mark-tests: New file.
+ * lib/unictype/pr_byname.gperf: Add modifier_combining_mark.
+ * lib/unictype/pr_byname.c
+ (UC_PROPERTY_INDEX_MODIFIER_COMBINING_MARK): New enum item.
+ (uc_property_byname): Handle it.
+ * modules/unictype/property-byname (Depends-on): Add
+ unictype/property-modifier-combining-mark.
+ * modules/unictype/property-all (Depends-on): Likewise.
+ * MODULES.html.sh (func_all_modules): Add
+ unictype/property-modifier-combining-mark.
+
2024-09-13 Bruno Haible <bruno@clisp.org>
Update to Unicode 16.0.0.
func_module unictype/property-logical-order-exception
func_module unictype/property-lowercase
func_module unictype/property-math
+ func_module unictype/property-modifier-combining-mark
func_module unictype/property-non-break
func_module unictype/property-not-a-character
func_module unictype/property-numeric
return ((unicode_properties[ch] & (1ULL << PROP_GRAPHEME_LINK)) != 0);
}
+/* See PropList.txt, UCD.html. */
+static bool
+is_property_modifier_combining_mark (unsigned int ch)
+{
+ return ((unicode_properties[ch] & (1ULL << PROP_MODIFIER_COMBINING_MARK)) != 0);
+}
+
/* See PropList.txt, UCD.html. */
static bool
is_property_bidi_control (unsigned int ch)
PROPERTY(grapheme_extend)
PROPERTY(other_grapheme_extend)
PROPERTY(grapheme_link)
+ PROPERTY(modifier_combining_mark)
PROPERTY(bidi_control)
PROPERTY(bidi_left_to_right)
PROPERTY(bidi_hebrew_right_to_left)
extern @GNULIB_UNICTYPE_PROPERTY_GRAPHEME_EXTEND_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_GRAPHEME_EXTEND;
extern @GNULIB_UNICTYPE_PROPERTY_OTHER_GRAPHEME_EXTEND_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_OTHER_GRAPHEME_EXTEND;
extern @GNULIB_UNICTYPE_PROPERTY_GRAPHEME_LINK_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_GRAPHEME_LINK;
+extern @GNULIB_UNICTYPE_PROPERTY_MODIFIER_COMBINING_MARK_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_MODIFIER_COMBINING_MARK;
/* Bidi. */
extern @GNULIB_UNICTYPE_PROPERTY_BIDI_CONTROL_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_CONTROL;
extern @GNULIB_UNICTYPE_PROPERTY_BIDI_LEFT_TO_RIGHT_DLL_VARIABLE@ const uc_property_t UC_PROPERTY_BIDI_LEFT_TO_RIGHT;
_UC_ATTRIBUTE_CONST;
extern bool uc_is_property_grapheme_link (ucs4_t uc)
_UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_modifier_combining_mark (ucs4_t uc)
+ _UC_ATTRIBUTE_CONST;
extern bool uc_is_property_bidi_control (ucs4_t uc)
_UC_ATTRIBUTE_CONST;
extern bool uc_is_property_bidi_left_to_right (ucs4_t uc)
UC_PROPERTY_INDEX_GRAPHEME_EXTEND,
UC_PROPERTY_INDEX_OTHER_GRAPHEME_EXTEND,
UC_PROPERTY_INDEX_GRAPHEME_LINK,
+ UC_PROPERTY_INDEX_MODIFIER_COMBINING_MARK,
/* Bidi. */
UC_PROPERTY_INDEX_BIDI_CONTROL,
UC_PROPERTY_INDEX_BIDI_LEFT_TO_RIGHT,
return UC_PROPERTY_OTHER_GRAPHEME_EXTEND;
case UC_PROPERTY_INDEX_GRAPHEME_LINK:
return UC_PROPERTY_GRAPHEME_LINK;
+ case UC_PROPERTY_INDEX_MODIFIER_COMBINING_MARK:
+ return UC_PROPERTY_MODIFIER_COMBINING_MARK;
case UC_PROPERTY_INDEX_BIDI_CONTROL:
return UC_PROPERTY_BIDI_CONTROL;
case UC_PROPERTY_INDEX_BIDI_LEFT_TO_RIGHT:
graphemelink, UC_PROPERTY_INDEX_GRAPHEME_LINK
gr_link, UC_PROPERTY_INDEX_GRAPHEME_LINK
grlink, UC_PROPERTY_INDEX_GRAPHEME_LINK
+modifier_combining_mark, UC_PROPERTY_INDEX_MODIFIER_COMBINING_MARK
+modifiercombiningmark, UC_PROPERTY_INDEX_MODIFIER_COMBINING_MARK
bidi_control, UC_PROPERTY_INDEX_BIDI_CONTROL
bidicontrol, UC_PROPERTY_INDEX_BIDI_CONTROL
bidi_c, UC_PROPERTY_INDEX_BIDI_CONTROL
--- /dev/null
+/* Properties of Unicode characters.
+ Copyright (C) 2002, 2006-2007, 2009-2024 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2002.
+
+ This file is free software.
+ It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+".
+ You can redistribute it and/or modify it under either
+ - the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation, either version 3, or (at your
+ option) any later version, or
+ - the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option)
+ any later version, or
+ - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+".
+
+ This file 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 and the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License and of the GNU General Public License along with this
+ program. If not, see <https://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "unictype.h"
+
+#include "bitmap.h"
+
+/* Define u_property_modifier_combining_mark table. */
+#include "pr_modifier_combining_mark.h"
+
+bool
+uc_is_property_modifier_combining_mark (ucs4_t uc)
+{
+ return bitmap_lookup (&u_property_modifier_combining_mark, uc);
+}
+
+const uc_property_t UC_PROPERTY_MODIFIER_COMBINING_MARK =
+ { &uc_is_property_modifier_combining_mark };
--- /dev/null
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* Properties of Unicode characters. */
+/* Generated automatically by gen-uni-tables.c for Unicode 16.0.0. */
+
+/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
+
+ This file is free software.
+ It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+".
+ You can redistribute it and/or modify it under either
+ - the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation, either version 3, or (at your
+ option) any later version, or
+ - the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 2, or (at your option)
+ any later version, or
+ - the same dual license "the GNU LGPLv3+ or the GNU GPLv2+".
+
+ This file 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 and the GNU General Public License
+ for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License and of the GNU General Public License along with this
+ program. If not, see <https://www.gnu.org/licenses/>. */
+
+#define header_0 16
+#define header_2 9
+#define header_3 127
+#define header_4 15
+static const
+struct
+ {
+ int header[1];
+ int level1[1];
+ short level2[1 << 7];
+ unsigned int level3[2 << 4];
+ }
+u_property_modifier_combining_mark =
+{
+ { 1 },
+ { 2 * sizeof (int) / sizeof (short) + 0 },
+ {
+ -1,
+ -1,
+ -1,
+ 2 + 128 * sizeof (short) / sizeof (int) + 0,
+ 2 + 128 * sizeof (short) / sizeof (int) + 16,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1,
+ -1
+ },
+ {
+ 0x00000000U, 0x00000000U, 0x01300000U, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x10000000U, 0x00000188U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x0008EC00U, 0x00080000U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U
+ }
+};
# unictype_h.m4
-# serial 3
+# serial 4
dnl Copyright (C) 2023-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_GRAPHEME_EXTEND_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_OTHER_GRAPHEME_EXTEND_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_GRAPHEME_LINK_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_MODIFIER_COMBINING_MARK_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_CONTROL_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_LEFT_TO_RIGHT_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
-e 's/@''GNULIB_UNICTYPE_PROPERTY_GRAPHEME_EXTEND_DLL_VARIABLE''@/$(GNULIB_UNICTYPE_PROPERTY_GRAPHEME_EXTEND_DLL_VARIABLE)/g' \
-e 's/@''GNULIB_UNICTYPE_PROPERTY_OTHER_GRAPHEME_EXTEND_DLL_VARIABLE''@/$(GNULIB_UNICTYPE_PROPERTY_OTHER_GRAPHEME_EXTEND_DLL_VARIABLE)/g' \
-e 's/@''GNULIB_UNICTYPE_PROPERTY_GRAPHEME_LINK_DLL_VARIABLE''@/$(GNULIB_UNICTYPE_PROPERTY_GRAPHEME_LINK_DLL_VARIABLE)/g' \
+ -e 's/@''GNULIB_UNICTYPE_PROPERTY_MODIFIER_COMBINING_MARK_DLL_VARIABLE''@/$(GNULIB_UNICTYPE_PROPERTY_MODIFIER_COMBINING_MARK_DLL_VARIABLE)/g' \
-e 's/@''GNULIB_UNICTYPE_PROPERTY_BIDI_CONTROL_DLL_VARIABLE''@/$(GNULIB_UNICTYPE_PROPERTY_BIDI_CONTROL_DLL_VARIABLE)/g' \
-e 's/@''GNULIB_UNICTYPE_PROPERTY_BIDI_LEFT_TO_RIGHT_DLL_VARIABLE''@/$(GNULIB_UNICTYPE_PROPERTY_BIDI_LEFT_TO_RIGHT_DLL_VARIABLE)/g' \
-e 's/@''GNULIB_UNICTYPE_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT_DLL_VARIABLE''@/$(GNULIB_UNICTYPE_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT_DLL_VARIABLE)/g' \
unictype/property-logical-order-exception
unictype/property-lowercase
unictype/property-math
+unictype/property-modifier-combining-mark
unictype/property-non-break
unictype/property-not-a-character
unictype/property-numeric
unictype/property-logical-order-exception
unictype/property-lowercase
unictype/property-math
+unictype/property-modifier-combining-mark
unictype/property-non-break
unictype/property-not-a-character
unictype/property-numeric
--- /dev/null
+Description:
+Test whether a Unicode character is "modifier combining mark".
+
+Files:
+lib/unictype/pr_modifier_combining_mark.c
+lib/unictype/pr_modifier_combining_mark.h
+lib/unictype/bitmap.h
+
+Depends-on:
+unictype/base
+
+configure.ac:
+AC_REQUIRE([AC_C_INLINE])
+gl_UNICTYPE_H_REQUIRE_DEFAULTS
+gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.3], [unictype/property-modifier-combining-mark])
+
+Makefile.am:
+if LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_MODIFIER_COMBINING_MARK
+lib_SOURCES += unictype/pr_modifier_combining_mark.c
+endif
+
+Include:
+"unictype.h"
+
+License:
+LGPLv3+ or GPLv2+
+
+Maintainer:
+all
--- /dev/null
+Files:
+tests/unictype/test-pr_modifier_combining_mark.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_modifier_combining_mark
+check_PROGRAMS += test-pr_modifier_combining_mark
+test_pr_modifier_combining_mark_SOURCES = unictype/test-pr_modifier_combining_mark.c
+test_pr_modifier_combining_mark_LDADD = $(LDADD) $(LIBUNISTRING)
--- /dev/null
+/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+/* Test the Unicode character type functions.
+ Copyright (C) 2007-2024 Free Software Foundation, Inc.
+
+ This file 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 file 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 <https://www.gnu.org/licenses/>. */
+
+#include "test-predicate-part1.h"
+
+ { 0x0654, 0x0655 },
+ { 0x0658, 0x0658 },
+ { 0x06DC, 0x06DC },
+ { 0x06E3, 0x06E3 },
+ { 0x06E7, 0x06E8 },
+ { 0x08CA, 0x08CB },
+ { 0x08CD, 0x08CF },
+ { 0x08D3, 0x08D3 },
+ { 0x08F3, 0x08F3 }
+
+#define PREDICATE(c) uc_is_property_modifier_combining_mark (c)
+#include "test-predicate-part2.h"