upgrade to latest SWI
This commit is contained in:
33
packages/PLStream/pl-codelist.h
Normal file
33
packages/PLStream/pl-codelist.h
Normal 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
|
Reference in New Issue
Block a user