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)))
90#define __WINE_DPRINTF(dbcl,dbch) \
91 do { if(__WINE_GET_DEBUGGING(dbcl,(dbch))) { \
92 struct __wine_debug_channel * const __dbch = (dbch); \
93 const enum __wine_debug_class __dbcl = __WINE_DBCL##dbcl; \
96#define __WINE_DBG_LOG(...) \
97 ros_dbg_log( __dbcl, __dbch, __RELFILE__, __FUNCTION__, __LINE__, __VA_ARGS__); } } while(0)
99#if !defined(__REACTOS__)
100#define __WINE_PRINTF_ATTR(fmt,args) __attribute__((format (printf,fmt,args)))
102#define __WINE_PRINTF_ATTR(fmt,args)
105#ifdef WINE_NO_TRACE_MSGS
106#define WINE_TRACE(...) do { } while(0)
107#define WINE_TRACE_(ch) WINE_TRACE
110#ifdef WINE_NO_DEBUG_MSGS
111#define WINE_WARN(...) do { } while(0)
112#define WINE_WARN_(ch) WINE_WARN
113#define WINE_FIXME(...) do { } while(0)
114#define WINE_FIXME_(ch) WINE_FIXME
130 unsigned char set,
unsigned char clear );
162#if defined(__hstring_h__) && defined(__WINSTRING_H_)
163static inline const char *wine_dbgstr_hstring(
HSTRING hstr )
173 if (!
id)
return "(null)";
175 return wine_dbg_sprintf(
"{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
176 id->Data1,
id->Data2,
id->Data3,
177 id->Data4[0],
id->Data4[1],
id->Data4[2],
id->Data4[3],
178 id->Data4[4],
id->Data4[5],
id->Data4[6],
id->Data4[7] );
183 if (!
pt)
return "(null)";
189 if (!
size)
return "(null)";
195 if (!
rect)
return "(null)";
207#if defined(__oaidl_h__) && defined(V_VT)
209static inline const char *wine_dbgstr_vt(
VARTYPE vt )
211 static const char *
const variant_types[] =
213 "VT_EMPTY",
"VT_NULL",
"VT_I2",
"VT_I4",
"VT_R4",
"VT_R8",
"VT_CY",
"VT_DATE",
214 "VT_BSTR",
"VT_DISPATCH",
"VT_ERROR",
"VT_BOOL",
"VT_VARIANT",
"VT_UNKNOWN",
215 "VT_DECIMAL",
"15",
"VT_I1",
"VT_UI1",
"VT_UI2",
"VT_UI4",
"VT_I8",
"VT_UI8",
216 "VT_INT",
"VT_UINT",
"VT_VOID",
"VT_HRESULT",
"VT_PTR",
"VT_SAFEARRAY",
217 "VT_CARRAY",
"VT_USERDEFINED",
"VT_LPSTR",
"VT_LPWSTR",
"32",
"33",
"34",
"35",
218 "VT_RECORD",
"VT_INT_PTR",
"VT_UINT_PTR",
"39",
"40",
"41",
"42",
"43",
"44",
"45",
219 "46",
"47",
"48",
"49",
"50",
"51",
"52",
"53",
"54",
"55",
"56",
"57",
"58",
"59",
"60",
220 "61",
"62",
"63",
"VT_FILETIME",
"VT_BLOB",
"VT_STREAM",
"VT_STORAGE",
221 "VT_STREAMED_OBJECT",
"VT_STORED_OBJECT",
"VT_BLOB_OBJECT",
"VT_CF",
"VT_CLSID",
222 "VT_VERSIONED_STREAM"
225 static const char *
const variant_flags[16] =
230 "|VT_VECTOR|VT_ARRAY",
232 "|VT_VECTOR|VT_BYREF",
233 "|VT_ARRAY|VT_BYREF",
234 "|VT_VECTOR|VT_ARRAY|VT_BYREF",
236 "|VT_VECTOR|VT_RESERVED",
237 "|VT_ARRAY|VT_RESERVED",
238 "|VT_VECTOR|VT_ARRAY|VT_RESERVED",
239 "|VT_BYREF|VT_RESERVED",
240 "|VT_VECTOR|VT_BYREF|VT_RESERVED",
241 "|VT_ARRAY|VT_BYREF|VT_RESERVED",
242 "|VT_VECTOR|VT_ARRAY|VT_BYREF|VT_RESERVED",
248 if (
vt <
sizeof(variant_types)/
sizeof(*variant_types))
249 return variant_types[
vt];
252 return "VT_BSTR_BLOB";
257static inline const char *wine_dbgstr_variant(
const VARIANT *
v )
328#define WINE_TRACE __WINE_DPRINTF(_TRACE,__wine_dbch___default)
329#define WINE_TRACE_(ch) __WINE_DPRINTF(_TRACE,&__wine_dbch_##ch)
331#define WINE_TRACE_ON(ch) __WINE_IS_DEBUG_ON(_TRACE,&__wine_dbch_##ch)
334#define WINE_WARN __WINE_DPRINTF(_WARN,__wine_dbch___default)
335#define WINE_WARN_(ch) __WINE_DPRINTF(_WARN,&__wine_dbch_##ch)
337#define WINE_WARN_ON(ch) __WINE_IS_DEBUG_ON(_WARN,&__wine_dbch_##ch)
340#define WINE_FIXME __WINE_DPRINTF(_FIXME,__wine_dbch___default)
341#define WINE_FIXME_(ch) __WINE_DPRINTF(_FIXME,&__wine_dbch_##ch)
343#define WINE_FIXME_ON(ch) __WINE_IS_DEBUG_ON(_FIXME,&__wine_dbch_##ch)
345#define WINE_ERR __WINE_DPRINTF(_ERR,__wine_dbch___default)
346#define WINE_ERR_(ch) __WINE_DPRINTF(_ERR,&__wine_dbch_##ch)
347#define WINE_ERR_ON(ch) __WINE_IS_DEBUG_ON(_ERR,&__wine_dbch_##ch)
349#define WINE_DECLARE_DEBUG_CHANNEL(ch) \
350 static struct __wine_debug_channel __wine_dbch_##ch = { (unsigned char)~0, #ch }
351#define WINE_DEFAULT_DEBUG_CHANNEL(ch) \
352 static struct __wine_debug_channel __wine_dbch_##ch = { (unsigned char)~0, #ch }; \
353 static struct __wine_debug_channel * const __wine_dbch___default = &__wine_dbch_##ch
355#define WINE_DPRINTF wine_dbg_printf
356#define WINE_MESSAGE wine_dbg_printf
366#if defined(__hstring_h__) && defined(__WINSTRING_H_)
367static inline const char *debugstr_hstring(
struct HSTRING__ *
s ) {
return wine_dbgstr_hstring(
s ); }
370#if defined(__oaidl_h__) && defined(V_VT)
375#define TRACE WINE_TRACE
376#define TRACE_(ch) WINE_TRACE_(ch)
377#define TRACE_ON(ch) WINE_TRACE_ON(ch)
379#define WARN WINE_WARN
380#define WARN_(ch) WINE_WARN_(ch)
381#define WARN_ON(ch) WINE_WARN_ON(ch)
383#define FIXME WINE_FIXME
384#define FIXME_(ch) WINE_FIXME_(ch)
385#define FIXME_ON(ch) WINE_FIXME_ON(ch)
389#define ERR_(ch) WINE_ERR_(ch)
390#define ERR_ON(ch) WINE_ERR_ON(ch)
392#define DPRINTF WINE_DPRINTF
393#define MESSAGE WINE_MESSAGE
LPCWSTR WINAPI WindowsGetStringRawBuffer(HSTRING str, UINT32 *len)
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static const char * debugstr_variant(const VARIANT *var)
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 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
void(*const release_temp_buffer)(char *buffer, size_t n)
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)
const char *(*const dbgstr_wn)(const WCHAR *s, int n)
const char *(*const dbgstr_an)(const char *s, int n)
int(*const dbg_vprintf)(const char *format, va_list args)
char *(*const get_temp_buffer)(size_t n)
#define __wine_dbg_get_channel_flags(channel)