OpenCoverage

tee.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/src/tee.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3static -
4 _Bool -
5 tee_files (int nfiles, char **files);-
6-
7-
8static -
9 _Bool -
10 append;-
11-
12-
13static -
14 _Bool -
15 ignore_interrupts;-
16-
17enum output_error-
18 {-
19 output_error_sigpipe,-
20 output_error_warn,-
21 output_error_warn_nopipe,-
22 output_error_exit,-
23 output_error_exit_nopipe-
24 };-
25-
26static enum output_error output_error;-
27-
28static struct option const long_options[] =-
29{-
30 {"append", -
31 0-
32 , -
33 ((void *)0)-
34 , 'a'},-
35 {"ignore-interrupts", -
36 0-
37 , -
38 ((void *)0)-
39 , 'i'},-
40 {"output-error", -
41 2-
42 , -
43 ((void *)0)-
44 , 'p'},-
45 {"help", -
46 0-
47 , -
48 ((void *)0)-
49 , GETOPT_HELP_CHAR},-
50 {"version", -
51 0-
52 , -
53 ((void *)0)-
54 , GETOPT_VERSION_CHAR},-
55 {-
56 ((void *)0)-
57 , 0, -
58 ((void *)0)-
59 , 0}-
60};-
61-
62static char const *const output_error_args[] =-
63{-
64 "warn", "warn-nopipe", "exit", "exit-nopipe", -
65 ((void *)0)-
66-
67};-
68static enum output_error const output_error_types[] =-
69{-
70 output_error_warn, output_error_warn_nopipe,-
71 output_error_exit, output_error_exit_nopipe-
72};-
73_Static_assert ((sizeof (output_error_args) / sizeof *(output_error_args)) == (sizeof (output_error_types) / sizeof *(output_error_types)) + 1, "verify (" "ARRAY_CARDINALITY (output_error_args) == ARRAY_CARDINALITY (output_error_types) + 1" ")");-
74-
75void-
76usage (int status)-
77{-
78 if (status !=
status != 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tee
3-9
79 0
status != 0Description
TRUEevaluated 3 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 9 times by 1 test
Evaluated by:
  • tee
3-9
80 )-
81 do { fprintf (-
82 stderr-
83 , -
84 dcgettext (((void *)0), -
85 "Try '%s --help' for more information.\n"-
86 , 5)-
87 , program_name); }
executed 3 times by 1 test: end of block
Executed by:
  • tee
while (0);
3
88 else-
89 {-
90 printf (-
91 dcgettext (((void *)0), -
92 "Usage: %s [OPTION]... [FILE]...\n"-
93 , 5)-
94 , program_name);-
95 fputs_unlocked (-
96 dcgettext (((void *)0), -
97 "Copy standard input to each FILE, and also to standard output.\n\n -a, --append append to the given FILEs, do not overwrite\n -i, --ignore-interrupts ignore interrupt signals\n"-
98 , 5)-
99 ,-
100 stdout-
101 )-
102-
103-
104-
105-
106 ;-
107 fputs_unlocked (-
108 dcgettext (((void *)0), -
109 " -p diagnose errors writing to non pipes\n --output-error[=MODE] set behavior on write error. See MODE below\n"-
110 , 5)-
111 ,-
112 stdout-
113 )-
114-
115-
116 ;-
117 fputs_unlocked (-
118 dcgettext (((void *)0), -
119 " --help display this help and exit\n"-
120 , 5)-
121 ,-
122 stdout-
123 );-
124 fputs_unlocked (-
125 dcgettext (((void *)0), -
126 " --version output version information and exit\n"-
127 , 5)-
128 ,-
129 stdout-
130 );-
131 fputs_unlocked (-
132 dcgettext (((void *)0), -
133 "\nMODE determines behavior with write errors on the outputs:\n 'warn' diagnose errors writing to any output\n 'warn-nopipe' diagnose errors writing to any output not a pipe\n 'exit' exit on error writing to any output\n 'exit-nopipe' exit on error writing to any output not a pipe\nThe default MODE for the -p option is 'warn-nopipe'.\nThe default operation when --output-error is not specified, is to\nexit immediately on error writing to a pipe, and diagnose errors\nwriting to non pipe outputs.\n"-
134 , 5)-
135 ,-
136 stdout-
137 )-
138 ;-
139 emit_ancillary_info ("tee");-
140 }
executed 9 times by 1 test: end of block
Executed by:
  • tee
9
141 exit (status);
executed 12 times by 1 test: exit (status);
Executed by:
  • tee
12
142}-
143-
144int-
145main (int argc, char **argv)-
146{-
147 -
148 _Bool -
149 ok;-
150 int optc;-
151-
152 ;-
153 set_program_name (argv[0]);-
154 setlocale (-
155 6-
156 , "");-
157 bindtextdomain ("coreutils", "/usr/local/share/locale");-
158 textdomain ("coreutils");-
159-
160 atexit (close_stdout);-
161-
162 append = -
163 0-
164 ;-
165 ignore_interrupts = -
166 0-
167 ;-
168-
169 while ((
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 61 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tee
optc = getopt_long (argc, argv, "aip", long_options,
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 61 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tee
52-61
170 ((void *)0)
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 61 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tee
52-61
171 )) != -1
(optc = getopt... *)0) )) != -1Description
TRUEevaluated 61 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tee
)
52-61
172 {-
173 switch (optc)-
174 {-
175 case
executed 36 times by 1 test: case 'a':
Executed by:
  • tee
'a':
executed 36 times by 1 test: case 'a':
Executed by:
  • tee
36
176 append = -
177 1-
178 ;-
179 break;
executed 36 times by 1 test: break;
Executed by:
  • tee
36
180-
181 case
executed 2 times by 1 test: case 'i':
Executed by:
  • tee
'i':
executed 2 times by 1 test: case 'i':
Executed by:
  • tee
2
182 ignore_interrupts = -
183 1-
184 ;-
185 break;
executed 2 times by 1 test: break;
Executed by:
  • tee
2
186-
187 case
executed 7 times by 1 test: case 'p':
Executed by:
  • tee
'p':
executed 7 times by 1 test: case 'p':
Executed by:
  • tee
7
188 if (optarg
optargDescription
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tee
)
3-4
189 output_error = ((output_error_types) [__xargmatch_internal ("--output-error", optarg, output_error_args, (char const *) (output_error_types), sizeof *(output_error_types), argmatch_die)])
executed 4 times by 1 test: output_error = ((output_error_types) [__xargmatch_internal ("--output-error", optarg, output_error_args, (char const *) (output_error_types), sizeof *(output_error_types), argmatch_die)]) ;
Executed by:
  • tee
4
190 ;
executed 4 times by 1 test: output_error = ((output_error_types) [__xargmatch_internal ("--output-error", optarg, output_error_args, (char const *) (output_error_types), sizeof *(output_error_types), argmatch_die)]) ;
Executed by:
  • tee
4
191 else-
192 output_error = output_error_warn_nopipe;
executed 3 times by 1 test: output_error = output_error_warn_nopipe;
Executed by:
  • tee
3
193 break;
executed 7 times by 1 test: break;
Executed by:
  • tee
7
194-
195 case
executed 9 times by 1 test: case GETOPT_HELP_CHAR:
Executed by:
  • tee
GETOPT_HELP_CHAR:
executed 9 times by 1 test: case GETOPT_HELP_CHAR:
Executed by:
  • tee
usage (
9
196 0-
197 ); break;
never executed: break;
;
0
198-
199 case
executed 4 times by 1 test: case GETOPT_VERSION_CHAR:
Executed by:
  • tee
GETOPT_VERSION_CHAR:
executed 4 times by 1 test: case GETOPT_VERSION_CHAR:
Executed by:
  • tee
version_etc (
4
200 stdout-
201 , "tee", "GNU coreutils", Version, ("Mike Parker"), ("Richard M. Stallman"), ("David MacKenzie"), (char *) -
202 ((void *)0)-
203 ); exit (
executed 4 times by 1 test: exit ( 0 );
Executed by:
  • tee
4
204 0
executed 4 times by 1 test: exit ( 0 );
Executed by:
  • tee
4
205 );
executed 4 times by 1 test: exit ( 0 );
Executed by:
  • tee
break;
never executed: break;
;
0-4
206-
207 default
executed 3 times by 1 test: default:
Executed by:
  • tee
:
executed 3 times by 1 test: default:
Executed by:
  • tee
3
208 usage (-
209 1-
210 );-
211 }
never executed: end of block
0
212 }-
213-
214 if (ignore_interrupts
ignore_interruptsDescription
TRUEnever evaluated
FALSEevaluated 52 times by 1 test
Evaluated by:
  • tee
)
0-52
215 signal (
never executed: signal ( 2 , ((__sighandler_t) 1) );
0
216 2
never executed: signal ( 2 , ((__sighandler_t) 1) );
0
217 ,
never executed: signal ( 2 , ((__sighandler_t) 1) );
0
218 ((__sighandler_t) 1)
never executed: signal ( 2 , ((__sighandler_t) 1) );
0
219 );
never executed: signal ( 2 , ((__sighandler_t) 1) );
0
220-
221 if (output_error != output_error_sigpipe
output_error !..._error_sigpipeDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 47 times by 1 test
Evaluated by:
  • tee
)
5-47
222 signal (
executed 5 times by 1 test: signal ( 13 , ((__sighandler_t) 1) );
Executed by:
  • tee
5
223 13
executed 5 times by 1 test: signal ( 13 , ((__sighandler_t) 1) );
Executed by:
  • tee
5
224 ,
executed 5 times by 1 test: signal ( 13 , ((__sighandler_t) 1) );
Executed by:
  • tee
5
225 ((__sighandler_t) 1)
executed 5 times by 1 test: signal ( 13 , ((__sighandler_t) 1) );
Executed by:
  • tee
5
226 );
executed 5 times by 1 test: signal ( 13 , ((__sighandler_t) 1) );
Executed by:
  • tee
5
227-
228-
229-
230-
231 ok = tee_files (argc - optind, &argv[optind]);-
232 if (close (
close ( 0 ) != 0Description
TRUEnever evaluated
FALSEevaluated 50 times by 1 test
Evaluated by:
  • tee
0-50
233 0
close ( 0 ) != 0Description
TRUEnever evaluated
FALSEevaluated 50 times by 1 test
Evaluated by:
  • tee
0-50
234 ) != 0
close ( 0 ) != 0Description
TRUEnever evaluated
FALSEevaluated 50 times by 1 test
Evaluated by:
  • tee
)
0-50
235 ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
!!sizeof (struct { _Static_assert (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
236 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
237 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
238 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
239 ,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
240 (*__errno_location ())
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
241 , "%s",
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
242 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
243 "standard input"
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
244 , 5)
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
245 ), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
246 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
247 ) ? (void) 0 : __builtin_unreachable ()))) : ((error (
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
248 1
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
249 ,
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
250 (*__errno_location ())
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
251 , "%s",
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
252 dcgettext (((void *)0),
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
253 "standard input"
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
254 , 5)
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
255 ), ((
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
256 0
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
257 ) ? (void) 0 : __builtin_unreachable ()))));
never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", dcgettext (((void *)0), \"standard input\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", dcgettext (((void *)0), "standard input" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))));
0
258-
259 return
executed 50 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • tee
ok ?
executed 50 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • tee
50
260 0
executed 50 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • tee
50
261 :
executed 50 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • tee
50
262 1
executed 50 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • tee
50
263 ;
executed 50 times by 1 test: return ok ? 0 : 1 ;
Executed by:
  • tee
50
264}-
265-
266-
267-
268-
269-
270static -
271 _Bool-
272-
273tee_files (int nfiles, char **files)-
274{-
275 size_t n_outputs = 0;-
276 FILE **descriptors;-
277 char buffer[-
278 8192-
279 ];-
280 ssize_t bytes_read = 0;-
281 int i;-
282 -
283 _Bool -
284 ok = -
285 1-
286 ;-
287 char const *mode_string =-
288 (-
289 0-
290 -
291 ? (
dead code: (append ? "ab" : "wb")
append ? "ab" : "wb")
dead code: (append ? "ab" : "wb")
-
292 : (append
appendDescription
TRUEevaluated 34 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 18 times by 1 test
Evaluated by:
  • tee
? "a" : "w"));
18-34
293-
294 xset_binary_mode (-
295 0-
296 , -
297 0-
298 );-
299 xset_binary_mode (-
300 1-
301 , -
302 0-
303 );-
304 fadvise (-
305 stdin-
306 , FADVISE_SEQUENTIAL);-
307-
308-
309-
310-
311 descriptors = xnmalloc (nfiles + 1, sizeof *descriptors);-
312 files--;-
313 descriptors[0] = -
314 stdout-
315 ;-
316 files[0] = bad_cast (-
317 dcgettext (((void *)0), -
318 "standard output"-
319 , 5)-
320 );-
321 setvbuf (-
322 stdout-
323 , -
324 ((void *)0)-
325 , -
326 2-
327 , 0);-
328 n_outputs++;-
329-
330 for (i = 1; i <= nfiles
i <= nfilesDescription
TRUEevaluated 72 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 51 times by 1 test
Evaluated by:
  • tee
; i++)
51-72
331 {-
332-
333 descriptors[i] = fopen_safer (files[i], mode_string);-
334 if (descriptors[i] ==
descriptors[i] == ((void *)0)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 70 times by 1 test
Evaluated by:
  • tee
2-70
335 ((void *)0)
descriptors[i] == ((void *)0)Description
TRUEevaluated 2 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 70 times by 1 test
Evaluated by:
  • tee
2-70
336 )-
337 {-
338 error (output_error == output_error_exit-
339 || output_error == output_error_exit_nopipe,-
340 -
341 (*__errno_location ())-
342 , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, files[i]));-
343 ok = -
344 0-
345 ;-
346 }
executed 1 time by 1 test: end of block
Executed by:
  • tee
1
347 else-
348 {-
349 setvbuf (descriptors[i], -
350 ((void *)0)-
351 , -
352 2-
353 , 0);-
354 n_outputs++;-
355 }
executed 70 times by 1 test: end of block
Executed by:
  • tee
70
356 }-
357-
358 while (n_outputs
n_outputsDescription
TRUEevaluated 143 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tee
)
5-143
359 {-
360 bytes_read = read (0, buffer, sizeof buffer);-
361 if (bytes_read < 0
bytes_read < 0Description
TRUEnever evaluated
FALSEevaluated 143 times by 1 test
Evaluated by:
  • tee
&&
0-143
362 (*
(*__errno_location ()) == 4Description
TRUEnever evaluated
FALSEnever evaluated
__errno_location ())
(*__errno_location ()) == 4Description
TRUEnever evaluated
FALSEnever evaluated
0
363 ==
(*__errno_location ()) == 4Description
TRUEnever evaluated
FALSEnever evaluated
0
364 4
(*__errno_location ()) == 4Description
TRUEnever evaluated
FALSEnever evaluated
0
365 )-
366 continue;
never executed: continue;
0
367 if (bytes_read <= 0
bytes_read <= 0Description
TRUEevaluated 45 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 98 times by 1 test
Evaluated by:
  • tee
)
45-98
368 break;
executed 45 times by 1 test: break;
Executed by:
  • tee
45
369-
370-
371-
372 for (i = 0; i <= nfiles
i <= nfilesDescription
TRUEevaluated 201 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 97 times by 1 test
Evaluated by:
  • tee
; i++)
97-201
373 if (descriptors[i]
descriptors[i]Description
TRUEevaluated 182 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 19 times by 1 test
Evaluated by:
  • tee
19-182
374 && -
375 (
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
__extension__ ((__builtin_constant_p (
__builtin_cons...( bytes_read )Description
TRUEnever evaluated
FALSEevaluated 182 times by 1 test
Evaluated by:
  • tee
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-182
376 bytes_read
__builtin_cons...( bytes_read )Description
TRUEnever evaluated
FALSEevaluated 182 times by 1 test
Evaluated by:
  • tee
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-182
377 )
__builtin_cons...( bytes_read )Description
TRUEnever evaluated
FALSEevaluated 182 times by 1 test
Evaluated by:
  • tee
&& __builtin_constant_p (
__builtin_constant_p ( 1 )Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-182
378 1
__builtin_constant_p ( 1 )Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-173
379 )
__builtin_constant_p ( 1 )Description
TRUEnever evaluated
FALSEnever evaluated
&& (
(size_t) ( byt..._t) ( 1 ) <= 8Description
TRUEnever evaluated
FALSEnever evaluated
size_t) (
(size_t) ( byt..._t) ( 1 ) <= 8Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-173
380 bytes_read
(size_t) ( byt..._t) ( 1 ) <= 8Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-173
381 ) * (size_t) (
(size_t) ( byt..._t) ( 1 ) <= 8Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-173
382 1
(size_t) ( byt..._t) ( 1 ) <= 8Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-173
383 ) <= 8
(size_t) ( byt..._t) ( 1 ) <= 8Description
TRUEnever evaluated
FALSEnever evaluated
&& (
(size_t) ( bytes_read ) != 0Description
TRUEnever evaluated
FALSEnever evaluated
size_t) (
(size_t) ( bytes_read ) != 0Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-173
384 bytes_read
(size_t) ( bytes_read ) != 0Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-173
385 ) != 0
(size_t) ( bytes_read ) != 0Description
TRUEnever evaluated
FALSEnever evaluated
) ? ({ const char *__ptr = (const char *) (
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-173
386 buffer
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
387 ); FILE *__stream = (
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
388 descriptors[i]
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
389 ); size_t __cnt; for (__cnt = (size_t) (
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
390 bytes_read
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
391 ) * (size_t) (
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
392 1
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
393 ); __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__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-173
394 bytes_read
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
395 ) * (size_t) (
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
396 1
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
397 ) - __cnt) / (size_t) (
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
398 bytes_read
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
399 ); }) : (((__builtin_constant_p (
__builtin_cons...( bytes_read )Description
TRUEnever evaluated
FALSEevaluated 182 times by 1 test
Evaluated by:
  • tee
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-182
400 bytes_read
__builtin_cons...( bytes_read )Description
TRUEnever evaluated
FALSEevaluated 182 times by 1 test
Evaluated by:
  • tee
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-182
401 )
__builtin_cons...( bytes_read )Description
TRUEnever evaluated
FALSEevaluated 182 times by 1 test
Evaluated by:
  • tee
&& (
(size_t) ( bytes_read ) == 0Description
TRUEnever evaluated
FALSEnever evaluated
size_t) (
(size_t) ( bytes_read ) == 0Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-182
402 bytes_read
(size_t) ( bytes_read ) == 0Description
TRUEnever evaluated
FALSEnever evaluated
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-173
403 ) == 0
(size_t) ( bytes_read ) == 0Description
TRUEnever evaluated
FALSEnever evaluated
) || (__builtin_constant_p (
__builtin_constant_p ( 1 )Description
TRUEevaluated 182 times by 1 test
Evaluated by:
  • tee
FALSEnever evaluated
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-182
404 1
__builtin_constant_p ( 1 )Description
TRUEevaluated 182 times by 1 test
Evaluated by:
  • tee
FALSEnever evaluated
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-182
405 )
__builtin_constant_p ( 1 )Description
TRUEevaluated 182 times by 1 test
Evaluated by:
  • tee
FALSEnever evaluated
&& (
(size_t) ( 1 ) == 0Description
TRUEnever evaluated
FALSEevaluated 182 times by 1 test
Evaluated by:
  • tee
size_t) (
(size_t) ( 1 ) == 0Description
TRUEnever evaluated
FALSEevaluated 182 times by 1 test
Evaluated by:
  • tee
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-182
406 1
(size_t) ( 1 ) == 0Description
TRUEnever evaluated
FALSEevaluated 182 times by 1 test
Evaluated by:
  • tee
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-182
407 ) == 0
(size_t) ( 1 ) == 0Description
TRUEnever evaluated
FALSEevaluated 182 times by 1 test
Evaluated by:
  • tee
)) ? ((void) (
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
0-182
408 buffer
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
409 ), (void) (
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
410 descriptors[i]
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
411 ), (void) (
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
412 bytes_read
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
413 ), (void) (
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
414 1
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
415 ), (size_t) 0) : fwrite_unlocked (
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
416 buffer
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
417 ,
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
418 bytes_read
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
419 ,
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
420 1
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
421 ,
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
422 descriptors[i]
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
423 ))))
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
9-173
424 != 1
(__extension__...s[i] )))) != 1Description
TRUEevaluated 9 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 173 times by 1 test
Evaluated by:
  • tee
)
9-173
425 {-
426 int w_errno = -
427 (*__errno_location ())-
428 ;-
429 -
430 _Bool -
431 fail = -
432 (*
(*__errno_location ()) != 32Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tee
__errno_location ())
(*__errno_location ()) != 32Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tee
4-5
433 !=
(*__errno_location ()) != 32Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tee
4-5
434 32
(*__errno_location ()) != 32Description
TRUEevaluated 4 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 5 times by 1 test
Evaluated by:
  • tee
4-5
435 || (output_error == output_error_exit
output_error =...put_error_exitDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tee
FALSEevaluated 4 times by 1 test
Evaluated by:
  • tee
1-4
436 || output_error == output_error_warn
output_error =...put_error_warnDescription
TRUEevaluated 1 time by 1 test
Evaluated by:
  • tee
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tee
);
1-3
437 if (descriptors[i] ==
descriptors[i] == stdoutDescription
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tee
2-7
438 stdout
descriptors[i] == stdoutDescription
TRUEevaluated 7 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 2 times by 1 test
Evaluated by:
  • tee
2-7
439 )-
440 clearerr_unlocked (
executed 7 times by 1 test: clearerr_unlocked ( stdout );
Executed by:
  • tee
7
441 stdout
executed 7 times by 1 test: clearerr_unlocked ( stdout );
Executed by:
  • tee
7
442 );
executed 7 times by 1 test: clearerr_unlocked ( stdout );
Executed by:
  • tee
7
443 if (fail
failDescription
TRUEevaluated 6 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tee
)
3-6
444 {-
445 error (output_error == output_error_exit-
446 || output_error == output_error_exit_nopipe,-
447 w_errno, "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, files[i]));-
448 }
executed 5 times by 1 test: end of block
Executed by:
  • tee
5
449 descriptors[i] = -
450 ((void *)0)-
451 ;-
452 if (fail
failDescription
TRUEevaluated 5 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tee
)
3-5
453 ok =
executed 5 times by 1 test: ok = 0 ;
Executed by:
  • tee
5
454 0
executed 5 times by 1 test: ok = 0 ;
Executed by:
  • tee
5
455 ;
executed 5 times by 1 test: ok = 0 ;
Executed by:
  • tee
5
456 n_outputs--;-
457 }
executed 8 times by 1 test: end of block
Executed by:
  • tee
8
458 }
executed 97 times by 1 test: end of block
Executed by:
  • tee
97
459-
460 if (bytes_read == -1
bytes_read == -1Description
TRUEnever evaluated
FALSEevaluated 50 times by 1 test
Evaluated by:
  • tee
)
0-50
461 {-
462 error (0, -
463 (*__errno_location ())-
464 , -
465 dcgettext (((void *)0), -
466 "read error"-
467 , 5)-
468 );-
469 ok = -
470 0-
471 ;-
472 }
never executed: end of block
0
473-
474-
475 for (i = 1; i <= nfiles
i <= nfilesDescription
TRUEevaluated 70 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 50 times by 1 test
Evaluated by:
  • tee
; i++)
50-70
476 if (descriptors[i]
descriptors[i]Description
TRUEevaluated 67 times by 1 test
Evaluated by:
  • tee
FALSEevaluated 3 times by 1 test
Evaluated by:
  • tee
&&
3-67
477 rpl_fclose
rpl_fclose (de...ptors[i]) != 0Description
TRUEnever evaluated
FALSEevaluated 67 times by 1 test
Evaluated by:
  • tee
0-67
478 (descriptors[i]) != 0
rpl_fclose (de...ptors[i]) != 0Description
TRUEnever evaluated
FALSEevaluated 67 times by 1 test
Evaluated by:
  • tee
)
0-67
479 {-
480 error (0, -
481 (*__errno_location ())-
482 , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, files[i]));-
483 ok = -
484 0-
485 ;-
486 }
never executed: end of block
0
487-
488 free (descriptors);-
489-
490 return
executed 50 times by 1 test: return ok;
Executed by:
  • tee
ok;
executed 50 times by 1 test: return ok;
Executed by:
  • tee
50
491}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2