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 **********************************/
|
||||
#ifdef YAP_H
|
||||
#ifdef CUT_C
|
||||
#include "cut_c.h"
|
||||
#endif
|
||||
@ -22,6 +23,7 @@
|
||||
#if defined MYDDAS_ODBC || defined MYDDAS_MYSQL
|
||||
#include "myddas.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define MaxTemps 512
|
||||
#define MaxArithms 32
|
||||
|
@ -64,7 +64,7 @@ inline EXTERN int IsAttVar (CELL *pt);
|
||||
inline EXTERN int
|
||||
IsAttVar (CELL *pt)
|
||||
{
|
||||
#ifdef _YAP_NOT_INSTALLED_
|
||||
#ifdef YAP_H
|
||||
CACHE_REGS
|
||||
return (pt)[-1] == (CELL)attvar_e
|
||||
&& pt < H;
|
||||
@ -148,7 +148,7 @@ exts;
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _YAP_NOT_INSTALLED_
|
||||
#ifdef YAP_H
|
||||
|
||||
/* make sure that these data structures are the first thing to be allocated
|
||||
in the heap when we start the system */
|
||||
@ -294,7 +294,7 @@ IsFloatTerm (Term t)
|
||||
|
||||
/* extern Functor FunctorLongInt; */
|
||||
|
||||
#ifdef _YAP_NOT_INSTALLED_
|
||||
#ifdef YAP_H
|
||||
inline EXTERN Term MkLongIntTerm (Int);
|
||||
|
||||
inline EXTERN Term
|
||||
@ -604,7 +604,7 @@ IsAttachedTerm (Term t)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef _YAP_NOT_INSTALLED_
|
||||
#ifdef YAP_H
|
||||
|
||||
inline EXTERN int STD_PROTO (unify_extension, (Functor, CELL, CELL *, CELL));
|
||||
|
||||
|
@ -184,7 +184,7 @@ IsUnboundVar (Term * t)
|
||||
|
||||
#else
|
||||
|
||||
#ifdef _YAP_NOT_INSTALLED_
|
||||
#ifdef YAP_H
|
||||
|
||||
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
|
||||
@ -367,7 +367,7 @@ MkPairTerm__ (Term head, Term tail USES_REGS)
|
||||
|
||||
#define IsAccessFunc(func) ((func) == FunctorAccess)
|
||||
|
||||
#ifdef _YAP_NOT_INSTALLED_
|
||||
#ifdef YAP_H
|
||||
inline EXTERN Term MkIntegerTerm (Int);
|
||||
|
||||
inline EXTERN Term
|
||||
|
@ -13,12 +13,11 @@
|
||||
* 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"
|
||||
|
||||
typedef void *Functor;
|
||||
typedef void *Atom;
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef EXTERN
|
||||
|
19
configure.in
19
configure.in
@ -796,6 +796,13 @@ else
|
||||
fi
|
||||
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
|
||||
ENABLE_CHR="@# "
|
||||
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/pldoc
|
||||
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/simplecudd
|
||||
mkdir -p packages/ProbLog/simplecudd_lfi
|
||||
@ -2270,5 +2284,10 @@ if test "$ENABLE_GECODE" = ""; then
|
||||
AC_CONFIG_FILES([library/gecode/Makefile])
|
||||
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()
|
||||
|
||||
|
@ -23,6 +23,10 @@ typedef char *ADDR;
|
||||
|
||||
#define RESET_VARIABLE(X) (*(X) = (CELL)(X))
|
||||
|
||||
#ifdef _YAP_NOT_INSTALLED_
|
||||
#include "Regs.h"
|
||||
#else
|
||||
#include "src/Regs.h"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user