From 6d34ce46f354a94ded75fff7442b1a20927e9950 Mon Sep 17 00:00:00 2001 From: vsc Date: Wed, 6 Jul 2005 18:13:21 +0000 Subject: [PATCH] ifix Yap_op_names git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1341 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/heapgc.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/C/heapgc.c b/C/heapgc.c index 9211617e8..b56aded0f 100644 --- a/C/heapgc.c +++ b/C/heapgc.c @@ -1722,6 +1722,7 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose) if (very_verbose) { PredEntry *pe = Yap_PredForChoicePt(gc_B); +#if defined(ANALYST) || defined(DEBUG) if (pe == NULL) { fprintf(Yap_stderr,"%% marked %ld (%s)\n", total_marked, Yap_op_names[opnum]); } else if (pe->ArityOfPE) { @@ -1729,6 +1730,15 @@ mark_choicepoints(register choiceptr gc_B, tr_fr_ptr saved_TR, int very_verbose) } else { fprintf(Yap_stderr,"%% %s marked %ld (%s)\n", RepAtom((Atom)(pe->FunctorOfPred))->StrOfAE, total_marked, Yap_op_names[opnum]); } +#else + if (pe == NULL) { + fprintf(Yap_stderr,"%% marked %ld (%u)\n", total_marked, (unsigned int)opnum); + } else if (pe->ArityOfPE) { + fprintf(Yap_stderr,"%% %s/%d marked %ld (%u)\n", RepAtom(NameOfFunctor(pe->FunctorOfPred))->StrOfAE, pe->ArityOfPE, total_marked, (unsigned int)opnum); + } else { + fprintf(Yap_stderr,"%% %s marked %ld (%u)\n", RepAtom((Atom)(pe->FunctorOfPred))->StrOfAE, total_marked, (unsigned int)opnum); + } +#endif } { /* find out how many cells are still alive in the trail */