windows support.

This commit is contained in:
Vitor Santos Costa 2012-06-08 06:54:03 -05:00
parent 6566445b06
commit 31b8cb6440
2 changed files with 18 additions and 2 deletions

7
packages/prism/src/c/core/bpx.c Normal file → Executable file
View File

@ -26,7 +26,14 @@ int bp_next_solution(void);
void write_term(TERM);
/* float1.c */
#ifdef __YAP_PROLOG__
static inline
#endif
double floatval(TERM);
#ifdef __YAP_PROLOG__
static inline
#endif
TERM encodefloat1(double);
/* loader.c */

13
packages/prism/src/c/core/bpx.h Normal file → Executable file
View File

@ -119,8 +119,17 @@ extern inline TERM ADDTAG(void * t,int tag) {
#define ISFLOAT(t) IsFloatTerm(t)
#define ISCOMPOUND(t) YAP_IsCompoundTerm(t)
#define floatval FloatOfTerm
#define encodefloat1 MkFloatTerm
static inline
double floatval(TERM t)
{
return (Float)FloatOfTerm(t);
}
static inline
TERM encodefloat1(double f)
{
return MkFloatTerm((Float)f);
}
extern inline int is_UNIFIABLE(TERM t1, TERM t2)
{