Merge branch 'master' of /cygdrive/z/vitor/Yap/yap-6.3
This commit is contained in:
@@ -884,6 +884,15 @@ writePrimitive(term_t t, write_options *options)
|
||||
return writeString(t, options);
|
||||
#endif /* O_STRING */
|
||||
|
||||
#if __YAP_PROLOG__
|
||||
{
|
||||
number n;
|
||||
n.type = V_INTEGER;
|
||||
n.value.i = 0;
|
||||
return WriteNumber(&n, options);
|
||||
}
|
||||
#endif
|
||||
|
||||
assert(0);
|
||||
fail;
|
||||
}
|
||||
|
@@ -1121,6 +1121,9 @@ Yap_StreamPosition(IOSTREAM *st)
|
||||
return StreamPosition(st);
|
||||
}
|
||||
|
||||
IOSTREAM *STD_PROTO(Yap_Scurin, (void));
|
||||
int STD_PROTO(Yap_dowrite, (Term, IOSTREAM *, int, int));
|
||||
|
||||
IOSTREAM *
|
||||
Yap_Scurin(void)
|
||||
{
|
||||
@@ -1128,6 +1131,32 @@ Yap_Scurin(void)
|
||||
return Scurin;
|
||||
}
|
||||
|
||||
int
|
||||
Yap_dowrite(Term t, IOSTREAM *stream, int flags, int priority)
|
||||
/* term to be written */
|
||||
/* consumer */
|
||||
/* write options */
|
||||
{
|
||||
CACHE_REGS
|
||||
int swi_flags;
|
||||
int res;
|
||||
Int slot = Yap_InitSlot(t PASS_REGS);
|
||||
|
||||
swi_flags = 0;
|
||||
if (flags & Quote_illegal_f)
|
||||
swi_flags |= PL_WRT_QUOTED;
|
||||
if (flags & Handle_vars_f)
|
||||
swi_flags |= PL_WRT_NUMBERVARS;
|
||||
if (flags & Use_portray_f)
|
||||
swi_flags |= PL_WRT_PORTRAY;
|
||||
if (flags & Ignore_ops_f)
|
||||
swi_flags |= PL_WRT_IGNOREOPS;
|
||||
|
||||
res = PL_write_term(stream, slot, priority, swi_flags);
|
||||
Yap_RecoverSlots(1 PASS_REGS);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
#if THREADS
|
||||
|
||||
@@ -1178,6 +1207,7 @@ error:
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
recursiveMutexInit(recursiveMutex *m)
|
||||
{
|
||||
|
Reference in New Issue
Block a user