| 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; |
| 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"); |
| 163 |
|
setcolor(thisray.rcol, 0.0, 0.0, 0.0); |
| 164 |
|
} else { |
| 165 |
|
rayorigin(&thisray, NULL, PRIMARY, 1.0); |
| 166 |
+ |
samplendx++; |
| 167 |
|
rayvalue(&thisray); |
| 168 |
|
} |
| 169 |
|
|