aboutsummaryrefslogtreecommitdiff
path: root/lib/unicode/prop/uprop_is_bidi_m.c
blob: f415fcee36048a89512015114be1707720289e03 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/* 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, 0x03, 0x00, 0x50,
	0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28,
	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(0x000F3A), RUNE_C(0x000F3D)},
	{RUNE_C(0x00169B), RUNE_C(0x00169C)},
	{RUNE_C(0x002039), RUNE_C(0x00203A)},
	{RUNE_C(0x002045), RUNE_C(0x002046)},
	{RUNE_C(0x00207D), RUNE_C(0x00207E)},
	{RUNE_C(0x00208D), RUNE_C(0x00208E)},
	{RUNE_C(0x002140), RUNE_C(0x002140)},
	{RUNE_C(0x002201), RUNE_C(0x002204)},
	{RUNE_C(0x002208), RUNE_C(0x00220D)},
	{RUNE_C(0x002211), RUNE_C(0x002211)},
	{RUNE_C(0x002215), RUNE_C(0x002216)},
	{RUNE_C(0x00221A), RUNE_C(0x00221D)},
	{RUNE_C(0x00221F), RUNE_C(0x002222)},
	{RUNE_C(0x002224), RUNE_C(0x002224)},
	{RUNE_C(0x002226), RUNE_C(0x002226)},
	{RUNE_C(0x00222B), RUNE_C(0x002233)},
	{RUNE_C(0x002239), RUNE_C(0x002239)},
	{RUNE_C(0x00223B), RUNE_C(0x00224C)},
	{RUNE_C(0x002252), RUNE_C(0x002255)},
	{RUNE_C(0x00225F), RUNE_C(0x002260)},
	{RUNE_C(0x002262), RUNE_C(0x002262)},
	{RUNE_C(0x002264), RUNE_C(0x00226B)},
	{RUNE_C(0x00226E), RUNE_C(0x00228C)},
	{RUNE_C(0x00228F), RUNE_C(0x002292)},
	{RUNE_C(0x002298), RUNE_C(0x002298)},
	{RUNE_C(0x0022A2), RUNE_C(0x0022A3)},
	{RUNE_C(0x0022A6), RUNE_C(0x0022B8)},
	{RUNE_C(0x0022BE), RUNE_C(0x0022BF)},
	{RUNE_C(0x0022C9), RUNE_C(0x0022CD)},
	{RUNE_C(0x0022D0), RUNE_C(0x0022D1)},
	{RUNE_C(0x0022D6), RUNE_C(0x0022ED)},
	{RUNE_C(0x0022F0), RUNE_C(0x0022FF)},
	{RUNE_C(0x002308), RUNE_C(0x00230B)},
	{RUNE_C(0x002320), RUNE_C(0x002321)},
	{RUNE_C(0x002329), RUNE_C(0x00232A)},
	{RUNE_C(0x002768), RUNE_C(0x002775)},
	{RUNE_C(0x0027C0), RUNE_C(0x0027C0)},
	{RUNE_C(0x0027C3), RUNE_C(0x0027C6)},
	{RUNE_C(0x0027C8), RUNE_C(0x0027C9)},
	{RUNE_C(0x0027CB), RUNE_C(0x0027CD)},
	{RUNE_C(0x0027D3), RUNE_C(0x0027D6)},
	{RUNE_C(0x0027DC), RUNE_C(0x0027DE)},
	{RUNE_C(0x0027E2), RUNE_C(0x0027EF)},
	{RUNE_C(0x002983), RUNE_C(0x002998)},
	{RUNE_C(0x00299B), RUNE_C(0x0029A0)},
	{RUNE_C(0x0029A2), RUNE_C(0x0029AF)},
	{RUNE_C(0x0029B8), RUNE_C(0x0029B8)},
	{RUNE_C(0x0029C0), RUNE_C(0x0029C5)},
	{RUNE_C(0x0029C9), RUNE_C(0x0029C9)},
	{RUNE_C(0x0029CE), RUNE_C(0x0029D2)},
	{RUNE_C(0x0029D4), RUNE_C(0x0029D5)},
	{RUNE_C(0x0029D8), RUNE_C(0x0029DC)},
	{RUNE_C(0x0029E1), RUNE_C(0x0029E1)},
	{RUNE_C(0x0029E3), RUNE_C(0x0029E5)},
	{RUNE_C(0x0029E8), RUNE_C(0x0029E9)},
	{RUNE_C(0x0029F4), RUNE_C(0x0029F9)},
	{RUNE_C(0x0029FC), RUNE_C(0x0029FD)},
	{RUNE_C(0x002A0A), RUNE_C(0x002A1C)},
	{RUNE_C(0x002A1E), RUNE_C(0x002A21)},
	{RUNE_C(0x002A24), RUNE_C(0x002A24)},
	{RUNE_C(0x002A26), RUNE_C(0x002A26)},
	{RUNE_C(0x002A29), RUNE_C(0x002A29)},
	{RUNE_C(0x002A2B), RUNE_C(0x002A2E)},
	{RUNE_C(0x002A34), RUNE_C(0x002A35)},
	{RUNE_C(0x002A3C), RUNE_C(0x002A3E)},
	{RUNE_C(0x002A57), RUNE_C(0x002A58)},
	{RUNE_C(0x002A64), RUNE_C(0x002A65)},
	{RUNE_C(0x002A6A), RUNE_C(0x002A6D)},
	{RUNE_C(0x002A6F), RUNE_C(0x002A70)},
	{RUNE_C(0x002A73), RUNE_C(0x002A74)},
	{RUNE_C(0x002A79), RUNE_C(0x002AA3)},
	{RUNE_C(0x002AA6), RUNE_C(0x002AAD)},
	{RUNE_C(0x002AAF), RUNE_C(0x002AD6)},
	{RUNE_C(0x002ADC), RUNE_C(0x002ADC)},
	{RUNE_C(0x002ADE), RUNE_C(0x002ADE)},
	{RUNE_C(0x002AE2), RUNE_C(0x002AE6)},
	{RUNE_C(0x002AEC), RUNE_C(0x002AEE)},
	{RUNE_C(0x002AF3), RUNE_C(0x002AF3)},
	{RUNE_C(0x002AF7), RUNE_C(0x002AFB)},
	{RUNE_C(0x002AFD), RUNE_C(0x002AFD)},
	{RUNE_C(0x002BFE), RUNE_C(0x002BFE)},
	{RUNE_C(0x002E02), RUNE_C(0x002E05)},
	{RUNE_C(0x002E09), RUNE_C(0x002E0A)},
	{RUNE_C(0x002E0C), RUNE_C(0x002E0D)},
	{RUNE_C(0x002E1C), RUNE_C(0x002E1D)},
	{RUNE_C(0x002E20), RUNE_C(0x002E29)},
	{RUNE_C(0x002E55), RUNE_C(0x002E5C)},
	{RUNE_C(0x003008), RUNE_C(0x003011)},
	{RUNE_C(0x003014), RUNE_C(0x00301B)},
	{RUNE_C(0x00FE59), RUNE_C(0x00FE5E)},
	{RUNE_C(0x00FE64), RUNE_C(0x00FE65)},
	{RUNE_C(0x00FF08), RUNE_C(0x00FF09)},
	{RUNE_C(0x00FF1C), RUNE_C(0x00FF1C)},
	{RUNE_C(0x00FF1E), RUNE_C(0x00FF1E)},
	{RUNE_C(0x00FF3B), RUNE_C(0x00FF3B)},
	{RUNE_C(0x00FF3D), RUNE_C(0x00FF3D)},
	{RUNE_C(0x00FF5B), RUNE_C(0x00FF5B)},
	{RUNE_C(0x00FF5D), RUNE_C(0x00FF5D)},
	{RUNE_C(0x00FF5F), RUNE_C(0x00FF60)},
	{RUNE_C(0x00FF62), RUNE_C(0x00FF63)},
	{RUNE_C(0x01D6DB), RUNE_C(0x01D6DB)},
	{RUNE_C(0x01D715), RUNE_C(0x01D715)},
	{RUNE_C(0x01D74F), RUNE_C(0x01D74F)},
	{RUNE_C(0x01D789), RUNE_C(0x01D789)},
	{RUNE_C(0x01D7C3), RUNE_C(0x01D7C3)},
};

__MLIB_DEFINE_BSEARCH_CONTAINS(lookup)

bool
uprop_is_bidi_m(rune ch)
{
	return ch <= LATIN1_MAX ? TESTBIT(bs, ch) : mlib_lookup_contains(ch);
}