--- ray/src/common/calexpr.c 1989/04/10 22:06:37 1.2 +++ ray/src/common/calexpr.c 1989/06/29 09:44:33 1.4 @@ -349,7 +349,7 @@ char *err; register int i; eputs(linbuf); - if (linbuf[0] == '\0' || linbuf[strlen(linbuf)-1] != '\n') + if (linbuf[strlen(linbuf)-1] != '\n') eputs("\n"); for (i = 0; i < linepos-1; i++) eputs(linbuf[i] == '\t' ? "\t" : " "); @@ -517,24 +517,18 @@ EPNODE * getE4() /* E4 -> ADDOP E5 */ /* E5 */ { - register EPNODE *ep1; + register EPNODE *ep1, *ep2; if (nextc == '-') { scan(); - ep1 = newnode(); -#ifndef RCONST - if (isdecimal(nextc)) { - ep1->type = NUM; - ep1->v.num = -getnum(); - return(ep1); + ep2 = getE5(); + if (ep2->type == NUM) { + ep2->v.num = -ep2->v.num; + return(ep2); } -#endif + ep1 = newnode(); ep1->type = UMINUS; - addekid(ep1, getE5()); -#ifdef RCONST - if (ep1->v.kid->type == NUM) - ep1 = rconst(ep1); -#endif + addekid(ep1, ep2); return(ep1); } if (nextc == '+')