put tracer.c back to normal.

This commit is contained in:
Vitor Santos Costa 2008-09-14 05:11:35 +01:00
parent f4100a8095
commit 473012316a

View File

@ -50,10 +50,14 @@ send_tracer_message(char *start, char *name, Int arity, char *mname, CELL *args)
int i;
if (arity) {
if (args)
fprintf(Yap_stderr, "%s %s:%s(", start, mname, name);
else
fprintf(Yap_stderr, "%s %s:%s/%d", start, mname, name, arity);
} else {
fprintf(Yap_stderr, "%s %s:%s", start, mname, name);
}
if (args) {
for (i= 0; i < arity; i++) {
if (i > 0) fprintf(Yap_stderr, ",");
#if DEBUG
@ -77,7 +81,8 @@ send_tracer_message(char *start, char *name, Int arity, char *mname, CELL *args)
#endif
#endif
}
if (arity) fprintf(Yap_stderr, ")");
fprintf(Yap_stderr, ")");
}
}
fprintf(Yap_stderr, "\n");
}
@ -308,11 +313,13 @@ low_level_trace(yap_low_level_port port, PredEntry *pred, CELL *args)
send_tracer_message("FAIL ", NULL, 0, NULL, args);
mname = RepAtom(AtomOfTerm(Yap_Module_Name(pred)))->StrOfAE;
arity = pred->ArityOfPE;
if (arity == 0)
if (arity == 0) {
s = RepAtom((Atom)pred->FunctorOfPred)->StrOfAE;
else
s = RepAtom(NameOfFunctor((pred->FunctorOfPred)))->StrOfAE;
send_tracer_message("RETRY CONSUMER: ", s, 0, mname, NULL);
} else {
s = RepAtom(NameOfFunctor((pred->FunctorOfPred)))->StrOfAE;
send_tracer_message("RETRY CONSUMER: ", s, pred->ArityOfPE, mname, NULL);
}
break;
case retry_table_loader:
send_tracer_message("FAIL ", NULL, 0, NULL, args);