make it easier for outside packages to link with YAP innards.

This commit is contained in:
Vitor Santos Costa
2012-05-14 15:06:18 +01:00
parent 682db0aad4
commit 6c36a8ccd3
9 changed files with 154 additions and 117 deletions

View File

@@ -87,35 +87,6 @@ Dereferencing macros
#endif /* UNIQUE_TAG_FOR_PAIRS */
EXTERN Term STD_PROTO(Deref,(Term));
EXTERN Term STD_PROTO(Derefa,(CELL *));
EXTERN inline Term Deref(Term a)
{
while(IsVarTerm(a)) {
Term *b = (Term *) a;
a = *b;
if(a==((Term) b)) return a;
}
return(a);
}
EXTERN inline Term
Derefa(CELL *b)
{
Term a = *b;
restart:
if (!IsVarTerm(a)) {
return(a);
} else if (a == (CELL)b) {
return(a);
} else {
b = (CELL *)a;
a = *b;
goto restart;
}
}
/************************************************************
TRAIL VARIABLE
@@ -309,8 +280,6 @@ Unification Routines
*************************************************************/
EXTERN Int STD_PROTO(Yap_unify,(Term,Term));
inline EXTERN void STD_PROTO(reset_trail,(tr_fr_ptr));
inline EXTERN void