| 56 |
|
int argc; |
| 57 |
|
char *argv[]; |
| 58 |
|
{ |
| 59 |
< |
int i; |
| 59 |
> |
static char picfmt[LPICFMT+1] = PICFMT; |
| 60 |
> |
int i, rval; |
| 61 |
|
#ifdef MSDOS |
| 62 |
|
extern int _fmode; |
| 63 |
|
_fmode = O_BINARY; |
| 88 |
|
exit(1); |
| 89 |
|
} |
| 90 |
|
/* transfer header */ |
| 91 |
< |
if (checkheader(fin, COLRFMT, stdout) < 0) { |
| 91 |
> |
if ((rval = checkheader(fin, picfmt, stdout)) < 0) { |
| 92 |
|
fprintf(stderr, "%s: input not a Radiance picture\n", |
| 93 |
|
progname); |
| 94 |
|
exit(1); |
| 95 |
|
} |
| 96 |
+ |
if (rval) |
| 97 |
+ |
fputformat(picfmt, stdout); |
| 98 |
|
/* add new header info. */ |
| 99 |
|
printargs(i, argv, stdout); |
| 97 |
– |
fputformat(COLRFMT, stdout); |
| 100 |
|
putchar('\n'); |
| 101 |
|
/* get picture size */ |
| 102 |
|
if ((order = fgetresolu(&xres, &yres, fin)) < 0) { |