aboutsummaryrefslogtreecommitdiff
path: root/lib/unicode/prop/uprop_get_bpb.c
blob: 2b7eb10fdf6278ac32b3b70f7ce397f109b30d06 (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
/* This file is autogenerated by gen/prop/bpb; DO NOT EDIT. */

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

static constexpr rune lookup_lat1[] = {
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x29, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x5D, 0x00, 0x5B, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x7D, 0x00, 0x7B, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};

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

_MLIB_DEFINE_BSEARCH_KV(rune, lookup, 0)

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