Updated German translation
[dasher.git] / Src / Common / Trace.cpp
blob3024693bacbbbc67e81635e3a567b09b4a780fff
1 // Trace.cpp
2 //
3 // Copyright (c) 2005 David Ward
5 #include "Common.h"
7 #include "Trace.h"
9 // Track memory leaks on Windows to the line that new'd the memory
10 #ifdef _WIN32
11 #ifdef _DEBUG
12 #define DEBUG_NEW new( _NORMAL_BLOCK, THIS_FILE, __LINE__ )
13 #define new DEBUG_NEW
14 #undef THIS_FILE
15 static char THIS_FILE[] = __FILE__;
16 #endif
17 #endif
19 // Customize behaviour of Trace here
21 #ifdef _WIN32
23 // On Windows, send Trace to the Debug window in DevStudio
24 // The ATL/MFC Trace application also picks up Trace when running
26 #include "Windows.h"
28 void DasherTraceOutputImpl(const char *pszFormat, va_list vargs) {
29 // TODO: Reimplement
30 // char buffer[2048];
31 // _vsnprintf(buffer, 2048,pszFormat, vargs);
32 // OutputDebugStringA(buffer);
35 #else
37 // Send Trace to stdout
39 void DasherTraceOutputImpl(const char *pszFormat, va_list vargs) {
40 vfprintf(stdout, pszFormat, vargs);
43 #endif