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/mdef.h | |
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/mdef.h')
-rw-r--r-- | usr.bin/m4/mdef.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/m4/mdef.h b/usr.bin/m4/mdef.h index 0b231ff9c5f..51eb5d60372 100644 --- a/usr.bin/m4/mdef.h +++ b/usr.bin/m4/mdef.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mdef.h,v 1.3 1996/06/26 05:36:14 deraadt Exp $ */ +/* $OpenBSD: mdef.h,v 1.4 1997/12/10 20:24:16 deraadt Exp $ */ /* $NetBSD: mdef.h,v 1.7 1996/01/13 23:25:27 pk Exp $ */ /* @@ -139,6 +139,8 @@ typedef union { /* stack structure */ char *sstr; /* string entry */ } stae; +typedef short pbent; /* pushback entry; needs to hold chars + EOF */ + /* * macros for readibility and/or speed * |