Merge branch 'master' of ssh://yap.git.sourceforge.net/gitroot/yap/yap-6.3
This commit is contained in:
commit
8c7d0af032
@ -455,8 +455,8 @@ X_API Term STD_PROTO(YAP_NBufferToDiffList, (char *, Term, size_t));
|
|||||||
X_API Term STD_PROTO(YAP_WideBufferToDiffList, (wchar_t *, Term));
|
X_API Term STD_PROTO(YAP_WideBufferToDiffList, (wchar_t *, Term));
|
||||||
X_API Term STD_PROTO(YAP_NWideBufferToDiffList, (wchar_t *, Term, size_t));
|
X_API Term STD_PROTO(YAP_NWideBufferToDiffList, (wchar_t *, Term, size_t));
|
||||||
X_API void STD_PROTO(YAP_Error,(int, Term, char *, ...));
|
X_API void STD_PROTO(YAP_Error,(int, Term, char *, ...));
|
||||||
X_API Term STD_PROTO(YAP_RunGoal,(Term));
|
X_API Int STD_PROTO(YAP_RunGoal,(Term));
|
||||||
X_API Term STD_PROTO(YAP_RunGoalOnce,(Term));
|
X_API Int STD_PROTO(YAP_RunGoalOnce,(Term));
|
||||||
X_API int STD_PROTO(YAP_RestartGoal,(void));
|
X_API int STD_PROTO(YAP_RestartGoal,(void));
|
||||||
X_API int STD_PROTO(YAP_ShutdownGoal,(int));
|
X_API int STD_PROTO(YAP_ShutdownGoal,(int));
|
||||||
X_API int STD_PROTO(YAP_EnterGoal,(PredEntry *, Term *, YAP_dogoalinfo *));
|
X_API int STD_PROTO(YAP_EnterGoal,(PredEntry *, Term *, YAP_dogoalinfo *));
|
||||||
@ -2365,7 +2365,7 @@ YAP_LeaveGoal(int backtrack, YAP_dogoalinfo *dgi)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
X_API Term
|
X_API Int
|
||||||
YAP_RunGoal(Term t)
|
YAP_RunGoal(Term t)
|
||||||
{
|
{
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
@ -2389,7 +2389,7 @@ YAP_RunGoal(Term t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
RECOVER_MACHINE_REGS();
|
RECOVER_MACHINE_REGS();
|
||||||
return(out);
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
X_API Term
|
X_API Term
|
||||||
@ -2451,7 +2451,7 @@ YAP_OpaqueObjectFromTerm(Term t)
|
|||||||
return ExternalBlobFromTerm (t);
|
return ExternalBlobFromTerm (t);
|
||||||
}
|
}
|
||||||
|
|
||||||
X_API Term
|
X_API Int
|
||||||
YAP_RunGoalOnce(Term t)
|
YAP_RunGoalOnce(Term t)
|
||||||
{
|
{
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
@ -2503,7 +2503,7 @@ YAP_RunGoalOnce(Term t)
|
|||||||
CP = old_CP;
|
CP = old_CP;
|
||||||
LOCAL_AllowRestart = FALSE;
|
LOCAL_AllowRestart = FALSE;
|
||||||
RECOVER_MACHINE_REGS();
|
RECOVER_MACHINE_REGS();
|
||||||
return(out);
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
X_API int
|
X_API int
|
||||||
|
10
C/exec.c
10
C/exec.c
@ -941,7 +941,7 @@ p_pred_goal_expansion_on( USES_REGS1 ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int
|
static Int
|
||||||
exec_absmi(int top USES_REGS)
|
exec_absmi(int top USES_REGS)
|
||||||
{
|
{
|
||||||
int lval, out;
|
int lval, out;
|
||||||
@ -1052,11 +1052,11 @@ init_stack(int arity, CELL *pt, int top, choiceptr saved_b USES_REGS)
|
|||||||
CP = YESCODE;
|
CP = YESCODE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Term
|
static Int
|
||||||
do_goal(Term t, yamop *CodeAdr, int arity, CELL *pt, int top USES_REGS)
|
do_goal(Term t, yamop *CodeAdr, int arity, CELL *pt, int top USES_REGS)
|
||||||
{
|
{
|
||||||
choiceptr saved_b = B;
|
choiceptr saved_b = B;
|
||||||
Term out = 0L;
|
Int out;
|
||||||
|
|
||||||
init_stack(arity, pt, top, saved_b PASS_REGS);
|
init_stack(arity, pt, top, saved_b PASS_REGS);
|
||||||
P = (yamop *) CodeAdr;
|
P = (yamop *) CodeAdr;
|
||||||
@ -1070,7 +1070,7 @@ do_goal(Term t, yamop *CodeAdr, int arity, CELL *pt, int top USES_REGS)
|
|||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
Int
|
||||||
Yap_exec_absmi(int top)
|
Yap_exec_absmi(int top)
|
||||||
{
|
{
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
@ -1285,7 +1285,7 @@ Yap_RunTopGoal(Term t)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
goal_out = do_goal(t, CodeAdr, arity, pt, TRUE PASS_REGS);
|
goal_out = do_goal(t, CodeAdr, arity, pt, TRUE PASS_REGS);
|
||||||
return(goal_out);
|
return goal_out;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -177,7 +177,7 @@ Int STD_PROTO(Yap_JumpToEnv,(Term));
|
|||||||
Term STD_PROTO(Yap_RunTopGoal,(Term));
|
Term STD_PROTO(Yap_RunTopGoal,(Term));
|
||||||
void STD_PROTO(Yap_ResetExceptionTerm,(void));
|
void STD_PROTO(Yap_ResetExceptionTerm,(void));
|
||||||
Int STD_PROTO(Yap_execute_goal,(Term, int, Term));
|
Int STD_PROTO(Yap_execute_goal,(Term, int, Term));
|
||||||
int STD_PROTO(Yap_exec_absmi,(int));
|
Int STD_PROTO(Yap_exec_absmi,(int));
|
||||||
void STD_PROTO(Yap_trust_last,(void));
|
void STD_PROTO(Yap_trust_last,(void));
|
||||||
Term STD_PROTO(Yap_GetException,(void));
|
Term STD_PROTO(Yap_GetException,(void));
|
||||||
|
|
||||||
|
@ -16664,7 +16664,7 @@ There are several ways to call Prolog code from C-code. By default, the
|
|||||||
has been initialised before:
|
has been initialised before:
|
||||||
|
|
||||||
@example
|
@example
|
||||||
YAP_RunGoal(YAP_Term Goal)
|
YAP_Int YAP_RunGoal(YAP_Term Goal)
|
||||||
@end example
|
@end example
|
||||||
Execute query @var{Goal} and return 1 if the query succeeds, and 0
|
Execute query @var{Goal} and return 1 if the query succeeds, and 0
|
||||||
otherwise. The predicate returns 0 if failure, otherwise it will return
|
otherwise. The predicate returns 0 if failure, otherwise it will return
|
||||||
@ -16673,7 +16673,7 @@ an @var{YAP_Term}.
|
|||||||
Quite often, one wants to run a query once. In this case you should use
|
Quite often, one wants to run a query once. In this case you should use
|
||||||
@var{Goal}:
|
@var{Goal}:
|
||||||
@example
|
@example
|
||||||
YAP_RunGoalOnce(YAP_Term Goal)
|
YAP_Int YAP_RunGoalOnce(YAP_Term Goal)
|
||||||
@end example
|
@end example
|
||||||
The @code{YAP_RunGoal()} function makes sure to recover stack space at
|
The @code{YAP_RunGoal()} function makes sure to recover stack space at
|
||||||
the end of execution.
|
the end of execution.
|
||||||
|
@ -272,10 +272,10 @@ extern X_API void *PROTO(YAP_ReallocSpaceFromYap,(void*,unsigned int));
|
|||||||
extern X_API void PROTO(YAP_FreeSpaceFromYap,(void *));
|
extern X_API void PROTO(YAP_FreeSpaceFromYap,(void *));
|
||||||
|
|
||||||
/* int YAP_RunGoal(YAP_Term) */
|
/* int YAP_RunGoal(YAP_Term) */
|
||||||
extern X_API YAP_Term PROTO(YAP_RunGoal,(YAP_Term));
|
extern X_API YAP_Int PROTO(YAP_RunGoal,(YAP_Term));
|
||||||
|
|
||||||
/* int YAP_RunGoalOnce(YAP_Term) */
|
/* int YAP_RunGoalOnce(YAP_Term) */
|
||||||
extern X_API YAP_Term PROTO(YAP_RunGoalOnce,(YAP_Term));
|
extern X_API YAP_Int PROTO(YAP_RunGoalOnce,(YAP_Term));
|
||||||
|
|
||||||
/* int YAP_RestartGoal(void) */
|
/* int YAP_RestartGoal(void) */
|
||||||
extern X_API YAP_Bool PROTO(YAP_RestartGoal,(void));
|
extern X_API YAP_Bool PROTO(YAP_RestartGoal,(void));
|
||||||
|
Reference in New Issue
Block a user