mirror of
https://github.com/isledecomp/isle.git
synced 2024-11-29 19:16:05 -05:00
33 lines
489 B
C
33 lines
489 B
C
|
#ifndef MXDEBUG_H
|
||
|
#define MXDEBUG_H
|
||
|
|
||
|
#include "compat.h"
|
||
|
|
||
|
#ifdef _DEBUG
|
||
|
|
||
|
// In debug mode, replace the macro with the function call.
|
||
|
#define MxTrace _MxTrace
|
||
|
|
||
|
void _MxTrace(const char* format, ...);
|
||
|
int DebugHeapState();
|
||
|
|
||
|
#else
|
||
|
|
||
|
// If not debug, MxTrace is a no-op.
|
||
|
|
||
|
#ifdef COMPAT_MODE
|
||
|
|
||
|
// Use variadic args for macro (C99)
|
||
|
#define MxTrace(...)
|
||
|
|
||
|
#else
|
||
|
|
||
|
// MSVC 4.20 does not have variadic args for macros
|
||
|
#define MxTrace(args)
|
||
|
|
||
|
#endif // COMPAT_MODE
|
||
|
|
||
|
#endif // _DEBUG
|
||
|
|
||
|
#endif // MXDEBUG_H
|