1 |
< |
/* Copyright (c) 1993 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1994 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
186 |
|
if (fillsamp == 1) |
187 |
|
fillo &= ~F_BACK; |
188 |
|
/* set view */ |
189 |
< |
if (err = setview(&ourview)) { |
189 |
> |
if (ourview.vaft > FTINY) |
190 |
> |
err = "no aft clipping plane allowed"; |
191 |
> |
else |
192 |
> |
err = setview(&ourview); |
193 |
> |
if (err != NULL) { |
194 |
|
fprintf(stderr, "%s: %s\n", progname, err); |
195 |
|
exit(1); |
196 |
|
} |
201 |
|
if (ourpict == NULL || ourzbuf == NULL) |
202 |
|
syserror(progname); |
203 |
|
bzero((char *)ourzbuf, hresolu*vresolu*sizeof(float)); |
204 |
+ |
/* new header */ |
205 |
+ |
newheader("RADIANCE", stdout); |
206 |
|
/* get input */ |
207 |
|
for ( ; i < argc; i += 2) |
208 |
|
addpicture(argv[i], argv[i+1]); |
247 |
|
{ |
248 |
|
char fmt[32]; |
249 |
|
|
250 |
< |
if (isformat(s)) { |
251 |
< |
formatval(fmt, s); |
250 |
> |
if (isheadid(s)) |
251 |
> |
return; |
252 |
> |
if (formatval(fmt, s)) { |
253 |
|
wrongformat = strcmp(fmt, COLRFMT); |
254 |
|
return; |
255 |
|
} |
310 |
|
register int x; |
311 |
|
if (!isfloat(zspec) || (zvalue = atof(zspec)) <= 0.0) |
312 |
|
syserror(zspec); |
306 |
– |
exit(1); |
313 |
|
for (x = scanlen(&tresolu); x-- > 0; ) |
314 |
|
zin[x] = zvalue; |
315 |
|
} |
498 |
|
pos[1] += .5 - ourview.voff; |
499 |
|
return(0); |
500 |
|
} |
501 |
< |
if (viewray(pt, direc, &theirview, pos[0], pos[1]) < 0) |
501 |
> |
if (viewray(pt, direc, &theirview, pos[0], pos[1]) < -FTINY) |
502 |
|
return(-1); |
503 |
|
pt[0] += direc[0]*pos[2]; |
504 |
|
pt[1] += direc[1]*pos[2]; |
702 |
|
cp = combuf; |
703 |
|
wp = argv; |
704 |
|
for ( ; ; ) { |
705 |
< |
while (isspace(*cp)) cp++; |
706 |
< |
if (!*cp) break; |
707 |
< |
*wp++ = cp; |
708 |
< |
while (!isspace(*cp)) |
709 |
< |
if (!*cp++) goto done; |
710 |
< |
*cp++ = '\0'; |
705 |
> |
while (isspace(*cp)) /* nullify spaces */ |
706 |
> |
*cp++ = '\0'; |
707 |
> |
if (!*cp) /* all done? */ |
708 |
> |
break; |
709 |
> |
*wp++ = cp; /* add argument to list */ |
710 |
> |
while (*++cp && !isspace(*cp)) |
711 |
> |
; |
712 |
|
} |
706 |
– |
done: |
713 |
|
*wp = NULL; |
714 |
|
/* start process */ |
715 |
|
if ((rval = open_process(PDesc, argv)) < 0) |