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

Comparing ray/src/rt/rv3.c (file contents):
Revision 2.1 by greg, Tue Nov 12 17:09:47 1991 UTC vs.
Revision 2.2 by greg, Fri Jan 17 09:27:21 1992 UTC

# Line 22 | Line 22 | static char SCCSid[] = "$SunId$ LBL";
22   #define WFLUSH          30              /* flush after this many rays */
23   #endif
24  
25 + #ifdef  SMLFLT
26 + #define  sscanvec(s,v)  (sscanf(s,"%f %f %f",v,v+1,v+2)==3)
27 + #else
28 + #define  sscanvec(s,v)  (sscanf(s,"%lf %lf %lf",v,v+1,v+2)==3)
29 + #endif
30  
31 +
32   getrect(s, r)                           /* get a box */
33   char  *s;
34   register RECT  *r;
# Line 87 | Line 93 | double  *mp;
93                  error(COMMAND, "illegal magnification");
94                  return(-1);
95          }
96 <        if (sscanf(s, "%*lf %lf %lf %lf", &vec[0], &vec[1], &vec[2]) != 3) {
96 >        if (!sscanvec(sskip(s), vec)) {
97                  if (dev->getcur == NULL)
98                          return(-1);
99                  (*dev->comout)("Pick view center\n");

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines