Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | int glob_asciirange = 0; | - |
5 | static int | - |
6 | rangecmp (c1, c2, forcecoll) | - |
7 | int c1, c2; | - |
8 | int forcecoll; | - |
9 | { | - |
10 | static char s1[2] = { ' ', '\0' }; | - |
11 | static char s2[2] = { ' ', '\0' }; | - |
12 | int ret; | - |
13 | | - |
14 | | - |
15 | c1 &= 0xFF; | - |
16 | c2 &= 0xFF; | - |
17 | | - |
18 | if (c1 == c2TRUE | evaluated 36134 times by 1 test | FALSE | evaluated 518801 times by 1 test |
) | 36134-518801 |
19 | returnexecuted 36134 times by 1 test: return (0); (0);executed 36134 times by 1 test: return (0); | 36134 |
20 | | - |
21 | if (forcecoll == 0TRUE | evaluated 518771 times by 1 test | FALSE | evaluated 30 times by 1 test |
&& glob_asciirangeTRUE | never evaluated | FALSE | evaluated 518771 times by 1 test |
) | 0-518771 |
22 | return never executed: return (c1 - c2); (c1 - c2);never executed: return (c1 - c2); | 0 |
23 | | - |
24 | s1[0] = c1; | - |
25 | s2[0] = c2; | - |
26 | | - |
27 | if ((TRUE | evaluated 518801 times by 1 test | FALSE | never evaluated |
ret = strcoll (s1, s2)) != 0TRUE | evaluated 518801 times by 1 test | FALSE | never evaluated |
) | 0-518801 |
28 | returnexecuted 518801 times by 1 test: return ret; ret;executed 518801 times by 1 test: return ret; | 518801 |
29 | return never executed: return (c1 - c2); (c1 - c2);never executed: return (c1 - c2); | 0 |
30 | } | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
36 | static int | - |
37 | collequiv (c1, c2) | - |
38 | int c1, c2; | - |
39 | { | - |
40 | returnexecuted 3 times by 1 test: return (rangecmp (c1, c2, 1) == 0); (rangecmp (c1, c2, 1) == 0);executed 3 times by 1 test: return (rangecmp (c1, c2, 1) == 0); | 3 |
41 | } | - |
42 | | - |
43 | | - |
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | | - |
49 | | - |
50 | static int | - |
51 | collsym (s, len) | - |
52 | unsigned char *s; | - |
53 | int len; | - |
54 | { | - |
55 | register struct _collsym *csp; | - |
56 | char *x; | - |
57 | | - |
58 | x = (char *)s; | - |
59 | for (csp = posix_collsyms; csp->nameTRUE | evaluated 2142 times by 1 test | FALSE | evaluated 20 times by 1 test |
; csp++) | 20-2142 |
60 | { | - |
61 | if (((TRUE | evaluated 45 times by 1 test | FALSE | evaluated 2097 times by 1 test |
csp->name)[0] == (x)[0]TRUE | evaluated 45 times by 1 test | FALSE | evaluated 2097 times by 1 test |
&& | 45-2097 |
62 | (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
__extension__ (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 45 times by 1 test |
TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-45 |
63 | lenTRUE | never evaluated | FALSE | evaluated 45 times by 1 test |
TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-45 |
64 | )TRUE | never evaluated | FALSE | evaluated 45 times by 1 test |
&& ((__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-45 |
65 | csp->nameTRUE | never evaluated | FALSE | never evaluated |
TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
66 | )TRUE | never evaluated | FALSE | never evaluated |
&& strlen (TRUE | never evaluated | FALSE | never evaluated |
TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
67 | csp->nameTRUE | never evaluated | FALSE | never evaluated |
TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
68 | ) < ((size_t) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
69 | lenTRUE | never evaluated | FALSE | never evaluated |
TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
70 | ))TRUE | never evaluated | FALSE | never evaluated |
) || (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
71 | xTRUE | never evaluated | FALSE | never evaluated |
TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
72 | )TRUE | never evaluated | FALSE | never evaluated |
&& strlen (TRUE | never evaluated | FALSE | never evaluated |
TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
73 | xTRUE | never evaluated | FALSE | never evaluated |
TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
74 | ) < ((size_t) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
75 | lenTRUE | never evaluated | FALSE | never evaluated |
TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
76 | ))TRUE | never evaluated | FALSE | never evaluated |
)) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
77 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
78 | ) && __builtin_constant_p (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
79 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
80 | ) && (__s1_len = __builtin_strlen (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
81 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
82 | ), __s2_len = __builtin_strlen (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
83 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
84 | ), (!((size_t)(const void *)((TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
85 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
86 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
87 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
88 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
89 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
90 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
91 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
92 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
93 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
94 | , TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
95 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
96 | ) : (__builtin_constant_p (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
97 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
98 | ) && ((size_t)(const void *)((TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
99 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
100 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
101 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
102 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
103 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
104 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
105 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
106 | ) && ((size_t)(const void *)((TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
107 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
108 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
109 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
110 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
111 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
112 | , TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
113 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
114 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
115 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
116 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
117 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
118 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
119 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
120 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
121 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
122 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( csp->name ))[3] - __s2[3]); TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
123 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( csp->name ))[3] - __s2[3]); | 0-33 |
124 | ))[3] - __s2[3]);TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( csp->name ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
125 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
126 | ) && ((size_t)(const void *)((TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
127 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
128 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
129 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
130 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
131 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
132 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
133 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
134 | ) && ((size_t)(const void *)((TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
135 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
136 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
137 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
138 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
139 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
140 | , TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
141 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
142 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
143 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
144 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
145 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
146 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
147 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
148 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
149 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
150 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( x ))[3] - __s2[3]); TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
151 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( x ))[3] - __s2[3]); | 0-33 |
152 | ))[3] - __s2[3]);TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( x ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 0-33 |
153 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
154 | , TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
155 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
156 | )))); }) : strncmp (TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
157 | csp->nameTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
158 | , TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
159 | xTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
160 | , TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
161 | lenTRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
162 | ))) TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
| 12-33 |
163 | == 0TRUE | evaluated 33 times by 1 test | FALSE | evaluated 12 times by 1 test |
) && csp->name[len] == '\0'TRUE | evaluated 5 times by 1 test | FALSE | evaluated 28 times by 1 test |
) | 5-33 |
164 | returnexecuted 5 times by 1 test: return (csp->code); (csp->code);executed 5 times by 1 test: return (csp->code); | 5 |
165 | }executed 2137 times by 1 test: end of block | 2137 |
166 | if (len == 1TRUE | evaluated 13 times by 1 test | FALSE | evaluated 7 times by 1 test |
) | 7-13 |
167 | returnexecuted 13 times by 1 test: return s[0]; s[0];executed 13 times by 1 test: return s[0]; | 13 |
168 | returnexecuted 7 times by 1 test: return -1; -1;executed 7 times by 1 test: return -1; | 7 |
169 | } | - |
170 | | - |
171 | | - |
172 | | - |
173 | | - |
174 | | - |
175 | | - |
176 | enum char_class | - |
177 | { | - |
178 | CC_NO_CLASS = 0, | - |
179 | CC_ASCII, CC_ALNUM, CC_ALPHA, CC_BLANK, CC_CNTRL, CC_DIGIT, CC_GRAPH, | - |
180 | CC_LOWER, CC_PRINT, CC_PUNCT, CC_SPACE, CC_UPPER, CC_WORD, CC_XDIGIT | - |
181 | }; | - |
182 | | - |
183 | static char const *const cclass_name[] = | - |
184 | { | - |
185 | "", | - |
186 | "ascii", "alnum", "alpha", "blank", "cntrl", "digit", "graph", | - |
187 | "lower", "print", "punct", "space", "upper", "word", "xdigit" | - |
188 | }; | - |
189 | | - |
190 | | - |
191 | | - |
192 | static enum char_class | - |
193 | is_valid_cclass (name) | - |
194 | const char *name; | - |
195 | { | - |
196 | enum char_class ret; | - |
197 | int i; | - |
198 | | - |
199 | ret = CC_NO_CLASS; | - |
200 | | - |
201 | for (i = 1; i < (sizeof(cclass_name) / sizeof (cclass_name[0]))TRUE | evaluated 159112 times by 1 test | FALSE | evaluated 1 time by 1 test |
; i++) | 1-159112 |
202 | { | - |
203 | if (((TRUE | evaluated 158598 times by 1 test | FALSE | evaluated 514 times by 1 test |
name)[0] == (cclass_name[i])[0]TRUE | evaluated 158598 times by 1 test | FALSE | evaluated 514 times by 1 test |
&& | 514-158598 |
204 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
205 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
206 | ) && __builtin_constant_p (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
207 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
208 | ) && (__s1_len = __builtin_strlen (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
209 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
210 | ), __s2_len = __builtin_strlen (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
211 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
212 | ), (!((size_t)(const void *)((TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
213 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
214 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
215 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
216 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
217 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
218 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
219 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
220 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
221 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
222 | , TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
223 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
224 | ) : (__builtin_constant_p (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
225 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
226 | ) && ((size_t)(const void *)((TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
227 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
228 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
229 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
230 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
231 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
232 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
233 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
234 | ) && ((size_t)(const void *)((TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
235 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
236 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
237 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
238 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
239 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
240 | , TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
241 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
242 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
243 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
244 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
245 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
246 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 0-79302 |
247 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
248 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 0-79302 |
249 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
250 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 0-79302 |
251 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); | 0-79302 |
252 | ))[3] - __s2[3]);TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( name ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : (__builtin_constant_p (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 0-79302 |
253 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
254 | ) && ((size_t)(const void *)((TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
255 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
256 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
257 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
258 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
259 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
260 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
261 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
262 | ) && ((size_t)(const void *)((TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
263 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
264 | ) + 1) - (size_t)(const void *)(TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
265 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
266 | ) == 1) ? __builtin_strcmp (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
267 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
268 | , TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
269 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
270 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
271 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
272 | ); int __result = (((const unsigned char *) (const char *) (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
273 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
274 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 0-79302 |
275 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
276 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 0-79302 |
277 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
278 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( cclass_name[i] ))[3] - __s2[3]); TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 0-79302 |
279 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( cclass_name[i] ))[3] - __s2[3]); | 0-79302 |
280 | ))[3] - __s2[3]);TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
never executed: __result = (((const unsigned char *) (const char *) ( cclass_name[i] ))[3] - __s2[3]); }never executed: end of block }never executed: end of block __result; }))) : __builtin_strcmp (TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 0-79302 |
281 | nameTRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
282 | , TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
283 | cclass_name[i]TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
284 | )))); }) TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
| 79296-79302 |
285 | == 0TRUE | evaluated 79302 times by 1 test | FALSE | evaluated 79296 times by 1 test |
)) | 79296-79302 |
286 | { | - |
287 | ret = (enum char_class)i; | - |
288 | break;executed 79302 times by 1 test: break; | 79302 |
289 | } | - |
290 | }executed 79810 times by 1 test: end of block | 79810 |
291 | | - |
292 | returnexecuted 79303 times by 1 test: return ret; ret;executed 79303 times by 1 test: return ret; | 79303 |
293 | } | - |
294 | | - |
295 | static int | - |
296 | cclass_test (c, char_class) | - |
297 | int c; | - |
298 | enum char_class char_class; | - |
299 | { | - |
300 | int result; | - |
301 | | - |
302 | switch (char_class) | - |
303 | { | - |
304 | caseexecuted 3 times by 1 test: case CC_ASCII: CC_ASCII:executed 3 times by 1 test: case CC_ASCII: | 3 |
305 | result = | - |
306 | ((( | - |
307 | c | - |
308 | ) & ~0x7f) == 0) | - |
309 | ; | - |
310 | break;executed 3 times by 1 test: break; | 3 |
311 | caseexecuted 79193 times by 1 test: case CC_ALNUM: CC_ALNUM:executed 79193 times by 1 test: case CC_ALNUM: | 79193 |
312 | result = (1 && | - |
313 | ((*TRUE | evaluated 71163 times by 1 test | FALSE | evaluated 8030 times by 1 test |
__ctype_b_loc ())[(int) ((TRUE | evaluated 71163 times by 1 test | FALSE | evaluated 8030 times by 1 test |
| 8030-71163 |
314 | (unsigned char)cTRUE | evaluated 71163 times by 1 test | FALSE | evaluated 8030 times by 1 test |
| 8030-71163 |
315 | ))] & (unsigned short int) _ISalnum)TRUE | evaluated 71163 times by 1 test | FALSE | evaluated 8030 times by 1 test |
| 8030-71163 |
316 | ); | - |
317 | break;executed 79193 times by 1 test: break; | 79193 |
318 | caseexecuted 49 times by 1 test: case CC_ALPHA: CC_ALPHA:executed 49 times by 1 test: case CC_ALPHA: | 49 |
319 | result = (1 && | - |
320 | ((*TRUE | evaluated 35 times by 1 test | FALSE | evaluated 14 times by 1 test |
__ctype_b_loc ())[(int) ((TRUE | evaluated 35 times by 1 test | FALSE | evaluated 14 times by 1 test |
| 14-35 |
321 | (unsigned char)cTRUE | evaluated 35 times by 1 test | FALSE | evaluated 14 times by 1 test |
| 14-35 |
322 | ))] & (unsigned short int) _ISalpha)TRUE | evaluated 35 times by 1 test | FALSE | evaluated 14 times by 1 test |
| 14-35 |
323 | ); | - |
324 | break;executed 49 times by 1 test: break; | 49 |
325 | caseexecuted 2 times by 1 test: case CC_BLANK: CC_BLANK:executed 2 times by 1 test: case CC_BLANK: | 2 |
326 | result = (1 && | - |
327 | ((*TRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
__ctype_b_loc ())[(int) ((TRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
| 1 |
328 | (unsigned char)cTRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
| 1 |
329 | ))] & (unsigned short int) _ISblank)TRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
| 1 |
330 | ); | - |
331 | break;executed 2 times by 1 test: break; | 2 |
332 | caseexecuted 2 times by 1 test: case CC_CNTRL: CC_CNTRL:executed 2 times by 1 test: case CC_CNTRL: | 2 |
333 | result = (1 && | - |
334 | ((*TRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
__ctype_b_loc ())[(int) ((TRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
| 1 |
335 | (unsigned char)cTRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
| 1 |
336 | ))] & (unsigned short int) _IScntrl)TRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
| 1 |
337 | ); | - |
338 | break;executed 2 times by 1 test: break; | 2 |
339 | caseexecuted 2 times by 1 test: case CC_DIGIT: CC_DIGIT:executed 2 times by 1 test: case CC_DIGIT: | 2 |
340 | result = (1 && | - |
341 | ((*TRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
__ctype_b_loc ())[(int) ((TRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
| 1 |
342 | (unsigned char)cTRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
| 1 |
343 | ))] & (unsigned short int) _ISdigit)TRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
| 1 |
344 | ); | - |
345 | break;executed 2 times by 1 test: break; | 2 |
346 | caseexecuted 6 times by 1 test: case CC_GRAPH: CC_GRAPH:executed 6 times by 1 test: case CC_GRAPH: | 6 |
347 | result = (1 && | - |
348 | ((*TRUE | evaluated 2 times by 1 test | FALSE | evaluated 4 times by 1 test |
__ctype_b_loc ())[(int) ((TRUE | evaluated 2 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 2-4 |
349 | cTRUE | evaluated 2 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 2-4 |
350 | ))] & (unsigned short int) _ISgraph)TRUE | evaluated 2 times by 1 test | FALSE | evaluated 4 times by 1 test |
| 2-4 |
351 | ); | - |
352 | break;executed 6 times by 1 test: break; | 6 |
353 | caseexecuted 1 time by 1 test: case CC_LOWER: CC_LOWER:executed 1 time by 1 test: case CC_LOWER: | 1 |
354 | result = (1 && | - |
355 | ((*TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
__ctype_b_loc ())[(int) ((TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
356 | (unsigned char)cTRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
357 | ))] & (unsigned short int) _ISlower)TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
358 | ); | - |
359 | break;executed 1 time by 1 test: break; | 1 |
360 | caseexecuted 2 times by 1 test: case CC_PRINT: CC_PRINT:executed 2 times by 1 test: case CC_PRINT: | 2 |
361 | result = (1 && | - |
362 | ((*TRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
__ctype_b_loc ())[(int) ((TRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
| 1 |
363 | (unsigned char)cTRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
| 1 |
364 | ))] & (unsigned short int) _ISprint)TRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
| 1 |
365 | ); | - |
366 | break;executed 2 times by 1 test: break; | 2 |
367 | caseexecuted 2 times by 1 test: case CC_PUNCT: CC_PUNCT:executed 2 times by 1 test: case CC_PUNCT: | 2 |
368 | result = (1 && | - |
369 | ((*TRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
__ctype_b_loc ())[(int) ((TRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
| 1 |
370 | (unsigned char)cTRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
| 1 |
371 | ))] & (unsigned short int) _ISpunct)TRUE | evaluated 1 time by 1 test | FALSE | evaluated 1 time by 1 test |
| 1 |
372 | ); | - |
373 | break;executed 2 times by 1 test: break; | 2 |
374 | caseexecuted 38 times by 1 test: case CC_SPACE: CC_SPACE:executed 38 times by 1 test: case CC_SPACE: | 38 |
375 | result = (1 && | - |
376 | ((*TRUE | evaluated 12 times by 1 test | FALSE | evaluated 26 times by 1 test |
__ctype_b_loc ())[(int) ((TRUE | evaluated 12 times by 1 test | FALSE | evaluated 26 times by 1 test |
| 12-26 |
377 | (unsigned char)cTRUE | evaluated 12 times by 1 test | FALSE | evaluated 26 times by 1 test |
| 12-26 |
378 | ))] & (unsigned short int) _ISspace)TRUE | evaluated 12 times by 1 test | FALSE | evaluated 26 times by 1 test |
| 12-26 |
379 | ); | - |
380 | break;executed 38 times by 1 test: break; | 38 |
381 | caseexecuted 1 time by 1 test: case CC_UPPER: CC_UPPER:executed 1 time by 1 test: case CC_UPPER: | 1 |
382 | result = (1 && | - |
383 | ((*TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
__ctype_b_loc ())[(int) ((TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
384 | (unsigned char)cTRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
385 | ))] & (unsigned short int) _ISupper)TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
386 | ); | - |
387 | break;executed 1 time by 1 test: break; | 1 |
388 | case never executed: case CC_WORD: CC_WORD:never executed: case CC_WORD: | 0 |
389 | result = ((1 && | - |
390 | ((*TRUE | never evaluated | FALSE | never evaluated |
__ctype_b_loc ())[(int) ((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
391 | (unsigned char)cTRUE | never evaluated | FALSE | never evaluated |
| 0 |
392 | ))] & (unsigned short int) _ISalnum)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
393 | ) || c == '_'TRUE | never evaluated | FALSE | never evaluated |
); | 0 |
394 | break; never executed: break; | 0 |
395 | caseexecuted 1 time by 1 test: case CC_XDIGIT: CC_XDIGIT:executed 1 time by 1 test: case CC_XDIGIT: | 1 |
396 | result = (1 && | - |
397 | ((*TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
__ctype_b_loc ())[(int) ((TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
398 | (unsigned char)cTRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
399 | ))] & (unsigned short int) _ISxdigit)TRUE | evaluated 1 time by 1 test | FALSE | never evaluated |
| 0-1 |
400 | ); | - |
401 | break;executed 1 time by 1 test: break; | 1 |
402 | default never executed: default: :never executed: default: | 0 |
403 | result = -1; | - |
404 | break; never executed: break; | 0 |
405 | } | - |
406 | | - |
407 | returnexecuted 79302 times by 1 test: return result; result;executed 79302 times by 1 test: return result; | 79302 |
408 | } | - |
409 | | - |
410 | static int | - |
411 | is_cclass (c, name) | - |
412 | int c; | - |
413 | const char *name; | - |
414 | { | - |
415 | enum char_class char_class; | - |
416 | int result; | - |
417 | | - |
418 | char_class = is_valid_cclass (name); | - |
419 | if (char_class == CC_NO_CLASSTRUE | evaluated 1 time by 1 test | FALSE | evaluated 79302 times by 1 test |
) | 1-79302 |
420 | returnexecuted 1 time by 1 test: return -1; -1;executed 1 time by 1 test: return -1; | 1 |
421 | | - |
422 | result = cclass_test (c, char_class); | - |
423 | returnexecuted 79302 times by 1 test: return (result); (result);executed 79302 times by 1 test: return (result); | 79302 |
424 | } | - |
425 | extern char *mbsmbchar (const char *); | - |
426 | | - |
427 | static int | - |
428 | rangecmp_wc (c1, c2, forcecoll) | - |
429 | wint_t c1, c2; | - |
430 | int forcecoll; | - |
431 | { | - |
432 | static wchar_t s1[2] = { L' ', L'\0' }; | - |
433 | static wchar_t s2[2] = { L' ', L'\0' }; | - |
434 | | - |
435 | if (c1 == c2TRUE | evaluated 136 times by 1 test | FALSE | evaluated 152 times by 1 test |
) | 136-152 |
436 | returnexecuted 136 times by 1 test: return 0; 0;executed 136 times by 1 test: return 0; | 136 |
437 | | - |
438 | if (forcecoll == 0TRUE | evaluated 152 times by 1 test | FALSE | never evaluated |
&& glob_asciirangeTRUE | never evaluated | FALSE | evaluated 152 times by 1 test |
&& c1 <= TRUE | never evaluated | FALSE | never evaluated |
| 0-152 |
439 | (0x7f * 2 + 1)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
440 | && c2 <= TRUE | never evaluated | FALSE | never evaluated |
| 0 |
441 | (0x7f * 2 + 1)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
442 | ) | - |
443 | return never executed: return ((int)(c1 - c2)); ((int)(c1 - c2));never executed: return ((int)(c1 - c2)); | 0 |
444 | | - |
445 | s1[0] = c1; | - |
446 | s2[0] = c2; | - |
447 | | - |
448 | returnexecuted 152 times by 1 test: return (wcscoll (s1, s2)); (wcscoll (s1, s2));executed 152 times by 1 test: return (wcscoll (s1, s2)); | 152 |
449 | } | - |
450 | | - |
451 | static int | - |
452 | collequiv_wc (c, equiv) | - |
453 | wint_t c, equiv; | - |
454 | { | - |
455 | return never executed: return (c == equiv); (c == equiv);never executed: return (c == equiv); | 0 |
456 | } | - |
457 | | - |
458 | | - |
459 | | - |
460 | | - |
461 | | - |
462 | | - |
463 | static wint_t | - |
464 | collwcsym (s, len) | - |
465 | wchar_t *s; | - |
466 | int len; | - |
467 | { | - |
468 | register struct _collwcsym *csp; | - |
469 | | - |
470 | for (csp = posix_collwcsyms; csp->nameTRUE | never evaluated | FALSE | never evaluated |
; csp++) | 0 |
471 | { | - |
472 | if (((TRUE | never evaluated | FALSE | never evaluated |
csp->name)[0] == (s)[0]TRUE | never evaluated | FALSE | never evaluated |
&& wcsncmp(csp->name, s, len) == 0TRUE | never evaluated | FALSE | never evaluated |
) && csp->name[len] == L'\0'TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
473 | return never executed: return (csp->code); (csp->code);never executed: return (csp->code); | 0 |
474 | } never executed: end of block | 0 |
475 | if (len == 1TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
476 | return never executed: return s[0]; s[0];never executed: return s[0]; | 0 |
477 | return never executed: return (0xffffffffu) ; never executed: return (0xffffffffu) ; | 0 |
478 | (0xffffffffu) never executed: return (0xffffffffu) ; | 0 |
479 | ; never executed: return (0xffffffffu) ; | 0 |
480 | } | - |
481 | | - |
482 | static int | - |
483 | is_wcclass (wc, name) | - |
484 | wint_t wc; | - |
485 | wchar_t *name; | - |
486 | { | - |
487 | char *mbs; | - |
488 | mbstate_t state; | - |
489 | size_t mbslength; | - |
490 | wctype_t desc; | - |
491 | int want_word; | - |
492 | | - |
493 | if ((TRUE | never evaluated | FALSE | never evaluated |
wctype ("ascii") == (wctype_t)0)TRUE | never evaluated | FALSE | never evaluated |
&& (TRUE | never evaluated | FALSE | never evaluated |
wcscmp (name, L"ascii") == 0)TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
494 | { | - |
495 | int c; | - |
496 | | - |
497 | if ((TRUE | never evaluated | FALSE | never evaluated |
c = wctob (wc)) == TRUE | never evaluated | FALSE | never evaluated |
| 0 |
498 | (-1)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
499 | ) | - |
500 | return never executed: return 0; 0;never executed: return 0; | 0 |
501 | else | - |
502 | return never executed: return (c <= 0x7F); (c <= 0x7F);never executed: return (c <= 0x7F); | 0 |
503 | } | - |
504 | | - |
505 | want_word = (wcscmp (name, L"word") == 0); | - |
506 | if (want_wordTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
507 | name = L"alnum"; never executed: name = L"alnum"; | 0 |
508 | | - |
509 | memset (&state, '\0', sizeof (mbstate_t)); | - |
510 | mbs = (char *) malloc (wcslen(name) * | - |
511 | (__ctype_get_mb_cur_max ()) | - |
512 | + 1); | - |
513 | if (mbs == 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
514 | return never executed: return -1; -1;never executed: return -1; | 0 |
515 | mbslength = wcsrtombs (mbs, (const wchar_t **)&name, (wcslen(name) * | - |
516 | (__ctype_get_mb_cur_max ()) | - |
517 | + 1), &state); | - |
518 | | - |
519 | if (mbslength == (size_t)-1TRUE | never evaluated | FALSE | never evaluated |
|| mbslength == (size_t)-2TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
520 | { | - |
521 | sh_xfree((mbs), "smatch.c", 368); | - |
522 | return never executed: return -1; -1;never executed: return -1; | 0 |
523 | } | - |
524 | desc = wctype (mbs); | - |
525 | sh_xfree((mbs), "smatch.c", 372); | - |
526 | | - |
527 | if (desc == (wctype_t)0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
528 | return never executed: return -1; -1;never executed: return -1; | 0 |
529 | | - |
530 | if (want_wordTRUE | never evaluated | FALSE | never evaluated |
) | 0 |
531 | return never executed: return (iswctype (wc, desc) || wc == L'_'); (iswctype (wc, desc) || wc == L'_');never executed: return (iswctype (wc, desc) || wc == L'_'); | 0 |
532 | else | - |
533 | return never executed: return (iswctype (wc, desc)); (iswctype (wc, desc));never executed: return (iswctype (wc, desc)); | 0 |
534 | } | - |
535 | | - |
536 | | - |
537 | | - |
538 | int | - |
539 | xstrmatch (pattern, string, flags) | - |
540 | char *pattern; | - |
541 | char *string; | - |
542 | int flags; | - |
543 | { | - |
544 | | - |
545 | int ret; | - |
546 | size_t n; | - |
547 | wchar_t *wpattern, *wstring; | - |
548 | size_t plen, slen, mplen, mslen; | - |
549 | | - |
550 | if ( | - |
551 | (TRUE | evaluated 133719 times by 1 test | FALSE | evaluated 48689929 times by 1 test |
__ctype_get_mb_cur_max ()) TRUE | evaluated 133719 times by 1 test | FALSE | evaluated 48689929 times by 1 test |
| 133719-48689929 |
552 | == 1TRUE | evaluated 133719 times by 1 test | FALSE | evaluated 48689929 times by 1 test |
) | 133719-48689929 |
553 | returnexecuted 133719 times by 1 test: return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags));executed 133719 times by 1 test: return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); | 133719 |
554 | | - |
555 | if (mbsmbchar (string) == 0TRUE | evaluated 48689920 times by 1 test | FALSE | evaluated 9 times by 1 test |
&& mbsmbchar (pattern) == 0TRUE | evaluated 48689920 times by 1 test | FALSE | never evaluated |
) | 0-48689920 |
556 | returnexecuted 48689920 times by 1 test: return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags));executed 48689920 times by 1 test: return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); | 48689920 |
557 | | - |
558 | n = xdupmbstowcs (&wpattern, | - |
559 | ((void *)0) | - |
560 | , pattern); | - |
561 | if (n == (size_t)-1TRUE | evaluated 5 times by 1 test | FALSE | evaluated 4 times by 1 test |
|| n == (size_t)-2TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
) | 0-5 |
562 | returnexecuted 5 times by 1 test: return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags));executed 5 times by 1 test: return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); | 5 |
563 | | - |
564 | n = xdupmbstowcs (&wstring, | - |
565 | ((void *)0) | - |
566 | , string); | - |
567 | if (n == (size_t)-1TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
|| n == (size_t)-2TRUE | never evaluated | FALSE | evaluated 4 times by 1 test |
) | 0-4 |
568 | { | - |
569 | sh_xfree((wpattern), "smatch.c", 432); | - |
570 | return never executed: return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags));never executed: return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags)); | 0 |
571 | } | - |
572 | | - |
573 | ret = internal_wstrmatch (wpattern, wstring, flags); | - |
574 | | - |
575 | sh_xfree((wpattern), "smatch.c", 438); | - |
576 | sh_xfree((wstring), "smatch.c", 439); | - |
577 | | - |
578 | returnexecuted 4 times by 1 test: return ret; ret;executed 4 times by 1 test: return ret; | 4 |
579 | | - |
580 | | - |
581 | | - |
582 | } | - |
| | |