]> thyrsus.com Git - cupl.git/commitdiff
First hack at rewrite code.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 3 Nov 1994 15:13:09 +0000 (15:13 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 3 Nov 1994 15:13:09 +0000 (15:13 +0000)
cupl.h
interpret.c

diff --git a/cupl.h b/cupl.h
index 2faeeb5b5f154c79653ba397c37382f54734df2f..87e2a2c758ada7780771f756fba914b2085112d1 100644 (file)
--- a/cupl.h
+++ b/cupl.h
@@ -54,7 +54,7 @@ typedef struct edon
 }
 node;
 
-#define for_cdr(np, tree)    for (np = tree; np; np = tree->u.n.right)
+#define for_cdr(x, t)    for (x = (t); x; x = x->u.n.right)
 
 /* this structure represents a CUPL value */
 typedef struct
index 0cc92dcc52905f0cd56b296b5f5827b9d7324216..e1214bb20d41be20322392cf5593f0c0823fd16f 100644 (file)
@@ -177,7 +177,7 @@ static bool check_errors(node *tree)
     lvar       *lp;
 
     /* simple sanity check */
-    for (n = tree; n; n = n->u.n.right)
+    for_cdr(n, tree)
        if (n->type != STATEMENT)
            die("internal error: non-STATEMENT at top level");