10 #define __FUNCTION__ ""
11 #define inline __inline
14 unsigned long DbgPrint(char *Format
,...);
17 #define DPRINT1 DbgPrint("(%s:%d:%s) ",__FILE__,__LINE__,__FUNCTION__), DbgPrint
22 #if !defined(DBG) || !defined(YDEBUG)
23 #define DPRINT(...) do { if(0) { DbgPrint(__VA_ARGS__); } } while(0)
25 #define DPRINT DbgPrint("(%s:%d:%s) ",__FILE__,__LINE__,__FUNCTION__), DbgPrint
28 #define UNIMPLEMENTED DbgPrint("WARNING: %s at %s:%d is UNIMPLEMENTED!\n",__FUNCTION__,__FILE__,__LINE__);
33 /* Exported definitions and macros */
35 /* These function return a printable version of a string, including
36 quotes. The string will be valid for some time, but not indefinitely
37 as strings are re-used. */
38 extern const char *wine_dbgstr_an( const char * s
, int n
);
39 extern const char *wine_dbgstr_wn( const wchar_t *s
, int n
);
40 extern const char *wine_dbgstr_guid( const struct _GUID
*id
);
41 extern const char *wine_dbgstr_longlong( unsigned long long ll
);
42 extern const char *wine_dbg_sprintf( const char *format
, ... );
44 inline static const char *debugstr_an( const char * s
, int n
) { return wine_dbgstr_an( s
, n
); }
45 inline static const char *debugstr_wn( const wchar_t *s
, int n
) { return wine_dbgstr_wn( s
, n
); }
46 inline static const char *debugstr_guid( const struct _GUID
*id
) { return wine_dbgstr_guid(id
); }
47 inline static const char *debugstr_a( const char *s
) { return wine_dbgstr_an( s
, 80 ); }
48 inline static const char *debugstr_w( const wchar_t *s
) { return wine_dbgstr_wn( s
, 80 ); }
49 inline static const char *debugres_a( const char *s
) { return wine_dbgstr_an( s
, 80 ); }
50 inline static const char *debugres_w( const wchar_t *s
) { return wine_dbgstr_wn( s
, 80 ); }
52 static inline const char *wine_dbgstr_point( const POINT
*pt
)
54 if (!pt
) return "(null)";
55 return wine_dbg_sprintf( "(%ld,%ld)", pt
->x
, pt
->y
);
58 static inline const char *wine_dbgstr_size( const SIZE
*size
)
60 if (!size
) return "(null)";
61 return wine_dbg_sprintf( "(%ld,%ld)", size
->cx
, size
->cy
);
64 static inline const char *wine_dbgstr_rect( const RECT
*rect
)
66 if (!rect
) return "(null)";
67 return wine_dbg_sprintf( "(%ld,%ld)-(%ld,%ld)", rect
->left
, rect
->top
, rect
->right
, rect
->bottom
);
71 #define TRACE_(ch) DPRINT
73 #define TRACE_ON(ch) 0
75 #define TRACE_ON(ch) 1
78 #define WINE_TRACE DPRINT
79 #define WINE_TRACE_(ch) DPRINT
81 #define WINE_TRACE_ON(ch) 0
83 #define WINE_TRACE_ON(ch) 1
87 #define WARN_(ch) DPRINT
98 #define FIXME_(ch) DPRINT1
100 #define FIXME_ON(ch) 0
102 #define FIXME_ON(ch) 1
108 #define WINE_FIXME DPRINT1
109 #define WINE_FIXME_(ch) DPRINT1
111 #define WINE_FIXME_ON(ch) 0
113 #define WINE_FIXME_ON(ch) 1
117 #define ERR_(ch) DPRINT1
124 #define WINE_ERR DPRINT1
125 #define WINE_ERR_(ch) DPRINT1
127 #define WINE_ERR_ON(ch) 0
129 #define WINE_ERR_ON(ch) 1
132 #define DECLARE_DEBUG_CHANNEL(ch)
133 #define DEFAULT_DEBUG_CHANNEL(ch)
135 #define WINE_DECLARE_DEBUG_CHANNEL(ch) DECLARE_DEBUG_CHANNEL(ch)
136 #define WINE_DEFAULT_DEBUG_CHANNEL(ch) DEFAULT_DEBUG_CHANNEL(ch)
138 #define DPRINTF DPRINT
139 #define MESSAGE DPRINT
141 #endif /* __WINE_DEBUG_H */