65 |
|
exit(1); |
66 |
|
} |
67 |
|
if (i == argc-2 && freopen(argv[i+1], "w", stdout) == NULL) { |
68 |
< |
fprintf(stderr, "can't open output \"%s\"\n", |
68 |
> |
fprintf(stderr, "%s: can't open output \"%s\"\n", |
69 |
|
progname, argv[i+1]); |
70 |
|
exit(1); |
71 |
|
} |
78 |
|
/* get their image resolution */ |
79 |
|
xmax = getint(4, stdin); |
80 |
|
ymax = getint(4, stdin); |
81 |
+ |
if (feof(stdin)) |
82 |
+ |
quiterr("empty input file"); |
83 |
|
/* put our header */ |
84 |
+ |
newheader("RADIANCE", stdout); |
85 |
|
printargs(i, argv, stdout); |
86 |
|
fputformat(COLRFMT, stdout); |
87 |
|
putchar('\n'); |