aboutsummaryrefslogtreecommitdiff
path: root/lib/unicode/prop/uprop_get_bpt.c
blob: 6de44833c52e546be2b1843772d4921f79763a2f (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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
/* This file is autogenerated by gen/prop/bpt; DO NOT EDIT. */

#include "_bsearch.h"
#include "macros.h"
#include "rune.h"
#include "unicode/prop.h"

static constexpr enum uprop_bpt lookup_lat1[] = {
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_O, BPT_C, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_O, BPT_N, BPT_C, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_O, BPT_N, BPT_C, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
	BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N, BPT_N,
};

static const struct {
	rune k;
	enum uprop_bpt v;
} lookup[] = {
	{RUNE_C(0x000F3A), BPT_O},
	{RUNE_C(0x000F3B), BPT_C},
	{RUNE_C(0x000F3C), BPT_O},
	{RUNE_C(0x000F3D), BPT_C},
	{RUNE_C(0x00169B), BPT_O},
	{RUNE_C(0x00169C), BPT_C},
	{RUNE_C(0x002045), BPT_O},
	{RUNE_C(0x002046), BPT_C},
	{RUNE_C(0x00207D), BPT_O},
	{RUNE_C(0x00207E), BPT_C},
	{RUNE_C(0x00208D), BPT_O},
	{RUNE_C(0x00208E), BPT_C},
	{RUNE_C(0x002308), BPT_O},
	{RUNE_C(0x002309), BPT_C},
	{RUNE_C(0x00230A), BPT_O},
	{RUNE_C(0x00230B), BPT_C},
	{RUNE_C(0x002329), BPT_O},
	{RUNE_C(0x00232A), BPT_C},
	{RUNE_C(0x002768), BPT_O},
	{RUNE_C(0x002769), BPT_C},
	{RUNE_C(0x00276A), BPT_O},
	{RUNE_C(0x00276B), BPT_C},
	{RUNE_C(0x00276C), BPT_O},
	{RUNE_C(0x00276D), BPT_C},
	{RUNE_C(0x00276E), BPT_O},
	{RUNE_C(0x00276F), BPT_C},
	{RUNE_C(0x002770), BPT_O},
	{RUNE_C(0x002771), BPT_C},
	{RUNE_C(0x002772), BPT_O},
	{RUNE_C(0x002773), BPT_C},
	{RUNE_C(0x002774), BPT_O},
	{RUNE_C(0x002775), BPT_C},
	{RUNE_C(0x0027C5), BPT_O},
	{RUNE_C(0x0027C6), BPT_C},
	{RUNE_C(0x0027E6), BPT_O},
	{RUNE_C(0x0027E7), BPT_C},
	{RUNE_C(0x0027E8), BPT_O},
	{RUNE_C(0x0027E9), BPT_C},
	{RUNE_C(0x0027EA), BPT_O},
	{RUNE_C(0x0027EB), BPT_C},
	{RUNE_C(0x0027EC), BPT_O},
	{RUNE_C(0x0027ED), BPT_C},
	{RUNE_C(0x0027EE), BPT_O},
	{RUNE_C(0x0027EF), BPT_C},
	{RUNE_C(0x002983), BPT_O},
	{RUNE_C(0x002984), BPT_C},
	{RUNE_C(0x002985), BPT_O},
	{RUNE_C(0x002986), BPT_C},
	{RUNE_C(0x002987), BPT_O},
	{RUNE_C(0x002988), BPT_C},
	{RUNE_C(0x002989), BPT_O},
	{RUNE_C(0x00298A), BPT_C},
	{RUNE_C(0x00298B), BPT_O},
	{RUNE_C(0x00298C), BPT_C},
	{RUNE_C(0x00298D), BPT_O},
	{RUNE_C(0x00298E), BPT_C},
	{RUNE_C(0x00298F), BPT_O},
	{RUNE_C(0x002990), BPT_C},
	{RUNE_C(0x002991), BPT_O},
	{RUNE_C(0x002992), BPT_C},
	{RUNE_C(0x002993), BPT_O},
	{RUNE_C(0x002994), BPT_C},
	{RUNE_C(0x002995), BPT_O},
	{RUNE_C(0x002996), BPT_C},
	{RUNE_C(0x002997), BPT_O},
	{RUNE_C(0x002998), BPT_C},
	{RUNE_C(0x0029D8), BPT_O},
	{RUNE_C(0x0029D9), BPT_C},
	{RUNE_C(0x0029DA), BPT_O},
	{RUNE_C(0x0029DB), BPT_C},
	{RUNE_C(0x0029FC), BPT_O},
	{RUNE_C(0x0029FD), BPT_C},
	{RUNE_C(0x002E22), BPT_O},
	{RUNE_C(0x002E23), BPT_C},
	{RUNE_C(0x002E24), BPT_O},
	{RUNE_C(0x002E25), BPT_C},
	{RUNE_C(0x002E26), BPT_O},
	{RUNE_C(0x002E27), BPT_C},
	{RUNE_C(0x002E28), BPT_O},
	{RUNE_C(0x002E29), BPT_C},
	{RUNE_C(0x002E55), BPT_O},
	{RUNE_C(0x002E56), BPT_C},
	{RUNE_C(0x002E57), BPT_O},
	{RUNE_C(0x002E58), BPT_C},
	{RUNE_C(0x002E59), BPT_O},
	{RUNE_C(0x002E5A), BPT_C},
	{RUNE_C(0x002E5B), BPT_O},
	{RUNE_C(0x002E5C), BPT_C},
	{RUNE_C(0x003008), BPT_O},
	{RUNE_C(0x003009), BPT_C},
	{RUNE_C(0x00300A), BPT_O},
	{RUNE_C(0x00300B), BPT_C},
	{RUNE_C(0x00300C), BPT_O},
	{RUNE_C(0x00300D), BPT_C},
	{RUNE_C(0x00300E), BPT_O},
	{RUNE_C(0x00300F), BPT_C},
	{RUNE_C(0x003010), BPT_O},
	{RUNE_C(0x003011), BPT_C},
	{RUNE_C(0x003014), BPT_O},
	{RUNE_C(0x003015), BPT_C},
	{RUNE_C(0x003016), BPT_O},
	{RUNE_C(0x003017), BPT_C},
	{RUNE_C(0x003018), BPT_O},
	{RUNE_C(0x003019), BPT_C},
	{RUNE_C(0x00301A), BPT_O},
	{RUNE_C(0x00301B), BPT_C},
	{RUNE_C(0x00FE59), BPT_O},
	{RUNE_C(0x00FE5A), BPT_C},
	{RUNE_C(0x00FE5B), BPT_O},
	{RUNE_C(0x00FE5C), BPT_C},
	{RUNE_C(0x00FE5D), BPT_O},
	{RUNE_C(0x00FE5E), BPT_C},
	{RUNE_C(0x00FF08), BPT_O},
	{RUNE_C(0x00FF09), BPT_C},
	{RUNE_C(0x00FF3B), BPT_O},
	{RUNE_C(0x00FF3D), BPT_C},
	{RUNE_C(0x00FF5B), BPT_O},
	{RUNE_C(0x00FF5D), BPT_C},
	{RUNE_C(0x00FF5F), BPT_O},
	{RUNE_C(0x00FF60), BPT_C},
	{RUNE_C(0x00FF62), BPT_O},
	{RUNE_C(0x00FF63), BPT_C},
};

_MLIB_DEFINE_BSEARCH_KV(enum uprop_bpt, lookup, BPT_N)

enum uprop_bpt
uprop_get_bpt(rune ch)
{
	return ch < lengthof(lookup_lat1) ? lookup_lat1[ch] : mlib_lookup_kv(ch);
}