mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-23 07:58:21 -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
|