new text conversion and string code (big changes, take care please)
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user