../3rdparty/pcre/pcre_string_utils.c

Switch to Source codePreprocessed file
LineSource CodeCoverage
1 -
2 -
3int -
4_pcre16_strcmp_uc_uc(const pcre_uchar *str1, const pcre_uchar *str2) -
5{ -
6pcre_uchar c1; -
7pcre_uchar c2; -
8 -
9while (*str1 != '\0' || *str2 != '\0')
evaluated: *str1 != '\0'
TRUEFALSE
yes
Evaluation Count:50
yes
Evaluation Count:6
partially evaluated: *str2 != '\0'
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:6
0-50
10 { -
11 c1 = *str1++; -
12 c2 = *str2++; -
13 if (c1 != c2)
evaluated: c1 != c2
TRUEFALSE
yes
Evaluation Count:11
yes
Evaluation Count:39
11-39
14 return ((c1 > c2) << 1) - 1;
executed: return ((c1 > c2) << 1) - 1;
Execution Count:11
11
15 }
executed: }
Execution Count:39
39
16 -
17return 0;
executed: return 0;
Execution Count:6
6
18} -
19 -
20int -
21_pcre16_strcmp_uc_c8(const pcre_uchar *str1, const char *str2) -
22{ -
23const pcre_uint8 *ustr2 = (pcre_uint8 *)str2; -
24pcre_uchar c1; -
25pcre_uchar c2; -
26 -
27while (*str1 != '\0' || *ustr2 != '\0')
evaluated: *str1 != '\0'
TRUEFALSE
yes
Evaluation Count:75
yes
Evaluation Count:6
partially evaluated: *ustr2 != '\0'
TRUEFALSE
no
Evaluation Count:0
yes
Evaluation Count:6
0-75
28 { -
29 c1 = *str1++; -
30 c2 = (pcre_uchar)*ustr2++; -
31 if (c1 != c2)
evaluated: c1 != c2
TRUEFALSE
yes
Evaluation Count:43
yes
Evaluation Count:32
32-43
32 return ((c1 > c2) << 1) - 1;
executed: return ((c1 > c2) << 1) - 1;
Execution Count:43
43
33 }
executed: }
Execution Count:32
32
34 -
35return 0;
executed: return 0;
Execution Count:6
6
36} -
37int -
38_pcre16_strncmp_uc_uc(const pcre_uchar *str1, const pcre_uchar *str2, unsigned int num) -
39{ -
40pcre_uchar c1; -
41pcre_uchar c2; -
42 -
43while (num-- > 0)
never evaluated: num-- > 0
0
44 { -
45 c1 = *str1++; -
46 c2 = *str2++; -
47 if (c1 != c2)
never evaluated: c1 != c2
0
48 return ((c1 > c2) << 1) - 1;
never executed: return ((c1 > c2) << 1) - 1;
0
49 }
never executed: }
0
50 -
51return 0;
never executed: return 0;
0
52} -
53 -
54int -
55_pcre16_strncmp_uc_c8(const pcre_uchar *str1, const char *str2, unsigned int num) -
56{ -
57const pcre_uint8 *ustr2 = (pcre_uint8 *)str2; -
58pcre_uchar c1; -
59pcre_uchar c2; -
60 -
61while (num-- > 0)
evaluated: num-- > 0
TRUEFALSE
yes
Evaluation Count:220
yes
Evaluation Count:3
3-220
62 { -
63 c1 = *str1++; -
64 c2 = (pcre_uchar)*ustr2++; -
65 if (c1 != c2)
evaluated: c1 != c2
TRUEFALSE
yes
Evaluation Count:195
yes
Evaluation Count:25
25-195
66 return ((c1 > c2) << 1) - 1;
executed: return ((c1 > c2) << 1) - 1;
Execution Count:195
195
67 }
executed: }
Execution Count:25
25
68 -
69return 0;
executed: return 0;
Execution Count:3
3
70} -
71unsigned int -
72_pcre16_strlen_uc(const pcre_uchar *str) -
73{ -
74unsigned int len = 0; -
75while (*str++ != 0)
evaluated: *str++ != 0
TRUEFALSE
yes
Evaluation Count:11287
yes
Evaluation Count:368
368-11287
76 len++;
executed: len++;
Execution Count:11287
11287
77return len;
executed: return len;
Execution Count:368
368
78} -
79 -
Switch to Source codePreprocessed file

Generated by Squish Coco Non-Commercial