git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1617 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc
2006-04-28 16:14:05 +00:00
parent 9101c18410
commit 720db316ce
4 changed files with 17 additions and 21 deletions

View File

@@ -453,12 +453,16 @@ writeTerm(Term t, int p, int depth, int rinfixarg, struct write_globs *wglb)
#ifdef USE_GMP
case (CELL)FunctorBigInt:
{
char *s = (char *)TR;
MP_INT *big = Yap_BigIntOfTerm(t);
while (s+2+mpz_sizeinbase(big, 10) > (char *)Yap_TrailTop) {
Yap_growtrail(2+mpz_sizeinbase(big, 10), TRUE);
big = Yap_BigIntOfTerm(t);
char *s = (char *)TR;
if (s+2+mpz_sizeinbase(big, 10) >= Yap_TrailTop) {
s = H;
if (s+2+mpz_sizeinbase(big, 10) >= ASP) {
return;
}
}
if (!s)
return;
if (mpz_sgn(big) < 0) {
if (lastw == symbol)
wrputc(' ', wglb->writech);