From: ceriel Date: Fri, 6 Feb 1987 14:44:56 +0000 (+0000) Subject: did not work with bloody vax assemblerr X-Git-Tag: release-5-5~4728 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=77f33b67625383d7722e85b2fa1c5a4050fb91cd;p=ack.git did not work with bloody vax assemblerr --- diff --git a/lang/cem/libcc/stdio/ungetc.c b/lang/cem/libcc/stdio/ungetc.c index ee88bf2bc..ef1919692 100644 --- a/lang/cem/libcc/stdio/ungetc.c +++ b/lang/cem/libcc/stdio/ungetc.c @@ -2,8 +2,10 @@ ungetc(ch, iop) int ch; -FILE *iop; +register FILE *iop; { + unsigned char *p; + if ( ch < 0 || !io_testflag(iop,IO_READMODE)) return EOF; if (iop->_ptr == iop->_buf) { @@ -11,6 +13,7 @@ FILE *iop; iop->_ptr++; } iop->_count++; - *--iop->_ptr = ch; + p = --(iop->_ptr); /* ??? Bloody vax assembler !!! */ + *p = ch; return(ch); }