diff --git a/C/alloc.c b/C/alloc.c index 0f636d142..0f7d72e66 100755 --- a/C/alloc.c +++ b/C/alloc.c @@ -379,7 +379,7 @@ InitExStacks(int Trail, int Stack) AuxSp = NULL; #ifdef DEBUG - if (GLOBAL_output_msg) { + if (Yap_output_msg) { UInt ta; fprintf(stderr, "HeapBase = %p GlobalBase = %p\n LocalBase = %p TrailTop = %p\n", @@ -1534,11 +1534,11 @@ Yap_InitMemory(UInt Trail, UInt Heap, UInt Stack) #ifdef DEBUG #if SIZEOF_INT_P!=SIZEOF_INT - if (GLOBAL_output_msg) { + if (Yap_output_msg) { fprintf(stderr, "HeapBase = %p GlobalBase = %p\n LocalBase = %p TrailTop = %p\n", Yap_HeapBase, LOCAL_GlobalBase, LOCAL_LocalBase, LOCAL_TrailTop); #else - if (GLOBAL_output_msg) { + if (Yap_output_msg) { fprintf(stderr, "HeapBase = %x GlobalBase = %x\n LocalBase = %x TrailTop = %x\n", (UInt) Yap_HeapBase, (UInt) LOCAL_GlobalBase, (UInt) LOCAL_LocalBase, (UInt) LOCAL_TrailTop); diff --git a/C/c_interface.c b/C/c_interface.c index 2f60ca0a3..b38b612e0 100755 --- a/C/c_interface.c +++ b/C/c_interface.c @@ -3076,7 +3076,7 @@ X_API void YAP_SetOutputMessage(void) { #if DEBUG - GLOBAL_output_msg = TRUE; + Yap_output_msg = TRUE; #endif } diff --git a/C/init.c b/C/init.c index 55a1b4a99..5a3ff9cb5 100755 --- a/C/init.c +++ b/C/init.c @@ -58,6 +58,7 @@ static char SccsId[] = "%W% %G%"; #define LOGFILE "logfile" +int Yap_output_msg = FALSE; #ifdef MACC STATIC_PROTO(void InTTYLine, (char *)); @@ -344,7 +345,7 @@ InitDebug(void) for (i = 1; i < 20; ++i) GLOBAL_Option[i] = 0; - if (GLOBAL_output_msg) { + if (Yap_output_msg) { char ch; #if HAVE_ISATTY diff --git a/H/Yap.h b/H/Yap.h index 3cb2965ea..8dced6f2f 100755 --- a/H/Yap.h +++ b/H/Yap.h @@ -760,6 +760,13 @@ extern ADDR Yap_HeapBase; #define MAX_ERROR_MSG_SIZE YAP_FILENAME_MAX +/************************************************************************************************* + Debugging Support +*************************************************************************************************/ + +#ifdef DEBUG +extern int Yap_output_msg; +#endif /************************************************************************************************* ??? diff --git a/H/dglobals.h b/H/dglobals.h index e049b2252..53d296ffa 100644 --- a/H/dglobals.h +++ b/H/dglobals.h @@ -85,7 +85,7 @@ #define GLOBAL_Option Yap_global->Option_ #define GLOBAL_logfile Yap_global->logfile_ -#define GLOBAL_output_msg Yap_global->output_msg_ + #endif #define GLOBAL_ProfCalls Yap_global->ProfCalls_ diff --git a/H/hglobals.h b/H/hglobals.h index ad4c1e699..16f7b321e 100644 --- a/H/hglobals.h +++ b/H/hglobals.h @@ -85,7 +85,7 @@ typedef struct global_data { char Option_[20]; YP_FILE* logfile_; - int output_msg_; + #endif Int ProfCalls_; diff --git a/H/iglobals.h b/H/iglobals.h index bf2abed19..734314679 100644 --- a/H/iglobals.h +++ b/H/iglobals.h @@ -85,7 +85,7 @@ static void InitGlobal(void) { - GLOBAL_output_msg = FALSE; + #endif diff --git a/misc/GLOBALS b/misc/GLOBALS index d410af693..774658e97 100644 --- a/misc/GLOBALS +++ b/misc/GLOBALS @@ -100,7 +100,7 @@ struct MMAP_ARRAY_BLOCK* mmap_arrays =NULL char Option[20] void YP_FILE* logfile void //init.c -int output_msg =FALSE +//int output_msg =FALSE #endif //gprof.c