Line | Source Code | Coverage |
---|
1 | | - |
2 | | - |
3 | BOOL | - |
4 | _pcre16_is_newline(const pcre_uchar * ptr, int type, const pcre_uchar * endptr, int *lenptr, | - |
5 | BOOL utf) | - |
6 | { | - |
7 | int c; | - |
8 | (void)utf; | - |
9 | | - |
10 | if (utf) partially evaluated: utf yes Evaluation Count:29 | no Evaluation Count:0 |
| 0-29 |
11 | { | - |
12 | c = *ptr; if ((c & 0xfc00) == 0xd800) { c = (((c & 0x3ff) << 10) | (ptr[1] & 0x3ff)) + 0x10000; };; partially evaluated: (c & 0xfc00) == 0xd800 no Evaluation Count:0 | yes Evaluation Count:29 |
| 0-29 |
13 | } executed: } Execution Count:29 | 29 |
14 | else | - |
15 | | - |
16 | c = *ptr; never executed: c = *ptr; | 0 |
17 | | - |
18 | if (type == 2) switch(c) partially evaluated: type == 2 yes Evaluation Count:29 | no Evaluation Count:0 |
| 0-29 |
19 | { | - |
20 | case 0x000a: *lenptr = 1; return 1; executed: return 1; Execution Count:4 | 4 |
21 | case 0x000d: *lenptr = (ptr < endptr - 1 && ptr[1] == 0x0a)? 2 : 1; partially evaluated: ptr < endptr - 1 yes Evaluation Count:8 | no Evaluation Count:0 |
evaluated: ptr[1] == 0x0a yes Evaluation Count:4 | yes Evaluation Count:4 |
| 0-8 |
22 | return 1; executed: return 1; Execution Count:8 | 8 |
23 | default: return 0; executed: return 0; Execution Count:17 | 17 |
24 | } | 0 |
25 | | - |
26 | | - |
27 | | - |
28 | else switch(c) | - |
29 | { | - |
30 | case 0x000a: | - |
31 | case 0x000b: | - |
32 | case 0x000c: *lenptr = 1; return 1; never executed: return 1; | 0 |
33 | case 0x000d: *lenptr = (ptr < endptr - 1 && ptr[1] == 0x0a)? 2 : 1; never evaluated: ptr < endptr - 1 never evaluated: ptr[1] == 0x0a | 0 |
34 | return 1; never executed: return 1; | 0 |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | case 0x0085: | - |
41 | case 0x2028: | - |
42 | case 0x2029: *lenptr = 1; return 1; never executed: return 1; | 0 |
43 | | - |
44 | default: return 0; never executed: return 0; | 0 |
45 | } | 0 |
46 | } | - |
47 | BOOL | - |
48 | _pcre16_was_newline(const pcre_uchar * ptr, int type, const pcre_uchar * startptr, int *lenptr, | - |
49 | BOOL utf) | - |
50 | { | - |
51 | int c; | - |
52 | (void)utf; | - |
53 | ptr--; | - |
54 | | - |
55 | if (utf) | 0 |
56 | { | - |
57 | if ((*ptr & 0xfc00) == 0xdc00) ptr--; never evaluated: (*ptr & 0xfc00) == 0xdc00 | 0 |
58 | c = *ptr; if ((c & 0xfc00) == 0xd800) { c = (((c & 0x3ff) << 10) | (ptr[1] & 0x3ff)) + 0x10000; };; never evaluated: (c & 0xfc00) == 0xd800 | 0 |
59 | } | 0 |
60 | else | - |
61 | | - |
62 | c = *ptr; never executed: c = *ptr; | 0 |
63 | | - |
64 | if (type == 2) switch(c) never evaluated: type == 2 | 0 |
65 | { | - |
66 | case 0x000a: *lenptr = (ptr > startptr && ptr[-1] == 0x0d)? 2 : 1; never evaluated: ptr > startptr never evaluated: ptr[-1] == 0x0d | 0 |
67 | return 1; never executed: return 1; | 0 |
68 | case 0x000d: *lenptr = 1; return 1; never executed: return 1; | 0 |
69 | default: return 0; never executed: return 0; | 0 |
70 | } | 0 |
71 | | - |
72 | else switch(c) | - |
73 | { | - |
74 | case 0x000a: *lenptr = (ptr > startptr && ptr[-1] == 0x0d)? 2 : 1; never evaluated: ptr > startptr never evaluated: ptr[-1] == 0x0d | 0 |
75 | return 1; never executed: return 1; | 0 |
76 | case 0x000b: | - |
77 | case 0x000c: | - |
78 | case 0x000d: *lenptr = 1; return 1; never executed: return 1; | 0 |
79 | | - |
80 | | - |
81 | | - |
82 | | - |
83 | | - |
84 | case 0x0085: | - |
85 | case 0x2028: | - |
86 | case 0x2029: *lenptr = 1; return 1; never executed: return 1; | 0 |
87 | | - |
88 | default: return 0; never executed: return 0; | 0 |
89 | } | 0 |
90 | } | - |
91 | | - |
| | |