| 315 |
|
ip[0] = DOT(disp,v->hvec)/v->hn2 + 0.5 - v->hoff; |
| 316 |
|
ip[1] = DOT(disp,v->vvec)/v->vn2 + 0.5 - v->voff; |
| 317 |
|
gotall: /* add appropriate return flags */ |
| 318 |
< |
if (!(rflags & (VL_BEHIND|VL_BEYOND))) |
| 319 |
< |
rflags |= (ip[2] <= 0.0) ? VL_BEHIND : |
| 320 |
< |
VL_BEYOND * ((v->vaft > FTINY) & |
| 321 |
< |
(ip[2] >= v->vaft - v->vfore)); |
| 318 |
> |
if (ip[2] <= 0.0) |
| 319 |
> |
rflags |= VL_BEHIND; |
| 320 |
> |
else if ((v->type != VT_PER) & (v->type != VT_CYL)) |
| 321 |
> |
rflags |= VL_BEYOND*((v->vaft > FTINY) & |
| 322 |
> |
(ip[2] >= v->vaft - v->vfore)); |
| 323 |
|
rflags |= VL_OUTSIDE*((0.0 >= ip[0]) | (ip[0] >= 1.0) | |
| 324 |
|
(0.0 >= ip[1]) | (ip[1] >= 1.0)); |
| 325 |
|
return(rflags); |
| 386 |
|
char *av[] |
| 387 |
|
) |
| 388 |
|
{ |
| 389 |
< |
#define check(c,l) if ((av[0][c]&&av[0][c]!=' ') || \ |
| 389 |
> |
#define check(c,l) if ((av[0][c]&&!isspace(av[0][c])) || \ |
| 390 |
|
badarg(ac-1,av+1,l)) return(-1) |
| 391 |
|
|
| 392 |
|
if (ac <= 0 || av[0][0] != '-' || av[0][1] != 'v') |
| 393 |
|
return(-1); |
| 394 |
|
switch (av[0][2]) { |
| 395 |
|
case 't': /* type */ |
| 396 |
< |
if (!av[0][3] || av[0][3]==' ') |
| 396 |
> |
if (!av[0][3] || isspace(av[0][3])) |
| 397 |
|
return(-1); |
| 398 |
|
check(4,""); |
| 399 |
|
v->type = av[0][3]; |
| 578 |
|
} |
| 579 |
|
/* skip leading path */ |
| 580 |
|
cp = s; |
| 581 |
< |
while (*cp && *cp != ' ') |
| 581 |
> |
while (*cp && !isspace(*cp)) |
| 582 |
|
cp++; |
| 583 |
|
while (cp > s && !ISDIRSEP(cp[-1])) |
| 584 |
|
cp--; |