diff options
Diffstat (limited to 'usr.bin/m4')
-rw-r--r-- | usr.bin/m4/extern.h | 12 | ||||
-rw-r--r-- | usr.bin/m4/main.c | 14 | ||||
-rw-r--r-- | usr.bin/m4/mdef.h | 4 | ||||
-rw-r--r-- | usr.bin/m4/misc.c | 8 |
4 files changed, 20 insertions, 18 deletions
diff --git a/usr.bin/m4/extern.h b/usr.bin/m4/extern.h index e4f7e7de37e..3fa5d195e60 100644 --- a/usr.bin/m4/extern.h +++ b/usr.bin/m4/extern.h @@ -1,4 +1,4 @@ -/* $OpenBSD: extern.h,v 1.3 1996/06/26 05:36:12 deraadt Exp $ */ +/* $OpenBSD: extern.h,v 1.4 1997/12/10 20:24:12 deraadt Exp $ */ /* $NetBSD: extern.h,v 1.3 1996/01/13 23:25:24 pk Exp $ */ /*- @@ -82,13 +82,13 @@ extern int fp; /* m4 call frame pointer */ extern int ilevel; /* input file stack pointer */ extern int oindex; /* diversion index. */ extern int sp; /* current m4 stack pointer */ -extern char *bp; /* first available character */ -extern char buf[]; /* push-back buffer */ -extern char *bufbase; /* buffer base for this ilevel */ -extern char *bbase[]; /* buffer base per ilevel */ +extern pbent *bp; /* first available character */ +extern pbent buf[]; /* push-back buffer */ +extern pbent *bufbase; /* buffer base for this ilevel */ +extern pbent *bbase[]; /* buffer base per ilevel */ extern char ecommt[]; /* end character for comment */ extern char *endest; /* end of string space */ -extern char *endpbb; /* end of push-back buffer */ +extern pbent *endpbb; /* end of push-back buffer */ extern char *ep; /* first free char in strspace */ extern char lquote[]; /* left quote character (`) */ extern char *m4temp; /* filename for diversions */ diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c index 187dc3a9ae0..d1f3b08ce9e 100644 --- a/usr.bin/m4/main.c +++ b/usr.bin/m4/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.5 1997/01/15 23:42:49 millert Exp $ */ +/* $OpenBSD: main.c,v 1.6 1997/12/10 20:24:15 deraadt Exp $ */ /* $NetBSD: main.c,v 1.11 1996/01/13 23:25:26 pk Exp $ */ /*- @@ -47,7 +47,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: main.c,v 1.5 1997/01/15 23:42:49 millert Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.6 1997/12/10 20:24:15 deraadt Exp $"; #endif #endif /* not lint */ @@ -70,11 +70,11 @@ static char rcsid[] = "$OpenBSD: main.c,v 1.5 1997/01/15 23:42:49 millert Exp $" #include "pathnames.h" ndptr hashtab[HASHSIZE]; /* hash table for macros etc. */ -char buf[BUFSIZE]; /* push-back buffer */ -char *bufbase = buf; /* the base for current ilevel */ -char *bbase[MAXINP]; /* the base for each ilevel */ -char *bp = buf; /* first available character */ -char *endpbb = buf+BUFSIZE; /* end of push-back buffer */ +pbent buf[BUFSIZE]; /* push-back buffer */ +pbent *bufbase = buf; /* the base for current ilevel */ +pbent *bbase[MAXINP]; /* the base for each ilevel */ +pbent *bp = buf; /* first available character */ +pbent *endpbb = buf+BUFSIZE; /* end of push-back buffer */ stae mstack[STACKMAX+1]; /* stack of m4 machine */ char strspace[STRSPMAX+1]; /* string space for evaluation */ char *ep = strspace; /* first free char in strspace */ 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 * 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; |