From b5ddd75d9549f225a38745db8017296b039fcb71 Mon Sep 17 00:00:00 2001 From: ccremers Date: Wed, 26 May 2004 09:34:08 +0000 Subject: [PATCH] - Rewrote mindwipe to ansi variant. --- src/knowledge.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/knowledge.h b/src/knowledge.h index 77146a4..5e5378f 100644 --- a/src/knowledge.h +++ b/src/knowledge.h @@ -52,13 +52,16 @@ Termlist knowledgeNew (const Knowledge oldk, const Knowledge newk); //! Harnass macro for recursive procedures. #define mindwipe(k,recurse) \ + Termlist tl; \ + Term oldsubst; \ + int flag; \ if (k != NULL && k->vars != NULL) { \ - Termlist tl = k->vars; \ + tl = k->vars; \ while (tl != NULL) { \ if (tl->term->subst != NULL) { \ Term oldsubst = tl->term->subst; \ tl->term->subst = NULL; \ - int flag = recurse; \ + flag = recurse; \ tl->term->subst = oldsubst; \ return flag; \ } \