improve C-interface to cope with prism.
This commit is contained in:
parent
e865248dce
commit
3ac8e3914f
2
H/Regs.h
2
H/Regs.h
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/********* abstract machine registers **********************************/
|
/********* abstract machine registers **********************************/
|
||||||
|
#ifdef YAP_H
|
||||||
#ifdef CUT_C
|
#ifdef CUT_C
|
||||||
#include "cut_c.h"
|
#include "cut_c.h"
|
||||||
#endif
|
#endif
|
||||||
@ -22,6 +23,7 @@
|
|||||||
#if defined MYDDAS_ODBC || defined MYDDAS_MYSQL
|
#if defined MYDDAS_ODBC || defined MYDDAS_MYSQL
|
||||||
#include "myddas.h"
|
#include "myddas.h"
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MaxTemps 512
|
#define MaxTemps 512
|
||||||
#define MaxArithms 32
|
#define MaxArithms 32
|
||||||
|
@ -64,7 +64,7 @@ inline EXTERN int IsAttVar (CELL *pt);
|
|||||||
inline EXTERN int
|
inline EXTERN int
|
||||||
IsAttVar (CELL *pt)
|
IsAttVar (CELL *pt)
|
||||||
{
|
{
|
||||||
#ifdef _YAP_NOT_INSTALLED_
|
#ifdef YAP_H
|
||||||
CACHE_REGS
|
CACHE_REGS
|
||||||
return (pt)[-1] == (CELL)attvar_e
|
return (pt)[-1] == (CELL)attvar_e
|
||||||
&& pt < H;
|
&& pt < H;
|
||||||
@ -148,7 +148,7 @@ exts;
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _YAP_NOT_INSTALLED_
|
#ifdef YAP_H
|
||||||
|
|
||||||
/* make sure that these data structures are the first thing to be allocated
|
/* make sure that these data structures are the first thing to be allocated
|
||||||
in the heap when we start the system */
|
in the heap when we start the system */
|
||||||
@ -294,7 +294,7 @@ IsFloatTerm (Term t)
|
|||||||
|
|
||||||
/* extern Functor FunctorLongInt; */
|
/* extern Functor FunctorLongInt; */
|
||||||
|
|
||||||
#ifdef _YAP_NOT_INSTALLED_
|
#ifdef YAP_H
|
||||||
inline EXTERN Term MkLongIntTerm (Int);
|
inline EXTERN Term MkLongIntTerm (Int);
|
||||||
|
|
||||||
inline EXTERN Term
|
inline EXTERN Term
|
||||||
@ -604,7 +604,7 @@ IsAttachedTerm (Term t)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _YAP_NOT_INSTALLED_
|
#ifdef YAP_H
|
||||||
|
|
||||||
inline EXTERN int STD_PROTO (unify_extension, (Functor, CELL, CELL *, CELL));
|
inline EXTERN int STD_PROTO (unify_extension, (Functor, CELL, CELL *, CELL));
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ IsUnboundVar (Term * t)
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef _YAP_NOT_INSTALLED_
|
#ifdef YAP_H
|
||||||
|
|
||||||
inline EXTERN Term MkVarTerm__ ( USES_REGS1 );
|
inline EXTERN Term MkVarTerm__ ( USES_REGS1 );
|
||||||
|
|
||||||
@ -316,7 +316,7 @@ IsIntTerm (Term t)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef _YAP_NOT_INSTALLED_
|
#ifdef YAP_H
|
||||||
EXTERN inline Term STD_PROTO (MkPairTerm__, (Term, Term CACHE_TYPE) );
|
EXTERN inline Term STD_PROTO (MkPairTerm__, (Term, Term CACHE_TYPE) );
|
||||||
|
|
||||||
EXTERN inline Term
|
EXTERN inline Term
|
||||||
@ -367,7 +367,7 @@ MkPairTerm__ (Term head, Term tail USES_REGS)
|
|||||||
|
|
||||||
#define IsAccessFunc(func) ((func) == FunctorAccess)
|
#define IsAccessFunc(func) ((func) == FunctorAccess)
|
||||||
|
|
||||||
#ifdef _YAP_NOT_INSTALLED_
|
#ifdef YAP_H
|
||||||
inline EXTERN Term MkIntegerTerm (Int);
|
inline EXTERN Term MkIntegerTerm (Int);
|
||||||
|
|
||||||
inline EXTERN Term
|
inline EXTERN Term
|
||||||
|
@ -13,12 +13,11 @@
|
|||||||
* version: $Id: Yap.h,v 1.38 2008-06-18 10:02:27 vsc Exp $ *
|
* version: $Id: Yap.h,v 1.38 2008-06-18 10:02:27 vsc Exp $ *
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#ifndef _YAP_NOT_INSTALLED_
|
#ifndef YAP_H
|
||||||
#include "YapTermConfig.h"
|
#include "YapTermConfig.h"
|
||||||
|
|
||||||
typedef void *Functor;
|
typedef void *Functor;
|
||||||
typedef void *Atom;
|
typedef void *Atom;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef EXTERN
|
#ifndef EXTERN
|
||||||
|
19
configure.in
19
configure.in
@ -796,6 +796,13 @@ else
|
|||||||
fi
|
fi
|
||||||
AC_SUBST(ENABLE_GECODE)
|
AC_SUBST(ENABLE_GECODE)
|
||||||
|
|
||||||
|
if test "$use_prism" = no; then
|
||||||
|
ENABLE_PRISM="@# "
|
||||||
|
else
|
||||||
|
ENABLE_PRISM=""
|
||||||
|
fi
|
||||||
|
AC_SUBST(ENABLE_PRISM)
|
||||||
|
|
||||||
if test "$use_chr" = no; then
|
if test "$use_chr" = no; then
|
||||||
ENABLE_CHR="@# "
|
ENABLE_CHR="@# "
|
||||||
elif test -e "$srcdir"/packages/chr/Makefile.in; then
|
elif test -e "$srcdir"/packages/chr/Makefile.in; then
|
||||||
@ -2163,6 +2170,13 @@ mkdir -p packages/PLStream
|
|||||||
mkdir -p packages/PLStream/libtai
|
mkdir -p packages/PLStream/libtai
|
||||||
mkdir -p packages/pldoc
|
mkdir -p packages/pldoc
|
||||||
mkdir -p packages/plunit
|
mkdir -p packages/plunit
|
||||||
|
mkdir -p packages/prism
|
||||||
|
mkdir -p packages/prism/src
|
||||||
|
mkdir -p packages/prism/src/c
|
||||||
|
mkdir -p packages/prism/src/c/core
|
||||||
|
mkdir -p packages/prism/src/c/mp
|
||||||
|
mkdir -p packages/prism/src/c/up
|
||||||
|
mkdir -p packages/prism/src/prolog
|
||||||
mkdir -p packages/ProbLog
|
mkdir -p packages/ProbLog
|
||||||
mkdir -p packages/ProbLog/simplecudd
|
mkdir -p packages/ProbLog/simplecudd
|
||||||
mkdir -p packages/ProbLog/simplecudd_lfi
|
mkdir -p packages/ProbLog/simplecudd_lfi
|
||||||
@ -2270,5 +2284,10 @@ if test "$ENABLE_GECODE" = ""; then
|
|||||||
AC_CONFIG_FILES([library/gecode/Makefile])
|
AC_CONFIG_FILES([library/gecode/Makefile])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test "$ENABLE_PRISM" = ""; then
|
||||||
|
AC_CONFIG_FILES([packages/prism/src/c/Makefile])
|
||||||
|
AC_CONFIG_FILES([packages/prism/src/prolog/Makefile])
|
||||||
|
fi
|
||||||
|
|
||||||
AC_OUTPUT()
|
AC_OUTPUT()
|
||||||
|
|
||||||
|
@ -23,6 +23,10 @@ typedef char *ADDR;
|
|||||||
|
|
||||||
#define RESET_VARIABLE(X) (*(X) = (CELL)(X))
|
#define RESET_VARIABLE(X) (*(X) = (CELL)(X))
|
||||||
|
|
||||||
|
#ifdef _YAP_NOT_INSTALLED_
|
||||||
|
#include "Regs.h"
|
||||||
|
#else
|
||||||
#include "src/Regs.h"
|
#include "src/Regs.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user