OpenCoverage

version-etc.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/gnulib/lib/version-etc.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9enum { COPYRIGHT_YEAR = 2018 };-
10void-
11version_etc_arn (FILE *stream,-
12 const char *command_name, const char *package,-
13 const char *version,-
14 const char * const * authors, size_t n_authors)-
15{-
16 if (command_name
command_nameDescription
TRUEevaluated 858 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
FALSEnever evaluated
)
0-858
17 fprintf (stream, "%s (%s) %s\n", command_name, package, version);
executed 858 times by 104 tests: fprintf (stream, "%s (%s) %s\n", command_name, package, version);
Executed by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
858
18 else-
19 fprintf (stream, "%s %s\n", package, version);
never executed: fprintf (stream, "%s %s\n", package, version);
0
20 fprintf (stream, version_etc_copyright, -
21 dcgettext (((void *)0), -
22 "(C)"-
23 , 5)-
24 , COPYRIGHT_YEAR);-
25-
26 fputs_unlocked (-
27 dcgettext (((void *)0), -
28 "\nLicense GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.\n\n"-
29 , 5)-
30 ,stream)-
31-
32-
33-
34-
35-
36-
37 ;-
38-
39 switch (n_authors)-
40 {-
41 case
never executed: case 0:
0:
never executed: case 0:
0
42-
43 abort ();
never executed: abort ();
0
44 case
executed 269 times by 49 tests: case 1:
Executed by:
  • base32
  • base64
  • basename
  • chroot
  • cksum
  • date
  • dircolors
  • expand
  • false
  • fmt
  • fold
  • ginstall
  • hostid
  • join
  • kill
  • link
  • logname
  • mkdir
  • mkfifo
  • mknod
  • nice
  • nohup
  • nproc
  • numfmt
  • od
  • ...
code before this statement never executed: case 1:
executed 269 times by 49 tests: case 1:
Executed by:
  • base32
  • base64
  • basename
  • chroot
  • cksum
  • date
  • dircolors
  • expand
  • false
  • fmt
  • fold
  • ginstall
  • hostid
  • join
  • kill
  • link
  • logname
  • mkdir
  • mkfifo
  • mknod
  • nice
  • nohup
  • nproc
  • numfmt
  • od
  • ...
1:
code before this statement never executed: case 1:
executed 269 times by 49 tests: case 1:
Executed by:
  • base32
  • base64
  • basename
  • chroot
  • cksum
  • date
  • dircolors
  • expand
  • false
  • fmt
  • fold
  • ginstall
  • hostid
  • join
  • kill
  • link
  • logname
  • mkdir
  • mkfifo
  • mknod
  • nice
  • nohup
  • nproc
  • numfmt
  • od
  • ...
0-269
45-
46 fprintf (stream, -
47 dcgettext (((void *)0), -
48 "Written by %s.\n"-
49 , 5)-
50 , authors[0]);-
51 break;
executed 269 times by 49 tests: break;
Executed by:
  • base32
  • base64
  • basename
  • chroot
  • cksum
  • date
  • dircolors
  • expand
  • false
  • fmt
  • fold
  • ginstall
  • hostid
  • join
  • kill
  • link
  • logname
  • mkdir
  • mkfifo
  • mknod
  • nice
  • nohup
  • nproc
  • numfmt
  • od
  • ...
269
52 case
executed 235 times by 33 tests: case 2:
Executed by:
  • [
  • b2sum
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • comm
  • csplit
  • dir
  • dirname
  • echo
  • env
  • groups
  • head
  • id
  • ln
  • ls
  • mktemp
  • nl
  • paste
  • pr
  • printenv
  • sleep
  • sort
  • ...
2:
executed 235 times by 33 tests: case 2:
Executed by:
  • [
  • b2sum
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • comm
  • csplit
  • dir
  • dirname
  • echo
  • env
  • groups
  • head
  • id
  • ln
  • ls
  • mktemp
  • nl
  • paste
  • pr
  • printenv
  • sleep
  • sort
  • ...
235
53-
54 fprintf (stream, -
55 dcgettext (((void *)0), -
56 "Written by %s and %s.\n"-
57 , 5)-
58 , authors[0], authors[1]);-
59 break;
executed 235 times by 33 tests: break;
Executed by:
  • [
  • b2sum
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • comm
  • csplit
  • dir
  • dirname
  • echo
  • env
  • groups
  • head
  • id
  • ln
  • ls
  • mktemp
  • nl
  • paste
  • pr
  • printenv
  • sleep
  • sort
  • ...
235
60 case
executed 217 times by 18 tests: case 3:
Executed by:
  • cp
  • cut
  • dd
  • df
  • expr
  • factor
  • md5sum
  • mv
  • pathchk
  • pinky
  • sha1sum
  • sha224sum
  • sha256sum
  • sha384sum
  • sha512sum
  • tee
  • uptime
  • who
3:
executed 217 times by 18 tests: case 3:
Executed by:
  • cp
  • cut
  • dd
  • df
  • expr
  • factor
  • md5sum
  • mv
  • pathchk
  • pinky
  • sha1sum
  • sha224sum
  • sha256sum
  • sha384sum
  • sha512sum
  • tee
  • uptime
  • who
217
61-
62 fprintf (stream, -
63 dcgettext (((void *)0), -
64 "Written by %s, %s, and %s.\n"-
65 , 5)-
66 ,-
67 authors[0], authors[1], authors[2]);-
68 break;
executed 217 times by 18 tests: break;
Executed by:
  • cp
  • cut
  • dd
  • df
  • expr
  • factor
  • md5sum
  • mv
  • pathchk
  • pinky
  • sha1sum
  • sha224sum
  • sha256sum
  • sha384sum
  • sha512sum
  • tee
  • uptime
  • who
217
69 case
executed 118 times by 3 tests: case 4:
Executed by:
  • du
  • rm
  • tail
4:
executed 118 times by 3 tests: case 4:
Executed by:
  • du
  • rm
  • tail
118
70-
71-
72-
73 fprintf (stream, -
74 dcgettext (((void *)0), -
75 "Written by %s, %s, %s,\nand %s.\n"-
76 , 5)-
77 ,-
78 authors[0], authors[1], authors[2], authors[3]);-
79 break;
executed 118 times by 3 tests: break;
Executed by:
  • du
  • rm
  • tail
118
80 case
executed 19 times by 1 test: case 5:
Executed by:
  • touch
5:
executed 19 times by 1 test: case 5:
Executed by:
  • touch
19
81-
82-
83-
84 fprintf (stream, -
85 dcgettext (((void *)0), -
86 "Written by %s, %s, %s,\n%s, and %s.\n"-
87 , 5)-
88 ,-
89 authors[0], authors[1], authors[2], authors[3], authors[4]);-
90 break;
executed 19 times by 1 test: break;
Executed by:
  • touch
19
91 case
never executed: case 6:
6:
never executed: case 6:
0
92-
93-
94-
95 fprintf (stream, -
96 dcgettext (((void *)0), -
97 "Written by %s, %s, %s,\n%s, %s, and %s.\n"-
98 , 5)-
99 ,-
100 authors[0], authors[1], authors[2], authors[3], authors[4],-
101 authors[5]);-
102 break;
never executed: break;
0
103 case
never executed: case 7:
7:
never executed: case 7:
0
104-
105-
106-
107 fprintf (stream, -
108 dcgettext (((void *)0), -
109 "Written by %s, %s, %s,\n%s, %s, %s, and %s.\n"-
110 , 5)-
111 ,-
112 authors[0], authors[1], authors[2], authors[3], authors[4],-
113 authors[5], authors[6]);-
114 break;
never executed: break;
0
115 case
never executed: case 8:
8:
never executed: case 8:
0
116-
117-
118-
119 fprintf (stream, -
120 dcgettext (((void *)0), -
121 "Written by %s, %s, %s,\n%s, %s, %s, %s,\nand %s.\n"-
122 , 5)-
123 -
124 ,-
125 authors[0], authors[1], authors[2], authors[3], authors[4],-
126 authors[5], authors[6], authors[7]);-
127 break;
never executed: break;
0
128 case
never executed: case 9:
9:
never executed: case 9:
0
129-
130-
131-
132 fprintf (stream, -
133 dcgettext (((void *)0), -
134 "Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, and %s.\n"-
135 , 5)-
136 -
137 ,-
138 authors[0], authors[1], authors[2], authors[3], authors[4],-
139 authors[5], authors[6], authors[7], authors[8]);-
140 break;
never executed: break;
0
141 default
never executed: default:
:
never executed: default:
0
142-
143-
144-
145-
146-
147 fprintf (stream, -
148 dcgettext (((void *)0), -
149 "Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, %s, and others.\n"-
150 , 5)-
151 -
152 ,-
153 authors[0], authors[1], authors[2], authors[3], authors[4],-
154 authors[5], authors[6], authors[7], authors[8]);-
155 break;
never executed: break;
0
156 }-
157}-
158-
159-
160-
161-
162-
163void-
164version_etc_ar (FILE *stream,-
165 const char *command_name, const char *package,-
166 const char *version, const char * const * authors)-
167{-
168 size_t n_authors;-
169-
170 for (n_authors = 0; authors[n_authors]
authors[n_authors]Description
TRUEnever evaluated
FALSEnever evaluated
; n_authors++)
0
171 ;
never executed: ;
0
172 version_etc_arn (stream, command_name, package, version, authors, n_authors);-
173}
never executed: end of block
0
174-
175-
176-
177-
178-
179void-
180version_etc_va (FILE *stream,-
181 const char *command_name, const char *package,-
182 const char *version, va_list authors)-
183{-
184 size_t n_authors;-
185 const char *authtab[10];-
186-
187 for (n_authors = 0;-
188 n_authors < 10
n_authors < 10Description
TRUEevaluated 2815 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
FALSEnever evaluated
0-2815
189 && (
(authtab[n_aut...!= ((void *)0)Description
TRUEevaluated 1957 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
FALSEevaluated 858 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
authtab[n_authors] =
(authtab[n_aut...!= ((void *)0)Description
TRUEevaluated 1957 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
FALSEevaluated 858 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
858-1957
190 __builtin_va_arg(
(authtab[n_aut...!= ((void *)0)Description
TRUEevaluated 1957 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
FALSEevaluated 858 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
858-1957
191 authors
(authtab[n_aut...!= ((void *)0)Description
TRUEevaluated 1957 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
FALSEevaluated 858 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
858-1957
192 ,
(authtab[n_aut...!= ((void *)0)Description
TRUEevaluated 1957 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
FALSEevaluated 858 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
858-1957
193 const char *
(authtab[n_aut...!= ((void *)0)Description
TRUEevaluated 1957 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
FALSEevaluated 858 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
858-1957
194 )
(authtab[n_aut...!= ((void *)0)Description
TRUEevaluated 1957 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
FALSEevaluated 858 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
858-1957
195 ) !=
(authtab[n_aut...!= ((void *)0)Description
TRUEevaluated 1957 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
FALSEevaluated 858 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
858-1957
196 ((void *)0)
(authtab[n_aut...!= ((void *)0)Description
TRUEevaluated 1957 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
FALSEevaluated 858 times by 104 tests
Evaluated by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
858-1957
197 ;-
198 n_authors++)-
199 ;
executed 1957 times by 104 tests: ;
Executed by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
1957
200 version_etc_arn (stream, command_name, package, version,-
201 authtab, n_authors);-
202}
executed 858 times by 104 tests: end of block
Executed by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • ...
858
203void-
204version_etc (FILE *stream,-
205 const char *command_name, const char *package,-
206 const char *version, ...)-
207{-
208 va_list authors;-
209-
210 -
211 __builtin_va_start(-
212 authors-
213 ,-
214 version-
215 )-
216 ;-
217 version_etc_va (stream, command_name, package, version, authors);-
218 -
219 __builtin_va_end(-
220 authors-
221 )-
222 ;-
223}
executed 786 times by 90 tests: end of block
Executed by:
  • [
  • b2sum
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • comm
  • cp
  • csplit
  • cut
  • date
  • df
  • dir
  • dircolors
  • dirname
  • du
  • echo
  • env
  • expand
  • factor
  • ...
786
224-
225void-
226emit_bug_reporting_address (void)-
227{-
228-
229-
230-
231-
232 printf (-
233 dcgettext (((void *)0), -
234 "\nReport bugs to: %s\n"-
235 , 5)-
236 , "bug-coreutils@gnu.org");-
237-
238-
239-
240-
241-
242 printf (-
243 dcgettext (((void *)0), -
244 "%s home page: <%s>\n"-
245 , 5)-
246 , "GNU coreutils", "https://www.gnu.org/software/coreutils/");-
247-
248-
249-
250-
251 fputs_unlocked (-
252 dcgettext (((void *)0), -
253 "General help using GNU software: <https://www.gnu.org/gethelp/>\n"-
254 , 5)-
255 ,-
256 stdout-
257 )-
258 ;-
259}
never executed: end of block
0
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2