#include <tchar.h>
#ifdef _DEBUG
#ifdef _MFC_DEBUG
#include <afx.h>
#else
#include <windows.h>
#if defined(_DEBUG)
#define _MFC_OVERRIDES_NEW
#include <crtdbg.h>
extern void* __cdecl operator new(size_t nSize, int nType, LPCSTR lpszFileName, int nLine);
extern void* _cdecl operator new(size_t nSize, LPCSTR lpszFileName, int nLine);
#define DEBUG_NEW new(THIS_FILE, __LINE__)
#if _MSC_VER >= 1200
extern void _cdecl operator delete(void* p, LPCSTR lpszFileName, int nLine);
#endif
#endif
#endif
#endif
#ifndef TRACE
#define ASSERT(x) {if(!(x)) DebugBreak();}
#define VERIFY(x) {if(!(x)) DebugBreak();}
#define TRACE OutputDebugStringHlp
extern void OutputDebugStringHlp(LPCTSTR lpszFormat, ...);
#endif
// _COMMON_CPP is defined by common.cpp
#ifdef _COMMON_CPP
#include <stdarg.h>
void OutputDebugStringHlp(LPCTSTR lpszFormat, ...)
{
static TCHAR szTemp[2048];
va_list vaptr;
va_start(vaptr,lpszFormat);
_vstprintf(szTemp,lpszFormat,vaptr);
va_end(vaptr);
OutputDebugString(szTemp);
}
#endif