diff options
author | Bruno Haible <bruno@clisp.org> | 2021-12-30 11:43:09 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-12-30 11:43:09 +0100 |
commit | ef4c53b0329bd6ce418bebbbac3fdf8b52aeb2aa (patch) | |
tree | 39cd796165a457bc2236d1a69b2df3ce72fbccbf /modules | |
parent | 8026587b94e4274f3406a36bc89348a24ea86b6a (diff) | |
download | gnulib-ef4c53b0329bd6ce418bebbbac3fdf8b52aeb2aa.tar.gz |
unictype: Add Emoji properties from Unicode 11.0.0.
* lib/gen-uni-tables.c (PROP_EMOJI*, PROP_EXTENDED_PICTOGRAPHIC): New
enum values.
(fill_properties): Don't require a space between the property name and
the comment. Handle the property names from emoji-data.txt.
(is_property_emoji, is_property_emoji_presentation,
is_property_emoji_modifier, is_property_emoji_modifier_base,
is_property_emoji_component, is_property_extended_pictographic): New
declarations.
(output_properties): Emit the properties emoji, emoji_presentation,
emoji_modifier, emoji_modifier_base, emoji_component,
extended_pictographic.
(get_lbp): Use the emoji_modifier property.
(main): Expect one more argument, for the emoji-data.txt file.
* lib/unictype.in.h (UC_PROPERTY_EMOJI, UC_PROPERTY_EMOJI_PRESENTATION,
UC_PROPERTY_EMOJI_MODIFIER, UC_PROPERTY_EMOJI_MODIFIER_BASE,
UC_PROPERTY_EMOJI_COMPONENT, UC_PROPERTY_EXTENDED_PICTOGRAPHIC,
uc_is_property_emoji, uc_is_property_emoji_presentation,
uc_is_property_emoji_modifier, uc_is_property_emoji_modifier_base,
uc_is_property_emoji_component, uc_is_property_extended_pictographic):
New declarations.
* lib/unictype/pr_emoji.c: New file.
* lib/unictype/pr_emoji_presentation.c: New file.
* lib/unictype/pr_emoji_modifier.c: New file.
* lib/unictype/pr_emoji_modifier_base.c: New file.
* lib/unictype/pr_emoji_component.c: New file.
* lib/unictype/pr_extended_pictographic.c: New file.
* modules/unictype/property-emoji: New file.
* modules/unictype/property-emoji-tests: New file.
* modules/unictype/property-emoji-presentation: New file.
* modules/unictype/property-emoji-presentation-tests: New file.
* modules/unictype/property-emoji-modifier: New file.
* modules/unictype/property-emoji-modifier-tests: New file.
* modules/unictype/property-emoji-modifier-base: New file.
* modules/unictype/property-emoji-modifier-base-tests: New file.
* modules/unictype/property-emoji-component: New file.
* modules/unictype/property-emoji-component-tests: New file.
* modules/unictype/property-extended-pictographic: New file.
* modules/unictype/property-extended-pictographic-tests: New file.
* modules/unictype/property-all (Depends-on): Depend on the new modules.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/unictype/property-all | 6 | ||||
-rw-r--r-- | modules/unictype/property-emoji | 28 | ||||
-rw-r--r-- | modules/unictype/property-emoji-component | 28 | ||||
-rw-r--r-- | modules/unictype/property-emoji-component-tests | 15 | ||||
-rw-r--r-- | modules/unictype/property-emoji-modifier | 28 | ||||
-rw-r--r-- | modules/unictype/property-emoji-modifier-base | 28 | ||||
-rw-r--r-- | modules/unictype/property-emoji-modifier-base-tests | 15 | ||||
-rw-r--r-- | modules/unictype/property-emoji-modifier-tests | 15 | ||||
-rw-r--r-- | modules/unictype/property-emoji-presentation | 28 | ||||
-rw-r--r-- | modules/unictype/property-emoji-presentation-tests | 15 | ||||
-rw-r--r-- | modules/unictype/property-emoji-tests | 15 | ||||
-rw-r--r-- | modules/unictype/property-extended-pictographic | 28 | ||||
-rw-r--r-- | modules/unictype/property-extended-pictographic-tests | 15 |
13 files changed, 264 insertions, 0 deletions
diff --git a/modules/unictype/property-all b/modules/unictype/property-all index facfdd24f4..73bea9dcb2 100644 --- a/modules/unictype/property-all +++ b/modules/unictype/property-all @@ -39,6 +39,12 @@ unictype/property-decimal-digit unictype/property-default-ignorable-code-point unictype/property-deprecated unictype/property-diacritic +unictype/property-emoji +unictype/property-emoji-component +unictype/property-emoji-modifier +unictype/property-emoji-modifier-base +unictype/property-emoji-presentation +unictype/property-extended-pictographic unictype/property-extender unictype/property-format-control unictype/property-grapheme-base diff --git a/modules/unictype/property-emoji b/modules/unictype/property-emoji new file mode 100644 index 0000000000..022f167c06 --- /dev/null +++ b/modules/unictype/property-emoji @@ -0,0 +1,28 @@ +Description: +Test whether a Unicode character is "emoji". + +Files: +lib/unictype/pr_emoji.c +lib/unictype/pr_emoji.h +lib/unictype/bitmap.h + +Depends-on: +unictype/base + +configure.ac: +AC_REQUIRE([AC_C_INLINE]) +gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-emoji]) + +Makefile.am: +if LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_EMOJI +lib_SOURCES += unictype/pr_emoji.c +endif + +Include: +"unictype.h" + +License: +LGPLv3+ or GPLv2+ + +Maintainer: +all diff --git a/modules/unictype/property-emoji-component b/modules/unictype/property-emoji-component new file mode 100644 index 0000000000..df067e3c74 --- /dev/null +++ b/modules/unictype/property-emoji-component @@ -0,0 +1,28 @@ +Description: +Test whether a Unicode character is "emoji component". + +Files: +lib/unictype/pr_emoji_component.c +lib/unictype/pr_emoji_component.h +lib/unictype/bitmap.h + +Depends-on: +unictype/base + +configure.ac: +AC_REQUIRE([AC_C_INLINE]) +gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-emoji-component]) + +Makefile.am: +if LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_EMOJI_COMPONENT +lib_SOURCES += unictype/pr_emoji_component.c +endif + +Include: +"unictype.h" + +License: +LGPLv3+ or GPLv2+ + +Maintainer: +all diff --git a/modules/unictype/property-emoji-component-tests b/modules/unictype/property-emoji-component-tests new file mode 100644 index 0000000000..125439bf55 --- /dev/null +++ b/modules/unictype/property-emoji-component-tests @@ -0,0 +1,15 @@ +Files: +tests/unictype/test-pr_emoji_component.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_emoji_component +check_PROGRAMS += test-pr_emoji_component +test_pr_emoji_component_SOURCES = unictype/test-pr_emoji_component.c +test_pr_emoji_component_LDADD = $(LDADD) $(LIBUNISTRING) diff --git a/modules/unictype/property-emoji-modifier b/modules/unictype/property-emoji-modifier new file mode 100644 index 0000000000..9d358e7860 --- /dev/null +++ b/modules/unictype/property-emoji-modifier @@ -0,0 +1,28 @@ +Description: +Test whether a Unicode character is "emoji modifier". + +Files: +lib/unictype/pr_emoji_modifier.c +lib/unictype/pr_emoji_modifier.h +lib/unictype/bitmap.h + +Depends-on: +unictype/base + +configure.ac: +AC_REQUIRE([AC_C_INLINE]) +gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-emoji-modifier]) + +Makefile.am: +if LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_EMOJI_MODIFIER +lib_SOURCES += unictype/pr_emoji_modifier.c +endif + +Include: +"unictype.h" + +License: +LGPLv3+ or GPLv2+ + +Maintainer: +all diff --git a/modules/unictype/property-emoji-modifier-base b/modules/unictype/property-emoji-modifier-base new file mode 100644 index 0000000000..f16556b8f5 --- /dev/null +++ b/modules/unictype/property-emoji-modifier-base @@ -0,0 +1,28 @@ +Description: +Test whether a Unicode character is "emoji modifier base". + +Files: +lib/unictype/pr_emoji_modifier_base.c +lib/unictype/pr_emoji_modifier_base.h +lib/unictype/bitmap.h + +Depends-on: +unictype/base + +configure.ac: +AC_REQUIRE([AC_C_INLINE]) +gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-emoji-modifier-base]) + +Makefile.am: +if LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_EMOJI_MODIFIER_BASE +lib_SOURCES += unictype/pr_emoji_modifier_base.c +endif + +Include: +"unictype.h" + +License: +LGPLv3+ or GPLv2+ + +Maintainer: +all diff --git a/modules/unictype/property-emoji-modifier-base-tests b/modules/unictype/property-emoji-modifier-base-tests new file mode 100644 index 0000000000..4ed0ac0ab5 --- /dev/null +++ b/modules/unictype/property-emoji-modifier-base-tests @@ -0,0 +1,15 @@ +Files: +tests/unictype/test-pr_emoji_modifier_base.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_emoji_modifier_base +check_PROGRAMS += test-pr_emoji_modifier_base +test_pr_emoji_modifier_base_SOURCES = unictype/test-pr_emoji_modifier_base.c +test_pr_emoji_modifier_base_LDADD = $(LDADD) $(LIBUNISTRING) diff --git a/modules/unictype/property-emoji-modifier-tests b/modules/unictype/property-emoji-modifier-tests new file mode 100644 index 0000000000..5a3c064832 --- /dev/null +++ b/modules/unictype/property-emoji-modifier-tests @@ -0,0 +1,15 @@ +Files: +tests/unictype/test-pr_emoji_modifier.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_emoji_modifier +check_PROGRAMS += test-pr_emoji_modifier +test_pr_emoji_modifier_SOURCES = unictype/test-pr_emoji_modifier.c +test_pr_emoji_modifier_LDADD = $(LDADD) $(LIBUNISTRING) diff --git a/modules/unictype/property-emoji-presentation b/modules/unictype/property-emoji-presentation new file mode 100644 index 0000000000..f3259eaede --- /dev/null +++ b/modules/unictype/property-emoji-presentation @@ -0,0 +1,28 @@ +Description: +Test whether a Unicode character is "emoji presentation". + +Files: +lib/unictype/pr_emoji_presentation.c +lib/unictype/pr_emoji_presentation.h +lib/unictype/bitmap.h + +Depends-on: +unictype/base + +configure.ac: +AC_REQUIRE([AC_C_INLINE]) +gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-emoji-presentation]) + +Makefile.am: +if LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_EMOJI_PRESENTATION +lib_SOURCES += unictype/pr_emoji_presentation.c +endif + +Include: +"unictype.h" + +License: +LGPLv3+ or GPLv2+ + +Maintainer: +all diff --git a/modules/unictype/property-emoji-presentation-tests b/modules/unictype/property-emoji-presentation-tests new file mode 100644 index 0000000000..dca080d544 --- /dev/null +++ b/modules/unictype/property-emoji-presentation-tests @@ -0,0 +1,15 @@ +Files: +tests/unictype/test-pr_emoji_presentation.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_emoji_presentation +check_PROGRAMS += test-pr_emoji_presentation +test_pr_emoji_presentation_SOURCES = unictype/test-pr_emoji_presentation.c +test_pr_emoji_presentation_LDADD = $(LDADD) $(LIBUNISTRING) diff --git a/modules/unictype/property-emoji-tests b/modules/unictype/property-emoji-tests new file mode 100644 index 0000000000..369db5568c --- /dev/null +++ b/modules/unictype/property-emoji-tests @@ -0,0 +1,15 @@ +Files: +tests/unictype/test-pr_emoji.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_emoji +check_PROGRAMS += test-pr_emoji +test_pr_emoji_SOURCES = unictype/test-pr_emoji.c +test_pr_emoji_LDADD = $(LDADD) $(LIBUNISTRING) diff --git a/modules/unictype/property-extended-pictographic b/modules/unictype/property-extended-pictographic new file mode 100644 index 0000000000..96ce308a51 --- /dev/null +++ b/modules/unictype/property-extended-pictographic @@ -0,0 +1,28 @@ +Description: +Test whether a Unicode character is "extended pictographic". + +Files: +lib/unictype/pr_extended_pictographic.c +lib/unictype/pr_extended_pictographic.h +lib/unictype/bitmap.h + +Depends-on: +unictype/base + +configure.ac: +AC_REQUIRE([AC_C_INLINE]) +gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-extended-pictographic]) + +Makefile.am: +if LIBUNISTRING_COMPILE_UNICTYPE_PROPERTY_EXTENDED_PICTOGRAPHIC +lib_SOURCES += unictype/pr_extended_pictographic.c +endif + +Include: +"unictype.h" + +License: +LGPLv3+ or GPLv2+ + +Maintainer: +all diff --git a/modules/unictype/property-extended-pictographic-tests b/modules/unictype/property-extended-pictographic-tests new file mode 100644 index 0000000000..731257aa56 --- /dev/null +++ b/modules/unictype/property-extended-pictographic-tests @@ -0,0 +1,15 @@ +Files: +tests/unictype/test-pr_extended_pictographic.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_extended_pictographic +check_PROGRAMS += test-pr_extended_pictographic +test_pr_extended_pictographic_SOURCES = unictype/test-pr_extended_pictographic.c +test_pr_extended_pictographic_LDADD = $(LDADD) $(LIBUNISTRING) |