initialise slot stack properly.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1060 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2004-05-01 03:58:46 +00:00
parent 3b376f87e7
commit 420bf9e92c

View File

@ -394,7 +394,6 @@ writeTerm(Term t, int p, int depth, int rinfixarg, struct write_globs *wglb)
targs[0] = t;
Yap_PutValue(AtomPortray, MkAtomTerm(AtomNil));
if (EX != 0L) old_EX = EX;
/* *--ASP = MkIntTerm(0); */
sl = Yap_InitSlot(t);
Yap_execute_goal(Yap_MkApplTerm(FunctorPortray, 1, targs), 0, 1);
t = Yap_GetFromSlot(sl);
@ -782,6 +781,8 @@ Yap_plwrite(Term t, int (*mywrite) (int, int), int flags)
we cannot make recursive Prolog calls */
wglb.keep_terms = (flags & (Use_portray_f|To_heap_f));
wglb.Ignore_ops = flags & Ignore_ops_f;
/* protect slots for portray */
*--ASP = MkIntTerm(0);
writeTerm(t, 1200, 1, FALSE, &wglb);
}