1 |
< |
/* Copyright (c) 1986 Regents of the University of California */ |
1 |
> |
/* Copyright (c) 1991 Regents of the University of California */ |
2 |
|
|
3 |
|
#ifndef lint |
4 |
|
static char SCCSid[] = "$SunId$ LBL"; |
32 |
|
|
33 |
|
#define isdecimal(c) (isdigit(c) || (c) == '.') |
34 |
|
|
35 |
< |
extern double atof(), pow(); |
35 |
> |
#ifndef atof |
36 |
> |
extern double atof(); |
37 |
> |
#endif |
38 |
> |
extern double pow(); |
39 |
|
extern char *fgets(), *savestr(); |
40 |
|
extern char *emalloc(), *ecalloc(); |
41 |
|
extern EPNODE *curfunc; |
447 |
|
for (i = 0; i < MAXWORD && isid(lnext); i++, lnext = scan()) |
448 |
|
str[i] = lnext; |
449 |
|
str[i] = '\0'; |
450 |
+ |
while (isid(lnext)) /* skip rest of name */ |
451 |
+ |
lnext = scan(); |
452 |
|
|
453 |
|
return(str); |
454 |
|
} |
589 |
|
ep2->v.num = -ep2->v.num; |
590 |
|
return(ep2); |
591 |
|
} |
592 |
+ |
if (ep2->type == UMINUS) { /* don't generate -(-E5) */ |
593 |
+ |
efree((char *)ep2); |
594 |
+ |
return(ep2->v.kid); |
595 |
+ |
} |
596 |
|
ep1 = newnode(); |
597 |
|
ep1->type = UMINUS; |
598 |
|
addekid(ep1, ep2); |
636 |
|
#endif |
637 |
|
|
638 |
|
#if defined(VARIABLE) || defined(FUNCTION) |
639 |
< |
if (isalpha(nextc)) { |
639 |
> |
if (isalpha(nextc) || nextc == CNTXMARK) { |
640 |
|
nam = getname(); |
641 |
|
#if defined(VARIABLE) && defined(FUNCTION) |
642 |
|
ep1 = NULL; |
753 |
|
|
754 |
|
if (ep->type != VAR) |
755 |
|
return(0); |
756 |
< |
dp = ep->v.ln->def; |
757 |
< |
if (dp != NULL && dp->type != ':') |
758 |
< |
return(0); |
759 |
< |
if ((dp == NULL || dp->v.kid->type != FUNC) |
760 |
< |
&& ((lp = liblookup(ep->v.ln->name)) == NULL |
752 |
< |
|| lp->atyp != ':')) |
753 |
< |
return(0); |
754 |
< |
return(1); |
756 |
> |
if ((dp = ep->v.ln->def) != NULL && dp->v.kid->type == FUNC) |
757 |
> |
return(dp->type == ':'); |
758 |
> |
if ((lp = liblookup(ep->v.ln->name)) != NULL) |
759 |
> |
return(lp->atyp == ':'); |
760 |
> |
return(0); |
761 |
|
} |
762 |
|
#endif |
763 |
|
#endif |