ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/util/rad.c
(Generate patch)

Comparing ray/src/util/rad.c (file contents):
Revision 2.57 by gwlarson, Wed Jun 10 17:51:06 1998 UTC vs.
Revision 2.59 by gwlarson, Tue Jan 19 17:46:13 1999 UTC

# Line 1 | Line 1
1 < /* Copyright (c) 1998 Silicon Graphics, Inc. */
1 > /* Copyright (c) 1999 Silicon Graphics, Inc. */
2  
3   #ifndef lint
4   static char SCCSid[] = "$SunId$ SGI";
# Line 341 | Line 341 | double org[3], *sizp;
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)) {
# Line 351 | Line 351 | setdefaults()                  /* set default values for unassigned v
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)++;
# Line 1038 | Line 1048 | again:
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);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines