Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | static char const *separator; | - |
6 | | - |
7 | | - |
8 | static | - |
9 | _Bool | - |
10 | have_read_stdin = | - |
11 | 0 | - |
12 | ; | - |
13 | | - |
14 | | - |
15 | | - |
16 | static | - |
17 | _Bool | - |
18 | separator_ends_record; | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | static size_t sentinel_length; | - |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | static size_t match_length; | - |
29 | | - |
30 | | - |
31 | static char *G_buffer; | - |
32 | | - |
33 | | - |
34 | static size_t read_size; | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | static size_t G_buffer_size; | - |
40 | | - |
41 | | - |
42 | static struct re_pattern_buffer compiled_separator; | - |
43 | static char compiled_separator_fastmap[ | - |
44 | (0x7f * 2 + 1) | - |
45 | + 1]; | - |
46 | static struct re_registers regs; | - |
47 | | - |
48 | static 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 | | - |
82 | void | - |
83 | usage (int status) | - |
84 | { | - |
85 | if (status != TRUE | evaluated 3 times by 1 test | FALSE | evaluated 9 times by 1 test |
| 3-9 |
86 | 0TRUE | evaluated 3 times by 1 test | FALSE | evaluated 9 times by 1 test |
| 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 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 | 9 |
145 | exit (status);executed 12 times by 1 test: exit (status); | 12 |
146 | } | - |
147 | | - |
148 | | - |
149 | | - |
150 | | - |
151 | static void | - |
152 | output (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 == 0TRUE | evaluated 167 times by 1 test | FALSE | evaluated 4453 times by 1 test |
) | 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 > 0TRUE | never evaluated | FALSE | never evaluated |
; --__cnt) if ((TRUE | never evaluated | FALSE | never evaluated |
__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0)TRUE | never evaluated | FALSE | never evaluated |
? __overflow (__stream, (unsigned char) (*__ptr++)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (*__ptr++))) == (-1)TRUE | never evaluated | FALSE | never 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; | 167 |
208 | } | - |
209 | | - |
210 | | - |
211 | while (bytes_to_add >= bytes_availableTRUE | evaluated 8 times by 1 test | FALSE | evaluated 4453 times by 1 test |
) | 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 > 0TRUE | never evaluated | FALSE | never evaluated |
; --__cnt) if ((TRUE | never evaluated | FALSE | never evaluated |
__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0)TRUE | never evaluated | FALSE | never evaluated |
? __overflow (__stream, (unsigned char) (*__ptr++)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (*__ptr++))) == (-1)TRUE | never evaluated | FALSE | never 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 | 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 | 4453 |
268 | | - |
269 | | - |
270 | | - |
271 | | - |
272 | | - |
273 | static | - |
274 | _Bool | - |
275 | | - |
276 | tac_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 != 0TRUE | evaluated 161 times by 1 test | FALSE | evaluated 7 times by 1 test |
) | 7-161 |
307 | { | - |
308 | file_pos -= remainder; | - |
309 | if (lseek (input_fd, file_pos, TRUE | never evaluated | FALSE | evaluated 161 times by 1 test |
| 0-161 |
310 | 0TRUE | never evaluated | FALSE | evaluated 161 times by 1 test |
| 0-161 |
311 | ) < 0TRUE | never evaluated | FALSE | evaluated 161 times by 1 test |
) | 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 | 161 |
320 | | - |
321 | | - |
322 | | - |
323 | while ((TRUE | evaluated 7 times by 1 test | FALSE | evaluated 161 times by 1 test |
saved_record_size = safe_read (input_fd, G_buffer, read_size)) == 0TRUE | evaluated 7 times by 1 test | FALSE | evaluated 161 times by 1 test |
| 7-161 |
324 | && file_pos != 0TRUE | never evaluated | FALSE | evaluated 7 times by 1 test |
) | 0-7 |
325 | { | - |
326 | off_t rsize = read_size; | - |
327 | if (lseek (input_fd, -rsize, TRUE | never evaluated | FALSE | never evaluated |
| 0 |
328 | 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
329 | ) < 0TRUE | never evaluated | FALSE | never 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_sizeTRUE | never evaluated | FALSE | evaluated 168 times by 1 test |
) | 0-168 |
342 | { | - |
343 | size_t nread = safe_read (input_fd, G_buffer, read_size); | - |
344 | if (nread == 0TRUE | never evaluated | FALSE | never evaluated |
) | 0 |
345 | break; never executed: break; | 0 |
346 | saved_record_size = nread; | - |
347 | if (saved_record_size == ((size_t) -1)TRUE | never evaluated | FALSE | never 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)TRUE | never evaluated | FALSE | evaluated 168 times by 1 test |
) | 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_lengthTRUE | evaluated 152 times by 1 test | FALSE | evaluated 16 times by 1 test |
) | 16-152 |
369 | match_start -= match_length1;executed 152 times by 1 test: match_start -= match_length1; | 152 |
370 | | - |
371 | while ( | - |
372 | 1 | - |
373 | ) | - |
374 | { | - |
375 | | - |
376 | | - |
377 | | - |
378 | | - |
379 | | - |
380 | | - |
381 | if (sentinel_length == 0TRUE | evaluated 85 times by 1 test | FALSE | evaluated 4510 times by 1 test |
) | 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 < rangeTRUE | never evaluated | FALSE | evaluated 85 times by 1 test |
) | 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 == 1TRUE | evaluated 6 times by 1 test | FALSE | evaluated 79 times by 1 test |
| 6-79 |
410 | || ((TRUE | evaluated 10 times by 1 test | FALSE | evaluated 69 times by 1 test |
ret = re_search (&compiled_separator, G_buffer,TRUE | evaluated 10 times by 1 test | FALSE | evaluated 69 times by 1 test |
| 10-69 |
411 | i, i - 1, range, ®s))TRUE | evaluated 10 times by 1 test | FALSE | evaluated 69 times by 1 test |
| 10-69 |
412 | == -1)TRUE | evaluated 10 times by 1 test | FALSE | evaluated 69 times by 1 test |
) | 10-69 |
413 | match_start = G_buffer - 1;executed 16 times by 1 test: match_start = G_buffer - 1; | 16 |
414 | else if (ret == -2TRUE | never evaluated | FALSE | evaluated 69 times by 1 test |
) | 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 | 69 |
442 | } | - |
443 | else | - |
444 | { | - |
445 | | - |
446 | while (*--TRUE | evaluated 66407 times by 1 test | FALSE | evaluated 4510 times by 1 test |
match_start != first_charTRUE | evaluated 66407 times by 1 test | FALSE | evaluated 4510 times by 1 test |
| 4510-66407 |
447 | || (match_length1TRUE | never evaluated | FALSE | evaluated 4510 times by 1 test |
&& !(TRUE | never evaluated | FALSE | never evaluated |
| 0-4510 |
448 | (__extension__ (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
449 | match_length1TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
450 | )TRUE | never evaluated | FALSE | never evaluated |
&& ((__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
451 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
452 | )TRUE | never evaluated | FALSE | never evaluated |
&& strlen (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
453 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
454 | ) < ((size_t) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
455 | match_length1TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
456 | ))TRUE | never evaluated | FALSE | never evaluated |
) || (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
457 | separator1TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
458 | )TRUE | never evaluated | FALSE | never evaluated |
&& strlen (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
459 | separator1TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
460 | ) < ((size_t) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
461 | match_length1TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | never evaluated |
| 0 |
462 | ))TRUE | never evaluated | FALSE | never evaluated |
)) ? __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
463 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
464 | ) && __builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
465 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
466 | ) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
467 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
468 | ), __s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
469 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
470 | ), (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
471 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
472 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
473 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
474 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
475 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
476 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
477 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
478 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
479 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
480 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
481 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
482 | ) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
483 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
484 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
485 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
486 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
487 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
488 | ) == 1) && (__s1_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
489 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
490 | ), __s1_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
491 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
492 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
493 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
494 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
495 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
496 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
497 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
498 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
499 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
500 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
501 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
502 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
503 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
504 | ))[0] - __s2[0]); if (__s1_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
505 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
506 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
507 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
508 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( match_start + 1 ))[3] - __s2[3]); | 0 |
509 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( match_start + 1 ))[3] - __s2[3]); | 0 |
510 | ))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
511 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
512 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
513 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
514 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
515 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
516 | ) == 1) && (__s2_len = __builtin_strlen (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
517 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
518 | ), __s2_len < 4) ? (__builtin_constant_p (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
519 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
520 | ) && ((size_t)(const void *)((TRUE | never evaluated | FALSE | never evaluated |
| 0 |
521 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
522 | ) + 1) - (size_t)(const void *)(TRUE | never evaluated | FALSE | never evaluated |
| 0 |
523 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
524 | ) == 1) ? __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
525 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
526 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
527 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
528 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
529 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
530 | ); int __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
531 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
532 | ))[0] - __s2[0]); if (__s2_len > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
533 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
534 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
535 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
536 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( separator1 ))[3] - __s2[3]); | 0 |
537 | separator1TRUE | never evaluated | FALSE | never evaluated |
never executed: __result = (((const unsigned char *) (const char *) ( separator1 ))[3] - __s2[3]); | 0 |
538 | ))[3] - __s2[3]); } } __result; }))) : __builtin_strcmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
539 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
540 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
541 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
542 | )))); }) : strncmp (TRUE | never evaluated | FALSE | never evaluated |
| 0 |
543 | match_start + 1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
544 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
545 | separator1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
546 | , TRUE | never evaluated | FALSE | never evaluated |
| 0 |
547 | match_length1TRUE | never evaluated | FALSE | never evaluated |
| 0 |
548 | ))) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
549 | == 0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
550 | )) | - |
551 | ;executed 66407 times by 1 test: ; | 66407 |
552 | }executed 4510 times by 1 test: end of block | 4510 |
553 | | - |
554 | | - |
555 | | - |
556 | if (match_start < G_bufferTRUE | evaluated 176 times by 1 test | FALSE | evaluated 4419 times by 1 test |
) | 176-4419 |
557 | { | - |
558 | if (file_pos == 0TRUE | evaluated 168 times by 1 test | FALSE | evaluated 8 times by 1 test |
) | 8-168 |
559 | { | - |
560 | | - |
561 | output (G_buffer, past_end); | - |
562 | returnexecuted 168 times by 1 test: return 1 ; executed 168 times by 1 test: return 1 ; | 168 |
563 | 1executed 168 times by 1 test: return 1 ; | 168 |
564 | ;executed 168 times by 1 test: return 1 ; | 168 |
565 | } | - |
566 | | - |
567 | saved_record_size = past_end - G_buffer; | - |
568 | if (saved_record_size > read_sizeTRUE | evaluated 3 times by 1 test | FALSE | evaluated 5 times by 1 test |
) | 3-5 |
569 | { | - |
570 | | - |
571 | | - |
572 | | - |
573 | | - |
574 | char *newbuffer; | - |
575 | size_t offset = sentinel_lengthTRUE | evaluated 3 times by 1 test | FALSE | never 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_sizeTRUE | never evaluated | FALSE | evaluated 3 times by 1 test |
) | 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 | 3 |
586 | | - |
587 | | - |
588 | if (file_pos >= read_sizeTRUE | evaluated 5 times by 1 test | FALSE | evaluated 3 times by 1 test |
) | 3-5 |
589 | file_pos -= read_size;executed 5 times by 1 test: file_pos -= read_size; | 5 |
590 | else | - |
591 | { | - |
592 | read_size = file_pos; | - |
593 | file_pos = 0; | - |
594 | }executed 3 times by 1 test: end of block | 3 |
595 | if (lseek (input_fd, file_pos, TRUE | never evaluated | FALSE | evaluated 8 times by 1 test |
| 0-8 |
596 | 0TRUE | never evaluated | FALSE | evaluated 8 times by 1 test |
| 0-8 |
597 | ) < 0TRUE | never evaluated | FALSE | evaluated 8 times by 1 test |
) | 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_lengthTRUE | evaluated 8 times by 1 test | FALSE | never evaluated |
) | 0-8 |
612 | match_start = G_buffer + read_size;executed 8 times by 1 test: match_start = G_buffer + read_size; | 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_sizeTRUE | never evaluated | FALSE | evaluated 8 times by 1 test |
) | 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 | 8 |
630 | else | - |
631 | { | - |
632 | | - |
633 | if (separator_ends_recordTRUE | evaluated 4368 times by 1 test | FALSE | evaluated 51 times by 1 test |
) | 51-4368 |
634 | { | - |
635 | char *match_end = match_start + match_length; | - |
636 | | - |
637 | | - |
638 | | - |
639 | if (!first_timeTRUE | evaluated 4228 times by 1 test | FALSE | evaluated 140 times by 1 test |
|| match_end != past_endTRUE | evaluated 6 times by 1 test | FALSE | evaluated 134 times by 1 test |
) | 6-4228 |
640 | output (match_end, past_end);executed 4234 times by 1 test: output (match_end, past_end); | 4234 |
641 | past_end = match_end; | - |
642 | first_time = | - |
643 | 0 | - |
644 | ; | - |
645 | }executed 4368 times by 1 test: end of block | 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 | 51 |
651 | | - |
652 | | - |
653 | if (sentinel_length > 0TRUE | evaluated 4350 times by 1 test | FALSE | evaluated 69 times by 1 test |
) | 69-4350 |
654 | match_start -= match_length - 1;executed 4350 times by 1 test: match_start -= match_length - 1; | 4350 |
655 | }executed 4419 times by 1 test: end of block | 4419 |
656 | } | - |
657 | } never executed: end of block | 0 |
658 | static void | - |
659 | record_or_unlink_tempfile (char const *fn, FILE *fp __attribute__ ((__unused__))) | - |
660 | { | - |
661 | unlink (fn); | - |
662 | }executed 104 times by 1 test: end of block | 104 |
663 | | - |
664 | | - |
665 | | - |
666 | | - |
667 | | - |
668 | | - |
669 | static | - |
670 | _Bool | - |
671 | | - |
672 | temp_stream (FILE **fp, char **file_name) | - |
673 | { | - |
674 | static char *tempfile = | - |
675 | ((void *)0) | - |
676 | ; | - |
677 | static FILE *tmp_fp; | - |
678 | if (tempfile == TRUE | evaluated 105 times by 1 test | FALSE | evaluated 2 times by 1 test |
| 2-105 |
679 | ((void *)0)TRUE | evaluated 105 times by 1 test | FALSE | evaluated 2 times by 1 test |
| 2-105 |
680 | ) | - |
681 | { | - |
682 | char const *t = getenv ("TMPDIR"); | - |
683 | char const *tempdir = tTRUE | evaluated 105 times by 1 test | FALSE | never evaluated |
? t : "/tmp"; | 0-105 |
684 | tempfile = mfile_name_concat (tempdir, "tacXXXXXX", | - |
685 | ((void *)0) | - |
686 | ); | - |
687 | if (tempdir == TRUE | never evaluated | FALSE | evaluated 105 times by 1 test |
| 0-105 |
688 | ((void *)0)TRUE | never evaluated | FALSE | evaluated 105 times by 1 test |
| 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 < 0TRUE | evaluated 1 time by 1 test | FALSE | evaluated 104 times by 1 test |
) | 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 | gotoexecuted 1 time by 1 test: goto Reset; Reset;executed 1 time by 1 test: goto Reset; | 1 |
712 | } | - |
713 | | - |
714 | tmp_fp = fdopen (fd, ( | - |
715 | 0 | - |
716 | ? "w+b" : "w+")); | - |
717 | if (! tmp_fpTRUE | never evaluated | FALSE | evaluated 104 times by 1 test |
) | 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 | returnexecuted 1 time by 1 test: return 0 ; executed 1 time by 1 test: return 0 ; | 1 |
735 | 0executed 1 time by 1 test: return 0 ; | 1 |
736 | ;executed 1 time by 1 test: return 0 ; | 1 |
737 | } | - |
738 | | - |
739 | record_or_unlink_tempfile (tempfile, tmp_fp); | - |
740 | }executed 104 times by 1 test: end of block | 104 |
741 | else | - |
742 | { | - |
743 | clearerr_unlocked (tmp_fp); | - |
744 | if ( | - |
745 | rpl_fseeko TRUE | never evaluated | FALSE | evaluated 2 times by 1 test |
| 0-2 |
746 | (tmp_fp, 0, TRUE | never evaluated | FALSE | evaluated 2 times by 1 test |
| 0-2 |
747 | 0TRUE | never evaluated | FALSE | evaluated 2 times by 1 test |
| 0-2 |
748 | ) < 0TRUE | never evaluated | FALSE | evaluated 2 times by 1 test |
| 0-2 |
749 | || ftruncate (fileno (tmp_fp), 0) < 0TRUE | never evaluated | FALSE | evaluated 2 times by 1 test |
) | 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 | 2 |
764 | | - |
765 | *fp = tmp_fp; | - |
766 | *file_name = tempfile; | - |
767 | returnexecuted 106 times by 1 test: return 1 ; executed 106 times by 1 test: return 1 ; | 106 |
768 | 1executed 106 times by 1 test: return 1 ; | 106 |
769 | ;executed 106 times by 1 test: return 1 ; | 106 |
770 | } | - |
771 | | - |
772 | | - |
773 | | - |
774 | | - |
775 | | - |
776 | static off_t | - |
777 | copy_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)TRUE | evaluated 1 time by 1 test | FALSE | evaluated 106 times by 1 test |
) | 1-106 |
783 | returnexecuted 1 time by 1 test: return -1; -1;executed 1 time by 1 test: return -1; | 1 |
784 | | - |
785 | while (1) | - |
786 | { | - |
787 | size_t bytes_read = safe_read (input_fd, G_buffer, read_size); | - |
788 | if (bytes_read == 0TRUE | evaluated 104 times by 1 test | FALSE | evaluated 105 times by 1 test |
) | 104-105 |
789 | break;executed 104 times by 1 test: break; | 104 |
790 | if (bytes_read == ((size_t) -1)TRUE | evaluated 2 times by 1 test | FALSE | evaluated 103 times by 1 test |
) | 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 | returnexecuted 2 times by 1 test: return -1; -1;executed 2 times by 1 test: return -1; | 2 |
800 | } | - |
801 | | - |
802 | if ( | - |
803 | (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
__extension__ ((__builtin_constant_p (TRUE | evaluated 103 times by 1 test | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
804 | 1TRUE | evaluated 103 times by 1 test | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
805 | )TRUE | evaluated 103 times by 1 test | FALSE | never evaluated |
&& __builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
806 | bytes_readTRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
807 | )TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
&& (TRUE | never evaluated | FALSE | never evaluated |
size_t) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
808 | 1TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
809 | ) * (size_t) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
810 | bytes_readTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
811 | ) <= 8TRUE | never evaluated | FALSE | never evaluated |
&& (TRUE | never evaluated | FALSE | never evaluated |
size_t) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
812 | 1TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
813 | ) != 0TRUE | never evaluated | FALSE | never evaluated |
) ? ({ const char *__ptr = (const char *) (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
814 | G_bufferTRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
815 | ); FILE *__stream = (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
816 | fpTRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
817 | ); size_t __cnt; for (__cnt = (size_t) (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
818 | 1TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
819 | ) * (size_t) (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
820 | bytes_readTRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
821 | ); __cnt > 0TRUE | never evaluated | FALSE | never evaluated |
; --__cnt) if ((TRUE | never evaluated | FALSE | never evaluated |
__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0)TRUE | never evaluated | FALSE | never evaluated |
? __overflow (__stream, (unsigned char) (*__ptr++)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (*__ptr++))) == (-1)TRUE | never evaluated | FALSE | never evaluated |
) break;never executed: break; ((size_t) (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
822 | 1TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
823 | ) * (size_t) (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
824 | bytes_readTRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
825 | ) - __cnt) / (size_t) (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
826 | 1TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
827 | ); }) : (((__builtin_constant_p (TRUE | evaluated 103 times by 1 test | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
828 | 1TRUE | evaluated 103 times by 1 test | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
829 | )TRUE | evaluated 103 times by 1 test | FALSE | never evaluated |
&& (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
size_t) (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
830 | 1TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
831 | ) == 0TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
) || (__builtin_constant_p (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
832 | bytes_readTRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
833 | )TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
&& (TRUE | never evaluated | FALSE | never evaluated |
size_t) (TRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
834 | bytes_readTRUE | never evaluated | FALSE | never evaluated |
TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
835 | ) == 0TRUE | never evaluated | FALSE | never evaluated |
)) ? ((void) (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
836 | G_bufferTRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
837 | ), (void) (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
838 | fpTRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
839 | ), (void) (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
840 | 1TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
841 | ), (void) (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
842 | bytes_readTRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
843 | ), (size_t) 0) : fwrite_unlocked (TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
844 | G_bufferTRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
845 | , TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
846 | 1TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
847 | , TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
848 | bytes_readTRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
849 | , TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
850 | fpTRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
851 | )))) TRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
| 0-103 |
852 | != bytes_readTRUE | never evaluated | FALSE | evaluated 103 times by 1 test |
) | 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 | 103 |
869 | | - |
870 | if (fflush_unlocked (fp) != 0TRUE | never evaluated | FALSE | evaluated 104 times by 1 test |
) | 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 | returnexecuted 104 times by 1 test: return bytes_copied; bytes_copied;executed 104 times by 1 test: return bytes_copied; | 104 |
885 | } | - |
886 | | - |
887 | | - |
888 | | - |
889 | | - |
890 | static | - |
891 | _Bool | - |
892 | | - |
893 | tac_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 < 0TRUE | evaluated 3 times by 1 test | FALSE | evaluated 104 times by 1 test |
) | 3-104 |
899 | returnexecuted 3 times by 1 test: return 0 ; executed 3 times by 1 test: return 0 ; | 3 |
900 | 0executed 3 times by 1 test: return 0 ; | 3 |
901 | ;executed 3 times by 1 test: return 0 ; | 3 |
902 | | - |
903 | | - |
904 | _Bool | - |
905 | ok = tac_seekable (fileno (tmp_stream), tmp_file, bytes_copied); | - |
906 | returnexecuted 104 times by 1 test: return ok; ok;executed 104 times by 1 test: return ok; | 104 |
907 | } | - |
908 | | - |
909 | | - |
910 | | - |
911 | | - |
912 | | - |
913 | static | - |
914 | _Bool | - |
915 | | - |
916 | tac_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 > 0TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) ( | 0 |
969 | filename | - |
970 | ))[1] - __s2[1]); if (__s1_len > 1TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) ( | 0 |
971 | filename | - |
972 | ))[2] - __s2[2]); if (__s1_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( 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 > 0TRUE | evaluated 171 times by 1 test | FALSE | never evaluated |
&& __result == 0TRUE | evaluated 133 times by 1 test | FALSE | evaluated 38 times by 1 test |
) { __result = (((const unsigned char *) (const char *) ( | 0-171 |
997 | "-" | - |
998 | ))[1] - __s2[1]); if (__s2_len > 1TRUE | never evaluated | FALSE | evaluated 133 times by 1 test |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) { __result = (((const unsigned char *) (const char *) ( | 0-133 |
999 | "-" | - |
1000 | ))[2] - __s2[2]); if (__s2_len > 2TRUE | never evaluated | FALSE | never evaluated |
&& __result == 0TRUE | never evaluated | FALSE | never evaluated |
) __result = (((const unsigned char *) (const char *) (never executed: __result = (((const unsigned char *) (const char *) ( "-" ))[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 __result; }))) : __builtin_strcmp ( | 0-133 |
1003 | filename | - |
1004 | , | - |
1005 | "-" | - |
1006 | )))); }) | - |
1007 | == 0); | - |
1008 | | - |
1009 | if (is_stdinTRUE | evaluated 133 times by 1 test | FALSE | evaluated 38 times by 1 test |
) | 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 | 133 |
1028 | else | - |
1029 | { | - |
1030 | fd = open (filename, | - |
1031 | 00 | - |
1032 | | | - |
1033 | 0 | - |
1034 | ); | - |
1035 | if (fd < 0TRUE | never evaluated | FALSE | evaluated 38 times by 1 test |
) | 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 | 38 |
1050 | | - |
1051 | file_size = lseek (fd, 0, | - |
1052 | 2 | - |
1053 | ); | - |
1054 | | - |
1055 | ok = (file_size < 0TRUE | evaluated 107 times by 1 test | FALSE | evaluated 64 times by 1 test |
|| isatty (fd)TRUE | never evaluated | FALSE | evaluated 64 times by 1 test |
| 0-107 |
1056 | ? tac_nonseekable (fd, filename) | - |
1057 | : tac_seekable (fd, filename, file_size)); | - |
1058 | | - |
1059 | if (!is_stdinTRUE | evaluated 38 times by 1 test | FALSE | evaluated 133 times by 1 test |
&& close (fd) != 0TRUE | never evaluated | FALSE | evaluated 38 times by 1 test |
) | 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 | returnexecuted 171 times by 1 test: return ok; ok;executed 171 times by 1 test: return ok; | 171 |
1073 | } | - |
1074 | | - |
1075 | int | - |
1076 | main (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 ((TRUE | evaluated 86 times by 1 test | FALSE | evaluated 167 times by 1 test |
optc = getopt_long (argc, argv, "brs:", longopts, TRUE | evaluated 86 times by 1 test | FALSE | evaluated 167 times by 1 test |
| 86-167 |
1109 | ((void *)0)TRUE | evaluated 86 times by 1 test | FALSE | evaluated 167 times by 1 test |
| 86-167 |
1110 | )) != -1TRUE | evaluated 86 times by 1 test | FALSE | evaluated 167 times by 1 test |
) | 86-167 |
1111 | { | - |
1112 | switch (optc) | - |
1113 | { | - |
1114 | caseexecuted 14 times by 1 test: case 'b': 'b':executed 14 times by 1 test: case 'b': | 14 |
1115 | separator_ends_record = | - |
1116 | 0 | - |
1117 | ; | - |
1118 | break;executed 14 times by 1 test: break; | 14 |
1119 | caseexecuted 16 times by 1 test: case 'r': 'r':executed 16 times by 1 test: case 'r': | 16 |
1120 | sentinel_length = 0; | - |
1121 | break;executed 16 times by 1 test: break; | 16 |
1122 | caseexecuted 38 times by 1 test: case 's': 's':executed 38 times by 1 test: case 's': | 38 |
1123 | separator = optarg; | - |
1124 | break;executed 38 times by 1 test: break; | 38 |
1125 | caseexecuted 9 times by 1 test: case GETOPT_HELP_CHAR: GETOPT_HELP_CHAR:executed 9 times by 1 test: case GETOPT_HELP_CHAR: usage ( | 9 |
1126 | 0 | - |
1127 | ); break; never executed: break; ; | 0 |
1128 | caseexecuted 6 times by 1 test: case GETOPT_VERSION_CHAR: GETOPT_VERSION_CHAR:executed 6 times by 1 test: case GETOPT_VERSION_CHAR: 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 ); | 6 |
1133 | 0executed 6 times by 1 test: exit ( 0 ); | 6 |
1134 | );executed 6 times by 1 test: exit ( 0 ); break;never executed: break; ; | 0-6 |
1135 | defaultexecuted 3 times by 1 test: default: :executed 3 times by 1 test: default: | 3 |
1136 | usage ( | - |
1137 | 1 | - |
1138 | ); | - |
1139 | } never executed: end of block | 0 |
1140 | } | - |
1141 | | - |
1142 | if (sentinel_length == 0TRUE | evaluated 14 times by 1 test | FALSE | evaluated 153 times by 1 test |
) | 14-153 |
1143 | { | - |
1144 | if (*TRUE | never evaluated | FALSE | evaluated 14 times by 1 test |
separator == 0TRUE | never evaluated | FALSE | evaluated 14 times by 1 test |
) | 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_messageTRUE | never evaluated | FALSE | evaluated 14 times by 1 test |
) | 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 | 14 |
1188 | else | - |
1189 | match_length = sentinel_length = *TRUE | evaluated 135 times by 1 test | FALSE | evaluated 18 times by 1 test |
separatorTRUE | evaluated 135 times by 1 test | FALSE | evaluated 18 times by 1 test |
? strlen (separator) : 1;executed 153 times by 1 test: match_length = sentinel_length = *separator ? strlen (separator) : 1; | 18-153 |
1190 | | - |
1191 | read_size = 8192; | - |
1192 | while (sentinel_length >= read_size / 2TRUE | never evaluated | FALSE | evaluated 167 times by 1 test |
) | 0-167 |
1193 | { | - |
1194 | if ( | - |
1195 | (TRUE | never evaluated | FALSE | never evaluated |
18446744073709551615UL) TRUE | never evaluated | FALSE | never evaluated |
| 0 |
1196 | / 2 < read_sizeTRUE | never evaluated | FALSE | never 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_sizeTRUE | evaluated 167 times by 1 test | FALSE | never evaluated |
&& half_buffer_size < G_buffer_sizeTRUE | evaluated 167 times by 1 test | FALSE | never evaluated |
)) | 0-167 |
1203 | xalloc_die (); never executed: xalloc_die (); | 0 |
1204 | G_buffer = xmalloc (G_buffer_size); | - |
1205 | if (sentinel_lengthTRUE | evaluated 153 times by 1 test | FALSE | evaluated 14 times by 1 test |
) | 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 | 153 |
1210 | else | - |
1211 | { | - |
1212 | ++G_buffer; | - |
1213 | }executed 14 times by 1 test: end of block | 14 |
1214 | | - |
1215 | file = (optind < argcTRUE | evaluated 38 times by 1 test | FALSE | evaluated 129 times by 1 test |
| 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]TRUE | evaluated 171 times by 1 test | FALSE | evaluated 167 times by 1 test |
; ++i) | 167-171 |
1230 | ok &= tac_file (file[i]);executed 171 times by 1 test: ok &= tac_file (file[i]); | 171 |
1231 | } | - |
1232 | | - |
1233 | | - |
1234 | output ((char *) | - |
1235 | ((void *)0) | - |
1236 | , (char *) | - |
1237 | ((void *)0) | - |
1238 | ); | - |
1239 | | - |
1240 | if (have_read_stdinTRUE | evaluated 131 times by 1 test | FALSE | evaluated 36 times by 1 test |
&& close (TRUE | evaluated 1 time by 1 test | FALSE | evaluated 130 times by 1 test |
| 1-131 |
1241 | 0TRUE | evaluated 1 time by 1 test | FALSE | evaluated 130 times by 1 test |
| 1-130 |
1242 | ) < 0TRUE | evaluated 1 time by 1 test | FALSE | evaluated 130 times by 1 test |
) | 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 | 1 |
1251 | | - |
1252 | | - |
1253 | | - |
1254 | | - |
1255 | | - |
1256 | | - |
1257 | returnexecuted 167 times by 1 test: return ok ? 0 : 1 ; ok ? executed 167 times by 1 test: return ok ? 0 : 1 ; | 167 |
1258 | 0 executed 167 times by 1 test: return ok ? 0 : 1 ; | 167 |
1259 | : executed 167 times by 1 test: return ok ? 0 : 1 ; | 167 |
1260 | 1executed 167 times by 1 test: return ok ? 0 : 1 ; | 167 |
1261 | ;executed 167 times by 1 test: return ok ? 0 : 1 ; | 167 |
1262 | } | - |
| | |