This commit is contained in:
Vitor Santos Costa 2018-10-23 12:47:02 +01:00
parent 4bbf6f0367
commit 37212efc55
5 changed files with 37 additions and 64 deletions

24
H/Yap.h
View File

@ -50,7 +50,7 @@
#endif /* THREADS && (YAPOR_COW || YAPOR_SBA || YAPOR_COPY) */
// Bad export from Python
#include "config.h"
#include "YapConfig.h"
#ifndef COROUTINING
#define COROUTINING 1
@ -74,6 +74,28 @@
#include <stdint.h>
#endif
typedef YAP_Int Int;
typedef YAP_UInt UInt;
typedef YAP_Short Short;
typedef YAP_UShort UShort;
typedef uint16_t BITS16;
typedef int16_t SBITS16;
typedef uint32_t BITS32;
typedef YAP_CELL CELL;
typedef YAP_Term Term;
#define WordSize sizeof(BITS16)
#define CellSize sizeof(CELL)
#define SmallSize sizeof(SMALLUNSGN)
typedef YAP_Int Int;
typedef YAP_Float Float;
typedef YAP_handle_t yhandle_t;
#define TermZERO ((Term)0)
/*
#define RATIONAL_TREES 1

View File

@ -55,4 +55,6 @@
#endif
#include "YapTerm.h"
#endif

View File

@ -2115,4 +2115,6 @@ calls it, or to nothing if 'inline' is not supported under any name. */
#endif
#endif
#include "YapTermConfig.h"
#endif

View File

@ -50,35 +50,6 @@
#include <stdio.h>
#include <stdlib.h>
/* The YAP main types */
#include "YapTerm.h"
#if HAVE_STDINT_H
#include <stdint.h>
#endif
#if HAVE_INTTYPES_H
#include <inttypes.h>
#endif
/**
FALSE and TRUE are the pre-standard versions,
still widely used.
*/
#ifndef TRUE
#define TRUE true
#endif
#ifndef FALSE
#define FALSE false
#endif
#ifndef YAP_Bool
typedef bool YAP_Bool;
#endif
/**
This term can never be constructed as a valid term, so it is
used as a "BAD" term
*/
#define TermZERO ((Term)0)
#include "YapConfig.h"

View File

@ -13,17 +13,11 @@
* version: $Id: Yap.h,v 1.38 2008-06-18 10:02:27 vsc Exp $ *
*************************************************************************/
#ifndef YAP_H
#include "YapTermConfig.h"
#include "config.h"
#include <stddef.h>
#endif
#if HAVE_STDINT_H
#include <stdint.h>
#endif
#if HAVE_INTTYPES_H
#include <inttypes.h>
#if HAVE_STDTYPES_H
#include <stdtypes.h>
#endif
/* truth-values */
@ -41,6 +35,13 @@ typedef int _Bool;
#endif
#endif /* HAVE_STDBOOL_H */
#if HAVE_STDINT_H
#include <stdint.h>
#endif
#if HAVE_INTTYPES_H
#include <inttypes.h>
#endif
#define ALIGN_BY_TYPE(X, TYPE) \
(((CELL)(X) + (sizeof(TYPE) - 1)) & ~(sizeof(TYPE) - 1))
@ -113,31 +114,6 @@ typedef void *YAP_Atom;
typedef void *YAP_Functor;
#ifdef YAP_H
typedef YAP_Int Int;
typedef YAP_UInt UInt;
typedef YAP_Short Short;
typedef YAP_UShort UShort;
typedef uint16_t BITS16;
typedef int16_t SBITS16;
typedef uint32_t BITS32;
typedef YAP_CELL CELL;
typedef YAP_Term Term;
#define WordSize sizeof(BITS16)
#define CellSize sizeof(CELL)
#define SmallSize sizeof(SMALLUNSGN)
typedef YAP_Int Int;
typedef YAP_Float Float;
typedef YAP_handle_t yhandle_t;
#endif
#include "YapError.h"
#include "../os/encoding.h"