aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/rc/code.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/rc/code.c')
-rw-r--r--src/cmd/rc/code.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cmd/rc/code.c b/src/cmd/rc/code.c
index eeaa3ed8..208476ae 100644
--- a/src/cmd/rc/code.c
+++ b/src/cmd/rc/code.c
@@ -41,6 +41,16 @@ stuffdot(int a)
int
compile(tree *t)
{
+ if(flag['D']) {
+ struct io *s;
+ s = openstr();
+ pfmt(s, "compile: %u\n", t);
+ write(2, s->strp, strlen(s->strp));
+ closeio(s);
+ if(eflagok) // made it out of rcmain - stop executing commands, just print them
+ t = nil;
+ }
+
ncode = 100;
codebuf = (code *)emalloc(ncode*sizeof codebuf[0]);
codep = 0;