| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/coreutils/src/gnulib/lib/version-etc.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | - | |||||||||||||
| 5 | - | |||||||||||||
| 6 | - | |||||||||||||
| 7 | - | |||||||||||||
| 8 | - | |||||||||||||
| 9 | enum { COPYRIGHT_YEAR = 2018 }; | - | ||||||||||||
| 10 | void | - | ||||||||||||
| 11 | version_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
| 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:
| 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: 0:case 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:
code before this statement never executed: case 1:executed 269 times by 49 tests: 1:case 1:Executed by:
code before this statement never executed: case 1:executed 269 times by 49 tests: case 1:Executed by:
| 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:
| 269 | ||||||||||||
| 52 | case executed 235 times by 33 tests: 2:case 2:Executed by:
executed 235 times by 33 tests: case 2:Executed by:
| 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:
| 235 | ||||||||||||
| 60 | case executed 217 times by 18 tests: 3:case 3:Executed by:
executed 217 times by 18 tests: case 3:Executed by:
| 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:
| 217 | ||||||||||||
| 69 | case executed 118 times by 3 tests: 4:case 4:Executed by:
executed 118 times by 3 tests: case 4:Executed by:
| 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:
| 118 | ||||||||||||
| 80 | case executed 19 times by 1 test: 5:case 5:Executed by:
executed 19 times by 1 test: case 5:Executed by:
| 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:
| 19 | ||||||||||||
| 91 | case never executed: 6:case 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: 7:case 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: 8:case 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: 9:case 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 | - | |||||||||||||
| 163 | void | - | ||||||||||||
| 164 | version_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]
| 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 | - | |||||||||||||
| 179 | void | - | ||||||||||||
| 180 | version_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
| 0-2815 | ||||||||||||
| 189 | && (
| 858-1957 | ||||||||||||
| 190 | __builtin_va_arg(
| 858-1957 | ||||||||||||
| 191 | authors
| 858-1957 | ||||||||||||
| 192 | ,
| 858-1957 | ||||||||||||
| 193 | const char *
| 858-1957 | ||||||||||||
| 194 | )
| 858-1957 | ||||||||||||
| 195 | ) !=
| 858-1957 | ||||||||||||
| 196 | ((void *)0)
| 858-1957 | ||||||||||||
| 197 | ; | - | ||||||||||||
| 198 | n_authors++) | - | ||||||||||||
| 199 | ; executed 1957 times by 104 tests: ;Executed by:
| 1957 | ||||||||||||
| 200 | version_etc_arn (stream, command_name, package, version, | - | ||||||||||||
| 201 | authtab, n_authors); | - | ||||||||||||
| 202 | } executed 858 times by 104 tests: end of blockExecuted by:
| 858 | ||||||||||||
| 203 | void | - | ||||||||||||
| 204 | version_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 blockExecuted by:
| 786 | ||||||||||||
| 224 | - | |||||||||||||
| 225 | void | - | ||||||||||||
| 226 | emit_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 code | Preprocessed file |