aboutsummaryrefslogtreecommitdiff
path: root/lib/unicode/prop/uprop_is_ext.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicode/prop/uprop_is_ext.c')
-rw-r--r--lib/unicode/prop/uprop_is_ext.c60
1 files changed, 60 insertions, 0 deletions
diff --git a/lib/unicode/prop/uprop_is_ext.c b/lib/unicode/prop/uprop_is_ext.c
new file mode 100644
index 0000000..09d5366
--- /dev/null
+++ b/lib/unicode/prop/uprop_is_ext.c
@@ -0,0 +1,60 @@
+/* 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, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+};
+
+static const struct {
+ rune lo, hi;
+} lookup[] = {
+ {RUNE_C(0x0002D0), RUNE_C(0x0002D1)},
+ {RUNE_C(0x000640), RUNE_C(0x000640)},
+ {RUNE_C(0x0007FA), RUNE_C(0x0007FA)},
+ {RUNE_C(0x000B55), RUNE_C(0x000B55)},
+ {RUNE_C(0x000E46), RUNE_C(0x000E46)},
+ {RUNE_C(0x000EC6), RUNE_C(0x000EC6)},
+ {RUNE_C(0x00180A), RUNE_C(0x00180A)},
+ {RUNE_C(0x001843), RUNE_C(0x001843)},
+ {RUNE_C(0x001AA7), RUNE_C(0x001AA7)},
+ {RUNE_C(0x001C36), RUNE_C(0x001C36)},
+ {RUNE_C(0x001C7B), RUNE_C(0x001C7B)},
+ {RUNE_C(0x003005), RUNE_C(0x003005)},
+ {RUNE_C(0x003031), RUNE_C(0x003035)},
+ {RUNE_C(0x00309D), RUNE_C(0x00309E)},
+ {RUNE_C(0x0030FC), RUNE_C(0x0030FE)},
+ {RUNE_C(0x00A015), RUNE_C(0x00A015)},
+ {RUNE_C(0x00A60C), RUNE_C(0x00A60C)},
+ {RUNE_C(0x00A9CF), RUNE_C(0x00A9CF)},
+ {RUNE_C(0x00A9E6), RUNE_C(0x00A9E6)},
+ {RUNE_C(0x00AA70), RUNE_C(0x00AA70)},
+ {RUNE_C(0x00AADD), RUNE_C(0x00AADD)},
+ {RUNE_C(0x00AAF3), RUNE_C(0x00AAF4)},
+ {RUNE_C(0x00FF70), RUNE_C(0x00FF70)},
+ {RUNE_C(0x010781), RUNE_C(0x010782)},
+ {RUNE_C(0x01135D), RUNE_C(0x01135D)},
+ {RUNE_C(0x0115C6), RUNE_C(0x0115C8)},
+ {RUNE_C(0x011A98), RUNE_C(0x011A98)},
+ {RUNE_C(0x016B42), RUNE_C(0x016B43)},
+ {RUNE_C(0x016FE0), RUNE_C(0x016FE1)},
+ {RUNE_C(0x016FE3), RUNE_C(0x016FE3)},
+ {RUNE_C(0x01E13C), RUNE_C(0x01E13D)},
+ {RUNE_C(0x01E944), RUNE_C(0x01E946)},
+};
+
+__MLIB_DEFINE_BSEARCH_CONTAINS(lookup)
+
+bool
+uprop_is_ext(rune ch)
+{
+ return ch <= LATIN1_MAX ? TESTBIT(bs, ch) : mlib_lookup_contains(ch);
+}