windows-nt/Source/XPSP1/NT/drivers/wdm/capture/codec/msyuv/debug.h

50 lines
1.2 KiB
C
Raw Normal View History

2020-09-26 03:20:57 -05:00
/*
* debug macros
*
*/
#if DBG
#ifndef _DEBUG
#define _DEBUG
#endif
#endif
#ifndef _DEBUGH
#define _DEBUGH
#ifdef _DEBUG
#define ModuleDebugLevel MsYuvDebugLevel
#define ModuleDebugStamp MsYuvDebugStamp
extern DWORD ModuleDebugLevel;
extern DWORD ModuleStamp;
void PlaceStamp(TCHAR * lpszFile, int iLineNum);
void dbgPrintf(TCHAR * szFormat, ...);
#define dprintf1(_x_) {if (ModuleDebugLevel >= 1) {PlaceStamp(__FILE__,__LINE__);dbgPrintf _x_ ;}}
#define dprintf2(_x_) {if (ModuleDebugLevel >= 2) {PlaceStamp(__FILE__,__LINE__);dbgPrintf _x_ ;}}
#define dprintf3(_x_) {if (ModuleDebugLevel >= 3) {PlaceStamp(__FILE__,__LINE__);dbgPrintf _x_ ;}}
#define dprintf4(_x_) {if (ModuleDebugLevel >= 4) {PlaceStamp(__FILE__,__LINE__);dbgPrintf _x_ ;}}
//BOOL FAR PASCAL _Assert(BOOL fExpr, LPSTR szFile, int iLine, LPSTR szExpr);
BOOL FAR PASCAL _Assert(BOOL fExpr, TCHAR * szFile, int iLine, TCHAR * szExpr);
#define ASSERT(expr) _Assert((expr), __FILE__, __LINE__, #expr)
#else
#define ASSERT(expr)
#define dbgPrintf 0?0:
#define dprintf(_x_)
#define dprintf1(_x_)
#define dprintf2(_x_)
#define dprintf3(_x_)
#define dprintf4(_x_)
#endif
#endif // DEBUGH