--- ray/src/rt/rv3.c 1991/05/21 17:41:19 1.20 +++ ray/src/rt/rv3.c 1993/08/05 13:05:01 2.5 @@ -19,10 +19,20 @@ static char SCCSid[] = "$SunId$ LBL"; #include "random.h" #ifndef WFLUSH -#define WFLUSH 30 /* flush after this many rays */ +#ifdef SPEED +#define WFLUSH (5*SPEED) +#else +#define WFLUSH 100 /* flush after this many rays */ #endif +#endif +#ifdef SMLFLT +#define sscanvec(s,v) (sscanf(s,"%f %f %f",v,v+1,v+2)==3) +#else +#define sscanvec(s,v) (sscanf(s,"%lf %lf %lf",v,v+1,v+2)==3) +#endif + getrect(s, r) /* get a box */ char *s; register RECT *r; @@ -87,7 +97,7 @@ double *mp; error(COMMAND, "illegal magnification"); return(-1); } - if (sscanf(s, "%*lf %lf %lf %lf", &vec[0], &vec[1], &vec[2]) != 3) { + if (!sscanvec(sskip(s), vec)) { if (dev->getcur == NULL) return(-1); (*dev->comout)("Pick view center\n"); @@ -137,8 +147,8 @@ paint(p, xmin, ymin, xmax, ymax) /* compute and paint register PNODE *p; int xmin, ymin, xmax, ymax; { - extern long nrays; - static long lastflush = 0; + extern unsigned long nrays; + static unsigned long lastflush = 0; static RAY thisray; double h, v; @@ -375,7 +385,6 @@ moveview(angle, elev, mag, vc) /* move viewpoint */ double angle, elev, mag; FVECT vc; { - extern double sqrt(), dist2(); double d; FVECT v1; VIEW nv;