Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/coreutils/src/src/date.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||||||||
2 | - | |||||||||||||||||||
3 | - | |||||||||||||||||||
4 | - | |||||||||||||||||||
5 | - | |||||||||||||||||||
6 | - | |||||||||||||||||||
7 | - | |||||||||||||||||||
8 | - | |||||||||||||||||||
9 | - | |||||||||||||||||||
10 | - | |||||||||||||||||||
11 | static | - | ||||||||||||||||||
12 | _Bool | - | ||||||||||||||||||
13 | show_date (const char *, struct timespec, timezone_t); | - | ||||||||||||||||||
14 | - | |||||||||||||||||||
15 | enum Time_spec | - | ||||||||||||||||||
16 | { | - | ||||||||||||||||||
17 | - | |||||||||||||||||||
18 | TIME_SPEC_DATE, | - | ||||||||||||||||||
19 | - | |||||||||||||||||||
20 | TIME_SPEC_SECONDS, | - | ||||||||||||||||||
21 | - | |||||||||||||||||||
22 | TIME_SPEC_NS, | - | ||||||||||||||||||
23 | - | |||||||||||||||||||
24 | - | |||||||||||||||||||
25 | - | |||||||||||||||||||
26 | - | |||||||||||||||||||
27 | TIME_SPEC_HOURS, | - | ||||||||||||||||||
28 | - | |||||||||||||||||||
29 | TIME_SPEC_MINUTES | - | ||||||||||||||||||
30 | }; | - | ||||||||||||||||||
31 | - | |||||||||||||||||||
32 | static char const *const time_spec_string[] = | - | ||||||||||||||||||
33 | { | - | ||||||||||||||||||
34 | - | |||||||||||||||||||
35 | - | |||||||||||||||||||
36 | "hours", "minutes", | - | ||||||||||||||||||
37 | "date", "seconds", "ns", | - | ||||||||||||||||||
38 | ((void *)0) | - | ||||||||||||||||||
39 | - | |||||||||||||||||||
40 | }; | - | ||||||||||||||||||
41 | static enum Time_spec const time_spec[] = | - | ||||||||||||||||||
42 | { | - | ||||||||||||||||||
43 | TIME_SPEC_HOURS, TIME_SPEC_MINUTES, | - | ||||||||||||||||||
44 | TIME_SPEC_DATE, TIME_SPEC_SECONDS, TIME_SPEC_NS | - | ||||||||||||||||||
45 | }; | - | ||||||||||||||||||
46 | _Static_assert ((sizeof (time_spec_string) / sizeof *(time_spec_string)) == (sizeof (time_spec) / sizeof *(time_spec)) + 1, "verify (" "ARRAY_CARDINALITY (time_spec_string) == ARRAY_CARDINALITY (time_spec) + 1" ")"); | - | ||||||||||||||||||
47 | - | |||||||||||||||||||
48 | - | |||||||||||||||||||
49 | static char const rfc_email_format[] = "%a, %d %b %Y %H:%M:%S %z"; | - | ||||||||||||||||||
50 | - | |||||||||||||||||||
51 | - | |||||||||||||||||||
52 | - | |||||||||||||||||||
53 | enum | - | ||||||||||||||||||
54 | { | - | ||||||||||||||||||
55 | RFC_3339_OPTION = 0x7f + 1, | - | ||||||||||||||||||
56 | DEBUG_DATE_PARSING | - | ||||||||||||||||||
57 | }; | - | ||||||||||||||||||
58 | - | |||||||||||||||||||
59 | static char const short_options[] = "d:f:I::r:Rs:u"; | - | ||||||||||||||||||
60 | - | |||||||||||||||||||
61 | static struct option const long_options[] = | - | ||||||||||||||||||
62 | { | - | ||||||||||||||||||
63 | {"date", | - | ||||||||||||||||||
64 | 1 | - | ||||||||||||||||||
65 | , | - | ||||||||||||||||||
66 | ((void *)0) | - | ||||||||||||||||||
67 | , 'd'}, | - | ||||||||||||||||||
68 | {"debug", | - | ||||||||||||||||||
69 | 0 | - | ||||||||||||||||||
70 | , | - | ||||||||||||||||||
71 | ((void *)0) | - | ||||||||||||||||||
72 | , DEBUG_DATE_PARSING}, | - | ||||||||||||||||||
73 | {"file", | - | ||||||||||||||||||
74 | 1 | - | ||||||||||||||||||
75 | , | - | ||||||||||||||||||
76 | ((void *)0) | - | ||||||||||||||||||
77 | , 'f'}, | - | ||||||||||||||||||
78 | {"iso-8601", | - | ||||||||||||||||||
79 | 2 | - | ||||||||||||||||||
80 | , | - | ||||||||||||||||||
81 | ((void *)0) | - | ||||||||||||||||||
82 | , 'I'}, | - | ||||||||||||||||||
83 | {"reference", | - | ||||||||||||||||||
84 | 1 | - | ||||||||||||||||||
85 | , | - | ||||||||||||||||||
86 | ((void *)0) | - | ||||||||||||||||||
87 | , 'r'}, | - | ||||||||||||||||||
88 | {"rfc-email", | - | ||||||||||||||||||
89 | 0 | - | ||||||||||||||||||
90 | , | - | ||||||||||||||||||
91 | ((void *)0) | - | ||||||||||||||||||
92 | , 'R'}, | - | ||||||||||||||||||
93 | {"rfc-822", | - | ||||||||||||||||||
94 | 0 | - | ||||||||||||||||||
95 | , | - | ||||||||||||||||||
96 | ((void *)0) | - | ||||||||||||||||||
97 | , 'R'}, | - | ||||||||||||||||||
98 | {"rfc-2822", | - | ||||||||||||||||||
99 | 0 | - | ||||||||||||||||||
100 | , | - | ||||||||||||||||||
101 | ((void *)0) | - | ||||||||||||||||||
102 | , 'R'}, | - | ||||||||||||||||||
103 | {"rfc-3339", | - | ||||||||||||||||||
104 | 1 | - | ||||||||||||||||||
105 | , | - | ||||||||||||||||||
106 | ((void *)0) | - | ||||||||||||||||||
107 | , RFC_3339_OPTION}, | - | ||||||||||||||||||
108 | {"set", | - | ||||||||||||||||||
109 | 1 | - | ||||||||||||||||||
110 | , | - | ||||||||||||||||||
111 | ((void *)0) | - | ||||||||||||||||||
112 | , 's'}, | - | ||||||||||||||||||
113 | {"uct", | - | ||||||||||||||||||
114 | 0 | - | ||||||||||||||||||
115 | , | - | ||||||||||||||||||
116 | ((void *)0) | - | ||||||||||||||||||
117 | , 'u'}, | - | ||||||||||||||||||
118 | {"utc", | - | ||||||||||||||||||
119 | 0 | - | ||||||||||||||||||
120 | , | - | ||||||||||||||||||
121 | ((void *)0) | - | ||||||||||||||||||
122 | , 'u'}, | - | ||||||||||||||||||
123 | {"universal", | - | ||||||||||||||||||
124 | 0 | - | ||||||||||||||||||
125 | , | - | ||||||||||||||||||
126 | ((void *)0) | - | ||||||||||||||||||
127 | , 'u'}, | - | ||||||||||||||||||
128 | {"help", | - | ||||||||||||||||||
129 | 0 | - | ||||||||||||||||||
130 | , | - | ||||||||||||||||||
131 | ((void *)0) | - | ||||||||||||||||||
132 | , GETOPT_HELP_CHAR}, | - | ||||||||||||||||||
133 | {"version", | - | ||||||||||||||||||
134 | 0 | - | ||||||||||||||||||
135 | , | - | ||||||||||||||||||
136 | ((void *)0) | - | ||||||||||||||||||
137 | , GETOPT_VERSION_CHAR}, | - | ||||||||||||||||||
138 | { | - | ||||||||||||||||||
139 | ((void *)0) | - | ||||||||||||||||||
140 | , 0, | - | ||||||||||||||||||
141 | ((void *)0) | - | ||||||||||||||||||
142 | , 0} | - | ||||||||||||||||||
143 | }; | - | ||||||||||||||||||
144 | - | |||||||||||||||||||
145 | - | |||||||||||||||||||
146 | static unsigned int parse_datetime_flags; | - | ||||||||||||||||||
147 | void | - | ||||||||||||||||||
148 | usage (int status) | - | ||||||||||||||||||
149 | { | - | ||||||||||||||||||
150 | if (status !=
| 4-18 | ||||||||||||||||||
151 | 0
| 4-18 | ||||||||||||||||||
152 | ) | - | ||||||||||||||||||
153 | do { fprintf ( | - | ||||||||||||||||||
154 | stderr | - | ||||||||||||||||||
155 | , | - | ||||||||||||||||||
156 | dcgettext (((void *)0), | - | ||||||||||||||||||
157 | "Try '%s --help' for more information.\n" | - | ||||||||||||||||||
158 | , 5) | - | ||||||||||||||||||
159 | , program_name); } executed 4 times by 1 test: while (0);end of block Executed by:
| 4 | ||||||||||||||||||
160 | else | - | ||||||||||||||||||
161 | { | - | ||||||||||||||||||
162 | printf ( | - | ||||||||||||||||||
163 | dcgettext (((void *)0), | - | ||||||||||||||||||
164 | "Usage: %s [OPTION]... [+FORMAT]\n or: %s [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]\n" | - | ||||||||||||||||||
165 | , 5) | - | ||||||||||||||||||
166 | - | |||||||||||||||||||
167 | - | |||||||||||||||||||
168 | - | |||||||||||||||||||
169 | , | - | ||||||||||||||||||
170 | program_name, program_name); | - | ||||||||||||||||||
171 | fputs_unlocked ( | - | ||||||||||||||||||
172 | dcgettext (((void *)0), | - | ||||||||||||||||||
173 | "Display the current time in the given FORMAT, or set the system date.\n" | - | ||||||||||||||||||
174 | , 5) | - | ||||||||||||||||||
175 | , | - | ||||||||||||||||||
176 | stdout | - | ||||||||||||||||||
177 | ) | - | ||||||||||||||||||
178 | - | |||||||||||||||||||
179 | ; | - | ||||||||||||||||||
180 | - | |||||||||||||||||||
181 | emit_mandatory_arg_note (); | - | ||||||||||||||||||
182 | - | |||||||||||||||||||
183 | fputs_unlocked ( | - | ||||||||||||||||||
184 | dcgettext (((void *)0), | - | ||||||||||||||||||
185 | " -d, --date=STRING display time described by STRING, not 'now'\n" | - | ||||||||||||||||||
186 | , 5) | - | ||||||||||||||||||
187 | , | - | ||||||||||||||||||
188 | stdout | - | ||||||||||||||||||
189 | ) | - | ||||||||||||||||||
190 | - | |||||||||||||||||||
191 | ; | - | ||||||||||||||||||
192 | fputs_unlocked ( | - | ||||||||||||||||||
193 | dcgettext (((void *)0), | - | ||||||||||||||||||
194 | " --debug annotate the parsed date,\n and warn about questionable usage to stderr\n" | - | ||||||||||||||||||
195 | , 5) | - | ||||||||||||||||||
196 | , | - | ||||||||||||||||||
197 | stdout | - | ||||||||||||||||||
198 | ) | - | ||||||||||||||||||
199 | - | |||||||||||||||||||
200 | - | |||||||||||||||||||
201 | ; | - | ||||||||||||||||||
202 | fputs_unlocked ( | - | ||||||||||||||||||
203 | dcgettext (((void *)0), | - | ||||||||||||||||||
204 | " -f, --file=DATEFILE like --date; once for each line of DATEFILE\n" | - | ||||||||||||||||||
205 | , 5) | - | ||||||||||||||||||
206 | , | - | ||||||||||||||||||
207 | stdout | - | ||||||||||||||||||
208 | ) | - | ||||||||||||||||||
209 | - | |||||||||||||||||||
210 | ; | - | ||||||||||||||||||
211 | fputs_unlocked ( | - | ||||||||||||||||||
212 | dcgettext (((void *)0), | - | ||||||||||||||||||
213 | " -I[FMT], --iso-8601[=FMT] output date/time in ISO 8601 format.\n FMT='date' for date only (the default),\n 'hours', 'minutes', 'seconds', or 'ns'\n for date and time to the indicated precision.\n Example: 2006-08-14T02:34:56-06:00\n" | - | ||||||||||||||||||
214 | , 5) | - | ||||||||||||||||||
215 | , | - | ||||||||||||||||||
216 | stdout | - | ||||||||||||||||||
217 | ) | - | ||||||||||||||||||
218 | - | |||||||||||||||||||
219 | - | |||||||||||||||||||
220 | - | |||||||||||||||||||
221 | - | |||||||||||||||||||
222 | - | |||||||||||||||||||
223 | ; | - | ||||||||||||||||||
224 | fputs_unlocked ( | - | ||||||||||||||||||
225 | dcgettext (((void *)0), | - | ||||||||||||||||||
226 | " -R, --rfc-email output date and time in RFC 5322 format.\n Example: Mon, 14 Aug 2006 02:34:56 -0600\n" | - | ||||||||||||||||||
227 | , 5) | - | ||||||||||||||||||
228 | , | - | ||||||||||||||||||
229 | stdout | - | ||||||||||||||||||
230 | ) | - | ||||||||||||||||||
231 | - | |||||||||||||||||||
232 | - | |||||||||||||||||||
233 | ; | - | ||||||||||||||||||
234 | fputs_unlocked ( | - | ||||||||||||||||||
235 | dcgettext (((void *)0), | - | ||||||||||||||||||
236 | " --rfc-3339=FMT output date/time in RFC 3339 format.\n FMT='date', 'seconds', or 'ns'\n for date and time to the indicated precision.\n Example: 2006-08-14 02:34:56-06:00\n" | - | ||||||||||||||||||
237 | , 5) | - | ||||||||||||||||||
238 | , | - | ||||||||||||||||||
239 | stdout | - | ||||||||||||||||||
240 | ) | - | ||||||||||||||||||
241 | - | |||||||||||||||||||
242 | - | |||||||||||||||||||
243 | - | |||||||||||||||||||
244 | - | |||||||||||||||||||
245 | ; | - | ||||||||||||||||||
246 | fputs_unlocked ( | - | ||||||||||||||||||
247 | dcgettext (((void *)0), | - | ||||||||||||||||||
248 | " -r, --reference=FILE display the last modification time of FILE\n" | - | ||||||||||||||||||
249 | , 5) | - | ||||||||||||||||||
250 | , | - | ||||||||||||||||||
251 | stdout | - | ||||||||||||||||||
252 | ) | - | ||||||||||||||||||
253 | - | |||||||||||||||||||
254 | ; | - | ||||||||||||||||||
255 | fputs_unlocked ( | - | ||||||||||||||||||
256 | dcgettext (((void *)0), | - | ||||||||||||||||||
257 | " -s, --set=STRING set time described by STRING\n -u, --utc, --universal print or set Coordinated Universal Time (UTC)\n" | - | ||||||||||||||||||
258 | , 5) | - | ||||||||||||||||||
259 | , | - | ||||||||||||||||||
260 | stdout | - | ||||||||||||||||||
261 | ) | - | ||||||||||||||||||
262 | - | |||||||||||||||||||
263 | - | |||||||||||||||||||
264 | ; | - | ||||||||||||||||||
265 | fputs_unlocked ( | - | ||||||||||||||||||
266 | dcgettext (((void *)0), | - | ||||||||||||||||||
267 | " --help display this help and exit\n" | - | ||||||||||||||||||
268 | , 5) | - | ||||||||||||||||||
269 | , | - | ||||||||||||||||||
270 | stdout | - | ||||||||||||||||||
271 | ); | - | ||||||||||||||||||
272 | fputs_unlocked ( | - | ||||||||||||||||||
273 | dcgettext (((void *)0), | - | ||||||||||||||||||
274 | " --version output version information and exit\n" | - | ||||||||||||||||||
275 | , 5) | - | ||||||||||||||||||
276 | , | - | ||||||||||||||||||
277 | stdout | - | ||||||||||||||||||
278 | ); | - | ||||||||||||||||||
279 | fputs_unlocked ( | - | ||||||||||||||||||
280 | dcgettext (((void *)0), | - | ||||||||||||||||||
281 | "\nFORMAT controls the output. Interpreted sequences are:\n\n %% a literal %\n %a locale's abbreviated weekday name (e.g., Sun)\n" | - | ||||||||||||||||||
282 | , 5) | - | ||||||||||||||||||
283 | , | - | ||||||||||||||||||
284 | stdout | - | ||||||||||||||||||
285 | ) | - | ||||||||||||||||||
286 | - | |||||||||||||||||||
287 | - | |||||||||||||||||||
288 | - | |||||||||||||||||||
289 | - | |||||||||||||||||||
290 | - | |||||||||||||||||||
291 | ; | - | ||||||||||||||||||
292 | fputs_unlocked ( | - | ||||||||||||||||||
293 | dcgettext (((void *)0), | - | ||||||||||||||||||
294 | " %A locale's full weekday name (e.g., Sunday)\n %b locale's abbreviated month name (e.g., Jan)\n %B locale's full month name (e.g., January)\n %c locale's date and time (e.g., Thu Mar 3 23:05:25 2005)\n" | - | ||||||||||||||||||
295 | , 5) | - | ||||||||||||||||||
296 | , | - | ||||||||||||||||||
297 | stdout | - | ||||||||||||||||||
298 | ) | - | ||||||||||||||||||
299 | - | |||||||||||||||||||
300 | - | |||||||||||||||||||
301 | - | |||||||||||||||||||
302 | - | |||||||||||||||||||
303 | ; | - | ||||||||||||||||||
304 | fputs_unlocked ( | - | ||||||||||||||||||
305 | dcgettext (((void *)0), | - | ||||||||||||||||||
306 | " %C century; like %Y, except omit last two digits (e.g., 20)\n %d day of month (e.g., 01)\n %D date; same as %m/%d/%y\n %e day of month, space padded; same as %_d\n" | - | ||||||||||||||||||
307 | , 5) | - | ||||||||||||||||||
308 | , | - | ||||||||||||||||||
309 | stdout | - | ||||||||||||||||||
310 | ) | - | ||||||||||||||||||
311 | - | |||||||||||||||||||
312 | - | |||||||||||||||||||
313 | - | |||||||||||||||||||
314 | - | |||||||||||||||||||
315 | ; | - | ||||||||||||||||||
316 | fputs_unlocked ( | - | ||||||||||||||||||
317 | dcgettext (((void *)0), | - | ||||||||||||||||||
318 | " %F full date; same as %Y-%m-%d\n %g last two digits of year of ISO week number (see %G)\n %G year of ISO week number (see %V); normally useful only with %V\n" | - | ||||||||||||||||||
319 | , 5) | - | ||||||||||||||||||
320 | , | - | ||||||||||||||||||
321 | stdout | - | ||||||||||||||||||
322 | ) | - | ||||||||||||||||||
323 | - | |||||||||||||||||||
324 | - | |||||||||||||||||||
325 | - | |||||||||||||||||||
326 | ; | - | ||||||||||||||||||
327 | fputs_unlocked ( | - | ||||||||||||||||||
328 | dcgettext (((void *)0), | - | ||||||||||||||||||
329 | " %h same as %b\n %H hour (00..23)\n %I hour (01..12)\n %j day of year (001..366)\n" | - | ||||||||||||||||||
330 | , 5) | - | ||||||||||||||||||
331 | , | - | ||||||||||||||||||
332 | stdout | - | ||||||||||||||||||
333 | ) | - | ||||||||||||||||||
334 | - | |||||||||||||||||||
335 | - | |||||||||||||||||||
336 | - | |||||||||||||||||||
337 | - | |||||||||||||||||||
338 | ; | - | ||||||||||||||||||
339 | fputs_unlocked ( | - | ||||||||||||||||||
340 | dcgettext (((void *)0), | - | ||||||||||||||||||
341 | " %k hour, space padded ( 0..23); same as %_H\n %l hour, space padded ( 1..12); same as %_I\n %m month (01..12)\n %M minute (00..59)\n" | - | ||||||||||||||||||
342 | , 5) | - | ||||||||||||||||||
343 | , | - | ||||||||||||||||||
344 | stdout | - | ||||||||||||||||||
345 | ) | - | ||||||||||||||||||
346 | - | |||||||||||||||||||
347 | - | |||||||||||||||||||
348 | - | |||||||||||||||||||
349 | - | |||||||||||||||||||
350 | ; | - | ||||||||||||||||||
351 | fputs_unlocked ( | - | ||||||||||||||||||
352 | dcgettext (((void *)0), | - | ||||||||||||||||||
353 | " %n a newline\n %N nanoseconds (000000000..999999999)\n %p locale's equivalent of either AM or PM; blank if not known\n %P like %p, but lower case\n %q quarter of year (1..4)\n %r locale's 12-hour clock time (e.g., 11:11:04 PM)\n %R 24-hour hour and minute; same as %H:%M\n %s seconds since 1970-01-01 00:00:00 UTC\n" | - | ||||||||||||||||||
354 | , 5) | - | ||||||||||||||||||
355 | , | - | ||||||||||||||||||
356 | stdout | - | ||||||||||||||||||
357 | ) | - | ||||||||||||||||||
358 | ; | - | ||||||||||||||||||
359 | fputs_unlocked ( | - | ||||||||||||||||||
360 | dcgettext (((void *)0), | - | ||||||||||||||||||
361 | " %S second (00..60)\n %t a tab\n %T time; same as %H:%M:%S\n %u day of week (1..7); 1 is Monday\n" | - | ||||||||||||||||||
362 | , 5) | - | ||||||||||||||||||
363 | , | - | ||||||||||||||||||
364 | stdout | - | ||||||||||||||||||
365 | ) | - | ||||||||||||||||||
366 | - | |||||||||||||||||||
367 | - | |||||||||||||||||||
368 | - | |||||||||||||||||||
369 | - | |||||||||||||||||||
370 | ; | - | ||||||||||||||||||
371 | fputs_unlocked ( | - | ||||||||||||||||||
372 | dcgettext (((void *)0), | - | ||||||||||||||||||
373 | " %U week number of year, with Sunday as first day of week (00..53)\n %V ISO week number, with Monday as first day of week (01..53)\n %w day of week (0..6); 0 is Sunday\n %W week number of year, with Monday as first day of week (00..53)\n" | - | ||||||||||||||||||
374 | , 5) | - | ||||||||||||||||||
375 | , | - | ||||||||||||||||||
376 | stdout | - | ||||||||||||||||||
377 | ) | - | ||||||||||||||||||
378 | - | |||||||||||||||||||
379 | - | |||||||||||||||||||
380 | - | |||||||||||||||||||
381 | - | |||||||||||||||||||
382 | ; | - | ||||||||||||||||||
383 | fputs_unlocked ( | - | ||||||||||||||||||
384 | dcgettext (((void *)0), | - | ||||||||||||||||||
385 | " %x locale's date representation (e.g., 12/31/99)\n %X locale's time representation (e.g., 23:13:48)\n %y last two digits of year (00..99)\n %Y year\n" | - | ||||||||||||||||||
386 | , 5) | - | ||||||||||||||||||
387 | , | - | ||||||||||||||||||
388 | stdout | - | ||||||||||||||||||
389 | ) | - | ||||||||||||||||||
390 | - | |||||||||||||||||||
391 | - | |||||||||||||||||||
392 | - | |||||||||||||||||||
393 | - | |||||||||||||||||||
394 | ; | - | ||||||||||||||||||
395 | fputs_unlocked ( | - | ||||||||||||||||||
396 | dcgettext (((void *)0), | - | ||||||||||||||||||
397 | " %z +hhmm numeric time zone (e.g., -0400)\n %:z +hh:mm numeric time zone (e.g., -04:00)\n %::z +hh:mm:ss numeric time zone (e.g., -04:00:00)\n %:::z numeric time zone with : to necessary precision (e.g., -04, +05:30)\n %Z alphabetic time zone abbreviation (e.g., EDT)\n\nBy default, date pads numeric fields with zeroes.\n" | - | ||||||||||||||||||
398 | , 5) | - | ||||||||||||||||||
399 | , | - | ||||||||||||||||||
400 | stdout | - | ||||||||||||||||||
401 | ) | - | ||||||||||||||||||
402 | - | |||||||||||||||||||
403 | - | |||||||||||||||||||
404 | - | |||||||||||||||||||
405 | - | |||||||||||||||||||
406 | - | |||||||||||||||||||
407 | - | |||||||||||||||||||
408 | - | |||||||||||||||||||
409 | ; | - | ||||||||||||||||||
410 | fputs_unlocked ( | - | ||||||||||||||||||
411 | dcgettext (((void *)0), | - | ||||||||||||||||||
412 | "The following optional flags may follow '%':\n\n - (hyphen) do not pad the field\n _ (underscore) pad with spaces\n 0 (zero) pad with zeros\n ^ use upper case if possible\n # use opposite case if possible\n" | - | ||||||||||||||||||
413 | , 5) | - | ||||||||||||||||||
414 | , | - | ||||||||||||||||||
415 | stdout | - | ||||||||||||||||||
416 | ) | - | ||||||||||||||||||
417 | - | |||||||||||||||||||
418 | - | |||||||||||||||||||
419 | - | |||||||||||||||||||
420 | - | |||||||||||||||||||
421 | - | |||||||||||||||||||
422 | - | |||||||||||||||||||
423 | - | |||||||||||||||||||
424 | ; | - | ||||||||||||||||||
425 | fputs_unlocked ( | - | ||||||||||||||||||
426 | dcgettext (((void *)0), | - | ||||||||||||||||||
427 | "\nAfter any flags comes an optional field width, as a decimal number;\nthen an optional modifier, which is either\nE to use the locale's alternate representations if available, or\nO to use the locale's alternate numeric symbols if available.\n" | - | ||||||||||||||||||
428 | , 5) | - | ||||||||||||||||||
429 | , | - | ||||||||||||||||||
430 | stdout | - | ||||||||||||||||||
431 | ) | - | ||||||||||||||||||
432 | - | |||||||||||||||||||
433 | - | |||||||||||||||||||
434 | - | |||||||||||||||||||
435 | - | |||||||||||||||||||
436 | - | |||||||||||||||||||
437 | ; | - | ||||||||||||||||||
438 | fputs_unlocked ( | - | ||||||||||||||||||
439 | dcgettext (((void *)0), | - | ||||||||||||||||||
440 | "\nExamples:\nConvert seconds since the epoch (1970-01-01 UTC) to a date\n $ date --date='@2147483647'\n\nShow the time on the west coast of the US (use tzselect(1) to find TZ)\n $ TZ='America/Los_Angeles' date\n\nShow the local time for 9AM next Friday on the west coast of the US\n $ date --date='TZ=\"America/Los_Angeles\" 09:00 next Fri'\n" | - | ||||||||||||||||||
441 | , 5) | - | ||||||||||||||||||
442 | , | - | ||||||||||||||||||
443 | stdout | - | ||||||||||||||||||
444 | ) | - | ||||||||||||||||||
445 | ; | - | ||||||||||||||||||
446 | emit_ancillary_info ("date"); | - | ||||||||||||||||||
447 | } executed 18 times by 1 test: end of block Executed by:
| 18 | ||||||||||||||||||
448 | exit (status); executed 22 times by 1 test: exit (status); Executed by:
| 22 | ||||||||||||||||||
449 | } | - | ||||||||||||||||||
450 | - | |||||||||||||||||||
451 | - | |||||||||||||||||||
452 | - | |||||||||||||||||||
453 | - | |||||||||||||||||||
454 | - | |||||||||||||||||||
455 | - | |||||||||||||||||||
456 | static | - | ||||||||||||||||||
457 | _Bool | - | ||||||||||||||||||
458 | - | |||||||||||||||||||
459 | batch_convert (const char *input_filename, const char *format, | - | ||||||||||||||||||
460 | timezone_t tz, char const *tzstring) | - | ||||||||||||||||||
461 | { | - | ||||||||||||||||||
462 | - | |||||||||||||||||||
463 | _Bool | - | ||||||||||||||||||
464 | ok; | - | ||||||||||||||||||
465 | FILE *in_stream; | - | ||||||||||||||||||
466 | char *line; | - | ||||||||||||||||||
467 | size_t buflen; | - | ||||||||||||||||||
468 | struct timespec when; | - | ||||||||||||||||||
469 | - | |||||||||||||||||||
470 | if ((
| 0-4 | ||||||||||||||||||
471 | __extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (
| 0-4 | ||||||||||||||||||
472 | input_filename
| 0-4 | ||||||||||||||||||
473 | ) && __builtin_constant_p (
| 0-4 | ||||||||||||||||||
474 | "-"
| 0-4 | ||||||||||||||||||
475 | ) && (__s1_len = __builtin_strlen (
| 0-4 | ||||||||||||||||||
476 | input_filename
| 0-4 | ||||||||||||||||||
477 | ), __s2_len = __builtin_strlen (
| 0-4 | ||||||||||||||||||
478 | "-"
| 0-4 | ||||||||||||||||||
479 | ), (!((size_t)(const void *)((
| 0-4 | ||||||||||||||||||
480 | input_filename
| 0-4 | ||||||||||||||||||
481 | ) + 1) - (size_t)(const void *)(
| 0-4 | ||||||||||||||||||
482 | input_filename
| 0-4 | ||||||||||||||||||
483 | ) == 1) || __s1_len >= 4) && (!((size_t)(const void *)((
| 0-4 | ||||||||||||||||||
484 | "-"
| 0-4 | ||||||||||||||||||
485 | ) + 1) - (size_t)(const void *)(
| 0-4 | ||||||||||||||||||
486 | "-"
| 0-4 | ||||||||||||||||||
487 | ) == 1) || __s2_len >= 4)) ? __builtin_strcmp (
| 0-4 | ||||||||||||||||||
488 | input_filename
| 0-4 | ||||||||||||||||||
489 | ,
| 0-4 | ||||||||||||||||||
490 | "-"
| 0-4 | ||||||||||||||||||
491 | ) : (__builtin_constant_p (
| 0-4 | ||||||||||||||||||
492 | input_filename
| 0-4 | ||||||||||||||||||
493 | ) && ((size_t)(const void *)((
| 0-4 | ||||||||||||||||||
494 | input_filename
| 0-4 | ||||||||||||||||||
495 | ) + 1) - (size_t)(const void *)(
| 0-4 | ||||||||||||||||||
496 | input_filename
| 0-4 | ||||||||||||||||||
497 | ) == 1) && (__s1_len = __builtin_strlen (
| 0-4 | ||||||||||||||||||
498 | input_filename
| 0-4 | ||||||||||||||||||
499 | ), __s1_len < 4) ? (__builtin_constant_p (
| 0-4 | ||||||||||||||||||
500 | "-"
| 0-4 | ||||||||||||||||||
501 | ) && ((size_t)(const void *)((
| 0-4 | ||||||||||||||||||
502 | "-"
| 0-4 | ||||||||||||||||||
503 | ) + 1) - (size_t)(const void *)(
| 0-4 | ||||||||||||||||||
504 | "-"
| 0-4 | ||||||||||||||||||
505 | ) == 1) ? __builtin_strcmp (
| 0-4 | ||||||||||||||||||
506 | input_filename
| 0-4 | ||||||||||||||||||
507 | ,
| 0-4 | ||||||||||||||||||
508 | "-"
| 0-4 | ||||||||||||||||||
509 | ) : (__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
| 0-4 | ||||||||||||||||||
510 | "-"
| 0-4 | ||||||||||||||||||
511 | ); int __result = (((const unsigned char *) (const char *) (
| 0-4 | ||||||||||||||||||
512 | input_filename
| 0-4 | ||||||||||||||||||
513 | ))[0] - __s2[0]); if (__s1_len > 0
| 0-4 | ||||||||||||||||||
514 | input_filename
| 0-4 | ||||||||||||||||||
515 | ))[1] - __s2[1]); if (__s1_len > 1
| 0-4 | ||||||||||||||||||
516 | input_filename
| 0-4 | ||||||||||||||||||
517 | ))[2] - __s2[2]); if (__s1_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( input_filename ))[3] - __s2[3]);
| 0-4 | ||||||||||||||||||
518 | input_filename
never executed: __result = (((const unsigned char *) (const char *) ( input_filename ))[3] - __s2[3]); | 0-4 | ||||||||||||||||||
519 | ))[3] - __s2[3]);
never executed: }__result = (((const unsigned char *) (const char *) ( input_filename ))[3] - __s2[3]); never executed: }end of block never executed: __result; }))) : (__builtin_constant_p (end of block
| 0-4 | ||||||||||||||||||
520 | "-"
| 0-4 | ||||||||||||||||||
521 | ) && ((size_t)(const void *)((
| 0-4 | ||||||||||||||||||
522 | "-"
| 0-4 | ||||||||||||||||||
523 | ) + 1) - (size_t)(const void *)(
| 0-4 | ||||||||||||||||||
524 | "-"
| 0-4 | ||||||||||||||||||
525 | ) == 1) && (__s2_len = __builtin_strlen (
| 0-4 | ||||||||||||||||||
526 | "-"
| 0-4 | ||||||||||||||||||
527 | ), __s2_len < 4) ? (__builtin_constant_p (
| 0-4 | ||||||||||||||||||
528 | input_filename
| 0-4 | ||||||||||||||||||
529 | ) && ((size_t)(const void *)((
| 0-4 | ||||||||||||||||||
530 | input_filename
| 0-4 | ||||||||||||||||||
531 | ) + 1) - (size_t)(const void *)(
| 0-4 | ||||||||||||||||||
532 | input_filename
| 0-4 | ||||||||||||||||||
533 | ) == 1) ? __builtin_strcmp (
| 0-4 | ||||||||||||||||||
534 | input_filename
| 0-4 | ||||||||||||||||||
535 | ,
| 0-4 | ||||||||||||||||||
536 | "-"
| 0-4 | ||||||||||||||||||
537 | ) : -(__extension__ ({ const unsigned char *__s2 = (const unsigned char *) (const char *) (
| 0-4 | ||||||||||||||||||
538 | input_filename
| 0-4 | ||||||||||||||||||
539 | ); int __result = (((const unsigned char *) (const char *) (
| 0-4 | ||||||||||||||||||
540 | "-"
| 0-4 | ||||||||||||||||||
541 | ))[0] - __s2[0]); if (__s2_len > 0
| 0-4 | ||||||||||||||||||
542 | "-"
| 0-4 | ||||||||||||||||||
543 | ))[1] - __s2[1]); if (__s2_len > 1
| 0-4 | ||||||||||||||||||
544 | "-"
| 0-4 | ||||||||||||||||||
545 | ))[2] - __s2[2]); if (__s2_len > 2
never executed: __result = (((const unsigned char *) (const char *) ( "-" ))[3] - __s2[3]);
| 0-4 | ||||||||||||||||||
546 | "-"
never executed: __result = (((const unsigned char *) (const char *) ( "-" ))[3] - __s2[3]); | 0-4 | ||||||||||||||||||
547 | ))[3] - __s2[3]);
never executed: }__result = (((const unsigned char *) (const char *) ( "-" ))[3] - __s2[3]); never executed: }end of block never executed: __result; }))) : __builtin_strcmp (end of block
| 0-4 | ||||||||||||||||||
548 | input_filename
| 0-4 | ||||||||||||||||||
549 | ,
| 0-4 | ||||||||||||||||||
550 | "-"
| 0-4 | ||||||||||||||||||
551 | )))); })
| 0-4 | ||||||||||||||||||
552 | == 0)
| 0-4 | ||||||||||||||||||
553 | { | - | ||||||||||||||||||
554 | input_filename = | - | ||||||||||||||||||
555 | dcgettext (((void *)0), | - | ||||||||||||||||||
556 | "standard input" | - | ||||||||||||||||||
557 | , 5) | - | ||||||||||||||||||
558 | ; | - | ||||||||||||||||||
559 | in_stream = | - | ||||||||||||||||||
560 | stdin | - | ||||||||||||||||||
561 | ; | - | ||||||||||||||||||
562 | } never executed: end of block | 0 | ||||||||||||||||||
563 | else | - | ||||||||||||||||||
564 | { | - | ||||||||||||||||||
565 | in_stream = fopen (input_filename, "r"); | - | ||||||||||||||||||
566 | if (in_stream ==
| 0-4 | ||||||||||||||||||
567 | ((void *)0)
| 0-4 | ||||||||||||||||||
568 | ) | - | ||||||||||||||||||
569 | { | - | ||||||||||||||||||
570 | ((!!sizeof (struct { _Static_assert ( | - | ||||||||||||||||||
571 | 1 | - | ||||||||||||||||||
572 | , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( | - | ||||||||||||||||||
573 | 1 | - | ||||||||||||||||||
574 | , | - | ||||||||||||||||||
575 | (*__errno_location ()) | - | ||||||||||||||||||
576 | , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( | - | ||||||||||||||||||
577 | 0 | - | ||||||||||||||||||
578 | ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( | - | ||||||||||||||||||
579 | 1 | - | ||||||||||||||||||
580 | , | - | ||||||||||||||||||
581 | (*__errno_location ()) | - | ||||||||||||||||||
582 | , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( | - | ||||||||||||||||||
583 | 0 | - | ||||||||||||||||||
584 | ) ? (void) 0 : __builtin_unreachable ())))); | - | ||||||||||||||||||
585 | } never executed: end of block | 0 | ||||||||||||||||||
586 | } executed 4 times by 1 test: end of block Executed by:
| 4 | ||||||||||||||||||
587 | - | |||||||||||||||||||
588 | line = | - | ||||||||||||||||||
589 | ((void *)0) | - | ||||||||||||||||||
590 | ; | - | ||||||||||||||||||
591 | buflen = 0; | - | ||||||||||||||||||
592 | ok = | - | ||||||||||||||||||
593 | 1 | - | ||||||||||||||||||
594 | ; | - | ||||||||||||||||||
595 | while (1) | - | ||||||||||||||||||
596 | { | - | ||||||||||||||||||
597 | ssize_t line_length = getline (&line, &buflen, in_stream); | - | ||||||||||||||||||
598 | if (line_length < 0
| 4-8 | ||||||||||||||||||
599 | { | - | ||||||||||||||||||
600 | - | |||||||||||||||||||
601 | break; executed 4 times by 1 test: break; Executed by:
| 4 | ||||||||||||||||||
602 | } | - | ||||||||||||||||||
603 | - | |||||||||||||||||||
604 | if (! parse_datetime2 (&when, line,
| 0-8 | ||||||||||||||||||
605 | ((void *)0)
| 0-8 | ||||||||||||||||||
606 | ,
| 0-8 | ||||||||||||||||||
607 | parse_datetime_flags, tz, tzstring)
| 0-8 | ||||||||||||||||||
608 | { | - | ||||||||||||||||||
609 | if (line[line_length - 1] == '\n'
| 0 | ||||||||||||||||||
610 | line[line_length - 1] = '\0'; never executed: line[line_length - 1] = '\0'; | 0 | ||||||||||||||||||
611 | error (0, 0, | - | ||||||||||||||||||
612 | dcgettext (((void *)0), | - | ||||||||||||||||||
613 | "invalid date %s" | - | ||||||||||||||||||
614 | , 5) | - | ||||||||||||||||||
615 | , quote (line)); | - | ||||||||||||||||||
616 | ok = | - | ||||||||||||||||||
617 | 0 | - | ||||||||||||||||||
618 | ; | - | ||||||||||||||||||
619 | } never executed: end of block | 0 | ||||||||||||||||||
620 | else | - | ||||||||||||||||||
621 | { | - | ||||||||||||||||||
622 | ok &= show_date (format, when, tz); | - | ||||||||||||||||||
623 | } executed 8 times by 1 test: end of block Executed by:
| 8 | ||||||||||||||||||
624 | } | - | ||||||||||||||||||
625 | - | |||||||||||||||||||
626 | if ( | - | ||||||||||||||||||
627 | rpl_fclose
| 0-4 | ||||||||||||||||||
628 | (in_stream) ==
| 0-4 | ||||||||||||||||||
629 | (-1)
| 0-4 | ||||||||||||||||||
630 | ) | - | ||||||||||||||||||
631 | (( never executed: !!sizeof (struct { _Static_assert (((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_loc...cape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_loc...cape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
632 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_loc...cape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
633 | , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_loc...cape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
634 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_loc...cape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
635 | , never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_loc...cape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
636 | (*__errno_location ()) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_loc...cape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
637 | , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_loc...cape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
638 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_loc...cape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
639 | ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_loc...cape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
640 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_loc...cape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
641 | , never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_loc...cape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
642 | (*__errno_location ()) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_loc...cape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
643 | , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_loc...cape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
644 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_loc...cape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
645 | ) ? (void) 0 : __builtin_unreachable ())))); never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_loc...cape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, input_filename)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
646 | - | |||||||||||||||||||
647 | free (line); | - | ||||||||||||||||||
648 | - | |||||||||||||||||||
649 | return executed 4 times by 1 test: ok;return ok; Executed by:
executed 4 times by 1 test: return ok; Executed by:
| 4 | ||||||||||||||||||
650 | } | - | ||||||||||||||||||
651 | - | |||||||||||||||||||
652 | int | - | ||||||||||||||||||
653 | main (int argc, char **argv) | - | ||||||||||||||||||
654 | { | - | ||||||||||||||||||
655 | int optc; | - | ||||||||||||||||||
656 | const char *datestr = | - | ||||||||||||||||||
657 | ((void *)0) | - | ||||||||||||||||||
658 | ; | - | ||||||||||||||||||
659 | const char *set_datestr = | - | ||||||||||||||||||
660 | ((void *)0) | - | ||||||||||||||||||
661 | ; | - | ||||||||||||||||||
662 | struct timespec when; | - | ||||||||||||||||||
663 | - | |||||||||||||||||||
664 | _Bool | - | ||||||||||||||||||
665 | set_date = | - | ||||||||||||||||||
666 | 0 | - | ||||||||||||||||||
667 | ; | - | ||||||||||||||||||
668 | char const *format = | - | ||||||||||||||||||
669 | ((void *)0) | - | ||||||||||||||||||
670 | ; | - | ||||||||||||||||||
671 | char *batch_file = | - | ||||||||||||||||||
672 | ((void *)0) | - | ||||||||||||||||||
673 | ; | - | ||||||||||||||||||
674 | char *reference = | - | ||||||||||||||||||
675 | ((void *)0) | - | ||||||||||||||||||
676 | ; | - | ||||||||||||||||||
677 | struct stat refstats; | - | ||||||||||||||||||
678 | - | |||||||||||||||||||
679 | _Bool | - | ||||||||||||||||||
680 | ok; | - | ||||||||||||||||||
681 | int option_specified_date; | - | ||||||||||||||||||
682 | - | |||||||||||||||||||
683 | ; | - | ||||||||||||||||||
684 | set_program_name (argv[0]); | - | ||||||||||||||||||
685 | setlocale ( | - | ||||||||||||||||||
686 | 6 | - | ||||||||||||||||||
687 | , ""); | - | ||||||||||||||||||
688 | bindtextdomain ("coreutils", "/usr/local/share/locale"); | - | ||||||||||||||||||
689 | textdomain ("coreutils"); | - | ||||||||||||||||||
690 | - | |||||||||||||||||||
691 | atexit (close_stdout); | - | ||||||||||||||||||
692 | - | |||||||||||||||||||
693 | while ((
| 940-1468 | ||||||||||||||||||
694 | ((void *)0)
| 940-1468 | ||||||||||||||||||
695 | ))
| 940-1468 | ||||||||||||||||||
696 | != -1
| 940-1468 | ||||||||||||||||||
697 | { | - | ||||||||||||||||||
698 | char const *new_format = | - | ||||||||||||||||||
699 | ((void *)0) | - | ||||||||||||||||||
700 | ; | - | ||||||||||||||||||
701 | - | |||||||||||||||||||
702 | switch (optc) | - | ||||||||||||||||||
703 | { | - | ||||||||||||||||||
704 | case executed 912 times by 1 test: 'd':case 'd': Executed by:
executed 912 times by 1 test: case 'd': Executed by:
| 912 | ||||||||||||||||||
705 | datestr = optarg; | - | ||||||||||||||||||
706 | break; executed 912 times by 1 test: break; Executed by:
| 912 | ||||||||||||||||||
707 | case executed 469 times by 1 test: DEBUG_DATE_PARSING:case DEBUG_DATE_PARSING: Executed by:
executed 469 times by 1 test: case DEBUG_DATE_PARSING: Executed by:
| 469 | ||||||||||||||||||
708 | parse_datetime_flags |= 1; | - | ||||||||||||||||||
709 | break; executed 469 times by 1 test: break; Executed by:
| 469 | ||||||||||||||||||
710 | case executed 6 times by 1 test: 'f':case 'f': Executed by:
executed 6 times by 1 test: case 'f': Executed by:
| 6 | ||||||||||||||||||
711 | batch_file = optarg; | - | ||||||||||||||||||
712 | break; executed 6 times by 1 test: break; Executed by:
| 6 | ||||||||||||||||||
713 | case executed 11 times by 1 test: RFC_3339_OPTION:case RFC_3339_OPTION: Executed by:
executed 11 times by 1 test: case RFC_3339_OPTION: Executed by:
| 11 | ||||||||||||||||||
714 | { | - | ||||||||||||||||||
715 | static char const rfc_3339_format[][32] = | - | ||||||||||||||||||
716 | { | - | ||||||||||||||||||
717 | "%Y-%m-%d", | - | ||||||||||||||||||
718 | "%Y-%m-%d %H:%M:%S%:z", | - | ||||||||||||||||||
719 | "%Y-%m-%d %H:%M:%S.%N%:z" | - | ||||||||||||||||||
720 | }; | - | ||||||||||||||||||
721 | enum Time_spec i = | - | ||||||||||||||||||
722 | ((time_spec + 2) [__xargmatch_internal ("--rfc-3339", optarg, time_spec_string + 2, (char const *) (time_spec + 2), sizeof *(time_spec + 2), argmatch_die)]) | - | ||||||||||||||||||
723 | ; | - | ||||||||||||||||||
724 | new_format = rfc_3339_format[i]; | - | ||||||||||||||||||
725 | break; executed 10 times by 1 test: break; Executed by:
| 10 | ||||||||||||||||||
726 | } | - | ||||||||||||||||||
727 | case executed 13 times by 1 test: 'I':case 'I': Executed by:
executed 13 times by 1 test: case 'I': Executed by:
| 13 | ||||||||||||||||||
728 | { | - | ||||||||||||||||||
729 | static char const iso_8601_format[][32] = | - | ||||||||||||||||||
730 | { | - | ||||||||||||||||||
731 | "%Y-%m-%d", | - | ||||||||||||||||||
732 | "%Y-%m-%dT%H:%M:%S%:z", | - | ||||||||||||||||||
733 | "%Y-%m-%dT%H:%M:%S,%N%:z", | - | ||||||||||||||||||
734 | "%Y-%m-%dT%H%:z", | - | ||||||||||||||||||
735 | "%Y-%m-%dT%H:%M%:z" | - | ||||||||||||||||||
736 | }; | - | ||||||||||||||||||
737 | enum Time_spec i = | - | ||||||||||||||||||
738 | (optarg
| 5-8 | ||||||||||||||||||
739 | ? ((time_spec) [__xargmatch_internal ("--iso-8601", optarg, time_spec_string, (char const *) (time_spec), sizeof *(time_spec), argmatch_die)]) | - | ||||||||||||||||||
740 | : TIME_SPEC_DATE); | - | ||||||||||||||||||
741 | new_format = iso_8601_format[i]; | - | ||||||||||||||||||
742 | break; executed 13 times by 1 test: break; Executed by:
| 13 | ||||||||||||||||||
743 | } | - | ||||||||||||||||||
744 | case executed 2 times by 1 test: 'r':case 'r': Executed by:
executed 2 times by 1 test: case 'r': Executed by:
| 2 | ||||||||||||||||||
745 | reference = optarg; | - | ||||||||||||||||||
746 | break; executed 2 times by 1 test: break; Executed by:
| 2 | ||||||||||||||||||
747 | case executed 3 times by 1 test: 'R':case 'R': Executed by:
executed 3 times by 1 test: case 'R': Executed by:
| 3 | ||||||||||||||||||
748 | new_format = rfc_email_format; | - | ||||||||||||||||||
749 | break; executed 3 times by 1 test: break; Executed by:
| 3 | ||||||||||||||||||
750 | case executed 2 times by 1 test: 's':case 's': Executed by:
executed 2 times by 1 test: case 's': Executed by:
| 2 | ||||||||||||||||||
751 | set_datestr = optarg; | - | ||||||||||||||||||
752 | set_date = | - | ||||||||||||||||||
753 | 1 | - | ||||||||||||||||||
754 | ; | - | ||||||||||||||||||
755 | break; executed 2 times by 1 test: break; Executed by:
| 2 | ||||||||||||||||||
756 | case executed 21 times by 1 test: 'u':case 'u': Executed by:
executed 21 times by 1 test: case 'u': Executed by:
| 21 | ||||||||||||||||||
757 | - | |||||||||||||||||||
758 | - | |||||||||||||||||||
759 | - | |||||||||||||||||||
760 | if (putenv (bad_cast ("TZ=UTC0")) != 0
| 0-21 | ||||||||||||||||||
761 | xalloc_die (); never executed: xalloc_die (); | 0 | ||||||||||||||||||
762 | ; | - | ||||||||||||||||||
763 | break; executed 21 times by 1 test: break; Executed by:
| 21 | ||||||||||||||||||
764 | case executed 18 times by 1 test: GETOPT_HELP_CHAR:case GETOPT_HELP_CHAR: Executed by:
executed 18 times by 1 test: usage (case GETOPT_HELP_CHAR: Executed by:
| 18 | ||||||||||||||||||
765 | 0 | - | ||||||||||||||||||
766 | ); break; never executed: ;break; | 0 | ||||||||||||||||||
767 | case executed 8 times by 1 test: GETOPT_VERSION_CHAR:case GETOPT_VERSION_CHAR: Executed by:
executed 8 times by 1 test: version_etc (case GETOPT_VERSION_CHAR: Executed by:
| 8 | ||||||||||||||||||
768 | stdout | - | ||||||||||||||||||
769 | , "date", "GNU coreutils", Version, ("David MacKenzie"), (char *) | - | ||||||||||||||||||
770 | ((void *)0) | - | ||||||||||||||||||
771 | ); exit ( executed 8 times by 1 test: exit ( 0 ); Executed by:
| 8 | ||||||||||||||||||
772 | 0 executed 8 times by 1 test: exit ( 0 ); Executed by:
| 8 | ||||||||||||||||||
773 | ); executed 8 times by 1 test: break;exit ( 0 ); Executed by:
never executed: ;break; | 0-8 | ||||||||||||||||||
774 | default executed 3 times by 1 test: :default: Executed by:
executed 3 times by 1 test: default: Executed by:
| 3 | ||||||||||||||||||
775 | usage ( | - | ||||||||||||||||||
776 | 1 | - | ||||||||||||||||||
777 | ); | - | ||||||||||||||||||
778 | } never executed: end of block | 0 | ||||||||||||||||||
779 | - | |||||||||||||||||||
780 | if (new_format
| 26-1412 | ||||||||||||||||||
781 | { | - | ||||||||||||||||||
782 | if (format
| 0-26 | ||||||||||||||||||
783 | (( never executed: !!sizeof (struct { _Static_assert (((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
784 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
785 | , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
786 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
787 | , 0, never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
788 | dcgettext (((void *)0), never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
789 | "multiple output formats specified" never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
790 | , 5) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
791 | ), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
792 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
793 | ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
794 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
795 | , 0, never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
796 | dcgettext (((void *)0), never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
797 | "multiple output formats specified" never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
798 | , 5) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
799 | ), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
800 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
801 | ) ? (void) 0 : __builtin_unreachable ())))); never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
802 | format = new_format; | - | ||||||||||||||||||
803 | } executed 26 times by 1 test: end of block Executed by:
| 26 | ||||||||||||||||||
804 | } executed 1438 times by 1 test: end of block Executed by:
| 1438 | ||||||||||||||||||
805 | - | |||||||||||||||||||
806 | option_specified_date = ((datestr
| 30-910 | ||||||||||||||||||
807 | + (batch_file
| 4-936 | ||||||||||||||||||
808 | + (reference
| 0-940 | ||||||||||||||||||
809 | - | |||||||||||||||||||
810 | if (option_specified_date > 1
| 0-940 | ||||||||||||||||||
811 | { | - | ||||||||||||||||||
812 | error (0, 0, | - | ||||||||||||||||||
813 | - | |||||||||||||||||||
814 | dcgettext (((void *)0), | - | ||||||||||||||||||
815 | "the options to specify dates for printing are mutually exclusive" | - | ||||||||||||||||||
816 | , 5) | - | ||||||||||||||||||
817 | ); | - | ||||||||||||||||||
818 | usage ( | - | ||||||||||||||||||
819 | 1 | - | ||||||||||||||||||
820 | ); | - | ||||||||||||||||||
821 | } never executed: end of block | 0 | ||||||||||||||||||
822 | - | |||||||||||||||||||
823 | if (set_date
| 0-940 | ||||||||||||||||||
824 | { | - | ||||||||||||||||||
825 | error (0, 0, | - | ||||||||||||||||||
826 | - | |||||||||||||||||||
827 | dcgettext (((void *)0), | - | ||||||||||||||||||
828 | "the options to print and set the time may not be used together" | - | ||||||||||||||||||
829 | , 5) | - | ||||||||||||||||||
830 | ); | - | ||||||||||||||||||
831 | usage ( | - | ||||||||||||||||||
832 | 1 | - | ||||||||||||||||||
833 | ); | - | ||||||||||||||||||
834 | } never executed: end of block | 0 | ||||||||||||||||||
835 | - | |||||||||||||||||||
836 | if (optind < argc
| 35-905 | ||||||||||||||||||
837 | { | - | ||||||||||||||||||
838 | if (optind + 1 < argc
| 0-905 | ||||||||||||||||||
839 | { | - | ||||||||||||||||||
840 | error (0, 0, | - | ||||||||||||||||||
841 | dcgettext (((void *)0), | - | ||||||||||||||||||
842 | "extra operand %s" | - | ||||||||||||||||||
843 | , 5) | - | ||||||||||||||||||
844 | , quote (argv[optind + 1])); | - | ||||||||||||||||||
845 | usage ( | - | ||||||||||||||||||
846 | 1 | - | ||||||||||||||||||
847 | ); | - | ||||||||||||||||||
848 | } never executed: end of block | 0 | ||||||||||||||||||
849 | - | |||||||||||||||||||
850 | if (argv[optind][0] == '+'
| 0-905 | ||||||||||||||||||
851 | { | - | ||||||||||||||||||
852 | if (format
| 0-905 | ||||||||||||||||||
853 | (( never executed: !!sizeof (struct { _Static_assert (((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
854 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
855 | , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
856 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
857 | , 0, never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
858 | dcgettext (((void *)0), never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
859 | "multiple output formats specified" never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
860 | , 5) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
861 | ), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
862 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
863 | ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
864 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
865 | , 0, never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
866 | dcgettext (((void *)0), never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
867 | "multiple output formats specified" never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
868 | , 5) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
869 | ), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
870 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
871 | ) ? (void) 0 : __builtin_unreachable ())))); never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"multiple output formats specified\", 5)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "multiple output formats specified" , 5) ), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
872 | format = argv[optind++] + 1; | - | ||||||||||||||||||
873 | } executed 905 times by 1 test: end of block Executed by:
| 905 | ||||||||||||||||||
874 | else if (set_date
| 0 | ||||||||||||||||||
875 | { | - | ||||||||||||||||||
876 | error (0, 0, | - | ||||||||||||||||||
877 | - | |||||||||||||||||||
878 | dcgettext (((void *)0), | - | ||||||||||||||||||
879 | "the argument %s lacks a leading '+';\n" "when using an option to specify date(s), any non-option\n" "argument must be a format string beginning with '+'" | - | ||||||||||||||||||
880 | , 5) | - | ||||||||||||||||||
881 | - | |||||||||||||||||||
882 | - | |||||||||||||||||||
883 | , | - | ||||||||||||||||||
884 | quote (argv[optind])); | - | ||||||||||||||||||
885 | usage ( | - | ||||||||||||||||||
886 | 1 | - | ||||||||||||||||||
887 | ); | - | ||||||||||||||||||
888 | } never executed: end of block | 0 | ||||||||||||||||||
889 | } executed 905 times by 1 test: end of block Executed by:
| 905 | ||||||||||||||||||
890 | - | |||||||||||||||||||
891 | if (!format
| 12-928 | ||||||||||||||||||
892 | { | - | ||||||||||||||||||
893 | format = | - | ||||||||||||||||||
894 | rpl_nl_langinfo | - | ||||||||||||||||||
895 | ( | - | ||||||||||||||||||
896 | _DATE_FMT | - | ||||||||||||||||||
897 | ); | - | ||||||||||||||||||
898 | if (! *format
| 0-12 | ||||||||||||||||||
899 | { | - | ||||||||||||||||||
900 | - | |||||||||||||||||||
901 | - | |||||||||||||||||||
902 | - | |||||||||||||||||||
903 | - | |||||||||||||||||||
904 | - | |||||||||||||||||||
905 | - | |||||||||||||||||||
906 | - | |||||||||||||||||||
907 | format = "%a %b %e %H:%M:%S %Z %Y"; | - | ||||||||||||||||||
908 | } never executed: end of block | 0 | ||||||||||||||||||
909 | } executed 12 times by 1 test: end of block Executed by:
| 12 | ||||||||||||||||||
910 | - | |||||||||||||||||||
911 | char const *tzstring = getenv ("TZ"); | - | ||||||||||||||||||
912 | timezone_t tz = tzalloc (tzstring); | - | ||||||||||||||||||
913 | - | |||||||||||||||||||
914 | if (batch_file !=
| 4-936 | ||||||||||||||||||
915 | ((void *)0)
| 4-936 | ||||||||||||||||||
916 | ) | - | ||||||||||||||||||
917 | ok = batch_convert (batch_file, format, tz, tzstring); executed 4 times by 1 test: ok = batch_convert (batch_file, format, tz, tzstring); Executed by:
| 4 | ||||||||||||||||||
918 | else | - | ||||||||||||||||||
919 | { | - | ||||||||||||||||||
920 | - | |||||||||||||||||||
921 | _Bool | - | ||||||||||||||||||
922 | valid_date = | - | ||||||||||||||||||
923 | 1 | - | ||||||||||||||||||
924 | ; | - | ||||||||||||||||||
925 | ok = | - | ||||||||||||||||||
926 | 1 | - | ||||||||||||||||||
927 | ; | - | ||||||||||||||||||
928 | - | |||||||||||||||||||
929 | if (!option_specified_date
| 0-910 | ||||||||||||||||||
930 | { | - | ||||||||||||||||||
931 | if (optind < argc
| 0-26 | ||||||||||||||||||
932 | { | - | ||||||||||||||||||
933 | - | |||||||||||||||||||
934 | - | |||||||||||||||||||
935 | set_date = | - | ||||||||||||||||||
936 | 1 | - | ||||||||||||||||||
937 | ; | - | ||||||||||||||||||
938 | datestr = argv[optind]; | - | ||||||||||||||||||
939 | valid_date = posixtime (&when.tv_sec, | - | ||||||||||||||||||
940 | datestr, | - | ||||||||||||||||||
941 | (1 | - | ||||||||||||||||||
942 | | 2 | 4)); | - | ||||||||||||||||||
943 | when.tv_nsec = 0; | - | ||||||||||||||||||
944 | } never executed: end of block | 0 | ||||||||||||||||||
945 | else | - | ||||||||||||||||||
946 | { | - | ||||||||||||||||||
947 | - | |||||||||||||||||||
948 | gettime (&when); | - | ||||||||||||||||||
949 | } executed 26 times by 1 test: end of block Executed by:
| 26 | ||||||||||||||||||
950 | } | - | ||||||||||||||||||
951 | else | - | ||||||||||||||||||
952 | { | - | ||||||||||||||||||
953 | - | |||||||||||||||||||
954 | if (reference !=
| 0-910 | ||||||||||||||||||
955 | ((void *)0)
| 0-910 | ||||||||||||||||||
956 | ) | - | ||||||||||||||||||
957 | { | - | ||||||||||||||||||
958 | if (stat (reference, &refstats) != 0
| 0 | ||||||||||||||||||
959 | (( never executed: !!sizeof (struct { _Static_assert (((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location..., shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location..., shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
960 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location..., shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
961 | , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location..., shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
962 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location..., shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
963 | , never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location..., shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
964 | (*__errno_location ()) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location..., shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
965 | , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location..., shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
966 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location..., shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
967 | ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location..., shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
968 | 1 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location..., shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
969 | , never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location..., shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
970 | (*__errno_location ()) never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location..., shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
971 | , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location..., shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
972 | 0 never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location..., shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
973 | ) ? (void) 0 : __builtin_unreachable ())))); never executed: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, (*__errno_location ()), \"%s\", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , (*__errno_location..., shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , (*__errno_location ()) , "%s", quotearg_n_style_colon (0, shell_escape_quoting_style, reference)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); | 0 | ||||||||||||||||||
974 | when = get_stat_mtime (&refstats); | - | ||||||||||||||||||
975 | } never executed: end of block | 0 | ||||||||||||||||||
976 | else | - | ||||||||||||||||||
977 | { | - | ||||||||||||||||||
978 | if (set_datestr
| 0-910 | ||||||||||||||||||
979 | datestr = set_datestr; never executed: datestr = set_datestr; | 0 | ||||||||||||||||||
980 | valid_date = parse_datetime2 (&when, datestr, | - | ||||||||||||||||||
981 | ((void *)0) | - | ||||||||||||||||||
982 | , | - | ||||||||||||||||||
983 | parse_datetime_flags, | - | ||||||||||||||||||
984 | tz, tzstring); | - | ||||||||||||||||||
985 | } executed 910 times by 1 test: end of block Executed by:
| 910 | ||||||||||||||||||
986 | } | - | ||||||||||||||||||
987 | - | |||||||||||||||||||
988 | if (! valid_date
| 3-933 | ||||||||||||||||||
989 | (( executed 3 times by 1 test: !!sizeof (struct { _Static_assert (((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
990 | 1 executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
991 | , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
992 | 1 executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
993 | , 0, executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
994 | dcgettext (((void *)0), executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
995 | "invalid date %s" executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
996 | , 5) executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
997 | , quote (datestr)), (( executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
998 | 0 executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
999 | ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
1000 | 1 executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
1001 | , 0, executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
1002 | dcgettext (((void *)0), executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
1003 | "invalid date %s" executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
1004 | , 5) executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
1005 | , quote (datestr)), (( executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
1006 | 0 executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
1007 | ) ? (void) 0 : __builtin_unreachable ())))); executed 3 times by 1 test: ((!!sizeof (struct { _Static_assert ( 1 , "verify_expr (" "1" ", " "(error (1, 0, dcgettext (((void *)0), \"invalid date %s\", 5), quote (datestr)), assume (false))" ")"); int _gl_dummy; })) ? ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ()))) : ((error ( 1 , 0, dcgettext (((void *)0), "invalid date %s" , 5) , quote (datestr)), (( 0 ) ? (void) 0 : __builtin_unreachable ())))); Executed by:
| 3 | ||||||||||||||||||
1008 | - | |||||||||||||||||||
1009 | if (set_date
| 0-933 | ||||||||||||||||||
1010 | { | - | ||||||||||||||||||
1011 | - | |||||||||||||||||||
1012 | - | |||||||||||||||||||
1013 | if (settime (&when) != 0
| 0 | ||||||||||||||||||
1014 | { | - | ||||||||||||||||||
1015 | error (0, | - | ||||||||||||||||||
1016 | (*__errno_location ()) | - | ||||||||||||||||||
1017 | , | - | ||||||||||||||||||
1018 | dcgettext (((void *)0), | - | ||||||||||||||||||
1019 | "cannot set date" | - | ||||||||||||||||||
1020 | , 5) | - | ||||||||||||||||||
1021 | ); | - | ||||||||||||||||||
1022 | ok = | - | ||||||||||||||||||
1023 | 0 | - | ||||||||||||||||||
1024 | ; | - | ||||||||||||||||||
1025 | } never executed: end of block | 0 | ||||||||||||||||||
1026 | } never executed: end of block | 0 | ||||||||||||||||||
1027 | - | |||||||||||||||||||
1028 | ok &= show_date (format, when, tz); | - | ||||||||||||||||||
1029 | } executed 933 times by 1 test: end of block Executed by:
| 933 | ||||||||||||||||||
1030 | - | |||||||||||||||||||
1031 | ; | - | ||||||||||||||||||
1032 | - | |||||||||||||||||||
1033 | return executed 937 times by 1 test: ok ? return ok ? 0 : 1 ; Executed by:
executed 937 times by 1 test: return ok ? 0 : 1 ; Executed by:
| 937 | ||||||||||||||||||
1034 | 0 executed 937 times by 1 test: return ok ? 0 : 1 ; Executed by:
| 937 | ||||||||||||||||||
1035 | : executed 937 times by 1 test: return ok ? 0 : 1 ; Executed by:
| 937 | ||||||||||||||||||
1036 | 1 executed 937 times by 1 test: return ok ? 0 : 1 ; Executed by:
| 937 | ||||||||||||||||||
1037 | ; executed 937 times by 1 test: return ok ? 0 : 1 ; Executed by:
| 937 | ||||||||||||||||||
1038 | } | - | ||||||||||||||||||
1039 | - | |||||||||||||||||||
1040 | - | |||||||||||||||||||
1041 | - | |||||||||||||||||||
1042 | - | |||||||||||||||||||
1043 | static | - | ||||||||||||||||||
1044 | _Bool | - | ||||||||||||||||||
1045 | - | |||||||||||||||||||
1046 | show_date (const char *format, struct timespec when, timezone_t tz) | - | ||||||||||||||||||
1047 | { | - | ||||||||||||||||||
1048 | struct tm tm; | - | ||||||||||||||||||
1049 | - | |||||||||||||||||||
1050 | if (localtime_rz (tz, &when.tv_sec, &tm)
| 0-941 | ||||||||||||||||||
1051 | { | - | ||||||||||||||||||
1052 | if (format == rfc_email_format
| 1-940 | ||||||||||||||||||
1053 | setlocale ( executed 1 time by 1 test: setlocale ( 2 , "C"); Executed by:
| 1 | ||||||||||||||||||
1054 | 2 executed 1 time by 1 test: setlocale ( 2 , "C"); Executed by:
| 1 | ||||||||||||||||||
1055 | , "C"); executed 1 time by 1 test: setlocale ( 2 , "C"); Executed by:
| 1 | ||||||||||||||||||
1056 | fprintftime ( | - | ||||||||||||||||||
1057 | stdout | - | ||||||||||||||||||
1058 | , format, &tm, tz, when.tv_nsec); | - | ||||||||||||||||||
1059 | if (format == rfc_email_format
| 1-940 | ||||||||||||||||||
1060 | setlocale ( executed 1 time by 1 test: setlocale ( 2 , ""); Executed by:
| 1 | ||||||||||||||||||
1061 | 2 executed 1 time by 1 test: setlocale ( 2 , ""); Executed by:
| 1 | ||||||||||||||||||
1062 | , ""); executed 1 time by 1 test: setlocale ( 2 , ""); Executed by:
| 1 | ||||||||||||||||||
1063 | fputc_unlocked ('\n', | - | ||||||||||||||||||
1064 | stdout | - | ||||||||||||||||||
1065 | ); | - | ||||||||||||||||||
1066 | return executed 941 times by 1 test: return 1 ; Executed by:
executed 941 times by 1 test: return 1 ; Executed by:
| 941 | ||||||||||||||||||
1067 | 1 executed 941 times by 1 test: return 1 ; Executed by:
| 941 | ||||||||||||||||||
1068 | ; executed 941 times by 1 test: return 1 ; Executed by:
| 941 | ||||||||||||||||||
1069 | } | - | ||||||||||||||||||
1070 | else | - | ||||||||||||||||||
1071 | { | - | ||||||||||||||||||
1072 | char buf[((((((sizeof (intmax_t) * 8) - (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) * 146 + 484) / 485) + (! ((__typeof__ (intmax_t)) 0 < (__typeof__ (intmax_t)) -1))) + 1)]; | - | ||||||||||||||||||
1073 | error (0, 0, | - | ||||||||||||||||||
1074 | dcgettext (((void *)0), | - | ||||||||||||||||||
1075 | "time %s is out of range" | - | ||||||||||||||||||
1076 | , 5) | - | ||||||||||||||||||
1077 | , | - | ||||||||||||||||||
1078 | quote (timetostr (when.tv_sec, buf))); | - | ||||||||||||||||||
1079 | return never executed: return 0 ; never executed: return 0 ; | 0 | ||||||||||||||||||
1080 | 0 never executed: return 0 ; | 0 | ||||||||||||||||||
1081 | ; never executed: return 0 ; | 0 | ||||||||||||||||||
1082 | } | - | ||||||||||||||||||
1083 | } | - | ||||||||||||||||||
Switch to Source code | Preprocessed file |