support outputting strings for debugging.
This commit is contained in:
parent
37a49f2135
commit
81440607f1
15
C/iopreds.c
15
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
|
||||
|
||||
|
||||
|
@ -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 */
|
||||
|
Reference in New Issue
Block a user