- Rewrote mindwipe to ansi variant.
This commit is contained in:
parent
112e3799ab
commit
b5ddd75d95
@ -52,13 +52,16 @@ Termlist knowledgeNew (const Knowledge oldk, const Knowledge newk);
|
|||||||
|
|
||||||
//! Harnass macro for recursive procedures.
|
//! Harnass macro for recursive procedures.
|
||||||
#define mindwipe(k,recurse) \
|
#define mindwipe(k,recurse) \
|
||||||
|
Termlist tl; \
|
||||||
|
Term oldsubst; \
|
||||||
|
int flag; \
|
||||||
if (k != NULL && k->vars != NULL) { \
|
if (k != NULL && k->vars != NULL) { \
|
||||||
Termlist tl = k->vars; \
|
tl = k->vars; \
|
||||||
while (tl != NULL) { \
|
while (tl != NULL) { \
|
||||||
if (tl->term->subst != NULL) { \
|
if (tl->term->subst != NULL) { \
|
||||||
Term oldsubst = tl->term->subst; \
|
Term oldsubst = tl->term->subst; \
|
||||||
tl->term->subst = NULL; \
|
tl->term->subst = NULL; \
|
||||||
int flag = recurse; \
|
flag = recurse; \
|
||||||
tl->term->subst = oldsubst; \
|
tl->term->subst = oldsubst; \
|
||||||
return flag; \
|
return flag; \
|
||||||
} \
|
} \
|
||||||
|
Loading…
Reference in New Issue
Block a user