53 |
|
|
54 |
|
char *tfname = NULL; |
55 |
|
|
56 |
+ |
char template[] = TEMPLATE; |
57 |
+ |
|
58 |
|
char *lampdat = "lamp.tab"; /* lamp data file */ |
59 |
|
|
60 |
|
int order; /* scanline ordering of input */ |
102 |
|
if (signal(SIGINT, quit) == SIG_IGN) |
103 |
|
signal(SIGINT, SIG_IGN); |
104 |
|
if (signal(SIGHUP, quit) == SIG_IGN) |
105 |
< |
signal(SIGINT, SIG_IGN); |
105 |
> |
signal(SIGHUP, SIG_IGN); |
106 |
|
signal(SIGTERM, quit); |
107 |
|
signal(SIGPIPE, quit); |
108 |
|
#ifdef SIGXCPU |
219 |
|
fprintf(stderr, "%s: unknown lamp type\n", lamptype); |
220 |
|
quit(1); |
221 |
|
} |
222 |
< |
for (i = 0; i < 3; i++) |
223 |
< |
if (lampcolor[i] > 1e-4) |
224 |
< |
colval(exposure,i) /= lampcolor[i]; |
222 |
> |
for (j = 0; j < 3; j++) |
223 |
> |
if (lampcolor[j] > 1e-4) |
224 |
> |
colval(exposure,j) /= lampcolor[j]; |
225 |
|
freelamps(); |
226 |
|
} |
227 |
|
/* open input file */ |
229 |
|
if (singlepass) |
230 |
|
fin = stdin; |
231 |
|
else { |
232 |
< |
tfname = mktemp(TEMPLATE); |
232 |
> |
tfname = mktemp(template); |
233 |
|
if ((fin = fopen(tfname, "w+")) == NULL) { |
234 |
|
fprintf(stderr, "%s: can't create ", progname); |
235 |
|
fprintf(stderr, "temp file \"%s\"\n", tfname); |
383 |
|
if (freadscan(scanin[yread%barsize], |
384 |
|
xres, in) < 0) { |
385 |
|
fprintf(stderr, |
386 |
< |
"%s: bad read (y=%d)\n", |
386 |
> |
"%s: truncated input (y=%d)\n", |
387 |
|
progname, yres-1-yread); |
388 |
|
quit(1); |
389 |
|
} |