From 0dbc5373b445f58d4143e4461dbc52d28df4944a Mon Sep 17 00:00:00 2001 From: vsc Date: Mon, 11 Feb 2002 20:22:15 +0000 Subject: [PATCH] atom_oncat was not allocating memory right git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@353 b08c6af1-5177-4d33-ba66-4b1c6b8b522a --- C/errors.c | 2 ++ C/stdpreds.c | 4 ++-- C/sysbits.c | 4 ++-- README.nt | 14 +++++++------- changes4.3.html | 7 +++++++ configure | 2 +- configure.in | 2 +- 7 files changed, 22 insertions(+), 13 deletions(-) diff --git a/C/errors.c b/C/errors.c index 1a4dc3b2e..98a64e318 100644 --- a/C/errors.c +++ b/C/errors.c @@ -344,6 +344,8 @@ Error (yap_error_number type, Term where, char *format,...) unify(t, where); where = Deref(where); } + /* Exit Abort Mode, if we were there */ + PrologMode &= ~AbortMode; PrologMode |= InErrorMode; where = CopyTerm(where); va_start (ap, format); diff --git a/C/stdpreds.c b/C/stdpreds.c index ed3f59d7c..2bd73c91d 100644 --- a/C/stdpreds.c +++ b/C/stdpreds.c @@ -622,7 +622,7 @@ static Int p_atom_concat(void) { Term t1 = Deref(ARG1); - char *cptr = (char *)PreAllocCodeSpace(), *cpt0; + char *cptr = ((AtomEntry *)PreAllocCodeSpace())->StrOfAE, *cpt0; char *top = (char *)AuxSp; char *atom_str; UInt sz; @@ -670,8 +670,8 @@ p_atom_concat(void) if (t1 == TermNil) { Term tout; cptr[0] = '\0'; - ReleasePreAllocCodeSpace((ADDR)cpt0); tout = MkAtomTerm(LookupAtom(cpt0)); + ReleasePreAllocCodeSpace((ADDR)cpt0); return(unify(ARG2, tout)); } ReleasePreAllocCodeSpace((ADDR)cpt0); diff --git a/C/sysbits.c b/C/sysbits.c index 5e2836151..176d73f8b 100644 --- a/C/sysbits.c +++ b/C/sysbits.c @@ -2033,7 +2033,7 @@ set_fpu_exceptions(int flag) #if defined(__hpux) fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL); #endif -#if HAVE_FPU_CONTROL_H && i386 +#if HAVE_FPU_CONTROL_H && i386 && defined(__GNUC__) /* I shall ignore denormalization and precision errors */ int v = _FPU_IEEE & ~(_FPU_MASK_IM|_FPU_MASK_ZM|_FPU_MASK_OM|_FPU_MASK_UM); _FPU_SETCW(v); @@ -2047,7 +2047,7 @@ set_fpu_exceptions(int flag) #if defined(__hpux) fpsetmask(FP_X_CLEAR); #endif -#if HAVE_FPU_CONTROL_H && i386 +#if HAVE_FPU_CONTROL_H && i386 && defined(__GNUC__) /* this will probably not work in older releases of Linux */ int v = _FPU_IEEE; _FPU_SETCW(v); diff --git a/README.nt b/README.nt index 999e0fbf2..894710815 100644 --- a/README.nt +++ b/README.nt @@ -38,23 +38,23 @@ To the best of my knowledge, Yap compiles cleanly under VC++ release First, it is a good idea to build Yap as a DLL: -1. create a project named yapdll using File.New. The project will be a +1. create a project named yap using File.New. The project will be a DLL project, initially *empty*. -NOTICE: Either the project is named yapdll or you must replace -YAPDLL_EXPORTS to match your project names in c_interface.h and +NOTICE: Either the project is named yap or you must replace +YAP_EXPORTS to match your project names in c_interface.h and c_interface.c. -o add all .c files in the $YAPSRC/C directory and in the -$YAPSRC/OPTYap directory to the "Source Files" (use FileView). +o Use the FileView tab to add all .c files in the $YAPSRC/C directory +and in the $YAPSRC/OPTYap directory to the "Source Files". -o add all .h files in the $YAPSRC/H director, $YAPSRC/include directory and in the $YAPSRC/OPTYap subdirectory to the "Header Files". +o add all .h files in the $YAPSRC/H directory, $YAPSRC/include directory and in the $YAPSRC/OPTYap subdirectory to the "Header Files". o include the .h from .m4 files and config.h. You can find these files at $YAPSRC/VC/include. o You may want to go to Build.Set Active Configuration and set Project Type to Release -o set Project.Project Settings.C/C++.Preprocessor.Additional Include Directories to include the $YAPSRC/H, $YAPSRC/VC/include, $YAPSRC/OPTYap and $YAPSRC/include. +o set Project.Settings.C/C++.Preprocessor.Additional Include Directories to include the $YAPSRC/H, $YAPSRC/VC/include, $YAPSRC/OPTYap and $YAPSRC/include. The syntax is: diff --git a/changes4.3.html b/changes4.3.html index 402552488..f3e090916 100644 --- a/changes4.3.html +++ b/changes4.3.html @@ -16,6 +16,13 @@

Yap-4.3.21: