update for HEAD-2003021201
[reactos.git] / include / msvcrt / msvcrtdbg.h
1 /*
2  * COPYRIGHT:       See COPYING in the top level directory
3  * PROJECT:         ReactOS kernel
4  * FILE:            include/msvcrt/msvcrtdbg.h
5  * PURPOSE:         Useful debugging macros
6  * PROGRAMMER:      
7  * UPDATE HISTORY: 
8  *                
9  */
10
11 /*
12  * NOTE: Define NDEBUG before including this header to disable debugging
13  * macros
14  */
15
16 #ifndef __MSVCRT_DEBUG
17 #define __MSVCRT_DEBUG
18
19 #include <roscfg.h>
20 #include <msvcrt/internal/file.h>
21
22 #if 0
23 #ifdef NDEBUG
24 #undef NDEBUG
25 #endif
26 #endif
27
28 #ifdef DBG
29 #define DPRINT1(args...) do { DbgPrint("(MSVCRT:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
30 #define CHECKPOINT1 do { DbgPrint("MSVCRT:%s:%d\n",__FILE__,__LINE__); } while(0);
31 #else
32 #ifdef __GNUC__
33 #define DPRINT1(args...)
34 #else
35 #define DPRINT DbgPrint
36 #endif
37 #define CHECKPOINT1
38 #endif
39
40 #if !defined(NDEBUG) && defined(DBG) 
41 #define DPRINT(args...) do { DbgPrint("(MSVCRT:%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0);
42 #define CHECKPOINT do { DbgPrint("MSVCRT:%s:%d\n",__FILE__,__LINE__); } while(0);
43 #else
44 #ifdef __GNUC__
45 #define DPRINT(args...)
46 #else
47 #define DPRINT DbgPrint
48 #endif
49 #define CHECKPOINT
50 #endif /* NDEBUG */
51
52 //ULONG CDECL DbgPrint(PCH Format, ...);
53 //ULONG DbgPrint(PCH Format,...);
54 //unsigned long DbgPrint(const char* Format, ...);
55
56
57
58 //#define TRACE 0 ? (void)0 : Trace
59
60 //void Trace(TCHAR* lpszFormat, ...);
61
62
63
64 #endif /* __MSVCRT_DEBUG */