| 80 |
|
exit(1); |
| 81 |
|
} |
| 82 |
|
if (i == argc-2 && freopen(argv[i+1], "w", stdout) == NULL) { |
| 83 |
< |
fprintf(stderr, "can't open output \"%s\"\n", |
| 83 |
> |
fprintf(stderr, "%s: can't open output \"%s\"\n", |
| 84 |
|
progname, argv[i+1]); |
| 85 |
|
exit(1); |
| 86 |
|
} |
| 99 |
|
ymax = scanint(stdin); |
| 100 |
|
maxval = scanint(stdin); |
| 101 |
|
/* put header */ |
| 102 |
+ |
newheader("RADIANCE", stdout); |
| 103 |
|
printargs(i, argv, stdout); |
| 104 |
|
fputformat(COLRFMT, stdout); |
| 105 |
|
putchar('\n'); |
| 161 |
|
int (*getscan)(); |
| 162 |
|
{ |
| 163 |
|
COLR *scanout; |
| 163 |
– |
register int x; |
| 164 |
|
int y; |
| 165 |
|
/* allocate scanline */ |
| 166 |
|
scanout = (COLR *)malloc(xmax*sizeof(COLR)); |