17 |
|
|
18 |
|
#include "color.h" |
19 |
|
|
20 |
+ |
#include "view.h" |
21 |
+ |
|
22 |
|
#include "resolu.h" |
23 |
|
|
24 |
|
#include "paths.h" |
66 |
|
|
67 |
|
int wrongformat = 0; |
68 |
|
|
69 |
+ |
VIEW ourview = STDVIEW; |
70 |
+ |
int gotview = 0; |
71 |
+ |
int wrapfilt = 0; /* wrap filter horizontally? */ |
72 |
+ |
|
73 |
+ |
int estatus = 0; /* exit status (for non-fatal errors) */ |
74 |
+ |
|
75 |
|
int xrad; /* x search radius */ |
76 |
|
int yrad; /* y search radius */ |
77 |
|
int xbrad; /* x box size */ |
155 |
|
fprintf(stderr, |
156 |
|
"%s: exposure out of range\n", |
157 |
|
argv[0]); |
158 |
< |
exit(1); |
158 |
> |
quit(1); |
159 |
|
} |
160 |
|
switch (argv[i][2]) { |
161 |
|
case '\0': |
275 |
|
} |
276 |
|
if (!(order & YMAJOR)) |
277 |
|
inpaspect = 1.0/inpaspect; |
278 |
+ |
/* wrap around for cylindrical view? */ |
279 |
+ |
wrapfilt = gotview && ourview.type == VT_CYL && |
280 |
+ |
ourview.horiz >= 360.-FTINY && order & YMAJOR; |
281 |
|
/* compute output resolution */ |
282 |
|
if (ncols <= 0) |
283 |
|
ncols = x_c*xres + .5; |
309 |
|
} |
310 |
|
pass2(fin); |
311 |
|
|
312 |
< |
quit(0); |
312 |
> |
quit(estatus); |
313 |
|
} |
314 |
|
|
315 |
|
|
350 |
|
ourbright = xyz_bright; |
351 |
|
else |
352 |
|
wrongformat = !globmatch(PICFMT, fmt); |
353 |
< |
} |
353 |
> |
} else if (isview(s) && sscanview(&ourview, s) > 0) |
354 |
> |
gotview++; |
355 |
|
} |
356 |
|
|
357 |
|
|
394 |
|
progname, (int)(100L*i/yres)); |
395 |
|
yres = i; |
396 |
|
y_r = (double)nrows/yres; |
397 |
+ |
estatus++; |
398 |
|
break; |
399 |
|
} |
400 |
|
pass1scan(scan, i); |
566 |
|
break; |
567 |
|
if (fflush(stdout) < 0) { |
568 |
|
fprintf(stderr, "%s: write error at end of pass2\n", progname); |
569 |
< |
exit(1); |
569 |
> |
quit(1); |
570 |
|
} |
571 |
|
} |
572 |
|
|