5 * ========================================================================
6 * Copyright 2006 University of Washington
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
25 if(argc
> 1 && (outfile
= fopen(argv
[1], "w")) == NULL
){
26 /* TRANSLATORS: an error message when trying to create a file */
27 fprintf(stderr
, _("can't create '%s'\n"), argv
[1]);
32 t
= localtime(<ime
);
33 fprintf(outfile
,"char datestamp[]=\"%02d-%s-%d\";\n", t
->tm_mday
,
34 (t
->tm_mon
== 0) ? "Jan" :
35 (t
->tm_mon
== 1) ? "Feb" :
36 (t
->tm_mon
== 2) ? "Mar" :
37 (t
->tm_mon
== 3) ? "Apr" :
38 (t
->tm_mon
== 4) ? "May" :
39 (t
->tm_mon
== 5) ? "Jun" :
40 (t
->tm_mon
== 6) ? "Jul" :
41 (t
->tm_mon
== 7) ? "Aug" :
42 (t
->tm_mon
== 8) ? "Sep" :
43 (t
->tm_mon
== 9) ? "Oct" :
44 (t
->tm_mon
== 10) ? "Nov" :
45 (t
->tm_mon
== 11) ? "Dec" : "UKN",
48 fprintf(outfile
, "char hoststamp[]=\"random-pc\";\n");