atom_oncat was not allocating memory right
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@353 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
90356f9993
commit
0dbc5373b4
@ -344,6 +344,8 @@ Error (yap_error_number type, Term where, char *format,...)
|
|||||||
unify(t, where);
|
unify(t, where);
|
||||||
where = Deref(where);
|
where = Deref(where);
|
||||||
}
|
}
|
||||||
|
/* Exit Abort Mode, if we were there */
|
||||||
|
PrologMode &= ~AbortMode;
|
||||||
PrologMode |= InErrorMode;
|
PrologMode |= InErrorMode;
|
||||||
where = CopyTerm(where);
|
where = CopyTerm(where);
|
||||||
va_start (ap, format);
|
va_start (ap, format);
|
||||||
|
@ -622,7 +622,7 @@ static Int
|
|||||||
p_atom_concat(void)
|
p_atom_concat(void)
|
||||||
{
|
{
|
||||||
Term t1 = Deref(ARG1);
|
Term t1 = Deref(ARG1);
|
||||||
char *cptr = (char *)PreAllocCodeSpace(), *cpt0;
|
char *cptr = ((AtomEntry *)PreAllocCodeSpace())->StrOfAE, *cpt0;
|
||||||
char *top = (char *)AuxSp;
|
char *top = (char *)AuxSp;
|
||||||
char *atom_str;
|
char *atom_str;
|
||||||
UInt sz;
|
UInt sz;
|
||||||
@ -670,8 +670,8 @@ p_atom_concat(void)
|
|||||||
if (t1 == TermNil) {
|
if (t1 == TermNil) {
|
||||||
Term tout;
|
Term tout;
|
||||||
cptr[0] = '\0';
|
cptr[0] = '\0';
|
||||||
ReleasePreAllocCodeSpace((ADDR)cpt0);
|
|
||||||
tout = MkAtomTerm(LookupAtom(cpt0));
|
tout = MkAtomTerm(LookupAtom(cpt0));
|
||||||
|
ReleasePreAllocCodeSpace((ADDR)cpt0);
|
||||||
return(unify(ARG2, tout));
|
return(unify(ARG2, tout));
|
||||||
}
|
}
|
||||||
ReleasePreAllocCodeSpace((ADDR)cpt0);
|
ReleasePreAllocCodeSpace((ADDR)cpt0);
|
||||||
|
@ -2033,7 +2033,7 @@ set_fpu_exceptions(int flag)
|
|||||||
#if defined(__hpux)
|
#if defined(__hpux)
|
||||||
fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL);
|
fpsetmask(FP_X_INV|FP_X_DZ|FP_X_OFL|FP_X_UFL);
|
||||||
#endif
|
#endif
|
||||||
#if HAVE_FPU_CONTROL_H && i386
|
#if HAVE_FPU_CONTROL_H && i386 && defined(__GNUC__)
|
||||||
/* I shall ignore denormalization and precision errors */
|
/* I shall ignore denormalization and precision errors */
|
||||||
int v = _FPU_IEEE & ~(_FPU_MASK_IM|_FPU_MASK_ZM|_FPU_MASK_OM|_FPU_MASK_UM);
|
int v = _FPU_IEEE & ~(_FPU_MASK_IM|_FPU_MASK_ZM|_FPU_MASK_OM|_FPU_MASK_UM);
|
||||||
_FPU_SETCW(v);
|
_FPU_SETCW(v);
|
||||||
@ -2047,7 +2047,7 @@ set_fpu_exceptions(int flag)
|
|||||||
#if defined(__hpux)
|
#if defined(__hpux)
|
||||||
fpsetmask(FP_X_CLEAR);
|
fpsetmask(FP_X_CLEAR);
|
||||||
#endif
|
#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 */
|
/* this will probably not work in older releases of Linux */
|
||||||
int v = _FPU_IEEE;
|
int v = _FPU_IEEE;
|
||||||
_FPU_SETCW(v);
|
_FPU_SETCW(v);
|
||||||
|
14
README.nt
14
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:
|
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*.
|
DLL project, initially *empty*.
|
||||||
|
|
||||||
NOTICE: Either the project is named yapdll or you must replace
|
NOTICE: Either the project is named yap or you must replace
|
||||||
YAPDLL_EXPORTS to match your project names in c_interface.h and
|
YAP_EXPORTS to match your project names in c_interface.h and
|
||||||
c_interface.c.
|
c_interface.c.
|
||||||
|
|
||||||
o add all .c files in the $YAPSRC/C directory and in the
|
o Use the FileView tab to add all .c files in the $YAPSRC/C directory
|
||||||
$YAPSRC/OPTYap directory to the "Source Files" (use FileView).
|
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 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 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:
|
The syntax is:
|
||||||
|
|
||||||
|
@ -16,6 +16,13 @@
|
|||||||
|
|
||||||
<h2>Yap-4.3.21:</h2>
|
<h2>Yap-4.3.21:</h2>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>FIXED: atom_concat was not allocating heap correctly (Nicos Angelopoulos).</li>
|
||||||
|
<li>NEW: ord_intersection/4 (Nicos Angelopoulos).</li>
|
||||||
|
<li>NEW: file_search_path/2 (Nicos Angelopoulos).</li>
|
||||||
|
<li>FIXED: fix yap_flag(host_type).</li>
|
||||||
|
<li>FIXED: make Yap compile under VC++ again.</li>
|
||||||
|
<li>FIXED: don't try to handle X/0 the ISO way.</li>
|
||||||
|
<li>FIXED: make Yap runnable in WIN98.</li>
|
||||||
<li>FIXED: access to non-existing dynamic array should not core-dump.</li>
|
<li>FIXED: access to non-existing dynamic array should not core-dump.</li>
|
||||||
<li>FIXED: abolish(_) should give error in ISO mode.</li>
|
<li>FIXED: abolish(_) should give error in ISO mode.</li>
|
||||||
<li>NEW: yap_flag(argv,L) (Nicos Angelopoulos).</li>
|
<li>NEW: yap_flag(argv,L) (Nicos Angelopoulos).</li>
|
||||||
|
2
configure
vendored
2
configure
vendored
@ -1965,7 +1965,7 @@ test -n "$target_alias" &&
|
|||||||
program_prefix=${target_alias}-
|
program_prefix=${target_alias}-
|
||||||
|
|
||||||
cat >>confdefs.h <<EOF
|
cat >>confdefs.h <<EOF
|
||||||
#define HOST_ALIAS "${host_alias}"
|
#define HOST_ALIAS "${host}"
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if test "$GCC" = "yes"
|
if test "$GCC" = "yes"
|
||||||
|
@ -119,7 +119,7 @@ eval "AC_DEFINE(UsrTrailSpace,($yap_cv_trail_space))"
|
|||||||
|
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(HOST_ALIAS,"${host_alias}")
|
AC_DEFINE_UNQUOTED(HOST_ALIAS,"${host}")
|
||||||
|
|
||||||
dnl Compilation Flags
|
dnl Compilation Flags
|
||||||
if test "$GCC" = "yes"
|
if test "$GCC" = "yes"
|
||||||
|
Reference in New Issue
Block a user