aboutsummaryrefslogtreecommitdiff
path: root/lib/unicode/prop/uprop_is_uideo.c
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-04-05 14:26:33 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-04-05 14:26:33 +0200
commit450fd004b8f8358dc46e1bcc1bceae821f7ae158 (patch)
treec3e59514c6f6a9d5d94419f025748ce7c51a9e29 /lib/unicode/prop/uprop_is_uideo.c
parent0abf844cd9c22623e22f462c91f380f16524c7e8 (diff)
Add boolean properties to unicode/prop.h
Diffstat (limited to 'lib/unicode/prop/uprop_is_uideo.c')
-rw-r--r--lib/unicode/prop/uprop_is_uideo.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/unicode/prop/uprop_is_uideo.c b/lib/unicode/prop/uprop_is_uideo.c
new file mode 100644
index 0000000..d90cfea
--- /dev/null
+++ b/lib/unicode/prop/uprop_is_uideo.c
@@ -0,0 +1,38 @@
+/* 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 const struct {
+ rune lo, hi;
+} lookup[] = {
+ {RUNE_C(0x003400), RUNE_C(0x004DBF)},
+ {RUNE_C(0x004E00), RUNE_C(0x009FFF)},
+ {RUNE_C(0x00FA0E), RUNE_C(0x00FA0F)},
+ {RUNE_C(0x00FA11), RUNE_C(0x00FA11)},
+ {RUNE_C(0x00FA13), RUNE_C(0x00FA14)},
+ {RUNE_C(0x00FA1F), RUNE_C(0x00FA1F)},
+ {RUNE_C(0x00FA21), RUNE_C(0x00FA21)},
+ {RUNE_C(0x00FA23), RUNE_C(0x00FA24)},
+ {RUNE_C(0x00FA27), RUNE_C(0x00FA29)},
+ {RUNE_C(0x020000), RUNE_C(0x02A6DF)},
+ {RUNE_C(0x02A700), RUNE_C(0x02B739)},
+ {RUNE_C(0x02B740), RUNE_C(0x02B81D)},
+ {RUNE_C(0x02B820), RUNE_C(0x02CEA1)},
+ {RUNE_C(0x02CEB0), RUNE_C(0x02EBE0)},
+ {RUNE_C(0x02EBF0), RUNE_C(0x02EE5D)},
+ {RUNE_C(0x030000), RUNE_C(0x03134A)},
+ {RUNE_C(0x031350), RUNE_C(0x0323AF)},
+};
+
+__MLIB_DEFINE_BSEARCH_CONTAINS(lookup)
+
+bool
+uprop_is_uideo(rune ch)
+{
+ return mlib_lookup_contains(ch);
+}