OpenCoverage

assoc.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/bash/src/assoc.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10-
11-
12-
13-
14static WORD_LIST *assoc_to_word_list_internal (HASH_TABLE *, int);-
15-
16-
17-
18void-
19assoc_dispose (hash)-
20 HASH_TABLE *hash;-
21{-
22 if (hash
hashDescription
TRUEevaluated 111 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
)
0-111
23 {-
24 hash_flush (hash, 0);-
25 hash_dispose (hash);-
26 }
executed 111 times by 1 test: end of block
Executed by:
  • Self test
111
27}
executed 111 times by 1 test: end of block
Executed by:
  • Self test
111
28-
29void-
30assoc_flush (hash)-
31 HASH_TABLE *hash;-
32{-
33 hash_flush (hash, 0);-
34}
executed 70 times by 1 test: end of block
Executed by:
  • Self test
70
35-
36int-
37assoc_insert (hash, key, value)-
38 HASH_TABLE *hash;-
39 char *key;-
40 char *value;-
41{-
42 BUCKET_CONTENTS *b;-
43-
44 b = hash_search (key, hash, 0x02);-
45 if (b == 0
b == 0Description
TRUEnever evaluated
FALSEevaluated 590 times by 1 test
Evaluated by:
  • Self test
)
0-590
46 return
never executed: return -1;
-1;
never executed: return -1;
0
47-
48-
49-
50 if (b->key != key
b->key != keyDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 562 times by 1 test
Evaluated by:
  • Self test
)
28-562
51 sh_xfree((key), "assoc.c", 84);
executed 28 times by 1 test: sh_xfree((key), "assoc.c", 84);
Executed by:
  • Self test
28
52 do { if (b->data
b->dataDescription
TRUEevaluated 28 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 562 times by 1 test
Evaluated by:
  • Self test
) sh_xfree((b->data), "assoc.c", 85);
executed 28 times by 1 test: sh_xfree((b->data), "assoc.c", 85);
Executed by:
  • Self test
} while (0);
28-562
53 b->data = value
valueDescription
TRUEevaluated 590 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
? (char *)strcpy (sh_xmalloc((1 + strlen (value)), "assoc.c", 86), (value)) : (char *)0;
0-590
54 return
executed 590 times by 1 test: return (0);
Executed by:
  • Self test
(0);
executed 590 times by 1 test: return (0);
Executed by:
  • Self test
590
55}-
56-
57-
58void *-
59assoc_replace (hash, key, value)-
60 HASH_TABLE *hash;-
61 char *key;-
62 char *value;-
63{-
64 BUCKET_CONTENTS *b;-
65 void * t;-
66-
67 b = hash_search (key, hash, 0x02);-
68 if (b == 0
b == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
69 return
never executed: return (void *)0;
(void *)0;
never executed: return (void *)0;
0
70-
71-
72-
73 if (b->key != key
b->key != keyDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
74 sh_xfree((key), "assoc.c", 107);
never executed: sh_xfree((key), "assoc.c", 107);
0
75 t = b->data;-
76 b->data = value
valueDescription
TRUEnever evaluated
FALSEnever evaluated
? (char *)strcpy (sh_xmalloc((1 + strlen (value)), "assoc.c", 109), (value)) : (char *)0;
0
77 return
never executed: return t;
t;
never executed: return t;
0
78}-
79-
80void-
81assoc_remove (hash, string)-
82 HASH_TABLE *hash;-
83 char *string;-
84{-
85 BUCKET_CONTENTS *b;-
86-
87 b = hash_remove (string, hash, 0);-
88 if (b
bDescription
TRUEevaluated 9 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
)
0-9
89 {-
90 sh_xfree(((char *)b->data), "assoc.c", 123);-
91 sh_xfree((b->key), "assoc.c", 124);-
92 sh_xfree((b), "assoc.c", 125);-
93 }
executed 9 times by 1 test: end of block
Executed by:
  • Self test
9
94}
executed 9 times by 1 test: end of block
Executed by:
  • Self test
9
95-
96char *-
97assoc_reference (hash, string)-
98 HASH_TABLE *hash;-
99 char *string;-
100{-
101 BUCKET_CONTENTS *b;-
102-
103 if (hash == 0
hash == 0Description
TRUEnever evaluated
FALSEevaluated 88 times by 1 test
Evaluated by:
  • Self test
)
0-88
104 return
never executed: return (char *)0;
(char *)0;
never executed: return (char *)0;
0
105-
106 b = hash_search (string, hash, 0);-
107 return
executed 88 times by 1 test: return (b ? (char *)b->data : 0);
Executed by:
  • Self test
(b ? (char *)b->data : 0);
executed 88 times by 1 test: return (b ? (char *)b->data : 0);
Executed by:
  • Self test
88
108}-
109-
110-
111-
112HASH_TABLE *-
113assoc_quote (h)-
114 HASH_TABLE *h;-
115{-
116 int i;-
117 BUCKET_CONTENTS *tlist;-
118 char *t;-
119-
120 if (h == 0
h == 0Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • Self test
|| ((
((h)->nentries == 0)Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • Self test
h)->nentries == 0)
((h)->nentries == 0)Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • Self test
)
0-10
121 return
never executed: return ((HASH_TABLE *) ((void *)0) );
((HASH_TABLE *)
never executed: return ((HASH_TABLE *) ((void *)0) );
0
122 ((void *)0)
never executed: return ((HASH_TABLE *) ((void *)0) );
0
123 );
never executed: return ((HASH_TABLE *) ((void *)0) );
0
124-
125 for (i = 0; i < h->nbuckets
i < h->nbucketsDescription
TRUEevaluated 1280 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 10 times by 1 test
Evaluated by:
  • Self test
; i++)
10-1280
126 for (tlist = ((h && (i < h->nbuckets)) ? h->bucket_array[i] : (BUCKET_CONTENTS *)-
127 ((void *)0)-
128 ); tlist
tlistDescription
TRUEevaluated 56 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • Self test
; tlist = tlist->next)
56-1280
129 {-
130 t = quote_string ((char *)tlist->data);-
131 do { if (tlist->data
tlist->dataDescription
TRUEevaluated 56 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
) sh_xfree((tlist->data), "assoc.c", 160);
executed 56 times by 1 test: sh_xfree((tlist->data), "assoc.c", 160);
Executed by:
  • Self test
} while (0);
0-56
132 tlist->data = t;-
133 }
executed 56 times by 1 test: end of block
Executed by:
  • Self test
56
134-
135 return
executed 10 times by 1 test: return h;
Executed by:
  • Self test
h;
executed 10 times by 1 test: return h;
Executed by:
  • Self test
10
136}-
137-
138-
139-
140HASH_TABLE *-
141assoc_quote_escapes (h)-
142 HASH_TABLE *h;-
143{-
144 int i;-
145 BUCKET_CONTENTS *tlist;-
146 char *t;-
147-
148 if (h == 0
h == 0Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • Self test
|| ((
((h)->nentries == 0)Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • Self test
h)->nentries == 0)
((h)->nentries == 0)Description
TRUEnever evaluated
FALSEevaluated 10 times by 1 test
Evaluated by:
  • Self test
)
0-10
149 return
never executed: return ((HASH_TABLE *) ((void *)0) );
((HASH_TABLE *)
never executed: return ((HASH_TABLE *) ((void *)0) );
0
150 ((void *)0)
never executed: return ((HASH_TABLE *) ((void *)0) );
0
151 );
never executed: return ((HASH_TABLE *) ((void *)0) );
0
152-
153 for (i = 0; i < h->nbuckets
i < h->nbucketsDescription
TRUEevaluated 1280 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 10 times by 1 test
Evaluated by:
  • Self test
; i++)
10-1280
154 for (tlist = ((h && (i < h->nbuckets)) ? h->bucket_array[i] : (BUCKET_CONTENTS *)-
155 ((void *)0)-
156 ); tlist
tlistDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 1280 times by 1 test
Evaluated by:
  • Self test
; tlist = tlist->next)
32-1280
157 {-
158 t = quote_escapes ((char *)tlist->data);-
159 do { if (tlist->data
tlist->dataDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
) sh_xfree((tlist->data), "assoc.c", 184);
executed 32 times by 1 test: sh_xfree((tlist->data), "assoc.c", 184);
Executed by:
  • Self test
} while (0);
0-32
160 tlist->data = t;-
161 }
executed 32 times by 1 test: end of block
Executed by:
  • Self test
32
162-
163 return
executed 10 times by 1 test: return h;
Executed by:
  • Self test
h;
executed 10 times by 1 test: return h;
Executed by:
  • Self test
10
164}-
165-
166HASH_TABLE *-
167assoc_dequote (h)-
168 HASH_TABLE *h;-
169{-
170 int i;-
171 BUCKET_CONTENTS *tlist;-
172 char *t;-
173-
174 if (h == 0
h == 0Description
TRUEnever evaluated
FALSEnever evaluated
|| ((
((h)->nentries == 0)Description
TRUEnever evaluated
FALSEnever evaluated
h)->nentries == 0)
((h)->nentries == 0)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
175 return
never executed: return ((HASH_TABLE *) ((void *)0) );
((HASH_TABLE *)
never executed: return ((HASH_TABLE *) ((void *)0) );
0
176 ((void *)0)
never executed: return ((HASH_TABLE *) ((void *)0) );
0
177 );
never executed: return ((HASH_TABLE *) ((void *)0) );
0
178-
179 for (i = 0; i < h->nbuckets
i < h->nbucketsDescription
TRUEnever evaluated
FALSEnever evaluated
; i++)
0
180 for (tlist = ((h && (i < h->nbuckets)) ? h->bucket_array[i] : (BUCKET_CONTENTS *)-
181 ((void *)0)-
182 ); tlist
tlistDescription
TRUEnever evaluated
FALSEnever evaluated
; tlist = tlist->next)
0
183 {-
184 t = dequote_string ((char *)tlist->data);-
185 do { if (tlist->data
tlist->dataDescription
TRUEnever evaluated
FALSEnever evaluated
) sh_xfree((tlist->data), "assoc.c", 206);
never executed: sh_xfree((tlist->data), "assoc.c", 206);
} while (0);
0
186 tlist->data = t;-
187 }
never executed: end of block
0
188-
189 return
never executed: return h;
h;
never executed: return h;
0
190}-
191-
192HASH_TABLE *-
193assoc_dequote_escapes (h)-
194 HASH_TABLE *h;-
195{-
196 int i;-
197 BUCKET_CONTENTS *tlist;-
198 char *t;-
199-
200 if (h == 0
h == 0Description
TRUEnever evaluated
FALSEnever evaluated
|| ((
((h)->nentries == 0)Description
TRUEnever evaluated
FALSEnever evaluated
h)->nentries == 0)
((h)->nentries == 0)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
201 return
never executed: return ((HASH_TABLE *) ((void *)0) );
((HASH_TABLE *)
never executed: return ((HASH_TABLE *) ((void *)0) );
0
202 ((void *)0)
never executed: return ((HASH_TABLE *) ((void *)0) );
0
203 );
never executed: return ((HASH_TABLE *) ((void *)0) );
0
204-
205 for (i = 0; i < h->nbuckets
i < h->nbucketsDescription
TRUEnever evaluated
FALSEnever evaluated
; i++)
0
206 for (tlist = ((h && (i < h->nbuckets)) ? h->bucket_array[i] : (BUCKET_CONTENTS *)-
207 ((void *)0)-
208 ); tlist
tlistDescription
TRUEnever evaluated
FALSEnever evaluated
; tlist = tlist->next)
0
209 {-
210 t = dequote_escapes ((char *)tlist->data);-
211 do { if (tlist->data
tlist->dataDescription
TRUEnever evaluated
FALSEnever evaluated
) sh_xfree((tlist->data), "assoc.c", 228);
never executed: sh_xfree((tlist->data), "assoc.c", 228);
} while (0);
0
212 tlist->data = t;-
213 }
never executed: end of block
0
214-
215 return
never executed: return h;
h;
never executed: return h;
0
216}-
217-
218HASH_TABLE *-
219assoc_remove_quoted_nulls (h)-
220 HASH_TABLE *h;-
221{-
222 int i;-
223 BUCKET_CONTENTS *tlist;-
224 char *t;-
225-
226 if (h == 0
h == 0Description
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • Self test
|| ((
((h)->nentries == 0)Description
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • Self test
h)->nentries == 0)
((h)->nentries == 0)Description
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • Self test
)
0-3
227 return
never executed: return ((HASH_TABLE *) ((void *)0) );
((HASH_TABLE *)
never executed: return ((HASH_TABLE *) ((void *)0) );
0
228 ((void *)0)
never executed: return ((HASH_TABLE *) ((void *)0) );
0
229 );
never executed: return ((HASH_TABLE *) ((void *)0) );
0
230-
231 for (i = 0; i < h->nbuckets
i < h->nbucketsDescription
TRUEevaluated 384 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 3 times by 1 test
Evaluated by:
  • Self test
; i++)
3-384
232 for (tlist = ((h && (i < h->nbuckets)) ? h->bucket_array[i] : (BUCKET_CONTENTS *)-
233 ((void *)0)-
234 ); tlist
tlistDescription
TRUEevaluated 12 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 384 times by 1 test
Evaluated by:
  • Self test
; tlist = tlist->next)
12-384
235 {-
236 t = remove_quoted_nulls ((char *)tlist->data);-
237 tlist->data = t;-
238 }
executed 12 times by 1 test: end of block
Executed by:
  • Self test
12
239-
240 return
executed 3 times by 1 test: return h;
Executed by:
  • Self test
h;
executed 3 times by 1 test: return h;
Executed by:
  • Self test
3
241}-
242-
243-
244-
245-
246-
247char *-
248assoc_subrange (hash, start, nelem, starsub, quoted)-
249HASH_TABLE *hash;-
250arrayind_t start, nelem;-
251int starsub, quoted;-
252{-
253 WORD_LIST *l, *save, *h, *t;-
254 int i, j;-
255 char *ret;-
256-
257 if (((
((hash)->nentries == 0)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test
hash)->nentries == 0)
((hash)->nentries == 0)Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test
)
0-2
258 return
never executed: return ((char *) ((void *)0) );
((char *)
never executed: return ((char *) ((void *)0) );
0
259 ((void *)0)
never executed: return ((char *) ((void *)0) );
0
260 );
never executed: return ((char *) ((void *)0) );
0
261-
262 save = l = assoc_to_word_list (hash);-
263 if (save == 0
save == 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test
)
0-2
264 return
never executed: return ((char *) ((void *)0) );
((char *)
never executed: return ((char *) ((void *)0) );
0
265 ((void *)0)
never executed: return ((char *) ((void *)0) );
0
266 );
never executed: return ((char *) ((void *)0) );
0
267-
268 for (i = 1; l
lDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
&& i < start
i < startDescription
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test
; i++)
0-2
269 l = l->next;
never executed: l = l->next;
0
270 if (l == 0
l == 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test
)
0-2
271 {-
272 dispose_words (save);-
273 return
never executed: return ((char *) ((void *)0) );
((char *)
never executed: return ((char *) ((void *)0) );
0
274 ((void *)0)
never executed: return ((char *) ((void *)0) );
0
275 );
never executed: return ((char *) ((void *)0) );
0
276 }-
277 for (j = 0,h = t = l; l
lDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test
&& j < nelem
j < nelemDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
; j++)
0-8
278 {-
279 t = l;-
280 l = l->next;-
281 }
executed 8 times by 1 test: end of block
Executed by:
  • Self test
8
282-
283 t->next = (WORD_LIST *)-
284 ((void *)0)-
285 ;-
286-
287 ret = string_list_pos_params (starsub ? '*' : '@', h, quoted);-
288-
289 if (t != l
t != lDescription
TRUEevaluated 2 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
)
0-2
290 t->next = l;
executed 2 times by 1 test: t->next = l;
Executed by:
  • Self test
2
291-
292 dispose_words (save);-
293 return
executed 2 times by 1 test: return (ret);
Executed by:
  • Self test
(ret);
executed 2 times by 1 test: return (ret);
Executed by:
  • Self test
2
294-
295}-
296-
297char *-
298assoc_patsub (h, pat, rep, mflags)-
299 HASH_TABLE *h;-
300 char *pat, *rep;-
301 int mflags;-
302{-
303 BUCKET_CONTENTS *tlist;-
304 int i, slen;-
305 HASH_TABLE *h2;-
306 char *t, *sifs, *ifs;-
307-
308 if (h == 0
h == 0Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • Self test
|| ((
((h)->nentries == 0)Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • Self test
h)->nentries == 0)
((h)->nentries == 0)Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • Self test
)
0-8
309 return
never executed: return ((char *) ((void *)0) );
((char *)
never executed: return ((char *) ((void *)0) );
0
310 ((void *)0)
never executed: return ((char *) ((void *)0) );
0
311 );
never executed: return ((char *) ((void *)0) );
0
312-
313 h2 = (hash_copy((h), 0));-
314 for (i = 0; i < h2->nbuckets
i < h2->nbucketsDescription
TRUEevaluated 1024 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 8 times by 1 test
Evaluated by:
  • Self test
; i++)
8-1024
315 for (tlist = ((h2 && (i < h2->nbuckets)) ? h2->bucket_array[i] : (BUCKET_CONTENTS *)-
316 ((void *)0)-
317 ); tlist
tlistDescription
TRUEevaluated 56 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 1024 times by 1 test
Evaluated by:
  • Self test
; tlist = tlist->next)
56-1024
318 {-
319 t = pat_subst ((char *)tlist->data, pat, rep, mflags);-
320 do { if (tlist->data
tlist->dataDescription
TRUEevaluated 56 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
) sh_xfree((tlist->data), "assoc.c", 321);
executed 56 times by 1 test: sh_xfree((tlist->data), "assoc.c", 321);
Executed by:
  • Self test
} while (0);
0-56
321 tlist->data = t;-
322 }
executed 56 times by 1 test: end of block
Executed by:
  • Self test
56
323-
324 if (mflags & 0x020
mflags & 0x020Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test
)
2-6
325 assoc_quote (h2);
executed 6 times by 1 test: assoc_quote (h2);
Executed by:
  • Self test
6
326 else-
327 assoc_quote_escapes (h2);
executed 2 times by 1 test: assoc_quote_escapes (h2);
Executed by:
  • Self test
2
328-
329 if (mflags & 0x080
mflags & 0x080Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test
FALSEevaluated 7 times by 1 test
Evaluated by:
  • Self test
)
1-7
330 {-
331 assoc_remove_quoted_nulls (h2);-
332 sifs = ifs_firstchar ((int *)-
333 ((void *)0)-
334 );-
335 t = assoc_to_string (h2, sifs, 0);-
336 sh_xfree((sifs), "assoc.c", 335);-
337 }
executed 1 time by 1 test: end of block
Executed by:
  • Self test
1
338 else if (mflags & 0x020
mflags & 0x020Description
TRUEevaluated 5 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test
)
2-5
339 {-
340-
341 sifs = ifs_firstchar (&slen);-
342 ifs = getifs ();-
343 if (ifs == 0
ifs == 0Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • Self test
|| *
*ifs == 0Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • Self test
ifs == 0
*ifs == 0Description
TRUEnever evaluated
FALSEevaluated 5 times by 1 test
Evaluated by:
  • Self test
)
0-5
344 {-
345 if (slen < 2
slen < 2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
346 sifs = sh_xrealloc((sifs), (2), "assoc.c", 345);
never executed: sifs = sh_xrealloc((sifs), (2), "assoc.c", 345);
0
347 sifs[0] = ' ';-
348 sifs[1] = '\0';-
349 }
never executed: end of block
0
350 t = assoc_to_string (h2, sifs, 0);-
351 sh_xfree((sifs), "assoc.c", 350);-
352 }
executed 5 times by 1 test: end of block
Executed by:
  • Self test
5
353 else-
354 t = assoc_to_string (h2, " ", 0);
executed 2 times by 1 test: t = assoc_to_string (h2, " ", 0);
Executed by:
  • Self test
2
355-
356 assoc_dispose (h2);-
357-
358 return
executed 8 times by 1 test: return t;
Executed by:
  • Self test
t;
executed 8 times by 1 test: return t;
Executed by:
  • Self test
8
359}-
360-
361char *-
362assoc_modcase (h, pat, modop, mflags)-
363 HASH_TABLE *h;-
364 char *pat;-
365 int modop;-
366 int mflags;-
367{-
368 BUCKET_CONTENTS *tlist;-
369 int i, slen;-
370 HASH_TABLE *h2;-
371 char *t, *sifs, *ifs;-
372-
373 if (h == 0
h == 0Description
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • Self test
|| ((
((h)->nentries == 0)Description
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • Self test
h)->nentries == 0)
((h)->nentries == 0)Description
TRUEnever evaluated
FALSEevaluated 12 times by 1 test
Evaluated by:
  • Self test
)
0-12
374 return
never executed: return ((char *) ((void *)0) );
((char *)
never executed: return ((char *) ((void *)0) );
0
375 ((void *)0)
never executed: return ((char *) ((void *)0) );
0
376 );
never executed: return ((char *) ((void *)0) );
0
377-
378 h2 = (hash_copy((h), 0));-
379 for (i = 0; i < h2->nbuckets
i < h2->nbucketsDescription
TRUEevaluated 1536 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 12 times by 1 test
Evaluated by:
  • Self test
; i++)
12-1536
380 for (tlist = ((h2 && (i < h2->nbuckets)) ? h2->bucket_array[i] : (BUCKET_CONTENTS *)-
381 ((void *)0)-
382 ); tlist
tlistDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 1536 times by 1 test
Evaluated by:
  • Self test
; tlist = tlist->next)
32-1536
383 {-
384 t = sh_modcase ((char *)tlist->data, pat, modop);-
385 do { if (tlist->data
tlist->dataDescription
TRUEevaluated 32 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
) sh_xfree((tlist->data), "assoc.c", 380);
executed 32 times by 1 test: sh_xfree((tlist->data), "assoc.c", 380);
Executed by:
  • Self test
} while (0);
0-32
386 tlist->data = t;-
387 }
executed 32 times by 1 test: end of block
Executed by:
  • Self test
32
388-
389 if (mflags & 0x020
mflags & 0x020Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 8 times by 1 test
Evaluated by:
  • Self test
)
4-8
390 assoc_quote (h2);
executed 4 times by 1 test: assoc_quote (h2);
Executed by:
  • Self test
4
391 else-
392 assoc_quote_escapes (h2);
executed 8 times by 1 test: assoc_quote_escapes (h2);
Executed by:
  • Self test
8
393-
394 if (mflags & 0x080
mflags & 0x080Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 10 times by 1 test
Evaluated by:
  • Self test
)
2-10
395 {-
396 assoc_remove_quoted_nulls (h2);-
397 sifs = ifs_firstchar ((int *)-
398 ((void *)0)-
399 );-
400 t = assoc_to_string (h2, sifs, 0);-
401 sh_xfree((sifs), "assoc.c", 394);-
402 }
executed 2 times by 1 test: end of block
Executed by:
  • Self test
2
403 else if (mflags & 0x020
mflags & 0x020Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 8 times by 1 test
Evaluated by:
  • Self test
)
2-8
404 {-
405-
406 sifs = ifs_firstchar (&slen);-
407 ifs = getifs ();-
408 if (ifs == 0
ifs == 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test
|| *
*ifs == 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test
ifs == 0
*ifs == 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • Self test
)
0-2
409 {-
410 if (slen < 2
slen < 2Description
TRUEnever evaluated
FALSEnever evaluated
)
0
411 sifs = sh_xrealloc((sifs), (2), "assoc.c", 404);
never executed: sifs = sh_xrealloc((sifs), (2), "assoc.c", 404);
0
412 sifs[0] = ' ';-
413 sifs[1] = '\0';-
414 }
never executed: end of block
0
415 t = assoc_to_string (h2, sifs, 0);-
416 sh_xfree((sifs), "assoc.c", 409);-
417 }
executed 2 times by 1 test: end of block
Executed by:
  • Self test
2
418 else-
419 t = assoc_to_string (h2, " ", 0);
executed 8 times by 1 test: t = assoc_to_string (h2, " ", 0);
Executed by:
  • Self test
8
420-
421 assoc_dispose (h2);-
422-
423 return
executed 12 times by 1 test: return t;
Executed by:
  • Self test
t;
executed 12 times by 1 test: return t;
Executed by:
  • Self test
12
424}-
425-
426char *-
427assoc_to_assign (hash, quoted)-
428 HASH_TABLE *hash;-
429 int quoted;-
430{-
431 char *ret;-
432 char *istr, *vstr;-
433 int i, rsize, rlen, elen;-
434 BUCKET_CONTENTS *tlist;-
435-
436 if (hash == 0
hash == 0Description
TRUEnever evaluated
FALSEevaluated 121 times by 1 test
Evaluated by:
  • Self test
|| ((
((hash)->nentries == 0)Description
TRUEevaluated 34 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 87 times by 1 test
Evaluated by:
  • Self test
hash)->nentries == 0)
((hash)->nentries == 0)Description
TRUEevaluated 34 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 87 times by 1 test
Evaluated by:
  • Self test
)
0-121
437 return
executed 34 times by 1 test: return (char *)0;
Executed by:
  • Self test
(char *)0;
executed 34 times by 1 test: return (char *)0;
Executed by:
  • Self test
34
438-
439 ret = sh_xmalloc((rsize = 128), "assoc.c", 432);-
440 ret[0] = '(';-
441 rlen = 1;-
442-
443 for (i = 0; i < hash->nbuckets
i < hash->nbucketsDescription
TRUEevaluated 11136 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 87 times by 1 test
Evaluated by:
  • Self test
; i++)
87-11136
444 for (tlist = ((hash && (i < hash->nbuckets)) ? hash->bucket_array[i] : (BUCKET_CONTENTS *)-
445 ((void *)0)-
446 ); tlist
tlistDescription
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 11136 times by 1 test
Evaluated by:
  • Self test
; tlist = tlist->next)
194-11136
447 {-
448 if (ansic_shouldquote (tlist->key)
ansic_shouldquote (tlist->key)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test
FALSEevaluated 193 times by 1 test
Evaluated by:
  • Self test
)
1-193
449 istr = ansic_quote (tlist->key, 0, (int *)0);
executed 1 time by 1 test: istr = ansic_quote (tlist->key, 0, (int *)0);
Executed by:
  • Self test
1
450 else if (sh_contains_shell_metas (tlist->key)
sh_contains_sh...s (tlist->key)Description
TRUEevaluated 70 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 123 times by 1 test
Evaluated by:
  • Self test
)
70-123
451 istr = sh_double_quote (tlist->key);
executed 70 times by 1 test: istr = sh_double_quote (tlist->key);
Executed by:
  • Self test
70
452 else if (((
(tlist->key[0]) == '@'Description
TRUEnever evaluated
FALSEevaluated 123 times by 1 test
Evaluated by:
  • Self test
tlist->key[0]) == '@'
(tlist->key[0]) == '@'Description
TRUEnever evaluated
FALSEevaluated 123 times by 1 test
Evaluated by:
  • Self test
|| (
(tlist->key[0]) == '*'Description
TRUEnever evaluated
FALSEevaluated 123 times by 1 test
Evaluated by:
  • Self test
tlist->key[0]) == '*'
(tlist->key[0]) == '*'Description
TRUEnever evaluated
FALSEevaluated 123 times by 1 test
Evaluated by:
  • Self test
) && tlist->key[1] == '\0'
tlist->key[1] == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
)
0-123
453 istr = sh_double_quote (tlist->key);
never executed: istr = sh_double_quote (tlist->key);
0
454 else-
455 istr = tlist->key;
executed 123 times by 1 test: istr = tlist->key;
Executed by:
  • Self test
123
456-
457 vstr = tlist->data
tlist->dataDescription
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
? (ansic_shouldquote ((char *)tlist->data)
ansic_shouldqu...*)tlist->data)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test
FALSEevaluated 193 times by 1 test
Evaluated by:
  • Self test
?
0-194
458 ansic_quote ((char *)tlist->data, 0, (int *)0) :-
459 sh_double_quote ((char *)tlist->data))-
460 : (char *)0;-
461-
462 elen = (((
(istr)Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
istr)
(istr)Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
&& (
(istr)[0]Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
istr)[0]
(istr)[0]Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
) ? ((
(istr)[1]Description
TRUEevaluated 156 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 38 times by 1 test
Evaluated by:
  • Self test
istr)[1]
(istr)[1]Description
TRUEevaluated 156 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 38 times by 1 test
Evaluated by:
  • Self test
? ((
(istr)[2]Description
TRUEevaluated 156 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
istr)[2]
(istr)[2]Description
TRUEevaluated 156 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
? strlen(istr) : 2) : 1) : 0) + 8 + (((
(vstr)Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
vstr)
(vstr)Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
&& (
(vstr)[0]Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
vstr)[0]
(vstr)[0]Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
) ? ((
(vstr)[1]Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
vstr)[1]
(vstr)[1]Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
? ((
(vstr)[2]Description
TRUEevaluated 186 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 8 times by 1 test
Evaluated by:
  • Self test
vstr)[2]
(vstr)[2]Description
TRUEevaluated 186 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 8 times by 1 test
Evaluated by:
  • Self test
? strlen(vstr) : 2) : 1) : 0);
0-194
463 do { if ((
(rlen) + ((elen+1)) >= rsizeDescription
TRUEnever evaluated
FALSEevaluated 194 times by 1 test
Evaluated by:
  • Self test
rlen) + ((elen+1)) >= rsize
(rlen) + ((elen+1)) >= rsizeDescription
TRUEnever evaluated
FALSEevaluated 194 times by 1 test
Evaluated by:
  • Self test
) { while ((
(rlen) + ((elen+1)) >= rsizeDescription
TRUEnever evaluated
FALSEnever evaluated
rlen) + ((elen+1)) >= rsize
(rlen) + ((elen+1)) >= rsizeDescription
TRUEnever evaluated
FALSEnever evaluated
) rsize += (rsize);
never executed: rsize += (rsize);
ret = sh_xrealloc((ret), (rsize), "assoc.c", 454); }
never executed: end of block
} while (0);
0-194
464-
465 ret[rlen++] = '[';-
466 strcpy (ret+rlen, istr);-
467 rlen += (((
(istr)Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
istr)
(istr)Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
&& (
(istr)[0]Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
istr)[0]
(istr)[0]Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
) ? ((
(istr)[1]Description
TRUEevaluated 156 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 38 times by 1 test
Evaluated by:
  • Self test
istr)[1]
(istr)[1]Description
TRUEevaluated 156 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 38 times by 1 test
Evaluated by:
  • Self test
? ((
(istr)[2]Description
TRUEevaluated 156 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
istr)[2]
(istr)[2]Description
TRUEevaluated 156 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
? strlen(istr) : 2) : 1) : 0);
0-194
468 ret[rlen++] = ']';-
469 ret[rlen++] = '=';-
470 if (vstr
vstrDescription
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
)
0-194
471 {-
472 strcpy (ret + rlen, vstr);-
473 rlen += (((
(vstr)Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
vstr)
(vstr)Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
&& (
(vstr)[0]Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
vstr)[0]
(vstr)[0]Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
) ? ((
(vstr)[1]Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
vstr)[1]
(vstr)[1]Description
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
? ((
(vstr)[2]Description
TRUEevaluated 186 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 8 times by 1 test
Evaluated by:
  • Self test
vstr)[2]
(vstr)[2]Description
TRUEevaluated 186 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 8 times by 1 test
Evaluated by:
  • Self test
? strlen(vstr) : 2) : 1) : 0);
0-194
474 }
executed 194 times by 1 test: end of block
Executed by:
  • Self test
194
475 ret[rlen++] = ' ';-
476-
477-
478 if (istr != tlist->key
istr != tlist->keyDescription
TRUEevaluated 71 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 123 times by 1 test
Evaluated by:
  • Self test
)
71-123
479 do { if (istr
istrDescription
TRUEevaluated 71 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
) sh_xfree((istr), "assoc.c", 470);
executed 71 times by 1 test: sh_xfree((istr), "assoc.c", 470);
Executed by:
  • Self test
}
executed 71 times by 1 test: end of block
Executed by:
  • Self test
while (0);
0-71
480-
481 do { if (vstr
vstrDescription
TRUEevaluated 194 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
) sh_xfree((vstr), "assoc.c", 472);
executed 194 times by 1 test: sh_xfree((vstr), "assoc.c", 472);
Executed by:
  • Self test
} while (0);
0-194
482 }
executed 194 times by 1 test: end of block
Executed by:
  • Self test
194
483-
484 do { if ((
(rlen) + (1) >= rsizeDescription
TRUEnever evaluated
FALSEevaluated 87 times by 1 test
Evaluated by:
  • Self test
rlen) + (1) >= rsize
(rlen) + (1) >= rsizeDescription
TRUEnever evaluated
FALSEevaluated 87 times by 1 test
Evaluated by:
  • Self test
) { while ((
(rlen) + (1) >= rsizeDescription
TRUEnever evaluated
FALSEnever evaluated
rlen) + (1) >= rsize
(rlen) + (1) >= rsizeDescription
TRUEnever evaluated
FALSEnever evaluated
) rsize += (8);
never executed: rsize += (8);
ret = sh_xrealloc((ret), (rsize), "assoc.c", 475); }
never executed: end of block
} while (0);
0-87
485 ret[rlen++] = ')';-
486 ret[rlen] = '\0';-
487-
488 if (quoted
quotedDescription
TRUEnever evaluated
FALSEevaluated 87 times by 1 test
Evaluated by:
  • Self test
)
0-87
489 {-
490 vstr = sh_single_quote (ret);-
491 sh_xfree((ret), "assoc.c", 482);-
492 ret = vstr;-
493 }
never executed: end of block
0
494-
495 return
executed 87 times by 1 test: return ret;
Executed by:
  • Self test
ret;
executed 87 times by 1 test: return ret;
Executed by:
  • Self test
87
496}-
497-
498static WORD_LIST *-
499assoc_to_word_list_internal (h, t)-
500 HASH_TABLE *h;-
501 int t;-
502{-
503 WORD_LIST *list;-
504 int i;-
505 BUCKET_CONTENTS *tlist;-
506 char *w;-
507-
508 if (h == 0
h == 0Description
TRUEnever evaluated
FALSEevaluated 129 times by 1 test
Evaluated by:
  • Self test
|| ((
((h)->nentries == 0)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test
FALSEevaluated 128 times by 1 test
Evaluated by:
  • Self test
h)->nentries == 0)
((h)->nentries == 0)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • Self test
FALSEevaluated 128 times by 1 test
Evaluated by:
  • Self test
)
0-129
509 return
executed 1 time by 1 test: return((WORD_LIST *) ((void *)0) );
Executed by:
  • Self test
((WORD_LIST *)
executed 1 time by 1 test: return((WORD_LIST *) ((void *)0) );
Executed by:
  • Self test
1
510 ((void *)0)
executed 1 time by 1 test: return((WORD_LIST *) ((void *)0) );
Executed by:
  • Self test
1
511 );
executed 1 time by 1 test: return((WORD_LIST *) ((void *)0) );
Executed by:
  • Self test
1
512 list = (WORD_LIST *)-
513 ((void *)0)-
514 ;-
515-
516 for (i = 0; i < h->nbuckets
i < h->nbucketsDescription
TRUEevaluated 15872 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 128 times by 1 test
Evaluated by:
  • Self test
; i++)
128-15872
517 for (tlist = ((h && (i < h->nbuckets)) ? h->bucket_array[i] : (BUCKET_CONTENTS *)-
518 ((void *)0)-
519 ); tlist
tlistDescription
TRUEevaluated 424 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 15872 times by 1 test
Evaluated by:
  • Self test
; tlist = tlist->next)
424-15872
520 {-
521 w = (
(t == 0)Description
TRUEevaluated 367 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 57 times by 1 test
Evaluated by:
  • Self test
t == 0)
(t == 0)Description
TRUEevaluated 367 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 57 times by 1 test
Evaluated by:
  • Self test
? (char *)tlist->data : (char *)tlist->key;
57-367
522 list = make_word_list (make_bare_word(w), list);-
523 }
executed 424 times by 1 test: end of block
Executed by:
  • Self test
424
524 return
executed 128 times by 1 test: return (((list && list->next) ? (WORD_LIST *)list_reverse ((GENERIC_LIST *)list) : (WORD_LIST *)(list)));
Executed by:
  • Self test
(((list && list->next) ? (WORD_LIST *)list_reverse ((GENERIC_LIST *)list) : (WORD_LIST *)(list)));
executed 128 times by 1 test: return (((list && list->next) ? (WORD_LIST *)list_reverse ((GENERIC_LIST *)list) : (WORD_LIST *)(list)));
Executed by:
  • Self test
128
525}-
526-
527WORD_LIST *-
528assoc_to_word_list (h)-
529 HASH_TABLE *h;-
530{-
531 return
executed 97 times by 1 test: return (assoc_to_word_list_internal (h, 0));
Executed by:
  • Self test
(assoc_to_word_list_internal (h, 0));
executed 97 times by 1 test: return (assoc_to_word_list_internal (h, 0));
Executed by:
  • Self test
97
532}-
533-
534WORD_LIST *-
535assoc_keys_to_word_list (h)-
536 HASH_TABLE *h;-
537{-
538 return
executed 32 times by 1 test: return (assoc_to_word_list_internal (h, 1));
Executed by:
  • Self test
(assoc_to_word_list_internal (h, 1));
executed 32 times by 1 test: return (assoc_to_word_list_internal (h, 1));
Executed by:
  • Self test
32
539}-
540-
541char *-
542assoc_to_string (h, sep, quoted)-
543 HASH_TABLE *h;-
544 char *sep;-
545 int quoted;-
546{-
547 BUCKET_CONTENTS *tlist;-
548 int i;-
549 char *result, *t, *w;-
550 WORD_LIST *list, *l;-
551-
552 if (h == 0
h == 0Description
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • Self test
)
0-20
553 return
never executed: return ((char *) ((void *)0) );
((char *)
never executed: return ((char *) ((void *)0) );
0
554 ((void *)0)
never executed: return ((char *) ((void *)0) );
0
555 );
never executed: return ((char *) ((void *)0) );
0
556 if (((
((h)->nentries == 0)Description
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • Self test
h)->nentries == 0)
((h)->nentries == 0)Description
TRUEnever evaluated
FALSEevaluated 20 times by 1 test
Evaluated by:
  • Self test
)
0-20
557 return
never executed: return ((char *)strcpy (sh_xmalloc((1 + strlen ("")), "assoc.c", 540), ("")));
((char *)strcpy (sh_xmalloc((1 + strlen ("")), "assoc.c", 540), ("")));
never executed: return ((char *)strcpy (sh_xmalloc((1 + strlen ("")), "assoc.c", 540), ("")));
0
558-
559 result = -
560 ((void *)0)-
561 ;-
562 l = list = -
563 ((void *)0)-
564 ;-
565-
566-
567-
568 for (i = 0; i < h->nbuckets
i < h->nbucketsDescription
TRUEevaluated 2560 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 20 times by 1 test
Evaluated by:
  • Self test
; i++)
20-2560
569 for (tlist = ((h && (i < h->nbuckets)) ? h->bucket_array[i] : (BUCKET_CONTENTS *)-
570 ((void *)0)-
571 ); tlist
tlistDescription
TRUEevaluated 88 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 2560 times by 1 test
Evaluated by:
  • Self test
; tlist = tlist->next)
88-2560
572 {-
573 w = (char *)tlist->data;-
574 if (w == 0
w == 0Description
TRUEnever evaluated
FALSEevaluated 88 times by 1 test
Evaluated by:
  • Self test
)
0-88
575 continue;
never executed: continue;
0
576 t = quoted
quotedDescription
TRUEnever evaluated
FALSEevaluated 88 times by 1 test
Evaluated by:
  • Self test
? quote_string (w) : (char *)strcpy (sh_xmalloc((1 + strlen (w)), "assoc.c", 553), (w));
0-88
577 list = make_word_list (make_bare_word(t), list);-
578 do { if (t
tDescription
TRUEevaluated 88 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
) sh_xfree((t), "assoc.c", 555);
executed 88 times by 1 test: sh_xfree((t), "assoc.c", 555);
Executed by:
  • Self test
} while (0);
0-88
579 }
executed 88 times by 1 test: end of block
Executed by:
  • Self test
88
580-
581 l = ((list
listDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
&& list->next
list->nextDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
) ? (WORD_LIST *)list_reverse ((GENERIC_LIST *)list) : (WORD_LIST *)(list));
0-20
582-
583 result = l
lDescription
TRUEevaluated 20 times by 1 test
Evaluated by:
  • Self test
FALSEnever evaluated
? string_list_internal (l, sep) : (char *)strcpy (sh_xmalloc((1 + strlen ("")), "assoc.c", 560), (""));
0-20
584 dispose_words (l);-
585-
586 return
executed 20 times by 1 test: return result;
Executed by:
  • Self test
result;
executed 20 times by 1 test: return result;
Executed by:
  • Self test
20
587}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2