Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!uunet!mcvax!ukc!warwick!cudcv From: cudcv@warwick.ac.uk (Rob McMahon) Newsgroups: comp.sources.bugs Subject: rh - parse problems Message-ID: <151@titania.warwick.ac.uk> Date: 4 May 89 09:59:51 GMT Reply-To: cudcv@warwick.ac.uk (Rob McMahon) Organization: Computing Services, Warwick University, UK Lines: 36 rh fails with an expression like `size == (8)' with an error `missing ')'', because the rhparse.c(ungetit) routine fails to put back the last character of the expression, so that the final `)' is never seen. This patch appears to fix the problem. RCS file: rhparse.c,v retrieving revision 1.2 diff -c -r1.2 rhparse.c *** /tmp/,RCSt1a02508 Thu May 4 10:57:35 1989 --- rhparse.c Thu May 4 10:38:00 1989 *************** *** 39,45 **** int c; { cpos--; ! if( dashe ) expstr = (*expstr) ? expstr-1 : expstr; else ungetc(c,expfile); } --- 39,48 ---- int c; { cpos--; ! if( dashe ) { ! if( c != EOF ) ! expstr--; ! } else ungetc(c,expfile); } Rob -- UUCP: ...!mcvax!ukc!warwick!cudcv PHONE: +44 203 523037 JANET: cudcv@uk.ac.warwick ARPA: cudcv@warwick.ac.uk Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England