32#define __RELFILE__ __FILE__
35#ifdef __WINE_WINE_TEST_H
36#error This file should not be used in Wine tests
66#define UNIMPLEMENTED WINE_FIXME("%s is UNIMPLEMENTED!\n", __FUNCTION__)
68#ifndef WINE_NO_TRACE_MSGS
69# define __WINE_GET_DEBUGGING_TRACE(dbch) ((dbch)->flags & (1 << __WINE_DBCL_TRACE))
71# define __WINE_GET_DEBUGGING_TRACE(dbch) 0
74#ifndef WINE_NO_DEBUG_MSGS
75# define __WINE_GET_DEBUGGING_WARN(dbch) ((dbch)->flags & (1 << __WINE_DBCL_WARN))
76# define __WINE_GET_DEBUGGING_FIXME(dbch) ((dbch)->flags & (1 << __WINE_DBCL_FIXME))
78# define __WINE_GET_DEBUGGING_WARN(dbch) 0
79# define __WINE_GET_DEBUGGING_FIXME(dbch) 0
83#define __WINE_GET_DEBUGGING_ERR(dbch) ((dbch)->flags & (1 << __WINE_DBCL_ERR))
85#define __WINE_GET_DEBUGGING(dbcl,dbch) __WINE_GET_DEBUGGING##dbcl(dbch)
87#define __WINE_IS_DEBUG_ON(dbcl,dbch) \
88 (__WINE_GET_DEBUGGING##dbcl(dbch) && (__wine_dbg_get_channel_flags(dbch) & (1 << __WINE_DBCL##dbcl)))
92#define __WINE_DPRINTF(dbcl,dbch) \
93 do { if(__WINE_GET_DEBUGGING(dbcl,(dbch))) { \
94 struct __wine_debug_channel * const __dbch = (dbch); \
95 const enum __wine_debug_class __dbcl = __WINE_DBCL##dbcl; \
98#define __WINE_DBG_LOG(args...) \
99 ros_dbg_log( __dbcl, __dbch, __RELFILE__, __FUNCTION__, __LINE__, args); } } while(0)
101#define __WINE_PRINTF_ATTR(fmt,args)
104#ifdef WINE_NO_TRACE_MSGS
105#define WINE_TRACE(args...) do { } while(0)
106#define WINE_TRACE_(ch) WINE_TRACE
109#ifdef WINE_NO_DEBUG_MSGS
110#define WINE_WARN(args...) do { } while(0)
111#define WINE_WARN_(ch) WINE_WARN
112#define WINE_FIXME(args...) do { } while(0)
113#define WINE_FIXME_(ch) WINE_FIXME
116#elif defined(__SUNPRO_C)
118#define __WINE_DPRINTF(dbcl,dbch) \
119 do { if(__WINE_GET_DEBUGGING(dbcl,(dbch))) { \
120 struct __wine_debug_channel * const __dbch = (dbch); \
121 const enum __WINE_DEBUG_CLASS __dbcl = __WINE_DBCL##dbcl; \
124#define __WINE_DBG_LOG(...) \
125 wine_dbg_log( __dbcl, __dbch, __func__, __VA_ARGS__); } } while(0)
127#define __WINE_PRINTF_ATTR(fmt,args)
129#ifdef WINE_NO_TRACE_MSGS
130#define WINE_TRACE(...) do { } while(0)
131#define WINE_TRACE_(ch) WINE_TRACE
134#ifdef WINE_NO_DEBUG_MSGS
135#define WINE_WARN(...) do { } while(0)
136#define WINE_WARN_(ch) WINE_WARN
137#define WINE_FIXME(...) do { } while(0)
138#define WINE_FIXME_(ch) WINE_FIXME
143#define __WINE_DPRINTF(dbcl,dbch) \
144 (!__WINE_GET_DEBUGGING(dbcl,(dbch)) || \
145 (ros_dbg_log(__WINE_DBCL##dbcl,(dbch),__RELFILE__,__FUNCTION__,__LINE__,"") == -1)) ? \
146 (void)0 : (void)wine_dbg_printf
148#define __WINE_PRINTF_ATTR(fmt, args)
154 char * (*get_temp_buffer)(
size_t n );
156 const char * (*dbgstr_an)(
const char *
s,
int n );
157 const char * (*dbgstr_wn)(
const WCHAR *
s,
int n );
165 unsigned char set,
unsigned char clear );
199 if (!
id)
return "(null)";
201 return wine_dbg_sprintf(
"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
202 id->Data1,
id->Data2,
id->Data3,
203 id->Data4[0],
id->Data4[1],
id->Data4[2],
id->Data4[3],
204 id->Data4[4],
id->Data4[5],
id->Data4[6],
id->Data4[7] );
209 if (!
pt)
return "(null)";
215 if (!
size)
return "(null)";
221 if (!
rect)
return "(null)";
233#if defined(__oaidl_h__) && defined(V_VT)
235static inline const char *wine_dbgstr_vt(
VARTYPE vt )
237 static const char *
const variant_types[] =
239 "VT_EMPTY",
"VT_NULL",
"VT_I2",
"VT_I4",
"VT_R4",
"VT_R8",
"VT_CY",
"VT_DATE",
240 "VT_BSTR",
"VT_DISPATCH",
"VT_ERROR",
"VT_BOOL",
"VT_VARIANT",
"VT_UNKNOWN",
241 "VT_DECIMAL",
"15",
"VT_I1",
"VT_UI1",
"VT_UI2",
"VT_UI4",
"VT_I8",
"VT_UI8",
242 "VT_INT",
"VT_UINT",
"VT_VOID",
"VT_HRESULT",
"VT_PTR",
"VT_SAFEARRAY",
243 "VT_CARRAY",
"VT_USERDEFINED",
"VT_LPSTR",
"VT_LPWSTR",
"32",
"33",
"34",
"35",
244 "VT_RECORD",
"VT_INT_PTR",
"VT_UINT_PTR",
"39",
"40",
"41",
"42",
"43",
"44",
"45",
245 "46",
"47",
"48",
"49",
"50",
"51",
"52",
"53",
"54",
"55",
"56",
"57",
"58",
"59",
"60",
246 "61",
"62",
"63",
"VT_FILETIME",
"VT_BLOB",
"VT_STREAM",
"VT_STORAGE",
247 "VT_STREAMED_OBJECT",
"VT_STORED_OBJECT",
"VT_BLOB_OBJECT",
"VT_CF",
"VT_CLSID",
248 "VT_VERSIONED_STREAM"
251 static const char *
const variant_flags[16] =
256 "|VT_VECTOR|VT_ARRAY",
258 "|VT_VECTOR|VT_BYREF",
259 "|VT_ARRAY|VT_BYREF",
260 "|VT_VECTOR|VT_ARRAY|VT_BYREF",
262 "|VT_VECTOR|VT_RESERVED",
263 "|VT_ARRAY|VT_RESERVED",
264 "|VT_VECTOR|VT_ARRAY|VT_RESERVED",
265 "|VT_BYREF|VT_RESERVED",
266 "|VT_VECTOR|VT_BYREF|VT_RESERVED",
267 "|VT_ARRAY|VT_BYREF|VT_RESERVED",
268 "|VT_VECTOR|VT_ARRAY|VT_BYREF|VT_RESERVED",
274 if (
vt <
sizeof(variant_types)/
sizeof(*variant_types))
275 return variant_types[
vt];
278 return "VT_BSTR_BLOB";
283static inline const char *wine_dbgstr_variant(
const VARIANT *
v )
354#define WINE_TRACE __WINE_DPRINTF(_TRACE,__wine_dbch___default)
355#define WINE_TRACE_(ch) __WINE_DPRINTF(_TRACE,&__wine_dbch_##ch)
357#define WINE_TRACE_ON(ch) __WINE_IS_DEBUG_ON(_TRACE,&__wine_dbch_##ch)
360#define WINE_WARN __WINE_DPRINTF(_WARN,__wine_dbch___default)
361#define WINE_WARN_(ch) __WINE_DPRINTF(_WARN,&__wine_dbch_##ch)
363#define WINE_WARN_ON(ch) __WINE_IS_DEBUG_ON(_WARN,&__wine_dbch_##ch)
366#define WINE_FIXME __WINE_DPRINTF(_FIXME,__wine_dbch___default)
367#define WINE_FIXME_(ch) __WINE_DPRINTF(_FIXME,&__wine_dbch_##ch)
369#define WINE_FIXME_ON(ch) __WINE_IS_DEBUG_ON(_FIXME,&__wine_dbch_##ch)
371#define WINE_ERR __WINE_DPRINTF(_ERR,__wine_dbch___default)
372#define WINE_ERR_(ch) __WINE_DPRINTF(_ERR,&__wine_dbch_##ch)
373#define WINE_ERR_ON(ch) __WINE_IS_DEBUG_ON(_ERR,&__wine_dbch_##ch)
375#define WINE_DECLARE_DEBUG_CHANNEL(ch) \
376 static struct __wine_debug_channel __wine_dbch_##ch = { (unsigned char)~0, #ch }
377#define WINE_DEFAULT_DEBUG_CHANNEL(ch) \
378 static struct __wine_debug_channel __wine_dbch_##ch = { (unsigned char)~0, #ch }; \
379 static struct __wine_debug_channel * const __wine_dbch___default = &__wine_dbch_##ch
381#define WINE_DPRINTF wine_dbg_printf
382#define WINE_MESSAGE wine_dbg_printf
392#if defined(__oaidl_h__) && defined(V_VT)
393static __inline
const char *debugstr_vt(
VARTYPE vt ) {
return wine_dbgstr_vt(
vt ); }
397#define TRACE WINE_TRACE
398#define TRACE_(ch) WINE_TRACE_(ch)
399#define TRACE_ON(ch) WINE_TRACE_ON(ch)
401#define WARN WINE_WARN
402#define WARN_(ch) WINE_WARN_(ch)
403#define WARN_ON(ch) WINE_WARN_ON(ch)
405#define FIXME WINE_FIXME
406#define FIXME_(ch) WINE_FIXME_(ch)
407#define FIXME_ON(ch) WINE_FIXME_ON(ch)
411#define ERR_(ch) WINE_ERR_(ch)
412#define ERR_ON(ch) WINE_ERR_ON(ch)
414#define DPRINTF WINE_DPRINTF
415#define MESSAGE WINE_MESSAGE
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
static const char * debugstr_variant(const VARIANT *var)
unsigned char __wine_dbg_get_channel_flags(struct __wine_debug_channel *channel)
int __wine_dbg_set_channel_flags(struct __wine_debug_channel *channel, unsigned char set, unsigned char clear)
const char * wine_dbgstr_an(const char *s, int n)
const char int int int ros_dbg_log(enum __wine_debug_class cls, struct __wine_debug_channel *ch, const char *file, const char *func, const int line, const char *format,...) __WINE_PRINTF_ATTR(6
static __inline const char * wine_dbgstr_point(const POINT *pt)
static __inline const char * debugstr_an(const char *s, int n)
const char * wine_dbg_sprintf(const char *format,...) __WINE_PRINTF_ATTR(1
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define __WINE_PRINTF_ATTR(fmt, args)
static __inline const char * wine_dbgstr_size(const SIZE *size)
static __inline const char * wine_dbgstr_rect(const RECT *rect)
const char int int int static __inline const char * wine_dbgstr_a(const char *s)
static __inline const char * wine_dbgstr_guid(const GUID *id)
void __wine_dbg_set_functions(const struct __wine_debug_functions *new_funcs, struct __wine_debug_functions *old_funcs, size_t size)
const char * wine_dbgstr_wn(const WCHAR *s, int n)
const char int int wine_dbg_log(enum __wine_debug_class cls, struct __wine_debug_channel *ch, const char *func, const char *format,...) __WINE_PRINTF_ATTR(4
const char int wine_dbg_printf(const char *format,...) __WINE_PRINTF_ATTR(1
int(* dbg_vprintf)(const char *format, va_list args)
int(* dbg_vlog)(enum __wine_debug_class cls, struct __wine_debug_channel *channel, const char *file, const char *function, const int line, const char *format, va_list args)
void(* release_temp_buffer)(char *buffer, size_t n)