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"; |
444 |
|
for (i = 0; i < MAXWORD && isid(lnext); i++, lnext = scan()) |
445 |
|
str[i] = lnext; |
446 |
|
str[i] = '\0'; |
447 |
+ |
while (isid(lnext)) /* skip rest of name */ |
448 |
+ |
lnext = scan(); |
449 |
|
|
450 |
|
return(str); |
451 |
|
} |
606 |
|
/* ARG */ |
607 |
|
{ |
608 |
|
int i; |
609 |
+ |
char *nam; |
610 |
|
register EPNODE *ep1, *ep2; |
611 |
|
|
612 |
|
if (nextc == '(') { |
629 |
|
#endif |
630 |
|
|
631 |
|
#if defined(VARIABLE) || defined(FUNCTION) |
632 |
< |
if (isalpha(nextc)) { |
633 |
< |
ep1 = newnode(); |
631 |
< |
ep1->type = VAR; |
632 |
< |
ep1->v.ln = varinsert(getname()); |
633 |
< |
|
632 |
> |
if (isalpha(nextc) || nextc == CNTXMARK) { |
633 |
> |
nam = getname(); |
634 |
|
#if defined(VARIABLE) && defined(FUNCTION) |
635 |
+ |
ep1 = NULL; |
636 |
|
if (curfunc != NULL) |
637 |
|
for (i = 1, ep2 = curfunc->v.kid->sibling; |
638 |
|
ep2 != NULL; i++, ep2 = ep2->sibling) |
639 |
< |
if (!strcmp(ep2->v.name, ep1->v.ln->name)) { |
639 |
< |
epfree(ep1); |
639 |
> |
if (!strcmp(ep2->v.name, nam)) { |
640 |
|
ep1 = newnode(); |
641 |
|
ep1->type = ARG; |
642 |
|
ep1->v.chan = i; |
643 |
|
break; |
644 |
|
} |
645 |
+ |
if (ep1 == NULL) |
646 |
|
#endif |
647 |
+ |
{ |
648 |
+ |
ep1 = newnode(); |
649 |
+ |
ep1->type = VAR; |
650 |
+ |
ep1->v.ln = varinsert(nam); |
651 |
+ |
} |
652 |
|
#ifdef FUNCTION |
653 |
|
if (nextc == '(') { |
654 |
|
ep2 = newnode(); |