fixes for YapRunGoal

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@541 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2002-06-18 02:27:53 +00:00
parent b48f1264b9
commit 944d2e8aed
4 changed files with 29 additions and 24 deletions

View File

@@ -689,17 +689,21 @@ static void myputc (int ch)
putc(ch,stderr);
}
static Term told;
X_API int
YapRunGoal(Term t)
{
int out;
yamop *old_CP = CP;
BACKUP_MACHINE_REGS();
do_putcf = myputc;
out = RunTopGoal(t);
told = t;
if (out) {
P = (yamop *)ENV[E_CP];
ENV = (CELL *)ENV[E_E];
CP = old_CP;
} else {
B = B->cp_b;
}
RECOVER_MACHINE_REGS();
return(out);
@@ -743,6 +747,7 @@ YapPruneGoal(void)
while (B->cp_ap != NOCODE) {
B = B->cp_b;
}
B = B->cp_b;
RECOVER_B();
}