g++ coplaints (llvm)
This commit is contained in:
parent
ba6d46578b
commit
daae1df152
@ -804,14 +804,14 @@ Yap_NewPredPropByFunctor(FunctorEntry *fe, Term cur_mod)
|
|||||||
PredEntry *p = (PredEntry *) Yap_AllocAtomSpace(sizeof(*p));
|
PredEntry *p = (PredEntry *) Yap_AllocAtomSpace(sizeof(*p));
|
||||||
|
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
FUNC_WRITE_UNLOCK(fe);
|
WRITE_UNLOCK(fe);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if (cur_mod == TermProlog)
|
if (cur_mod == TermProlog)
|
||||||
p->ModuleOfPred = 0L;
|
p->ModuleOfPred = 0L;
|
||||||
else
|
else
|
||||||
p->ModuleOfPred = cur_mod;
|
p->ModuleOfPred = cur_mod;
|
||||||
TRUE_FUNC_WRITE_LOCK(fe);
|
//TRUE_FUNC_WRITE_LOCK(fe);
|
||||||
INIT_LOCK(p->PELock);
|
INIT_LOCK(p->PELock);
|
||||||
p->KindOfPE = PEProp;
|
p->KindOfPE = PEProp;
|
||||||
p->ArityOfPE = fe->ArityOfFE;
|
p->ArityOfPE = fe->ArityOfFE;
|
||||||
@ -861,7 +861,7 @@ Yap_NewPredPropByFunctor(FunctorEntry *fe, Term cur_mod)
|
|||||||
if (!ExpandPredHash()) {
|
if (!ExpandPredHash()) {
|
||||||
Yap_FreeCodeSpace((ADDR)p);
|
Yap_FreeCodeSpace((ADDR)p);
|
||||||
WRITE_UNLOCK(PredHashRWLock);
|
WRITE_UNLOCK(PredHashRWLock);
|
||||||
TRUE_FUNC_WRITE_UNLOCK(fe);
|
FUNC_WRITE_UNLOCK(fe);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
/* retry hashing */
|
/* retry hashing */
|
||||||
@ -887,7 +887,7 @@ Yap_NewPredPropByFunctor(FunctorEntry *fe, Term cur_mod)
|
|||||||
fe->PropsOfFE = AbsPredProp(p);
|
fe->PropsOfFE = AbsPredProp(p);
|
||||||
p->NextOfPE = NIL;
|
p->NextOfPE = NIL;
|
||||||
}
|
}
|
||||||
TRUE_FUNC_WRITE_UNLOCK(fe);
|
FUNC_WRITE_UNLOCK(fe);
|
||||||
{
|
{
|
||||||
Yap_inform_profiler_of_clause(&(p->OpcodeOfPred), &(p->OpcodeOfPred)+1, p, GPROF_NEW_PRED_FUNC);
|
Yap_inform_profiler_of_clause(&(p->OpcodeOfPred), &(p->OpcodeOfPred)+1, p, GPROF_NEW_PRED_FUNC);
|
||||||
if (!(p->PredFlags & (CPredFlag|AsmPredFlag))) {
|
if (!(p->PredFlags & (CPredFlag|AsmPredFlag))) {
|
||||||
|
@ -2307,7 +2307,7 @@ YAP_EnterGoal(PredEntry *pe, Term *ptr, YAP_dogoalinfo *dgi)
|
|||||||
} else {
|
} else {
|
||||||
LOCAL_CurSlot = dgi->CurSlot; // ignore any slots created within the called goal
|
LOCAL_CurSlot = dgi->CurSlot; // ignore any slots created within the called goal
|
||||||
}
|
}
|
||||||
{ CACHE_REGS __android_log_print(ANDROID_LOG_ERROR, __FUNCTION__, "EMUL DONE %d", out) ; }
|
{ __android_log_print(ANDROID_LOG_ERROR, __FUNCTION__, "EMUL DONE %d", out) ; }
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -926,12 +926,12 @@ Yap_HandleToString(term_t l, size_t sz, size_t *length, int *encoding, int flags
|
|||||||
r = buf;
|
r = buf;
|
||||||
fd = Sopenmem(&r, &sz, "w");
|
fd = Sopenmem(&r, &sz, "w");
|
||||||
fd->encoding = ENC_UTF8;
|
fd->encoding = ENC_UTF8;
|
||||||
{ CACHE_REGS __android_log_print(ANDROID_LOG_ERROR, __FUNCTION__, "I %d LCL0+%s=(%p) %p", l, buf, LCL0, &LCL0 ); }
|
{ __android_log_print(ANDROID_LOG_ERROR, __FUNCTION__, "I %d LCL0+%s=(%p) %p", l, buf, LCL0, &LCL0 ); }
|
||||||
if ( PL_write_term(fd, l, 1200, flags) &&
|
if ( PL_write_term(fd, l, 1200, flags) &&
|
||||||
Sputcode(EOS, fd) >= 0 &&
|
Sputcode(EOS, fd) >= 0 &&
|
||||||
Sflush(fd) >= 0 )
|
Sflush(fd) >= 0 )
|
||||||
{
|
{
|
||||||
{ CACHE_REGS __android_log_print(ANDROID_LOG_ERROR, __FUNCTION__, "I LCL0+%s=(%p) %p", buf, LCL0, &LCL0 ); }
|
{ __android_log_print(ANDROID_LOG_ERROR, __FUNCTION__, "I LCL0+%s=(%p) %p", buf, LCL0, &LCL0 ); }
|
||||||
size = Stell64(fd);
|
size = Stell64(fd);
|
||||||
*length = size-1;
|
*length = size-1;
|
||||||
char *bf = malloc(*length+1);
|
char *bf = malloc(*length+1);
|
||||||
|
@ -1807,7 +1807,7 @@ Yap_volume_header(char *file)
|
|||||||
|
|
||||||
char * Yap_getcwd(const char *cwd, size_t cwdlen)
|
char * Yap_getcwd(const char *cwd, size_t cwdlen)
|
||||||
{
|
{
|
||||||
return PL_cwd(cwd, cwdlen);
|
return PL_cwd((char *)cwd, cwdlen);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******
|
/******
|
||||||
|
16
CXX/yapi.cpp
16
CXX/yapi.cpp
@ -277,7 +277,7 @@ char *YAPTerm::text(void) {
|
|||||||
if (!(os = Yap_HandleToString(t, sze, &length, &enc, 0))) {
|
if (!(os = Yap_HandleToString(t, sze, &length, &enc, 0))) {
|
||||||
{ CACHE_REGS __android_log_print(ANDROID_LOG_ERROR, __FUNCTION__, "IIa LCL0+t=(%p) %x", LCL0, LCL0[-15]) ; }
|
{ CACHE_REGS __android_log_print(ANDROID_LOG_ERROR, __FUNCTION__, "IIa LCL0+t=(%p) %x", LCL0, LCL0[-15]) ; }
|
||||||
RECOVER_MACHINE_REGS();
|
RECOVER_MACHINE_REGS();
|
||||||
return NULL;
|
return (char *)NULL;
|
||||||
}
|
}
|
||||||
{ CACHE_REGS __android_log_print(ANDROID_LOG_ERROR, __FUNCTION__, "II LCL0+t=(%p) %x", LCL0, LCL0[-15]) ; }
|
{ CACHE_REGS __android_log_print(ANDROID_LOG_ERROR, __FUNCTION__, "II LCL0+t=(%p) %x", LCL0, LCL0[-15]) ; }
|
||||||
RECOVER_MACHINE_REGS();
|
RECOVER_MACHINE_REGS();
|
||||||
@ -403,12 +403,12 @@ PredEntry *YAPPredicate::getPred( Term t, Term **outp ) {
|
|||||||
Term m = CurrentModule ;
|
Term m = CurrentModule ;
|
||||||
t = Yap_StripModule(t, &m);
|
t = Yap_StripModule(t, &m);
|
||||||
if (IsVarTerm(t) || IsNumTerm(t)) {
|
if (IsVarTerm(t) || IsNumTerm(t)) {
|
||||||
ap = NULL;
|
ap = (PredEntry *)NULL;
|
||||||
if (outp) *outp = NULL;
|
if (outp) *outp = (Term *)NULL;
|
||||||
}
|
}
|
||||||
if (IsAtomTerm(t)) {
|
if (IsAtomTerm(t)) {
|
||||||
ap = RepPredProp(PredPropByAtom(AtomOfTerm(t), m));
|
ap = RepPredProp(PredPropByAtom(AtomOfTerm(t), m));
|
||||||
if (outp) *outp = NULL;
|
if (outp) *outp = (Term *)NULL;
|
||||||
} else if (IsPairTerm(t)) {
|
} else if (IsPairTerm(t)) {
|
||||||
ap = RepPredProp(PredPropByFunc(FunctorCsult, PROLOG_MODULE));
|
ap = RepPredProp(PredPropByFunc(FunctorCsult, PROLOG_MODULE));
|
||||||
if (outp) *outp = HR;
|
if (outp) *outp = HR;
|
||||||
@ -418,8 +418,8 @@ PredEntry *YAPPredicate::getPred( Term t, Term **outp ) {
|
|||||||
} else {
|
} else {
|
||||||
Functor f = FunctorOfTerm(t);
|
Functor f = FunctorOfTerm(t);
|
||||||
if (IsExtensionFunctor(f)) {
|
if (IsExtensionFunctor(f)) {
|
||||||
ap = NULL;
|
ap = (PredEntry *)NULL;
|
||||||
if (outp) *outp = NULL;
|
if (outp) *outp = (Term *)NULL;
|
||||||
}
|
}
|
||||||
ap = RepPredProp(PredPropByFunc(f, m));
|
ap = RepPredProp(PredPropByFunc(f, m));
|
||||||
if (outp) *outp = RepAppl(t)+1;
|
if (outp) *outp = RepAppl(t)+1;
|
||||||
@ -525,7 +525,7 @@ void YAPQuery::close()
|
|||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
|
|
||||||
if (EX && !(this->q_flags & (PL_Q_CATCH_EXCEPTION))) {
|
if (EX && !(this->q_flags & (PL_Q_CATCH_EXCEPTION))) {
|
||||||
EX = NULL;
|
EX = (struct DB_TERM *)NULL;
|
||||||
}
|
}
|
||||||
/* need to implement backtracking here */
|
/* need to implement backtracking here */
|
||||||
if (this->q_open != 1 || this->q_state == 0) {
|
if (this->q_open != 1 || this->q_state == 0) {
|
||||||
@ -599,7 +599,7 @@ YAPEngine::YAPEngine( char *savedState,
|
|||||||
YAPCallback *cb): _callback(0)
|
YAPCallback *cb): _callback(0)
|
||||||
{ // a single engine can be active
|
{ // a single engine can be active
|
||||||
#if __ANDROID__
|
#if __ANDROID__
|
||||||
if (assetManager == NULL)
|
if (assetManager == (AAssetManager *)NULL)
|
||||||
return;
|
return;
|
||||||
Yap_DisplayWithJava = displayWithJava;
|
Yap_DisplayWithJava = displayWithJava;
|
||||||
Yap_AndroidBufp = (char *)malloc(Yap_AndroidMax = 4096);
|
Yap_AndroidBufp = (char *)malloc(Yap_AndroidMax = 4096);
|
||||||
|
37
CXX/yapi.hh
37
CXX/yapi.hh
@ -20,16 +20,20 @@
|
|||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
extern "C" {
|
#ifndef __ANDROID__
|
||||||
|
#if USE_GMP
|
||||||
#ifdef __cplusplus
|
#include <gmp.h>
|
||||||
#define old_cplusplus __cplusplus
|
#endif
|
||||||
#undef __cplusplus
|
#endif
|
||||||
#endif
|
|
||||||
|
extern "C" {
|
||||||
|
|
||||||
|
#ifdef __ANDROID__
|
||||||
|
#define old_cplusplus __cplusplus
|
||||||
|
#undef __cplusplus
|
||||||
#if USE_GMP
|
#if USE_GMP
|
||||||
#include <gmp.h>
|
#include <gmp.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef old_cplusplus
|
|
||||||
#define __cplusplus old_cplusplus
|
#define __cplusplus old_cplusplus
|
||||||
#undef old_cplusplus
|
#undef old_cplusplus
|
||||||
#endif
|
#endif
|
||||||
@ -341,7 +345,7 @@ private:
|
|||||||
///
|
///
|
||||||
/// It is just a call to getPred
|
/// It is just a call to getPred
|
||||||
inline YAPPredicate(Term t) {
|
inline YAPPredicate(Term t) {
|
||||||
ap = getPred( t , NULL );
|
ap = getPred( t , (Term **)NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Cast constructor for predicates,
|
/// Cast constructor for predicates,
|
||||||
@ -397,7 +401,7 @@ public:
|
|||||||
inline YAPPredicate(char *s) {
|
inline YAPPredicate(char *s) {
|
||||||
Term t, tp;
|
Term t, tp;
|
||||||
t = YAP_ReadBuffer(s,&tp);
|
t = YAP_ReadBuffer(s,&tp);
|
||||||
ap = getPred( t, NULL );
|
ap = getPred( t, (Term **)NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -407,7 +411,7 @@ public:
|
|||||||
inline YAPPredicate(char *s, Term **outp) {
|
inline YAPPredicate(char *s, Term **outp) {
|
||||||
Term t, tp;
|
Term t, tp;
|
||||||
t = YAP_ReadBuffer(s,&tp);
|
t = YAP_ReadBuffer(s,&tp);
|
||||||
ap = getPred( t, NULL );
|
ap = getPred( t, (Term **)NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
/// meta-call this predicate, with arguments ts[]
|
/// meta-call this predicate, with arguments ts[]
|
||||||
@ -516,21 +520,20 @@ public:
|
|||||||
class YAPEngine {
|
class YAPEngine {
|
||||||
private:
|
private:
|
||||||
YAPCallback *_callback;
|
YAPCallback *_callback;
|
||||||
char **buf;
|
|
||||||
YAP_init_args init_args;
|
YAP_init_args init_args;
|
||||||
public:
|
public:
|
||||||
YAPEngine(char *savedState = NULL,
|
YAPEngine(char *savedState = (char *)NULL,
|
||||||
size_t stackSize = 0,
|
size_t stackSize = 0,
|
||||||
size_t trailSize = 0,
|
size_t trailSize = 0,
|
||||||
size_t maxStackSize = 0,
|
size_t maxStackSize = 0,
|
||||||
size_t maxTrailSize = 0,
|
size_t maxTrailSize = 0,
|
||||||
char *libDir = NULL,
|
char *libDir = (char *)NULL,
|
||||||
char *bootFile = NULL,
|
char *bootFile = (char *)NULL,
|
||||||
char *goal = NULL,
|
char *goal = (char *)NULL,
|
||||||
char *topLevel = NULL,
|
char *topLevel = (char *)NULL,
|
||||||
bool script = FALSE,
|
bool script = FALSE,
|
||||||
bool fastBoot = FALSE,
|
bool fastBoot = FALSE,
|
||||||
YAPCallback *callback=NULL); /// construct a new engine, including aaccess to callbacks
|
YAPCallback *callback=(YAPCallback *)NULL); /// construct a new engine, including aaccess to callbacks
|
||||||
~YAPEngine() { delYAPCallback(); } /// kill engine
|
~YAPEngine() { delYAPCallback(); } /// kill engine
|
||||||
void delYAPCallback() { _callback = 0; } /// remove current callback
|
void delYAPCallback() { _callback = 0; } /// remove current callback
|
||||||
void setYAPCallback(YAPCallback *cb) { delYAPCallback(); _callback = cb; __android_log_print(ANDROID_LOG_INFO, __FILE__, "after loading startup %p",cb); } /// set a new callback
|
void setYAPCallback(YAPCallback *cb) { delYAPCallback(); _callback = cb; __android_log_print(ANDROID_LOG_INFO, __FILE__, "after loading startup %p",cb); } /// set a new callback
|
||||||
|
20
H/Yap.h
20
H/Yap.h
@ -287,6 +287,12 @@ typedef pthread_rwlock_t rwlock_t;
|
|||||||
#include <locks_pthread.h>
|
#include <locks_pthread.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define FUNC_READ_LOCK(X) READ_LOCK((X)->FRWLock)
|
||||||
|
#define FUNC_READ_UNLOCK(X) READ_UNLOCK((X)->FRWLock)
|
||||||
|
#define FUNC_WRITE_LOCK(X) WRITE_LOCK((X)->FRWLock)
|
||||||
|
#define FUNC_WRITE_UNLOCK(X) WRITE_UNLOCK((X)->FRWLock)
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************************************
|
/*************************************************************************************************
|
||||||
use an auxiliary function for ranges
|
use an auxiliary function for ranges
|
||||||
*************************************************************************************************/
|
*************************************************************************************************/
|
||||||
@ -453,6 +459,19 @@ extern ADDR Yap_HeapBase;
|
|||||||
extern int Yap_output_msg;
|
extern int Yap_output_msg;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if __ANDROID__
|
||||||
|
#include <android/asset_manager.h>
|
||||||
|
#include <android/asset_manager_jni.h>
|
||||||
|
#include <android/log.h>
|
||||||
|
#else
|
||||||
|
inline void __android_log_print(int i, const char loc[], const char msg[], ...) {}
|
||||||
|
#define ANDROID_LOG_INFO 0
|
||||||
|
#define ANDROID_LOG_ERROR 0
|
||||||
|
#define ANDROID_LOG_DEBUG 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************************************
|
/*************************************************************************************************
|
||||||
variables concerned with atoms table
|
variables concerned with atoms table
|
||||||
*************************************************************************************************/
|
*************************************************************************************************/
|
||||||
@ -690,7 +709,6 @@ typedef struct scratch_block_struct {
|
|||||||
#endif /* YAPOR || TABLING */
|
#endif /* YAPOR || TABLING */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************************************
|
/*************************************************************************************************
|
||||||
GLOBAL and LOCAL variables
|
GLOBAL and LOCAL variables
|
||||||
*************************************************************************************************/
|
*************************************************************************************************/
|
||||||
|
26
H/YapText.h
26
H/YapText.h
@ -370,7 +370,7 @@ Yap_ListOfAtomsToAtom(Term t0 USES_REGS)
|
|||||||
inp.type = YAP_STRING_ATOMS;
|
inp.type = YAP_STRING_ATOMS;
|
||||||
out.type = YAP_STRING_ATOM;
|
out.type = YAP_STRING_ATOM;
|
||||||
if (!Yap_CVT_Text(&inp, &out PASS_REGS))
|
if (!Yap_CVT_Text(&inp, &out PASS_REGS))
|
||||||
return NULL;
|
return (Atom)NULL;
|
||||||
return out.val.a;
|
return out.val.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -406,7 +406,7 @@ Yap_ListOfCodesToAtom(Term t0 USES_REGS)
|
|||||||
inp.type = YAP_STRING_CODES;
|
inp.type = YAP_STRING_CODES;
|
||||||
out.type = YAP_STRING_ATOM;
|
out.type = YAP_STRING_ATOM;
|
||||||
if (!Yap_CVT_Text(&inp, &out PASS_REGS))
|
if (!Yap_CVT_Text(&inp, &out PASS_REGS))
|
||||||
return NULL;
|
return (Atom)NULL;
|
||||||
return out.val.a;
|
return out.val.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -870,7 +870,7 @@ Yap_ConcatAtoms(Term t1, Term t2 USES_REGS)
|
|||||||
inpv[1].sz = 0;
|
inpv[1].sz = 0;
|
||||||
out.type = YAP_STRING_ATOM;
|
out.type = YAP_STRING_ATOM;
|
||||||
if (!Yap_Concat_Text(2, inpv, &out PASS_REGS))
|
if (!Yap_Concat_Text(2, inpv, &out PASS_REGS))
|
||||||
return NULL;
|
return (Atom)NULL;
|
||||||
return out.val.a;
|
return out.val.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -886,7 +886,7 @@ Yap_ConcatAtomics(Term t1, Term t2 USES_REGS)
|
|||||||
inpv[1].sz = 0;
|
inpv[1].sz = 0;
|
||||||
out.type = YAP_STRING_ATOM;
|
out.type = YAP_STRING_ATOM;
|
||||||
if (!Yap_Concat_Text(2, inpv, &out PASS_REGS))
|
if (!Yap_Concat_Text(2, inpv, &out PASS_REGS))
|
||||||
return NULL;
|
return (Atom)NULL;
|
||||||
return out.val.a;
|
return out.val.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -921,8 +921,8 @@ Yap_SpliceAtom(Term t1, Atom ats[], size_t cut, size_t max USES_REGS)
|
|||||||
outv[0].sz = 0;
|
outv[0].sz = 0;
|
||||||
outv[1].type = YAP_STRING_ATOM;
|
outv[1].type = YAP_STRING_ATOM;
|
||||||
outv[1].sz = 0;
|
outv[1].sz = 0;
|
||||||
if (!Yap_Splice_Text(2, cuts, &inp, NULL, outv PASS_REGS))
|
if (!Yap_Splice_Text(2, cuts, &inp, (encoding_t *)NULL, outv PASS_REGS))
|
||||||
return NULL;
|
return (Atom)NULL;
|
||||||
ats[0] = outv[0].val.a;
|
ats[0] = outv[0].val.a;
|
||||||
ats[1] = outv[1].val.a;
|
ats[1] = outv[1].val.a;
|
||||||
return ats[0];
|
return ats[0];
|
||||||
@ -941,8 +941,8 @@ Yap_SubtractHeadAtom(Term t1, Term th USES_REGS)
|
|||||||
outv[1].type = YAP_STRING_ATOM;
|
outv[1].type = YAP_STRING_ATOM;
|
||||||
outv[1].val.t = 0;
|
outv[1].val.t = 0;
|
||||||
outv[1].sz = 0;
|
outv[1].sz = 0;
|
||||||
if (!Yap_Splice_Text(2, NULL, &inp, NULL, outv PASS_REGS))
|
if (!Yap_Splice_Text(2, (size_t *)NULL, &inp, (encoding_t *)NULL, outv PASS_REGS))
|
||||||
return NULL;
|
return (Atom)NULL;
|
||||||
return outv[1].val.a;
|
return outv[1].val.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -959,8 +959,8 @@ Yap_SubtractTailAtom(Term t1, Term th USES_REGS)
|
|||||||
outv[0].sz = 0;
|
outv[0].sz = 0;
|
||||||
outv[1].type = YAP_STRING_ATOM;
|
outv[1].type = YAP_STRING_ATOM;
|
||||||
outv[1].val.t = th;
|
outv[1].val.t = th;
|
||||||
if (!Yap_Splice_Text(2, NULL, &inp, NULL, outv PASS_REGS))
|
if (!Yap_Splice_Text(2, (size_t *)NULL, &inp, (encoding_t *)NULL, outv PASS_REGS))
|
||||||
return NULL;
|
return (Atom)NULL;
|
||||||
return outv[0].val.a;
|
return outv[0].val.a;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -977,7 +977,7 @@ Yap_SpliceString(Term t1, Term ts[], size_t cut, size_t max USES_REGS)
|
|||||||
outv[1].sz = 0;
|
outv[1].sz = 0;
|
||||||
cuts[0] = cut;
|
cuts[0] = cut;
|
||||||
cuts[1] = max;
|
cuts[1] = max;
|
||||||
if (!Yap_Splice_Text(2, cuts, &inp, NULL, outv PASS_REGS))
|
if (!Yap_Splice_Text(2, cuts, &inp, (encoding_t *)NULL, outv PASS_REGS))
|
||||||
return 0L;
|
return 0L;
|
||||||
ts[0] = outv[0].val.t;
|
ts[0] = outv[0].val.t;
|
||||||
ts[1] = outv[1].val.t;
|
ts[1] = outv[1].val.t;
|
||||||
@ -997,7 +997,7 @@ Yap_SubtractHeadString(Term t1, Term th USES_REGS)
|
|||||||
outv[1].type = YAP_STRING_STRING;
|
outv[1].type = YAP_STRING_STRING;
|
||||||
outv[1].val.t = 0;
|
outv[1].val.t = 0;
|
||||||
outv[1].sz = 0;
|
outv[1].sz = 0;
|
||||||
if (!Yap_Splice_Text(2, NULL, &inp, NULL, outv PASS_REGS))
|
if (!Yap_Splice_Text(2, (size_t *)NULL, &inp, (encoding_t *)NULL, outv PASS_REGS))
|
||||||
return 0L;
|
return 0L;
|
||||||
return outv[1].val.t;
|
return outv[1].val.t;
|
||||||
}
|
}
|
||||||
@ -1014,7 +1014,7 @@ Yap_SubtractTailString(Term t1, Term th USES_REGS)
|
|||||||
outv[0].sz = 0;
|
outv[0].sz = 0;
|
||||||
outv[1].type = YAP_STRING_STRING;
|
outv[1].type = YAP_STRING_STRING;
|
||||||
outv[1].val.t = th;
|
outv[1].val.t = th;
|
||||||
if (!Yap_Splice_Text(2, NULL, &inp, NULL, outv PASS_REGS))
|
if (!Yap_Splice_Text(2, (size_t *)NULL, &inp, (encoding_t *)NULL, outv PASS_REGS))
|
||||||
return 0L;
|
return 0L;
|
||||||
return outv[0].val.t;
|
return outv[0].val.t;
|
||||||
}
|
}
|
||||||
|
@ -1267,7 +1267,7 @@ Yap_GetTranslationProp(Atom at)
|
|||||||
while (p0 && p->KindOfPE != TranslationProperty)
|
while (p0 && p->KindOfPE != TranslationProperty)
|
||||||
p = RepTranslationProp(p0 = p->NextOfPE);
|
p = RepTranslationProp(p0 = p->NextOfPE);
|
||||||
READ_UNLOCK(ae->ARWLock);
|
READ_UNLOCK(ae->ARWLock);
|
||||||
if (p0 == NIL) return NULL;
|
if (p0 == NIL) return (TranslationEntry *)NULL;
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ INLINE_ONLY EXTERN inline CELL *
|
|||||||
EXO_OFFSET_TO_ADDRESS(struct index_t *it, BITS32 off)
|
EXO_OFFSET_TO_ADDRESS(struct index_t *it, BITS32 off)
|
||||||
{
|
{
|
||||||
if (off == 0L)
|
if (off == 0L)
|
||||||
return NULL;
|
return (CELL *)NULL;
|
||||||
return (it->cls)+(off-1)*it->arity;
|
return (it->cls)+(off-1)*it->arity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -345,7 +345,7 @@ OpenList(int n USES_REGS)
|
|||||||
BACKUP_H();
|
BACKUP_H();
|
||||||
|
|
||||||
while (HR+2*n > ASP-1024) {
|
while (HR+2*n > ASP-1024) {
|
||||||
if (!Yap_dogc( 0, NULL PASS_REGS )) {
|
if (!Yap_dogc( 0, (Term *)NULL PASS_REGS )) {
|
||||||
RECOVER_H();
|
RECOVER_H();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user