12 |
|
* gmtval(t,s) get GMT as UTC |
13 |
|
* fputdate(t,fp) put out the given UTC |
14 |
|
* fputnow(fp) put out the current date and time |
15 |
– |
* printargs(ac,av,fp) print an argument list to fp, followed by '\n' |
15 |
|
* formatval(r,s) copy the format value in s to r |
16 |
|
* fputformat(s,fp) write "FORMAT=%s" to fp |
17 |
|
* nativebigendian() are we native on big-endian machine? |
29 |
|
#include <ctype.h> |
30 |
|
|
31 |
|
#include "tiff.h" /* for int32 */ |
33 |
– |
#include "paths.h" /* for fixargv0() */ |
32 |
|
#include "rtio.h" |
33 |
|
#include "color.h" |
34 |
|
#include "resolu.h" |
157 |
|
time_t tv; |
158 |
|
time(&tv); |
159 |
|
fputdate(tv, fp); |
162 |
– |
} |
163 |
– |
|
164 |
– |
|
165 |
– |
void |
166 |
– |
printargs( /* print command arguments to a file */ |
167 |
– |
int ac, |
168 |
– |
char **av, |
169 |
– |
FILE *fp |
170 |
– |
) |
171 |
– |
{ |
172 |
– |
if (ac <= 0) |
173 |
– |
return; |
174 |
– |
if (progname == NULL) |
175 |
– |
fixargv0(av[0]); /* sets global progname */ |
176 |
– |
|
177 |
– |
if (progname >= av[0] && progname - av[0] < strlen(av[0])) |
178 |
– |
fputword(progname, fp); |
179 |
– |
else |
180 |
– |
fputword(av[0], fp); |
181 |
– |
while (--ac > 0) { |
182 |
– |
fputc(' ', fp); |
183 |
– |
fputword(*++av, fp); |
184 |
– |
} |
185 |
– |
fputc('\n', fp); |
160 |
|
} |
161 |
|
|
162 |
|
|