diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2003-06-30 21:47:22 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2003-06-30 21:47:22 +0000 |
commit | 06c9ed6564f8bbc0056658a983d379052179aa86 (patch) | |
tree | e2c1a9ac42503c1580f5acf99ef39fea3d6c8df4 /usr.bin/m4/gnum4.c | |
parent | 6947789365296ced45fe71914dfebf93e2dd8934 (diff) |
Make the trace status of a macro an actual argument that gets pushed
in the frame for the macro expansion.
(This will allow one single lookup to grab the macro definition and
the trace status)
okay millert@
Diffstat (limited to 'usr.bin/m4/gnum4.c')
-rw-r--r-- | usr.bin/m4/gnum4.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/m4/gnum4.c b/usr.bin/m4/gnum4.c index 8a2c7977212..4b39253c042 100644 --- a/usr.bin/m4/gnum4.c +++ b/usr.bin/m4/gnum4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gnum4.c,v 1.22 2003/06/30 21:42:50 espie Exp $ */ +/* $OpenBSD: gnum4.c,v 1.23 2003/06/30 21:47:21 espie Exp $ */ /* * Copyright (c) 1999 Marc Espie @@ -165,7 +165,8 @@ doindir(const char *argv[], int argc) if (p == NULL) errx(1, "undefined macro %s", argv[2]); argv[1] = p->defn; - eval(argv+1, argc-1, p->type); + + eval(argv+1, argc-1, p->type, traced_macros && is_traced(argv[2])); } void @@ -175,7 +176,7 @@ dobuiltin(const char *argv[], int argc) argv[1] = NULL; n = builtin_type(argv[2]); if (n != -1) - eval(argv+1, argc-1, n); + eval(argv+1, argc-1, n, traced_macros && is_traced(argv[2])); else errx(1, "unknown builtin %s", argv[2]); } |