| 1 |
< |
/* Copyright (c) 1998 Silicon Graphics, Inc. */ |
| 1 |
> |
/* Copyright (c) 1999 Silicon Graphics, Inc. */ |
| 2 |
|
|
| 3 |
|
#ifndef lint |
| 4 |
|
static char SCCSid[] = "$SunId$ SGI"; |
| 341 |
|
|
| 342 |
|
setdefaults() /* set default values for unassigned var's */ |
| 343 |
|
{ |
| 344 |
< |
double org[3], size; |
| 344 |
> |
double org[3], lim[3], size; |
| 345 |
|
char buf[128]; |
| 346 |
|
|
| 347 |
|
if (!vdef(ZONE)) { |
| 351 |
|
vval(ZONE) = savqstr(buf); |
| 352 |
|
vdef(ZONE)++; |
| 353 |
|
} |
| 354 |
+ |
if (!vdef(EYESEP)) { |
| 355 |
+ |
if (sscanf(vval(ZONE), "%*s %lf %lf %lf %lf %lf %lf", |
| 356 |
+ |
&org[0], &lim[0], &org[1], &lim[1], |
| 357 |
+ |
&org[2], &lim[2]) != 6) |
| 358 |
+ |
badvalue(ZONE); |
| 359 |
+ |
sprintf(buf, "%f", |
| 360 |
+ |
0.01*(lim[0]-org[0]+lim[1]-org[1]+lim[2]-org[2])); |
| 361 |
+ |
vval(EYESEP) = savqstr(buf); |
| 362 |
+ |
vdef(EYESEP)++; |
| 363 |
+ |
} |
| 364 |
|
if (!vdef(INDIRECT)) { |
| 365 |
|
vval(INDIRECT) = "0"; |
| 366 |
|
vdef(INDIRECT)++; |
| 1048 |
|
} |
| 1049 |
|
#endif |
| 1050 |
|
copystruct(&vwr, &stdview); |
| 1051 |
< |
cp = vopts; /* get -vf files first */ |
| 1051 |
> |
sscanview(&vwr, cp=vopts); /* set initial options */ |
| 1052 |
|
while ((cp = strstr(cp, "-vf ")) != NULL && |
| 1053 |
< |
*atos(buf, sizeof(buf), cp += 4)) |
| 1054 |
< |
viewfile(buf, &vwr, NULL); |
| 1055 |
< |
sscanview(&vwr, vopts); /* get the rest */ |
| 1053 |
> |
*atos(buf, sizeof(buf), cp += 4)) { |
| 1054 |
> |
viewfile(buf, &vwr, NULL); /* load -vf file */ |
| 1055 |
> |
sscanview(&vwr, cp); /* reset tail */ |
| 1056 |
> |
} |
| 1057 |
|
fputs(VIEWSTR, stdout); |
| 1058 |
|
fprintview(&vwr, stdout); /* print full spec. */ |
| 1059 |
|
fputc('\n', stdout); |