new text conversion and string code (big changes, take care please)

This commit is contained in:
Vítor Santos Costa
2013-12-02 14:49:41 +00:00
parent 8b7fa9be36
commit d7397b43af
65 changed files with 1498 additions and 2098 deletions

View File

@@ -152,6 +152,9 @@ static int can_unify_complex(register CELL *pt0,
case (CELL)FunctorDouble:
if (FloatOfTerm(d0) == FloatOfTerm(d1)) continue;
goto comparison_failed;
case (CELL)FunctorString:
if (strcmp(StringOfTerm(d0), StringOfTerm(d1)) == 0) continue;
goto comparison_failed;
#ifdef USE_GMP
case (CELL)FunctorBigInt:
if (Yap_gmp_tcmp_big_big(d0,d1) == 0) continue;
@@ -288,6 +291,9 @@ can_unify(Term t1, Term t2, Term *Vars USES_REGS)
case (CELL)FunctorLongInt:
if (RepAppl(t1)[1] == RepAppl(t2)[1]) return(TRUE);
return FALSE;
case (CELL)FunctorString:
if (strcmp(StringOfTerm(t1), StringOfTerm(t2)) == 0) return(TRUE);
return FALSE;
case (CELL)FunctorDouble:
if (FloatOfTerm(t1) == FloatOfTerm(t2)) return(TRUE);
return FALSE;