Line | Source Code | Coverage |
---|
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | static const pcre_uint8 coptable[] = { | - |
8 | 0, | - |
9 | 0, 0, 0, 0, 0, | - |
10 | 0, 0, 0, 0, 0, 0, | - |
11 | 0, 0, 0, | - |
12 | 0, 0, | - |
13 | 0, 0, 0, 0, 0, | - |
14 | 0, | - |
15 | 0, 0, 0, 0, 0, 0, | - |
16 | 1, | - |
17 | 1, | - |
18 | 1, | - |
19 | 1, | - |
20 | | - |
21 | 1, 1, 1, 1, 1, 1, | - |
22 | 1+1, 1+1, | - |
23 | 1+1, | - |
24 | 1, 1, 1, 1+1, | - |
25 | 1, 1, 1, 1, 1, 1, | - |
26 | 1+1, 1+1, | - |
27 | 1+1, | - |
28 | 1, 1, 1, 1+1, | - |
29 | | - |
30 | 1, 1, 1, 1, 1, 1, | - |
31 | 1+1, 1+1, | - |
32 | 1+1, | - |
33 | 1, 1, 1, 1+1, | - |
34 | 1, 1, 1, 1, 1, 1, | - |
35 | 1+1, 1+1, | - |
36 | 1+1, | - |
37 | 1, 1, 1, 1+1, | - |
38 | | - |
39 | 1, 1, 1, 1, 1, 1, | - |
40 | 1+1, 1+1, | - |
41 | 1+1, | - |
42 | 1, 1, 1, 1+1, | - |
43 | | - |
44 | 0, 0, 0, 0, 0, 0, | - |
45 | 0, 0, | - |
46 | 0, | - |
47 | 0, | - |
48 | 0, | - |
49 | 0, | - |
50 | 0, | - |
51 | 0, | - |
52 | 0, | - |
53 | 0, | - |
54 | 0, | - |
55 | 0, | - |
56 | 0, | - |
57 | 0, | - |
58 | 0, | - |
59 | 0, | - |
60 | 0, | - |
61 | 0, | - |
62 | 0, | - |
63 | 0, 0, | - |
64 | 0, 0, 0, 0, 0, | - |
65 | 0, 0, 0, 0, 0, | - |
66 | 0, 0, | - |
67 | 0, 0, | - |
68 | 0, | - |
69 | 0, 0, 0, | - |
70 | 0, 0, 0, | - |
71 | 0, 0, 0, 0, | - |
72 | 0, 0, 0, 0, | - |
73 | 0, 0 | - |
74 | }; | - |
75 | | - |
76 | | - |
77 | | - |
78 | | - |
79 | | - |
80 | | - |
81 | static const pcre_uint8 poptable[] = { | - |
82 | 0, | - |
83 | 0, 0, 0, 1, 1, | - |
84 | 1, 1, 1, 1, 1, 1, | - |
85 | 1, 1, 1, | - |
86 | 1, 1, | - |
87 | 1, 1, 1, 1, 1, | - |
88 | 1, | - |
89 | 0, 0, 0, 0, 0, 0, | - |
90 | 1, | - |
91 | 1, | - |
92 | 1, | - |
93 | 1, | - |
94 | | - |
95 | 1, 1, 1, 1, 1, 1, | - |
96 | 1, 1, 1, | - |
97 | 1, 1, 1, 1, | - |
98 | 1, 1, 1, 1, 1, 1, | - |
99 | 1, 1, 1, | - |
100 | 1, 1, 1, 1, | - |
101 | | - |
102 | 1, 1, 1, 1, 1, 1, | - |
103 | 1, 1, 1, | - |
104 | 1, 1, 1, 1, | - |
105 | 1, 1, 1, 1, 1, 1, | - |
106 | 1, 1, 1, | - |
107 | 1, 1, 1, 1, | - |
108 | | - |
109 | 1, 1, 1, 1, 1, 1, | - |
110 | 1, 1, 1, | - |
111 | 1, 1, 1, 1, | - |
112 | | - |
113 | 1, 1, 1, 1, 1, 1, | - |
114 | 1, 1, | - |
115 | 1, | - |
116 | 1, | - |
117 | 1, | - |
118 | 0, | - |
119 | 0, | - |
120 | 0, | - |
121 | 0, | - |
122 | 0, | - |
123 | 0, | - |
124 | 0, | - |
125 | 0, | - |
126 | 0, | - |
127 | 0, | - |
128 | 0, | - |
129 | 0, | - |
130 | 0, | - |
131 | 0, | - |
132 | 0, 0, | - |
133 | 0, 0, 0, 0, 0, | - |
134 | 0, 0, 0, 0, 0, | - |
135 | 0, 0, | - |
136 | 0, 0, | - |
137 | 0, | - |
138 | 0, 0, 0, | - |
139 | 0, 0, 0, | - |
140 | 0, 0, 0, 0, | - |
141 | 0, 0, 0, 0, | - |
142 | 0, 0 | - |
143 | }; | - |
144 | | - |
145 | | - |
146 | | - |
147 | | - |
148 | static const pcre_uint8 toptable1[] = { | - |
149 | 0, 0, 0, 0, 0, 0, | - |
150 | 0x04, 0x04, | - |
151 | 0x01, 0x01, | - |
152 | 0x10, 0x10, | - |
153 | 0, 0 | - |
154 | }; | - |
155 | | - |
156 | static const pcre_uint8 toptable2[] = { | - |
157 | 0, 0, 0, 0, 0, 0, | - |
158 | 0x04, 0, | - |
159 | 0x01, 0, | - |
160 | 0x10, 0, | - |
161 | 1, 1 | - |
162 | }; | - |
163 | | - |
164 | | - |
165 | | - |
166 | | - |
167 | | - |
168 | | - |
169 | | - |
170 | typedef struct stateblock { | - |
171 | int offset; | - |
172 | int count; | - |
173 | int data; | - |
174 | } stateblock; | - |
175 | static int | - |
176 | internal_dfa_exec( | - |
177 | dfa_match_data *md, | - |
178 | const pcre_uchar *this_start_code, | - |
179 | const pcre_uchar *current_subject, | - |
180 | int start_offset, | - |
181 | int *offsets, | - |
182 | int offsetcount, | - |
183 | int *workspace, | - |
184 | int wscount, | - |
185 | int rlevel) | - |
186 | { | - |
187 | stateblock *active_states, *new_states, *temp_states; | - |
188 | stateblock *next_active_state, *next_new_state; | - |
189 | | - |
190 | const pcre_uint8 *ctypes, *lcc, *fcc; | - |
191 | const pcre_uchar *ptr; | - |
192 | const pcre_uchar *end_code, *first_op; | - |
193 | | - |
194 | dfa_recursion_info new_recursive; | - |
195 | | - |
196 | int active_count, new_count, match_count; | - |
197 | | - |
198 | | - |
199 | | - |
200 | | - |
201 | const pcre_uchar *start_subject = md->start_subject; | - |
202 | const pcre_uchar *end_subject = md->end_subject; | - |
203 | const pcre_uchar *start_code = md->start_code; | - |
204 | | - |
205 | | - |
206 | BOOL utf = (md->poptions & 0x00000800) != 0; | - |
207 | | - |
208 | | - |
209 | | - |
210 | | - |
211 | rlevel++; | - |
212 | offsetcount &= (-2); | - |
213 | | - |
214 | wscount -= 2; | - |
215 | wscount = (wscount - (wscount % ((sizeof(stateblock)/sizeof(int)) * 2))) / | - |
216 | (2 * (sizeof(stateblock)/sizeof(int))); | - |
217 | | - |
218 | ; | - |
219 | | - |
220 | | - |
221 | | - |
222 | ctypes = md->tables + (512 + 320); | - |
223 | lcc = md->tables + 0; | - |
224 | fcc = md->tables + 256; | - |
225 | | - |
226 | match_count = (-1); | - |
227 | | - |
228 | active_states = (stateblock *)(workspace + 2); | - |
229 | next_new_state = new_states = active_states + wscount; | - |
230 | new_count = 0; | - |
231 | | - |
232 | first_op = this_start_code + 1 + 1 + | - |
233 | ((*this_start_code == OP_CBRA || *this_start_code == OP_SCBRA || never evaluated: *this_start_code == OP_CBRA never evaluated: *this_start_code == OP_SCBRA | 0 |
234 | *this_start_code == OP_CBRAPOS || *this_start_code == OP_SCBRAPOS) never evaluated: *this_start_code == OP_CBRAPOS never evaluated: *this_start_code == OP_SCBRAPOS | 0 |
235 | ? 1:0); | - |
236 | if (*first_op == OP_REVERSE) never evaluated: *first_op == OP_REVERSE | 0 |
237 | { | - |
238 | int max_back = 0; | - |
239 | int gone_back; | - |
240 | | - |
241 | end_code = this_start_code; | - |
242 | do | - |
243 | { | - |
244 | int back = (end_code[2+1]); | - |
245 | if (back > max_back) max_back = back; never executed: max_back = back; never evaluated: back > max_back | 0 |
246 | end_code += (end_code[1]); | - |
247 | } | 0 |
248 | while (*end_code == OP_ALT); never evaluated: *end_code == OP_ALT | 0 |
249 | | - |
250 | | - |
251 | | - |
252 | | - |
253 | | - |
254 | | - |
255 | | - |
256 | if (utf) | 0 |
257 | { | - |
258 | for (gone_back = 0; gone_back < max_back; gone_back++) never evaluated: gone_back < max_back | 0 |
259 | { | - |
260 | if (current_subject <= start_subject) break; never evaluated: current_subject <= start_subject | 0 |
261 | current_subject--; | - |
262 | if ((current_subject > start_subject) && ((*current_subject) & 0xfc00) == 0xdc00) current_subject--; never evaluated: (current_subject > start_subject) never evaluated: ((*current_subject) & 0xfc00) == 0xdc00 never executed: current_subject--; | 0 |
263 | } | 0 |
264 | } | 0 |
265 | else | - |
266 | | - |
267 | | - |
268 | | - |
269 | | - |
270 | { | - |
271 | gone_back = (current_subject - max_back < start_subject)? never evaluated: (current_subject - max_back < start_subject) | 0 |
272 | (int)(current_subject - start_subject) : max_back; | - |
273 | current_subject -= gone_back; | - |
274 | } | 0 |
275 | | - |
276 | | - |
277 | | - |
278 | if (current_subject < md->start_used_ptr) never evaluated: current_subject < md->start_used_ptr | 0 |
279 | md->start_used_ptr = current_subject; never executed: md->start_used_ptr = current_subject; | 0 |
280 | | - |
281 | | - |
282 | | - |
283 | end_code = this_start_code; | - |
284 | do | - |
285 | { | - |
286 | int back = (end_code[2+1]); | - |
287 | if (back <= gone_back) never evaluated: back <= gone_back | 0 |
288 | { | - |
289 | int bstate = (int)(end_code - start_code + 2 + 2*1); | - |
290 | if (new_count++ < wscount) { next_new_state->offset = (-bstate); next_new_state->count = (0); next_new_state->data = (gone_back - back); next_new_state++; ; } else return (-19); never evaluated: new_count++ < wscount never executed: return (-19); | 0 |
291 | } | - |
292 | end_code += (end_code[1]); | - |
293 | } | 0 |
294 | while (*end_code == OP_ALT); never evaluated: *end_code == OP_ALT | 0 |
295 | } | 0 |
296 | | - |
297 | | - |
298 | | - |
299 | | - |
300 | | - |
301 | | - |
302 | | - |
303 | else | - |
304 | { | - |
305 | end_code = this_start_code; | - |
306 | | - |
307 | | - |
308 | | - |
309 | if (rlevel == 1 && (md->moptions & 0x00020000) != 0) never evaluated: rlevel == 1 never evaluated: (md->moptions & 0x00020000) != 0 | 0 |
310 | { | - |
311 | do { end_code += (end_code[1]); } while (*end_code == OP_ALT); never evaluated: *end_code == OP_ALT | 0 |
312 | new_count = workspace[1]; | - |
313 | if (!workspace[0]) never evaluated: !workspace[0] | 0 |
314 | memcpy(new_states, active_states, new_count * sizeof(stateblock)); never executed: memcpy(new_states, active_states, new_count * sizeof(stateblock)); | 0 |
315 | } | 0 |
316 | | - |
317 | | - |
318 | | - |
319 | else | - |
320 | { | - |
321 | int length = 1 + 1 + | - |
322 | ((*this_start_code == OP_CBRA || *this_start_code == OP_SCBRA || never evaluated: *this_start_code == OP_CBRA never evaluated: *this_start_code == OP_SCBRA | 0 |
323 | *this_start_code == OP_CBRAPOS || *this_start_code == OP_SCBRAPOS) never evaluated: *this_start_code == OP_CBRAPOS never evaluated: *this_start_code == OP_SCBRAPOS | 0 |
324 | ? 1:0); | - |
325 | do | - |
326 | { | - |
327 | if (new_count++ < wscount) { next_new_state->offset = ((int)(end_code - start_code + length)); next_new_state->count = (0); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
328 | end_code += (end_code[1]); | - |
329 | length = 1 + 1; | - |
330 | } | 0 |
331 | while (*end_code == OP_ALT); never evaluated: *end_code == OP_ALT | 0 |
332 | } | 0 |
333 | } | - |
334 | | - |
335 | workspace[0] = 0; | - |
336 | | - |
337 | ; | - |
338 | | - |
339 | | - |
340 | | - |
341 | ptr = current_subject; | - |
342 | for (;;) | - |
343 | { | - |
344 | int i, j; | - |
345 | int clen, dlen; | - |
346 | unsigned int c, d; | - |
347 | int forced_fail = 0; | - |
348 | BOOL could_continue = 0; | - |
349 | | - |
350 | | - |
351 | | - |
352 | | - |
353 | temp_states = active_states; | - |
354 | active_states = new_states; | - |
355 | new_states = temp_states; | - |
356 | active_count = new_count; | - |
357 | new_count = 0; | - |
358 | | - |
359 | workspace[0] ^= 1; | - |
360 | workspace[1] = active_count; | - |
361 | next_active_state = active_states + active_count; | - |
362 | next_new_state = new_states; | - |
363 | | - |
364 | | - |
365 | | - |
366 | | - |
367 | | - |
368 | if (ptr < end_subject) never evaluated: ptr < end_subject | 0 |
369 | { | - |
370 | clen = 1; | - |
371 | | - |
372 | if (utf) { c = *ptr; if ((c & 0xfc00) == 0xd800) { c = (((c & 0x3ff) << 10) | (ptr[1] & 0x3ff)) + 0x10000; clen++; };; } else never evaluated: (c & 0xfc00) == 0xd800 | 0 |
373 | | - |
374 | c = *ptr; never executed: c = *ptr; | 0 |
375 | } | - |
376 | else | - |
377 | { | - |
378 | clen = 0; | - |
379 | c = 0xffffffff; | - |
380 | } | 0 |
381 | | - |
382 | | - |
383 | | - |
384 | | - |
385 | | - |
386 | | - |
387 | for (i = 0; i < active_count; i++) never evaluated: i < active_count | 0 |
388 | { | - |
389 | stateblock *current_state = active_states + i; | - |
390 | BOOL caseless = 0; | - |
391 | const pcre_uchar *code; | - |
392 | int state_offset = current_state->offset; | - |
393 | int count, codevalue, rrc; | - |
394 | if (state_offset < 0) never evaluated: state_offset < 0 | 0 |
395 | { | - |
396 | if (current_state->data > 0) never evaluated: current_state->data > 0 | 0 |
397 | { | - |
398 | ; | - |
399 | if (new_count++ < wscount) { next_new_state->offset = (state_offset); next_new_state->count = (current_state->count); next_new_state->data = (current_state->data - 1); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
400 | | - |
401 | continue; never executed: continue; | 0 |
402 | } | - |
403 | else | - |
404 | { | - |
405 | current_state->offset = state_offset = -state_offset; | - |
406 | } | 0 |
407 | } | - |
408 | | - |
409 | | - |
410 | | - |
411 | | - |
412 | | - |
413 | for (j = 0; j < i; j++) | 0 |
414 | { | - |
415 | if (active_states[j].offset == state_offset && never evaluated: active_states[j].offset == state_offset | 0 |
416 | active_states[j].count == current_state->count) never evaluated: active_states[j].count == current_state->count | 0 |
417 | { | - |
418 | ; | - |
419 | goto NEXT_ACTIVE_STATE; never executed: goto NEXT_ACTIVE_STATE; | 0 |
420 | } | - |
421 | } | 0 |
422 | | - |
423 | | - |
424 | | - |
425 | code = start_code + state_offset; | - |
426 | codevalue = *code; | - |
427 | | - |
428 | | - |
429 | | - |
430 | | - |
431 | if (clen == 0 && poptable[codevalue] != 0) never evaluated: clen == 0 never evaluated: poptable[codevalue] != 0 | 0 |
432 | could_continue = 1; never executed: could_continue = 1; | 0 |
433 | if (coptable[codevalue] > 0) never evaluated: coptable[codevalue] > 0 | 0 |
434 | { | - |
435 | dlen = 1; | - |
436 | | - |
437 | if (utf) { d = *(code + coptable[codevalue]); if ((d & 0xfc00) == 0xd800) { d = (((d & 0x3ff) << 10) | ((code + coptable[codevalue])[1] & 0x3ff)) + 0x10000; dlen++; };; } else never evaluated: (d & 0xfc00) == 0xd800 | 0 |
438 | | - |
439 | d = code[coptable[codevalue]]; never executed: d = code[coptable[codevalue]]; | 0 |
440 | if (codevalue >= OP_TYPESTAR) never evaluated: codevalue >= OP_TYPESTAR | 0 |
441 | { | - |
442 | switch(d) | - |
443 | { | - |
444 | case OP_ANYBYTE: return (-16); never executed: return (-16); | 0 |
445 | case OP_NOTPROP: | - |
446 | case OP_PROP: codevalue += 300; break; | 0 |
447 | case OP_ANYNL: codevalue += 340; break; | 0 |
448 | case OP_EXTUNI: codevalue += 320; break; | 0 |
449 | case OP_NOT_HSPACE: | - |
450 | case OP_HSPACE: codevalue += 360; break; | 0 |
451 | case OP_NOT_VSPACE: | - |
452 | case OP_VSPACE: codevalue += 380; break; | 0 |
453 | default: break; | 0 |
454 | } | - |
455 | } | 0 |
456 | } | 0 |
457 | else | - |
458 | { | - |
459 | dlen = 0; | - |
460 | d = 0xffffffff; | - |
461 | } | 0 |
462 | | - |
463 | | - |
464 | | - |
465 | | - |
466 | switch (codevalue) | - |
467 | { | - |
468 | | - |
469 | | - |
470 | | - |
471 | | - |
472 | | - |
473 | | - |
474 | | - |
475 | case OP_TABLE_LENGTH: | - |
476 | case OP_TABLE_LENGTH + | - |
477 | ((sizeof(coptable) == OP_TABLE_LENGTH) && | - |
478 | (sizeof(poptable) == OP_TABLE_LENGTH)): | - |
479 | break; | 0 |
480 | case OP_KET: | - |
481 | case OP_KETRMIN: | - |
482 | case OP_KETRMAX: | - |
483 | case OP_KETRPOS: | - |
484 | if (code != end_code) never evaluated: code != end_code | 0 |
485 | { | - |
486 | if (active_count++ < wscount) { next_active_state->offset = (state_offset + 1 + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
487 | if (codevalue != OP_KET) never evaluated: codevalue != OP_KET | 0 |
488 | { | - |
489 | if (active_count++ < wscount) { next_active_state->offset = (state_offset - (code[1])); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
490 | } | - |
491 | } | 0 |
492 | else | - |
493 | { | - |
494 | if (ptr > current_subject || never evaluated: ptr > current_subject | 0 |
495 | ((md->moptions & 0x00000400) == 0 && never evaluated: (md->moptions & 0x00000400) == 0 | 0 |
496 | ((md->moptions & 0x10000000) == 0 || never evaluated: (md->moptions & 0x10000000) == 0 | 0 |
497 | current_subject > start_subject + md->start_offset))) never evaluated: current_subject > start_subject + md->start_offset | 0 |
498 | { | - |
499 | if (match_count < 0) match_count = (offsetcount >= 2)? 1 : 0; never evaluated: (offsetcount >= 2) never executed: match_count = (offsetcount >= 2)? 1 : 0; never evaluated: match_count < 0 | 0 |
500 | else if (match_count > 0 && ++match_count * 2 > offsetcount) never evaluated: match_count > 0 never evaluated: ++match_count * 2 > offsetcount | 0 |
501 | match_count = 0; never executed: match_count = 0; | 0 |
502 | count = ((match_count == 0)? offsetcount : match_count * 2) - 2; never evaluated: (match_count == 0) | 0 |
503 | if (count > 0) memmove(offsets + 2, offsets, count * sizeof(int)); never executed: memmove(offsets + 2, offsets, count * sizeof(int)); never evaluated: count > 0 | 0 |
504 | if (offsetcount >= 2) never evaluated: offsetcount >= 2 | 0 |
505 | { | - |
506 | offsets[0] = (int)(current_subject - start_subject); | - |
507 | offsets[1] = (int)(ptr - start_subject); | - |
508 | ; | - |
509 | | - |
510 | } | 0 |
511 | if ((md->moptions & 0x00010000) != 0) never evaluated: (md->moptions & 0x00010000) != 0 | 0 |
512 | { | - |
513 | ; | - |
514 | | - |
515 | | - |
516 | return match_count; never executed: return match_count; | 0 |
517 | } | - |
518 | } | 0 |
519 | } | 0 |
520 | break; | 0 |
521 | | - |
522 | | - |
523 | | - |
524 | | - |
525 | | - |
526 | | - |
527 | case OP_ALT: | - |
528 | do { code += (code[1]); } while (*code == OP_ALT); never evaluated: *code == OP_ALT | 0 |
529 | if (active_count++ < wscount) { next_active_state->offset = ((int)(code - start_code)); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
530 | break; | 0 |
531 | | - |
532 | | - |
533 | case OP_BRA: | - |
534 | case OP_SBRA: | - |
535 | do | - |
536 | { | - |
537 | if (active_count++ < wscount) { next_active_state->offset = ((int)(code - start_code + 1 + 1)); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
538 | code += (code[1]); | - |
539 | } | 0 |
540 | while (*code == OP_ALT); never evaluated: *code == OP_ALT | 0 |
541 | break; | 0 |
542 | | - |
543 | | - |
544 | case OP_CBRA: | - |
545 | case OP_SCBRA: | - |
546 | if (active_count++ < wscount) { next_active_state->offset = ((int)(code - start_code + 1 + 1 + 1)); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
547 | code += (code[1]); | - |
548 | while (*code == OP_ALT) never evaluated: *code == OP_ALT | 0 |
549 | { | - |
550 | if (active_count++ < wscount) { next_active_state->offset = ((int)(code - start_code + 1 + 1)); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
551 | code += (code[1]); | - |
552 | } | 0 |
553 | break; | 0 |
554 | | - |
555 | | - |
556 | case OP_BRAZERO: | - |
557 | case OP_BRAMINZERO: | - |
558 | if (active_count++ < wscount) { next_active_state->offset = (state_offset + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
559 | code += 1 + (code[2]); | - |
560 | while (*code == OP_ALT) code += (code[1]); never evaluated: *code == OP_ALT never executed: code += (code[1]); | 0 |
561 | if (active_count++ < wscount) { next_active_state->offset = ((int)(code - start_code + 1 + 1)); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
562 | break; | 0 |
563 | | - |
564 | | - |
565 | case OP_SKIPZERO: | - |
566 | code += 1 + (code[2]); | - |
567 | while (*code == OP_ALT) code += (code[1]); never evaluated: *code == OP_ALT never executed: code += (code[1]); | 0 |
568 | if (active_count++ < wscount) { next_active_state->offset = ((int)(code - start_code + 1 + 1)); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
569 | break; | 0 |
570 | | - |
571 | | - |
572 | case OP_CIRC: | - |
573 | if (ptr == start_subject && (md->moptions & 0x00000080) == 0) never evaluated: ptr == start_subject never evaluated: (md->moptions & 0x00000080) == 0 | 0 |
574 | { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
575 | break; | 0 |
576 | | - |
577 | | - |
578 | case OP_CIRCM: | - |
579 | if ((ptr == start_subject && (md->moptions & 0x00000080) == 0) || never evaluated: ptr == start_subject never evaluated: (md->moptions & 0x00000080) == 0 | 0 |
580 | (ptr != end_subject && ((md->nltype != 0)? ((ptr) > md->start_subject && _pcre16_was_newline((ptr), md->nltype, md->start_subject, &(md->nllen), utf)) : ((ptr) >= md->start_subject + md->nllen && (ptr)[-md->nllen] == md->nl[0] && (md->nllen == 1 || (ptr)[-md->nllen+1] == md->nl[1]) ) ))) never evaluated: ptr != end_subject never evaluated: (md->nltype != 0) | 0 |
581 | { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
582 | break; | 0 |
583 | | - |
584 | | - |
585 | case OP_EOD: | - |
586 | if (ptr >= end_subject) never evaluated: ptr >= end_subject | 0 |
587 | { | - |
588 | if ((md->moptions & 0x08000000) != 0) never evaluated: (md->moptions & 0x08000000) != 0 | 0 |
589 | could_continue = 1; never executed: could_continue = 1; | 0 |
590 | else { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
591 | } | - |
592 | break; | 0 |
593 | | - |
594 | | - |
595 | case OP_SOD: | - |
596 | if (ptr == start_subject) { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never evaluated: ptr == start_subject never evaluated: active_count++ < wscount never executed: return (-19); | 0 |
597 | break; | 0 |
598 | | - |
599 | | - |
600 | case OP_SOM: | - |
601 | if (ptr == start_subject + start_offset) { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never evaluated: ptr == start_subject + start_offset never evaluated: active_count++ < wscount never executed: return (-19); | 0 |
602 | break; | 0 |
603 | case OP_ANY: | - |
604 | if (clen > 0 && !((md->nltype != 0)? ((ptr) < md->end_subject && _pcre16_is_newline((ptr), md->nltype, md->end_subject, &(md->nllen), utf)) : ((ptr) <= md->end_subject - md->nllen && (ptr)[0] == md->nl[0] && (md->nllen == 1 || (ptr)[1] == md->nl[1]) ) )) never evaluated: clen > 0 never evaluated: (md->nltype != 0) | 0 |
605 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never evaluated: new_count++ < wscount never executed: return (-19); | 0 |
606 | break; | 0 |
607 | | - |
608 | | - |
609 | case OP_ALLANY: | - |
610 | if (clen > 0) never evaluated: clen > 0 | 0 |
611 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
612 | break; | 0 |
613 | | - |
614 | | - |
615 | case OP_EODN: | - |
616 | if (clen == 0 && (md->moptions & 0x08000000) != 0) never evaluated: clen == 0 never evaluated: (md->moptions & 0x08000000) != 0 | 0 |
617 | could_continue = 1; never executed: could_continue = 1; | 0 |
618 | else if (clen == 0 || (((md->nltype != 0)? ((ptr) < md->end_subject && _pcre16_is_newline((ptr), md->nltype, md->end_subject, &(md->nllen), utf)) : ((ptr) <= md->end_subject - md->nllen && (ptr)[0] == md->nl[0] && (md->nllen == 1 || (ptr)[1] == md->nl[1]) ) ) && ptr == end_subject - md->nllen)) never evaluated: clen == 0 never evaluated: (md->nltype != 0) never evaluated: ptr == end_subject - md->nllen | 0 |
619 | { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
620 | break; | 0 |
621 | | - |
622 | | - |
623 | case OP_DOLL: | - |
624 | if ((md->moptions & 0x00000100) == 0) never evaluated: (md->moptions & 0x00000100) == 0 | 0 |
625 | { | - |
626 | if (clen == 0 && (md->moptions & 0x08000000) != 0) never evaluated: clen == 0 never evaluated: (md->moptions & 0x08000000) != 0 | 0 |
627 | could_continue = 1; never executed: could_continue = 1; | 0 |
628 | else if (clen == 0 || never evaluated: clen == 0 | 0 |
629 | ((md->poptions & 0x00000020) == 0 && ((md->nltype != 0)? ((ptr) < md->end_subject && _pcre16_is_newline((ptr), md->nltype, md->end_subject, &(md->nllen), utf)) : ((ptr) <= md->end_subject - md->nllen && (ptr)[0] == md->nl[0] && (md->nllen == 1 || (ptr)[1] == md->nl[1]) ) ) && never evaluated: (md->poptions & 0x00000020) == 0 never evaluated: (md->nltype != 0) | 0 |
630 | (ptr == end_subject - md->nllen) never evaluated: (ptr == end_subject - md->nllen) | 0 |
631 | )) | - |
632 | { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
633 | } | - |
634 | break; | 0 |
635 | | - |
636 | | - |
637 | case OP_DOLLM: | - |
638 | if ((md->moptions & 0x00000100) == 0) never evaluated: (md->moptions & 0x00000100) == 0 | 0 |
639 | { | - |
640 | if (clen == 0 && (md->moptions & 0x08000000) != 0) never evaluated: clen == 0 never evaluated: (md->moptions & 0x08000000) != 0 | 0 |
641 | could_continue = 1; never executed: could_continue = 1; | 0 |
642 | else if (clen == 0 || never evaluated: clen == 0 | 0 |
643 | ((md->poptions & 0x00000020) == 0 && ((md->nltype != 0)? ((ptr) < md->end_subject && _pcre16_is_newline((ptr), md->nltype, md->end_subject, &(md->nllen), utf)) : ((ptr) <= md->end_subject - md->nllen && (ptr)[0] == md->nl[0] && (md->nllen == 1 || (ptr)[1] == md->nl[1]) ) ))) never evaluated: (md->poptions & 0x00000020) == 0 never evaluated: (md->nltype != 0) | 0 |
644 | { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
645 | } | - |
646 | else if (((md->nltype != 0)? ((ptr) < md->end_subject && _pcre16_is_newline((ptr), md->nltype, md->end_subject, &(md->nllen), utf)) : ((ptr) <= md->end_subject - md->nllen && (ptr)[0] == md->nl[0] && (md->nllen == 1 || (ptr)[1] == md->nl[1]) ) )) never evaluated: (md->nltype != 0) | 0 |
647 | { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
648 | break; | 0 |
649 | | - |
650 | | - |
651 | | - |
652 | case OP_DIGIT: | - |
653 | case OP_WHITESPACE: | - |
654 | case OP_WORDCHAR: | - |
655 | if (clen > 0 && c < 256 && never evaluated: clen > 0 | 0 |
656 | ((ctypes[c] & toptable1[codevalue]) ^ toptable2[codevalue]) != 0) never evaluated: ((ctypes[c] & toptable1[codevalue]) ^ toptable2[codevalue]) != 0 | 0 |
657 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
658 | break; | 0 |
659 | | - |
660 | | - |
661 | case OP_NOT_DIGIT: | - |
662 | case OP_NOT_WHITESPACE: | - |
663 | case OP_NOT_WORDCHAR: | - |
664 | if (clen > 0 && (c >= 256 || never evaluated: clen > 0 never evaluated: c >= 256 | 0 |
665 | ((ctypes[c] & toptable1[codevalue]) ^ toptable2[codevalue]) != 0)) never evaluated: ((ctypes[c] & toptable1[codevalue]) ^ toptable2[codevalue]) != 0 | 0 |
666 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
667 | break; | 0 |
668 | | - |
669 | | - |
670 | case OP_WORD_BOUNDARY: | - |
671 | case OP_NOT_WORD_BOUNDARY: | - |
672 | { | - |
673 | int left_word, right_word; | - |
674 | | - |
675 | if (ptr > start_subject) never evaluated: ptr > start_subject | 0 |
676 | { | - |
677 | const pcre_uchar *temp = ptr - 1; | - |
678 | if (temp < md->start_used_ptr) md->start_used_ptr = temp; never executed: md->start_used_ptr = temp; never evaluated: temp < md->start_used_ptr | 0 |
679 | | - |
680 | if (utf) { if ((*temp & 0xfc00) == 0xdc00) temp--; } never evaluated: (*temp & 0xfc00) == 0xdc00 | 0 |
681 | | - |
682 | d = *temp; if (utf && (d & 0xfc00) == 0xd800) { d = (((d & 0x3ff) << 10) | (temp[1] & 0x3ff)) + 0x10000; };; never evaluated: (d & 0xfc00) == 0xd800 | 0 |
683 | | - |
684 | if ((md->poptions & 0x20000000) != 0) never evaluated: (md->poptions & 0x20000000) != 0 | 0 |
685 | { | - |
686 | if (d == '_') left_word = 1; else never executed: left_word = 1; never evaluated: d == '_' | 0 |
687 | { | - |
688 | int cat = _pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(d) / 128] * 128 + (d) % 128])->chartype]; | - |
689 | left_word = (cat == ucp_L || cat == ucp_N); never evaluated: cat == ucp_L never evaluated: cat == ucp_N | 0 |
690 | } | 0 |
691 | } | - |
692 | else | - |
693 | | - |
694 | left_word = d < 256 && (ctypes[d] & 0x10) != 0; never evaluated: (ctypes[d] & 0x10) != 0 never executed: left_word = d < 256 && (ctypes[d] & 0x10) != 0; | 0 |
695 | } | - |
696 | else left_word = 0; never executed: left_word = 0; | 0 |
697 | | - |
698 | if (clen > 0) never evaluated: clen > 0 | 0 |
699 | { | - |
700 | | - |
701 | if ((md->poptions & 0x20000000) != 0) never evaluated: (md->poptions & 0x20000000) != 0 | 0 |
702 | { | - |
703 | if (c == '_') right_word = 1; else never executed: right_word = 1; never evaluated: c == '_' | 0 |
704 | { | - |
705 | int cat = _pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->chartype]; | - |
706 | right_word = (cat == ucp_L || cat == ucp_N); never evaluated: cat == ucp_L never evaluated: cat == ucp_N | 0 |
707 | } | 0 |
708 | } | - |
709 | else | - |
710 | | - |
711 | right_word = c < 256 && (ctypes[c] & 0x10) != 0; never evaluated: (ctypes[c] & 0x10) != 0 never executed: right_word = c < 256 && (ctypes[c] & 0x10) != 0; | 0 |
712 | } | - |
713 | else right_word = 0; never executed: right_word = 0; | 0 |
714 | | - |
715 | if ((left_word == right_word) == (codevalue == OP_NOT_WORD_BOUNDARY)) never evaluated: (left_word == right_word) == (codevalue == OP_NOT_WORD_BOUNDARY) | 0 |
716 | { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
717 | } | - |
718 | break; | 0 |
719 | case OP_PROP: | - |
720 | case OP_NOTPROP: | - |
721 | if (clen > 0) never evaluated: clen > 0 | 0 |
722 | { | - |
723 | BOOL OK; | - |
724 | const ucd_record * prop = (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128]); | - |
725 | switch(code[1]) | - |
726 | { | - |
727 | case 0: | - |
728 | OK = 1; | - |
729 | break; | 0 |
730 | | - |
731 | case 1: | - |
732 | OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || never evaluated: prop->chartype == ucp_Lu never evaluated: prop->chartype == ucp_Ll | 0 |
733 | prop->chartype == ucp_Lt; never evaluated: prop->chartype == ucp_Lt | 0 |
734 | break; | 0 |
735 | | - |
736 | case 2: | - |
737 | OK = _pcre16_ucp_gentype[prop->chartype] == code[2]; | - |
738 | break; | 0 |
739 | | - |
740 | case 3: | - |
741 | OK = prop->chartype == code[2]; | - |
742 | break; | 0 |
743 | | - |
744 | case 4: | - |
745 | OK = prop->script == code[2]; | - |
746 | break; | 0 |
747 | | - |
748 | | - |
749 | | - |
750 | case 5: | - |
751 | OK = _pcre16_ucp_gentype[prop->chartype] == ucp_L || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_L | 0 |
752 | _pcre16_ucp_gentype[prop->chartype] == ucp_N; never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_N | 0 |
753 | break; | 0 |
754 | | - |
755 | case 6: | - |
756 | OK = _pcre16_ucp_gentype[prop->chartype] == ucp_Z || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_Z | 0 |
757 | c == '\011' || c == '\012' || c == '\014' || c == '\015'; never evaluated: c == '\011' never evaluated: c == '\012' never evaluated: c == '\014' never evaluated: c == '\015' | 0 |
758 | break; | 0 |
759 | | - |
760 | case 7: | - |
761 | OK = _pcre16_ucp_gentype[prop->chartype] == ucp_Z || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_Z | 0 |
762 | c == '\011' || c == '\012' || c == '\013' || never evaluated: c == '\011' never evaluated: c == '\012' never evaluated: c == '\013' | 0 |
763 | c == '\014' || c == '\015'; never evaluated: c == '\014' never evaluated: c == '\015' | 0 |
764 | break; | 0 |
765 | | - |
766 | case 8: | - |
767 | OK = _pcre16_ucp_gentype[prop->chartype] == ucp_L || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_L | 0 |
768 | _pcre16_ucp_gentype[prop->chartype] == ucp_N || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_N | 0 |
769 | c == '\137'; never evaluated: c == '\137' | 0 |
770 | break; | 0 |
771 | | - |
772 | | - |
773 | | - |
774 | default: | - |
775 | OK = codevalue != OP_PROP; | - |
776 | break; | 0 |
777 | } | - |
778 | | - |
779 | if (OK == (codevalue == OP_PROP)) { if (new_count++ < wscount) { next_new_state->offset = (state_offset + 3); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: OK == (codevalue == OP_PROP) never evaluated: new_count++ < wscount | 0 |
780 | } | 0 |
781 | break; | 0 |
782 | case OP_TYPEPLUS: | - |
783 | case OP_TYPEMINPLUS: | - |
784 | case OP_TYPEPOSPLUS: | - |
785 | count = current_state->count; | - |
786 | if (count > 0) { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 2); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: count > 0 never evaluated: active_count++ < wscount | 0 |
787 | if (clen > 0) never evaluated: clen > 0 | 0 |
788 | { | - |
789 | if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || never evaluated: c >= 256 never evaluated: d != OP_DIGIT never evaluated: d != OP_WHITESPACE never evaluated: d != OP_WORDCHAR | 0 |
790 | (c < 256 && | 0 |
791 | (d != OP_ANY || !((md->nltype != 0)? ((ptr) < md->end_subject && _pcre16_is_newline((ptr), md->nltype, md->end_subject, &(md->nllen), utf)) : ((ptr) <= md->end_subject - md->nllen && (ptr)[0] == md->nl[0] && (md->nllen == 1 || (ptr)[1] == md->nl[1]) ) )) && never evaluated: d != OP_ANY never evaluated: (md->nltype != 0) | 0 |
792 | ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) never evaluated: ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0 | 0 |
793 | { | - |
794 | if (count > 0 && codevalue == OP_TYPEPOSPLUS) never evaluated: count > 0 never evaluated: codevalue == OP_TYPEPOSPLUS | 0 |
795 | { | - |
796 | active_count--; | - |
797 | next_active_state--; | - |
798 | } | 0 |
799 | count++; | - |
800 | if (new_count++ < wscount) { next_new_state->offset = (state_offset); next_new_state->count = (count); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
801 | } | - |
802 | } | 0 |
803 | break; | 0 |
804 | | - |
805 | | - |
806 | case OP_TYPEQUERY: | - |
807 | case OP_TYPEMINQUERY: | - |
808 | case OP_TYPEPOSQUERY: | - |
809 | if (active_count++ < wscount) { next_active_state->offset = (state_offset + 2); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
810 | if (clen > 0) never evaluated: clen > 0 | 0 |
811 | { | - |
812 | if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || never evaluated: c >= 256 never evaluated: d != OP_DIGIT never evaluated: d != OP_WHITESPACE never evaluated: d != OP_WORDCHAR | 0 |
813 | (c < 256 && | 0 |
814 | (d != OP_ANY || !((md->nltype != 0)? ((ptr) < md->end_subject && _pcre16_is_newline((ptr), md->nltype, md->end_subject, &(md->nllen), utf)) : ((ptr) <= md->end_subject - md->nllen && (ptr)[0] == md->nl[0] && (md->nllen == 1 || (ptr)[1] == md->nl[1]) ) )) && never evaluated: d != OP_ANY never evaluated: (md->nltype != 0) | 0 |
815 | ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) never evaluated: ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0 | 0 |
816 | { | - |
817 | if (codevalue == OP_TYPEPOSQUERY) never evaluated: codevalue == OP_TYPEPOSQUERY | 0 |
818 | { | - |
819 | active_count--; | - |
820 | next_active_state--; | - |
821 | } | 0 |
822 | if (new_count++ < wscount) { next_new_state->offset = (state_offset + 2); next_new_state->count = (0); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
823 | } | - |
824 | } | 0 |
825 | break; | 0 |
826 | | - |
827 | | - |
828 | case OP_TYPESTAR: | - |
829 | case OP_TYPEMINSTAR: | - |
830 | case OP_TYPEPOSSTAR: | - |
831 | if (active_count++ < wscount) { next_active_state->offset = (state_offset + 2); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
832 | if (clen > 0) never evaluated: clen > 0 | 0 |
833 | { | - |
834 | if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || never evaluated: c >= 256 never evaluated: d != OP_DIGIT never evaluated: d != OP_WHITESPACE never evaluated: d != OP_WORDCHAR | 0 |
835 | (c < 256 && | 0 |
836 | (d != OP_ANY || !((md->nltype != 0)? ((ptr) < md->end_subject && _pcre16_is_newline((ptr), md->nltype, md->end_subject, &(md->nllen), utf)) : ((ptr) <= md->end_subject - md->nllen && (ptr)[0] == md->nl[0] && (md->nllen == 1 || (ptr)[1] == md->nl[1]) ) )) && never evaluated: d != OP_ANY never evaluated: (md->nltype != 0) | 0 |
837 | ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) never evaluated: ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0 | 0 |
838 | { | - |
839 | if (codevalue == OP_TYPEPOSSTAR) never evaluated: codevalue == OP_TYPEPOSSTAR | 0 |
840 | { | - |
841 | active_count--; | - |
842 | next_active_state--; | - |
843 | } | 0 |
844 | if (new_count++ < wscount) { next_new_state->offset = (state_offset); next_new_state->count = (0); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
845 | } | - |
846 | } | 0 |
847 | break; | 0 |
848 | | - |
849 | | - |
850 | case OP_TYPEEXACT: | - |
851 | count = current_state->count; | - |
852 | if (clen > 0) never evaluated: clen > 0 | 0 |
853 | { | - |
854 | if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || never evaluated: c >= 256 never evaluated: d != OP_DIGIT never evaluated: d != OP_WHITESPACE never evaluated: d != OP_WORDCHAR | 0 |
855 | (c < 256 && | 0 |
856 | (d != OP_ANY || !((md->nltype != 0)? ((ptr) < md->end_subject && _pcre16_is_newline((ptr), md->nltype, md->end_subject, &(md->nllen), utf)) : ((ptr) <= md->end_subject - md->nllen && (ptr)[0] == md->nl[0] && (md->nllen == 1 || (ptr)[1] == md->nl[1]) ) )) && never evaluated: d != OP_ANY never evaluated: (md->nltype != 0) | 0 |
857 | ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) never evaluated: ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0 | 0 |
858 | { | - |
859 | if (++count >= code[1]) never evaluated: ++count >= code[1] | 0 |
860 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset + 1 + 1 + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
861 | else | - |
862 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset); next_new_state->count = (count); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
863 | } | - |
864 | } | 0 |
865 | break; | 0 |
866 | | - |
867 | | - |
868 | case OP_TYPEUPTO: | - |
869 | case OP_TYPEMINUPTO: | - |
870 | case OP_TYPEPOSUPTO: | - |
871 | if (active_count++ < wscount) { next_active_state->offset = (state_offset + 2 + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
872 | count = current_state->count; | - |
873 | if (clen > 0) never evaluated: clen > 0 | 0 |
874 | { | - |
875 | if ((c >= 256 && d != OP_DIGIT && d != OP_WHITESPACE && d != OP_WORDCHAR) || never evaluated: c >= 256 never evaluated: d != OP_DIGIT never evaluated: d != OP_WHITESPACE never evaluated: d != OP_WORDCHAR | 0 |
876 | (c < 256 && | 0 |
877 | (d != OP_ANY || !((md->nltype != 0)? ((ptr) < md->end_subject && _pcre16_is_newline((ptr), md->nltype, md->end_subject, &(md->nllen), utf)) : ((ptr) <= md->end_subject - md->nllen && (ptr)[0] == md->nl[0] && (md->nllen == 1 || (ptr)[1] == md->nl[1]) ) )) && never evaluated: d != OP_ANY never evaluated: (md->nltype != 0) | 0 |
878 | ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) never evaluated: ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0 | 0 |
879 | { | - |
880 | if (codevalue == OP_TYPEPOSUPTO) never evaluated: codevalue == OP_TYPEPOSUPTO | 0 |
881 | { | - |
882 | active_count--; | - |
883 | next_active_state--; | - |
884 | } | 0 |
885 | if (++count >= code[1]) never evaluated: ++count >= code[1] | 0 |
886 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset + 2 + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
887 | else | - |
888 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset); next_new_state->count = (count); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
889 | } | - |
890 | } | 0 |
891 | break; | 0 |
892 | case 300 + OP_TYPEPLUS: | - |
893 | case 300 + OP_TYPEMINPLUS: | - |
894 | case 300 + OP_TYPEPOSPLUS: | - |
895 | count = current_state->count; | - |
896 | if (count > 0) { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 4); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: count > 0 never evaluated: active_count++ < wscount | 0 |
897 | if (clen > 0) never evaluated: clen > 0 | 0 |
898 | { | - |
899 | BOOL OK; | - |
900 | const ucd_record * prop = (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128]); | - |
901 | switch(code[2]) | - |
902 | { | - |
903 | case 0: | - |
904 | OK = 1; | - |
905 | break; | 0 |
906 | | - |
907 | case 1: | - |
908 | OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || never evaluated: prop->chartype == ucp_Lu never evaluated: prop->chartype == ucp_Ll | 0 |
909 | prop->chartype == ucp_Lt; never evaluated: prop->chartype == ucp_Lt | 0 |
910 | break; | 0 |
911 | | - |
912 | case 2: | - |
913 | OK = _pcre16_ucp_gentype[prop->chartype] == code[3]; | - |
914 | break; | 0 |
915 | | - |
916 | case 3: | - |
917 | OK = prop->chartype == code[3]; | - |
918 | break; | 0 |
919 | | - |
920 | case 4: | - |
921 | OK = prop->script == code[3]; | - |
922 | break; | 0 |
923 | | - |
924 | | - |
925 | | - |
926 | case 5: | - |
927 | OK = _pcre16_ucp_gentype[prop->chartype] == ucp_L || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_L | 0 |
928 | _pcre16_ucp_gentype[prop->chartype] == ucp_N; never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_N | 0 |
929 | break; | 0 |
930 | | - |
931 | case 6: | - |
932 | OK = _pcre16_ucp_gentype[prop->chartype] == ucp_Z || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_Z | 0 |
933 | c == '\011' || c == '\012' || c == '\014' || c == '\015'; never evaluated: c == '\011' never evaluated: c == '\012' never evaluated: c == '\014' never evaluated: c == '\015' | 0 |
934 | break; | 0 |
935 | | - |
936 | case 7: | - |
937 | OK = _pcre16_ucp_gentype[prop->chartype] == ucp_Z || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_Z | 0 |
938 | c == '\011' || c == '\012' || c == '\013' || never evaluated: c == '\011' never evaluated: c == '\012' never evaluated: c == '\013' | 0 |
939 | c == '\014' || c == '\015'; never evaluated: c == '\014' never evaluated: c == '\015' | 0 |
940 | break; | 0 |
941 | | - |
942 | case 8: | - |
943 | OK = _pcre16_ucp_gentype[prop->chartype] == ucp_L || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_L | 0 |
944 | _pcre16_ucp_gentype[prop->chartype] == ucp_N || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_N | 0 |
945 | c == '\137'; never evaluated: c == '\137' | 0 |
946 | break; | 0 |
947 | | - |
948 | | - |
949 | | - |
950 | default: | - |
951 | OK = codevalue != OP_PROP; | - |
952 | break; | 0 |
953 | } | - |
954 | | - |
955 | if (OK == (d == OP_PROP)) never evaluated: OK == (d == OP_PROP) | 0 |
956 | { | - |
957 | if (count > 0 && codevalue == 300 + OP_TYPEPOSPLUS) never evaluated: count > 0 never evaluated: codevalue == 300 + OP_TYPEPOSPLUS | 0 |
958 | { | - |
959 | active_count--; | - |
960 | next_active_state--; | - |
961 | } | 0 |
962 | count++; | - |
963 | if (new_count++ < wscount) { next_new_state->offset = (state_offset); next_new_state->count = (count); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
964 | } | - |
965 | } | 0 |
966 | break; | 0 |
967 | | - |
968 | | - |
969 | case 320 + OP_TYPEPLUS: | - |
970 | case 320 + OP_TYPEMINPLUS: | - |
971 | case 320 + OP_TYPEPOSPLUS: | - |
972 | count = current_state->count; | - |
973 | if (count > 0) { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 2); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: count > 0 never evaluated: active_count++ < wscount | 0 |
974 | if (clen > 0 && _pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->chartype] != ucp_M) never evaluated: clen > 0 never evaluated: _pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->chartype] != ucp_M | 0 |
975 | { | - |
976 | const pcre_uchar *nptr = ptr + clen; | - |
977 | int ncount = 0; | - |
978 | if (count > 0 && codevalue == 320 + OP_TYPEPOSPLUS) never evaluated: count > 0 never evaluated: codevalue == 320 + OP_TYPEPOSPLUS | 0 |
979 | { | - |
980 | active_count--; | - |
981 | next_active_state--; | - |
982 | } | 0 |
983 | while (nptr < end_subject) never evaluated: nptr < end_subject | 0 |
984 | { | - |
985 | int nd; | - |
986 | int ndlen = 1; | - |
987 | nd = *nptr; if ((nd & 0xfc00) == 0xd800) { nd = (((nd & 0x3ff) << 10) | (nptr[1] & 0x3ff)) + 0x10000; ndlen++; };; never evaluated: (nd & 0xfc00) == 0xd800 | 0 |
988 | if (_pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(nd) / 128] * 128 + (nd) % 128])->chartype] != ucp_M) break; never evaluated: _pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(nd) / 128] * 128 + (nd) % 128])->chartype] != ucp_M | 0 |
989 | ncount++; | - |
990 | nptr += ndlen; | - |
991 | } | 0 |
992 | count++; | - |
993 | if (new_count++ < wscount) { next_new_state->offset = (-state_offset); next_new_state->count = (count); next_new_state->data = (ncount); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
994 | } | - |
995 | break; | 0 |
996 | | - |
997 | | - |
998 | | - |
999 | case 340 + OP_TYPEPLUS: | - |
1000 | case 340 + OP_TYPEMINPLUS: | - |
1001 | case 340 + OP_TYPEPOSPLUS: | - |
1002 | count = current_state->count; | - |
1003 | if (count > 0) { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 2); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: count > 0 never evaluated: active_count++ < wscount | 0 |
1004 | if (clen > 0) never evaluated: clen > 0 | 0 |
1005 | { | - |
1006 | int ncount = 0; | - |
1007 | switch (c) | - |
1008 | { | - |
1009 | case 0x000b: | - |
1010 | case 0x000c: | - |
1011 | case 0x0085: | - |
1012 | case 0x2028: | - |
1013 | case 0x2029: | - |
1014 | if ((md->moptions & 0x00800000) != 0) break; never evaluated: (md->moptions & 0x00800000) != 0 | 0 |
1015 | goto ANYNL01; never executed: goto ANYNL01; | 0 |
1016 | | - |
1017 | case 0x000d: | - |
1018 | if (ptr + 1 < end_subject && ptr[1] == 0x0a) ncount = 1; never evaluated: ptr + 1 < end_subject never evaluated: ptr[1] == 0x0a never executed: ncount = 1; | 0 |
1019 | | - |
1020 | | - |
1021 | ANYNL01: code before this statement never executed: ANYNL01: | 0 |
1022 | case 0x000a: | - |
1023 | if (count > 0 && codevalue == 340 + OP_TYPEPOSPLUS) never evaluated: count > 0 never evaluated: codevalue == 340 + OP_TYPEPOSPLUS | 0 |
1024 | { | - |
1025 | active_count--; | - |
1026 | next_active_state--; | - |
1027 | } | 0 |
1028 | count++; | - |
1029 | if (new_count++ < wscount) { next_new_state->offset = (-state_offset); next_new_state->count = (count); next_new_state->data = (ncount); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1030 | break; | 0 |
1031 | | - |
1032 | default: | - |
1033 | break; | 0 |
1034 | } | - |
1035 | } | 0 |
1036 | break; | 0 |
1037 | | - |
1038 | | - |
1039 | case 380 + OP_TYPEPLUS: | - |
1040 | case 380 + OP_TYPEMINPLUS: | - |
1041 | case 380 + OP_TYPEPOSPLUS: | - |
1042 | count = current_state->count; | - |
1043 | if (count > 0) { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 2); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: count > 0 never evaluated: active_count++ < wscount | 0 |
1044 | if (clen > 0) never evaluated: clen > 0 | 0 |
1045 | { | - |
1046 | BOOL OK; | - |
1047 | switch (c) | - |
1048 | { | - |
1049 | case 0x000a: | - |
1050 | case 0x000b: | - |
1051 | case 0x000c: | - |
1052 | case 0x000d: | - |
1053 | case 0x0085: | - |
1054 | case 0x2028: | - |
1055 | case 0x2029: | - |
1056 | OK = 1; | - |
1057 | break; | 0 |
1058 | | - |
1059 | default: | - |
1060 | OK = 0; | - |
1061 | break; | 0 |
1062 | } | - |
1063 | | - |
1064 | if (OK == (d == OP_VSPACE)) never evaluated: OK == (d == OP_VSPACE) | 0 |
1065 | { | - |
1066 | if (count > 0 && codevalue == 380 + OP_TYPEPOSPLUS) never evaluated: count > 0 never evaluated: codevalue == 380 + OP_TYPEPOSPLUS | 0 |
1067 | { | - |
1068 | active_count--; | - |
1069 | next_active_state--; | - |
1070 | } | 0 |
1071 | count++; | - |
1072 | if (new_count++ < wscount) { next_new_state->offset = (-state_offset); next_new_state->count = (count); next_new_state->data = (0); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1073 | } | - |
1074 | } | 0 |
1075 | break; | 0 |
1076 | | - |
1077 | | - |
1078 | case 360 + OP_TYPEPLUS: | - |
1079 | case 360 + OP_TYPEMINPLUS: | - |
1080 | case 360 + OP_TYPEPOSPLUS: | - |
1081 | count = current_state->count; | - |
1082 | if (count > 0) { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 2); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: count > 0 never evaluated: active_count++ < wscount | 0 |
1083 | if (clen > 0) never evaluated: clen > 0 | 0 |
1084 | { | - |
1085 | BOOL OK; | - |
1086 | switch (c) | - |
1087 | { | - |
1088 | case 0x09: | - |
1089 | case 0x20: | - |
1090 | case 0xa0: | - |
1091 | case 0x1680: | - |
1092 | case 0x180e: | - |
1093 | case 0x2000: | - |
1094 | case 0x2001: | - |
1095 | case 0x2002: | - |
1096 | case 0x2003: | - |
1097 | case 0x2004: | - |
1098 | case 0x2005: | - |
1099 | case 0x2006: | - |
1100 | case 0x2007: | - |
1101 | case 0x2008: | - |
1102 | case 0x2009: | - |
1103 | case 0x200A: | - |
1104 | case 0x202f: | - |
1105 | case 0x205f: | - |
1106 | case 0x3000: | - |
1107 | OK = 1; | - |
1108 | break; | 0 |
1109 | | - |
1110 | default: | - |
1111 | OK = 0; | - |
1112 | break; | 0 |
1113 | } | - |
1114 | | - |
1115 | if (OK == (d == OP_HSPACE)) never evaluated: OK == (d == OP_HSPACE) | 0 |
1116 | { | - |
1117 | if (count > 0 && codevalue == 360 + OP_TYPEPOSPLUS) never evaluated: count > 0 never evaluated: codevalue == 360 + OP_TYPEPOSPLUS | 0 |
1118 | { | - |
1119 | active_count--; | - |
1120 | next_active_state--; | - |
1121 | } | 0 |
1122 | count++; | - |
1123 | if (new_count++ < wscount) { next_new_state->offset = (-state_offset); next_new_state->count = (count); next_new_state->data = (0); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1124 | } | - |
1125 | } | 0 |
1126 | break; | 0 |
1127 | | - |
1128 | | - |
1129 | | - |
1130 | case 300 + OP_TYPEQUERY: | - |
1131 | case 300 + OP_TYPEMINQUERY: | - |
1132 | case 300 + OP_TYPEPOSQUERY: | - |
1133 | count = 4; | - |
1134 | goto QS1; never executed: goto QS1; | 0 |
1135 | | - |
1136 | case 300 + OP_TYPESTAR: | - |
1137 | case 300 + OP_TYPEMINSTAR: | - |
1138 | case 300 + OP_TYPEPOSSTAR: | - |
1139 | count = 0; | - |
1140 | | - |
1141 | QS1: code before this statement never executed: QS1: | 0 |
1142 | | - |
1143 | if (active_count++ < wscount) { next_active_state->offset = (state_offset + 4); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
1144 | if (clen > 0) never evaluated: clen > 0 | 0 |
1145 | { | - |
1146 | BOOL OK; | - |
1147 | const ucd_record * prop = (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128]); | - |
1148 | switch(code[2]) | - |
1149 | { | - |
1150 | case 0: | - |
1151 | OK = 1; | - |
1152 | break; | 0 |
1153 | | - |
1154 | case 1: | - |
1155 | OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || never evaluated: prop->chartype == ucp_Lu never evaluated: prop->chartype == ucp_Ll | 0 |
1156 | prop->chartype == ucp_Lt; never evaluated: prop->chartype == ucp_Lt | 0 |
1157 | break; | 0 |
1158 | | - |
1159 | case 2: | - |
1160 | OK = _pcre16_ucp_gentype[prop->chartype] == code[3]; | - |
1161 | break; | 0 |
1162 | | - |
1163 | case 3: | - |
1164 | OK = prop->chartype == code[3]; | - |
1165 | break; | 0 |
1166 | | - |
1167 | case 4: | - |
1168 | OK = prop->script == code[3]; | - |
1169 | break; | 0 |
1170 | | - |
1171 | | - |
1172 | | - |
1173 | case 5: | - |
1174 | OK = _pcre16_ucp_gentype[prop->chartype] == ucp_L || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_L | 0 |
1175 | _pcre16_ucp_gentype[prop->chartype] == ucp_N; never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_N | 0 |
1176 | break; | 0 |
1177 | | - |
1178 | case 6: | - |
1179 | OK = _pcre16_ucp_gentype[prop->chartype] == ucp_Z || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_Z | 0 |
1180 | c == '\011' || c == '\012' || c == '\014' || c == '\015'; never evaluated: c == '\011' never evaluated: c == '\012' never evaluated: c == '\014' never evaluated: c == '\015' | 0 |
1181 | break; | 0 |
1182 | | - |
1183 | case 7: | - |
1184 | OK = _pcre16_ucp_gentype[prop->chartype] == ucp_Z || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_Z | 0 |
1185 | c == '\011' || c == '\012' || c == '\013' || never evaluated: c == '\011' never evaluated: c == '\012' never evaluated: c == '\013' | 0 |
1186 | c == '\014' || c == '\015'; never evaluated: c == '\014' never evaluated: c == '\015' | 0 |
1187 | break; | 0 |
1188 | | - |
1189 | case 8: | - |
1190 | OK = _pcre16_ucp_gentype[prop->chartype] == ucp_L || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_L | 0 |
1191 | _pcre16_ucp_gentype[prop->chartype] == ucp_N || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_N | 0 |
1192 | c == '\137'; never evaluated: c == '\137' | 0 |
1193 | break; | 0 |
1194 | | - |
1195 | | - |
1196 | | - |
1197 | default: | - |
1198 | OK = codevalue != OP_PROP; | - |
1199 | break; | 0 |
1200 | } | - |
1201 | | - |
1202 | if (OK == (d == OP_PROP)) never evaluated: OK == (d == OP_PROP) | 0 |
1203 | { | - |
1204 | if (codevalue == 300 + OP_TYPEPOSSTAR || never evaluated: codevalue == 300 + OP_TYPEPOSSTAR | 0 |
1205 | codevalue == 300 + OP_TYPEPOSQUERY) never evaluated: codevalue == 300 + OP_TYPEPOSQUERY | 0 |
1206 | { | - |
1207 | active_count--; | - |
1208 | next_active_state--; | - |
1209 | } | 0 |
1210 | if (new_count++ < wscount) { next_new_state->offset = (state_offset + count); next_new_state->count = (0); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1211 | } | - |
1212 | } | 0 |
1213 | break; | 0 |
1214 | | - |
1215 | | - |
1216 | case 320 + OP_TYPEQUERY: | - |
1217 | case 320 + OP_TYPEMINQUERY: | - |
1218 | case 320 + OP_TYPEPOSQUERY: | - |
1219 | count = 2; | - |
1220 | goto QS2; never executed: goto QS2; | 0 |
1221 | | - |
1222 | case 320 + OP_TYPESTAR: | - |
1223 | case 320 + OP_TYPEMINSTAR: | - |
1224 | case 320 + OP_TYPEPOSSTAR: | - |
1225 | count = 0; | - |
1226 | | - |
1227 | QS2: code before this statement never executed: QS2: | 0 |
1228 | | - |
1229 | if (active_count++ < wscount) { next_active_state->offset = (state_offset + 2); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
1230 | if (clen > 0 && _pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->chartype] != ucp_M) never evaluated: clen > 0 never evaluated: _pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->chartype] != ucp_M | 0 |
1231 | { | - |
1232 | const pcre_uchar *nptr = ptr + clen; | - |
1233 | int ncount = 0; | - |
1234 | if (codevalue == 320 + OP_TYPEPOSSTAR || never evaluated: codevalue == 320 + OP_TYPEPOSSTAR | 0 |
1235 | codevalue == 320 + OP_TYPEPOSQUERY) never evaluated: codevalue == 320 + OP_TYPEPOSQUERY | 0 |
1236 | { | - |
1237 | active_count--; | - |
1238 | next_active_state--; | - |
1239 | } | 0 |
1240 | while (nptr < end_subject) never evaluated: nptr < end_subject | 0 |
1241 | { | - |
1242 | int nd; | - |
1243 | int ndlen = 1; | - |
1244 | nd = *nptr; if ((nd & 0xfc00) == 0xd800) { nd = (((nd & 0x3ff) << 10) | (nptr[1] & 0x3ff)) + 0x10000; ndlen++; };; never evaluated: (nd & 0xfc00) == 0xd800 | 0 |
1245 | if (_pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(nd) / 128] * 128 + (nd) % 128])->chartype] != ucp_M) break; never evaluated: _pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(nd) / 128] * 128 + (nd) % 128])->chartype] != ucp_M | 0 |
1246 | ncount++; | - |
1247 | nptr += ndlen; | - |
1248 | } | 0 |
1249 | if (new_count++ < wscount) { next_new_state->offset = (-(state_offset + count)); next_new_state->count = (0); next_new_state->data = (ncount); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1250 | } | - |
1251 | break; | 0 |
1252 | | - |
1253 | | - |
1254 | | - |
1255 | case 340 + OP_TYPEQUERY: | - |
1256 | case 340 + OP_TYPEMINQUERY: | - |
1257 | case 340 + OP_TYPEPOSQUERY: | - |
1258 | count = 2; | - |
1259 | goto QS3; never executed: goto QS3; | 0 |
1260 | | - |
1261 | case 340 + OP_TYPESTAR: | - |
1262 | case 340 + OP_TYPEMINSTAR: | - |
1263 | case 340 + OP_TYPEPOSSTAR: | - |
1264 | count = 0; | - |
1265 | | - |
1266 | QS3: code before this statement never executed: QS3: | 0 |
1267 | if (active_count++ < wscount) { next_active_state->offset = (state_offset + 2); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
1268 | if (clen > 0) never evaluated: clen > 0 | 0 |
1269 | { | - |
1270 | int ncount = 0; | - |
1271 | switch (c) | - |
1272 | { | - |
1273 | case 0x000b: | - |
1274 | case 0x000c: | - |
1275 | case 0x0085: | - |
1276 | case 0x2028: | - |
1277 | case 0x2029: | - |
1278 | if ((md->moptions & 0x00800000) != 0) break; never evaluated: (md->moptions & 0x00800000) != 0 | 0 |
1279 | goto ANYNL02; never executed: goto ANYNL02; | 0 |
1280 | | - |
1281 | case 0x000d: | - |
1282 | if (ptr + 1 < end_subject && ptr[1] == 0x0a) ncount = 1; never evaluated: ptr + 1 < end_subject never evaluated: ptr[1] == 0x0a never executed: ncount = 1; | 0 |
1283 | | - |
1284 | | - |
1285 | ANYNL02: code before this statement never executed: ANYNL02: | 0 |
1286 | case 0x000a: | - |
1287 | if (codevalue == 340 + OP_TYPEPOSSTAR || never evaluated: codevalue == 340 + OP_TYPEPOSSTAR | 0 |
1288 | codevalue == 340 + OP_TYPEPOSQUERY) never evaluated: codevalue == 340 + OP_TYPEPOSQUERY | 0 |
1289 | { | - |
1290 | active_count--; | - |
1291 | next_active_state--; | - |
1292 | } | 0 |
1293 | if (new_count++ < wscount) { next_new_state->offset = (-(state_offset + count)); next_new_state->count = (0); next_new_state->data = (ncount); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1294 | break; | 0 |
1295 | | - |
1296 | default: | - |
1297 | break; | 0 |
1298 | } | - |
1299 | } | 0 |
1300 | break; | 0 |
1301 | | - |
1302 | | - |
1303 | case 380 + OP_TYPEQUERY: | - |
1304 | case 380 + OP_TYPEMINQUERY: | - |
1305 | case 380 + OP_TYPEPOSQUERY: | - |
1306 | count = 2; | - |
1307 | goto QS4; never executed: goto QS4; | 0 |
1308 | | - |
1309 | case 380 + OP_TYPESTAR: | - |
1310 | case 380 + OP_TYPEMINSTAR: | - |
1311 | case 380 + OP_TYPEPOSSTAR: | - |
1312 | count = 0; | - |
1313 | | - |
1314 | QS4: code before this statement never executed: QS4: | 0 |
1315 | if (active_count++ < wscount) { next_active_state->offset = (state_offset + 2); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
1316 | if (clen > 0) never evaluated: clen > 0 | 0 |
1317 | { | - |
1318 | BOOL OK; | - |
1319 | switch (c) | - |
1320 | { | - |
1321 | case 0x000a: | - |
1322 | case 0x000b: | - |
1323 | case 0x000c: | - |
1324 | case 0x000d: | - |
1325 | case 0x0085: | - |
1326 | case 0x2028: | - |
1327 | case 0x2029: | - |
1328 | OK = 1; | - |
1329 | break; | 0 |
1330 | | - |
1331 | default: | - |
1332 | OK = 0; | - |
1333 | break; | 0 |
1334 | } | - |
1335 | if (OK == (d == OP_VSPACE)) never evaluated: OK == (d == OP_VSPACE) | 0 |
1336 | { | - |
1337 | if (codevalue == 380 + OP_TYPEPOSSTAR || never evaluated: codevalue == 380 + OP_TYPEPOSSTAR | 0 |
1338 | codevalue == 380 + OP_TYPEPOSQUERY) never evaluated: codevalue == 380 + OP_TYPEPOSQUERY | 0 |
1339 | { | - |
1340 | active_count--; | - |
1341 | next_active_state--; | - |
1342 | } | 0 |
1343 | if (new_count++ < wscount) { next_new_state->offset = (-(state_offset + count)); next_new_state->count = (0); next_new_state->data = (0); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1344 | } | - |
1345 | } | 0 |
1346 | break; | 0 |
1347 | | - |
1348 | | - |
1349 | case 360 + OP_TYPEQUERY: | - |
1350 | case 360 + OP_TYPEMINQUERY: | - |
1351 | case 360 + OP_TYPEPOSQUERY: | - |
1352 | count = 2; | - |
1353 | goto QS5; never executed: goto QS5; | 0 |
1354 | | - |
1355 | case 360 + OP_TYPESTAR: | - |
1356 | case 360 + OP_TYPEMINSTAR: | - |
1357 | case 360 + OP_TYPEPOSSTAR: | - |
1358 | count = 0; | - |
1359 | | - |
1360 | QS5: code before this statement never executed: QS5: | 0 |
1361 | if (active_count++ < wscount) { next_active_state->offset = (state_offset + 2); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
1362 | if (clen > 0) never evaluated: clen > 0 | 0 |
1363 | { | - |
1364 | BOOL OK; | - |
1365 | switch (c) | - |
1366 | { | - |
1367 | case 0x09: | - |
1368 | case 0x20: | - |
1369 | case 0xa0: | - |
1370 | case 0x1680: | - |
1371 | case 0x180e: | - |
1372 | case 0x2000: | - |
1373 | case 0x2001: | - |
1374 | case 0x2002: | - |
1375 | case 0x2003: | - |
1376 | case 0x2004: | - |
1377 | case 0x2005: | - |
1378 | case 0x2006: | - |
1379 | case 0x2007: | - |
1380 | case 0x2008: | - |
1381 | case 0x2009: | - |
1382 | case 0x200A: | - |
1383 | case 0x202f: | - |
1384 | case 0x205f: | - |
1385 | case 0x3000: | - |
1386 | OK = 1; | - |
1387 | break; | 0 |
1388 | | - |
1389 | default: | - |
1390 | OK = 0; | - |
1391 | break; | 0 |
1392 | } | - |
1393 | | - |
1394 | if (OK == (d == OP_HSPACE)) never evaluated: OK == (d == OP_HSPACE) | 0 |
1395 | { | - |
1396 | if (codevalue == 360 + OP_TYPEPOSSTAR || never evaluated: codevalue == 360 + OP_TYPEPOSSTAR | 0 |
1397 | codevalue == 360 + OP_TYPEPOSQUERY) never evaluated: codevalue == 360 + OP_TYPEPOSQUERY | 0 |
1398 | { | - |
1399 | active_count--; | - |
1400 | next_active_state--; | - |
1401 | } | 0 |
1402 | if (new_count++ < wscount) { next_new_state->offset = (-(state_offset + count)); next_new_state->count = (0); next_new_state->data = (0); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1403 | } | - |
1404 | } | 0 |
1405 | break; | 0 |
1406 | | - |
1407 | | - |
1408 | | - |
1409 | case 300 + OP_TYPEEXACT: | - |
1410 | case 300 + OP_TYPEUPTO: | - |
1411 | case 300 + OP_TYPEMINUPTO: | - |
1412 | case 300 + OP_TYPEPOSUPTO: | - |
1413 | if (codevalue != 300 + OP_TYPEEXACT) never evaluated: codevalue != 300 + OP_TYPEEXACT | 0 |
1414 | { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 1 + 1 + 3); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
1415 | count = current_state->count; | - |
1416 | if (clen > 0) never evaluated: clen > 0 | 0 |
1417 | { | - |
1418 | BOOL OK; | - |
1419 | const ucd_record * prop = (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128]); | - |
1420 | switch(code[1 + 1 + 1]) | - |
1421 | { | - |
1422 | case 0: | - |
1423 | OK = 1; | - |
1424 | break; | 0 |
1425 | | - |
1426 | case 1: | - |
1427 | OK = prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || never evaluated: prop->chartype == ucp_Lu never evaluated: prop->chartype == ucp_Ll | 0 |
1428 | prop->chartype == ucp_Lt; never evaluated: prop->chartype == ucp_Lt | 0 |
1429 | break; | 0 |
1430 | | - |
1431 | case 2: | - |
1432 | OK = _pcre16_ucp_gentype[prop->chartype] == code[1 + 1 + 2]; | - |
1433 | break; | 0 |
1434 | | - |
1435 | case 3: | - |
1436 | OK = prop->chartype == code[1 + 1 + 2]; | - |
1437 | break; | 0 |
1438 | | - |
1439 | case 4: | - |
1440 | OK = prop->script == code[1 + 1 + 2]; | - |
1441 | break; | 0 |
1442 | | - |
1443 | | - |
1444 | | - |
1445 | case 5: | - |
1446 | OK = _pcre16_ucp_gentype[prop->chartype] == ucp_L || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_L | 0 |
1447 | _pcre16_ucp_gentype[prop->chartype] == ucp_N; never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_N | 0 |
1448 | break; | 0 |
1449 | | - |
1450 | case 6: | - |
1451 | OK = _pcre16_ucp_gentype[prop->chartype] == ucp_Z || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_Z | 0 |
1452 | c == '\011' || c == '\012' || c == '\014' || c == '\015'; never evaluated: c == '\011' never evaluated: c == '\012' never evaluated: c == '\014' never evaluated: c == '\015' | 0 |
1453 | break; | 0 |
1454 | | - |
1455 | case 7: | - |
1456 | OK = _pcre16_ucp_gentype[prop->chartype] == ucp_Z || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_Z | 0 |
1457 | c == '\011' || c == '\012' || c == '\013' || never evaluated: c == '\011' never evaluated: c == '\012' never evaluated: c == '\013' | 0 |
1458 | c == '\014' || c == '\015'; never evaluated: c == '\014' never evaluated: c == '\015' | 0 |
1459 | break; | 0 |
1460 | | - |
1461 | case 8: | - |
1462 | OK = _pcre16_ucp_gentype[prop->chartype] == ucp_L || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_L | 0 |
1463 | _pcre16_ucp_gentype[prop->chartype] == ucp_N || never evaluated: _pcre16_ucp_gentype[prop->chartype] == ucp_N | 0 |
1464 | c == '\137'; never evaluated: c == '\137' | 0 |
1465 | break; | 0 |
1466 | | - |
1467 | | - |
1468 | | - |
1469 | default: | - |
1470 | OK = codevalue != OP_PROP; | - |
1471 | break; | 0 |
1472 | } | - |
1473 | | - |
1474 | if (OK == (d == OP_PROP)) never evaluated: OK == (d == OP_PROP) | 0 |
1475 | { | - |
1476 | if (codevalue == 300 + OP_TYPEPOSUPTO) never evaluated: codevalue == 300 + OP_TYPEPOSUPTO | 0 |
1477 | { | - |
1478 | active_count--; | - |
1479 | next_active_state--; | - |
1480 | } | 0 |
1481 | if (++count >= code[1]) never evaluated: ++count >= code[1] | 0 |
1482 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset + 1 + 1 + 3); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1483 | else | - |
1484 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset); next_new_state->count = (count); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1485 | } | - |
1486 | } | 0 |
1487 | break; | 0 |
1488 | | - |
1489 | | - |
1490 | case 320 + OP_TYPEEXACT: | - |
1491 | case 320 + OP_TYPEUPTO: | - |
1492 | case 320 + OP_TYPEMINUPTO: | - |
1493 | case 320 + OP_TYPEPOSUPTO: | - |
1494 | if (codevalue != 320 + OP_TYPEEXACT) never evaluated: codevalue != 320 + OP_TYPEEXACT | 0 |
1495 | { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 2 + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
1496 | count = current_state->count; | - |
1497 | if (clen > 0 && _pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->chartype] != ucp_M) never evaluated: clen > 0 never evaluated: _pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->chartype] != ucp_M | 0 |
1498 | { | - |
1499 | const pcre_uchar *nptr = ptr + clen; | - |
1500 | int ncount = 0; | - |
1501 | if (codevalue == 320 + OP_TYPEPOSUPTO) never evaluated: codevalue == 320 + OP_TYPEPOSUPTO | 0 |
1502 | { | - |
1503 | active_count--; | - |
1504 | next_active_state--; | - |
1505 | } | 0 |
1506 | while (nptr < end_subject) never evaluated: nptr < end_subject | 0 |
1507 | { | - |
1508 | int nd; | - |
1509 | int ndlen = 1; | - |
1510 | nd = *nptr; if ((nd & 0xfc00) == 0xd800) { nd = (((nd & 0x3ff) << 10) | (nptr[1] & 0x3ff)) + 0x10000; ndlen++; };; never evaluated: (nd & 0xfc00) == 0xd800 | 0 |
1511 | if (_pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(nd) / 128] * 128 + (nd) % 128])->chartype] != ucp_M) break; never evaluated: _pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(nd) / 128] * 128 + (nd) % 128])->chartype] != ucp_M | 0 |
1512 | ncount++; | - |
1513 | nptr += ndlen; | - |
1514 | } | 0 |
1515 | if (++count >= code[1]) never evaluated: ++count >= code[1] | 0 |
1516 | { if (new_count++ < wscount) { next_new_state->offset = (-(state_offset + 2 + 1)); next_new_state->count = (0); next_new_state->data = (ncount); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1517 | else | - |
1518 | { if (new_count++ < wscount) { next_new_state->offset = (-state_offset); next_new_state->count = (count); next_new_state->data = (ncount); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1519 | } | - |
1520 | break; | 0 |
1521 | | - |
1522 | | - |
1523 | | - |
1524 | case 340 + OP_TYPEEXACT: | - |
1525 | case 340 + OP_TYPEUPTO: | - |
1526 | case 340 + OP_TYPEMINUPTO: | - |
1527 | case 340 + OP_TYPEPOSUPTO: | - |
1528 | if (codevalue != 340 + OP_TYPEEXACT) never evaluated: codevalue != 340 + OP_TYPEEXACT | 0 |
1529 | { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 2 + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
1530 | count = current_state->count; | - |
1531 | if (clen > 0) never evaluated: clen > 0 | 0 |
1532 | { | - |
1533 | int ncount = 0; | - |
1534 | switch (c) | - |
1535 | { | - |
1536 | case 0x000b: | - |
1537 | case 0x000c: | - |
1538 | case 0x0085: | - |
1539 | case 0x2028: | - |
1540 | case 0x2029: | - |
1541 | if ((md->moptions & 0x00800000) != 0) break; never evaluated: (md->moptions & 0x00800000) != 0 | 0 |
1542 | goto ANYNL03; never executed: goto ANYNL03; | 0 |
1543 | | - |
1544 | case 0x000d: | - |
1545 | if (ptr + 1 < end_subject && ptr[1] == 0x0a) ncount = 1; never evaluated: ptr + 1 < end_subject never evaluated: ptr[1] == 0x0a never executed: ncount = 1; | 0 |
1546 | | - |
1547 | | - |
1548 | ANYNL03: code before this statement never executed: ANYNL03: | 0 |
1549 | case 0x000a: | - |
1550 | if (codevalue == 340 + OP_TYPEPOSUPTO) never evaluated: codevalue == 340 + OP_TYPEPOSUPTO | 0 |
1551 | { | - |
1552 | active_count--; | - |
1553 | next_active_state--; | - |
1554 | } | 0 |
1555 | if (++count >= code[1]) never evaluated: ++count >= code[1] | 0 |
1556 | { if (new_count++ < wscount) { next_new_state->offset = (-(state_offset + 2 + 1)); next_new_state->count = (0); next_new_state->data = (ncount); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1557 | else | - |
1558 | { if (new_count++ < wscount) { next_new_state->offset = (-state_offset); next_new_state->count = (count); next_new_state->data = (ncount); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1559 | break; | 0 |
1560 | | - |
1561 | default: | - |
1562 | break; | 0 |
1563 | } | - |
1564 | } | 0 |
1565 | break; | 0 |
1566 | | - |
1567 | | - |
1568 | case 380 + OP_TYPEEXACT: | - |
1569 | case 380 + OP_TYPEUPTO: | - |
1570 | case 380 + OP_TYPEMINUPTO: | - |
1571 | case 380 + OP_TYPEPOSUPTO: | - |
1572 | if (codevalue != 380 + OP_TYPEEXACT) never evaluated: codevalue != 380 + OP_TYPEEXACT | 0 |
1573 | { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 2 + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
1574 | count = current_state->count; | - |
1575 | if (clen > 0) never evaluated: clen > 0 | 0 |
1576 | { | - |
1577 | BOOL OK; | - |
1578 | switch (c) | - |
1579 | { | - |
1580 | case 0x000a: | - |
1581 | case 0x000b: | - |
1582 | case 0x000c: | - |
1583 | case 0x000d: | - |
1584 | case 0x0085: | - |
1585 | case 0x2028: | - |
1586 | case 0x2029: | - |
1587 | OK = 1; | - |
1588 | break; | 0 |
1589 | | - |
1590 | default: | - |
1591 | OK = 0; | - |
1592 | } | 0 |
1593 | | - |
1594 | if (OK == (d == OP_VSPACE)) never evaluated: OK == (d == OP_VSPACE) | 0 |
1595 | { | - |
1596 | if (codevalue == 380 + OP_TYPEPOSUPTO) never evaluated: codevalue == 380 + OP_TYPEPOSUPTO | 0 |
1597 | { | - |
1598 | active_count--; | - |
1599 | next_active_state--; | - |
1600 | } | 0 |
1601 | if (++count >= code[1]) never evaluated: ++count >= code[1] | 0 |
1602 | { if (new_count++ < wscount) { next_new_state->offset = (-(state_offset + 2 + 1)); next_new_state->count = (0); next_new_state->data = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1603 | else | - |
1604 | { if (new_count++ < wscount) { next_new_state->offset = (-state_offset); next_new_state->count = (count); next_new_state->data = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1605 | } | - |
1606 | } | 0 |
1607 | break; | 0 |
1608 | | - |
1609 | | - |
1610 | case 360 + OP_TYPEEXACT: | - |
1611 | case 360 + OP_TYPEUPTO: | - |
1612 | case 360 + OP_TYPEMINUPTO: | - |
1613 | case 360 + OP_TYPEPOSUPTO: | - |
1614 | if (codevalue != 360 + OP_TYPEEXACT) never evaluated: codevalue != 360 + OP_TYPEEXACT | 0 |
1615 | { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 2 + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
1616 | count = current_state->count; | - |
1617 | if (clen > 0) never evaluated: clen > 0 | 0 |
1618 | { | - |
1619 | BOOL OK; | - |
1620 | switch (c) | - |
1621 | { | - |
1622 | case 0x09: | - |
1623 | case 0x20: | - |
1624 | case 0xa0: | - |
1625 | case 0x1680: | - |
1626 | case 0x180e: | - |
1627 | case 0x2000: | - |
1628 | case 0x2001: | - |
1629 | case 0x2002: | - |
1630 | case 0x2003: | - |
1631 | case 0x2004: | - |
1632 | case 0x2005: | - |
1633 | case 0x2006: | - |
1634 | case 0x2007: | - |
1635 | case 0x2008: | - |
1636 | case 0x2009: | - |
1637 | case 0x200A: | - |
1638 | case 0x202f: | - |
1639 | case 0x205f: | - |
1640 | case 0x3000: | - |
1641 | OK = 1; | - |
1642 | break; | 0 |
1643 | | - |
1644 | default: | - |
1645 | OK = 0; | - |
1646 | break; | 0 |
1647 | } | - |
1648 | | - |
1649 | if (OK == (d == OP_HSPACE)) never evaluated: OK == (d == OP_HSPACE) | 0 |
1650 | { | - |
1651 | if (codevalue == 360 + OP_TYPEPOSUPTO) never evaluated: codevalue == 360 + OP_TYPEPOSUPTO | 0 |
1652 | { | - |
1653 | active_count--; | - |
1654 | next_active_state--; | - |
1655 | } | 0 |
1656 | if (++count >= code[1]) never evaluated: ++count >= code[1] | 0 |
1657 | { if (new_count++ < wscount) { next_new_state->offset = (-(state_offset + 2 + 1)); next_new_state->count = (0); next_new_state->data = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1658 | else | - |
1659 | { if (new_count++ < wscount) { next_new_state->offset = (-state_offset); next_new_state->count = (count); next_new_state->data = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1660 | } | - |
1661 | } | 0 |
1662 | break; | 0 |
1663 | case OP_CHAR: | - |
1664 | if (clen > 0 && c == d) { if (new_count++ < wscount) { next_new_state->offset = (state_offset + dlen + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never evaluated: clen > 0 never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1665 | break; | 0 |
1666 | | - |
1667 | | - |
1668 | case OP_CHARI: | - |
1669 | if (clen == 0) break; never evaluated: clen == 0 | 0 |
1670 | | - |
1671 | | - |
1672 | if (utf) | 0 |
1673 | { | - |
1674 | if (c == d) { if (new_count++ < wscount) { next_new_state->offset = (state_offset + dlen + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); } else never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1675 | { | - |
1676 | unsigned int othercase; | - |
1677 | if (c < 128) | 0 |
1678 | othercase = fcc[c]; never executed: othercase = fcc[c]; | 0 |
1679 | else | - |
1680 | | - |
1681 | | - |
1682 | | - |
1683 | othercase = (c + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->other_case); never executed: othercase = (c + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->other_case); | 0 |
1684 | | - |
1685 | | - |
1686 | | - |
1687 | | - |
1688 | if (d == othercase) { if (new_count++ < wscount) { next_new_state->offset = (state_offset + dlen + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: d == othercase never evaluated: new_count++ < wscount | 0 |
1689 | } | 0 |
1690 | } | - |
1691 | else | - |
1692 | | - |
1693 | | - |
1694 | { | - |
1695 | if ((((c) <= 255u)? ((lcc)[c]):(c)) == (((d) <= 255u)? ((lcc)[d]):(d))) never evaluated: ((c) <= 255u) never evaluated: ((d) <= 255u) never evaluated: (((c) <= 255u)? ((lcc)[c]):(c)) == (((d) <= 255u)? ((lcc)[d]):(d)) | 0 |
1696 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset + 2); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1697 | } | 0 |
1698 | break; | 0 |
1699 | case OP_EXTUNI: | - |
1700 | if (clen > 0 && _pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->chartype] != ucp_M) never evaluated: clen > 0 never evaluated: _pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->chartype] != ucp_M | 0 |
1701 | { | - |
1702 | const pcre_uchar *nptr = ptr + clen; | - |
1703 | int ncount = 0; | - |
1704 | while (nptr < end_subject) never evaluated: nptr < end_subject | 0 |
1705 | { | - |
1706 | int nclen = 1; | - |
1707 | c = *nptr; if ((c & 0xfc00) == 0xd800) { c = (((c & 0x3ff) << 10) | (nptr[1] & 0x3ff)) + 0x10000; nclen++; };; never evaluated: (c & 0xfc00) == 0xd800 | 0 |
1708 | if (_pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->chartype] != ucp_M) break; never evaluated: _pcre16_ucp_gentype[(_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(c) / 128] * 128 + (c) % 128])->chartype] != ucp_M | 0 |
1709 | ncount++; | - |
1710 | nptr += nclen; | - |
1711 | } | 0 |
1712 | if (new_count++ < wscount) { next_new_state->offset = (-(state_offset + 1)); next_new_state->count = (0); next_new_state->data = (ncount); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1713 | } | - |
1714 | break; | 0 |
1715 | | - |
1716 | | - |
1717 | | - |
1718 | | - |
1719 | | - |
1720 | | - |
1721 | | - |
1722 | case OP_ANYNL: | - |
1723 | if (clen > 0) switch(c) never evaluated: clen > 0 | 0 |
1724 | { | - |
1725 | case 0x000b: | - |
1726 | case 0x000c: | - |
1727 | case 0x0085: | - |
1728 | case 0x2028: | - |
1729 | case 0x2029: | - |
1730 | if ((md->moptions & 0x00800000) != 0) break; never evaluated: (md->moptions & 0x00800000) != 0 | 0 |
1731 | | - |
1732 | case 0x000a: code before this statement never executed: case 0x000a: | 0 |
1733 | if (new_count++ < wscount) { next_new_state->offset = (state_offset + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1734 | break; | 0 |
1735 | | - |
1736 | case 0x000d: | - |
1737 | if (ptr + 1 < end_subject && ptr[1] == 0x0a) never evaluated: ptr + 1 < end_subject never evaluated: ptr[1] == 0x0a | 0 |
1738 | { | - |
1739 | if (new_count++ < wscount) { next_new_state->offset = (-(state_offset + 1)); next_new_state->count = (0); next_new_state->data = (1); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1740 | } | - |
1741 | else | - |
1742 | { | - |
1743 | if (new_count++ < wscount) { next_new_state->offset = (state_offset + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1744 | } | - |
1745 | break; | 0 |
1746 | } | 0 |
1747 | break; | 0 |
1748 | | - |
1749 | | - |
1750 | case OP_NOT_VSPACE: | - |
1751 | if (clen > 0) switch(c) never evaluated: clen > 0 | 0 |
1752 | { | - |
1753 | case 0x000a: | - |
1754 | case 0x000b: | - |
1755 | case 0x000c: | - |
1756 | case 0x000d: | - |
1757 | case 0x0085: | - |
1758 | case 0x2028: | - |
1759 | case 0x2029: | - |
1760 | break; | 0 |
1761 | | - |
1762 | default: | - |
1763 | if (new_count++ < wscount) { next_new_state->offset = (state_offset + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1764 | break; | 0 |
1765 | } | 0 |
1766 | break; | 0 |
1767 | | - |
1768 | | - |
1769 | case OP_VSPACE: | - |
1770 | if (clen > 0) switch(c) never evaluated: clen > 0 | 0 |
1771 | { | - |
1772 | case 0x000a: | - |
1773 | case 0x000b: | - |
1774 | case 0x000c: | - |
1775 | case 0x000d: | - |
1776 | case 0x0085: | - |
1777 | case 0x2028: | - |
1778 | case 0x2029: | - |
1779 | if (new_count++ < wscount) { next_new_state->offset = (state_offset + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1780 | break; | 0 |
1781 | | - |
1782 | default: break; | 0 |
1783 | } | 0 |
1784 | break; | 0 |
1785 | | - |
1786 | | - |
1787 | case OP_NOT_HSPACE: | - |
1788 | if (clen > 0) switch(c) never evaluated: clen > 0 | 0 |
1789 | { | - |
1790 | case 0x09: | - |
1791 | case 0x20: | - |
1792 | case 0xa0: | - |
1793 | case 0x1680: | - |
1794 | case 0x180e: | - |
1795 | case 0x2000: | - |
1796 | case 0x2001: | - |
1797 | case 0x2002: | - |
1798 | case 0x2003: | - |
1799 | case 0x2004: | - |
1800 | case 0x2005: | - |
1801 | case 0x2006: | - |
1802 | case 0x2007: | - |
1803 | case 0x2008: | - |
1804 | case 0x2009: | - |
1805 | case 0x200A: | - |
1806 | case 0x202f: | - |
1807 | case 0x205f: | - |
1808 | case 0x3000: | - |
1809 | break; | 0 |
1810 | | - |
1811 | default: | - |
1812 | if (new_count++ < wscount) { next_new_state->offset = (state_offset + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1813 | break; | 0 |
1814 | } | 0 |
1815 | break; | 0 |
1816 | | - |
1817 | | - |
1818 | case OP_HSPACE: | - |
1819 | if (clen > 0) switch(c) never evaluated: clen > 0 | 0 |
1820 | { | - |
1821 | case 0x09: | - |
1822 | case 0x20: | - |
1823 | case 0xa0: | - |
1824 | case 0x1680: | - |
1825 | case 0x180e: | - |
1826 | case 0x2000: | - |
1827 | case 0x2001: | - |
1828 | case 0x2002: | - |
1829 | case 0x2003: | - |
1830 | case 0x2004: | - |
1831 | case 0x2005: | - |
1832 | case 0x2006: | - |
1833 | case 0x2007: | - |
1834 | case 0x2008: | - |
1835 | case 0x2009: | - |
1836 | case 0x200A: | - |
1837 | case 0x202f: | - |
1838 | case 0x205f: | - |
1839 | case 0x3000: | - |
1840 | if (new_count++ < wscount) { next_new_state->offset = (state_offset + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1841 | break; | 0 |
1842 | } | 0 |
1843 | break; | 0 |
1844 | | - |
1845 | | - |
1846 | | - |
1847 | | - |
1848 | | - |
1849 | | - |
1850 | case OP_NOT: | - |
1851 | if (clen > 0 && c != d) { if (new_count++ < wscount) { next_new_state->offset = (state_offset + dlen + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never evaluated: clen > 0 never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1852 | break; | 0 |
1853 | | - |
1854 | | - |
1855 | | - |
1856 | | - |
1857 | | - |
1858 | | - |
1859 | case OP_NOTI: | - |
1860 | if (clen > 0 && c != d && c != fcc[d]) never evaluated: clen > 0 never evaluated: c != fcc[d] | 0 |
1861 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset + dlen + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1862 | break; | 0 |
1863 | | - |
1864 | | - |
1865 | case OP_PLUSI: | - |
1866 | case OP_MINPLUSI: | - |
1867 | case OP_POSPLUSI: | - |
1868 | case OP_NOTPLUSI: | - |
1869 | case OP_NOTMINPLUSI: | - |
1870 | case OP_NOTPOSPLUSI: | - |
1871 | caseless = 1; | - |
1872 | codevalue -= OP_STARI - OP_STAR; | - |
1873 | | - |
1874 | | - |
1875 | case OP_PLUS: code before this statement never executed: case OP_PLUS: | 0 |
1876 | case OP_MINPLUS: | - |
1877 | case OP_POSPLUS: | - |
1878 | case OP_NOTPLUS: | - |
1879 | case OP_NOTMINPLUS: | - |
1880 | case OP_NOTPOSPLUS: | - |
1881 | count = current_state->count; | - |
1882 | if (count > 0) { if (active_count++ < wscount) { next_active_state->offset = (state_offset + dlen + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: count > 0 never evaluated: active_count++ < wscount | 0 |
1883 | if (clen > 0) never evaluated: clen > 0 | 0 |
1884 | { | - |
1885 | unsigned int otherd = 0xffffffff; | - |
1886 | if (caseless) never evaluated: caseless | 0 |
1887 | { | - |
1888 | | - |
1889 | if (utf && d >= 128) never evaluated: d >= 128 | 0 |
1890 | { | - |
1891 | | - |
1892 | otherd = (d + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(d) / 128] * 128 + (d) % 128])->other_case); | - |
1893 | | - |
1894 | } | 0 |
1895 | else | - |
1896 | | - |
1897 | otherd = (((d) <= 255u)? ((fcc)[d]):(d)); never evaluated: ((d) <= 255u) never executed: otherd = (((d) <= 255u)? ((fcc)[d]):(d)); | 0 |
1898 | } | - |
1899 | if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR)) never evaluated: c == otherd never evaluated: (c == d || c == otherd) == (codevalue < OP_NOTSTAR) | 0 |
1900 | { | - |
1901 | if (count > 0 && never evaluated: count > 0 | 0 |
1902 | (codevalue == OP_POSPLUS || codevalue == OP_NOTPOSPLUS)) never evaluated: codevalue == OP_POSPLUS never evaluated: codevalue == OP_NOTPOSPLUS | 0 |
1903 | { | - |
1904 | active_count--; | - |
1905 | next_active_state--; | - |
1906 | } | 0 |
1907 | count++; | - |
1908 | if (new_count++ < wscount) { next_new_state->offset = (state_offset); next_new_state->count = (count); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1909 | } | - |
1910 | } | 0 |
1911 | break; | 0 |
1912 | | - |
1913 | | - |
1914 | case OP_QUERYI: | - |
1915 | case OP_MINQUERYI: | - |
1916 | case OP_POSQUERYI: | - |
1917 | case OP_NOTQUERYI: | - |
1918 | case OP_NOTMINQUERYI: | - |
1919 | case OP_NOTPOSQUERYI: | - |
1920 | caseless = 1; | - |
1921 | codevalue -= OP_STARI - OP_STAR; | - |
1922 | | - |
1923 | case OP_QUERY: code before this statement never executed: case OP_QUERY: | 0 |
1924 | case OP_MINQUERY: | - |
1925 | case OP_POSQUERY: | - |
1926 | case OP_NOTQUERY: | - |
1927 | case OP_NOTMINQUERY: | - |
1928 | case OP_NOTPOSQUERY: | - |
1929 | if (active_count++ < wscount) { next_active_state->offset = (state_offset + dlen + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
1930 | if (clen > 0) never evaluated: clen > 0 | 0 |
1931 | { | - |
1932 | unsigned int otherd = 0xffffffff; | - |
1933 | if (caseless) never evaluated: caseless | 0 |
1934 | { | - |
1935 | | - |
1936 | if (utf && d >= 128) never evaluated: d >= 128 | 0 |
1937 | { | - |
1938 | | - |
1939 | otherd = (d + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(d) / 128] * 128 + (d) % 128])->other_case); | - |
1940 | | - |
1941 | } | 0 |
1942 | else | - |
1943 | | - |
1944 | otherd = (((d) <= 255u)? ((fcc)[d]):(d)); never evaluated: ((d) <= 255u) never executed: otherd = (((d) <= 255u)? ((fcc)[d]):(d)); | 0 |
1945 | } | - |
1946 | if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR)) never evaluated: c == otherd never evaluated: (c == d || c == otherd) == (codevalue < OP_NOTSTAR) | 0 |
1947 | { | - |
1948 | if (codevalue == OP_POSQUERY || codevalue == OP_NOTPOSQUERY) never evaluated: codevalue == OP_POSQUERY never evaluated: codevalue == OP_NOTPOSQUERY | 0 |
1949 | { | - |
1950 | active_count--; | - |
1951 | next_active_state--; | - |
1952 | } | 0 |
1953 | if (new_count++ < wscount) { next_new_state->offset = (state_offset + dlen + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1954 | } | - |
1955 | } | 0 |
1956 | break; | 0 |
1957 | | - |
1958 | | - |
1959 | case OP_STARI: | - |
1960 | case OP_MINSTARI: | - |
1961 | case OP_POSSTARI: | - |
1962 | case OP_NOTSTARI: | - |
1963 | case OP_NOTMINSTARI: | - |
1964 | case OP_NOTPOSSTARI: | - |
1965 | caseless = 1; | - |
1966 | codevalue -= OP_STARI - OP_STAR; | - |
1967 | | - |
1968 | case OP_STAR: code before this statement never executed: case OP_STAR: | 0 |
1969 | case OP_MINSTAR: | - |
1970 | case OP_POSSTAR: | - |
1971 | case OP_NOTSTAR: | - |
1972 | case OP_NOTMINSTAR: | - |
1973 | case OP_NOTPOSSTAR: | - |
1974 | if (active_count++ < wscount) { next_active_state->offset = (state_offset + dlen + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
1975 | if (clen > 0) never evaluated: clen > 0 | 0 |
1976 | { | - |
1977 | unsigned int otherd = 0xffffffff; | - |
1978 | if (caseless) never evaluated: caseless | 0 |
1979 | { | - |
1980 | | - |
1981 | if (utf && d >= 128) never evaluated: d >= 128 | 0 |
1982 | { | - |
1983 | | - |
1984 | otherd = (d + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(d) / 128] * 128 + (d) % 128])->other_case); | - |
1985 | | - |
1986 | } | 0 |
1987 | else | - |
1988 | | - |
1989 | otherd = (((d) <= 255u)? ((fcc)[d]):(d)); never evaluated: ((d) <= 255u) never executed: otherd = (((d) <= 255u)? ((fcc)[d]):(d)); | 0 |
1990 | } | - |
1991 | if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR)) never evaluated: c == otherd never evaluated: (c == d || c == otherd) == (codevalue < OP_NOTSTAR) | 0 |
1992 | { | - |
1993 | if (codevalue == OP_POSSTAR || codevalue == OP_NOTPOSSTAR) never evaluated: codevalue == OP_POSSTAR never evaluated: codevalue == OP_NOTPOSSTAR | 0 |
1994 | { | - |
1995 | active_count--; | - |
1996 | next_active_state--; | - |
1997 | } | 0 |
1998 | if (new_count++ < wscount) { next_new_state->offset = (state_offset); next_new_state->count = (0); next_new_state++; ; } else return (-19); never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
1999 | } | - |
2000 | } | 0 |
2001 | break; | 0 |
2002 | | - |
2003 | | - |
2004 | case OP_EXACTI: | - |
2005 | case OP_NOTEXACTI: | - |
2006 | caseless = 1; | - |
2007 | codevalue -= OP_STARI - OP_STAR; | - |
2008 | | - |
2009 | case OP_EXACT: code before this statement never executed: case OP_EXACT: | 0 |
2010 | case OP_NOTEXACT: | - |
2011 | count = current_state->count; | - |
2012 | if (clen > 0) never evaluated: clen > 0 | 0 |
2013 | { | - |
2014 | unsigned int otherd = 0xffffffff; | - |
2015 | if (caseless) never evaluated: caseless | 0 |
2016 | { | - |
2017 | | - |
2018 | if (utf && d >= 128) never evaluated: d >= 128 | 0 |
2019 | { | - |
2020 | | - |
2021 | otherd = (d + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(d) / 128] * 128 + (d) % 128])->other_case); | - |
2022 | | - |
2023 | } | 0 |
2024 | else | - |
2025 | | - |
2026 | otherd = (((d) <= 255u)? ((fcc)[d]):(d)); never evaluated: ((d) <= 255u) never executed: otherd = (((d) <= 255u)? ((fcc)[d]):(d)); | 0 |
2027 | } | - |
2028 | if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR)) never evaluated: c == otherd never evaluated: (c == d || c == otherd) == (codevalue < OP_NOTSTAR) | 0 |
2029 | { | - |
2030 | if (++count >= code[1]) never evaluated: ++count >= code[1] | 0 |
2031 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset + dlen + 1 + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
2032 | else | - |
2033 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset); next_new_state->count = (count); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
2034 | } | - |
2035 | } | 0 |
2036 | break; | 0 |
2037 | | - |
2038 | | - |
2039 | case OP_UPTOI: | - |
2040 | case OP_MINUPTOI: | - |
2041 | case OP_POSUPTOI: | - |
2042 | case OP_NOTUPTOI: | - |
2043 | case OP_NOTMINUPTOI: | - |
2044 | case OP_NOTPOSUPTOI: | - |
2045 | caseless = 1; | - |
2046 | codevalue -= OP_STARI - OP_STAR; | - |
2047 | | - |
2048 | case OP_UPTO: code before this statement never executed: case OP_UPTO: | 0 |
2049 | case OP_MINUPTO: | - |
2050 | case OP_POSUPTO: | - |
2051 | case OP_NOTUPTO: | - |
2052 | case OP_NOTMINUPTO: | - |
2053 | case OP_NOTPOSUPTO: | - |
2054 | if (active_count++ < wscount) { next_active_state->offset = (state_offset + dlen + 1 + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
2055 | count = current_state->count; | - |
2056 | if (clen > 0) never evaluated: clen > 0 | 0 |
2057 | { | - |
2058 | unsigned int otherd = 0xffffffff; | - |
2059 | if (caseless) never evaluated: caseless | 0 |
2060 | { | - |
2061 | | - |
2062 | if (utf && d >= 128) never evaluated: d >= 128 | 0 |
2063 | { | - |
2064 | | - |
2065 | otherd = (d + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(d) / 128] * 128 + (d) % 128])->other_case); | - |
2066 | | - |
2067 | } | 0 |
2068 | else | - |
2069 | | - |
2070 | otherd = (((d) <= 255u)? ((fcc)[d]):(d)); never evaluated: ((d) <= 255u) never executed: otherd = (((d) <= 255u)? ((fcc)[d]):(d)); | 0 |
2071 | } | - |
2072 | if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR)) never evaluated: c == otherd never evaluated: (c == d || c == otherd) == (codevalue < OP_NOTSTAR) | 0 |
2073 | { | - |
2074 | if (codevalue == OP_POSUPTO || codevalue == OP_NOTPOSUPTO) never evaluated: codevalue == OP_POSUPTO never evaluated: codevalue == OP_NOTPOSUPTO | 0 |
2075 | { | - |
2076 | active_count--; | - |
2077 | next_active_state--; | - |
2078 | } | 0 |
2079 | if (++count >= code[1]) never evaluated: ++count >= code[1] | 0 |
2080 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset + dlen + 1 + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
2081 | else | - |
2082 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset); next_new_state->count = (count); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: new_count++ < wscount | 0 |
2083 | } | - |
2084 | } | 0 |
2085 | break; | 0 |
2086 | | - |
2087 | | - |
2088 | | - |
2089 | | - |
2090 | | - |
2091 | case OP_CLASS: | - |
2092 | case OP_NCLASS: | - |
2093 | case OP_XCLASS: | - |
2094 | { | - |
2095 | BOOL isinclass = 0; | - |
2096 | int next_state_offset; | - |
2097 | const pcre_uchar *ecode; | - |
2098 | | - |
2099 | | - |
2100 | | - |
2101 | | - |
2102 | if (codevalue != OP_XCLASS) never evaluated: codevalue != OP_XCLASS | 0 |
2103 | { | - |
2104 | ecode = code + 1 + (32 / sizeof(pcre_uchar)); | - |
2105 | if (clen > 0) never evaluated: clen > 0 | 0 |
2106 | { | - |
2107 | isinclass = (c > 255)? (codevalue == OP_NCLASS) : never evaluated: (c > 255) | 0 |
2108 | ((((pcre_uint8 *)(code + 1))[c/8] & (1 << (c&7))) != 0); | - |
2109 | } | 0 |
2110 | } | 0 |
2111 | | - |
2112 | | - |
2113 | | - |
2114 | | - |
2115 | | - |
2116 | else | - |
2117 | { | - |
2118 | ecode = code + (code[1]); | - |
2119 | if (clen > 0) isinclass = _pcre16_xclass(c, code + 1 + 1, utf); never executed: isinclass = _pcre16_xclass(c, code + 1 + 1, utf); never evaluated: clen > 0 | 0 |
2120 | } | 0 |
2121 | | - |
2122 | | - |
2123 | | - |
2124 | | - |
2125 | | - |
2126 | next_state_offset = (int)(ecode - start_code); | - |
2127 | | - |
2128 | switch (*ecode) | - |
2129 | { | - |
2130 | case OP_CRSTAR: | - |
2131 | case OP_CRMINSTAR: | - |
2132 | if (active_count++ < wscount) { next_active_state->offset = (next_state_offset + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
2133 | if (isinclass) { if (new_count++ < wscount) { next_new_state->offset = (state_offset); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: isinclass never evaluated: new_count++ < wscount | 0 |
2134 | break; | 0 |
2135 | | - |
2136 | case OP_CRPLUS: | - |
2137 | case OP_CRMINPLUS: | - |
2138 | count = current_state->count; | - |
2139 | if (count > 0) { if (active_count++ < wscount) { next_active_state->offset = (next_state_offset + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never executed: return (-19); never evaluated: count > 0 never evaluated: active_count++ < wscount | 0 |
2140 | if (isinclass) { count++; if (new_count++ < wscount) { next_new_state->offset = (state_offset); next_new_state->count = (count); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: isinclass never evaluated: new_count++ < wscount | 0 |
2141 | break; | 0 |
2142 | | - |
2143 | case OP_CRQUERY: | - |
2144 | case OP_CRMINQUERY: | - |
2145 | if (active_count++ < wscount) { next_active_state->offset = (next_state_offset + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); never executed: return (-19); never evaluated: active_count++ < wscount | 0 |
2146 | if (isinclass) { if (new_count++ < wscount) { next_new_state->offset = (next_state_offset + 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never executed: return (-19); never evaluated: isinclass never evaluated: new_count++ < wscount | 0 |
2147 | break; | 0 |
2148 | | - |
2149 | case OP_CRRANGE: | - |
2150 | case OP_CRMINRANGE: | - |
2151 | count = current_state->count; | - |
2152 | if (count >= ecode[1]) never evaluated: count >= ecode[1] | 0 |
2153 | { if (active_count++ < wscount) { next_active_state->offset = (next_state_offset + 1 + 2 * 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never evaluated: active_count++ < wscount never executed: return (-19); | 0 |
2154 | if (isinclass) never evaluated: isinclass | 0 |
2155 | { | - |
2156 | int max = ecode[1 + 1]; | - |
2157 | if (++count >= max && max != 0) never evaluated: ++count >= max never evaluated: max != 0 | 0 |
2158 | { if (new_count++ < wscount) { next_new_state->offset = (next_state_offset + 1 + 2 * 1); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never evaluated: new_count++ < wscount never executed: return (-19); | 0 |
2159 | else | - |
2160 | { if (new_count++ < wscount) { next_new_state->offset = (state_offset); next_new_state->count = (count); next_new_state++; ; } else return (-19); } never evaluated: new_count++ < wscount never executed: return (-19); | 0 |
2161 | } | - |
2162 | break; | 0 |
2163 | | - |
2164 | default: | - |
2165 | if (isinclass) { if (new_count++ < wscount) { next_new_state->offset = (next_state_offset); next_new_state->count = (0); next_new_state++; ; } else return (-19); } never evaluated: new_count++ < wscount never executed: return (-19); never evaluated: isinclass | 0 |
2166 | break; | 0 |
2167 | } | - |
2168 | } | - |
2169 | break; | 0 |
2170 | | - |
2171 | | - |
2172 | | - |
2173 | | - |
2174 | | - |
2175 | | - |
2176 | | - |
2177 | case OP_FAIL: | - |
2178 | forced_fail++; | - |
2179 | break; | 0 |
2180 | | - |
2181 | case OP_ASSERT: | - |
2182 | case OP_ASSERT_NOT: | - |
2183 | case OP_ASSERTBACK: | - |
2184 | case OP_ASSERTBACK_NOT: | - |
2185 | { | - |
2186 | int rc; | - |
2187 | int local_offsets[2]; | - |
2188 | int local_workspace[1000]; | - |
2189 | const pcre_uchar *endasscode = code + (code[1]); | - |
2190 | | - |
2191 | while (*endasscode == OP_ALT) endasscode += (endasscode[1]); never evaluated: *endasscode == OP_ALT never executed: endasscode += (endasscode[1]); | 0 |
2192 | | - |
2193 | rc = internal_dfa_exec( | - |
2194 | md, | - |
2195 | code, | - |
2196 | ptr, | - |
2197 | (int)(ptr - start_subject), | - |
2198 | local_offsets, | - |
2199 | sizeof(local_offsets)/sizeof(int), | - |
2200 | local_workspace, | - |
2201 | sizeof(local_workspace)/sizeof(int), | - |
2202 | rlevel); | - |
2203 | | - |
2204 | if (rc == (-16)) return rc; never executed: return rc; never evaluated: rc == (-16) | 0 |
2205 | if ((rc >= 0) == (codevalue == OP_ASSERT || codevalue == OP_ASSERTBACK)) never evaluated: codevalue == OP_ASSERT never evaluated: codevalue == OP_ASSERTBACK never evaluated: (rc >= 0) == (codevalue == OP_ASSERT || codevalue == OP_ASSERTBACK) | 0 |
2206 | { if (active_count++ < wscount) { next_active_state->offset = ((int)(endasscode + 1 + 1 - start_code)); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never evaluated: active_count++ < wscount never executed: return (-19); | 0 |
2207 | } | - |
2208 | break; | 0 |
2209 | | - |
2210 | | - |
2211 | case OP_COND: | - |
2212 | case OP_SCOND: | - |
2213 | { | - |
2214 | int local_offsets[1000]; | - |
2215 | int local_workspace[1000]; | - |
2216 | int codelink = (code[1]); | - |
2217 | int condcode; | - |
2218 | | - |
2219 | | - |
2220 | | - |
2221 | | - |
2222 | | - |
2223 | if (code[1 +1] == OP_CALLOUT) never evaluated: code[1 +1] == OP_CALLOUT | 0 |
2224 | { | - |
2225 | rrc = 0; | - |
2226 | if (pcre16_callout != ((void *)0)) never evaluated: pcre16_callout != ((void *)0) | 0 |
2227 | { | - |
2228 | pcre16_callout_block cb; | - |
2229 | cb.version = 1; | - |
2230 | cb.callout_number = code[1 +2]; | - |
2231 | cb.offset_vector = offsets; | - |
2232 | | - |
2233 | | - |
2234 | | - |
2235 | cb.subject = (const unsigned short *)start_subject; | - |
2236 | | - |
2237 | cb.subject_length = (int)(end_subject - start_subject); | - |
2238 | cb.start_match = (int)(current_subject - start_subject); | - |
2239 | cb.current_position = (int)(ptr - start_subject); | - |
2240 | cb.pattern_position = (code[1 + 3]); | - |
2241 | cb.next_item_length = (code[3 + 2*1]); | - |
2242 | cb.capture_top = 1; | - |
2243 | cb.capture_last = -1; | - |
2244 | cb.callout_data = md->callout_data; | - |
2245 | cb.mark = ((void *)0); | - |
2246 | if ((rrc = (*pcre16_callout)(&cb)) < 0) return rrc; never executed: return rrc; never evaluated: (rrc = (*pcre16_callout)(&cb)) < 0 | 0 |
2247 | } | 0 |
2248 | if (rrc > 0) break; | 0 |
2249 | code += _pcre16_OP_lengths[OP_CALLOUT]; | - |
2250 | } | 0 |
2251 | | - |
2252 | condcode = code[1 +1]; | - |
2253 | | - |
2254 | | - |
2255 | | - |
2256 | if (condcode == OP_CREF || condcode == OP_NCREF) never evaluated: condcode == OP_CREF never evaluated: condcode == OP_NCREF | 0 |
2257 | return (-17); never executed: return (-17); | 0 |
2258 | | - |
2259 | | - |
2260 | | - |
2261 | if (condcode == OP_DEF) never evaluated: condcode == OP_DEF | 0 |
2262 | { if (active_count++ < wscount) { next_active_state->offset = (state_offset + codelink + 1 + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never evaluated: active_count++ < wscount never executed: return (-19); | 0 |
2263 | | - |
2264 | | - |
2265 | | - |
2266 | | - |
2267 | | - |
2268 | else if (condcode == OP_RREF || condcode == OP_NRREF) never evaluated: condcode == OP_RREF never evaluated: condcode == OP_NRREF | 0 |
2269 | { | - |
2270 | int value = code[1 + 2]; | - |
2271 | if (value != 0xffff) return (-17); never executed: return (-17); never evaluated: value != 0xffff | 0 |
2272 | if (md->recursive != ((void *)0)) never evaluated: md->recursive != ((void *)0) | 0 |
2273 | { if (active_count++ < wscount) { next_active_state->offset = (state_offset + 1 + 2 + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never evaluated: active_count++ < wscount never executed: return (-19); | 0 |
2274 | else { if (active_count++ < wscount) { next_active_state->offset = (state_offset + codelink + 1 + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never evaluated: active_count++ < wscount never executed: return (-19); | 0 |
2275 | } | - |
2276 | | - |
2277 | | - |
2278 | | - |
2279 | else | - |
2280 | { | - |
2281 | int rc; | - |
2282 | const pcre_uchar *asscode = code + 1 + 1; | - |
2283 | const pcre_uchar *endasscode = asscode + (asscode[1]); | - |
2284 | | - |
2285 | while (*endasscode == OP_ALT) endasscode += (endasscode[1]); never evaluated: *endasscode == OP_ALT never executed: endasscode += (endasscode[1]); | 0 |
2286 | | - |
2287 | rc = internal_dfa_exec( | - |
2288 | md, | - |
2289 | asscode, | - |
2290 | ptr, | - |
2291 | (int)(ptr - start_subject), | - |
2292 | local_offsets, | - |
2293 | sizeof(local_offsets)/sizeof(int), | - |
2294 | local_workspace, | - |
2295 | sizeof(local_workspace)/sizeof(int), | - |
2296 | rlevel); | - |
2297 | | - |
2298 | if (rc == (-16)) return rc; never executed: return rc; never evaluated: rc == (-16) | 0 |
2299 | if ((rc >= 0) == | 0 |
2300 | (condcode == OP_ASSERT || condcode == OP_ASSERTBACK)) never evaluated: (rc >= 0) == (condcode == OP_ASSERT || condcode == OP_ASSERTBACK) never evaluated: condcode == OP_ASSERT never evaluated: condcode == OP_ASSERTBACK | 0 |
2301 | { if (active_count++ < wscount) { next_active_state->offset = ((int)(endasscode + 1 + 1 - start_code)); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never evaluated: active_count++ < wscount never executed: return (-19); | 0 |
2302 | else | - |
2303 | { if (active_count++ < wscount) { next_active_state->offset = (state_offset + codelink + 1 + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never evaluated: active_count++ < wscount never executed: return (-19); | 0 |
2304 | } | - |
2305 | } | - |
2306 | break; | 0 |
2307 | | - |
2308 | | - |
2309 | case OP_RECURSE: | - |
2310 | { | - |
2311 | dfa_recursion_info *ri; | - |
2312 | int local_offsets[1000]; | - |
2313 | int local_workspace[1000]; | - |
2314 | const pcre_uchar *callpat = start_code + (code[1]); | - |
2315 | int recno = (callpat == md->start_code)? 0 : never evaluated: (callpat == md->start_code) | 0 |
2316 | callpat[1 + 1]; | - |
2317 | int rc; | - |
2318 | | - |
2319 | ; | - |
2320 | | - |
2321 | | - |
2322 | | - |
2323 | | - |
2324 | | - |
2325 | for (ri = md->recursive; ri != ((void *)0); ri = ri->prevrec) never evaluated: ri != ((void *)0) | 0 |
2326 | if (recno == ri->group_num && ptr == ri->subject_position) never evaluated: recno == ri->group_num never evaluated: ptr == ri->subject_position | 0 |
2327 | return (-26); never executed: return (-26); | 0 |
2328 | | - |
2329 | | - |
2330 | | - |
2331 | | - |
2332 | new_recursive.group_num = recno; | - |
2333 | new_recursive.subject_position = ptr; | - |
2334 | new_recursive.prevrec = md->recursive; | - |
2335 | md->recursive = &new_recursive; | - |
2336 | | - |
2337 | rc = internal_dfa_exec( | - |
2338 | md, | - |
2339 | callpat, | - |
2340 | ptr, | - |
2341 | (int)(ptr - start_subject), | - |
2342 | local_offsets, | - |
2343 | sizeof(local_offsets)/sizeof(int), | - |
2344 | local_workspace, | - |
2345 | sizeof(local_workspace)/sizeof(int), | - |
2346 | rlevel); | - |
2347 | | - |
2348 | md->recursive = new_recursive.prevrec; | - |
2349 | | - |
2350 | ; | - |
2351 | | - |
2352 | | - |
2353 | | - |
2354 | | - |
2355 | if (rc == 0) return (-20); never executed: return (-20); | 0 |
2356 | | - |
2357 | | - |
2358 | | - |
2359 | | - |
2360 | | - |
2361 | if (rc > 0) | 0 |
2362 | { | - |
2363 | for (rc = rc*2 - 2; rc >= 0; rc -= 2) | 0 |
2364 | { | - |
2365 | int charcount = local_offsets[rc+1] - local_offsets[rc]; | - |
2366 | | - |
2367 | const pcre_uchar *p = start_subject + local_offsets[rc]; | - |
2368 | const pcre_uchar *pp = start_subject + local_offsets[rc+1]; | - |
2369 | while (p < pp) if ((((*p++) & 0xfc00) == 0xdc00)) charcount--; never executed: charcount--; never evaluated: (((*p++) & 0xfc00) == 0xdc00) | 0 |
2370 | | - |
2371 | if (charcount > 0) never evaluated: charcount > 0 | 0 |
2372 | { | - |
2373 | if (new_count++ < wscount) { next_new_state->offset = (-(state_offset + 1 + 1)); next_new_state->count = (0); next_new_state->data = ((charcount - 1)); next_new_state++; ; } else return (-19); never evaluated: new_count++ < wscount never executed: return (-19); | 0 |
2374 | } | - |
2375 | else | - |
2376 | { | - |
2377 | if (active_count++ < wscount) { next_active_state->offset = (state_offset + 1 + 1); next_active_state->count = (0); next_active_state++; ; } else return (-19); never evaluated: active_count++ < wscount never executed: return (-19); | 0 |
2378 | } | - |
2379 | } | - |
2380 | } | 0 |
2381 | else if (rc != (-1)) return rc; never executed: return rc; never evaluated: rc != (-1) | 0 |
2382 | } | - |
2383 | break; | 0 |
2384 | | - |
2385 | | - |
2386 | case OP_BRAPOS: | - |
2387 | case OP_SBRAPOS: | - |
2388 | case OP_CBRAPOS: | - |
2389 | case OP_SCBRAPOS: | - |
2390 | case OP_BRAPOSZERO: | - |
2391 | { | - |
2392 | int charcount, matched_count; | - |
2393 | const pcre_uchar *local_ptr = ptr; | - |
2394 | BOOL allow_zero; | - |
2395 | | - |
2396 | if (codevalue == OP_BRAPOSZERO) never evaluated: codevalue == OP_BRAPOSZERO | 0 |
2397 | { | - |
2398 | allow_zero = 1; | - |
2399 | codevalue = *(++code); | - |
2400 | } | 0 |
2401 | else allow_zero = 0; never executed: allow_zero = 0; | 0 |
2402 | | - |
2403 | | - |
2404 | | - |
2405 | | - |
2406 | for (matched_count = 0;; matched_count++) | - |
2407 | { | - |
2408 | int local_offsets[2]; | - |
2409 | int local_workspace[1000]; | - |
2410 | | - |
2411 | int rc = internal_dfa_exec( | - |
2412 | md, | - |
2413 | code, | - |
2414 | local_ptr, | - |
2415 | (int)(ptr - start_subject), | - |
2416 | local_offsets, | - |
2417 | sizeof(local_offsets)/sizeof(int), | - |
2418 | local_workspace, | - |
2419 | sizeof(local_workspace)/sizeof(int), | - |
2420 | rlevel); | - |
2421 | | - |
2422 | | - |
2423 | | - |
2424 | if (rc < 0) | 0 |
2425 | { | - |
2426 | if (rc != (-1)) return rc; never executed: return rc; never evaluated: rc != (-1) | 0 |
2427 | break; | 0 |
2428 | } | - |
2429 | | - |
2430 | | - |
2431 | | - |
2432 | charcount = local_offsets[1] - local_offsets[0]; | - |
2433 | if (charcount == 0) break; never evaluated: charcount == 0 | 0 |
2434 | local_ptr += charcount; | - |
2435 | } | 0 |
2436 | | - |
2437 | | - |
2438 | | - |
2439 | | - |
2440 | | - |
2441 | if (matched_count > 0 || allow_zero) never evaluated: matched_count > 0 never evaluated: allow_zero | 0 |
2442 | { | - |
2443 | const pcre_uchar *end_subpattern = code; | - |
2444 | int next_state_offset; | - |
2445 | | - |
2446 | do { end_subpattern += (end_subpattern[1]); } | 0 |
2447 | while (*end_subpattern == OP_ALT); never evaluated: *end_subpattern == OP_ALT | 0 |
2448 | next_state_offset = | - |
2449 | (int)(end_subpattern - start_code + 1 + 1); | - |
2450 | | - |
2451 | | - |
2452 | | - |
2453 | | - |
2454 | | - |
2455 | | - |
2456 | if (i + 1 >= active_count && new_count == 0) never evaluated: i + 1 >= active_count never evaluated: new_count == 0 | 0 |
2457 | { | - |
2458 | ptr = local_ptr; | - |
2459 | clen = 0; | - |
2460 | if (new_count++ < wscount) { next_new_state->offset = (next_state_offset); next_new_state->count = (0); next_new_state++; ; } else return (-19); never evaluated: new_count++ < wscount never executed: return (-19); | 0 |
2461 | } | - |
2462 | else | - |
2463 | { | - |
2464 | const pcre_uchar *p = ptr; | - |
2465 | const pcre_uchar *pp = local_ptr; | - |
2466 | charcount = (int)(pp - p); | - |
2467 | | - |
2468 | while (p < pp) if ((((*p++) & 0xfc00) == 0xdc00)) charcount--; never executed: charcount--; never evaluated: (((*p++) & 0xfc00) == 0xdc00) | 0 |
2469 | | - |
2470 | if (new_count++ < wscount) { next_new_state->offset = (-next_state_offset); next_new_state->count = (0); next_new_state->data = ((charcount - 1)); next_new_state++; ; } else return (-19); never evaluated: new_count++ < wscount never executed: return (-19); | 0 |
2471 | } | - |
2472 | } | - |
2473 | } | - |
2474 | break; | 0 |
2475 | | - |
2476 | | - |
2477 | case OP_ONCE: | - |
2478 | case OP_ONCE_NC: | - |
2479 | { | - |
2480 | int local_offsets[2]; | - |
2481 | int local_workspace[1000]; | - |
2482 | | - |
2483 | int rc = internal_dfa_exec( | - |
2484 | md, | - |
2485 | code, | - |
2486 | ptr, | - |
2487 | (int)(ptr - start_subject), | - |
2488 | local_offsets, | - |
2489 | sizeof(local_offsets)/sizeof(int), | - |
2490 | local_workspace, | - |
2491 | sizeof(local_workspace)/sizeof(int), | - |
2492 | rlevel); | - |
2493 | | - |
2494 | if (rc >= 0) | 0 |
2495 | { | - |
2496 | const pcre_uchar *end_subpattern = code; | - |
2497 | int charcount = local_offsets[1] - local_offsets[0]; | - |
2498 | int next_state_offset, repeat_state_offset; | - |
2499 | | - |
2500 | do { end_subpattern += (end_subpattern[1]); } | 0 |
2501 | while (*end_subpattern == OP_ALT); never evaluated: *end_subpattern == OP_ALT | 0 |
2502 | next_state_offset = | - |
2503 | (int)(end_subpattern - start_code + 1 + 1); | - |
2504 | | - |
2505 | | - |
2506 | | - |
2507 | | - |
2508 | | - |
2509 | repeat_state_offset = (*end_subpattern == OP_KETRMAX || never evaluated: *end_subpattern == OP_KETRMAX | 0 |
2510 | *end_subpattern == OP_KETRMIN)? never evaluated: *end_subpattern == OP_KETRMIN | 0 |
2511 | (int)(end_subpattern - start_code - (end_subpattern[1])) : -1; | - |
2512 | | - |
2513 | | - |
2514 | | - |
2515 | | - |
2516 | | - |
2517 | | - |
2518 | if (charcount == 0) never evaluated: charcount == 0 | 0 |
2519 | { | - |
2520 | if (active_count++ < wscount) { next_active_state->offset = (next_state_offset); next_active_state->count = (0); next_active_state++; ; } else return (-19); never evaluated: active_count++ < wscount never executed: return (-19); | 0 |
2521 | } | - |
2522 | | - |
2523 | | - |
2524 | | - |
2525 | | - |
2526 | | - |
2527 | | - |
2528 | else if (i + 1 >= active_count && new_count == 0) never evaluated: i + 1 >= active_count never evaluated: new_count == 0 | 0 |
2529 | { | - |
2530 | ptr += charcount; | - |
2531 | clen = 0; | - |
2532 | if (new_count++ < wscount) { next_new_state->offset = (next_state_offset); next_new_state->count = (0); next_new_state++; ; } else return (-19); never evaluated: new_count++ < wscount never executed: return (-19); | 0 |
2533 | | - |
2534 | | - |
2535 | | - |
2536 | | - |
2537 | | - |
2538 | | - |
2539 | if (repeat_state_offset >= 0) never evaluated: repeat_state_offset >= 0 | 0 |
2540 | { | - |
2541 | next_active_state = active_states; | - |
2542 | active_count = 0; | - |
2543 | i = -1; | - |
2544 | if (active_count++ < wscount) { next_active_state->offset = (repeat_state_offset); next_active_state->count = (0); next_active_state++; ; } else return (-19); never evaluated: active_count++ < wscount never executed: return (-19); | 0 |
2545 | } | - |
2546 | } | 0 |
2547 | else | - |
2548 | { | - |
2549 | | - |
2550 | const pcre_uchar *p = start_subject + local_offsets[0]; | - |
2551 | const pcre_uchar *pp = start_subject + local_offsets[1]; | - |
2552 | while (p < pp) if ((((*p++) & 0xfc00) == 0xdc00)) charcount--; never executed: charcount--; never evaluated: (((*p++) & 0xfc00) == 0xdc00) | 0 |
2553 | | - |
2554 | if (new_count++ < wscount) { next_new_state->offset = (-next_state_offset); next_new_state->count = (0); next_new_state->data = ((charcount - 1)); next_new_state++; ; } else return (-19); never evaluated: new_count++ < wscount never executed: return (-19); | 0 |
2555 | if (repeat_state_offset >= 0) never evaluated: repeat_state_offset >= 0 | 0 |
2556 | { if (new_count++ < wscount) { next_new_state->offset = (-repeat_state_offset); next_new_state->count = (0); next_new_state->data = ((charcount - 1)); next_new_state++; ; } else return (-19); } never evaluated: new_count++ < wscount never executed: return (-19); | 0 |
2557 | } | 0 |
2558 | } | - |
2559 | else if (rc != (-1)) return rc; never executed: return rc; never evaluated: rc != (-1) | 0 |
2560 | } | - |
2561 | break; | 0 |
2562 | | - |
2563 | | - |
2564 | | - |
2565 | | - |
2566 | | - |
2567 | case OP_CALLOUT: | - |
2568 | rrc = 0; | - |
2569 | if (pcre16_callout != ((void *)0)) never evaluated: pcre16_callout != ((void *)0) | 0 |
2570 | { | - |
2571 | pcre16_callout_block cb; | - |
2572 | cb.version = 1; | - |
2573 | cb.callout_number = code[1]; | - |
2574 | cb.offset_vector = offsets; | - |
2575 | | - |
2576 | | - |
2577 | | - |
2578 | cb.subject = (const unsigned short *)start_subject; | - |
2579 | | - |
2580 | cb.subject_length = (int)(end_subject - start_subject); | - |
2581 | cb.start_match = (int)(current_subject - start_subject); | - |
2582 | cb.current_position = (int)(ptr - start_subject); | - |
2583 | cb.pattern_position = (code[2]); | - |
2584 | cb.next_item_length = (code[2 + 1]); | - |
2585 | cb.capture_top = 1; | - |
2586 | cb.capture_last = -1; | - |
2587 | cb.callout_data = md->callout_data; | - |
2588 | cb.mark = ((void *)0); | - |
2589 | if ((rrc = (*pcre16_callout)(&cb)) < 0) return rrc; never executed: return rrc; never evaluated: (rrc = (*pcre16_callout)(&cb)) < 0 | 0 |
2590 | } | 0 |
2591 | if (rrc == 0) never evaluated: rrc == 0 | 0 |
2592 | { if (active_count++ < wscount) { next_active_state->offset = (state_offset + _pcre16_OP_lengths[OP_CALLOUT]); next_active_state->count = (0); next_active_state++; ; } else return (-19); } never evaluated: active_count++ < wscount never executed: return (-19); | 0 |
2593 | break; | 0 |
2594 | | - |
2595 | | - |
2596 | | - |
2597 | default: | - |
2598 | return (-16); never executed: return (-16); | 0 |
2599 | } | - |
2600 | | - |
2601 | NEXT_ACTIVE_STATE: continue; never executed: continue; | 0 |
2602 | | - |
2603 | } | - |
2604 | if (new_count <= 0) never evaluated: new_count <= 0 | 0 |
2605 | { | - |
2606 | if (rlevel == 1 && never evaluated: rlevel == 1 | 0 |
2607 | could_continue && never evaluated: could_continue | 0 |
2608 | forced_fail != workspace[1] && never evaluated: forced_fail != workspace[1] | 0 |
2609 | ( | - |
2610 | (md->moptions & 0x08000000) != 0 never evaluated: (md->moptions & 0x08000000) != 0 | 0 |
2611 | || | - |
2612 | ((md->moptions & 0x00008000) != 0 && never evaluated: (md->moptions & 0x00008000) != 0 | 0 |
2613 | match_count < 0) never evaluated: match_count < 0 | 0 |
2614 | ) && | - |
2615 | ptr >= end_subject && never evaluated: ptr >= end_subject | 0 |
2616 | ptr > md->start_used_ptr) never evaluated: ptr > md->start_used_ptr | 0 |
2617 | { | - |
2618 | if (offsetcount >= 2) never evaluated: offsetcount >= 2 | 0 |
2619 | { | - |
2620 | offsets[0] = (int)(md->start_used_ptr - start_subject); | - |
2621 | offsets[1] = (int)(end_subject - start_subject); | - |
2622 | } | 0 |
2623 | match_count = (-12); | - |
2624 | } | 0 |
2625 | | - |
2626 | ; | - |
2627 | | - |
2628 | | - |
2629 | break; | 0 |
2630 | } | - |
2631 | | - |
2632 | | - |
2633 | | - |
2634 | ptr += clen; | - |
2635 | } | 0 |
2636 | | - |
2637 | | - |
2638 | | - |
2639 | | - |
2640 | | - |
2641 | | - |
2642 | | - |
2643 | return match_count; never executed: return match_count; | 0 |
2644 | } | - |
2645 | extern int | - |
2646 | pcre16_dfa_exec(const pcre16 *argument_re, const pcre16_extra *extra_data, | - |
2647 | const unsigned short * subject, int length, int start_offset, int options, int *offsets, | - |
2648 | int offsetcount, int *workspace, int wscount) | - |
2649 | | - |
2650 | { | - |
2651 | real_pcre16 *re = (real_pcre16 *)argument_re; | - |
2652 | dfa_match_data match_block; | - |
2653 | dfa_match_data *md = &match_block; | - |
2654 | BOOL utf, anchored, startline, firstline; | - |
2655 | const pcre_uchar *current_subject, *end_subject; | - |
2656 | const pcre_study_data *study = ((void *)0); | - |
2657 | | - |
2658 | const pcre_uchar *req_char_ptr; | - |
2659 | const pcre_uint8 *start_bits = ((void *)0); | - |
2660 | BOOL has_first_char = 0; | - |
2661 | BOOL has_req_char = 0; | - |
2662 | pcre_uchar first_char = 0; | - |
2663 | pcre_uchar first_char2 = 0; | - |
2664 | pcre_uchar req_char = 0; | - |
2665 | pcre_uchar req_char2 = 0; | - |
2666 | int newline; | - |
2667 | | - |
2668 | | - |
2669 | | - |
2670 | if ((options & ~(0x00000010|0x00000080|0x00000100|0x00000400|0x10000000| 0x00002000|0x08000000|0x00008000|0x00010000| 0x00020000|(0x00100000|0x00200000|0x00400000| 0x00500000)|0x00800000|0x01000000| 0x04000000)) != 0) return (-3); never executed: return (-3); never evaluated: (options & ~(0x00000010|0x00000080|0x00000100|0x00000400|0x10000000| 0x00002000|0x08000000|0x00008000|0x00010000| 0x00020000|(0x00100000|0x00200000|0x00400000| 0x00500000)|0x00800000|0x01000000| 0x04000000)) != 0 | 0 |
2671 | if (re == ((void *)0) || subject == ((void *)0) || workspace == ((void *)0) || never evaluated: re == ((void *)0) never evaluated: subject == ((void *)0) never evaluated: workspace == ((void *)0) | 0 |
2672 | (offsets == ((void *)0) && offsetcount > 0)) return (-2); never evaluated: offsets == ((void *)0) never evaluated: offsetcount > 0 never executed: return (-2); | 0 |
2673 | if (offsetcount < 0) return (-15); never executed: return (-15); never evaluated: offsetcount < 0 | 0 |
2674 | if (wscount < 20) return (-19); never executed: return (-19); never evaluated: wscount < 20 | 0 |
2675 | if (start_offset < 0 || start_offset > length) return (-24); never evaluated: start_offset < 0 never evaluated: start_offset > length never executed: return (-24); | 0 |
2676 | | - |
2677 | | - |
2678 | | - |
2679 | | - |
2680 | | - |
2681 | | - |
2682 | md->tables = re->tables; | - |
2683 | md->callout_data = ((void *)0); | - |
2684 | | - |
2685 | if (extra_data != ((void *)0)) never evaluated: extra_data != ((void *)0) | 0 |
2686 | { | - |
2687 | unsigned int flags = extra_data->flags; | - |
2688 | if ((flags & 0x0001) != 0) never evaluated: (flags & 0x0001) != 0 | 0 |
2689 | study = (const pcre_study_data *)extra_data->study_data; never executed: study = (const pcre_study_data *)extra_data->study_data; | 0 |
2690 | if ((flags & 0x0002) != 0) return (-18); never executed: return (-18); never evaluated: (flags & 0x0002) != 0 | 0 |
2691 | if ((flags & 0x0010) != 0) never evaluated: (flags & 0x0010) != 0 | 0 |
2692 | return (-18); never executed: return (-18); | 0 |
2693 | if ((flags & 0x0004) != 0) never evaluated: (flags & 0x0004) != 0 | 0 |
2694 | md->callout_data = extra_data->callout_data; never executed: md->callout_data = extra_data->callout_data; | 0 |
2695 | if ((flags & 0x0008) != 0) never evaluated: (flags & 0x0008) != 0 | 0 |
2696 | md->tables = extra_data->tables; never executed: md->tables = extra_data->tables; | 0 |
2697 | } | 0 |
2698 | | - |
2699 | | - |
2700 | | - |
2701 | | - |
2702 | | - |
2703 | | - |
2704 | if (re->magic_number != 0x50435245UL) never evaluated: re->magic_number != 0x50435245UL | 0 |
2705 | return re->magic_number == 0x45524350UL? | 0 |
2706 | (-29):(-4); never executed: return re->magic_number == 0x45524350UL? (-29):(-4); | 0 |
2707 | if ((re->flags & 0x0002) == 0) return (-28); never executed: return (-28); never evaluated: (re->flags & 0x0002) == 0 | 0 |
2708 | | - |
2709 | | - |
2710 | | - |
2711 | current_subject = (const pcre_uchar *)subject + start_offset; | - |
2712 | end_subject = (const pcre_uchar *)subject + length; | - |
2713 | req_char_ptr = current_subject - 1; | - |
2714 | | - |
2715 | | - |
2716 | | - |
2717 | utf = (re->options & 0x00000800) != 0; | - |
2718 | | - |
2719 | | - |
2720 | | - |
2721 | | - |
2722 | anchored = (options & (0x00000010|0x00020000)) != 0 || never evaluated: (options & (0x00000010|0x00020000)) != 0 | 0 |
2723 | (re->options & 0x00000010) != 0; never evaluated: (re->options & 0x00000010) != 0 | 0 |
2724 | | - |
2725 | | - |
2726 | | - |
2727 | md->start_code = (const pcre_uchar *)argument_re + | - |
2728 | re->name_table_offset + re->name_count * re->name_entry_size; | - |
2729 | md->start_subject = (const pcre_uchar *)subject; | - |
2730 | md->end_subject = end_subject; | - |
2731 | md->start_offset = start_offset; | - |
2732 | md->moptions = options; | - |
2733 | md->poptions = re->options; | - |
2734 | | - |
2735 | | - |
2736 | | - |
2737 | | - |
2738 | if ((md->moptions & (0x00800000|0x01000000)) == 0) never evaluated: (md->moptions & (0x00800000|0x01000000)) == 0 | 0 |
2739 | { | - |
2740 | if ((re->options & (0x00800000|0x01000000)) != 0) never evaluated: (re->options & (0x00800000|0x01000000)) != 0 | 0 |
2741 | md->moptions |= re->options & (0x00800000|0x01000000); never executed: md->moptions |= re->options & (0x00800000|0x01000000); | 0 |
2742 | | - |
2743 | | - |
2744 | | - |
2745 | } | 0 |
2746 | | - |
2747 | | - |
2748 | | - |
2749 | | - |
2750 | switch ((((options & (0x00100000|0x00200000|0x00400000| 0x00500000)) == 0)? re->options : (pcre_uint32)options) & | - |
2751 | (0x00100000|0x00200000|0x00400000| 0x00500000)) | - |
2752 | { | - |
2753 | case 0: newline = 10; break; | 0 |
2754 | case 0x00100000: newline = '\015'; break; | 0 |
2755 | case 0x00200000: newline = '\012'; break; | 0 |
2756 | case 0x00100000 + | - |
2757 | 0x00200000: newline = ('\015' << 8) | '\012'; break; | 0 |
2758 | case 0x00400000: newline = -1; break; | 0 |
2759 | case 0x00500000: newline = -2; break; | 0 |
2760 | default: return (-23); never executed: return (-23); | 0 |
2761 | } | - |
2762 | | - |
2763 | if (newline == -2) never evaluated: newline == -2 | 0 |
2764 | { | - |
2765 | md->nltype = 2; | - |
2766 | } | 0 |
2767 | else if (newline < 0) never evaluated: newline < 0 | 0 |
2768 | { | - |
2769 | md->nltype = 1; | - |
2770 | } | 0 |
2771 | else | - |
2772 | { | - |
2773 | md->nltype = 0; | - |
2774 | if (newline > 255) never evaluated: newline > 255 | 0 |
2775 | { | - |
2776 | md->nllen = 2; | - |
2777 | md->nl[0] = (newline >> 8) & 255; | - |
2778 | md->nl[1] = newline & 255; | - |
2779 | } | 0 |
2780 | else | - |
2781 | { | - |
2782 | md->nllen = 1; | - |
2783 | md->nl[0] = newline; | - |
2784 | } | 0 |
2785 | } | - |
2786 | | - |
2787 | | - |
2788 | | - |
2789 | | - |
2790 | | - |
2791 | if (utf && (options & 0x00002000) == 0) never evaluated: (options & 0x00002000) == 0 | 0 |
2792 | { | - |
2793 | int erroroffset; | - |
2794 | int errorcode = _pcre16_valid_utf((pcre_uchar *)subject, length, &erroroffset); | - |
2795 | if (errorcode != 0) never evaluated: errorcode != 0 | 0 |
2796 | { | - |
2797 | if (offsetcount >= 2) never evaluated: offsetcount >= 2 | 0 |
2798 | { | - |
2799 | offsets[0] = erroroffset; | - |
2800 | offsets[1] = errorcode; | - |
2801 | } | 0 |
2802 | return (errorcode <= 5 && (options & 0x08000000) != 0)? | 0 |
2803 | (-25) : (-10); never executed: return (errorcode <= 5 && (options & 0x08000000) != 0)? (-25) : (-10); | 0 |
2804 | } | - |
2805 | if (start_offset > 0 && start_offset < length && never evaluated: start_offset > 0 never evaluated: start_offset < length | 0 |
2806 | (((((const pcre_uchar *)subject)[start_offset]) & 0xfc00) == 0xdc00)) never evaluated: (((((const pcre_uchar *)subject)[start_offset]) & 0xfc00) == 0xdc00) | 0 |
2807 | return (-11); never executed: return (-11); | 0 |
2808 | } | 0 |
2809 | | - |
2810 | | - |
2811 | | - |
2812 | | - |
2813 | | - |
2814 | | - |
2815 | if (md->tables == ((void *)0)) md->tables = _pcre16_default_tables; never executed: md->tables = _pcre16_default_tables; never evaluated: md->tables == ((void *)0) | 0 |
2816 | | - |
2817 | | - |
2818 | | - |
2819 | | - |
2820 | startline = (re->flags & 0x0100) != 0; | - |
2821 | firstline = (re->options & 0x00040000) != 0; | - |
2822 | | - |
2823 | | - |
2824 | | - |
2825 | | - |
2826 | | - |
2827 | | - |
2828 | | - |
2829 | if (!anchored) never evaluated: !anchored | 0 |
2830 | { | - |
2831 | if ((re->flags & 0x0010) != 0) never evaluated: (re->flags & 0x0010) != 0 | 0 |
2832 | { | - |
2833 | has_first_char = 1; | - |
2834 | first_char = first_char2 = (pcre_uchar)(re->first_char); | - |
2835 | if ((re->flags & 0x0020) != 0) never evaluated: (re->flags & 0x0020) != 0 | 0 |
2836 | { | - |
2837 | first_char2 = (((first_char) <= 255u)? ((md->tables + 256)[first_char]):(first_char)); never evaluated: ((first_char) <= 255u) | 0 |
2838 | | - |
2839 | if (utf && first_char > 127) never evaluated: first_char > 127 | 0 |
2840 | first_char2 = (first_char + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(first_char) / 128] * 128 + (first_char) % 128])->other_case); never executed: first_char2 = (first_char + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(first_char) / 128] * 128 + (first_char) % 128])->other_case); | 0 |
2841 | | - |
2842 | } | 0 |
2843 | } | 0 |
2844 | else | - |
2845 | { | - |
2846 | if (!startline && study != ((void *)0) && never evaluated: !startline never evaluated: study != ((void *)0) | 0 |
2847 | (study->flags & 0x0001) != 0) never evaluated: (study->flags & 0x0001) != 0 | 0 |
2848 | start_bits = study->start_bits; never executed: start_bits = study->start_bits; | 0 |
2849 | } | 0 |
2850 | } | - |
2851 | | - |
2852 | | - |
2853 | | - |
2854 | | - |
2855 | if ((re->flags & 0x0040) != 0) never evaluated: (re->flags & 0x0040) != 0 | 0 |
2856 | { | - |
2857 | has_req_char = 1; | - |
2858 | req_char = req_char2 = (pcre_uchar)(re->req_char); | - |
2859 | if ((re->flags & 0x0080) != 0) never evaluated: (re->flags & 0x0080) != 0 | 0 |
2860 | { | - |
2861 | req_char2 = (((req_char) <= 255u)? ((md->tables + 256)[req_char]):(req_char)); never evaluated: ((req_char) <= 255u) | 0 |
2862 | | - |
2863 | if (utf && req_char > 127) never evaluated: req_char > 127 | 0 |
2864 | req_char2 = (req_char + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(req_char) / 128] * 128 + (req_char) % 128])->other_case); never executed: req_char2 = (req_char + (_pcre16_ucd_records + _pcre16_ucd_stage2[_pcre16_ucd_stage1[(req_char) / 128] * 128 + (req_char) % 128])->other_case); | 0 |
2865 | | - |
2866 | } | 0 |
2867 | } | 0 |
2868 | | - |
2869 | | - |
2870 | | - |
2871 | | - |
2872 | | - |
2873 | for (;;) | - |
2874 | { | - |
2875 | int rc; | - |
2876 | | - |
2877 | if ((options & 0x00020000) == 0) never evaluated: (options & 0x00020000) == 0 | 0 |
2878 | { | - |
2879 | const pcre_uchar *save_end_subject = end_subject; | - |
2880 | | - |
2881 | | - |
2882 | | - |
2883 | | - |
2884 | | - |
2885 | | - |
2886 | if (firstline) never evaluated: firstline | 0 |
2887 | { | - |
2888 | const pcre_uchar * t = current_subject; | - |
2889 | | - |
2890 | if (utf) | 0 |
2891 | { | - |
2892 | while (t < md->end_subject && !((md->nltype != 0)? ((t) < md->end_subject && _pcre16_is_newline((t), md->nltype, md->end_subject, &(md->nllen), utf)) : ((t) <= md->end_subject - md->nllen && (t)[0] == md->nl[0] && (md->nllen == 1 || (t)[1] == md->nl[1]) ) )) never evaluated: t < md->end_subject never evaluated: (md->nltype != 0) | 0 |
2893 | { | - |
2894 | t++; | - |
2895 | if ((t < end_subject) && ((*t) & 0xfc00) == 0xdc00) t++; never evaluated: (t < end_subject) never evaluated: ((*t) & 0xfc00) == 0xdc00 | 0 |
2896 | } | 0 |
2897 | } | 0 |
2898 | else | - |
2899 | | - |
2900 | while (t < md->end_subject && !((md->nltype != 0)? ((t) < md->end_subject && _pcre16_is_newline((t), md->nltype, md->end_subject, &(md->nllen), utf)) : ((t) <= md->end_subject - md->nllen && (t)[0] == md->nl[0] && (md->nllen == 1 || (t)[1] == md->nl[1]) ) )) t++; never evaluated: t < md->end_subject never evaluated: (md->nltype != 0) | 0 |
2901 | end_subject = t; | - |
2902 | } | 0 |
2903 | | - |
2904 | | - |
2905 | | - |
2906 | | - |
2907 | | - |
2908 | | - |
2909 | | - |
2910 | if (((options | re->options) & 0x04000000) == 0) never evaluated: ((options | re->options) & 0x04000000) == 0 | 0 |
2911 | { | - |
2912 | | - |
2913 | | - |
2914 | if (has_first_char) never evaluated: has_first_char | 0 |
2915 | { | - |
2916 | if (first_char != first_char2) never evaluated: first_char != first_char2 | 0 |
2917 | while (current_subject < end_subject && never evaluated: current_subject < end_subject | 0 |
2918 | *current_subject != first_char && *current_subject != first_char2) never evaluated: *current_subject != first_char never evaluated: *current_subject != first_char2 | 0 |
2919 | current_subject++; never executed: current_subject++; | 0 |
2920 | else | - |
2921 | while (current_subject < end_subject && never evaluated: current_subject < end_subject | 0 |
2922 | *current_subject != first_char) never evaluated: *current_subject != first_char | 0 |
2923 | current_subject++; never executed: current_subject++; | 0 |
2924 | } | - |
2925 | | - |
2926 | | - |
2927 | | - |
2928 | else if (startline) never evaluated: startline | 0 |
2929 | { | - |
2930 | if (current_subject > md->start_subject + start_offset) never evaluated: current_subject > md->start_subject + start_offset | 0 |
2931 | { | - |
2932 | | - |
2933 | if (utf) | 0 |
2934 | { | - |
2935 | while (current_subject < end_subject && never evaluated: current_subject < end_subject | 0 |
2936 | !((md->nltype != 0)? ((current_subject) > md->start_subject && _pcre16_was_newline((current_subject), md->nltype, md->start_subject, &(md->nllen), utf)) : ((current_subject) >= md->start_subject + md->nllen && (current_subject)[-md->nllen] == md->nl[0] && (md->nllen == 1 || (current_subject)[-md->nllen+1] == md->nl[1]) ) )) never evaluated: (md->nltype != 0) | 0 |
2937 | { | - |
2938 | current_subject++; | - |
2939 | if ((current_subject < end_subject) && ((*current_subject) & 0xfc00) == 0xdc00) current_subject++; never evaluated: (current_subject < end_subject) never evaluated: ((*current_subject) & 0xfc00) == 0xdc00 never executed: current_subject++; | 0 |
2940 | | - |
2941 | } | 0 |
2942 | } | 0 |
2943 | else | - |
2944 | | - |
2945 | while (current_subject < end_subject && !((md->nltype != 0)? ((current_subject) > md->start_subject && _pcre16_was_newline((current_subject), md->nltype, md->start_subject, &(md->nllen), utf)) : ((current_subject) >= md->start_subject + md->nllen && (current_subject)[-md->nllen] == md->nl[0] && (md->nllen == 1 || (current_subject)[-md->nllen+1] == md->nl[1]) ) )) never evaluated: current_subject < end_subject never evaluated: (md->nltype != 0) | 0 |
2946 | current_subject++; never executed: current_subject++; | 0 |
2947 | | - |
2948 | | - |
2949 | | - |
2950 | | - |
2951 | | - |
2952 | if (current_subject[-1] == '\015' && never evaluated: current_subject[-1] == '\015' | 0 |
2953 | (md->nltype == 1 || md->nltype == 2) && never evaluated: md->nltype == 1 never evaluated: md->nltype == 2 | 0 |
2954 | current_subject < end_subject && never evaluated: current_subject < end_subject | 0 |
2955 | *current_subject == '\012') never evaluated: *current_subject == '\012' | 0 |
2956 | current_subject++; never executed: current_subject++; | 0 |
2957 | } | 0 |
2958 | } | 0 |
2959 | | - |
2960 | | - |
2961 | | - |
2962 | else if (start_bits != ((void *)0)) never evaluated: start_bits != ((void *)0) | 0 |
2963 | { | - |
2964 | while (current_subject < end_subject) never evaluated: current_subject < end_subject | 0 |
2965 | { | - |
2966 | register unsigned int c = *current_subject; | - |
2967 | | - |
2968 | if (c > 255) c = 255; | 0 |
2969 | | - |
2970 | if ((start_bits[c/8] & (1 << (c&7))) == 0) never evaluated: (start_bits[c/8] & (1 << (c&7))) == 0 | 0 |
2971 | { | - |
2972 | current_subject++; | - |
2973 | | - |
2974 | | - |
2975 | | - |
2976 | | - |
2977 | | - |
2978 | | - |
2979 | | - |
2980 | } | 0 |
2981 | else break; | 0 |
2982 | } | - |
2983 | } | 0 |
2984 | } | - |
2985 | | - |
2986 | | - |
2987 | | - |
2988 | end_subject = save_end_subject; | - |
2989 | | - |
2990 | | - |
2991 | | - |
2992 | | - |
2993 | | - |
2994 | if (((options | re->options) & 0x04000000) == 0 && never evaluated: ((options | re->options) & 0x04000000) == 0 | 0 |
2995 | (options & (0x08000000|0x00008000)) == 0) never evaluated: (options & (0x08000000|0x00008000)) == 0 | 0 |
2996 | { | - |
2997 | | - |
2998 | | - |
2999 | | - |
3000 | | - |
3001 | | - |
3002 | if (study != ((void *)0) && (study->flags & 0x0002) != 0 && never evaluated: study != ((void *)0) never evaluated: (study->flags & 0x0002) != 0 | 0 |
3003 | (pcre_uint32)(end_subject - current_subject) < study->minlength) never evaluated: (pcre_uint32)(end_subject - current_subject) < study->minlength | 0 |
3004 | return (-1); never executed: return (-1); | 0 |
3005 | if (has_req_char && end_subject - current_subject < 1000) never evaluated: has_req_char never evaluated: end_subject - current_subject < 1000 | 0 |
3006 | { | - |
3007 | register const pcre_uchar * p = current_subject + (has_first_char? 1:0); never evaluated: has_first_char | 0 |
3008 | | - |
3009 | | - |
3010 | | - |
3011 | | - |
3012 | if (p > req_char_ptr) never evaluated: p > req_char_ptr | 0 |
3013 | { | - |
3014 | if (req_char != req_char2) never evaluated: req_char != req_char2 | 0 |
3015 | { | - |
3016 | while (p < end_subject) never evaluated: p < end_subject | 0 |
3017 | { | - |
3018 | register int pp = *p++; | - |
3019 | if (pp == req_char || pp == req_char2) { p--; break; } never evaluated: pp == req_char never evaluated: pp == req_char2 | 0 |
3020 | } | 0 |
3021 | } | 0 |
3022 | else | - |
3023 | { | - |
3024 | while (p < end_subject) never evaluated: p < end_subject | 0 |
3025 | { | - |
3026 | if (*p++ == req_char) { p--; break; } never evaluated: *p++ == req_char | 0 |
3027 | } | 0 |
3028 | } | 0 |
3029 | | - |
3030 | | - |
3031 | | - |
3032 | | - |
3033 | if (p >= end_subject) break; never evaluated: p >= end_subject | 0 |
3034 | | - |
3035 | | - |
3036 | | - |
3037 | | - |
3038 | | - |
3039 | req_char_ptr = p; | - |
3040 | } | 0 |
3041 | } | 0 |
3042 | } | 0 |
3043 | } | 0 |
3044 | | - |
3045 | | - |
3046 | | - |
3047 | md->start_used_ptr = current_subject; | - |
3048 | md->recursive = ((void *)0); | - |
3049 | | - |
3050 | rc = internal_dfa_exec( | - |
3051 | md, | - |
3052 | md->start_code, | - |
3053 | current_subject, | - |
3054 | start_offset, | - |
3055 | offsets, | - |
3056 | offsetcount, | - |
3057 | workspace, | - |
3058 | wscount, | - |
3059 | 0); | - |
3060 | | - |
3061 | | - |
3062 | | - |
3063 | | - |
3064 | if (rc != (-1) || anchored) return rc; never evaluated: rc != (-1) never evaluated: anchored never executed: return rc; | 0 |
3065 | | - |
3066 | | - |
3067 | | - |
3068 | | - |
3069 | if (firstline && ((md->nltype != 0)? ((current_subject) < md->end_subject && _pcre16_is_newline((current_subject), md->nltype, md->end_subject, &(md->nllen), utf)) : ((current_subject) <= md->end_subject - md->nllen && (current_subject)[0] == md->nl[0] && (md->nllen == 1 || (current_subject)[1] == md->nl[1]) ) )) break; never evaluated: firstline never evaluated: (md->nltype != 0) | 0 |
3070 | current_subject++; | - |
3071 | | - |
3072 | if (utf) | 0 |
3073 | { | - |
3074 | if ((current_subject < end_subject) && ((*current_subject) & 0xfc00) == 0xdc00) current_subject++; never evaluated: (current_subject < end_subject) never evaluated: ((*current_subject) & 0xfc00) == 0xdc00 never executed: current_subject++; | 0 |
3075 | | - |
3076 | } | 0 |
3077 | | - |
3078 | if (current_subject > end_subject) break; never evaluated: current_subject > end_subject | 0 |
3079 | | - |
3080 | | - |
3081 | | - |
3082 | | - |
3083 | | - |
3084 | if (current_subject[-1] == '\015' && never evaluated: current_subject[-1] == '\015' | 0 |
3085 | current_subject < end_subject && never evaluated: current_subject < end_subject | 0 |
3086 | *current_subject == '\012' && never evaluated: *current_subject == '\012' | 0 |
3087 | (re->flags & 0x0800) == 0 && never evaluated: (re->flags & 0x0800) == 0 | 0 |
3088 | (md->nltype == 1 || never evaluated: md->nltype == 1 | 0 |
3089 | md->nltype == 2 || never evaluated: md->nltype == 2 | 0 |
3090 | md->nllen == 2)) never evaluated: md->nllen == 2 | 0 |
3091 | current_subject++; never executed: current_subject++; | 0 |
3092 | | - |
3093 | } | 0 |
3094 | | - |
3095 | return (-1); never executed: return (-1); | 0 |
3096 | } | - |
3097 | | - |
| | |