diff options
-rw-r--r-- | usr.bin/m4/look.c | 10 | ||||
-rw-r--r-- | usr.bin/m4/main.c | 8 | ||||
-rw-r--r-- | usr.bin/m4/mdef.h | 3 |
3 files changed, 9 insertions, 12 deletions
diff --git a/usr.bin/m4/look.c b/usr.bin/m4/look.c index 22ed2cfc202..b153e95e45c 100644 --- a/usr.bin/m4/look.c +++ b/usr.bin/m4/look.c @@ -1,4 +1,4 @@ -/* $OpenBSD: look.c,v 1.7 1999/11/25 00:54:22 millert Exp $ */ +/* $OpenBSD: look.c,v 1.8 2001/09/17 08:11:13 espie Exp $ */ /* * Copyright (c) 1989, 1993 @@ -108,11 +108,9 @@ static void freent(p) ndptr p; { - if (!(p->type & STATIC)) { - free((char *) p->name); - if (p->defn != null) - free((char *) p->defn); - } + free((char *) p->name); + if (p->defn != null) + free((char *) p->defn); free((char *) p); } diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c index c0687e9c5f7..ab3cd5b2f5e 100644 --- a/usr.bin/m4/main.c +++ b/usr.bin/m4/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.41 2001/09/16 21:12:08 espie Exp $ */ +/* $OpenBSD: main.c,v 1.42 2001/09/17 08:11:13 espie Exp $ */ /* $NetBSD: main.c,v 1.12 1997/02/08 23:54:49 cgd 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.41 2001/09/16 21:12:08 espie Exp $"; +static char rcsid[] = "$OpenBSD: main.c,v 1.42 2001/09/17 08:11:13 espie Exp $"; #endif #endif /* not lint */ @@ -554,10 +554,10 @@ initkwds() p = (ndptr) xalloc(sizeof(struct ndblock)); p->nxtptr = hashtab[h % HASHSIZE]; hashtab[h % HASHSIZE] = p; - p->name = keywrds[i].knam; + p->name = xstrdup(keywrds[i].knam); p->defn = null; p->hv = h; - p->type = (keywrds[i].ktyp & TYPEMASK) | STATIC; + p->type = keywrds[i].ktyp & TYPEMASK; if ((keywrds[i].ktyp & NOARGS) == 0) p->type |= NEEDARGS; } diff --git a/usr.bin/m4/mdef.h b/usr.bin/m4/mdef.h index 3cb0d12b22b..f61548d8297 100644 --- a/usr.bin/m4/mdef.h +++ b/usr.bin/m4/mdef.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mdef.h,v 1.18 2001/06/15 14:01:39 espie Exp $ */ +/* $OpenBSD: mdef.h,v 1.19 2001/09/17 08:11:13 espie Exp $ */ /* $NetBSD: mdef.h,v 1.7 1996/01/13 23:25:27 pk Exp $ */ /* @@ -82,7 +82,6 @@ #define ESYSCMDTYPE 41 #define TYPEMASK 63 /* Keep bits really corresponding to a type. */ -#define STATIC 128 /* Name is statically allocated, don't free. */ #define RECDEF 256 /* Pure recursive def, don't expand it */ #define NOARGS 512 /* builtin needs no args */ #define NEEDARGS 1024 /* mark builtin that need args with this */ |