diff --git a/H/YapFlags.h b/H/YapFlags.h index d9f9e11e6..03dbbfebe 100644 --- a/H/YapFlags.h +++ b/H/YapFlags.h @@ -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) { diff --git a/H/YapHeap.h b/H/YapHeap.h index 2ae217a46..143867121 100755 --- a/H/YapHeap.h +++ b/H/YapHeap.h @@ -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); diff --git a/H/Yapproto.h b/H/Yapproto.h index 6a6175ba3..820312a44 100755 --- a/H/Yapproto.h +++ b/H/Yapproto.h @@ -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); diff --git a/H/generated/dhstruct.h b/H/generated/dhstruct.h index 43bcf1450..000f2d460 100644 --- a/H/generated/dhstruct.h +++ b/H/generated/dhstruct.h @@ -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_ diff --git a/H/generated/dlocals.h b/H/generated/dlocals.h index e5b3b6f04..56e3e0da2 100644 --- a/H/generated/dlocals.h +++ b/H/generated/dlocals.h @@ -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_ diff --git a/H/generated/h0struct.h b/H/generated/h0struct.h index ad400497a..4429cbacf 100644 --- a/H/generated/h0struct.h +++ b/H/generated/h0struct.h @@ -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 */ diff --git a/H/generated/hlocals.h b/H/generated/hlocals.h index 6c24edf19..09a4f414f 100644 --- a/H/generated/hlocals.h +++ b/H/generated/hlocals.h @@ -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_; diff --git a/H/generated/hstruct.h b/H/generated/hstruct.h index 066d703cc..7db335e2a 100755 --- a/H/generated/hstruct.h +++ b/H/generated/hstruct.h @@ -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 */ diff --git a/H/generated/ihstruct.h b/H/generated/ihstruct.h index aadf30020..0a8df7e8a 100644 --- a/H/generated/ihstruct.h +++ b/H/generated/ihstruct.h @@ -280,16 +280,6 @@ ForeignCodeMax = NULL; Yap_Records = NULL; - - InitSWIAtoms(); - - - - - - - - InitEmptyWakeups(); MaxEmptyWakeups = 0; diff --git a/H/generated/ilocals.h b/H/generated/ilocals.h index fdeae89de..fa53fe070 100755 --- a/H/generated/ilocals.h +++ b/H/generated/ilocals.h @@ -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; diff --git a/H/generated/rhstruct.h b/H/generated/rhstruct.h index ea538522e..cd2f6b479 100644 --- a/H/generated/rhstruct.h +++ b/H/generated/rhstruct.h @@ -280,16 +280,6 @@ RestoreYapRecords(); - - RestoreSWIAtoms(); - - - - - - - - RestoreEmptyWakeups(); diff --git a/H/rheap.h b/H/rheap.h index a8e9d5abc..e67f7ec33 100644 --- a/H/rheap.h +++ b/H/rheap.h @@ -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);