--- ray/src/common/caldefn.c 2003/07/21 22:30:17 2.19 +++ ray/src/common/caldefn.c 2010/03/05 17:28:46 2.24 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: caldefn.c,v 2.19 2003/07/21 22:30:17 schorsch Exp $"; +static const char RCSid[] = "$Id: caldefn.c,v 2.24 2010/03/05 17:28:46 greg Exp $"; #endif /* * Store variable definitions. @@ -32,6 +32,8 @@ static const char RCSid[] = "$Id: caldefn.c,v 2.19 200 #include #include "rterror.h" +#include "rtio.h" +#include "rtmisc.h" #include "calcomp.h" #ifndef NHASH @@ -259,7 +261,7 @@ popcontext(void) /* pop off top context */ while (*++cp2 && *cp2 != CNTXMARK) ; cp1 = context; /* copy tail to front */ - while (*cp1++ = *cp2++) + while ( (*cp1++ = *cp2++) ) ; return(context); } @@ -622,7 +624,7 @@ getdefn(void) do { scan(); if (!isalpha(nextc)) - syntax("illegal variable name"); + syntax("illegal parameter name"); ep2 = newnode(); ep2->type = SYM; ep2->v.name = savestr(getname()); @@ -645,7 +647,7 @@ getdefn(void) if (ep1->type == SYM && ep1->sibling->type != NUM) { ep1 = newnode(); - ep1->type = TICK; + ep1->type = CLKT; ep1->v.tick = 0; addekid(ep2, ep1); ep1 = newnode(); @@ -707,7 +709,7 @@ dvalue(char *name, EPNODE *d) if (eclock >= MAXCLOCK) eclock = 1; /* wrap clock counter */ if (ep2->v.tick < MAXCLOCK && - ep2->v.tick == 0 | ep2->v.tick != eclock) { + (ep2->v.tick == 0) | (ep2->v.tick != eclock)) { ep2->v.tick = d->type == ':' ? MAXCLOCK : eclock; ep2 = ep2->sibling; ep2->v.num = evalue(ep1); /* needs new value */