Main Page   Class Hierarchy   Compound List   File List   Compound Members  

CAVERNmisc_debug.hxx

00001 /******************************************************************
00002  * CAVERNsoft
00003  * Copyright (C) 1994-2000 Electronic Visualization Laboratory,
00004  * all rights reserved
00005  * By Jason Leigh, Yong-joo Cho, Naveen Krishnaprasad, Chris Scharver,
00006  * Stuart Bailey, Atul Nayak, Shalini Venakataraman
00007  * University of Illinois at Chicago
00008  * 
00009  * This publication and its text and code may not be copied for commercial 
00010  * use without the express written permission of the University of Illinois
00011  * at Chicago
00012  * The contributors disclaim any representation of warranty: use this
00013  * code at your own risk.
00014  * Direct questions, comments etc to cavern@evl.uic.edu
00015  ******************************************************************/
00016 // Turn this on to do in function tracing.
00017 //#define CVRN_TRACE
00018 
00019 
00020 
00021 #ifndef _CVRN_DEBUG
00022 #define _CVRN_DEBUG
00023 
00024 
00025 #define DBG_MEM 32
00026 #define DBG_ERR 2
00027 #define DBG_MSG 4
00028 #define DBG_FAIL 8
00029 #define DBG_REF 16
00030 #define DBG_PUB 1
00031 #define DBG_LOCK 64
00032 #define DBG_THREAD 128
00033 
00034 #define DBG_ALL (!0)
00035 #ifdef CVRN_TRACE
00036         #ifdef WIN32
00037         #define cvrnTrace(prefix,mesg)  EnterCriticalSection(&Win32StdioLock); printf("  cavern: "); if (prefix) {printf(prefix); printf(":");}  printf(mesg); printf("\n"); fflush(stdout); LeaveCriticalSection(&Win32StdioLock);
00038         #else
00039         #define cvrnTrace(prefix,mesg)  nexus_stdio_lock(); printf("  cavern: "); if (prefix) {printf(prefix); printf(":");}  printf(mesg); printf("\n"); fflush(stdout); nexus_stdio_unlock();
00040         #endif
00041 #else
00042 #define cvrnTrace(prefix,mesg)
00043 #endif
00044 
00045 
00046 extern int _cvrnDebugLevel;
00047 void cvrnSetDebugFilter(int);
00048 void cvrnDebug(char* prefix, int lvl, char *fmt, ...);
00049 void cvrnMesg(char *prefix, char *fmt, ...);
00050 
00068 void cvrnPrintf(char *fmt, ...);
00069 
00070 
00071 
00072 
00073 #endif

Generated at Mon Jul 2 14:24:42 2001 for CAVERNsoft by doxygen1.2.8-20010617 written by Dimitri van Heesch, © 1997-2001