1 |
< |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
1 |
> |
/* Copyright (c) 1999 Silicon Graphics, Inc. */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ SGI"; |
213 |
|
{ |
214 |
|
char thisfile[MAXPATH]; |
215 |
|
time_t thisdate, lastdate = 0; |
216 |
– |
register char *cp; |
216 |
|
|
217 |
|
if (fnames == NULL) |
218 |
|
return(0); |
219 |
< |
while (*fnames) { |
220 |
< |
while (isspace(*fnames)) fnames++; |
221 |
< |
cp = thisfile; |
222 |
< |
while (*fnames && !isspace(*fnames)) |
224 |
< |
*cp++ = *fnames++; |
225 |
< |
*cp = '\0'; |
219 |
> |
while ((fnames = nextword(thisfile, MAXPATH, fnames)) != NULL) { |
220 |
> |
if (thisfile[0] == '!' || |
221 |
> |
(thisfile[0] == '\\' && thisfile[1] == '!')) |
222 |
> |
continue; |
223 |
|
if (!(thisdate = fdate(thisfile))) |
224 |
|
syserr(thisfile); |
225 |
|
if (thisdate > lastdate) |
338 |
|
|
339 |
|
setdefaults() /* set default values for unassigned var's */ |
340 |
|
{ |
341 |
< |
double org[3], size; |
341 |
> |
double org[3], lim[3], size; |
342 |
|
char buf[128]; |
343 |
|
|
344 |
|
if (!vdef(ZONE)) { |
348 |
|
vval(ZONE) = savqstr(buf); |
349 |
|
vdef(ZONE)++; |
350 |
|
} |
351 |
+ |
if (!vdef(EYESEP)) { |
352 |
+ |
if (sscanf(vval(ZONE), "%*s %lf %lf %lf %lf %lf %lf", |
353 |
+ |
&org[0], &lim[0], &org[1], &lim[1], |
354 |
+ |
&org[2], &lim[2]) != 6) |
355 |
+ |
badvalue(ZONE); |
356 |
+ |
sprintf(buf, "%f", |
357 |
+ |
0.01*(lim[0]-org[0]+lim[1]-org[1]+lim[2]-org[2])); |
358 |
+ |
vval(EYESEP) = savqstr(buf); |
359 |
+ |
vdef(EYESEP)++; |
360 |
+ |
} |
361 |
|
if (!vdef(INDIRECT)) { |
362 |
|
vval(INDIRECT) = "0"; |
363 |
|
vdef(INDIRECT)++; |
1045 |
|
} |
1046 |
|
#endif |
1047 |
|
copystruct(&vwr, &stdview); |
1048 |
< |
cp = vopts; /* get -vf files first */ |
1048 |
> |
sscanview(&vwr, cp=vopts); /* set initial options */ |
1049 |
|
while ((cp = strstr(cp, "-vf ")) != NULL && |
1050 |
< |
*atos(buf, sizeof(buf), cp += 4)) |
1051 |
< |
viewfile(buf, &vwr, NULL); |
1052 |
< |
sscanview(&vwr, vopts); /* get the rest */ |
1050 |
> |
*atos(buf, sizeof(buf), cp += 4)) { |
1051 |
> |
viewfile(buf, &vwr, NULL); /* load -vf file */ |
1052 |
> |
sscanview(&vwr, cp); /* reset tail */ |
1053 |
> |
} |
1054 |
|
fputs(VIEWSTR, stdout); |
1055 |
|
fprintview(&vwr, stdout); /* print full spec. */ |
1056 |
|
fputc('\n', stdout); |