../3rdparty/pcre/pcre_newline.c

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3BOOL -
4_pcre16_is_newline(const pcre_uchar * ptr, int type, const pcre_uchar * endptr, int *lenptr, -
5 BOOL utf) -
6{ -
7int c; -
8(void)utf; -
9 -
10if (utf)
partially evaluated: utf
TRUEFALSE
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; };;
never executed: }
partially evaluated: (c & 0xfc00) == 0xd800
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:29
0-29
13 }
executed: }
Execution Count:29
29
14else -
15 -
16 c = *ptr;
never executed: c = *ptr;
0
17 -
18if (type == 2) switch(c)
partially evaluated: type == 2
TRUEFALSE
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
TRUEFALSE
yes
Evaluation Count:8
no
Evaluation Count:0
evaluated: ptr[1] == 0x0a
TRUEFALSE
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 }
never executed: }
0
25 -
26 -
27 -
28else 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 }
never executed: }
0
46} -
47BOOL -
48_pcre16_was_newline(const pcre_uchar * ptr, int type, const pcre_uchar * startptr, int *lenptr, -
49 BOOL utf) -
50{ -
51int c; -
52(void)utf; -
53ptr--; -
54 -
55if (utf)
never evaluated: utf
0
56 { -
57 if ((*ptr & 0xfc00) == 0xdc00) ptr--;
never executed: ptr--;
never evaluated: (*ptr & 0xfc00) == 0xdc00
0
58 c = *ptr; if ((c & 0xfc00) == 0xd800) { c = (((c & 0x3ff) << 10) | (ptr[1] & 0x3ff)) + 0x10000; };;
never executed: }
never evaluated: (c & 0xfc00) == 0xd800
0
59 }
never executed: }
0
60else -
61 -
62 c = *ptr;
never executed: c = *ptr;
0
63 -
64if (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 }
never executed: }
0
71 -
72else 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 }
never executed: }
0
90} -
91 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial