Merge branch 'master' of /cygdrive/z/vitor/Yap/yap-6.3

This commit is contained in:
U-WIN-U2045GN0RNQ\Vítor Santos Costa
2011-07-25 17:09:43 +01:00
81 changed files with 4239 additions and 2447 deletions

View File

@@ -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;
}

View File

@@ -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)
{