upgrade to latest SWI

This commit is contained in:
Vitor Santos Costa
2011-02-10 00:01:19 +00:00
parent 8e8c361671
commit 232a740d43
48 changed files with 12317 additions and 2703 deletions

View File

@@ -0,0 +1,33 @@
#ifndef PL_CODELIST_H
#define PL_CODELIST_H
static inline Word
INIT_SEQ_STRING(size_t n)
{
return (Word)YAP_OpenList(n);
}
static inline Word
EXTEND_SEQ_CODES(Word gstore, int c) {
return (Word)YAP_ExtendList((YAP_Term)gstore, YAP_MkIntTerm(c));
}
static inline Word
EXTEND_SEQ_CHARS(Word gstore, int c) {
return (Word)YAP_ExtendList((YAP_Term)gstore, codeToAtom(c));
}
static inline int
CLOSE_SEQ_STRING(Word gstore, Word lp, word arg2, word arg3, term_t l) {
if (arg2 == 0) {
if (!YAP_CloseList((YAP_Term)gstore, YAP_TermNil()))
return FALSE;
} else {
if (!YAP_CloseList((YAP_Term)gstore, YAP_GetFromSlot(arg2)))
return FALSE;
}
return YAP_Unify(YAP_GetFromSlot(arg3), (YAP_Term)lp);
}
#endif