OpenCoverage

casemod.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/bash/src/lib/sh/casemod.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10extern char *substring (char *, int, int);-
11-
12-
13-
14-
15-
16-
17static wchar_t-
18cval (s, i)-
19 char *s;-
20 int i;-
21{-
22 size_t tmp;-
23 wchar_t wc;-
24 int l;-
25 mbstate_t mps;-
26-
27 if (-
28 (
(__ctype_get_m...r_max ()) == 1Description
TRUEnever evaluated
FALSEevaluated 1663 times by 1 test
Evaluated by:
  • Self test
__ctype_get_mb_cur_max ())
(__ctype_get_m...r_max ()) == 1Description
TRUEnever evaluated
FALSEevaluated 1663 times by 1 test
Evaluated by:
  • Self test
0-1663
29 == 1
(__ctype_get_m...r_max ()) == 1Description
TRUEnever evaluated
FALSEevaluated 1663 times by 1 test
Evaluated by:
  • Self test
|| is_basic (s[i])
is_basic (s[i])Description
TRUEevaluated 1663 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
)
0-1663
30 return
executed 1663 times by 1 test: return ((wchar_t)s[i]);
Executed by:
  • Self test
((wchar_t)s[i]);
executed 1663 times by 1 test: return ((wchar_t)s[i]);
Executed by:
  • Self test
1663
31 l = strlen (s);-
32 if (i >= (l - 1)
i >= (l - 1)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
33 return
never executed: return ((wchar_t)s[i]);
((wchar_t)s[i]);
never executed: return ((wchar_t)s[i]);
0
34 memset (&mps, 0, sizeof (mbstate_t));-
35 tmp = mbrtowc (&wc, s + i, l - i, &mps);-
36 if (((
(tmp) == (size_t)-1Description
TRUEnever evaluated
FALSEnever evaluated
tmp) == (size_t)-1
(tmp) == (size_t)-1Description
TRUEnever evaluated
FALSEnever evaluated
|| (
(tmp) == (size_t)-2Description
TRUEnever evaluated
FALSEnever evaluated
tmp) == (size_t)-2
(tmp) == (size_t)-2Description
TRUEnever evaluated
FALSEnever evaluated
) || ((
((tmp) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
tmp) == 0)
((tmp) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
37 return
never executed: return ((wchar_t)s[i]);
((wchar_t)s[i]);
never executed: return ((wchar_t)s[i]);
0
38 return
never executed: return wc;
wc;
never executed: return wc;
0
39}-
40-
41-
42-
43-
44char *-
45sh_modcase (string, pat, flags)-
46 const char *string;-
47 char *pat;-
48 int flags;-
49{-
50 int start, next, end, retind;-
51 int inword, c, nc, nop, match, usewords;-
52 char *ret, *s;-
53 wchar_t wc;-
54 int mb_cur_max;-
55-
56 wchar_t nwc;-
57 char mb[-
58 16-
59 +1];-
60 int mlen;-
61 size_t m;-
62 mbstate_t state;-
63-
64-
65 if (string == 0
string == 0Description
TRUEnever evaluated
FALSEevaluated 149 times by 1 test
Evaluated by:
  • Self test
|| *
*string == 0Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 128 times by 1 test
Evaluated by:
  • Self test
string == 0
*string == 0Description
TRUEevaluated 21 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 128 times by 1 test
Evaluated by:
  • Self test
)
0-149
66 {-
67 ret = (char *)sh_xmalloc((1), "casemod.c", 123);-
68 ret[0] = '\0';-
69 return
executed 21 times by 1 test: return ret;
Executed by:
  • Self test
ret;
executed 21 times by 1 test: return ret;
Executed by:
  • Self test
21
70 }-
71-
72-
73 memset (&state, 0, sizeof (mbstate_t));-
74-
75-
76 start = 0;-
77 end = strlen (string);-
78 mb_cur_max = -
79 (__ctype_get_mb_cur_max ())-
80 ;-
81-
82 ret = (char *)sh_xmalloc((2*end + 1), "casemod.c", 136);-
83 retind = 0;-
84-
85-
86 usewords = (flags & 0x1000);-
87 flags &= ~0x1000;-
88-
89 inword = 0;-
90 while (start < end
start < endDescription
TRUEevaluated 1663 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 128 times by 1 test
Evaluated by:
  • Self test
)
128-1663
91 {-
92 wc = cval ((char *)string, start);-
93-
94 if (iswalnum (wc) == 0
iswalnum (wc) == 0Description
TRUEevaluated 118 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 1545 times by 1 test
Evaluated by:
  • Self test
)
118-1545
95 inword = 0;
executed 118 times by 1 test: inword = 0;
Executed by:
  • Self test
118
96-
97 if (pat
patDescription
TRUEevaluated 622 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 1041 times by 1 test
Evaluated by:
  • Self test
)
622-1041
98 {-
99 next = start;-
100 do { if (locale_mb_cur_max > 1
locale_mb_cur_max > 1Description
TRUEevaluated 622 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
) { mbstate_t state_bak; size_t mblength; int _f; _f = is_basic ((string)[next]); if (_f
_fDescription
TRUEevaluated 622 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
) mblength = 1;
executed 622 times by 1 test: mblength = 1;
Executed by:
  • Self test
else if (locale_utf8locale
locale_utf8localeDescription
TRUEnever evaluated
FALSEnever evaluated
&& (((
(((string)[next] & 0x80) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
string)[next] & 0x80) == 0)
(((string)[next] & 0x80) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
) mblength = 1;
never executed: mblength = 1;
else { state_bak = state; mblength = mbrlen ((string) + (next), (end) - (next), &state); }
never executed: end of block
if (mblength == (size_t)-2
mblength == (size_t)-2Description
TRUEnever evaluated
FALSEevaluated 622 times by 1 test
Evaluated by:
  • Self test
|| mblength == (size_t)-1
mblength == (size_t)-1Description
TRUEnever evaluated
FALSEevaluated 622 times by 1 test
Evaluated by:
  • Self test
) { state = state_bak; (next)++; }
never executed: end of block
else if (mblength == 0
mblength == 0Description
TRUEnever evaluated
FALSEevaluated 622 times by 1 test
Evaluated by:
  • Self test
) (
never executed: (next)++;
next)++;
never executed: (next)++;
else (
executed 622 times by 1 test: (next) += mblength;
Executed by:
  • Self test
next) += mblength;
executed 622 times by 1 test: (next) += mblength;
Executed by:
  • Self test
} else (
never executed: (next)++;
next)++;
never executed: (next)++;
} while (0);
0-622
101 s = substring ((char *)string, start, next);-
102 match = strmatch (pat, s, (1 << 5)) != 1;-
103 sh_xfree((s), "casemod.c", 157);-
104 if (match == 0
match == 0Description
TRUEevaluated 254 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 368 times by 1 test
Evaluated by:
  • Self test
)
254-368
105 {-
106-
107 memcpy (ret + retind, string + start, next - start);-
108 retind += next - start;-
109 start = next;-
110 inword = 1;-
111 continue;
executed 254 times by 1 test: continue;
Executed by:
  • Self test
254
112 }-
113 }
executed 368 times by 1 test: end of block
Executed by:
  • Self test
368
114-
115-
116-
117-
118 if (flags == 0x0004
flags == 0x0004Description
TRUEevaluated 126 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 1283 times by 1 test
Evaluated by:
  • Self test
)
126-1283
119 {-
120 if (usewords
usewordsDescription
TRUEnever evaluated
FALSEevaluated 126 times by 1 test
Evaluated by:
  • Self test
)
0-126
121 nop = inword
inwordDescription
TRUEnever evaluated
FALSEnever evaluated
? 0x0001 : 0x0002;
never executed: nop = inword ? 0x0001 : 0x0002;
0
122 else-
123 nop = (
(start > 0)Description
TRUEevaluated 124 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test
start > 0)
(start > 0)Description
TRUEevaluated 124 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test
? 0x0001 : 0x0002;
executed 126 times by 1 test: nop = (start > 0) ? 0x0001 : 0x0002;
Executed by:
  • Self test
2-126
124 inword = 1;-
125 }
executed 126 times by 1 test: end of block
Executed by:
  • Self test
126
126 else if (flags == 0x0008
flags == 0x0008Description
TRUEnever evaluated
FALSEevaluated 1283 times by 1 test
Evaluated by:
  • Self test
)
0-1283
127 {-
128 if (usewords
usewordsDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
129 nop = inword
inwordDescription
TRUEnever evaluated
FALSEnever evaluated
? 0x0002 : 0x0001;
never executed: nop = inword ? 0x0002 : 0x0001;
0
130 else-
131 nop = (
(start > 0)Description
TRUEnever evaluated
FALSEnever evaluated
start > 0)
(start > 0)Description
TRUEnever evaluated
FALSEnever evaluated
? 0x0002 : 0x0001;
never executed: nop = (start > 0) ? 0x0002 : 0x0001;
0
132 inword = 1;-
133 }
never executed: end of block
0
134 else if (flags == 0x0040
flags == 0x0040Description
TRUEevaluated 297 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 986 times by 1 test
Evaluated by:
  • Self test
)
297-986
135 {-
136 if (usewords
usewordsDescription
TRUEnever evaluated
FALSEevaluated 297 times by 1 test
Evaluated by:
  • Self test
)
0-297
137 nop = inword
inwordDescription
TRUEnever evaluated
FALSEnever evaluated
? 0x0000 : 0x0002;
never executed: nop = inword ? 0x0000 : 0x0002;
0
138 else-
139 nop = (
(start > 0)Description
TRUEevaluated 274 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 23 times by 1 test
Evaluated by:
  • Self test
start > 0)
(start > 0)Description
TRUEevaluated 274 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 23 times by 1 test
Evaluated by:
  • Self test
? 0x0000 : 0x0002;
executed 297 times by 1 test: nop = (start > 0) ? 0x0000 : 0x0002;
Executed by:
  • Self test
23-297
140 inword = 1;-
141 }
executed 297 times by 1 test: end of block
Executed by:
  • Self test
297
142 else if (flags == 0x0080
flags == 0x0080Description
TRUEevaluated 182 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 804 times by 1 test
Evaluated by:
  • Self test
)
182-804
143 {-
144 if (usewords
usewordsDescription
TRUEnever evaluated
FALSEevaluated 182 times by 1 test
Evaluated by:
  • Self test
)
0-182
145 nop = inword
inwordDescription
TRUEnever evaluated
FALSEnever evaluated
? 0x0000 : 0x0001;
never executed: nop = inword ? 0x0000 : 0x0001;
0
146 else-
147 nop = (
(start > 0)Description
TRUEevaluated 170 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 12 times by 1 test
Evaluated by:
  • Self test
start > 0)
(start > 0)Description
TRUEevaluated 170 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 12 times by 1 test
Evaluated by:
  • Self test
? 0x0000 : 0x0001;
executed 182 times by 1 test: nop = (start > 0) ? 0x0000 : 0x0001;
Executed by:
  • Self test
12-182
148 inword = 1;-
149 }
executed 182 times by 1 test: end of block
Executed by:
  • Self test
182
150 else if (flags == 0x0010
flags == 0x0010Description
TRUEevaluated 15 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 789 times by 1 test
Evaluated by:
  • Self test
)
15-789
151 {-
152 nop = inword
inwordDescription
TRUEevaluated 14 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 1 time by 1 test
Evaluated by:
  • Self test
? 0x0000 : 0x0010;
1-14
153 inword = 1;-
154 }
executed 15 times by 1 test: end of block
Executed by:
  • Self test
15
155 else-
156 nop = flags;
executed 789 times by 1 test: nop = flags;
Executed by:
  • Self test
789
157-
158-
159-
160 if (mb_cur_max == 1
mb_cur_max == 1Description
TRUEnever evaluated
FALSEevaluated 1409 times by 1 test
Evaluated by:
  • Self test
)
0-1409
161 {-
162singlebyte:-
163 switch (nop)-
164 {-
165 default
never executed: default:
:
never executed: default:
0
166 case
never executed: case 0x0000:
0x0000:
never executed: case 0x0000:
nc = wc; break;
never executed: break;
0
167 case
never executed: case 0x0002:
0x0002:
never executed: case 0x0002:
nc = ((1 &&
0
168 ((*
((*__ctype_b_l...int) _ISlower)Description
TRUEnever evaluated
FALSEnever evaluated
__ctype_b_loc ())[(int) ((
((*__ctype_b_l...int) _ISlower)Description
TRUEnever evaluated
FALSEnever evaluated
0
169 (unsigned char)wc
((*__ctype_b_l...int) _ISlower)Description
TRUEnever evaluated
FALSEnever evaluated
0
170 ))] & (unsigned short int) _ISlower)
((*__ctype_b_l...int) _ISlower)Description
TRUEnever evaluated
FALSEnever evaluated
0
171 ) ? -
172 (__extension__ ({ int __res; if (sizeof (
sizeof ( wc ) > 1Description
TRUEnever evaluated
FALSEnever evaluated
0
173 wc
sizeof ( wc ) > 1Description
TRUEnever evaluated
FALSEnever evaluated
0
174 ) > 1
sizeof ( wc ) > 1Description
TRUEnever evaluated
FALSEnever evaluated
) { if (__builtin_constant_p (
__builtin_constant_p ( wc )Description
TRUEnever evaluated
FALSEnever evaluated
0
175 wc
__builtin_constant_p ( wc )Description
TRUEnever evaluated
FALSEnever evaluated
0
176 )
__builtin_constant_p ( wc )Description
TRUEnever evaluated
FALSEnever evaluated
) { int __c = (
0
177 wc-
178 ); __res = __c < -128
__c < -128Description
TRUEnever evaluated
FALSEnever evaluated
|| __c > 255
__c > 255Description
TRUEnever evaluated
FALSEnever evaluated
? __c : (*__ctype_toupper_loc ())[__c]; }
never executed: end of block
else __res = toupper (
never executed: __res = toupper ( wc );
0
179 wc
never executed: __res = toupper ( wc );
0
180 );
never executed: __res = toupper ( wc );
} else __res = (*__ctype_toupper_loc ())[(int) (
never executed: __res = (*__ctype_toupper_loc ())[(int) ( wc )];
0
181 wc
never executed: __res = (*__ctype_toupper_loc ())[(int) ( wc )];
0
182 )];
never executed: __res = (*__ctype_toupper_loc ())[(int) ( wc )];
__res; }))
0
183 : (wc)); break;
never executed: break;
0
184 case
never executed: case 0x0001:
0x0001:
never executed: case 0x0001:
nc = ((1 &&
0
185 ((*
((*__ctype_b_l...int) _ISupper)Description
TRUEnever evaluated
FALSEnever evaluated
__ctype_b_loc ())[(int) ((
((*__ctype_b_l...int) _ISupper)Description
TRUEnever evaluated
FALSEnever evaluated
0
186 (unsigned char)wc
((*__ctype_b_l...int) _ISupper)Description
TRUEnever evaluated
FALSEnever evaluated
0
187 ))] & (unsigned short int) _ISupper)
((*__ctype_b_l...int) _ISupper)Description
TRUEnever evaluated
FALSEnever evaluated
0
188 ) ? -
189 (__extension__ ({ int __res; if (sizeof (
sizeof ( wc ) > 1Description
TRUEnever evaluated
FALSEnever evaluated
0
190 wc
sizeof ( wc ) > 1Description
TRUEnever evaluated
FALSEnever evaluated
0
191 ) > 1
sizeof ( wc ) > 1Description
TRUEnever evaluated
FALSEnever evaluated
) { if (__builtin_constant_p (
__builtin_constant_p ( wc )Description
TRUEnever evaluated
FALSEnever evaluated
0
192 wc
__builtin_constant_p ( wc )Description
TRUEnever evaluated
FALSEnever evaluated
0
193 )
__builtin_constant_p ( wc )Description
TRUEnever evaluated
FALSEnever evaluated
) { int __c = (
0
194 wc-
195 ); __res = __c < -128
__c < -128Description
TRUEnever evaluated
FALSEnever evaluated
|| __c > 255
__c > 255Description
TRUEnever evaluated
FALSEnever evaluated
? __c : (*__ctype_tolower_loc ())[__c]; }
never executed: end of block
else __res = tolower (
never executed: __res = tolower ( wc );
0
196 wc
never executed: __res = tolower ( wc );
0
197 );
never executed: __res = tolower ( wc );
} else __res = (*__ctype_tolower_loc ())[(int) (
never executed: __res = (*__ctype_tolower_loc ())[(int) ( wc )];
0
198 wc
never executed: __res = (*__ctype_tolower_loc ())[(int) ( wc )];
0
199 )];
never executed: __res = (*__ctype_tolower_loc ())[(int) ( wc )];
__res; }))
0
200 : (wc)); break;
never executed: break;
0
201 case
never executed: case 0x0020:
0x0020:
never executed: case 0x0020:
0
202 case
never executed: case 0x0010:
0x0010:
never executed: case 0x0010:
nc = (iswupper (wc)
iswupper (wc)Description
TRUEnever evaluated
FALSEnever evaluated
? towlower (wc) : ((iswlower (wc)
iswlower (wc)Description
TRUEnever evaluated
FALSEnever evaluated
? towupper (wc) : (wc)))); break;
never executed: break;
0
203 }-
204 ret[retind++] = nc;-
205 }
never executed: end of block
0
206-
207 else-
208 {-
209 m = mbrtowc (&wc, string + start, end - start, &state);-
210-
211-
212-
213 if (((
(m) == (size_t)-1Description
TRUEnever evaluated
FALSEevaluated 1409 times by 1 test
Evaluated by:
  • Self test
m) == (size_t)-1
(m) == (size_t)-1Description
TRUEnever evaluated
FALSEevaluated 1409 times by 1 test
Evaluated by:
  • Self test
|| (
(m) == (size_t)-2Description
TRUEnever evaluated
FALSEevaluated 1409 times by 1 test
Evaluated by:
  • Self test
m) == (size_t)-2
(m) == (size_t)-2Description
TRUEnever evaluated
FALSEevaluated 1409 times by 1 test
Evaluated by:
  • Self test
))
0-1409
214 {-
215 wc = (unsigned char)string[start];-
216 goto
never executed: goto singlebyte;
singlebyte;
never executed: goto singlebyte;
0
217 }-
218 else if (((
((m) == 0)Description
TRUEnever evaluated
FALSEevaluated 1409 times by 1 test
Evaluated by:
  • Self test
m) == 0)
((m) == 0)Description
TRUEnever evaluated
FALSEevaluated 1409 times by 1 test
Evaluated by:
  • Self test
)
0-1409
219 wc = L'\0';
never executed: wc = L'\0';
0
220 switch (nop)-
221 {-
222 default
never executed: default:
:
never executed: default:
0
223 case
executed 458 times by 1 test: case 0x0000:
Executed by:
  • Self test
0x0000:
executed 458 times by 1 test: case 0x0000:
Executed by:
  • Self test
nwc = wc; break;
executed 458 times by 1 test: break;
Executed by:
  • Self test
458
224 case
executed 427 times by 1 test: case 0x0002:
Executed by:
  • Self test
0x0002:
executed 427 times by 1 test: case 0x0002:
Executed by:
  • Self test
nwc = (iswlower (wc)
iswlower (wc)Description
TRUEevaluated 377 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 50 times by 1 test
Evaluated by:
  • Self test
? towupper (wc) : (wc)); break;
executed 427 times by 1 test: break;
Executed by:
  • Self test
50-427
225 case
executed 514 times by 1 test: case 0x0001:
Executed by:
  • Self test
0x0001:
executed 514 times by 1 test: case 0x0001:
Executed by:
  • Self test
nwc = (iswupper (wc)
iswupper (wc)Description
TRUEevaluated 164 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 350 times by 1 test
Evaluated by:
  • Self test
? towlower (wc) : (wc)); break;
executed 514 times by 1 test: break;
Executed by:
  • Self test
164-514
226 case
executed 9 times by 1 test: case 0x0020:
Executed by:
  • Self test
0x0020:
executed 9 times by 1 test: case 0x0020:
Executed by:
  • Self test
9
227 case
executed 1 time by 1 test: case 0x0010:
Executed by:
  • Self test
0x0010:
executed 1 time by 1 test: case 0x0010:
Executed by:
  • Self test
nwc = (iswupper (wc)
iswupper (wc)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 5 times by 1 test
Evaluated by:
  • Self test
? towlower (wc) : ((iswlower (wc)
iswlower (wc)Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
? towupper (wc) : (wc)))); break;
executed 10 times by 1 test: break;
Executed by:
  • Self test
0-10
228 }-
229-
230-
231-
232 if ((
(int)nwc <= (0x7f * 2 + 1)Description
TRUEevaluated 1409 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
int)nwc <=
(int)nwc <= (0x7f * 2 + 1)Description
TRUEevaluated 1409 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
0-1409
233 (0x7f * 2 + 1)
(int)nwc <= (0x7f * 2 + 1)Description
TRUEevaluated 1409 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
0-1409
234 && is_basic ((int)nwc)
is_basic ((int)nwc)Description
TRUEevaluated 1409 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
)
0-1409
235 ret[retind++] = nwc;
executed 1409 times by 1 test: ret[retind++] = nwc;
Executed by:
  • Self test
1409
236 else-
237 {-
238 mlen = wcrtomb (mb, nwc, &state);-
239 if (mlen > 0
mlen > 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
240 mb[mlen] = '\0';
never executed: mb[mlen] = '\0';
0
241-
242 -
243 __builtin_strncpy (-
244 ret + retind-
245 , -
246 mb-
247 , -
248 mlen-
249 )-
250 ;-
251 retind += mlen;-
252 }
never executed: end of block
0
253 }-
254-
255-
256 do { if (locale_mb_cur_max > 1
locale_mb_cur_max > 1Description
TRUEevaluated 1409 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
) { mbstate_t state_bak; size_t mblength; int _f; _f = is_basic ((string)[start]); if (_f
_fDescription
TRUEevaluated 1409 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
) mblength = 1;
executed 1409 times by 1 test: mblength = 1;
Executed by:
  • Self test
else if (locale_utf8locale
locale_utf8localeDescription
TRUEnever evaluated
FALSEnever evaluated
&& (((
(((string)[sta... & 0x80) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
string)[start] & 0x80) == 0)
(((string)[sta... & 0x80) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
) mblength = 1;
never executed: mblength = 1;
else { state_bak = state; mblength = mbrlen ((string) + (start), (end) - (start), &state); }
never executed: end of block
if (mblength == (size_t)-2
mblength == (size_t)-2Description
TRUEnever evaluated
FALSEevaluated 1409 times by 1 test
Evaluated by:
  • Self test
|| mblength == (size_t)-1
mblength == (size_t)-1Description
TRUEnever evaluated
FALSEevaluated 1409 times by 1 test
Evaluated by:
  • Self test
) { state = state_bak; (start)++; }
never executed: end of block
else if (mblength == 0
mblength == 0Description
TRUEnever evaluated
FALSEevaluated 1409 times by 1 test
Evaluated by:
  • Self test
) (
never executed: (start)++;
start)++;
never executed: (start)++;
else (
executed 1409 times by 1 test: (start) += mblength;
Executed by:
  • Self test
start) += mblength;
executed 1409 times by 1 test: (start) += mblength;
Executed by:
  • Self test
} else (
never executed: (start)++;
start)++;
never executed: (start)++;
} while (0);
0-1409
257 }
executed 1409 times by 1 test: end of block
Executed by:
  • Self test
1409
258-
259 ret[retind] = '\0';-
260 return
executed 128 times by 1 test: return ret;
Executed by:
  • Self test
ret;
executed 128 times by 1 test: return ret;
Executed by:
  • Self test
128
261}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2