156 |
|
goto filerr; |
157 |
|
/* start rpict process */ |
158 |
|
if (open_process(rpd, rpargv) <= 0) { |
159 |
< |
fprintf(stderr, "%s: cannot start\n", rpargv[0]); |
159 |
> |
fprintf(stderr, "%s: cannot start %s\n", progname, rpargv[0]); |
160 |
|
exit(1); |
161 |
|
} |
162 |
|
if ((fromrp = fdopen(rpd[0], "r")) == NULL || |
217 |
|
pview.vert = ourview.vert / vmult; |
218 |
|
break; |
219 |
|
case VT_HEM: |
220 |
+ |
pview.horiz = 2.*180./PI*asin( |
221 |
+ |
sin(PI/180./2.*ourview.horiz)/hmult ); |
222 |
+ |
pview.vert = 2.*180./PI*asin( |
223 |
+ |
sin(PI/180./2.*ourview.vert)/vmult ); |
224 |
+ |
break; |
225 |
|
default: |
226 |
|
fprintf(stderr, "%s: unknown view type '-vt%c'\n", |
227 |
|
progname, ourview.type); |
251 |
|
getheader(fromrp, NULL); /* discard header info. */ |
252 |
|
if (fscnresolu(&hr, &vr, fromrp) < 0 || /* check resolution */ |
253 |
|
hr != hres || vr != vres) { |
254 |
< |
fprintf(stderr, "%s: resolution mismatch from rpict\n", |
255 |
< |
progname); |
254 |
> |
fprintf(stderr, "%s: resolution mismatch from %s\n", |
255 |
> |
progname, rpargv[0]); |
256 |
|
exit(1); |
257 |
|
} |
258 |
|
for (y = 0; y < vr; y++) { /* transfer scanlines */ |
259 |
|
if (freadcolrs(scanline, hr, fromrp) < 0) { |
260 |
< |
fprintf(stderr, "%s: read error from rpict\n", |
261 |
< |
progname); |
260 |
> |
fprintf(stderr, "%s: read error from %s\n", |
261 |
> |
progname, rpargv[0]); |
262 |
|
exit(1); |
263 |
|
} |
264 |
|
if ((y == 0 || hmult != 1) && lseek(outfd, |