aboutsummaryrefslogtreecommitdiff
path: root/lib/unicode/prop/uprop_is_qmark.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicode/prop/uprop_is_qmark.c')
-rw-r--r--lib/unicode/prop/uprop_is_qmark.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/unicode/prop/uprop_is_qmark.c b/lib/unicode/prop/uprop_is_qmark.c
new file mode 100644
index 0000000..44925e5
--- /dev/null
+++ b/lib/unicode/prop/uprop_is_qmark.c
@@ -0,0 +1,37 @@
+/* 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, 0x84, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x08,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
+
+static const struct {
+ rune lo, hi;
+} lookup[] = {
+ {RUNE_C(0x002018), RUNE_C(0x00201F)},
+ {RUNE_C(0x002039), RUNE_C(0x00203A)},
+ {RUNE_C(0x002E42), RUNE_C(0x002E42)},
+ {RUNE_C(0x00300C), RUNE_C(0x00300F)},
+ {RUNE_C(0x00301D), RUNE_C(0x00301F)},
+ {RUNE_C(0x00FE41), RUNE_C(0x00FE44)},
+ {RUNE_C(0x00FF02), RUNE_C(0x00FF02)},
+ {RUNE_C(0x00FF07), RUNE_C(0x00FF07)},
+ {RUNE_C(0x00FF62), RUNE_C(0x00FF63)},
+};
+
+__MLIB_DEFINE_BSEARCH_CONTAINS(lookup)
+
+bool
+uprop_is_qmark(rune ch)
+{
+ return ch <= LATIN1_MAX ? TESTBIT(bs, ch) : mlib_lookup_contains(ch);
+}