OpenCoverage

tac.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/src/tac.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5static char const *separator;-
6-
7-
8static -
9 _Bool -
10 have_read_stdin = -
11 0-
12 ;-
13-
14-
15-
16static -
17 _Bool -
18 separator_ends_record;-
19-
20-
21-
22-
23static size_t sentinel_length;-
24-
25-
26-
27-
28static size_t match_length;-
29-
30-
31static char *G_buffer;-
32-
33-
34static size_t read_size;-
35-
36-
37-
38-
39static size_t G_buffer_size;-
40-
41-
42static struct re_pattern_buffer compiled_separator;-
43static char compiled_separator_fastmap[-
44 (0x7f * 2 + 1) -
45 + 1];-
46static struct re_registers regs;-
47-
48static struct option const longopts[] =-
49{-
50 {"before", -
51 0-
52 , -
53 ((void *)0)-
54 , 'b'},-
55 {"regex", -
56 0-
57 , -
58 ((void *)0)-
59 , 'r'},-
60 {"separator", -
61 1-
62 , -
63 ((void *)0)-
64 , 's'},-
65 {"help", -
66 0-
67 , -
68 ((void *)0)-
69 , GETOPT_HELP_CHAR},-
70 {"version", -
71 0-
72 , -
73 ((void *)0)-
74 , GETOPT_VERSION_CHAR},-
75 {-
76 ((void *)0)-
77 , 0, -
78 ((void *)0)-
79 , 0}-
80};-
81-
82void-
83usage (int status)-
84{-
85 if (status !=
status != 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tac
3-9
86 0
status != 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tac
3-9
87 )-
88 do { fprintf (-
89 stderr-
90 , -
91 dcgettext (((void *)0), -
92 "Try '%s --help' for more information.\n"-
93 , 5)-
94 , program_name); }
executed 3 times by 1 test: end of block
Executed by:
  • tac
while (0);
3
95 else-
96 {-
97 printf (-
98 dcgettext (((void *)0), -
99 "Usage: %s [OPTION]... [FILE]...\n"-
100 , 5)-
101-
102 -
103 ,-
104 program_name);-
105 fputs_unlocked (-
106 dcgettext (((void *)0), -
107 "Write each FILE to standard output, last line first.\n"-
108 , 5)-
109 ,-
110 stdout-
111 )-
112-
113 ;-
114-
115 emit_stdin_note ();-
116 emit_mandatory_arg_note ();-
117-
118 fputs_unlocked (-
119 dcgettext (((void *)0), -
120 " -b, --before attach the separator before instead of after\n -r, --regex interpret the separator as a regular expression\n -s, --separator=STRING use STRING as the separator instead of newline\n"-
121 , 5)-
122 ,-
123 stdout-
124 )-
125-
126-
127-
128 ;-
129 fputs_unlocked (-
130 dcgettext (((void *)0), -
131 " --help display this help and exit\n"-
132 , 5)-
133 ,-
134 stdout-
135 );-
136 fputs_unlocked (-
137 dcgettext (((void *)0), -
138 " --version output version information and exit\n"-
139 , 5)-
140 ,-
141 stdout-
142 );-
143 emit_ancillary_info ("tac");-
144 }
executed 9 times by 1 test: end of block
Executed by:
  • tac
9
145 exit (status);
executed 12 times by 1 test: exit (status);
Executed by:
  • tac
12
146}-
147-
148-
149-
150-
151static void-
152output (const char *start, const char *past_end)-
153{-
154 static char buffer[8192];-
155 static size_t bytes_in_buffer = 0;-
156 size_t bytes_to_add = past_end - start;-
157 size_t bytes_available = 8192 - bytes_in_buffer;-
158-
159 if (start == 0
start == 0Description
TRUEevaluated 167 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 4453 times by 1 test
Evaluated by:
  • tac
)
167-4453
160 {-
161 -
162 (__extension__ ((__builtin_constant_p (-
163 1-
164 ) && __builtin_constant_p (-
165 bytes_in_buffer-
166 ) && (size_t) (-
167 1-
168 ) * (size_t) (-
169 bytes_in_buffer-
170 ) <= 8 && (size_t) (-
171 1-
172 ) != 0) ? ({ const char *__ptr = (const char *) (-
173 buffer-
174 ); FILE *__stream = (stdout); size_t __cnt; for (__cnt = (size_t) (-
175 1-
176 ) * (size_t) (-
177 bytes_in_buffer-
178 ); __cnt > 0
__cnt > 0Description
TRUEnever evaluated
FALSEnever evaluated
; --__cnt) if ((
(__builtin_exp...r++))) == (-1)Description
TRUEnever evaluated
FALSEnever evaluated
__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0)
__builtin_expe...write_end), 0)Description
TRUEnever evaluated
FALSEnever evaluated
? __overflow (__stream, (unsigned char) (*__ptr++)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (*__ptr++))) == (-1)
(__builtin_exp...r++))) == (-1)Description
TRUEnever evaluated
FALSEnever evaluated
) break;
never executed: break;
((size_t) (
0
179 1-
180 ) * (size_t) (-
181 bytes_in_buffer-
182 ) - __cnt) / (size_t) (-
183 1-
184 ); }) : (((__builtin_constant_p (-
185 1-
186 ) && (size_t) (-
187 1-
188 ) == 0) || (__builtin_constant_p (-
189 bytes_in_buffer-
190 ) && (size_t) (-
191 bytes_in_buffer-
192 ) == 0)) ? ((void) (-
193 buffer-
194 ), (void) (stdout), (void) (-
195 1-
196 ), (void) (-
197 bytes_in_buffer-
198 ), (size_t) 0) : fwrite_unlocked (-
199 buffer-
200 , -
201 1-
202 , -
203 bytes_in_buffer-
204 , stdout))))-
205 ;-
206 bytes_in_buffer = 0;-
207 return;
executed 167 times by 1 test: return;
Executed by:
  • tac
167
208 }-
209-
210-
211 while (bytes_to_add >= bytes_available
bytes_to_add >...ytes_availableDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 4453 times by 1 test
Evaluated by:
  • tac
)
8-4453
212 {-
213 memcpy (buffer + bytes_in_buffer, start, bytes_available);-
214 bytes_to_add -= bytes_available;-
215 start += bytes_available;-
216 -
217 (__extension__ ((__builtin_constant_p (-
218 1-
219 ) && __builtin_constant_p (-
220 8192-
221 ) && (size_t) (-
222 1-
223 ) * (size_t) (-
224 8192-
225 ) <= 8 && (size_t) (-
226 1-
227 ) != 0) ? ({ const char *__ptr = (const char *) (-
228 buffer-
229 ); FILE *__stream = (stdout); size_t __cnt; for (__cnt = (size_t) (-
230 1-
231 ) * (size_t) (-
232 8192-
233 ); __cnt > 0
__cnt > 0Description
TRUEnever evaluated
FALSEnever evaluated
; --__cnt) if ((
(__builtin_exp...r++))) == (-1)Description
TRUEnever evaluated
FALSEnever evaluated
__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0)
__builtin_expe...write_end), 0)Description
TRUEnever evaluated
FALSEnever evaluated
? __overflow (__stream, (unsigned char) (*__ptr++)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (*__ptr++))) == (-1)
(__builtin_exp...r++))) == (-1)Description
TRUEnever evaluated
FALSEnever evaluated
) break;
never executed: break;
((size_t) (
0
234 1-
235 ) * (size_t) (-
236 8192-
237 ) - __cnt) / (size_t) (-
238 1-
239 ); }) : (((__builtin_constant_p (-
240 1-
241 ) && (size_t) (-
242 1-
243 ) == 0) || (__builtin_constant_p (-
244 8192-
245 ) && (size_t) (-
246 8192-
247 ) == 0)) ? ((void) (-
248 buffer-
249 ), (void) (stdout), (void) (-
250 1-
251 ), (void) (-
252 8192-
253 ), (size_t) 0) : fwrite_unlocked (-
254 buffer-
255 , -
256 1-
257 , -
258 8192-
259 , stdout))))-
260 ;-
261 bytes_in_buffer = 0;-
262 bytes_available = 8192;-
263 }
executed 8 times by 1 test: end of block
Executed by:
  • tac
8
264-
265 memcpy (buffer + bytes_in_buffer, start, bytes_to_add);-
266 bytes_in_buffer += bytes_to_add;-
267}
executed 4453 times by 1 test: end of block
Executed by:
  • tac
4453
268-
269-
270-
271-
272-
273static -
274 _Bool-
275-
276tac_seekable (int input_fd, const char *file, off_t file_pos)-
277{-
278-
279-
280 char *match_start;-
281-
282-
283-
284 char *past_end;-
285-
286-
287 size_t saved_record_size;-
288-
289-
290-
291 -
292 _Bool -
293 first_time = -
294 1-
295 ;-
296 char first_char = *separator;-
297 char const *separator1 = separator + 1;-
298 size_t match_length1 = match_length - 1;-
299-
300-
301-
302-
303-
304-
305 size_t remainder = file_pos % read_size;-
306 if (remainder != 0
remainder != 0Description
TRUEevaluated 161 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tac
)
7-161
307 {-
308 file_pos -= remainder;-
309 if (lseek (input_fd, file_pos,
lseek (input_f...e_pos, 0 ) < 0Description
TRUEnever evaluated
FALSEevaluated 161 times by 1 test
Evaluated by:
  • tac
0-161
310 0
lseek (input_f...e_pos, 0 ) < 0Description
TRUEnever evaluated
FALSEevaluated 161 times by 1 test
Evaluated by:
  • tac
0-161
311 ) < 0
lseek (input_f...e_pos, 0 ) < 0Description
TRUEnever evaluated
FALSEevaluated 161 times by 1 test
Evaluated by:
  • tac
)
0-161
312 error (0,
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
313 (*__errno_location ())
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
314 ,
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
315 dcgettext (((void *)0),
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
316 "%s: seek failed"
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
317 , 5)
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
318 , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
319 }
executed 161 times by 1 test: end of block
Executed by:
  • tac
161
320-
321-
322-
323 while ((
(saved_record_...ad_size)) == 0Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 161 times by 1 test
Evaluated by:
  • tac
saved_record_size = safe_read (input_fd, G_buffer, read_size)) == 0
(saved_record_...ad_size)) == 0Description
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 161 times by 1 test
Evaluated by:
  • tac
7-161
324 && file_pos != 0
file_pos != 0Description
TRUEnever evaluated
FALSEevaluated 7 times by 1 test
Evaluated by:
  • tac
)
0-7
325 {-
326 off_t rsize = read_size;-
327 if (lseek (input_fd, -rsize,
lseek (input_f...rsize, 1 ) < 0Description
TRUEnever evaluated
FALSEnever evaluated
0
328 1
lseek (input_f...rsize, 1 ) < 0Description
TRUEnever evaluated
FALSEnever evaluated
0
329 ) < 0
lseek (input_f...rsize, 1 ) < 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
330 error (0,
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
331 (*__errno_location ())
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
332 ,
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
333 dcgettext (((void *)0),
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
334 "%s: seek failed"
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
335 , 5)
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
336 , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
337 file_pos -= read_size;-
338 }
never executed: end of block
0
339-
340-
341 while (saved_record_size == read_size
saved_record_size == read_sizeDescription
TRUEnever evaluated
FALSEevaluated 168 times by 1 test
Evaluated by:
  • tac
)
0-168
342 {-
343 size_t nread = safe_read (input_fd, G_buffer, read_size);-
344 if (nread == 0
nread == 0Description
TRUEnever evaluated
FALSEnever evaluated
)
0
345 break;
never executed: break;
0
346 saved_record_size = nread;-
347 if (saved_record_size == ((size_t) -1)
saved_record_s... ((size_t) -1)Description
TRUEnever evaluated
FALSEnever evaluated
)
0
348 break;
never executed: break;
0
349 file_pos += nread;-
350 }
never executed: end of block
0
351-
352 if (saved_record_size == ((size_t) -1)
saved_record_s... ((size_t) -1)Description
TRUEnever evaluated
FALSEevaluated 168 times by 1 test
Evaluated by:
  • tac
)
0-168
353 {-
354 error (0, -
355 (*__errno_location ())-
356 , -
357 dcgettext (((void *)0), -
358 "%s: read error"-
359 , 5)-
360 , quotearg_n_style_colon (0, shell_escape_quoting_style, file));-
361 return
never executed: return 0 ;
never executed: return 0 ;
0
362 0
never executed: return 0 ;
0
363 ;
never executed: return 0 ;
0
364 }-
365-
366 match_start = past_end = G_buffer + saved_record_size;-
367-
368 if (sentinel_length
sentinel_lengthDescription
TRUEevaluated 152 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 16 times by 1 test
Evaluated by:
  • tac
)
16-152
369 match_start -= match_length1;
executed 152 times by 1 test: match_start -= match_length1;
Executed by:
  • tac
152
370-
371 while (-
372 1-
373 )-
374 {-
375-
376-
377-
378-
379-
380-
381 if (sentinel_length == 0
sentinel_length == 0Description
TRUEevaluated 85 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 4510 times by 1 test
Evaluated by:
  • tac
)
85-4510
382 {-
383 size_t i = match_start - G_buffer;-
384 regoff_t ri = i;-
385 regoff_t range = 1 - ri;-
386 regoff_t ret;-
387-
388 if (1 < range
1 < rangeDescription
TRUEnever evaluated
FALSEevaluated 85 times by 1 test
Evaluated by:
  • tac
)
0-85
389 ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
!!sizeof (struct { _Static_assert (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
390 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
391 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
392 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
393 , 0,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
394 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
395 "record too large"
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
396 , 5)
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
397 ), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
398 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
399 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
400 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
401 , 0,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
402 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
403 "record too large"
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
404 , 5)
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
405 ), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
406 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
407 ) ? (void) 0 : __builtin_unreachable ()))));
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"record too large\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "record too large" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
408-
409 if (range == 1
range == 1Description
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 79 times by 1 test
Evaluated by:
  • tac
6-79
410 || ((
((ret = re_sea...&regs)) == -1)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 69 times by 1 test
Evaluated by:
  • tac
ret = re_search (&compiled_separator, G_buffer,
((ret = re_sea...&regs)) == -1)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 69 times by 1 test
Evaluated by:
  • tac
10-69
411 i, i - 1, range, &regs))
((ret = re_sea...&regs)) == -1)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 69 times by 1 test
Evaluated by:
  • tac
10-69
412 == -1)
((ret = re_sea...&regs)) == -1)Description
TRUEevaluated 10 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 69 times by 1 test
Evaluated by:
  • tac
)
10-69
413 match_start = G_buffer - 1;
executed 16 times by 1 test: match_start = G_buffer - 1;
Executed by:
  • tac
16
414 else if (ret == -2
ret == -2Description
TRUEnever evaluated
FALSEevaluated 69 times by 1 test
Evaluated by:
  • tac
)
0-69
415 {-
416 ((!!sizeof (struct { _Static_assert (-
417 1-
418 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"error in regular expression search\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error (-
419 1-
420 , 0, -
421 dcgettext (((void *)0), -
422 "error in regular expression search"-
423 , 5)-
424 ), ((-
425 0-
426 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (-
427 1-
428 , 0, -
429 dcgettext (((void *)0), -
430 "error in regular expression search"-
431 , 5)-
432 ), ((-
433 0-
434 ) ? (void) 0 : __builtin_unreachable ()))))-
435 ;-
436 }
never executed: end of block
0
437 else-
438 {-
439 match_start = G_buffer + regs.start[0];-
440 match_length = regs.end[0] - regs.start[0];-
441 }
executed 69 times by 1 test: end of block
Executed by:
  • tac
69
442 }-
443 else-
444 {-
445-
446 while (*--
*--match_start != first_charDescription
TRUEevaluated 66407 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 4510 times by 1 test
Evaluated by:
  • tac
match_start != first_char
*--match_start != first_charDescription
TRUEevaluated 66407 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 4510 times by 1 test
Evaluated by:
  • tac
4510-66407
447 || (match_length1
match_length1Description
TRUEnever evaluated
FALSEevaluated 4510 times by 1 test
Evaluated by:
  • tac
&& !(
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0-4510
448 (__extension__ (__builtin_constant_p (
__builtin_cons...atch_length1 )Description
TRUEnever evaluated
FALSEnever evaluated
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
449 match_length1
__builtin_cons...atch_length1 )Description
TRUEnever evaluated
FALSEnever evaluated
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
450 )
__builtin_cons...atch_length1 )Description
TRUEnever evaluated
FALSEnever evaluated
&& ((__builtin_constant_p (
__builtin_cons...ch_start + 1 )Description
TRUEnever evaluated
FALSEnever evaluated
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
451 match_start + 1
__builtin_cons...ch_start + 1 )Description
TRUEnever evaluated
FALSEnever evaluated
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
452 )
__builtin_cons...ch_start + 1 )Description
TRUEnever evaluated
FALSEnever evaluated
&& strlen (
strlen ( match...tch_length1 ))Description
TRUEnever evaluated
FALSEnever evaluated
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
453 match_start + 1
strlen ( match...tch_length1 ))Description
TRUEnever evaluated
FALSEnever evaluated
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
454 ) < ((size_t) (
strlen ( match...tch_length1 ))Description
TRUEnever evaluated
FALSEnever evaluated
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
455 match_length1
strlen ( match...tch_length1 ))Description
TRUEnever evaluated
FALSEnever evaluated
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
456 ))
strlen ( match...tch_length1 ))Description
TRUEnever evaluated
FALSEnever evaluated
) || (__builtin_constant_p (
__builtin_cons...( separator1 )Description
TRUEnever evaluated
FALSEnever evaluated
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
457 separator1
__builtin_cons...( separator1 )Description
TRUEnever evaluated
FALSEnever evaluated
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
458 )
__builtin_cons...( separator1 )Description
TRUEnever evaluated
FALSEnever evaluated
&& strlen (
strlen ( separ...tch_length1 ))Description
TRUEnever evaluated
FALSEnever evaluated
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
459 separator1
strlen ( separ...tch_length1 ))Description
TRUEnever evaluated
FALSEnever evaluated
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
460 ) < ((size_t) (
strlen ( separ...tch_length1 ))Description
TRUEnever evaluated
FALSEnever evaluated
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
461 match_length1
strlen ( separ...tch_length1 ))Description
TRUEnever evaluated
FALSEnever evaluated
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
462 ))
strlen ( separ...tch_length1 ))Description
TRUEnever evaluated
FALSEnever evaluated
)) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
463 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
464 ) && __builtin_constant_p (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
465 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
466 ) && (__s1_len = __builtin_strlen (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
467 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
468 ), __s2_len = __builtin_strlen (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
469 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
470 ), (!((size_t)(const void *)((
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
471 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
472 ) + 1) - (size_t)(const void *)(
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
473 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
474 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
475 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
476 ) + 1) - (size_t)(const void *)(
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
477 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
478 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
479 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
480 ,
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
481 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
482 ) : (__builtin_constant_p (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
483 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
484 ) && ((size_t)(const void *)((
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
485 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
486 ) + 1) - (size_t)(const void *)(
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
487 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
488 ) == 1) && (__s1_len = __builtin_strlen (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
489 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
490 ), __s1_len < 4) ? (__builtin_constant_p (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
491 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
492 ) && ((size_t)(const void *)((
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
493 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
494 ) + 1) - (size_t)(const void *)(
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
495 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
496 ) == 1) ? __builtin_strcmp (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
497 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
498 ,
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
499 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
500 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
501 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
502 ); int __result = (((const unsigned char *) (const char *) (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
503 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
504 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
505 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
506 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
507 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
508 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( match_start + 1 ))[3] - __s2[3]);
0
509 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( match_start + 1 ))[3] - __s2[3]);
0
510 ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
511 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
512 ) && ((size_t)(const void *)((
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
513 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
514 ) + 1) - (size_t)(const void *)(
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
515 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
516 ) == 1) && (__s2_len = __builtin_strlen (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
517 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
518 ), __s2_len < 4) ? (__builtin_constant_p (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
519 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
520 ) && ((size_t)(const void *)((
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
521 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
522 ) + 1) - (size_t)(const void *)(
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
523 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
524 ) == 1) ? __builtin_strcmp (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
525 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
526 ,
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
527 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
528 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
529 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
530 ); int __result = (((const unsigned char *) (const char *) (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
531 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
532 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
533 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
534 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
535 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
536 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( separator1 ))[3] - __s2[3]);
0
537 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
never executed: __result = (((const unsigned char *) (const char *) ( separator1 ))[3] - __s2[3]);
0
538 ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
539 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
540 ,
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
541 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
542 )))); }) : strncmp (
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
543 match_start + 1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
544 ,
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
545 separator1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
546 ,
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
547 match_length1
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
548 )))
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
549 == 0)
!( (__extensio...gth1 ))) == 0)Description
TRUEnever evaluated
FALSEnever evaluated
0
550 ))-
551 ;
executed 66407 times by 1 test: ;
Executed by:
  • tac
66407
552 }
executed 4510 times by 1 test: end of block
Executed by:
  • tac
4510
553-
554-
555-
556 if (match_start < G_buffer
match_start < G_bufferDescription
TRUEevaluated 176 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 4419 times by 1 test
Evaluated by:
  • tac
)
176-4419
557 {-
558 if (file_pos == 0
file_pos == 0Description
TRUEevaluated 168 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tac
)
8-168
559 {-
560-
561 output (G_buffer, past_end);-
562 return
executed 168 times by 1 test: return 1 ;
Executed by:
  • tac
executed 168 times by 1 test: return 1 ;
Executed by:
  • tac
168
563 1
executed 168 times by 1 test: return 1 ;
Executed by:
  • tac
168
564 ;
executed 168 times by 1 test: return 1 ;
Executed by:
  • tac
168
565 }-
566-
567 saved_record_size = past_end - G_buffer;-
568 if (saved_record_size > read_size
saved_record_size > read_sizeDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tac
)
3-5
569 {-
570-
571-
572-
573-
574 char *newbuffer;-
575 size_t offset = sentinel_length
sentinel_lengthDescription
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tac
FALSEnever evaluated
? sentinel_length : 1;
0-3
576 size_t old_G_buffer_size = G_buffer_size;-
577-
578 read_size *= 2;-
579 G_buffer_size = read_size * 2 + sentinel_length + 2;-
580 if (G_buffer_size < old_G_buffer_size
G_buffer_size ..._G_buffer_sizeDescription
TRUEnever evaluated
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tac
)
0-3
581 xalloc_die ();
never executed: xalloc_die ();
0
582 newbuffer = xrealloc (G_buffer - offset, G_buffer_size);-
583 newbuffer += offset;-
584 G_buffer = newbuffer;-
585 }
executed 3 times by 1 test: end of block
Executed by:
  • tac
3
586-
587-
588 if (file_pos >= read_size
file_pos >= read_sizeDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tac
)
3-5
589 file_pos -= read_size;
executed 5 times by 1 test: file_pos -= read_size;
Executed by:
  • tac
5
590 else-
591 {-
592 read_size = file_pos;-
593 file_pos = 0;-
594 }
executed 3 times by 1 test: end of block
Executed by:
  • tac
3
595 if (lseek (input_fd, file_pos,
lseek (input_f...e_pos, 0 ) < 0Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tac
0-8
596 0
lseek (input_f...e_pos, 0 ) < 0Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tac
0-8
597 ) < 0
lseek (input_f...e_pos, 0 ) < 0Description
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tac
)
0-8
598 error (0,
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
599 (*__errno_location ())
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
600 ,
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
601 dcgettext (((void *)0),
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
602 "%s: seek failed"
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
603 , 5)
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
604 , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
never executed: error (0, (*__errno_location ()) , dcgettext (((void *)0), "%s: seek failed" , 5) , quotearg_n_style_colon (0, shell_escape_quoting_style, file));
0
605-
606-
607-
608 memmove (G_buffer + read_size, G_buffer, saved_record_size);-
609 past_end = G_buffer + read_size + saved_record_size;-
610-
611 if (sentinel_length
sentinel_lengthDescription
TRUEevaluated 8 times by 1 test
Evaluated by:
  • tac
FALSEnever evaluated
)
0-8
612 match_start = G_buffer + read_size;
executed 8 times by 1 test: match_start = G_buffer + read_size;
Executed by:
  • tac
8
613 else-
614 match_start = past_end;
never executed: match_start = past_end;
0
615-
616 if (safe_read (input_fd, G_buffer, read_size) != read_size
safe_read (inp...) != read_sizeDescription
TRUEnever evaluated
FALSEevaluated 8 times by 1 test
Evaluated by:
  • tac
)
0-8
617 {-
618 error (0, -
619 (*__errno_location ())-
620 , -
621 dcgettext (((void *)0), -
622 "%s: read error"-
623 , 5)-
624 , quotearg_n_style_colon (0, shell_escape_quoting_style, file));-
625 return
never executed: return 0 ;
never executed: return 0 ;
0
626 0
never executed: return 0 ;
0
627 ;
never executed: return 0 ;
0
628 }-
629 }
executed 8 times by 1 test: end of block
Executed by:
  • tac
8
630 else-
631 {-
632-
633 if (separator_ends_record
separator_ends_recordDescription
TRUEevaluated 4368 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 51 times by 1 test
Evaluated by:
  • tac
)
51-4368
634 {-
635 char *match_end = match_start + match_length;-
636-
637-
638-
639 if (!first_time
!first_timeDescription
TRUEevaluated 4228 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 140 times by 1 test
Evaluated by:
  • tac
|| match_end != past_end
match_end != past_endDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 134 times by 1 test
Evaluated by:
  • tac
)
6-4228
640 output (match_end, past_end);
executed 4234 times by 1 test: output (match_end, past_end);
Executed by:
  • tac
4234
641 past_end = match_end;-
642 first_time = -
643 0-
644 ;-
645 }
executed 4368 times by 1 test: end of block
Executed by:
  • tac
4368
646 else-
647 {-
648 output (match_start, past_end);-
649 past_end = match_start;-
650 }
executed 51 times by 1 test: end of block
Executed by:
  • tac
51
651-
652-
653 if (sentinel_length > 0
sentinel_length > 0Description
TRUEevaluated 4350 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 69 times by 1 test
Evaluated by:
  • tac
)
69-4350
654 match_start -= match_length - 1;
executed 4350 times by 1 test: match_start -= match_length - 1;
Executed by:
  • tac
4350
655 }
executed 4419 times by 1 test: end of block
Executed by:
  • tac
4419
656 }-
657}
never executed: end of block
0
658static void-
659record_or_unlink_tempfile (char const *fn, FILE *fp __attribute__ ((__unused__)))-
660{-
661 unlink (fn);-
662}
executed 104 times by 1 test: end of block
Executed by:
  • tac
104
663-
664-
665-
666-
667-
668-
669static -
670 _Bool-
671-
672temp_stream (FILE **fp, char **file_name)-
673{-
674 static char *tempfile = -
675 ((void *)0)-
676 ;-
677 static FILE *tmp_fp;-
678 if (tempfile ==
tempfile == ((void *)0)Description
TRUEevaluated 105 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tac
2-105
679 ((void *)0)
tempfile == ((void *)0)Description
TRUEevaluated 105 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tac
2-105
680 )-
681 {-
682 char const *t = getenv ("TMPDIR");-
683 char const *tempdir = t
tDescription
TRUEevaluated 105 times by 1 test
Evaluated by:
  • tac
FALSEnever evaluated
? t : "/tmp";
0-105
684 tempfile = mfile_name_concat (tempdir, "tacXXXXXX", -
685 ((void *)0)-
686 );-
687 if (tempdir ==
tempdir == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 105 times by 1 test
Evaluated by:
  • tac
0-105
688 ((void *)0)
tempdir == ((void *)0)Description
TRUEnever evaluated
FALSEevaluated 105 times by 1 test
Evaluated by:
  • tac
0-105
689 )-
690 {-
691 error (0, 0, -
692 dcgettext (((void *)0), -
693 "memory exhausted"-
694 , 5)-
695 );-
696 return
never executed: return 0 ;
never executed: return 0 ;
0
697 0
never executed: return 0 ;
0
698 ;
never executed: return 0 ;
0
699 }-
700 int fd = mkstemp_safer (tempfile);-
701 if (fd < 0
fd < 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tac
FALSEevaluated 104 times by 1 test
Evaluated by:
  • tac
)
1-104
702 {-
703 error (0, -
704 (*__errno_location ())-
705 , -
706 dcgettext (((void *)0), -
707 "failed to create temporary file in %s"-
708 , 5)-
709 ,-
710 quotearg_style (shell_escape_always_quoting_style, tempdir));-
711 goto
executed 1 time by 1 test: goto Reset;
Executed by:
  • tac
Reset;
executed 1 time by 1 test: goto Reset;
Executed by:
  • tac
1
712 }-
713-
714 tmp_fp = fdopen (fd, (-
715 0 -
716 ? "w+b" : "w+"));-
717 if (! tmp_fp
! tmp_fpDescription
TRUEnever evaluated
FALSEevaluated 104 times by 1 test
Evaluated by:
  • tac
)
0-104
718 {-
719 error (0, -
720 (*__errno_location ())-
721 , -
722 dcgettext (((void *)0), -
723 "failed to open %s for writing"-
724 , 5)-
725 ,-
726 quotearg_style (shell_escape_always_quoting_style, tempfile));-
727 close (fd);-
728 unlink (tempfile);-
729 Reset:
code before this statement never executed: Reset:
0
730 free (tempfile);-
731 tempfile = -
732 ((void *)0)-
733 ;-
734 return
executed 1 time by 1 test: return 0 ;
Executed by:
  • tac
executed 1 time by 1 test: return 0 ;
Executed by:
  • tac
1
735 0
executed 1 time by 1 test: return 0 ;
Executed by:
  • tac
1
736 ;
executed 1 time by 1 test: return 0 ;
Executed by:
  • tac
1
737 }-
738-
739 record_or_unlink_tempfile (tempfile, tmp_fp);-
740 }
executed 104 times by 1 test: end of block
Executed by:
  • tac
104
741 else-
742 {-
743 clearerr_unlocked (tmp_fp);-
744 if (-
745 rpl_fseeko
rpl_fseeko (tmp_fp, 0, 0 ) < 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tac
0-2
746 (tmp_fp, 0,
rpl_fseeko (tmp_fp, 0, 0 ) < 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tac
0-2
747 0
rpl_fseeko (tmp_fp, 0, 0 ) < 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tac
0-2
748 ) < 0
rpl_fseeko (tmp_fp, 0, 0 ) < 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tac
0-2
749 || ftruncate (fileno (tmp_fp), 0) < 0
ftruncate (fil...mp_fp), 0) < 0Description
TRUEnever evaluated
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tac
)
0-2
750 {-
751 error (0, -
752 (*__errno_location ())-
753 , -
754 dcgettext (((void *)0), -
755 "failed to rewind stream for %s"-
756 , 5)-
757 ,-
758 quotearg_style (shell_escape_always_quoting_style, tempfile));-
759 return
never executed: return 0 ;
never executed: return 0 ;
0
760 0
never executed: return 0 ;
0
761 ;
never executed: return 0 ;
0
762 }-
763 }
executed 2 times by 1 test: end of block
Executed by:
  • tac
2
764-
765 *fp = tmp_fp;-
766 *file_name = tempfile;-
767 return
executed 106 times by 1 test: return 1 ;
Executed by:
  • tac
executed 106 times by 1 test: return 1 ;
Executed by:
  • tac
106
768 1
executed 106 times by 1 test: return 1 ;
Executed by:
  • tac
106
769 ;
executed 106 times by 1 test: return 1 ;
Executed by:
  • tac
106
770}-
771-
772-
773-
774-
775-
776static off_t-
777copy_to_temp (FILE **g_tmp, char **g_tempfile, int input_fd, char const *file)-
778{-
779 FILE *fp;-
780 char *file_name;-
781 uintmax_t bytes_copied = 0;-
782 if (!temp_stream (&fp, &file_name)
!temp_stream (&fp, &file_name)Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tac
FALSEevaluated 106 times by 1 test
Evaluated by:
  • tac
)
1-106
783 return
executed 1 time by 1 test: return -1;
Executed by:
  • tac
-1;
executed 1 time by 1 test: return -1;
Executed by:
  • tac
1
784-
785 while (1)-
786 {-
787 size_t bytes_read = safe_read (input_fd, G_buffer, read_size);-
788 if (bytes_read == 0
bytes_read == 0Description
TRUEevaluated 104 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 105 times by 1 test
Evaluated by:
  • tac
)
104-105
789 break;
executed 104 times by 1 test: break;
Executed by:
  • tac
104
790 if (bytes_read == ((size_t) -1)
bytes_read == ((size_t) -1)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
)
2-103
791 {-
792 error (0, -
793 (*__errno_location ())-
794 , -
795 dcgettext (((void *)0), -
796 "%s: read error"-
797 , 5)-
798 , quotearg_n_style_colon (0, shell_escape_quoting_style, file));-
799 return
executed 2 times by 1 test: return -1;
Executed by:
  • tac
-1;
executed 2 times by 1 test: return -1;
Executed by:
  • tac
2
800 }-
801-
802 if (-
803 (
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
__extension__ ((__builtin_constant_p (
__builtin_constant_p ( 1 )Description
TRUEevaluated 103 times by 1 test
Evaluated by:
  • tac
FALSEnever evaluated
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
804 1
__builtin_constant_p ( 1 )Description
TRUEevaluated 103 times by 1 test
Evaluated by:
  • tac
FALSEnever evaluated
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
805 )
__builtin_constant_p ( 1 )Description
TRUEevaluated 103 times by 1 test
Evaluated by:
  • tac
FALSEnever evaluated
&& __builtin_constant_p (
__builtin_cons...( bytes_read )Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
806 bytes_read
__builtin_cons...( bytes_read )Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
807 )
__builtin_cons...( bytes_read )Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
&& (
(size_t) ( 1 )...es_read ) <= 8Description
TRUEnever evaluated
FALSEnever evaluated
size_t) (
(size_t) ( 1 )...es_read ) <= 8Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
808 1
(size_t) ( 1 )...es_read ) <= 8Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
809 ) * (size_t) (
(size_t) ( 1 )...es_read ) <= 8Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
810 bytes_read
(size_t) ( 1 )...es_read ) <= 8Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
811 ) <= 8
(size_t) ( 1 )...es_read ) <= 8Description
TRUEnever evaluated
FALSEnever evaluated
&& (
(size_t) ( 1 ) != 0Description
TRUEnever evaluated
FALSEnever evaluated
size_t) (
(size_t) ( 1 ) != 0Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
812 1
(size_t) ( 1 ) != 0Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
813 ) != 0
(size_t) ( 1 ) != 0Description
TRUEnever evaluated
FALSEnever evaluated
) ? ({ const char *__ptr = (const char *) (
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
814 G_buffer
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
815 ); FILE *__stream = (
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
816 fp
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
817 ); size_t __cnt; for (__cnt = (size_t) (
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
818 1
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
819 ) * (size_t) (
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
820 bytes_read
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
821 ); __cnt > 0
__cnt > 0Description
TRUEnever evaluated
FALSEnever evaluated
; --__cnt) if ((
(__builtin_exp...r++))) == (-1)Description
TRUEnever evaluated
FALSEnever evaluated
__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0)
__builtin_expe...write_end), 0)Description
TRUEnever evaluated
FALSEnever evaluated
? __overflow (__stream, (unsigned char) (*__ptr++)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (*__ptr++))) == (-1)
(__builtin_exp...r++))) == (-1)Description
TRUEnever evaluated
FALSEnever evaluated
) break;
never executed: break;
((size_t) (
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
822 1
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
823 ) * (size_t) (
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
824 bytes_read
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
825 ) - __cnt) / (size_t) (
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
826 1
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
827 ); }) : (((__builtin_constant_p (
__builtin_constant_p ( 1 )Description
TRUEevaluated 103 times by 1 test
Evaluated by:
  • tac
FALSEnever evaluated
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
828 1
__builtin_constant_p ( 1 )Description
TRUEevaluated 103 times by 1 test
Evaluated by:
  • tac
FALSEnever evaluated
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
829 )
__builtin_constant_p ( 1 )Description
TRUEevaluated 103 times by 1 test
Evaluated by:
  • tac
FALSEnever evaluated
&& (
(size_t) ( 1 ) == 0Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
size_t) (
(size_t) ( 1 ) == 0Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
830 1
(size_t) ( 1 ) == 0Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
831 ) == 0
(size_t) ( 1 ) == 0Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
) || (__builtin_constant_p (
__builtin_cons...( bytes_read )Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
832 bytes_read
__builtin_cons...( bytes_read )Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
833 )
__builtin_cons...( bytes_read )Description
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
&& (
(size_t) ( bytes_read ) == 0Description
TRUEnever evaluated
FALSEnever evaluated
size_t) (
(size_t) ( bytes_read ) == 0Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
834 bytes_read
(size_t) ( bytes_read ) == 0Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
835 ) == 0
(size_t) ( bytes_read ) == 0Description
TRUEnever evaluated
FALSEnever evaluated
)) ? ((void) (
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
836 G_buffer
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
837 ), (void) (
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
838 fp
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
839 ), (void) (
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
840 1
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
841 ), (void) (
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
842 bytes_read
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
843 ), (size_t) 0) : fwrite_unlocked (
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
844 G_buffer
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
845 ,
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
846 1
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
847 ,
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
848 bytes_read
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
849 ,
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
850 fp
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
851 ))))
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
0-103
852 != bytes_read
(__extension__... != bytes_readDescription
TRUEnever evaluated
FALSEevaluated 103 times by 1 test
Evaluated by:
  • tac
)
0-103
853 {-
854 error (0, -
855 (*__errno_location ())-
856 , -
857 dcgettext (((void *)0), -
858 "%s: write error"-
859 , 5)-
860 , quotearg_n_style_colon (0, shell_escape_quoting_style, file_name));-
861 return
never executed: return -1;
-1;
never executed: return -1;
0
862 }-
863-
864-
865-
866-
867 bytes_copied += bytes_read;-
868 }
executed 103 times by 1 test: end of block
Executed by:
  • tac
103
869-
870 if (fflush_unlocked (fp) != 0
fflush_unlocked (fp) != 0Description
TRUEnever evaluated
FALSEevaluated 104 times by 1 test
Evaluated by:
  • tac
)
0-104
871 {-
872 error (0, -
873 (*__errno_location ())-
874 , -
875 dcgettext (((void *)0), -
876 "%s: write error"-
877 , 5)-
878 , quotearg_n_style_colon (0, shell_escape_quoting_style, file_name));-
879 return
never executed: return -1;
-1;
never executed: return -1;
0
880 }-
881-
882 *g_tmp = fp;-
883 *g_tempfile = file_name;-
884 return
executed 104 times by 1 test: return bytes_copied;
Executed by:
  • tac
bytes_copied;
executed 104 times by 1 test: return bytes_copied;
Executed by:
  • tac
104
885}-
886-
887-
888-
889-
890static -
891 _Bool-
892-
893tac_nonseekable (int input_fd, const char *file)-
894{-
895 FILE *tmp_stream;-
896 char *tmp_file;-
897 off_t bytes_copied = copy_to_temp (&tmp_stream, &tmp_file, input_fd, file);-
898 if (bytes_copied < 0
bytes_copied < 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 104 times by 1 test
Evaluated by:
  • tac
)
3-104
899 return
executed 3 times by 1 test: return 0 ;
Executed by:
  • tac
executed 3 times by 1 test: return 0 ;
Executed by:
  • tac
3
900 0
executed 3 times by 1 test: return 0 ;
Executed by:
  • tac
3
901 ;
executed 3 times by 1 test: return 0 ;
Executed by:
  • tac
3
902-
903 -
904 _Bool -
905 ok = tac_seekable (fileno (tmp_stream), tmp_file, bytes_copied);-
906 return
executed 104 times by 1 test: return ok;
Executed by:
  • tac
ok;
executed 104 times by 1 test: return ok;
Executed by:
  • tac
104
907}-
908-
909-
910-
911-
912-
913static -
914 _Bool-
915-
916tac_file (const char *filename)-
917{-
918 -
919 _Bool -
920 ok;-
921 off_t file_size;-
922 int fd;-
923 -
924 _Bool -
925 is_stdin = (-
926 __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (-
927 filename-
928 ) && __builtin_constant_p (-
929 "-"-
930 ) && (__s1_len = __builtin_strlen (-
931 filename-
932 ), __s2_len = __builtin_strlen (-
933 "-"-
934 ), (!((size_t)(const void *)((-
935 filename-
936 ) + 1) - (size_t)(const void *)(-
937 filename-
938 ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((-
939 "-"-
940 ) + 1) - (size_t)(const void *)(-
941 "-"-
942 ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (-
943 filename-
944 , -
945 "-"-
946 ) : (__builtin_constant_p (-
947 filename-
948 ) && ((size_t)(const void *)((-
949 filename-
950 ) + 1) - (size_t)(const void *)(-
951 filename-
952 ) == 1) && (__s1_len = __builtin_strlen (-
953 filename-
954 ), __s1_len < 4) ? (__builtin_constant_p (-
955 "-"-
956 ) && ((size_t)(const void *)((-
957 "-"-
958 ) + 1) - (size_t)(const void *)(-
959 "-"-
960 ) == 1) ? __builtin_strcmp (-
961 filename-
962 , -
963 "-"-
964 ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (-
965 "-"-
966 ); int __result = (((const unsigned char *) (const char *) (-
967 filename-
968 ))[0] - __s2[0]); if (__s1_len > 0
__s1_len > 0Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
0
969 filename-
970 ))[1] - __s2[1]); if (__s1_len > 1
__s1_len > 1Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
0
971 filename-
972 ))[2] - __s2[2]); if (__s1_len > 2
__s1_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( filename ))[3] - __s2[3]);
0
973 filename
never executed: __result = (((const unsigned char *) (const char *) ( filename ))[3] - __s2[3]);
0
974 ))[3] - __s2[3]);
never executed: __result = (((const unsigned char *) (const char *) ( filename ))[3] - __s2[3]);
}
never executed: end of block
}
never executed: end of block
__result; }))) : (__builtin_constant_p (
0
975 "-"-
976 ) && ((size_t)(const void *)((-
977 "-"-
978 ) + 1) - (size_t)(const void *)(-
979 "-"-
980 ) == 1) && (__s2_len = __builtin_strlen (-
981 "-"-
982 ), __s2_len < 4) ? (__builtin_constant_p (-
983 filename-
984 ) && ((size_t)(const void *)((-
985 filename-
986 ) + 1) - (size_t)(const void *)(-
987 filename-
988 ) == 1) ? __builtin_strcmp (-
989 filename-
990 , -
991 "-"-
992 ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (-
993 filename-
994 ); int __result = (((const unsigned char *) (const char *) (-
995 "-"-
996 ))[0] - __s2[0]); if (__s2_len > 0
__s2_len > 0Description
TRUEevaluated 171 times by 1 test
Evaluated by:
  • tac
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEevaluated 133 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 38 times by 1 test
Evaluated by:
  • tac
) { __result = (((const unsigned char *) (const char *) (
0-171
997 "-"-
998 ))[1] - __s2[1]); if (__s2_len > 1
__s2_len > 1Description
TRUEnever evaluated
FALSEevaluated 133 times by 1 test
Evaluated by:
  • tac
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) { __result = (((const unsigned char *) (const char *) (
0-133
999 "-"-
1000 ))[2] - __s2[2]); if (__s2_len > 2
__s2_len > 2Description
TRUEnever evaluated
FALSEnever evaluated
&& __result == 0
__result == 0Description
TRUEnever evaluated
FALSEnever evaluated
) __result = (((const unsigned char *) (const char *) (
never executed: __result = (((const unsigned char *) (const char *) ( "-" ))[3] - __s2[3]);
0
1001 "-"
never executed: __result = (((const unsigned char *) (const char *) ( "-" ))[3] - __s2[3]);
0
1002 ))[3] - __s2[3]);
never executed: __result = (((const unsigned char *) (const char *) ( "-" ))[3] - __s2[3]);
}
never executed: end of block
}
executed 133 times by 1 test: end of block
Executed by:
  • tac
__result; }))) : __builtin_strcmp (
0-133
1003 filename-
1004 , -
1005 "-"-
1006 )))); }) -
1007 == 0);-
1008-
1009 if (is_stdin
is_stdinDescription
TRUEevaluated 133 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 38 times by 1 test
Evaluated by:
  • tac
)
38-133
1010 {-
1011 have_read_stdin = -
1012 1-
1013 ;-
1014 fd = -
1015 0-
1016 ;-
1017 filename = -
1018 dcgettext (((void *)0), -
1019 "standard input"-
1020 , 5)-
1021 ;-
1022 xset_binary_mode (-
1023 0-
1024 , -
1025 0-
1026 );-
1027 }
executed 133 times by 1 test: end of block
Executed by:
  • tac
133
1028 else-
1029 {-
1030 fd = open (filename, -
1031 00 -
1032 | -
1033 0-
1034 );-
1035 if (fd < 0
fd < 0Description
TRUEnever evaluated
FALSEevaluated 38 times by 1 test
Evaluated by:
  • tac
)
0-38
1036 {-
1037 error (0, -
1038 (*__errno_location ())-
1039 , -
1040 dcgettext (((void *)0), -
1041 "failed to open %s for reading"-
1042 , 5)-
1043 ,-
1044 quotearg_style (shell_escape_always_quoting_style, filename));-
1045 return
never executed: return 0 ;
never executed: return 0 ;
0
1046 0
never executed: return 0 ;
0
1047 ;
never executed: return 0 ;
0
1048 }-
1049 }
executed 38 times by 1 test: end of block
Executed by:
  • tac
38
1050-
1051 file_size = lseek (fd, 0, -
1052 2-
1053 );-
1054-
1055 ok = (file_size < 0
file_size < 0Description
TRUEevaluated 107 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tac
|| isatty (fd)
isatty (fd)Description
TRUEnever evaluated
FALSEevaluated 64 times by 1 test
Evaluated by:
  • tac
0-107
1056 ? tac_nonseekable (fd, filename)-
1057 : tac_seekable (fd, filename, file_size));-
1058-
1059 if (!is_stdin
!is_stdinDescription
TRUEevaluated 38 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 133 times by 1 test
Evaluated by:
  • tac
&& close (fd) != 0
close (fd) != 0Description
TRUEnever evaluated
FALSEevaluated 38 times by 1 test
Evaluated by:
  • tac
)
0-133
1060 {-
1061 error (0, -
1062 (*__errno_location ())-
1063 , -
1064 dcgettext (((void *)0), -
1065 "%s: read error"-
1066 , 5)-
1067 , quotearg_n_style_colon (0, shell_escape_quoting_style, filename));-
1068 ok = -
1069 0-
1070 ;-
1071 }
never executed: end of block
0
1072 return
executed 171 times by 1 test: return ok;
Executed by:
  • tac
ok;
executed 171 times by 1 test: return ok;
Executed by:
  • tac
171
1073}-
1074-
1075int-
1076main (int argc, char **argv)-
1077{-
1078 const char *error_message;-
1079 int optc;-
1080 -
1081 _Bool -
1082 ok;-
1083 size_t half_buffer_size;-
1084-
1085-
1086-
1087 static char const *const default_file_list[] = {"-", -
1088 ((void *)0)-
1089 };-
1090 char const *const *file;-
1091-
1092 ;-
1093 set_program_name (argv[0]);-
1094 setlocale (-
1095 6-
1096 , "");-
1097 bindtextdomain ("coreutils", "/usr/local/share/locale");-
1098 textdomain ("coreutils");-
1099-
1100 atexit (close_stdout);-
1101-
1102 separator = "\n";-
1103 sentinel_length = 1;-
1104 separator_ends_record = -
1105 1-
1106 ;-
1107-
1108 while ((
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 167 times by 1 test
Evaluated by:
  • tac
optc = getopt_long (argc, argv, "brs:", longopts,
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 167 times by 1 test
Evaluated by:
  • tac
86-167
1109 ((void *)0)
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 167 times by 1 test
Evaluated by:
  • tac
86-167
1110 )) != -1
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 86 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 167 times by 1 test
Evaluated by:
  • tac
)
86-167
1111 {-
1112 switch (optc)-
1113 {-
1114 case
executed 14 times by 1 test: case 'b':
Executed by:
  • tac
'b':
executed 14 times by 1 test: case 'b':
Executed by:
  • tac
14
1115 separator_ends_record = -
1116 0-
1117 ;-
1118 break;
executed 14 times by 1 test: break;
Executed by:
  • tac
14
1119 case
executed 16 times by 1 test: case 'r':
Executed by:
  • tac
'r':
executed 16 times by 1 test: case 'r':
Executed by:
  • tac
16
1120 sentinel_length = 0;-
1121 break;
executed 16 times by 1 test: break;
Executed by:
  • tac
16
1122 case
executed 38 times by 1 test: case 's':
Executed by:
  • tac
's':
executed 38 times by 1 test: case 's':
Executed by:
  • tac
38
1123 separator = optarg;-
1124 break;
executed 38 times by 1 test: break;
Executed by:
  • tac
38
1125 case
executed 9 times by 1 test: case GETOPT_HELP_CHAR:
Executed by:
  • tac
GETOPT_HELP_CHAR:
executed 9 times by 1 test: case GETOPT_HELP_CHAR:
Executed by:
  • tac
usage (
9
1126 0-
1127 ); break;
never executed: break;
;
0
1128 case
executed 6 times by 1 test: case GETOPT_VERSION_CHAR:
Executed by:
  • tac
GETOPT_VERSION_CHAR:
executed 6 times by 1 test: case GETOPT_VERSION_CHAR:
Executed by:
  • tac
version_etc (
6
1129 stdout-
1130 , "tac", "GNU coreutils", Version, ("Jay Lepreau"), ("David MacKenzie"), (char *) -
1131 ((void *)0)-
1132 ); exit (
executed 6 times by 1 test: exit ( 0 );
Executed by:
  • tac
6
1133 0
executed 6 times by 1 test: exit ( 0 );
Executed by:
  • tac
6
1134 );
executed 6 times by 1 test: exit ( 0 );
Executed by:
  • tac
break;
never executed: break;
;
0-6
1135 default
executed 3 times by 1 test: default:
Executed by:
  • tac
:
executed 3 times by 1 test: default:
Executed by:
  • tac
3
1136 usage (-
1137 1-
1138 );-
1139 }
never executed: end of block
0
1140 }-
1141-
1142 if (sentinel_length == 0
sentinel_length == 0Description
TRUEevaluated 14 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 153 times by 1 test
Evaluated by:
  • tac
)
14-153
1143 {-
1144 if (*
*separator == 0Description
TRUEnever evaluated
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tac
separator == 0
*separator == 0Description
TRUEnever evaluated
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tac
)
0-14
1145 ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
!!sizeof (struct { _Static_assert (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1146 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1147 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1148 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1149 , 0,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1150 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1151 "separator cannot be empty"
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1152 , 5)
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1153 ), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1154 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1155 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1156 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1157 , 0,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1158 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1159 "separator cannot be empty"
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1160 , 5)
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1161 ), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1162 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1163 ) ? (void) 0 : __builtin_unreachable ()))));
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"separator cannot be empty\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "separator cannot be empty" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1164-
1165 compiled_separator.buffer = -
1166 ((void *)0)-
1167 ;-
1168 compiled_separator.allocated = 0;-
1169 compiled_separator.fastmap = compiled_separator_fastmap;-
1170 compiled_separator.translate = -
1171 ((void *)0)-
1172 ;-
1173 error_message = re_compile_pattern (separator, strlen (separator),-
1174 &compiled_separator);-
1175 if (error_message
error_messageDescription
TRUEnever evaluated
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tac
)
0-14
1176 ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, \"%s\", (error_message)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
!!sizeof (struct { _Static_assert (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, \"%s\", (error_message)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1177 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, \"%s\", (error_message)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1178 , "verify_expr (" "1" ", " "(error (1, 0, \"%s\", (error_message)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, \"%s\", (error_message)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1179 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, \"%s\", (error_message)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1180 , 0, "%s", (error_message)), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, \"%s\", (error_message)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1181 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, \"%s\", (error_message)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1182 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, \"%s\", (error_message)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1183 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, \"%s\", (error_message)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1184 , 0, "%s", (error_message)), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, \"%s\", (error_message)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1185 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, \"%s\", (error_message)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1186 ) ? (void) 0 : __builtin_unreachable ()))));
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, \"%s\", (error_message)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, "%s", (error_message)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
1187 }
executed 14 times by 1 test: end of block
Executed by:
  • tac
14
1188 else-
1189 match_length = sentinel_length = *
*separatorDescription
TRUEevaluated 135 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tac
separator
*separatorDescription
TRUEevaluated 135 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tac
? strlen (separator) : 1;
executed 153 times by 1 test: match_length = sentinel_length = *separator ? strlen (separator) : 1;
Executed by:
  • tac
18-153
1190-
1191 read_size = 8192;-
1192 while (sentinel_length >= read_size / 2
sentinel_lengt... read_size / 2Description
TRUEnever evaluated
FALSEevaluated 167 times by 1 test
Evaluated by:
  • tac
)
0-167
1193 {-
1194 if (-
1195 (
(1844674407370... 2 < read_sizeDescription
TRUEnever evaluated
FALSEnever evaluated
18446744073709551615UL)
(1844674407370... 2 < read_sizeDescription
TRUEnever evaluated
FALSEnever evaluated
0
1196 / 2 < read_size
(1844674407370... 2 < read_sizeDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
1197 xalloc_die ();
never executed: xalloc_die ();
0
1198 read_size *= 2;-
1199 }
never executed: end of block
0
1200 half_buffer_size = read_size + sentinel_length + 1;-
1201 G_buffer_size = 2 * half_buffer_size;-
1202 if (! (read_size < half_buffer_size
read_size < half_buffer_sizeDescription
TRUEevaluated 167 times by 1 test
Evaluated by:
  • tac
FALSEnever evaluated
&& half_buffer_size < G_buffer_size
half_buffer_si... G_buffer_sizeDescription
TRUEevaluated 167 times by 1 test
Evaluated by:
  • tac
FALSEnever evaluated
))
0-167
1203 xalloc_die ();
never executed: xalloc_die ();
0
1204 G_buffer = xmalloc (G_buffer_size);-
1205 if (sentinel_length
sentinel_lengthDescription
TRUEevaluated 153 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 14 times by 1 test
Evaluated by:
  • tac
)
14-153
1206 {-
1207 memcpy (G_buffer, separator, sentinel_length + 1);-
1208 G_buffer += sentinel_length;-
1209 }
executed 153 times by 1 test: end of block
Executed by:
  • tac
153
1210 else-
1211 {-
1212 ++G_buffer;-
1213 }
executed 14 times by 1 test: end of block
Executed by:
  • tac
14
1214-
1215 file = (optind < argc
optind < argcDescription
TRUEevaluated 38 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 129 times by 1 test
Evaluated by:
  • tac
38-129
1216 ? (char const *const *) &argv[optind]-
1217 : default_file_list);-
1218-
1219 xset_binary_mode (-
1220 1-
1221 , -
1222 0-
1223 );-
1224-
1225 {-
1226 ok = -
1227 1-
1228 ;-
1229 for (size_t i = 0; file[i]
file[i]Description
TRUEevaluated 171 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 167 times by 1 test
Evaluated by:
  • tac
; ++i)
167-171
1230 ok &= tac_file (file[i]);
executed 171 times by 1 test: ok &= tac_file (file[i]);
Executed by:
  • tac
171
1231 }-
1232-
1233-
1234 output ((char *) -
1235 ((void *)0)-
1236 , (char *) -
1237 ((void *)0)-
1238 );-
1239-
1240 if (have_read_stdin
have_read_stdinDescription
TRUEevaluated 131 times by 1 test
Evaluated by:
  • tac
FALSEevaluated 36 times by 1 test
Evaluated by:
  • tac
&& close (
close ( 0 ) < 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tac
FALSEevaluated 130 times by 1 test
Evaluated by:
  • tac
1-131
1241 0
close ( 0 ) < 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tac
FALSEevaluated 130 times by 1 test
Evaluated by:
  • tac
1-130
1242 ) < 0
close ( 0 ) < 0Description
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tac
FALSEevaluated 130 times by 1 test
Evaluated by:
  • tac
)
1-130
1243 {-
1244 error (0, -
1245 (*__errno_location ())-
1246 , "-");-
1247 ok = -
1248 0-
1249 ;-
1250 }
executed 1 time by 1 test: end of block
Executed by:
  • tac
1
1251-
1252-
1253-
1254-
1255-
1256-
1257 return
executed 167 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • tac
ok ?
executed 167 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • tac
167
1258 0
executed 167 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • tac
167
1259 :
executed 167 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • tac
167
1260 1
executed 167 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • tac
167
1261 ;
executed 167 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • tac
167
1262}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2