Windows Threaded Patches

This commit is contained in:
U-w7\vsc 2013-11-13 17:04:34 +00:00
parent 9a35d17861
commit 7f8f80fdbe
5 changed files with 12 additions and 5 deletions

View File

@ -118,7 +118,7 @@ Yap_InitPlIO (void)
*/
static int newline = TRUE;
#ifdef DEBUG
#if DEBUG
static int eolflg = 1;

View File

@ -38,6 +38,7 @@ Yap_LoadForeignFile(char *file, int flags)
{
void *ptr= (void *)LoadLibrary(file);
if (!ptr) {
CACHE_REGS
LOCAL_ErrorSay[0]='\0';
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
NULL, GetLastError(),

View File

@ -123,7 +123,7 @@ Yap_LookupVar(char *var) /* lookup variable in variables table */
CACHE_REGS
VarEntry *p;
#ifdef DEBUG
#if DEBUG
if (GLOBAL_Option[4])
fprintf(GLOBAL_stderr,"[LookupVar %s]", var);
#endif
@ -786,7 +786,7 @@ ParseTerm(int prio, JMPBUFF *FailBuff USES_REGS)
FAIL;
break;
}
#ifdef DEBUG
#if DEBUG
if (GLOBAL_Option['p' - 'a' + 1]) {
Yap_DebugPutc(LOCAL_c_error_stream,'[');
Yap_DebugPlWrite(t);

View File

@ -1310,12 +1310,12 @@ Yap_tokenizer(IOSTREAM *inp_stream, int store_comments, Term *tposp)
break;
default:
#ifdef DEBUG
#if DEBUG
fprintf(GLOBAL_stderr, "\n++++ token: wrong char type %c %d\n", ch, chtype(ch));
#endif
t->Tok = Ord(kind = eot_tok);
}
#ifdef DEBUG
#if DEBUG
if(GLOBAL_Option[2]) fprintf(GLOBAL_stderr,"[Token %d %ld]",Ord(kind),(unsigned long int)t->TokInfo);
#endif
if (LOCAL_ErrorMessage) {

View File

@ -18,6 +18,11 @@ typedef uintptr_t term_t;
#ifndef _FLI_H_INCLUDED
#ifdef __WINDOWS__
#include <windows.h>
#include <windows/uxnt.h>
#endif
typedef void *record_t;
typedef struct mod_entry *module_t;
typedef uintptr_t atom_t;
@ -29,6 +34,7 @@ typedef struct pred_entry *predicate_t;
typedef uintptr_t PL_fid_t; /* opaque foreign context handle */
#define fid_t PL_fid_t /* avoid AIX name-clash */
typedef uintptr_t word; /* Anonymous 4 byte object */
#endif
#define GLOBAL_LD (LOCAL_PL_local_data_p)