aboutsummaryrefslogtreecommitdiff
path: root/lib/unicode/prop/uprop_is_ecomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicode/prop/uprop_is_ecomp.c')
-rw-r--r--lib/unicode/prop/uprop_is_ecomp.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/unicode/prop/uprop_is_ecomp.c b/lib/unicode/prop/uprop_is_ecomp.c
new file mode 100644
index 0000000..aa61aa3
--- /dev/null
+++ b/lib/unicode/prop/uprop_is_ecomp.c
@@ -0,0 +1,35 @@
+/* This file is autogenerated by gen/prop/bool-props; DO NOT EDIT. */
+
+#include "__bsearch.h"
+#include "bitset.h"
+#include "rune.h"
+#include "unicode/prop.h"
+
+/* clang-format off */
+
+static constexpr bitset(bs, LATIN1_MAX) = {
+ 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0xFF, 0x03,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
+
+static const struct {
+ rune lo, hi;
+} lookup[] = {
+ {RUNE_C(0x00200D), RUNE_C(0x00200D)},
+ {RUNE_C(0x0020E3), RUNE_C(0x0020E3)},
+ {RUNE_C(0x00FE0F), RUNE_C(0x00FE0F)},
+ {RUNE_C(0x01F1E6), RUNE_C(0x01F1FF)},
+ {RUNE_C(0x01F3FB), RUNE_C(0x01F3FF)},
+ {RUNE_C(0x01F9B0), RUNE_C(0x01F9B3)},
+ {RUNE_C(0x0E0020), RUNE_C(0x0E007F)},
+};
+
+__MLIB_DEFINE_BSEARCH_CONTAINS(lookup)
+
+bool
+uprop_is_ecomp(rune ch)
+{
+ return ch <= LATIN1_MAX ? TESTBIT(bs, ch) : mlib_lookup_contains(ch);
+}