home *** CD-ROM | disk | FTP | other *** search
- /*
- Company: Sensaura
- Copyright: (C) 1998
-
- File Name: Debug.h
- File Description: Debugging support functions, definitions and macros
- Author: Adam Philp
- Version: DEV1.00
- Last Update: 29-JUL-98
-
- Target Compiler: Microsoft Visual C++ Version 5.0
- */
-
- #ifndef __DEBUG_H // Only use file if not already included
- #define __DEBUG_H
-
- #ifdef _DEBUG // Debug macros expand to functions only in debug build
-
- #ifndef FALSE
- #define FALSE 0
- #endif
-
- #ifndef TRUE
- #define TRUE (!FALSE)
- #endif
-
-
- #ifndef TRACE
- #define TRACE DebugTracePrepare(__FILE__, __LINE__); DebugTrace
- #define TRACEDISABLE DebugTraceDisable();
- #define TRACEENABLE DebugTraceEnable();
- #endif
-
- #ifndef ASSERT
- #include <crtdbg.h>
- #define ASSERT _ASSERT
- #define VERIFY ASSERT
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- extern void DebugTracePrepare(const char* lpcszFileName, int NumLine);
- extern void DebugTrace(int DebugLevel, const char* lpcszFormat, ...);
- extern void DebugTraceDisable();
- extern void DebugTraceEnable();
-
- #ifdef __cplusplus
- }
- #endif
-
- #else // (#ifdef _DEBUG) Macros expand to nothing in release build
-
- #define TRACE
- #define TRACEDISABLE
- #define TRACEENABLE
- #define ASSERT
- #define VERIFY
- #define END
-
- #endif // (#ifdef _DEBUG)
-
- #endif // __DEBUG_H