Patch from Filip Navara updating comctl32
[reactos.git] / reactos / lib / winedbgc / trace.h
1 /////////////////////////////////////////////////////////////////////////////
2 //
3 #ifndef __TRACE_H__
4 #define __TRACE_H__
5
6 #ifdef _DEBUG
7
8 //=============================================================================
9 // BreakPoint() macro.
10 //=============================================================================
11
12 #ifdef _X86_
13 #define BreakPoint() _asm { int 3h }
14 #else
15 #define BreakPoint() _DebugBreak()
16 #endif
17
18 //=============================================================================
19 // MACRO: ASSERT()
20 //=============================================================================
21
22 #ifndef ASSERT
23 #define ASSERT(exp) \
24 { \
25 if ( !(exp) ) \
26 { \
27 Assert(#exp, __FILE__, __LINE__, NULL); \
28 BreakPoint(); \
29 } \
30 } \
31
32 #define ASSERTMSG(exp, msg) \
33 { \
34 if ( !(exp) ) \
35 { \
36 Assert(#exp, __FILE__, __LINE__, msg); \
37 BreakPoint(); \
38 } \
39 }
40 #endif
41
42 //=============================================================================
43 // MACRO: TRACE()
44 //=============================================================================
45
46 void Assert(void* assert, TCHAR* file, int line, void* msg);
47 void Trace(TCHAR* lpszFormat, ...);
48 void Trace1(int code, TCHAR* lpszFormat, ...);
49
50 #else // _DEBUG
51
52 #ifndef ASSERT
53 #define ASSERT(exp)
54 #define ASSERTMSG(exp, msg)
55 #endif
56
57 void Assert(void* assert, TCHAR* file, int line, void* msg);
58 void Trace(TCHAR* lpszFormat, ...);
59
60 #endif // !_DEBUG
61
62 #endif // __TRACE_H__
63 /////////////////////////////////////////////////////////////////////////////