diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-12-10 20:24:18 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-12-10 20:24:18 +0000 |
commit | f0f00b2ba05426cfa441008648bc5374fee06db2 (patch) | |
tree | 35566ea30b67a8e343c619dc9638465deb1258fe /usr.bin/m4/misc.c | |
parent | 01e46805c01c1545582d5b85ddad98e411f300ce (diff) |
cgd: add a typedef which describes elements in the push-back buffer. Make
that typedef 'short'. 'char' (which was previously used) because char
may be unsigned and ((char)EOF) != EOF if that is the case. That was
causing the (char)EOF (0xff) pushed back in main to be interepreted as
a character, and, in some cases, to be written to the output. 'short'
was used rather than 'signed char' because if the latter is used,
0xff characters in the input would confuse m4. (No point in introducing
(more?) 8-bit lossage.)
Diffstat (limited to 'usr.bin/m4/misc.c')
-rw-r--r-- | usr.bin/m4/misc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/m4/misc.c b/usr.bin/m4/misc.c index cbc1087c7c2..ba9a97c3eaf 100644 --- a/usr.bin/m4/misc.c +++ b/usr.bin/m4/misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: misc.c,v 1.5 1997/07/25 21:05:32 mickey Exp $ */ +/* $OpenBSD: misc.c,v 1.6 1997/12/10 20:24:17 deraadt Exp $ */ /* $NetBSD: misc.c,v 1.6 1995/09/28 05:37:41 tls Exp $ */ /* @@ -41,7 +41,7 @@ #if 0 static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: misc.c,v 1.5 1997/07/25 21:05:32 mickey Exp $"; +static char rcsid[] = "$OpenBSD: misc.c,v 1.6 1997/12/10 20:24:17 deraadt Exp $"; #endif #endif /* not lint */ @@ -80,7 +80,7 @@ char *s2; */ void putback(c) -char c; +pbent c; { if (bp < endpbb) *bp++ = c; @@ -98,7 +98,7 @@ pbstr(s) register char *s; { register char *es; - register char *zp; + pbent *zp; es = s; zp = bp; |