]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/cmd/acid/exec.c
abaco: cleanup, handle image/x-icon, don't use backspace as a hotkey, and remove...
[plan9front.git] / sys / src / cmd / acid / exec.c
index 3d9bd590b0b30ee74d1918e759c4ba156ddcb2aa..09663a15a07873934d6da8e534502be0e4158b88 100644 (file)
@@ -56,6 +56,32 @@ unwind(void)
        }
 }
 
+void
+execrec(Node *n)
+{
+       Value *v;
+       Lsym *s;
+
+       /* make node a root so it isn't collected! */
+       s = mkvar("_thiscmd");
+
+       v = gmalloc(sizeof(Value));
+       memset(v, 0, sizeof(Value));
+       v->type = TCODE;
+       v->cc = n;
+       v->pop = s->v;
+
+       s->v = v;
+       s->proc = n;
+
+       gc();
+       execute(n);
+
+       s->proc = s->v->cc;
+       s->v = v->pop;
+       free(v);
+}
+
 void
 execute(Node *n)
 {
@@ -66,7 +92,6 @@ execute(Node *n)
        Node res, xx;
        static int stmnt;
 
-       gc();
        if(gotint)
                error("interrupted");