Commit | Line | Data |
58fbde93 |
1 | /* -*- buffer-read-only: t -*- |
2 | * |
3 | * regcharclass.h |
4 | * |
5 | * Copyright (C) 2007, by Larry Wall and others |
6 | * |
7 | * You may distribute under the terms of either the GNU General Public |
8 | * License or the Artistic License, as specified in the README file. |
9 | * |
10 | * !!!!!!! DO NOT EDIT THIS FILE !!!!!!! |
11 | * This file is built by Porting/regcharclass.pl. |
e64b1bd1 |
12 | * (Generated at: Fri Apr 27 12:34:16 2007 GMT) |
58fbde93 |
13 | * Any changes made here will be lost! |
14 | */ |
12b72891 |
15 | |
16 | /* |
17 | LNBREAK: Line Break: \R |
18 | |
58fbde93 |
19 | "\x0D\x0A" # CRLF - Network (Windows) line ending |
12b72891 |
20 | 0x0A # LF | LINE FEED |
21 | 0x0B # VT | VERTICAL TAB |
22 | 0x0C # FF | FORM FEED |
23 | 0x0D # CR | CARRIAGE RETURN |
24 | 0x85 # NEL | NEXT LINE |
25 | 0x2028 # LINE SEPARATOR |
26 | 0x2029 # PARAGRAPH SEPARATOR |
27 | */ |
28 | /*** GENERATED CODE ***/ |
29 | #define is_LNBREAK(s,is_utf8) \ |
e64b1bd1 |
30 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ |
31 | : ( 0x0D == ((U8*)s)[0] ) ? \ |
32 | ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ |
33 | : ( is_utf8 ) ? \ |
34 | ( ( 0xC2 == ((U8*)s)[0] ) ? \ |
35 | ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
36 | : ( 0xE2 == ((U8*)s)[0] ) ? \ |
37 | ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0xA8 == ((U8*)s)[2] || 0xA9 == ((U8*)s)[2] ) ) ? 3 : 0 )\ |
38 | : 0 ) \ |
39 | : ( 0x85 == ((U8*)s)[0] ) ) |
e1d1eefb |
40 | |
12b72891 |
41 | /*** GENERATED CODE ***/ |
42 | #define is_LNBREAK_safe(s,e,is_utf8) \ |
e64b1bd1 |
43 | ( ((e)-(s) > 2) ? \ |
44 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ |
45 | : ( 0x0D == ((U8*)s)[0] ) ? \ |
46 | ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ |
47 | : ( is_utf8 ) ? \ |
48 | ( ( 0xC2 == ((U8*)s)[0] ) ? \ |
49 | ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
50 | : ( 0xE2 == ((U8*)s)[0] ) ? \ |
51 | ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0xA8 == ((U8*)s)[2] || 0xA9 == ((U8*)s)[2] ) ) ? 3 : 0 )\ |
52 | : 0 ) \ |
53 | : ( 0x85 == ((U8*)s)[0] ) ) \ |
54 | : ((e)-(s) > 1) ? \ |
55 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ |
56 | : ( 0x0D == ((U8*)s)[0] ) ? \ |
57 | ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ |
58 | : ( is_utf8 ) ? \ |
59 | ( ( ( 0xC2 == ((U8*)s)[0] ) && ( 0x85 == ((U8*)s)[1] ) ) ? 2 : 0 ) \ |
60 | : ( 0x85 == ((U8*)s)[0] ) ) \ |
61 | : ((e)-(s) > 0) ? \ |
62 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ |
63 | : ( !( is_utf8 ) ) ? \ |
64 | ( 0x85 == ((U8*)s)[0] ) \ |
65 | : 0 ) \ |
66 | : 0 ) |
e1d1eefb |
67 | |
12b72891 |
68 | /*** GENERATED CODE ***/ |
69 | #define is_LNBREAK_utf8(s) \ |
e64b1bd1 |
70 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ |
71 | : ( 0x0D == ((U8*)s)[0] ) ? \ |
72 | ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ |
73 | : ( 0xC2 == ((U8*)s)[0] ) ? \ |
74 | ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
75 | : ( 0xE2 == ((U8*)s)[0] ) ? \ |
76 | ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0xA8 == ((U8*)s)[2] || 0xA9 == ((U8*)s)[2] ) ) ? 3 : 0 )\ |
77 | : 0 ) |
e1d1eefb |
78 | |
12b72891 |
79 | /*** GENERATED CODE ***/ |
80 | #define is_LNBREAK_utf8_safe(s,e) \ |
e64b1bd1 |
81 | ( ((e)-(s) > 2) ? \ |
82 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ |
83 | : ( 0x0D == ((U8*)s)[0] ) ? \ |
84 | ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ |
85 | : ( 0xC2 == ((U8*)s)[0] ) ? \ |
86 | ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
87 | : ( 0xE2 == ((U8*)s)[0] ) ? \ |
88 | ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0xA8 == ((U8*)s)[2] || 0xA9 == ((U8*)s)[2] ) ) ? 3 : 0 )\ |
89 | : 0 ) \ |
90 | : ((e)-(s) > 1) ? \ |
91 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ |
92 | : ( 0x0D == ((U8*)s)[0] ) ? \ |
93 | ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ |
94 | : ( 0xC2 == ((U8*)s)[0] ) ? \ |
95 | ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
96 | : 0 ) \ |
97 | : ((e)-(s) > 0) ? \ |
98 | ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) \ |
99 | : 0 ) |
e1d1eefb |
100 | |
12b72891 |
101 | /*** GENERATED CODE ***/ |
102 | #define is_LNBREAK_latin1(s) \ |
e64b1bd1 |
103 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ |
104 | : ( 0x0D == ((U8*)s)[0] ) ? \ |
105 | ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ |
106 | : ( 0x85 == ((U8*)s)[0] ) ) |
e1d1eefb |
107 | |
12b72891 |
108 | /*** GENERATED CODE ***/ |
109 | #define is_LNBREAK_latin1_safe(s,e) \ |
e64b1bd1 |
110 | ( ((e)-(s) > 1) ? \ |
111 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0C ) ? 1 \ |
112 | : ( 0x0D == ((U8*)s)[0] ) ? \ |
113 | ( ( 0x0A == ((U8*)s)[1] ) ? 2 : 1 ) \ |
114 | : ( 0x85 == ((U8*)s)[0] ) ) \ |
115 | : ((e)-(s) > 0) ? \ |
116 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x85 == ((U8*)s)[0] )\ |
117 | : 0 ) |
12b72891 |
118 | |
119 | /* |
120 | HORIZWS: Horizontal Whitespace: \h \H |
121 | |
122 | 0x09 # HT |
123 | 0x20 # SPACE |
124 | 0xa0 # NBSP |
125 | 0x1680 # OGHAM SPACE MARK |
126 | 0x180e # MONGOLIAN VOWEL SEPARATOR |
127 | 0x2000 # EN QUAD |
128 | 0x2001 # EM QUAD |
129 | 0x2002 # EN SPACE |
130 | 0x2003 # EM SPACE |
131 | 0x2004 # THREE-PER-EM SPACE |
132 | 0x2005 # FOUR-PER-EM SPACE |
133 | 0x2006 # SIX-PER-EM SPACE |
134 | 0x2007 # FIGURE SPACE |
135 | 0x2008 # PUNCTUATION SPACE |
136 | 0x2009 # THIN SPACE |
137 | 0x200A # HAIR SPACE |
138 | 0x202f # NARROW NO-BREAK SPACE |
139 | 0x205f # MEDIUM MATHEMATICAL SPACE |
140 | 0x3000 # IDEOGRAPHIC SPACE |
141 | */ |
142 | /*** GENERATED CODE ***/ |
143 | #define is_HORIZWS(s,is_utf8) \ |
e64b1bd1 |
144 | ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ |
145 | : ( is_utf8 ) ? \ |
146 | ( ( 0xC2 == ((U8*)s)[0] ) ? \ |
147 | ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
148 | : ( 0xE1 == ((U8*)s)[0] ) ? \ |
149 | ( ( 0x9A == ((U8*)s)[1] ) ? \ |
150 | ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ |
151 | : ( 0xA0 == ((U8*)s)[1] ) ? \ |
152 | ( ( 0x8E == ((U8*)s)[2] ) ? 3 : 0 ) \ |
153 | : 0 ) \ |
154 | : ( 0xE2 == ((U8*)s)[0] ) ? \ |
155 | ( ( 0x80 == ((U8*)s)[1] ) ? \ |
156 | ( ( ( 0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\ |
157 | : ( 0x81 == ((U8*)s)[1] ) ? \ |
158 | ( ( 0x9F == ((U8*)s)[2] ) ? 3 : 0 ) \ |
159 | : 0 ) \ |
160 | : ( 0xE3 == ((U8*)s)[0] ) ? \ |
161 | ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ |
162 | : 0 ) \ |
163 | : ( 0xA0 == ((U8*)s)[0] ) ) |
e1d1eefb |
164 | |
12b72891 |
165 | /*** GENERATED CODE ***/ |
166 | #define is_HORIZWS_safe(s,e,is_utf8) \ |
e64b1bd1 |
167 | ( ((e)-(s) > 2) ? \ |
168 | ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ |
169 | : ( is_utf8 ) ? \ |
170 | ( ( 0xC2 == ((U8*)s)[0] ) ? \ |
171 | ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
172 | : ( 0xE1 == ((U8*)s)[0] ) ? \ |
173 | ( ( 0x9A == ((U8*)s)[1] ) ? \ |
174 | ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ |
175 | : ( 0xA0 == ((U8*)s)[1] ) ? \ |
176 | ( ( 0x8E == ((U8*)s)[2] ) ? 3 : 0 ) \ |
177 | : 0 ) \ |
178 | : ( 0xE2 == ((U8*)s)[0] ) ? \ |
179 | ( ( 0x80 == ((U8*)s)[1] ) ? \ |
180 | ( ( ( 0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\ |
181 | : ( 0x81 == ((U8*)s)[1] ) ? \ |
182 | ( ( 0x9F == ((U8*)s)[2] ) ? 3 : 0 ) \ |
183 | : 0 ) \ |
184 | : ( 0xE3 == ((U8*)s)[0] ) ? \ |
185 | ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 )\ |
186 | : 0 ) \ |
187 | : ( 0xA0 == ((U8*)s)[0] ) ) \ |
188 | : ((e)-(s) > 1) ? \ |
189 | ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ |
190 | : ( is_utf8 ) ? \ |
191 | ( ( ( 0xC2 == ((U8*)s)[0] ) && ( 0xA0 == ((U8*)s)[1] ) ) ? 2 : 0 ) \ |
192 | : ( 0xA0 == ((U8*)s)[0] ) ) \ |
193 | : ((e)-(s) > 0) ? \ |
194 | ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ |
195 | : ( !( is_utf8 ) ) ? \ |
196 | ( 0xA0 == ((U8*)s)[0] ) \ |
197 | : 0 ) \ |
198 | : 0 ) |
e1d1eefb |
199 | |
12b72891 |
200 | /*** GENERATED CODE ***/ |
201 | #define is_HORIZWS_utf8(s) \ |
e64b1bd1 |
202 | ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ |
203 | : ( 0xC2 == ((U8*)s)[0] ) ? \ |
204 | ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
205 | : ( 0xE1 == ((U8*)s)[0] ) ? \ |
206 | ( ( 0x9A == ((U8*)s)[1] ) ? \ |
207 | ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ |
208 | : ( 0xA0 == ((U8*)s)[1] ) ? \ |
209 | ( ( 0x8E == ((U8*)s)[2] ) ? 3 : 0 ) \ |
210 | : 0 ) \ |
211 | : ( 0xE2 == ((U8*)s)[0] ) ? \ |
212 | ( ( 0x80 == ((U8*)s)[1] ) ? \ |
213 | ( ( ( 0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\ |
214 | : ( 0x81 == ((U8*)s)[1] ) ? \ |
215 | ( ( 0x9F == ((U8*)s)[2] ) ? 3 : 0 ) \ |
216 | : 0 ) \ |
217 | : ( 0xE3 == ((U8*)s)[0] ) ? \ |
218 | ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ |
219 | : 0 ) |
e1d1eefb |
220 | |
12b72891 |
221 | /*** GENERATED CODE ***/ |
222 | #define is_HORIZWS_utf8_safe(s,e) \ |
e64b1bd1 |
223 | ( ((e)-(s) > 2) ? \ |
224 | ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ |
225 | : ( 0xC2 == ((U8*)s)[0] ) ? \ |
226 | ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
227 | : ( 0xE1 == ((U8*)s)[0] ) ? \ |
228 | ( ( 0x9A == ((U8*)s)[1] ) ? \ |
229 | ( ( 0x80 == ((U8*)s)[2] ) ? 3 : 0 ) \ |
230 | : ( 0xA0 == ((U8*)s)[1] ) ? \ |
231 | ( ( 0x8E == ((U8*)s)[2] ) ? 3 : 0 ) \ |
232 | : 0 ) \ |
233 | : ( 0xE2 == ((U8*)s)[0] ) ? \ |
234 | ( ( 0x80 == ((U8*)s)[1] ) ? \ |
235 | ( ( ( 0x80 <= ((U8*)s)[2] && ((U8*)s)[2] <= 0x8A ) || 0xAF == ((U8*)s)[2] ) ? 3 : 0 )\ |
236 | : ( 0x81 == ((U8*)s)[1] ) ? \ |
237 | ( ( 0x9F == ((U8*)s)[2] ) ? 3 : 0 ) \ |
238 | : 0 ) \ |
239 | : ( 0xE3 == ((U8*)s)[0] ) ? \ |
240 | ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0x80 == ((U8*)s)[2] ) ) ? 3 : 0 ) \ |
241 | : 0 ) \ |
242 | : ((e)-(s) > 1) ? \ |
243 | ( ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) ? 1 \ |
244 | : ( 0xC2 == ((U8*)s)[0] ) ? \ |
245 | ( ( 0xA0 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
246 | : 0 ) \ |
247 | : ((e)-(s) > 0) ? \ |
248 | ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] ) \ |
249 | : 0 ) |
e1d1eefb |
250 | |
12b72891 |
251 | /*** GENERATED CODE ***/ |
252 | #define is_HORIZWS_latin1(s) \ |
e64b1bd1 |
253 | ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] || 0xA0 == ((U8*)s)[0] ) |
e1d1eefb |
254 | |
12b72891 |
255 | /*** GENERATED CODE ***/ |
256 | #define is_HORIZWS_latin1_safe(s,e) \ |
e64b1bd1 |
257 | ( ((e)-(s) > 0) ? \ |
258 | ( 0x09 == ((U8*)s)[0] || 0x20 == ((U8*)s)[0] || 0xA0 == ((U8*)s)[0] ) \ |
259 | : 0 ) |
e1d1eefb |
260 | |
12b72891 |
261 | /*** GENERATED CODE ***/ |
262 | #define is_HORIZWS_cp(cp) \ |
e64b1bd1 |
263 | ( 0x09 == cp || ( 0x09 < cp && \ |
264 | ( 0x20 == cp || ( 0x20 < cp && \ |
265 | ( 0xA0 == cp || ( 0xA0 < cp && \ |
266 | ( 0x1680 == cp || ( 0x1680 < cp && \ |
267 | ( 0x180E == cp || ( 0x180E < cp && \ |
268 | ( ( 0x2000 <= cp && cp <= 0x200A ) || ( 0x200A < cp && \ |
269 | ( 0x202F == cp || ( 0x202F < cp && \ |
270 | ( 0x205F == cp || ( 0x205F < cp && \ |
271 | 0x3000 == cp ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) |
e1d1eefb |
272 | |
12b72891 |
273 | /* |
274 | VERTWS: Vertical Whitespace: \v \V |
e1d1eefb |
275 | |
12b72891 |
276 | 0x0A # LF |
277 | 0x0B # VT |
58fbde93 |
278 | 0x0C # FF |
12b72891 |
279 | 0x0D # CR |
280 | 0x85 # NEL |
281 | 0x2028 # LINE SEPARATOR |
282 | 0x2029 # PARAGRAPH SEPARATOR |
283 | */ |
284 | /*** GENERATED CODE ***/ |
285 | #define is_VERTWS(s,is_utf8) \ |
e64b1bd1 |
286 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ |
287 | : ( is_utf8 ) ? \ |
288 | ( ( 0xC2 == ((U8*)s)[0] ) ? \ |
289 | ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
290 | : ( 0xE2 == ((U8*)s)[0] ) ? \ |
291 | ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0xA8 == ((U8*)s)[2] || 0xA9 == ((U8*)s)[2] ) ) ? 3 : 0 )\ |
292 | : 0 ) \ |
293 | : ( 0x85 == ((U8*)s)[0] ) ) |
e1d1eefb |
294 | |
12b72891 |
295 | /*** GENERATED CODE ***/ |
296 | #define is_VERTWS_safe(s,e,is_utf8) \ |
e64b1bd1 |
297 | ( ((e)-(s) > 2) ? \ |
298 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ |
299 | : ( is_utf8 ) ? \ |
300 | ( ( 0xC2 == ((U8*)s)[0] ) ? \ |
301 | ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
302 | : ( 0xE2 == ((U8*)s)[0] ) ? \ |
303 | ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0xA8 == ((U8*)s)[2] || 0xA9 == ((U8*)s)[2] ) ) ? 3 : 0 )\ |
304 | : 0 ) \ |
305 | : ( 0x85 == ((U8*)s)[0] ) ) \ |
306 | : ((e)-(s) > 1) ? \ |
307 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ |
308 | : ( is_utf8 ) ? \ |
309 | ( ( ( 0xC2 == ((U8*)s)[0] ) && ( 0x85 == ((U8*)s)[1] ) ) ? 2 : 0 ) \ |
310 | : ( 0x85 == ((U8*)s)[0] ) ) \ |
311 | : ((e)-(s) > 0) ? \ |
312 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ |
313 | : ( !( is_utf8 ) ) ? \ |
314 | ( 0x85 == ((U8*)s)[0] ) \ |
315 | : 0 ) \ |
316 | : 0 ) |
e1d1eefb |
317 | |
12b72891 |
318 | /*** GENERATED CODE ***/ |
319 | #define is_VERTWS_utf8(s) \ |
e64b1bd1 |
320 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ |
321 | : ( 0xC2 == ((U8*)s)[0] ) ? \ |
322 | ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
323 | : ( 0xE2 == ((U8*)s)[0] ) ? \ |
324 | ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0xA8 == ((U8*)s)[2] || 0xA9 == ((U8*)s)[2] ) ) ? 3 : 0 )\ |
325 | : 0 ) |
e1d1eefb |
326 | |
12b72891 |
327 | /*** GENERATED CODE ***/ |
328 | #define is_VERTWS_utf8_safe(s,e) \ |
e64b1bd1 |
329 | ( ((e)-(s) > 2) ? \ |
330 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ |
331 | : ( 0xC2 == ((U8*)s)[0] ) ? \ |
332 | ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
333 | : ( 0xE2 == ((U8*)s)[0] ) ? \ |
334 | ( ( ( 0x80 == ((U8*)s)[1] ) && ( 0xA8 == ((U8*)s)[2] || 0xA9 == ((U8*)s)[2] ) ) ? 3 : 0 )\ |
335 | : 0 ) \ |
336 | : ((e)-(s) > 1) ? \ |
337 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) ? 1 \ |
338 | : ( 0xC2 == ((U8*)s)[0] ) ? \ |
339 | ( ( 0x85 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
340 | : 0 ) \ |
341 | : ((e)-(s) > 0) ? \ |
342 | ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) \ |
343 | : 0 ) |
e1d1eefb |
344 | |
12b72891 |
345 | /*** GENERATED CODE ***/ |
346 | #define is_VERTWS_latin1(s) \ |
e64b1bd1 |
347 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x85 == ((U8*)s)[0] ) |
e1d1eefb |
348 | |
12b72891 |
349 | /*** GENERATED CODE ***/ |
350 | #define is_VERTWS_latin1_safe(s,e) \ |
e64b1bd1 |
351 | ( ((e)-(s) > 0) ? \ |
352 | ( ( 0x0A <= ((U8*)s)[0] && ((U8*)s)[0] <= 0x0D ) || 0x85 == ((U8*)s)[0] )\ |
353 | : 0 ) |
e1d1eefb |
354 | |
12b72891 |
355 | /*** GENERATED CODE ***/ |
356 | #define is_VERTWS_cp(cp) \ |
e64b1bd1 |
357 | ( ( 0x0A <= cp && cp <= 0x0D ) || ( 0x0D < cp && \ |
358 | ( 0x85 == cp || ( 0x85 < cp && \ |
359 | ( 0x2028 == cp || ( 0x2028 < cp && \ |
360 | 0x2029 == cp ) ) ) ) ) ) |
e1d1eefb |
361 | |
32e6a07c |
362 | /* |
363 | TRICKYFOLD: Problematic fold case letters. |
364 | |
e64b1bd1 |
365 | 0x00DF # LATIN1 SMALL LETTER SHARP S |
32e6a07c |
366 | 0x0390 # GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS |
367 | 0x03B0 # GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS |
368 | */ |
369 | /*** GENERATED CODE ***/ |
370 | #define is_TRICKYFOLD(s,is_utf8) \ |
e64b1bd1 |
371 | ( ( is_utf8 ) ? \ |
372 | ( ( 0xC3 == ((U8*)s)[0] ) ? \ |
373 | ( ( 0x9F == ((U8*)s)[1] ) ? 2 : 0 ) \ |
374 | : ( 0xCE == ((U8*)s)[0] ) ? \ |
375 | ( ( 0x90 == ((U8*)s)[1] || 0xB0 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
376 | : 0 ) \ |
377 | : ( 0xDF == ((U8*)s)[0] ) ) |
32e6a07c |
378 | |
379 | /*** GENERATED CODE ***/ |
380 | #define is_TRICKYFOLD_safe(s,e,is_utf8) \ |
e64b1bd1 |
381 | ( ((e)-(s) > 1) ? \ |
382 | ( ( is_utf8 ) ? \ |
383 | ( ( 0xC3 == ((U8*)s)[0] ) ? \ |
384 | ( ( 0x9F == ((U8*)s)[1] ) ? 2 : 0 ) \ |
385 | : ( 0xCE == ((U8*)s)[0] ) ? \ |
386 | ( ( 0x90 == ((U8*)s)[1] || 0xB0 == ((U8*)s)[1] ) ? 2 : 0 ) \ |
387 | : 0 ) \ |
388 | : ( 0xDF == ((U8*)s)[0] ) ) \ |
389 | : ((e)-(s) > 0) ? \ |
390 | ( ( !( is_utf8 ) ) ? \ |
391 | ( 0xDF == ((U8*)s)[0] ) \ |
392 | : 0 ) \ |
393 | : 0 ) |
32e6a07c |
394 | |
395 | /*** GENERATED CODE ***/ |
e64b1bd1 |
396 | #define is_TRICKYFOLD_cp(cp) \ |
397 | ( 0xDF == cp || ( 0xDF < cp && \ |
398 | ( 0x390 == cp || ( 0x390 < cp && \ |
399 | 0x3B0 == cp ) ) ) ) |
32e6a07c |
400 | |
401 | /*** GENERATED CODE ***/ |
e64b1bd1 |
402 | #define what_TRICKYFOLD(s,is_utf8) \ |
403 | ( ( is_utf8 ) ? \ |
404 | ( ( 0xC3 == ((U8*)s)[0] ) ? \ |
405 | ( ( 0x9F == ((U8*)s)[1] ) ? 0xDF : 0 ) \ |
406 | : ( 0xCE == ((U8*)s)[0] ) ? \ |
407 | ( ( 0x90 == ((U8*)s)[1] ) ? 0x390 \ |
408 | : ( 0xB0 == ((U8*)s)[1] ) ? 0x3B0 : 0 ) \ |
409 | : 0 ) \ |
410 | : ( 0xDF == ((U8*)s)[0] ) ? 0xDF : 0 ) |
32e6a07c |
411 | |
412 | /*** GENERATED CODE ***/ |
e64b1bd1 |
413 | #define what_TRICKYFOLD_safe(s,e,is_utf8) \ |
414 | ( ((e)-(s) > 1) ? \ |
415 | ( ( is_utf8 ) ? \ |
416 | ( ( 0xC3 == ((U8*)s)[0] ) ? \ |
417 | ( ( 0x9F == ((U8*)s)[1] ) ? 0xDF : 0 ) \ |
418 | : ( 0xCE == ((U8*)s)[0] ) ? \ |
419 | ( ( 0x90 == ((U8*)s)[1] ) ? 0x390 \ |
420 | : ( 0xB0 == ((U8*)s)[1] ) ? 0x3B0 : 0 ) \ |
421 | : 0 ) \ |
422 | : ( 0xDF == ((U8*)s)[0] ) ? 0xDF : 0 ) \ |
423 | : ((e)-(s) > 0) ? \ |
424 | ( ( ( !( is_utf8 ) ) && ( 0xDF == ((U8*)s)[0] ) ) ? 0xDF : 0 ) \ |
425 | : 0 ) |
32e6a07c |
426 | |
427 | /*** GENERATED CODE ***/ |
e64b1bd1 |
428 | #define what_len_TRICKYFOLD(s,is_utf8,len) \ |
429 | ( ( is_utf8 ) ? \ |
430 | ( ( 0xC3 == ((U8*)s)[0] ) ? \ |
431 | ( ( 0x9F == ((U8*)s)[1] ) ? len=2, 0xDF : 0 ) \ |
432 | : ( 0xCE == ((U8*)s)[0] ) ? \ |
433 | ( ( 0x90 == ((U8*)s)[1] ) ? len=2, 0x390 \ |
434 | : ( 0xB0 == ((U8*)s)[1] ) ? len=2, 0x3B0 : 0 ) \ |
435 | : 0 ) \ |
436 | : ( 0xDF == ((U8*)s)[0] ) ? len=1, 0xDF : 0 ) |
32e6a07c |
437 | |
438 | /*** GENERATED CODE ***/ |
e64b1bd1 |
439 | #define what_len_TRICKYFOLD_safe(s,e,is_utf8,len) \ |
440 | ( ((e)-(s) > 1) ? \ |
441 | ( ( is_utf8 ) ? \ |
442 | ( ( 0xC3 == ((U8*)s)[0] ) ? \ |
443 | ( ( 0x9F == ((U8*)s)[1] ) ? len=2, 0xDF : 0 ) \ |
444 | : ( 0xCE == ((U8*)s)[0] ) ? \ |
445 | ( ( 0x90 == ((U8*)s)[1] ) ? len=2, 0x390 \ |
446 | : ( 0xB0 == ((U8*)s)[1] ) ? len=2, 0x3B0 : 0 ) \ |
447 | : 0 ) \ |
448 | : ( 0xDF == ((U8*)s)[0] ) ? len=1, 0xDF : 0 ) \ |
449 | : ((e)-(s) > 0) ? \ |
450 | ( ( ( !( is_utf8 ) ) && ( 0xDF == ((U8*)s)[0] ) ) ? len=1, 0xDF : 0 ) \ |
451 | : 0 ) |
32e6a07c |
452 | |
58fbde93 |
453 | /* ex: set ro: */ |