From: Eric S. Raymond Date: Thu, 3 Nov 1994 15:13:09 +0000 (+0000) Subject: First hack at rewrite code. X-Git-Tag: 1-2~91 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=e5f34f7ba11ce20ca189510317226cd9278864c5;p=cupl.git First hack at rewrite code. --- diff --git a/cupl.h b/cupl.h index 2faeeb5..87e2a2c 100644 --- 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 diff --git a/interpret.c b/interpret.c index 0cc92dc..e1214bb 100644 --- a/interpret.c +++ b/interpret.c @@ -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");