diff --git a/C/iopreds.c b/C/iopreds.c index 30b0c12da..cb6561aa2 100644 --- a/C/iopreds.c +++ b/C/iopreds.c @@ -199,6 +199,14 @@ Yap_DebugPutc(int sno, wchar_t ch) return (Sputc(ch, GLOBAL_stderr)); } +static int +Yap_DebugPuts(int sno, const char * s) +{ + if (GLOBAL_Option['l' - 96]) + (void) fputs(s, GLOBAL_logfile); + return (Sfputs(s, GLOBAL_stderr)); +} + void Yap_DebugPlWrite(Term t) { @@ -212,6 +220,13 @@ Yap_DebugErrorPutc(int c) Yap_DebugPutc (LOCAL_c_error_stream, c); } +void +Yap_DebugErrorPuts(const char *s) +{ + CACHE_REGS + Yap_DebugPuts (LOCAL_c_error_stream, s); +} + #endif diff --git a/H/Yapproto.h b/H/Yapproto.h index 7ec515f9e..83acf11bb 100755 --- a/H/Yapproto.h +++ b/H/Yapproto.h @@ -283,6 +283,7 @@ void *Yap_GetOutputStream(Atom at); #ifdef DEBUG extern void Yap_DebugPlWrite (Term t); extern void Yap_DebugErrorPutc (int n); +extern void Yap_DebugErrorPuts (const char *s); #endif void Yap_PlWriteToStream(Term, int, int); /* depth_lim.c */