Conflicts:
	H/yapio.h
This commit is contained in:
Vitor Santos Costa 2012-07-02 19:58:04 +01:00
commit 51c8142cb1
19 changed files with 768 additions and 762 deletions

View File

@ -75,12 +75,12 @@
#include "inline-only.h"
inline EXTERN void restore_machine_regs(void) INLINE_ONLY;
inline EXTERN void save_machine_regs(void) INLINE_ONLY;
inline EXTERN void restore_H(void) INLINE_ONLY;
inline EXTERN void save_H(void) INLINE_ONLY;
inline EXTERN void restore_B(void) INLINE_ONLY;
inline EXTERN void save_B(void) INLINE_ONLY;
INLINE_ONLY inline EXTERN void restore_machine_regs(void);
INLINE_ONLY inline EXTERN void save_machine_regs(void);
INLINE_ONLY inline EXTERN void restore_H(void);
INLINE_ONLY inline EXTERN void save_H(void);
INLINE_ONLY inline EXTERN void restore_B(void);
INLINE_ONLY inline EXTERN void save_B(void);
#define CACHE_REGS
#define INIT_REGS
@ -243,7 +243,7 @@ register CELL CreepFlag asm ("$15");
/* Interface with foreign code, make sure the foreign code sees all the
registers the way they used to be */
EXTERN inline void save_machine_regs(void) {
INLINE_ONLY EXTERN inline void save_machine_regs(void) {
Yap_REGS.H_ = H;
Yap_REGS.HB_ = HB;
Yap_REGS.B_ = B;
@ -254,7 +254,7 @@ EXTERN inline void save_machine_regs(void) {
Yap_REGS.TR_ = TR;
}
EXTERN inline void restore_machine_regs(void) {
INLINE_ONLY EXTERN inline void restore_machine_regs(void) {
H = Yap_REGS.H_;
HB = Yap_REGS.HB_;
B = Yap_REGS.B_;
@ -283,11 +283,11 @@ EXTERN inline void restore_machine_regs(void) {
CP = BK_CP; \
TR = BK_TR
EXTERN inline void save_H(void) {
INLINE_ONLY EXTERN inline void save_H(void) {
Yap_REGS.H_ = H;
}
EXTERN inline void restore_H(void) {
INLINE_ONLY EXTERN inline void restore_H(void) {
H = Yap_REGS.H_;
}
@ -295,11 +295,11 @@ EXTERN inline void restore_H(void) {
#define RECOVER_H() save_H(); H = BK_H
EXTERN inline void save_B(void) {
INLINE_ONLY EXTERN inline void save_B(void) {
Yap_REGS.B_ = B;
}
EXTERN inline void restore_B(void) {
INLINE_ONLY EXTERN inline void restore_B(void) {
B = Yap_REGS.B_;
}
@ -307,14 +307,14 @@ EXTERN inline void restore_B(void) {
#define RECOVER_B() save_B(); B = BK_B
EXTERN void restore_TR(void);
EXTERN void save_TR(void);
INLINE_ONLY EXTERN void restore_TR(void);
INLINE_ONLY EXTERN void save_TR(void);
EXTERN inline void save_TR(void) {
INLINE_ONLY EXTERN inline void save_TR(void) {
Yap_REGS.TR_ = TR;
}
EXTERN inline void restore_TR(void) {
INLINE_ONLY EXTERN inline void restore_TR(void) {
TR = Yap_REGS.TR_;
}
@ -330,7 +330,7 @@ register CELL *S asm ("$20");
register CELL CreepFlag asm ("$21");
register tr_fr_ptr TR asm ("$22");
EXTERN inline void save_machine_regs(void) {
INLINE_ONLY EXTERN inline void save_machine_regs(void) {
Yap_REGS.H_ = H;
Yap_REGS.HB_ = HB;
Yap_REGS.B_ = B;
@ -339,7 +339,7 @@ EXTERN inline void save_machine_regs(void) {
Yap_REGS.TR_ = TR;
}
EXTERN inline void restore_machine_regs(void) {
INLINE_ONLY EXTERN inline void restore_machine_regs(void) {
H = Yap_REGS.H_;
HB = Yap_REGS.HB_;
B = Yap_REGS.B_;
@ -366,11 +366,11 @@ EXTERN inline void restore_machine_regs(void) {
CP = BK_CP; \
TR = BK_TR
EXTERN inline void save_H(void) {
INLINE_ONLY EXTERN inline void save_H(void) {
Yap_REGS.H_ = H;
}
EXTERN inline void restore_H(void) {
INLINE_ONLY EXTERN inline void restore_H(void) {
H = Yap_REGS.H_;
}
@ -378,11 +378,11 @@ EXTERN inline void restore_H(void) {
#define RECOVER_H() save_H(); H = BK_H
EXTERN inline void save_B(void) {
INLINE_ONLY EXTERN inline void save_B(void) {
Yap_REGS.B_ = B;
}
EXTERN inline void restore_B(void) {
INLINE_ONLY EXTERN inline void restore_B(void) {
B = Yap_REGS.B_;
}
@ -404,7 +404,7 @@ register CELL *S asm ("r16");
register CELL CreepFlag asm ("r17");
register tr_fr_ptr TR asm ("r18");
EXTERN inline void save_machine_regs(void) {
INLINE_ONLY EXTERN inline void save_machine_regs(void) {
Yap_REGS.H_ = H;
Yap_REGS.HB_ = HB;
Yap_REGS.B_ = B;
@ -413,7 +413,7 @@ EXTERN inline void save_machine_regs(void) {
Yap_REGS.TR_ = TR;
}
EXTERN inline void restore_machine_regs(void) {
INLINE_ONLY EXTERN inline void restore_machine_regs(void) {
H = Yap_REGS.H_;
HB = Yap_REGS.HB_;
B = Yap_REGS.B_;
@ -440,11 +440,11 @@ EXTERN inline void restore_machine_regs(void) {
CP = BK_CP; \
TR = BK_TR
EXTERN inline void save_H(void) {
INLINE_ONLY EXTERN inline void save_H(void) {
Yap_REGS.H_ = H;
}
EXTERN inline void restore_H(void) {
INLINE_ONLY EXTERN inline void restore_H(void) {
H = Yap_REGS.H_;
}
@ -452,11 +452,11 @@ EXTERN inline void restore_H(void) {
#define RECOVER_H() save_H(); H = BK_H
EXTERN inline void save_B(void) {
INLINE_ONLY EXTERN inline void save_B(void) {
Yap_REGS.B_ = B;
}
EXTERN inline void restore_B(void) {
INLINE_ONLY EXTERN inline void restore_B(void) {
B = Yap_REGS.B_;
}
@ -464,14 +464,14 @@ EXTERN inline void restore_B(void) {
#define RECOVER_B() save_B(); B = BK_B
EXTERN void restore_TR(void);
EXTERN void save_TR(void);
INLINE_ONLY EXTERN void restore_TR(void);
INLINE_ONLY EXTERN void save_TR(void);
EXTERN inline void save_TR(void) {
INLINE_ONLY EXTERN inline void save_TR(void) {
Yap_REGS.TR_ = TR;
}
EXTERN inline void restore_TR(void) {
INLINE_ONLY EXTERN inline void restore_TR(void) {
TR = Yap_REGS.TR_;
}
@ -516,7 +516,7 @@ register CELL *YENV asm ("r19");
EXTERN inline void save_machine_regs(void) {
INLINE_ONLY EXTERN inline void save_machine_regs(void) {
Yap_REGS.H_ = H;
Yap_REGS.HB_ = HB;
Yap_REGS.B_ = B;
@ -525,7 +525,7 @@ EXTERN inline void save_machine_regs(void) {
Yap_REGS.TR_ = TR;
}
EXTERN inline void restore_machine_regs(void) {
INLINE_ONLY EXTERN inline void restore_machine_regs(void) {
H = Yap_REGS.H_;
HB = Yap_REGS.HB_;
B = Yap_REGS.B_;
@ -550,11 +550,11 @@ EXTERN inline void restore_machine_regs(void) {
CP = BK_CP; \
TR = BK_TR
EXTERN inline void save_H(void) {
INLINE_ONLY EXTERN inline void save_H(void) {
Yap_REGS.H_ = H;
}
EXTERN inline void restore_H(void) {
INLINE_ONLY EXTERN inline void restore_H(void) {
H = Yap_REGS.H_;
}
@ -562,11 +562,11 @@ EXTERN inline void restore_H(void) {
#define RECOVER_H() save_H(); H = BK_H
EXTERN inline void save_B(void) {
INLINE_ONLY EXTERN inline void save_B(void) {
Yap_REGS.B_ = B;
}
EXTERN inline void restore_B(void) {
INLINE_ONLY EXTERN inline void restore_B(void) {
B = Yap_REGS.B_;
}
@ -574,14 +574,14 @@ EXTERN inline void restore_B(void) {
#define RECOVER_B() save_B(); B = BK_B
EXTERN void restore_TR(void);
EXTERN void save_TR(void);
INLINE_ONLY EXTERN void restore_TR(void);
INLINE_ONLY EXTERN void save_TR(void);
EXTERN inline void save_TR(void) {
INLINE_ONLY EXTERN inline void save_TR(void) {
Yap_REGS.TR_ = TR;
}
EXTERN inline void restore_TR(void) {
INLINE_ONLY EXTERN inline void restore_TR(void) {
TR = Yap_REGS.TR_;
}
@ -597,30 +597,30 @@ EXTERN inline void restore_TR(void) {
#define HB Yap_REGS.HB_ /* heap (global) stack top at time of latest c.p. */
#define CreepFlag Yap_REGS.CreepFlag_
EXTERN inline void save_machine_regs(void) {
INLINE_ONLY EXTERN inline void save_machine_regs(void) {
}
EXTERN inline void restore_machine_regs(void) {
INLINE_ONLY EXTERN inline void restore_machine_regs(void) {
}
#define BACKUP_MACHINE_REGS()
#define RECOVER_MACHINE_REGS()
EXTERN inline void save_H(void) {
INLINE_ONLY EXTERN inline void save_H(void) {
}
EXTERN inline void restore_H(void) {
INLINE_ONLY EXTERN inline void restore_H(void) {
}
#define BACKUP_H()
#define RECOVER_H()
EXTERN inline void save_B(void) {
INLINE_ONLY EXTERN inline void save_B(void) {
}
EXTERN inline void restore_B(void) {
INLINE_ONLY EXTERN inline void restore_B(void) {
}
#define BACKUP_B()

View File

@ -66,9 +66,9 @@
#define YAP_PROTECTED_MASK 0x00000000L
#include "inline-only.h"
inline EXTERN int IsVarTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsVarTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsVarTerm (Term t)
{
return (int) (Signed (t) >= 0);
@ -76,9 +76,9 @@ IsVarTerm (Term t)
inline EXTERN int IsNonVarTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsNonVarTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsNonVarTerm (Term t)
{
return (int) (Signed (t) < 0);
@ -86,9 +86,9 @@ IsNonVarTerm (Term t)
inline EXTERN Term *RepPair (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term *RepPair (Term);
inline EXTERN Term *
INLINE_ONLY inline EXTERN Term *
RepPair (Term t)
{
return (Term *) (NonTagPart (t));
@ -96,9 +96,9 @@ RepPair (Term t)
inline EXTERN Term AbsPair (Term *) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AbsPair (Term *);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AbsPair (Term * p)
{
return (Term) (TAGGEDA (PairTag, (p)));
@ -106,9 +106,9 @@ AbsPair (Term * p)
inline EXTERN Int IsPairTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsPairTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsPairTerm (Term t)
{
return (Int) (BitOn (PairBit, (t)));
@ -116,9 +116,9 @@ IsPairTerm (Term t)
inline EXTERN Term *RepAppl (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term *RepAppl (Term);
inline EXTERN Term *
INLINE_ONLY inline EXTERN Term *
RepAppl (Term t)
{
return (Term *) (NonTagPart (t));
@ -126,9 +126,9 @@ RepAppl (Term t)
inline EXTERN Term AbsAppl (Term *) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AbsAppl (Term *);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AbsAppl (Term * p)
{
return (Term) (TAGGEDA (ApplTag, (p)));
@ -136,9 +136,9 @@ AbsAppl (Term * p)
inline EXTERN Int IsApplTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsApplTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsApplTerm (Term t)
{
return (Int) (BitOn (ApplBit, (t)));
@ -146,9 +146,9 @@ IsApplTerm (Term t)
inline EXTERN Int IsAtomOrIntTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsAtomOrIntTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsAtomOrIntTerm (Term t)
{
return (Int) (!(Unsigned (t) & CompBits));
@ -157,9 +157,9 @@ IsAtomOrIntTerm (Term t)
inline EXTERN Term AdjustPtr (Term t, Term off) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AdjustPtr (Term t, Term off);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AdjustPtr (Term t, Term off)
{
return (Term) ((t) + off);
@ -167,9 +167,9 @@ AdjustPtr (Term t, Term off)
inline EXTERN Term AdjustIDBPtr (Term t, Term off) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AdjustIDBPtr (Term t, Term off);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AdjustIDBPtr (Term t, Term off)
{
return (Term) ((t) + off);

View File

@ -77,9 +77,9 @@
#define YAP_PROTECTED_MASK 0xc0000000L
#include "inline-only.h"
inline EXTERN int IsVarTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsVarTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsVarTerm (Term t)
{
return (int) (!((t) & LowTagBits));
@ -87,9 +87,9 @@ IsVarTerm (Term t)
inline EXTERN int IsNonVarTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsNonVarTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsNonVarTerm (Term t)
{
return (int) (((t) & LowTagBits));
@ -97,9 +97,9 @@ IsNonVarTerm (Term t)
inline EXTERN Term *RepPair (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term *RepPair (Term);
inline EXTERN Term *
INLINE_ONLY inline EXTERN Term *
RepPair (Term t)
{
return (Term *) ((t) - PairBits);
@ -107,9 +107,9 @@ RepPair (Term t)
inline EXTERN Term AbsPair (Term *) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AbsPair (Term *);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AbsPair (Term * p)
{
return (Term) (Unsigned (p) + PairBits);
@ -117,9 +117,9 @@ AbsPair (Term * p)
inline EXTERN Int IsPairTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsPairTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsPairTerm (Term t)
{
return (Int) ((((t) & LowTagBits) == PairBits));
@ -127,9 +127,9 @@ IsPairTerm (Term t)
inline EXTERN Term *RepAppl (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term *RepAppl (Term);
inline EXTERN Term *
INLINE_ONLY inline EXTERN Term *
RepAppl (Term t)
{
return (Term *) (((t) - ApplBit));
@ -137,9 +137,9 @@ RepAppl (Term t)
inline EXTERN Term AbsAppl (Term *) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AbsAppl (Term *);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AbsAppl (Term * p)
{
return (Term) (Unsigned (p) + ApplBit);
@ -147,9 +147,9 @@ AbsAppl (Term * p)
inline EXTERN Int IsApplTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsApplTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsApplTerm (Term t)
{
return (Int) ((((t) & LowTagBits) == ApplBit));
@ -157,9 +157,9 @@ IsApplTerm (Term t)
inline EXTERN Int IsAtomOrIntTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsAtomOrIntTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsAtomOrIntTerm (Term t)
{
return (Int) ((((t) & LowTagBits) == 2));
@ -168,9 +168,9 @@ IsAtomOrIntTerm (Term t)
inline EXTERN Term AdjustPtr (Term t, Term off) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AdjustPtr (Term t, Term off);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AdjustPtr (Term t, Term off)
{
return (Term) ((t) + off);
@ -178,9 +178,9 @@ AdjustPtr (Term t, Term off)
inline EXTERN Term AdjustIDBPtr (Term t, Term off) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AdjustIDBPtr (Term t, Term off);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AdjustIDBPtr (Term t, Term off)
{
return (Term) ((t) + off);
@ -189,9 +189,9 @@ AdjustIDBPtr (Term t, Term off)
inline EXTERN Int IntOfTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IntOfTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IntOfTerm (Term t)
{
return (Int) (((Int) (t << 1)) >> (SHIFT_LOW_TAG + SHIFT_HIGH_TAG + 1));

View File

@ -102,9 +102,9 @@ are now 1 in compound terms and structures.
/* never forget to surround arguments to a macro by brackets */
#include "inline-only.h"
inline EXTERN int IsVarTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsVarTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsVarTerm (Term t)
{
return (int) (Signed (t) >= 0);
@ -112,9 +112,9 @@ IsVarTerm (Term t)
inline EXTERN int IsNonVarTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsNonVarTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsNonVarTerm (Term t)
{
return (int) (Signed (t) < 0);
@ -123,9 +123,9 @@ IsNonVarTerm (Term t)
#if UNIQUE_TAG_FOR_PAIRS
inline EXTERN Term *RepPair (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term *RepPair (Term);
inline EXTERN Term *
INLINE_ONLY inline EXTERN Term *
RepPair (Term t)
{
return (Term *) ((~(t)));
@ -133,9 +133,9 @@ RepPair (Term t)
inline EXTERN Term AbsPair (Term *) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AbsPair (Term *);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AbsPair (Term * p)
{
return (Term) ((~Unsigned (p)));
@ -143,9 +143,9 @@ AbsPair (Term * p)
inline EXTERN Int IsPairTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsPairTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsPairTerm (Term t)
{
return (Int) (((t) & PairBit));
@ -153,9 +153,9 @@ IsPairTerm (Term t)
inline EXTERN Term *RepAppl (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term *RepAppl (Term);
inline EXTERN Term *
INLINE_ONLY inline EXTERN Term *
RepAppl (Term t)
{
return (Term *) ((-Signed (t)));
@ -163,9 +163,9 @@ RepAppl (Term t)
inline EXTERN Term AbsAppl (Term *) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AbsAppl (Term *);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AbsAppl (Term * p)
{
return (Term) ((-Signed (p)));
@ -173,9 +173,9 @@ AbsAppl (Term * p)
inline EXTERN Int IsApplTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsApplTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsApplTerm (Term t)
{
return (Int) ((!((t) & LowTagBits)));
@ -184,9 +184,9 @@ IsApplTerm (Term t)
#else
inline EXTERN Term *RepPair (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term *RepPair (Term);
inline EXTERN Term *
INLINE_ONLY inline EXTERN Term *
RepPair (Term t)
{
return (Term *) ((-Signed (t)));
@ -194,9 +194,9 @@ RepPair (Term t)
inline EXTERN Term AbsPair (Term *) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AbsPair (Term *);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AbsPair (Term * p)
{
return (Term) (((CELL) (-Signed (p))));
@ -204,9 +204,9 @@ AbsPair (Term * p)
inline EXTERN Int IsPairTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsPairTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsPairTerm (Term t)
{
return (Int) ((!((t) & LowTagBits)));
@ -214,9 +214,9 @@ IsPairTerm (Term t)
inline EXTERN Term *RepAppl (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term *RepAppl (Term);
inline EXTERN Term *
INLINE_ONLY inline EXTERN Term *
RepAppl (Term t)
{
return (Term *) ((~(t)));
@ -224,9 +224,9 @@ RepAppl (Term t)
inline EXTERN Term AbsAppl (Term *) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AbsAppl (Term *);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AbsAppl (Term * p)
{
return (Term) ((~Unsigned (p)));
@ -234,9 +234,9 @@ AbsAppl (Term * p)
inline EXTERN Int IsApplTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsApplTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsApplTerm (Term t)
{
return (Int) (((t) & ApplBit));
@ -245,9 +245,9 @@ IsApplTerm (Term t)
#endif
inline EXTERN Int IsAtomOrIntTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsAtomOrIntTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsAtomOrIntTerm (Term t)
{
return (Int) (((Unsigned (t) & LowTagBits) == 0x2));
@ -256,9 +256,9 @@ IsAtomOrIntTerm (Term t)
inline EXTERN Int IntOfTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IntOfTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IntOfTerm (Term t)
{
return (Int) ((Int) (Unsigned (t) << 3) >> 5);
@ -268,9 +268,9 @@ IntOfTerm (Term t)
#if UNIQUE_TAG_FOR_PAIRS
inline EXTERN Term AdjustPtr (Term t, Term off) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AdjustPtr (Term t, Term off);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AdjustPtr (Term t, Term off)
{
return (Term) (((IsVarTerm (t)
@ -282,9 +282,9 @@ AdjustPtr (Term t, Term off)
inline EXTERN Term AdjustIDBPtr (Term t, Term off) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AdjustIDBPtr (Term t, Term off);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AdjustIDBPtr (Term t, Term off)
{
return (Term) (IsVarTerm (t) ? (t) + (off) : (t) - (off));
@ -293,9 +293,9 @@ AdjustIDBPtr (Term t, Term off)
#else
inline EXTERN Term AdjustPtr (Term t, Term off) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AdjustPtr (Term t, Term off);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AdjustPtr (Term t, Term off)
{
return (Term) (((IsVarTerm (t)
@ -307,9 +307,9 @@ AdjustPtr (Term t, Term off)
inline EXTERN Term AdjustIDBPtr (Term t, Term off) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AdjustIDBPtr (Term t, Term off);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AdjustIDBPtr (Term t, Term off)
{
return (Term) (IsVarTerm (t) ? (t) +

View File

@ -69,9 +69,9 @@ property list
#define CHKTAG(t,Tag) ((Unsigned(t)&TagBits)==Tag)
#include "inline-only.h"
inline EXTERN int IsVarTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsVarTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsVarTerm (Term t)
{
return (int) (Signed (t) >= 0);
@ -79,9 +79,9 @@ IsVarTerm (Term t)
inline EXTERN int IsNonVarTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsNonVarTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsNonVarTerm (Term t)
{
return (int) (Signed (t) < 0);
@ -89,9 +89,9 @@ IsNonVarTerm (Term t)
inline EXTERN Term *RepPair (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term *RepPair (Term);
inline EXTERN Term *
INLINE_ONLY inline EXTERN Term *
RepPair (Term t)
{
return (Term *) (NonTagPart (t));
@ -99,9 +99,9 @@ RepPair (Term t)
inline EXTERN Term AbsPair (Term *) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AbsPair (Term *);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AbsPair (Term * p)
{
return (Term) (TAGGEDA (PairTag, (p)));
@ -109,9 +109,9 @@ AbsPair (Term * p)
inline EXTERN Int IsPairTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsPairTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsPairTerm (Term t)
{
return (Int) (BitOn (PairBit, (t)));
@ -119,9 +119,9 @@ IsPairTerm (Term t)
inline EXTERN Term *RepAppl (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term *RepAppl (Term);
inline EXTERN Term *
INLINE_ONLY inline EXTERN Term *
RepAppl (Term t)
{
return (Term *) (NonTagPart (t));
@ -129,9 +129,9 @@ RepAppl (Term t)
inline EXTERN Term AbsAppl (Term *) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AbsAppl (Term *);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AbsAppl (Term * p)
{
return (Term) (TAGGEDA (ApplTag, (p)));
@ -139,9 +139,9 @@ AbsAppl (Term * p)
inline EXTERN Int IsApplTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsApplTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsApplTerm (Term t)
{
return (Int) (BitOn (ApplBit, (t)));
@ -149,9 +149,9 @@ IsApplTerm (Term t)
inline EXTERN int IsAtomOrIntTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsAtomOrIntTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsAtomOrIntTerm (Term t)
{
return (int) (((Unsigned (t) & LowTagBits) == 0));
@ -160,9 +160,9 @@ IsAtomOrIntTerm (Term t)
inline EXTERN Term AdjustPtr (Term t, Term off) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AdjustPtr (Term t, Term off);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AdjustPtr (Term t, Term off)
{
return (Term) ((t) + off);
@ -170,9 +170,9 @@ AdjustPtr (Term t, Term off)
inline EXTERN Term AdjustIDBPtr (Term t, Term off) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AdjustIDBPtr (Term t, Term off);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AdjustIDBPtr (Term t, Term off)
{
return (Term) ((t) + off);
@ -181,9 +181,9 @@ AdjustIDBPtr (Term t, Term off)
inline EXTERN Int IntOfTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IntOfTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IntOfTerm (Term t)
{
return (Int) (((Int) (t << 3)) >> (3 + 2));

View File

@ -73,9 +73,9 @@ property list
#define CHKTAG(t,Tag) ((Unsigned(t)&TagBits)==Tag)
#include "inline-only.h"
inline EXTERN int IsVarTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsVarTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsVarTerm (Term t)
{
return (int) ((!((t) & 0x1)));
@ -83,9 +83,9 @@ IsVarTerm (Term t)
inline EXTERN int IsNonVarTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsNonVarTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsNonVarTerm (Term t)
{
return (int) (((t) & 0x1));
@ -93,9 +93,9 @@ IsNonVarTerm (Term t)
inline EXTERN Term *RepPair (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term *RepPair (Term);
inline EXTERN Term *
INLINE_ONLY inline EXTERN Term *
RepPair (Term t)
{
return (Term *) (((t) - PairBits));
@ -103,9 +103,9 @@ RepPair (Term t)
inline EXTERN Term AbsPair (Term *) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AbsPair (Term *);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AbsPair (Term * p)
{
return (Term) (((CELL) (p) + PairBits));
@ -113,9 +113,9 @@ AbsPair (Term * p)
inline EXTERN Int IsPairTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsPairTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsPairTerm (Term t)
{
return (Int) (((t) & 0x2));
@ -123,9 +123,9 @@ IsPairTerm (Term t)
inline EXTERN Term *RepAppl (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term *RepAppl (Term);
inline EXTERN Term *
INLINE_ONLY inline EXTERN Term *
RepAppl (Term t)
{
return (Term *) (((t) - ApplBits));
@ -133,9 +133,9 @@ RepAppl (Term t)
inline EXTERN Term AbsAppl (Term *) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AbsAppl (Term *);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AbsAppl (Term * p)
{
return (Term) (((CELL) (p) + ApplBits));
@ -143,9 +143,9 @@ AbsAppl (Term * p)
inline EXTERN Int IsApplTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsApplTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsApplTerm (Term t)
{
return (Int) ((((t) & 0x4)));
@ -153,9 +153,9 @@ IsApplTerm (Term t)
inline EXTERN Int IsAtomOrIntTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsAtomOrIntTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsAtomOrIntTerm (Term t)
{
return (Int) ((((t) & LowTagBits) == 0x1));
@ -164,9 +164,9 @@ IsAtomOrIntTerm (Term t)
inline EXTERN Term AdjustPtr (Term t, Term off) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AdjustPtr (Term t, Term off);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AdjustPtr (Term t, Term off)
{
return (Term) (((t) + off));
@ -174,9 +174,9 @@ AdjustPtr (Term t, Term off)
inline EXTERN Term AdjustIDBPtr (Term t, Term off) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term AdjustIDBPtr (Term t, Term off);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
AdjustIDBPtr (Term t, Term off)
{
return (Term) ((t) + off);
@ -185,9 +185,9 @@ AdjustIDBPtr (Term t, Term off)
inline EXTERN Int IntOfTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IntOfTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IntOfTerm (Term t)
{
return (Int) ((Int) (Unsigned (t) << 3) >> 6);

View File

@ -60,9 +60,9 @@ blob_type;
#include "inline-only.h"
inline EXTERN int IsAttVar (CELL *pt) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsAttVar (CELL *pt);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsAttVar (CELL *pt)
{
#ifdef YAP_H
@ -74,9 +74,9 @@ IsAttVar (CELL *pt)
#endif
}
inline EXTERN int GlobalIsAttVar (CELL *pt) INLINE_ONLY;
INLINE_ONLY inline EXTERN int GlobalIsAttVar (CELL *pt);
inline EXTERN int
INLINE_ONLY inline EXTERN int
GlobalIsAttVar (CELL *pt)
{
return (pt)[-1] == (CELL)attvar_e;
@ -99,9 +99,9 @@ typedef enum
}
big_blob_type;
inline EXTERN blob_type BlobOfFunctor (Functor f) INLINE_ONLY;
INLINE_ONLY inline EXTERN blob_type BlobOfFunctor (Functor f);
inline EXTERN blob_type
INLINE_ONLY inline EXTERN blob_type
BlobOfFunctor (Functor f)
{
return (blob_type) ((CELL)f);
@ -178,14 +178,14 @@ special_functors;
#endif /* YAP_H */
inline EXTERN Float CpFloatUnaligned(CELL *ptr) INLINE_ONLY;
INLINE_ONLY inline EXTERN Float CpFloatUnaligned(CELL *ptr);
#if SIZEOF_DOUBLE == SIZEOF_LONG_INT
inline EXTERN Term MkFloatTerm (Float) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term MkFloatTerm (Float);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
MkFloatTerm (Float dbl)
{
CACHE_REGS
@ -195,9 +195,9 @@ MkFloatTerm (Float dbl)
}
inline EXTERN Float FloatOfTerm (Term t) INLINE_ONLY;
INLINE_ONLY inline EXTERN Float FloatOfTerm (Term t);
inline EXTERN Float
INLINE_ONLY inline EXTERN Float
FloatOfTerm (Term t)
{
return (Float) (*(Float *) (RepAppl (t) + 1));
@ -207,7 +207,7 @@ FloatOfTerm (Term t)
#define InitUnalignedFloat()
inline EXTERN Float
INLINE_ONLY inline EXTERN Float
CpFloatUnaligned(CELL *ptr)
{
return *((Float *)ptr);
@ -217,12 +217,12 @@ CpFloatUnaligned(CELL *ptr)
#if SIZEOF_DOUBLE == 2*SIZEOF_LONG_INT
inline EXTERN void AlignGlobalForDouble( USES_REGS1 ) INLINE_ONLY;
INLINE_ONLY inline EXTERN void AlignGlobalForDouble( USES_REGS1 );
#define DOUBLE_ALIGNED(ADDR) ((CELL)(ADDR) & 0x4)
#ifdef i386
inline EXTERN Float
INLINE_ONLY inline EXTERN Float
CpFloatUnaligned (CELL * ptr)
{
return *((Float *) (ptr + 1));
@ -230,7 +230,7 @@ CpFloatUnaligned (CELL * ptr)
#else
/* first, need to address the alignment problem */
inline EXTERN Float
INLINE_ONLY inline EXTERN Float
CpFloatUnaligned (CELL * ptr)
{
union
@ -245,9 +245,9 @@ CpFloatUnaligned (CELL * ptr)
#endif
inline EXTERN Term MkFloatTerm (Float) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term MkFloatTerm (Float);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
MkFloatTerm (Float dbl)
{
CACHE_REGS
@ -258,9 +258,9 @@ MkFloatTerm (Float dbl)
}
inline EXTERN Float FloatOfTerm (Term t) INLINE_ONLY;
INLINE_ONLY inline EXTERN Float FloatOfTerm (Term t);
inline EXTERN Float
INLINE_ONLY inline EXTERN Float
FloatOfTerm (Term t)
{
return (Float) ((DOUBLE_ALIGNED (RepAppl (t)) ? *(Float *) (RepAppl (t) + 1)
@ -290,9 +290,9 @@ char *Yap_BlobStringOfTermAndLength(Term, size_t *);
inline EXTERN int IsFloatTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsFloatTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsFloatTerm (Term t)
{
return (int) (IsApplTerm (t) && FunctorOfTerm (t) == FunctorDouble);
@ -303,9 +303,9 @@ IsFloatTerm (Term t)
/* extern Functor FunctorLongInt; */
inline EXTERN Term MkLongIntTerm (Int) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term MkLongIntTerm (Int);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
MkLongIntTerm (Int i)
{
CACHE_REGS
@ -317,9 +317,9 @@ MkLongIntTerm (Int i)
}
inline EXTERN Int LongIntOfTerm (Term t) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int LongIntOfTerm (Term t);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
LongIntOfTerm (Term t)
{
return (Int) (RepAppl (t)[1]);
@ -327,9 +327,9 @@ LongIntOfTerm (Term t)
inline EXTERN int IsLongIntTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsLongIntTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsLongIntTerm (Term t)
{
return (int) (IsApplTerm (t) && FunctorOfTerm (t) == FunctorLongInt);
@ -359,9 +359,9 @@ typedef struct {
#endif
inline EXTERN int IsBigIntTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsBigIntTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsBigIntTerm (Term t)
{
return (int) (IsApplTerm (t) && FunctorOfTerm (t) == FunctorBigInt);
@ -375,9 +375,9 @@ MP_INT *STD_PROTO (Yap_BigIntOfTerm, (Term));
Term STD_PROTO (Yap_MkBigRatTerm, (MP_RAT *));
MP_RAT *STD_PROTO (Yap_BigRatOfTerm, (Term));
inline EXTERN void MPZ_SET (mpz_t, MP_INT *) INLINE_ONLY;
INLINE_ONLY inline EXTERN void MPZ_SET (mpz_t, MP_INT *);
inline EXTERN void
INLINE_ONLY inline EXTERN void
MPZ_SET (mpz_t dest, MP_INT *src)
{
dest->_mp_size = src->_mp_size;
@ -385,9 +385,9 @@ MPZ_SET (mpz_t dest, MP_INT *src)
dest->_mp_d = src->_mp_d;
}
inline EXTERN int IsLargeIntTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsLargeIntTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsLargeIntTerm (Term t)
{
return (int) (IsApplTerm (t)
@ -396,9 +396,9 @@ IsLargeIntTerm (Term t)
}
inline EXTERN UInt Yap_SizeOfBigInt (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN UInt Yap_SizeOfBigInt (Term);
inline EXTERN UInt
INLINE_ONLY inline EXTERN UInt
Yap_SizeOfBigInt (Term t)
{
CELL *pt = RepAppl(t)+1;
@ -412,9 +412,9 @@ Yap_SizeOfBigInt (Term t)
inline EXTERN int IsLargeIntTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsLargeIntTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsLargeIntTerm (Term t)
{
return (int) (IsApplTerm (t) && FunctorOfTerm (t) == FunctorLongInt);
@ -428,9 +428,9 @@ typedef struct string_struct {
UInt len;
} blob_string_t;
inline EXTERN int IsBlobStringTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsBlobStringTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsBlobStringTerm (Term t)
{
return (int) (IsApplTerm (t) &&
@ -438,9 +438,9 @@ IsBlobStringTerm (Term t)
(RepAppl(t)[1] & BLOB_STRING) == BLOB_STRING);
}
inline EXTERN int IsWideBlobStringTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsWideBlobStringTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsWideBlobStringTerm (Term t)
{
return (int) (IsApplTerm (t) &&
@ -450,9 +450,9 @@ IsWideBlobStringTerm (Term t)
/* extern Functor FunctorLongInt; */
inline EXTERN int IsLargeNumTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsLargeNumTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsLargeNumTerm (Term t)
{
return (int) (IsApplTerm (t)
@ -460,9 +460,9 @@ IsLargeNumTerm (Term t)
&& (FunctorOfTerm (t) >= FunctorLongInt)));
}
inline EXTERN int IsExternalBlobTerm (Term, CELL) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsExternalBlobTerm (Term, CELL);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsExternalBlobTerm (Term t, CELL tag)
{
return (int) (IsApplTerm (t) &&
@ -470,9 +470,9 @@ IsExternalBlobTerm (Term t, CELL tag)
RepAppl(t)[1] == tag);
}
inline EXTERN void *ExternalBlobFromTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN void *ExternalBlobFromTerm (Term);
inline EXTERN void *
INLINE_ONLY inline EXTERN void *
ExternalBlobFromTerm (Term t)
{
MP_INT *base = (MP_INT *)(RepAppl(t)+2);
@ -482,9 +482,9 @@ ExternalBlobFromTerm (Term t)
inline EXTERN int IsNumTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsNumTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsNumTerm (Term t)
{
return (int) ((IsIntTerm (t) || IsLargeNumTerm (t)));
@ -493,9 +493,9 @@ IsNumTerm (Term t)
inline EXTERN Int IsAtomicTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsAtomicTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsAtomicTerm (Term t)
{
return (Int) (IsAtomOrIntTerm (t) || IsLargeNumTerm (t));
@ -504,9 +504,9 @@ IsAtomicTerm (Term t)
inline EXTERN Int IsExtensionFunctor (Functor) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsExtensionFunctor (Functor);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsExtensionFunctor (Functor f)
{
return (Int) (f <= FunctorDouble);
@ -514,9 +514,9 @@ IsExtensionFunctor (Functor f)
inline EXTERN Int IsBlobFunctor (Functor) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsBlobFunctor (Functor);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsBlobFunctor (Functor f)
{
return (Int) ((f <= FunctorDouble && f >= FunctorDBRef));
@ -524,9 +524,9 @@ IsBlobFunctor (Functor f)
inline EXTERN Int IsPrimitiveTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsPrimitiveTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsPrimitiveTerm (Term t)
{
return (Int) ((IsAtomOrIntTerm (t)
@ -536,9 +536,9 @@ IsPrimitiveTerm (Term t)
#ifdef TERM_EXTENSIONS
inline EXTERN Int IsAttachFunc (Functor) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsAttachFunc (Functor);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsAttachFunc (Functor f)
{
return (Int) (FALSE);
@ -547,25 +547,25 @@ IsAttachFunc (Functor f)
inline EXTERN Int IsAttachedTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsAttachedTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsAttachedTerm (Term t)
{
return (Int) ((IsVarTerm (t) && IsAttVar(VarOfTerm(t))));
}
inline EXTERN Int GlobalIsAttachedTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int GlobalIsAttachedTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
GlobalIsAttachedTerm (Term t)
{
return (Int) ((IsVarTerm (t) && GlobalIsAttVar(VarOfTerm(t))));
}
inline EXTERN Int SafeIsAttachedTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int SafeIsAttachedTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
SafeIsAttachedTerm (Term t)
{
return (Int) (IsVarTerm (t) && IsAttVar(VarOfTerm(t)));
@ -574,9 +574,9 @@ SafeIsAttachedTerm (Term t)
inline EXTERN exts ExtFromCell (CELL *) INLINE_ONLY;
INLINE_ONLY inline EXTERN exts ExtFromCell (CELL *);
inline EXTERN exts
INLINE_ONLY inline EXTERN exts
ExtFromCell (CELL * pt)
{
return attvars_ext;
@ -587,9 +587,9 @@ ExtFromCell (CELL * pt)
#else
inline EXTERN Int IsAttachFunc (Functor) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsAttachFunc (Functor);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsAttachFunc (Functor f)
{
return (Int) (FALSE);
@ -598,9 +598,9 @@ IsAttachFunc (Functor f)
inline EXTERN Int IsAttachedTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IsAttachedTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IsAttachedTerm (Term t)
{
return (Int) (FALSE);
@ -611,9 +611,9 @@ IsAttachedTerm (Term t)
#endif
inline EXTERN Int Yap_BlobTag(Term t) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int Yap_BlobTag(Term t);
inline EXTERN Int Yap_BlobTag(Term t)
INLINE_ONLY inline EXTERN Int Yap_BlobTag(Term t)
{
CELL *pt = RepAppl(t);
@ -621,9 +621,9 @@ inline EXTERN Int Yap_BlobTag(Term t)
}
inline EXTERN void *Yap_BlobInfo(Term t) INLINE_ONLY;
INLINE_ONLY inline EXTERN void *Yap_BlobInfo(Term t);
inline EXTERN void *Yap_BlobInfo(Term t)
INLINE_ONLY inline EXTERN void *Yap_BlobInfo(Term t)
{
MP_INT *blobp;
CELL *pt = RepAppl(t);
@ -634,13 +634,13 @@ inline EXTERN void *Yap_BlobInfo(Term t)
#ifdef YAP_H
inline EXTERN int STD_PROTO (unify_extension, (Functor, CELL, CELL *, CELL)) INLINE_ONLY;
INLINE_ONLY inline EXTERN int STD_PROTO (unify_extension, (Functor, CELL, CELL *, CELL));
EXTERN int STD_PROTO (unify_extension, (Functor, CELL, CELL *, CELL));
int STD_PROTO(Yap_gmp_tcmp_big_big,(Term, Term));
inline EXTERN int
INLINE_ONLY inline EXTERN int
unify_extension (Functor f, CELL d0, CELL * pt0, CELL d1)
{
switch (BlobOfFunctor (f))

View File

@ -25,9 +25,9 @@
EXTERN Int Yap_unify(Term a,Term b);
EXTERN inline Term Deref(Term a) INLINE_ONLY;
INLINE_ONLY EXTERN inline Term Deref(Term a);
EXTERN inline Term Deref(Term a)
INLINE_ONLY EXTERN inline Term Deref(Term a)
{
while(IsVarTerm(a)) {
Term *b = (Term *) a;
@ -37,9 +37,9 @@ EXTERN inline Term Deref(Term a)
return(a);
}
EXTERN inline Term Derefa(CELL *b) INLINE_ONLY;
INLINE_ONLY EXTERN inline Term Derefa(CELL *b);
EXTERN inline Term
INLINE_ONLY EXTERN inline Term
Derefa(CELL *b)
{
Term a = *b;
@ -55,9 +55,9 @@ Derefa(CELL *b)
}
}
inline EXTERN Term ArgOfTerm (int i, Term t) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term ArgOfTerm (int i, Term t);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
ArgOfTerm (int i, Term t)
{
return (Term) (Derefa (RepAppl (t) + (i)));
@ -65,9 +65,9 @@ ArgOfTerm (int i, Term t)
inline EXTERN Term HeadOfTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term HeadOfTerm (Term);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
HeadOfTerm (Term t)
{
return (Term) (Derefa (RepPair (t)));
@ -75,9 +75,9 @@ HeadOfTerm (Term t)
inline EXTERN Term TailOfTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term TailOfTerm (Term);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
TailOfTerm (Term t)
{
return (Term) (Derefa (RepPair (t) + 1));
@ -86,9 +86,9 @@ TailOfTerm (Term t)
inline EXTERN Term ArgOfTermCell (int i, Term t) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term ArgOfTermCell (int i, Term t);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
ArgOfTermCell (int i, Term t)
{
return (Term) ((CELL) (RepAppl (t) + (i)));
@ -96,9 +96,9 @@ ArgOfTermCell (int i, Term t)
inline EXTERN Term HeadOfTermCell (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term HeadOfTermCell (Term);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
HeadOfTermCell (Term t)
{
return (Term) ((CELL) (RepPair (t)));
@ -106,9 +106,9 @@ HeadOfTermCell (Term t)
inline EXTERN Term TailOfTermCell (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term TailOfTermCell (Term);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
TailOfTermCell (Term t)
{
return (Term) ((CELL) (RepPair (t) + 1));

View File

@ -223,10 +223,10 @@ ADDR STD_PROTO(Yap_ExpandPreAllocCodeSpace, (UInt, void *, int));
ADDR STD_PROTO(Yap_InitPreAllocCodeSpace, (void));
#include "inline-only.h"
EXTERN inline ADDR
Yap_PreAllocCodeSpace(void) INLINE_ONLY;
INLINE_ONLY EXTERN inline ADDR
Yap_PreAllocCodeSpace(void);
EXTERN inline ADDR
INLINE_ONLY EXTERN inline ADDR
Yap_PreAllocCodeSpace(void)
{
CACHE_REGS

View File

@ -154,9 +154,9 @@
applies to unbound variables
*************************************************************************************************/
inline EXTERN Term *VarOfTerm (Term t) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term *VarOfTerm (Term t);
inline EXTERN Term *
INLINE_ONLY inline EXTERN Term *
VarOfTerm (Term t)
{
return (Term *) (t);
@ -165,9 +165,9 @@ VarOfTerm (Term t)
#ifdef YAPOR_SBA
inline EXTERN Term MkVarTerm__ ( USES_REGS1 ) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term MkVarTerm__ ( USES_REGS1 );
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
MkVarTerm__ ( USES_REGS1 )
{
return (Term) ((*H = 0, H++));
@ -175,9 +175,9 @@ MkVarTerm__ ( USES_REGS1 )
inline EXTERN int IsUnboundVar (Term *) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsUnboundVar (Term *);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsUnboundVar (Term * t)
{
return (int) (*(t) == 0);
@ -186,18 +186,18 @@ IsUnboundVar (Term * t)
#else
inline EXTERN Term MkVarTerm__ ( USES_REGS1 ) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term MkVarTerm__ ( USES_REGS1 );
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
MkVarTerm__ ( USES_REGS1 )
{
return (Term) ((*H = (CELL) H, H++));
}
inline EXTERN int IsUnboundVar (Term *) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsUnboundVar (Term *);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsUnboundVar (Term * t)
{
return (int) (*(t) == (Term) (t));
@ -206,9 +206,9 @@ IsUnboundVar (Term * t)
#endif
inline EXTERN CELL *PtrOfTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN CELL *PtrOfTerm (Term);
inline EXTERN CELL *
INLINE_ONLY inline EXTERN CELL *
PtrOfTerm (Term t)
{
return (CELL *) (*(CELL *) (t));
@ -217,9 +217,9 @@ PtrOfTerm (Term t)
inline EXTERN Functor FunctorOfTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Functor FunctorOfTerm (Term);
inline EXTERN Functor
INLINE_ONLY inline EXTERN Functor
FunctorOfTerm (Term t)
{
return (Functor) (*RepAppl (t));
@ -228,9 +228,9 @@ FunctorOfTerm (Term t)
#if USE_LOW32_TAGS
inline EXTERN Term MkAtomTerm (Atom) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term MkAtomTerm (Atom);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
MkAtomTerm (Atom a)
{
return (Term) (AtomTag | (CELL) (a));
@ -238,9 +238,9 @@ MkAtomTerm (Atom a)
inline EXTERN Atom AtomOfTerm (Term t) INLINE_ONLY;
INLINE_ONLY inline EXTERN Atom AtomOfTerm (Term t);
inline EXTERN Atom
INLINE_ONLY inline EXTERN Atom
AtomOfTerm (Term t)
{
return (Atom) ((~AtomTag & (CELL) (t)));
@ -249,9 +249,9 @@ AtomOfTerm (Term t)
#else
inline EXTERN Term MkAtomTerm (Atom) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term MkAtomTerm (Atom);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
MkAtomTerm (Atom a)
{
return (Term) (TAGGEDA ((CELL)AtomTag, (CELL) (a)));
@ -259,9 +259,9 @@ MkAtomTerm (Atom a)
inline EXTERN Atom AtomOfTerm (Term t) INLINE_ONLY;
INLINE_ONLY inline EXTERN Atom AtomOfTerm (Term t);
inline EXTERN Atom
INLINE_ONLY inline EXTERN Atom
AtomOfTerm (Term t)
{
return (Atom) (NonTagPart (t));
@ -270,9 +270,9 @@ AtomOfTerm (Term t)
#endif
inline EXTERN int IsAtomTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsAtomTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsAtomTerm (Term t)
{
return (int) (CHKTAG ((t), AtomTag));
@ -281,9 +281,9 @@ IsAtomTerm (Term t)
inline EXTERN Term MkIntTerm (Int) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term MkIntTerm (Int);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
MkIntTerm (Int n)
{
return (Term) (TAGGED (NumberTag, (n)));
@ -295,9 +295,9 @@ MkIntTerm (Int n)
overflow problems are possible
*/
inline EXTERN Term MkIntConstant (Int) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term MkIntConstant (Int);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
MkIntConstant (Int n)
{
return (Term) (NONTAGGED (NumberTag, (n)));
@ -305,18 +305,18 @@ MkIntConstant (Int n)
inline EXTERN int IsIntTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsIntTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsIntTerm (Term t)
{
return (int) (CHKTAG ((t), NumberTag));
}
EXTERN inline Term MkPairTerm__(Term head, Term tail USES_REGS ) INLINE_ONLY;
INLINE_ONLY EXTERN inline Term MkPairTerm__(Term head, Term tail USES_REGS );
EXTERN inline Term
INLINE_ONLY EXTERN inline Term
MkPairTerm__ (Term head, Term tail USES_REGS)
{
register CELL *p = H;
@ -364,9 +364,9 @@ MkPairTerm__ (Term head, Term tail USES_REGS)
#define IsAccessFunc(func) ((func) == FunctorAccess)
#ifdef YAP_H
inline EXTERN Term MkIntegerTerm (Int) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term MkIntegerTerm (Int);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
MkIntegerTerm (Int n)
{
return (Term) (IntInBnd (n) ? MkIntTerm (n) : MkLongIntTerm (n));
@ -374,17 +374,17 @@ MkIntegerTerm (Int n)
#endif
inline EXTERN int IsIntegerTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN int IsIntegerTerm (Term);
inline EXTERN int
INLINE_ONLY inline EXTERN int
IsIntegerTerm (Term t)
{
return (int) (IsIntTerm (t) || IsLongIntTerm (t));
}
inline EXTERN Int IntegerOfTerm (Term) INLINE_ONLY;
INLINE_ONLY inline EXTERN Int IntegerOfTerm (Term);
inline EXTERN Int
INLINE_ONLY inline EXTERN Int
IntegerOfTerm (Term t)
{

384
H/Yatom.h

File diff suppressed because it is too large Load Diff

View File

@ -177,20 +177,20 @@ register struct yami* P1REG asm ("bp"); /* can't use yamop before Yap.h */
/* regp is a global variable */
inline EXTERN void
init_absmi_regs(REGSTORE * absmi_regs) INLINE_ONLY;
INLINE_ONLY inline EXTERN void
init_absmi_regs(REGSTORE * absmi_regs);
inline EXTERN void
INLINE_ONLY inline EXTERN void
init_absmi_regs(REGSTORE * absmi_regs)
{
CACHE_REGS
memcpy(absmi_regs, Yap_regp, sizeof(REGSTORE));
}
inline EXTERN void
restore_absmi_regs(REGSTORE * old_regs) INLINE_ONLY;
INLINE_ONLY inline EXTERN void
restore_absmi_regs(REGSTORE * old_regs);
inline EXTERN void
INLINE_ONLY inline EXTERN void
restore_absmi_regs(REGSTORE * old_regs)
{
CACHE_REGS

View File

@ -102,10 +102,10 @@ A contains the address of the variable that is to be trailed
#if SIZEOF_DOUBLE == 2*SIZEOF_LONG_INT
EXTERN inline void
AlignGlobalForDouble( USES_REGS1 ) INLINE_ONLY;
INLINE_ONLY EXTERN inline void
AlignGlobalForDouble( USES_REGS1 );
EXTERN inline void
INLINE_ONLY EXTERN inline void
AlignGlobalForDouble( USES_REGS1 )
{
/* Force Alignment for floats. Note that garbage collector may
@ -285,9 +285,9 @@ Unification Routines
*************************************************************/
inline EXTERN void STD_PROTO(reset_trail,(tr_fr_ptr)) INLINE_ONLY;
INLINE_ONLY inline EXTERN void STD_PROTO(reset_trail,(tr_fr_ptr));
inline EXTERN void
INLINE_ONLY inline EXTERN void
reset_trail(tr_fr_ptr TR0) {
CACHE_REGS
while(TR != TR0) {
@ -317,9 +317,9 @@ reset_trail(tr_fr_ptr TR0) {
}
}
inline EXTERN void reset_attvars(CELL *dvarsmin, CELL *dvarsmax) INLINE_ONLY;
INLINE_ONLY inline EXTERN void reset_attvars(CELL *dvarsmin, CELL *dvarsmax);
inline EXTERN void
INLINE_ONLY inline EXTERN void
reset_attvars(CELL *dvarsmin, CELL *dvarsmax) {
if (dvarsmin) {
dvarsmin += 1;
@ -335,9 +335,9 @@ reset_attvars(CELL *dvarsmin, CELL *dvarsmax) {
}
}
inline EXTERN void close_attvar_chain(CELL *dvarsmin, CELL *dvarsmax) INLINE_ONLY;
INLINE_ONLY inline EXTERN void close_attvar_chain(CELL *dvarsmin, CELL *dvarsmax);
inline EXTERN void
INLINE_ONLY inline EXTERN void
close_attvar_chain(CELL *dvarsmin, CELL *dvarsmax) {
CACHE_REGS
if (dvarsmin) {
@ -354,10 +354,10 @@ close_attvar_chain(CELL *dvarsmin, CELL *dvarsmax) {
}
}
EXTERN inline
Int Yap_unify(Term t0, Term t1) INLINE_ONLY;
INLINE_ONLY EXTERN inline
Int Yap_unify(Term t0, Term t1);
EXTERN inline
INLINE_ONLY EXTERN inline
Int Yap_unify(Term t0, Term t1)
{
CACHE_REGS

View File

@ -84,9 +84,9 @@ typedef struct logic_upd_clause {
} LogUpdClause;
#include "inline-only.h"
inline EXTERN int VALID_TIMESTAMP(UInt, struct logic_upd_clause *) INLINE_ONLY;
INLINE_ONLY inline EXTERN int VALID_TIMESTAMP(UInt, struct logic_upd_clause *);
inline EXTERN int
INLINE_ONLY inline EXTERN int
VALID_TIMESTAMP(UInt timestamp, struct logic_upd_clause *cl)
{
return IN_BETWEEN(cl->ClTimeStart, timestamp, cl->ClTimeEnd);

View File

@ -177,10 +177,10 @@ Term STD_PROTO(Yap_InnerEval,(Term));
Int STD_PROTO(Yap_ArithError,(yap_error_number,Term,char *msg, ...));
#include "inline-only.h"
inline EXTERN Term
Yap_Eval(Term t) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term
Yap_Eval(Term t);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
Yap_Eval(Term t)
{
if (t == 0L || ( !IsVarTerm(t) && IsNumTerm(t) ))
@ -316,9 +316,9 @@ int STD_PROTO(Yap_term_to_existing_big,(Term, MP_INT *));
int STD_PROTO(Yap_term_to_existing_rat,(Term, MP_RAT *));
#endif
inline EXTERN Term Yap_Mk64IntegerTerm(YAP_LONG_LONG) INLINE_ONLY;
INLINE_ONLY inline EXTERN Term Yap_Mk64IntegerTerm(YAP_LONG_LONG);
inline EXTERN Term
INLINE_ONLY inline EXTERN Term
Yap_Mk64IntegerTerm(YAP_LONG_LONG i)
{
if (i <= Int_MAX && i >= Int_MIN) {

File diff suppressed because it is too large Load Diff

View File

@ -231,10 +231,10 @@ typedef struct AliasDescS {
extern char *Yap_chtype;
#include "inline-only.h"
EXTERN inline int STD_PROTO(chtype,(Int)) INLINE_ONLY;
INLINE_ONLY EXTERN inline int STD_PROTO(chtype,(Int));
int STD_PROTO(Yap_wide_chtype,(Int));
EXTERN inline int
INLINE_ONLY EXTERN inline int
chtype(Int ch)
{
if (ch < NUMBER_OF_CHARS)
@ -324,11 +324,16 @@ int STD_PROTO(Yap_growtrail_in_parser, (tr_fr_ptr *, TokEntry **, VarEntry **)
extern int errno;
#endif
EXTERN inline UInt STD_PROTO(HashFunction, (unsigned char *)) INLINE_ONLY;
EXTERN inline UInt STD_PROTO(WideHashFunction, (wchar_t *)) INLINE_ONLY;
INLINE_ONLY EXTERN inline UInt STD_PROTO(HashFunction, (unsigned char *));
INLINE_ONLY EXTERN inline UInt STD_PROTO(WideHashFunction, (wchar_t *));
<<<<<<< HEAD
EXTERN inline UInt
HashFunction(unsigned char *CHP) INLINE_ONLY
=======
INLINE_ONLY EXTERN inline UInt
HashFunction(unsigned char *CHP)
>>>>>>> 97163fa150ba570e4ba2881646363e9877a07bcb
{
/* djb2 */
UInt hash = 5381;
@ -346,8 +351,8 @@ HashFunction(unsigned char *CHP) INLINE_ONLY
*/
}
EXTERN inline UInt
WideHashFunction(wchar_t *CHP) INLINE_ONLY
INLINE_ONLY EXTERN inline UInt
WideHashFunction(wchar_t *CHP)
{
UInt hash = 5381;
UInt c;

View File

@ -119,19 +119,19 @@ bp_get_arity(TERM t)
// TERM bp_insert_pred(char *name, int arity, int (*func)())
#define bp_insert_pred(name, arity, func) YAP_UserCPredicate(name, func, arity)
extern inline int bp_call_string(const char *goal) INLINE_ONLY;
extern inline int bp_call_term(TERM t) INLINE_ONLY;
extern inline int bp_next_solution(void) INLINE_ONLY;
extern inline int bp_mount_query_term(TERM goal) INLINE_ONLY;
INLINE_ONLY extern inline int bp_call_string(const char *goal);
INLINE_ONLY extern inline int bp_call_term(TERM t);
INLINE_ONLY extern inline int bp_next_solution(void);
INLINE_ONLY extern inline int bp_mount_query_term(TERM goal);
// int bp_call_string(char *goal)
extern inline int
INLINE_ONLY extern inline int
bp_call_string(const char *goal) {
return YAP_RunGoal(YAP_ReadBuffer(goal, NULL));
}
// int bp_call_term(TERM goal)
extern inline int
INLINE_ONLY extern inline int
bp_call_term(TERM t) {
return YAP_RunGoal(t);
}
@ -151,7 +151,7 @@ extern YAP_Term YAP_BPROLOG_curr_toam_status;
extern YAP_Int YAP_BPROLOG_exception;
// TERM bp_next_solution()
extern inline int bp_next_solution(void)
INLINE_ONLY extern inline int bp_next_solution(void)
{
if (curr_toam_status) {
TERM goal = curr_toam_status;
@ -165,7 +165,7 @@ extern inline int bp_next_solution(void)
#define bp_mount_query_string(goal) (curr_toam_status = YAP_ReadBuffer(goal, NULL))
// void bp_mount_query_term(TERM goal)
extern inline int
INLINE_ONLY extern inline int
bp_mount_query_term(TERM goal)
{
curr_toam_status = goal;

View File

@ -82,17 +82,17 @@ long int XTAG(TERM t)
#include "inline-only.h"
extern inline TERM ADDTAG(void * t,int tag) INLINE_ONLY;
extern inline int is_UNIFIABLE(TERM t1, TERM t2) INLINE_ONLY;
extern inline int is_IDENTICAL(TERM t1, TERM t2) INLINE_ONLY;
extern inline char *bp_term_2_string(TERM t) INLINE_ONLY;
extern inline int bp_string_2_term(const char *s, TERM to, TERM tv) INLINE_ONLY;
extern inline SYM_REC_PTR insert(const char *name, int size, int arity) INLINE_ONLY;
extern inline int compare(TERM t1, TERM t2) INLINE_ONLY;
extern inline void write_term(TERM t) INLINE_ONLY;
extern inline void numberVarTermOpt(TERM t) INLINE_ONLY;
extern inline TERM unnumberVarTerm(TERM t, BPLONG_PTR pt1, BPLONG_PTR pt2) INLINE_ONLY;
extern inline int unifyNumberedTerms(TERM t1, TERM t2) INLINE_ONLY;
INLINE_ONLY extern inline TERM ADDTAG(void * t,int tag);
INLINE_ONLY extern inline int is_UNIFIABLE(TERM t1, TERM t2);
INLINE_ONLY extern inline int is_IDENTICAL(TERM t1, TERM t2);
INLINE_ONLY extern inline char *bp_term_2_string(TERM t);
INLINE_ONLY extern inline int bp_string_2_term(const char *s, TERM to, TERM tv);
INLINE_ONLY extern inline SYM_REC_PTR insert(const char *name, int size, int arity);
INLINE_ONLY extern inline int compare(TERM t1, TERM t2);
INLINE_ONLY extern inline void write_term(TERM t);
INLINE_ONLY extern inline void numberVarTermOpt(TERM t);
INLINE_ONLY extern inline TERM unnumberVarTerm(TERM t, BPLONG_PTR pt1, BPLONG_PTR pt2);
INLINE_ONLY extern inline int unifyNumberedTerms(TERM t1, TERM t2);
int bpx_call_term(TERM t);
int bpx_call_string(const char *s);
@ -103,7 +103,7 @@ void bpx_write(TERM t);
int bpx_printf(const char *fmt, ...);
extern inline TERM ADDTAG(void * t,int tag) {
INLINE_ONLY extern inline TERM ADDTAG(void * t,int tag) {
if (tag == ATM)
return MkAtomTerm((Atom)t);
if (tag == LST)
@ -133,12 +133,12 @@ TERM encodefloat1(double f)
return MkFloatTerm((Float)f);
}
extern inline int is_UNIFIABLE(TERM t1, TERM t2)
INLINE_ONLY extern inline int is_UNIFIABLE(TERM t1, TERM t2)
{
return YAP_Unifiable(t1, t2);
}
extern inline int is_IDENTICAL(TERM t1, TERM t2)
INLINE_ONLY extern inline int is_IDENTICAL(TERM t1, TERM t2)
{
return YAP_ExactlyEqual(t1, t2);
}
@ -180,7 +180,7 @@ extern BPLONG toam_signal_vec;
#define unify YAP_Unify
extern inline char *
INLINE_ONLY extern inline char *
bp_term_2_string(TERM t)
{
char *buf = malloc(256);
@ -190,7 +190,7 @@ bp_term_2_string(TERM t)
}
// char *bp_get_name(TERM t)
extern inline int
INLINE_ONLY extern inline int
bp_string_2_term(const char *s, TERM to, TERM tv)
{
TERM t0 = YAP_ReadBuffer(s, NULL);
@ -198,7 +198,7 @@ bp_string_2_term(const char *s, TERM to, TERM tv)
return unify(t0, to) && unify(t1,tv);
}
extern inline SYM_REC_PTR
INLINE_ONLY extern inline SYM_REC_PTR
insert(const char *name, int size, int arity)
{
if (!arity) {
@ -207,14 +207,14 @@ insert(const char *name, int size, int arity)
return (SYM_REC_PTR)YAP_MkFunctor(YAP_LookupAtom(name), arity);
}
extern inline int
INLINE_ONLY extern inline int
compare(TERM t1, TERM t2)
{
// compare terms??
return YAP_CompareTerms(t1,t2);
}
extern inline void
INLINE_ONLY extern inline void
write_term(TERM t)
{
YAP_Write(t,NULL,0);
@ -242,19 +242,19 @@ list_length(BPLONG t1, BPLONG t2)
#define PRE_NUMBER_VAR(X)
extern inline void
INLINE_ONLY extern inline void
numberVarTermOpt(TERM t)
{
YAP_NumberVars(t, 0);
}
extern inline TERM
INLINE_ONLY extern inline TERM
unnumberVarTerm(TERM t, BPLONG_PTR pt1, BPLONG_PTR pt2)
{
return YAP_UnNumberVars(t);
}
extern inline int
INLINE_ONLY extern inline int
unifyNumberedTerms(TERM t1, TERM t2)
{
if (YAP_Unify(t1,t2))