LOCAL_c_error_stream Prolog only

This commit is contained in:
Vítor Santos Costa 2015-06-19 00:18:00 +01:00
parent df52ba811a
commit 524a9ec738

View File

@ -4167,12 +4167,12 @@ ExpandIndex(PredEntry *ap, int ExtraArgs, yamop *nextop USES_REGS) {
if (!tmod) tmod = TermProlog; if (!tmod) tmod = TermProlog;
#if THREADS #if THREADS
Yap_DebugPlWrite(MkIntegerTerm(worker_id)); Yap_DebugPlWrite(MkIntegerTerm(worker_id));
Yap_DebugPutc(LOCAL_c_error_stream,' '); Yap_DebugPutc(stderr,' ');
#endif #endif
Yap_DebugPutc(LOCAL_c_error_stream,'>'); Yap_DebugPutc(stderr,'>');
Yap_DebugPutc(LOCAL_c_error_stream,'\t'); Yap_DebugPutc(stderr,'\t');
Yap_DebugPlWrite(tmod); Yap_DebugPlWrite(tmod);
Yap_DebugPutc(LOCAL_c_error_stream,':'); Yap_DebugPutc(stderr,':');
if (ap->ModuleOfPred == IDB_MODULE) { if (ap->ModuleOfPred == IDB_MODULE) {
Term t = Deref(ARG1); Term t = Deref(ARG1);
if (IsAtomTerm(t)) { if (IsAtomTerm(t)) {
@ -4183,7 +4183,7 @@ ExpandIndex(PredEntry *ap, int ExtraArgs, yamop *nextop USES_REGS) {
Functor f = FunctorOfTerm(t); Functor f = FunctorOfTerm(t);
Atom At = NameOfFunctor(f); Atom At = NameOfFunctor(f);
Yap_DebugPlWrite(MkAtomTerm(At)); Yap_DebugPlWrite(MkAtomTerm(At));
Yap_DebugPutc(LOCAL_c_error_stream,'/'); Yap_DebugPutc(stderr,'/');
Yap_DebugPlWrite(MkIntegerTerm(ArityOfFunctor(f))); Yap_DebugPlWrite(MkIntegerTerm(ArityOfFunctor(f)));
} }
} else { } else {
@ -4194,14 +4194,14 @@ ExpandIndex(PredEntry *ap, int ExtraArgs, yamop *nextop USES_REGS) {
Functor f = ap->FunctorOfPred; Functor f = ap->FunctorOfPred;
Atom At = NameOfFunctor(f); Atom At = NameOfFunctor(f);
Yap_DebugPlWrite(MkAtomTerm(At)); Yap_DebugPlWrite(MkAtomTerm(At));
Yap_DebugPutc(LOCAL_c_error_stream,'/'); Yap_DebugPutc(stderr,'/');
Yap_DebugPlWrite(MkIntegerTerm(ArityOfFunctor(f))); Yap_DebugPlWrite(MkIntegerTerm(ArityOfFunctor(f)));
} }
} }
Yap_DebugPutc(LOCAL_c_error_stream,'\n'); Yap_DebugPutc(stderr,'\n');
#if THREADS #if THREADS
Yap_DebugPlWrite(MkIntegerTerm(worker_id)); Yap_DebugPlWrite(MkIntegerTerm(worker_id));
Yap_DebugPutc(LOCAL_c_error_stream,' '); Yap_DebugPutc(stderr,' ');
#endif #endif
} }
#endif #endif
@ -5650,10 +5650,10 @@ Yap_AddClauseToIndex(PredEntry *ap, yamop *beg, int first) {
if (GLOBAL_Option['i' - 'a' + 1]) { if (GLOBAL_Option['i' - 'a' + 1]) {
Term tmod = ap->ModuleOfPred; Term tmod = ap->ModuleOfPred;
if (!tmod) tmod = TermProlog; if (!tmod) tmod = TermProlog;
Yap_DebugPutc(LOCAL_c_error_stream,'+'); Yap_DebugPutc(stderr,'+');
Yap_DebugPutc(LOCAL_c_error_stream,'\t'); Yap_DebugPutc(stderr,'\t');
Yap_DebugPlWrite(tmod); Yap_DebugPlWrite(tmod);
Yap_DebugPutc(LOCAL_c_error_stream,':'); Yap_DebugPutc(stderr,':');
if (ap->ModuleOfPred == IDB_MODULE) { if (ap->ModuleOfPred == IDB_MODULE) {
Term t = Deref(ARG1); Term t = Deref(ARG1);
if (IsAtomTerm(t)) { if (IsAtomTerm(t)) {
@ -5664,7 +5664,7 @@ Yap_AddClauseToIndex(PredEntry *ap, yamop *beg, int first) {
Functor f = FunctorOfTerm(t); Functor f = FunctorOfTerm(t);
Atom At = NameOfFunctor(f); Atom At = NameOfFunctor(f);
Yap_DebugPlWrite(MkAtomTerm(At)); Yap_DebugPlWrite(MkAtomTerm(At));
Yap_DebugPutc(LOCAL_c_error_stream,'/'); Yap_DebugPutc(stderr,'/');
Yap_DebugPlWrite(MkIntegerTerm(ArityOfFunctor(f))); Yap_DebugPlWrite(MkIntegerTerm(ArityOfFunctor(f)));
} }
} else { } else {
@ -5675,11 +5675,11 @@ Yap_AddClauseToIndex(PredEntry *ap, yamop *beg, int first) {
Functor f = ap->FunctorOfPred; Functor f = ap->FunctorOfPred;
Atom At = NameOfFunctor(f); Atom At = NameOfFunctor(f);
Yap_DebugPlWrite(MkAtomTerm(At)); Yap_DebugPlWrite(MkAtomTerm(At));
Yap_DebugPutc(LOCAL_c_error_stream,'/'); Yap_DebugPutc(stderr,'/');
Yap_DebugPlWrite(MkIntegerTerm(ArityOfFunctor(f))); Yap_DebugPlWrite(MkIntegerTerm(ArityOfFunctor(f)));
} }
} }
Yap_DebugPutc(LOCAL_c_error_stream,'\n'); Yap_DebugPutc(stderr,'\n');
} }
#endif #endif
stack = (path_stack_entry *)TR; stack = (path_stack_entry *)TR;
@ -6130,10 +6130,10 @@ Yap_RemoveClauseFromIndex(PredEntry *ap, yamop *beg) {
Term tmod = ap->ModuleOfPred; Term tmod = ap->ModuleOfPred;
if (!tmod) tmod = TermProlog; if (!tmod) tmod = TermProlog;
Yap_DebugPutc(LOCAL_c_error_stream,'-'); Yap_DebugPutc(stderr,'-');
Yap_DebugPutc(LOCAL_c_error_stream,'\t'); Yap_DebugPutc(stderr,'\t');
Yap_DebugPlWrite(tmod); Yap_DebugPlWrite(tmod);
Yap_DebugPutc(LOCAL_c_error_stream,':'); Yap_DebugPutc(stderr,':');
if (ap->ModuleOfPred != IDB_MODULE) { if (ap->ModuleOfPred != IDB_MODULE) {
if (ap->ArityOfPE == 0) { if (ap->ArityOfPE == 0) {
Atom At = (Atom)ap->FunctorOfPred; Atom At = (Atom)ap->FunctorOfPred;
@ -6142,7 +6142,7 @@ Yap_RemoveClauseFromIndex(PredEntry *ap, yamop *beg) {
Functor f = ap->FunctorOfPred; Functor f = ap->FunctorOfPred;
Atom At = NameOfFunctor(f); Atom At = NameOfFunctor(f);
Yap_DebugPlWrite(MkAtomTerm(At)); Yap_DebugPlWrite(MkAtomTerm(At));
Yap_DebugPutc(LOCAL_c_error_stream,'/'); Yap_DebugPutc(stderr,'/');
Yap_DebugPlWrite(MkIntegerTerm(ArityOfFunctor(f))); Yap_DebugPlWrite(MkIntegerTerm(ArityOfFunctor(f)));
} }
} else { } else {
@ -6156,11 +6156,11 @@ Yap_RemoveClauseFromIndex(PredEntry *ap, yamop *beg) {
Functor f = ap->FunctorOfPred; Functor f = ap->FunctorOfPred;
Atom At = NameOfFunctor(f); Atom At = NameOfFunctor(f);
Yap_DebugPlWrite(MkAtomTerm(At)); Yap_DebugPlWrite(MkAtomTerm(At));
Yap_DebugPutc(LOCAL_c_error_stream,'/'); Yap_DebugPutc(stderr,'/');
Yap_DebugPlWrite(MkIntegerTerm(ArityOfFunctor(f))); Yap_DebugPlWrite(MkIntegerTerm(ArityOfFunctor(f)));
} }
} }
Yap_DebugPutc(LOCAL_c_error_stream,'\n'); Yap_DebugPutc(stderr,'\n');
} }
#endif #endif
stack = (path_stack_entry *)TR; stack = (path_stack_entry *)TR;