summaryrefslogtreecommitdiff
path: root/usr.bin/m4/main.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2001-09-18 13:52:59 +0000
committerMarc Espie <espie@cvs.openbsd.org>2001-09-18 13:52:59 +0000
commit7ba378d747ac554e73941549d1771e3956c7ccb6 (patch)
tree4125663a837fd2c3db0e5a637c59c655a57f31fe /usr.bin/m4/main.c
parentb8a61704827463b30606d30c7d89c7ae910a770a (diff)
One single point for all macros/builtin expansion.
Diffstat (limited to 'usr.bin/m4/main.c')
-rw-r--r--usr.bin/m4/main.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c
index 3c61a541839..0fbbf667994 100644
--- a/usr.bin/m4/main.c
+++ b/usr.bin/m4/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.43 2001/09/18 13:44:51 espie Exp $ */
+/* $OpenBSD: main.c,v 1.44 2001/09/18 13:52:58 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.43 2001/09/18 13:44:51 espie Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.44 2001/09/18 13:52:58 espie Exp $";
#endif
#endif /* not lint */
@@ -336,10 +336,8 @@ macro()
if (sp == STACKMAX)
errx(1, "internal stack overflow");
- if (CALTYP == MACRTYPE)
- expand((const char **) mstack+fp+1, 2);
- else
- eval((const char **) mstack+fp+1, 2, CALTYP);
+ eval((const char **) mstack+fp+1, 2,
+ CALTYP);
ep = PREVEP; /* flush strspace */
sp = PREVSP; /* previous sp.. */
@@ -436,10 +434,8 @@ macro()
if (sp == STACKMAX)
errx(1, "internal stack overflow");
- if (CALTYP == MACRTYPE)
- expand((const char **) mstack+fp+1, sp-fp);
- else
- eval((const char **) mstack+fp+1, sp-fp, CALTYP);
+ eval((const char **) mstack+fp+1, sp-fp,
+ CALTYP);
ep = PREVEP; /* flush strspace */
sp = PREVSP; /* previous sp.. */