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] );
182static inline const char *wine_dbgstr_fourcc(
unsigned int fourcc )
184 char str[4] = { (
char)fourcc, (
char)(fourcc >> 8), (
char)(fourcc >> 16), (
char)(fourcc >> 24) };
195 if (!
pt)
return "(null)";
201 if (!
size)
return "(null)";
207 if (!
rect)
return "(null)";
219#if defined(__oaidl_h__) && defined(V_VT)
221static inline const char *wine_dbgstr_vt(
VARTYPE vt )
223 static const char *
const variant_types[] =
225 "VT_EMPTY",
"VT_NULL",
"VT_I2",
"VT_I4",
"VT_R4",
"VT_R8",
"VT_CY",
"VT_DATE",
226 "VT_BSTR",
"VT_DISPATCH",
"VT_ERROR",
"VT_BOOL",
"VT_VARIANT",
"VT_UNKNOWN",
227 "VT_DECIMAL",
"15",
"VT_I1",
"VT_UI1",
"VT_UI2",
"VT_UI4",
"VT_I8",
"VT_UI8",
228 "VT_INT",
"VT_UINT",
"VT_VOID",
"VT_HRESULT",
"VT_PTR",
"VT_SAFEARRAY",
229 "VT_CARRAY",
"VT_USERDEFINED",
"VT_LPSTR",
"VT_LPWSTR",
"32",
"33",
"34",
"35",
230 "VT_RECORD",
"VT_INT_PTR",
"VT_UINT_PTR",
"39",
"40",
"41",
"42",
"43",
"44",
"45",
231 "46",
"47",
"48",
"49",
"50",
"51",
"52",
"53",
"54",
"55",
"56",
"57",
"58",
"59",
"60",
232 "61",
"62",
"63",
"VT_FILETIME",
"VT_BLOB",
"VT_STREAM",
"VT_STORAGE",
233 "VT_STREAMED_OBJECT",
"VT_STORED_OBJECT",
"VT_BLOB_OBJECT",
"VT_CF",
"VT_CLSID",
234 "VT_VERSIONED_STREAM"
237 static const char *
const variant_flags[16] =
242 "|VT_VECTOR|VT_ARRAY",
244 "|VT_VECTOR|VT_BYREF",
245 "|VT_ARRAY|VT_BYREF",
246 "|VT_VECTOR|VT_ARRAY|VT_BYREF",
248 "|VT_VECTOR|VT_RESERVED",
249 "|VT_ARRAY|VT_RESERVED",
250 "|VT_VECTOR|VT_ARRAY|VT_RESERVED",
251 "|VT_BYREF|VT_RESERVED",
252 "|VT_VECTOR|VT_BYREF|VT_RESERVED",
253 "|VT_ARRAY|VT_BYREF|VT_RESERVED",
254 "|VT_VECTOR|VT_ARRAY|VT_BYREF|VT_RESERVED",
260 if (
vt <
sizeof(variant_types)/
sizeof(*variant_types))
261 return variant_types[
vt];
264 return "VT_BSTR_BLOB";
269static inline const char *wine_dbgstr_variant(
const VARIANT *
v )
340#define WINE_TRACE __WINE_DPRINTF(_TRACE,__wine_dbch___default)
341#define WINE_TRACE_(ch) __WINE_DPRINTF(_TRACE,&__wine_dbch_##ch)
343#define WINE_TRACE_ON(ch) __WINE_IS_DEBUG_ON(_TRACE,&__wine_dbch_##ch)
346#define WINE_WARN __WINE_DPRINTF(_WARN,__wine_dbch___default)
347#define WINE_WARN_(ch) __WINE_DPRINTF(_WARN,&__wine_dbch_##ch)
349#define WINE_WARN_ON(ch) __WINE_IS_DEBUG_ON(_WARN,&__wine_dbch_##ch)
352#define WINE_FIXME __WINE_DPRINTF(_FIXME,__wine_dbch___default)
353#define WINE_FIXME_(ch) __WINE_DPRINTF(_FIXME,&__wine_dbch_##ch)
355#define WINE_FIXME_ON(ch) __WINE_IS_DEBUG_ON(_FIXME,&__wine_dbch_##ch)
357#define WINE_ERR __WINE_DPRINTF(_ERR,__wine_dbch___default)
358#define WINE_ERR_(ch) __WINE_DPRINTF(_ERR,&__wine_dbch_##ch)
359#define WINE_ERR_ON(ch) __WINE_IS_DEBUG_ON(_ERR,&__wine_dbch_##ch)
361#define WINE_DECLARE_DEBUG_CHANNEL(ch) \
362 static struct __wine_debug_channel __wine_dbch_##ch = { (unsigned char)~0, #ch }
363#define WINE_DEFAULT_DEBUG_CHANNEL(ch) \
364 static struct __wine_debug_channel __wine_dbch_##ch = { (unsigned char)~0, #ch }; \
365 static struct __wine_debug_channel * const __wine_dbch___default = &__wine_dbch_##ch
367#define WINE_DPRINTF wine_dbg_printf
368#define WINE_MESSAGE wine_dbg_printf
376static inline const char *debugstr_fourcc(
unsigned int cc ) {
return wine_dbgstr_fourcc(
cc ); }
381#if defined(__hstring_h__) && defined(__WINSTRING_H_)
382static inline const char *debugstr_hstring(
struct HSTRING__ *
s ) {
return wine_dbgstr_hstring(
s ); }
385#if defined(__oaidl_h__) && defined(V_VT)
390#define TRACE WINE_TRACE
391#define TRACE_(ch) WINE_TRACE_(ch)
392#define TRACE_ON(ch) WINE_TRACE_ON(ch)
394#define WARN WINE_WARN
395#define WARN_(ch) WINE_WARN_(ch)
396#define WARN_ON(ch) WINE_WARN_ON(ch)
398#define FIXME WINE_FIXME
399#define FIXME_(ch) WINE_FIXME_(ch)
400#define FIXME_ON(ch) WINE_FIXME_ON(ch)
404#define ERR_(ch) WINE_ERR_(ch)
405#define ERR_ON(ch) WINE_ERR_ON(ch)
407#define DPRINTF WINE_DPRINTF
408#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)