| 30 |
|
#include <ctype.h> |
| 31 |
|
|
| 32 |
|
#include "tiff.h" /* for int32 */ |
| 33 |
+ |
#include "paths.h" /* for fixargv0() */ |
| 34 |
|
#include "rtio.h" |
| 35 |
|
#include "color.h" |
| 36 |
|
#include "resolu.h" |
| 163 |
|
|
| 164 |
|
|
| 165 |
|
void |
| 166 |
< |
printargs( /* print arguments to a file */ |
| 166 |
> |
printargs( /* print command arguments to a file */ |
| 167 |
|
int ac, |
| 168 |
|
char **av, |
| 169 |
|
FILE *fp |
| 170 |
|
) |
| 171 |
|
{ |
| 172 |
< |
while (ac-- > 0) { |
| 173 |
< |
fputword(*av++, fp); |
| 174 |
< |
fputc(ac ? ' ' : '\n', fp); |
| 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); |
| 186 |
|
} |
| 187 |
|
|
| 188 |
|
|