$NetBSD: patch-bc,v 1.2 2015/12/29 23:34:52 dholland Exp $ Use ungetc() correctly. --- rts/scan.c.orig 2003-11-21 21:00:01.000000000 +0100 +++ rts/scan.c @@ -7,7 +7,7 @@ static int scanToken (), scanInteger (), scanReal (), scanPointer (); static int scanTokenFromSet (); -#define BACKCH(c,f,S,s) (S ? ((s>DATA (S)) ? (s)-- : 0) : (char*)ungetc (c, f)) +#define BACKCH(c,f,S,s) (S ? ((s>DATA (S)) ? (s)--,0 : 0) : ungetc (c, f)) #define NEXTCH(l,f,S,s) (S ? ((*s=='\0') ? EOF : * (Char*)(s)++) : INCH (l, f)) #define SCAN_LEN 50