- Some small fixes on debugging macros.
[reactos.git] / reactos / include / wine / debug.h
1 #ifndef __WINE_DEBUG_H
2 #define __WINE_DEBUG_H
3
4 #include "../roscfg.h"
5 #ifndef DBG
6 #define NDEBUG
7 #endif
8 #include "../debug.h"
9 #include <stdarg.h>
10 #include <wchar.h>
11
12 ULONG DbgPrint(PCH Format,...);
13
14 struct _GUID;
15
16 /* Exported definitions and macros */
17
18 /* These function return a printable version of a string, including
19 quotes. The string will be valid for some time, but not indefinitely
20 as strings are re-used. */
21 extern const char *wine_dbgstr_an( const char * s, int n );
22 extern const char *wine_dbgstr_wn( const WCHAR *s, int n );
23 extern const char *wine_dbgstr_guid( const struct _GUID *id );
24
25 inline static const char *debugstr_an( const char * s, int n ) { return wine_dbgstr_an( s, n ); }
26 inline static const char *debugstr_wn( const WCHAR *s, int n ) { return wine_dbgstr_wn( s, n ); }
27 inline static const char *debugstr_guid( const struct _GUID *id ) { return wine_dbgstr_guid(id); }
28 inline static const char *debugstr_a( const char *s ) { return wine_dbgstr_an( s, 80 ); }
29 inline static const char *debugstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, 80 ); }
30 inline static const char *debugres_a( const char *s ) { return wine_dbgstr_an( s, 80 ); }
31 inline static const char *debugres_w( const WCHAR *s ) { return wine_dbgstr_wn( s, 80 ); }
32
33 #define TRACE DPRINT
34 #define TRACE_(ch) DPRINT
35 #ifdef NDEBUG
36 #define TRACE_ON(ch) 0
37 #else
38 #define TRACE_ON(ch) 1
39 #endif
40
41 #define WARN DPRINT
42 #define WARN_(ch) DPRINT
43 #ifdef NDEBUG
44 #define WARN_ON(ch) 0
45 #else
46 #define WARN_ON(ch) 1
47 #endif
48
49 #define FIXME DPRINT1
50 #define FIXME_(ch) DPRINT1
51 #ifdef NDEBUG
52 #define FIXME_ON(ch) 0
53 #else
54 #define FIXME_ON(ch) 1
55 #endif
56
57 #define ERR DPRINT
58 #define ERR_(ch) DPRINT
59 #ifdef NDEBUG
60 #define ERR_ON(ch) 0
61 #else
62 #define ERR_ON(ch) 1
63 #endif
64
65 #define DECLARE_DEBUG_CHANNEL(ch)
66 #define DEFAULT_DEBUG_CHANNEL(ch)
67
68 #define WINE_DECLARE_DEBUG_CHANNEL(ch) DECLARE_DEBUG_CHANNEL(ch)
69 #define WINE_DEFAULT_DEBUG_CHANNEL(ch) DEFAULT_DEBUG_CHANNEL(ch)
70
71 #define DPRINTF DPRINT
72 #define MESSAGE DPRINT
73
74 #endif /* __WINE_DEBUG_H */