windows fixes
git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@1103 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
parent
3868089946
commit
3801508cdf
12
C/absmi.c
12
C/absmi.c
@ -10,8 +10,14 @@
|
|||||||
* *
|
* *
|
||||||
* File: absmi.c *
|
* File: absmi.c *
|
||||||
* comments: Portable abstract machine interpreter *
|
* comments: Portable abstract machine interpreter *
|
||||||
* Last rev: $Date: 2004-07-22 21:32:20 $,$Author: vsc $ *
|
* Last rev: $Date: 2004-07-23 21:08:44 $,$Author: vsc $ *
|
||||||
* $Log: not supported by cvs2svn $
|
* $Log: not supported by cvs2svn $
|
||||||
|
* Revision 1.140 2004/07/22 21:32:20 vsc
|
||||||
|
* debugger fixes
|
||||||
|
* initial support for JPL
|
||||||
|
* bad calls to garbage collector and gc
|
||||||
|
* debugger fixes
|
||||||
|
*
|
||||||
* Revision 1.139 2004/07/03 03:29:24 vsc
|
* Revision 1.139 2004/07/03 03:29:24 vsc
|
||||||
* make it compile again on non-linux machines
|
* make it compile again on non-linux machines
|
||||||
*
|
*
|
||||||
@ -11960,8 +11966,10 @@ Yap_absmi(int inp)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int STD_PROTO(Yap_absmiEND,(void));
|
||||||
|
|
||||||
/* dummy function that is needed for profiler */
|
/* dummy function that is needed for profiler */
|
||||||
int Yap_absmiEND()
|
int Yap_absmiEND(void)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
* Last rev: *
|
* Last rev: *
|
||||||
* mods: *
|
* mods: *
|
||||||
* comments: allocating space *
|
* comments: allocating space *
|
||||||
* version:$Id: alloc.c,v 1.53 2004-07-23 19:02:09 vsc Exp $ *
|
* version:$Id: alloc.c,v 1.54 2004-07-23 21:08:44 vsc Exp $ *
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
#ifdef SCCS
|
#ifdef SCCS
|
||||||
static char SccsId[] = "%W% %G%";
|
static char SccsId[] = "%W% %G%";
|
||||||
@ -603,7 +603,7 @@ InitWorkSpace(Int s)
|
|||||||
Yap_Error(FATAL_ERROR,TermNil,"VirtualAlloc failed");
|
Yap_Error(FATAL_ERROR,TermNil,"VirtualAlloc failed");
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
fprintf(stderr,"% Warning: YAP reserving space at variable address %p\n", b);
|
fprintf(stderr,"%% Warning: YAP reserving space at variable address %p\n", b);
|
||||||
}
|
}
|
||||||
brk = BASE_ADDRESS;
|
brk = BASE_ADDRESS;
|
||||||
|
|
||||||
|
11
C/stdpreds.c
11
C/stdpreds.c
@ -11,8 +11,15 @@
|
|||||||
* File: stdpreds.c *
|
* File: stdpreds.c *
|
||||||
* comments: General-purpose C implemented system predicates *
|
* comments: General-purpose C implemented system predicates *
|
||||||
* *
|
* *
|
||||||
* Last rev: $Date: 2004-06-29 19:04:42 $,$Author: vsc $ *
|
* Last rev: $Date: 2004-07-23 21:08:44 $,$Author: vsc $ *
|
||||||
* $Log: not supported by cvs2svn $
|
* $Log: not supported by cvs2svn $
|
||||||
|
* Revision 1.70 2004/06/29 19:04:42 vsc
|
||||||
|
* fix multithreaded version
|
||||||
|
* include new version of Ricardo's profiler
|
||||||
|
* new predicat atomic_concat
|
||||||
|
* allow multithreaded-debugging
|
||||||
|
* small fixes
|
||||||
|
*
|
||||||
* Revision 1.69 2004/06/16 14:12:53 vsc
|
* Revision 1.69 2004/06/16 14:12:53 vsc
|
||||||
* miscellaneous fixes
|
* miscellaneous fixes
|
||||||
*
|
*
|
||||||
@ -1163,7 +1170,7 @@ p_atomic_concat(void)
|
|||||||
#if HAVE_SNPRINTF
|
#if HAVE_SNPRINTF
|
||||||
snprintf(cptr, (top-cptr)-1024,"%ld", (long int)IntegerOfTerm(thead));
|
snprintf(cptr, (top-cptr)-1024,"%ld", (long int)IntegerOfTerm(thead));
|
||||||
#else
|
#else
|
||||||
sprintf(cptr,"%ld", IntegerOfTerm(thead));
|
sprintf(cptr,"%ld", (long int)IntegerOfTerm(thead));
|
||||||
#endif
|
#endif
|
||||||
while (*cptr && cptr < top-1024) cptr++;
|
while (*cptr && cptr < top-1024) cptr++;
|
||||||
} else if (IsFloatTerm(thead)) {
|
} else if (IsFloatTerm(thead)) {
|
||||||
|
@ -26,7 +26,7 @@ STATIC_PROTO(int rtable_hash_op, (OPCODE));
|
|||||||
STATIC_PROTO(void InitReverseLookupOpcode, (void));
|
STATIC_PROTO(void InitReverseLookupOpcode, (void));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int
|
static int
|
||||||
rational_tree_loop(CELL *pt0, CELL *pt0_end, CELL **to_visit0)
|
rational_tree_loop(CELL *pt0, CELL *pt0_end, CELL **to_visit0)
|
||||||
{
|
{
|
||||||
CELL **to_visit = to_visit0;
|
CELL **to_visit = to_visit0;
|
||||||
@ -115,7 +115,7 @@ rational_tree(Term d0) {
|
|||||||
Functor f = (Functor)(*pt0);
|
Functor f = (Functor)(*pt0);
|
||||||
CELL **to_visit = (CELL **)H;
|
CELL **to_visit = (CELL **)H;
|
||||||
|
|
||||||
return(rational_tree_loop(pt0, pt0+ArityOfFunctor(f), to_visit));
|
return rational_tree_loop(pt0, pt0+ArityOfFunctor(f), to_visit);
|
||||||
} else
|
} else
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
@ -276,3 +276,26 @@ static int p_print_trie(void) {
|
|||||||
print_trie((TrNode) YAP_IntOfTerm(arg_trie));
|
print_trie((TrNode) YAP_IntOfTerm(arg_trie));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
int WINAPI PROTO(win_tries, (HANDLE, DWORD, LPVOID));
|
||||||
|
|
||||||
|
int WINAPI win_tries(HANDLE hinst, DWORD reason, LPVOID reserved)
|
||||||
|
{
|
||||||
|
switch (reason)
|
||||||
|
{
|
||||||
|
case DLL_PROCESS_ATTACH:
|
||||||
|
break;
|
||||||
|
case DLL_PROCESS_DETACH:
|
||||||
|
break;
|
||||||
|
case DLL_THREAD_ATTACH:
|
||||||
|
break;
|
||||||
|
case DLL_THREAD_DETACH:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
* File: Yap.h.m4 *
|
* File: Yap.h.m4 *
|
||||||
* mods: *
|
* mods: *
|
||||||
* comments: main header file for YAP *
|
* comments: main header file for YAP *
|
||||||
* version: $Id: Yap.h.m4,v 1.59 2004-07-15 15:47:08 vsc Exp $ *
|
* version: $Id: Yap.h.m4,v 1.60 2004-07-23 21:08:45 vsc Exp $ *
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
@ -233,7 +233,7 @@ typedef long int YAP_LONG_LONG;
|
|||||||
typedef unsigned long int YAP_ULONG_LONG;
|
typedef unsigned long int YAP_ULONG_LONG;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SIGPROF
|
#if HAVE_SIGPROF && __linux__
|
||||||
#define LOW_PROF 1
|
#define LOW_PROF 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user