- move all generated files to their own directory

- cleanups
`:wq
This commit is contained in:
V'itor Santos Costa 2016-02-11 06:13:16 -08:00
parent 74b2b5561d
commit 6961626a3d
12 changed files with 9 additions and 72 deletions

View File

@ -249,6 +249,8 @@ typedef enum {
bool setYapFlag(Term tflag, Term t2);
Term getYapFlag(Term tflag);
int Yap_ArgKey(Atom key, const param_t *def, int n);
static inline bool check_refs_to_ltable(void) { return true; }
static inline void setAtomicGlobalPrologFlag(int id, Term v) {

View File

@ -31,8 +31,6 @@ typedef int (*SWI_FlushFunction)(void *);
typedef int (*SWI_PLGetStreamFunction)(void *);
typedef int (*SWI_PLGetStreamPositionFunction)(void *);
#include "../include/dswiatoms.h"
typedef int (*Opaque_CallOnFail)(void *);
typedef int (*Opaque_CallOnWrite)(FILE *, int, void *, int);
typedef Int (*Opaque_CallOnGCMark)(int, void *, Term *, Int);

View File

@ -409,7 +409,7 @@ void Yap_InitSysbits(int wid);
void Yap_InitSysPreds(void);
void Yap_InitcTime(int);
void Yap_InitTime(int);
int Yap_TrueFileName(const char *, char *, int);
int Yap_TrueFileName(const char *, char *, bool);
int Yap_TruePrefixedFileName(const char *, const char *, char *, int);
double Yap_random(void);
#ifdef _WIN32
@ -419,9 +419,8 @@ void Yap_WinError(char *);
typedef enum { YAP_STD, YAP_SAVED_STATE, YAP_OBJ, YAP_PL, YAP_QLY } file_type_t;
bool Yap_trueFileName(const char *isource, const char *idef, const char *root,
char *result, bool access, file_type_t ftype,
bool expand_root, bool in_lib);
const char *Yap_AbsoluteFile(const char *spec, bool ok);
const char *Yap_AbsoluteFileInBuffer(const char *spec, char *outp, size_t sz, bool ok);
/* threads.c */
void Yap_InitThreadPreds(void);

View File

@ -280,16 +280,6 @@
#define ForeignCodeMax Yap_heap_regs->ForeignCodeMax_
#define Yap_Records Yap_heap_regs->Yap_Records_
#define SWI_Atoms Yap_heap_regs->SWI_Atoms_
#define SWI_Functors Yap_heap_regs->SWI_Functors_
#define SWI_ReverseHash Yap_heap_regs->SWI_ReverseHash_
#define AtomTranslations Yap_heap_regs->AtomTranslations_
#define MaxAtomTranslations Yap_heap_regs->MaxAtomTranslations_
#define FunctorTranslations Yap_heap_regs->FunctorTranslations_
#define MaxFunctorTranslations Yap_heap_regs->MaxFunctorTranslations_
#define EmptyWakeups Yap_heap_regs->EmptyWakeups_
#define MaxEmptyWakeups Yap_heap_regs->MaxEmptyWakeups_

View File

@ -25,14 +25,14 @@
#define LOCAL_encoding LOCAL->encoding_
#define REMOTE_encoding(wid) REMOTE(wid)->encoding_
#define LOCAL_newline LOCAL->newline_
#define REMOTE_newline(wid) REMOTE(wid)->newline_
#define LOCAL_AtPrompt LOCAL->AtPrompt_
#define REMOTE_AtPrompt(wid) REMOTE(wid)->AtPrompt_
#define LOCAL_Prompt LOCAL->Prompt_
#define REMOTE_Prompt(wid) REMOTE(wid)->Prompt_
#define LOCAL_encoding LOCAL->encoding_
#define REMOTE_encoding(wid) REMOTE(wid)->encoding_
#define LOCAL_quasi_quotations LOCAL->quasi_quotations_
#define REMOTE_quasi_quotations(wid) REMOTE(wid)->quasi_quotations_
#define LOCAL_default_priority LOCAL->default_priority_

View File

@ -280,16 +280,6 @@ EXTERNAL ADDR ForeignCodeTop;
EXTERNAL ADDR ForeignCodeMax;
/* recorded terms */
EXTERNAL struct record_list *Yap_Records;
/* SWI atoms and functors */
EXTERNAL Atom *SWI_Atoms;
EXTERNAL Functor *SWI_Functors;
EXTERNAL swi_rev_hash SWI_ReverseHash[N_SWI_HASH];
/* integer access to atoms */
EXTERNAL Int AtomTranslations;
EXTERNAL Int MaxAtomTranslations;
/* integer access to functors */
EXTERNAL Int FunctorTranslations;
EXTERNAL Int MaxFunctorTranslations;
EXTERNAL Atom EmptyWakeups[MAX_EMPTY_WAKEUPS];
EXTERNAL int MaxEmptyWakeups;
/* SWI blobs */

View File

@ -17,10 +17,10 @@ typedef struct worker_local {
// Used by the prompts to check if they are after a newline, and then a
// prompt should be output, or if we are in the middle of a line.
//
encoding_t encoding_;
bool newline_;
Atom AtPrompt_;
char Prompt_[MAX_PROMPT+1];
encoding_t encoding_;
bool quasi_quotations_;
UInt default_priority_;
bool eot_before_eof_;

View File

@ -280,16 +280,6 @@
ADDR ForeignCodeMax_;
/* recorded terms */
struct record_list *Yap_Records_;
/* SWI atoms and functors */
Atom *SWI_Atoms_;
Functor *SWI_Functors_;
swi_rev_hash SWI_ReverseHash_[N_SWI_HASH];
/* integer access to atoms */
Int AtomTranslations_;
Int MaxAtomTranslations_;
/* integer access to functors */
Int FunctorTranslations_;
Int MaxFunctorTranslations_;
Atom EmptyWakeups_[MAX_EMPTY_WAKEUPS];
int MaxEmptyWakeups_;
/* SWI blobs */

View File

@ -280,16 +280,6 @@
ForeignCodeMax = NULL;
Yap_Records = NULL;
InitSWIAtoms();
InitEmptyWakeups();
MaxEmptyWakeups = 0;

View File

@ -17,10 +17,10 @@ static void InitWorker(int wid) {
REMOTE_encoding(wid) = Yap_DefaultEncoding();
REMOTE_newline(wid) = true;
REMOTE_AtPrompt(wid) = AtomNil;
REMOTE_encoding(wid) = Yap_DefaultEncoding();
REMOTE_quasi_quotations(wid) = false;
REMOTE_default_priority(wid) = 1200;
REMOTE_eot_before_eof(wid) = false;

View File

@ -280,16 +280,6 @@
RestoreYapRecords();
RestoreSWIAtoms();
RestoreEmptyWakeups();

View File

@ -270,7 +270,6 @@ static char SccsId[] = "@(#)rheap.c 1.3 3/15/90";
#define RestoreDBErasedList() RestoreDBErasedList__(PASS_REGS1)
#define RestoreDBErasedIList() RestoreDBErasedIList__(PASS_REGS1)
#define RestoreYapRecords() RestoreYapRecords__(PASS_REGS1)
#define RestoreSWIAtoms() RestoreSWIAtoms__(PASS_REGS1)
static Term ConstantTermAdjust__(Term t USES_REGS) {
if (IsAtomTerm(t))
return AtomTermAdjust(t);
@ -685,17 +684,6 @@ beginning:
}
}
static void RestoreSWIAtoms__(USES_REGS1) {
int i, j;
for (i = 0; i < AtomTranslations; i++) {
SWI_Atoms[i] = AtomAdjust(SWI_Atoms[i]);
}
for (j = 0; j < FunctorTranslations; j++) {
SWI_Functors[j] = FuncAdjust(SWI_Functors[j]);
}
RestoreSWIHash();
}
#define RestoreBlobTypes() RestoreBlobTypes__(PASS_REGS1)
#define RestoreBlobs() RestoreBlobs__(PASS_REGS1);