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