track recent SWI changes.

This commit is contained in:
Vitor Santos Costa 2010-02-22 09:35:21 +00:00
parent 11e679edfe
commit 4fda6b7488
2 changed files with 14 additions and 2 deletions

View File

@ -185,6 +185,7 @@ typedef void *PL_engine_t;
#define CVT_MASK 0x00ff
#define CVT_EXCEPTION 0x10000
#define CVT_VARNOFAIL 0x20000 /* return 2 if argument is unbound */
#define BUF_DISCARDABLE 0x0000
#define BUF_RING 0x0100
@ -409,6 +410,7 @@ extern X_API void PL_discard_foreign_frame(fid_t);
extern X_API void PL_rewind_foreign_frame(fid_t);
extern X_API fid_t PL_open_foreign_frame(void);
extern X_API int PL_raise_exception(term_t);
extern X_API void PL_clear_exception(void);
extern X_API void PL_register_atom(atom_t);
extern X_API void PL_unregister_atom(atom_t);
extern X_API predicate_t PL_pred(functor_t, module_t);
@ -420,6 +422,7 @@ extern X_API void PL_cut_query(qid_t);
extern X_API void PL_close_query(qid_t);
extern X_API int PL_toplevel(void);
extern X_API term_t PL_exception(qid_t);
extern X_API term_t PL_exception(qid_t);
extern X_API int PL_call_predicate(module_t, int, predicate_t, term_t);
extern X_API int PL_call(term_t, module_t);
extern X_API void PL_register_foreign(const char *, int, foreign_t (*)(void), int);
@ -436,7 +439,7 @@ extern X_API int PL_destroy_engine(PL_engine_t);
extern X_API int PL_set_engine(PL_engine_t,PL_engine_t *);
extern X_API int PL_get_string_chars(term_t, char **, int *);
extern X_API record_t PL_record(term_t);
extern X_API void PL_recorded(record_t, term_t);
extern X_API int PL_recorded(record_t, term_t);
extern X_API void PL_erase(record_t);
extern X_API int PL_action(int,...);
extern X_API void *PL_malloc(int);

View File

@ -1858,11 +1858,14 @@ PL_record(term_t ts)
return (record_t)Yap_StoreTermInDB(t, 0);
}
X_API void
X_API int
PL_recorded(record_t db, term_t ts)
{
Term t = Yap_FetchTermFromDB((DBTerm *)db);
if (t == 0L)
return FALSE;
Yap_PutInSlot(ts,t);
return TRUE;
}
X_API void
@ -1959,6 +1962,12 @@ PL_exception(qid_t q)
}
}
X_API void
PL_clear_exception(void)
{
EX = 0L;
}
X_API int
PL_initialise(int myargc, char **myargv)
{