| 371 |
|
static double |
| 372 |
|
libfunc(fname, vp) /* execute library function */ |
| 373 |
|
char *fname; |
| 374 |
< |
register VARDEF *vp; |
| 374 |
> |
VARDEF *vp; |
| 375 |
|
{ |
| 376 |
< |
VARDEF dumdef; |
| 376 |
> |
register LIBR *lp; |
| 377 |
|
double d; |
| 378 |
|
int lasterrno; |
| 379 |
|
|
| 380 |
< |
if (vp == NULL) { |
| 381 |
< |
vp = &dumdef; |
| 382 |
< |
vp->lib = liblookup(fname); |
| 383 |
< |
} |
| 384 |
< |
if (vp->lib == NULL) { |
| 380 |
> |
if (vp != NULL) |
| 381 |
> |
lp = vp->lib; |
| 382 |
> |
else |
| 383 |
> |
lp = liblookup(fname); |
| 384 |
> |
if (lp == NULL) { |
| 385 |
|
eputs(fname); |
| 386 |
|
eputs(": undefined function\n"); |
| 387 |
|
quit(1); |
| 388 |
|
} |
| 389 |
|
lasterrno = errno; |
| 390 |
|
errno = 0; |
| 391 |
< |
d = (*vp->lib->f)(vp->lib->fname); |
| 391 |
> |
d = (*lp->f)(lp->fname); |
| 392 |
|
#ifdef IEEE |
| 393 |
|
if (errno == 0) |
| 394 |
|
if (isnan(d)) |