more UDI stuff.

This commit is contained in:
Vitor Santos Costa 2009-02-25 00:13:45 +00:00
parent 2bc5d8425a
commit 91657556ee
3 changed files with 19 additions and 5 deletions

View File

@ -2508,3 +2508,17 @@ YAP_AttsOfVar(Term t)
return attv->Atts;
}
X_API Term
YAP_TermHash(Term t)
{
attvar_record *attv;
t = Deref(t);
if (!IsVarTerm(t))
return TermNil;
if (VarOfTerm(t) >= H0)
return TermNil;
attv = (attvar_record *)VarOfTerm(t);
return attv->Atts;
}

View File

@ -13,7 +13,7 @@ extern control_t *RtreeUdiInit (Term spec,
int arity);
/*this is called in each asserted term that was declared to udi_init*/
extern control_t *RtreeUdiInsert (Term t, /*asserted term*/
extern control_t *RtreeUdiInsert (Term term, /*asserted term*/
control_t *control,
void *clausule); /*to store in tree and return
in search*/

View File

@ -12,7 +12,7 @@
#include "rtree_udi_i.h"
#include "rtree_udi.h"
static int YAP_IsNumberTerm (YAP_Term term, YAP_Float *n)
static int YAP_IsNumberTerm (Term term, YAP_Float *n)
{
if (YAP_IsIntTerm (term) != FALSE)
{
@ -29,7 +29,7 @@ static int YAP_IsNumberTerm (YAP_Term term, YAP_Float *n)
return (FALSE);
}
static rect_t RectOfTerm (YAP_Term term)
static rect_t RectOfTerm (Term term)
{
YAP_Term tmp;
rect_t rect;
@ -49,7 +49,7 @@ static rect_t RectOfTerm (YAP_Term term)
return (rect);
}
control_t *RtreeUdiInit (YAP_Term spec,
control_t *RtreeUdiInit (Term spec,
void * pred,
int arity){
control_t *control;
@ -86,7 +86,7 @@ control_t *RtreeUdiInit (YAP_Term spec,
return control;
}
control_t *RtreeUdiInsert (YAP_Term term,control_t *control,void *clausule)
control_t *RtreeUdiInsert (Term term,control_t *control,void *clausule)
{
int i;
rect_t r;