ReactOS 0.4.17-dev-966-gf06eace
debug.h File Reference
#include <ctype.h>
#include <stdarg.h>
#include <stdio.h>
#include <windef.h>
#include <guiddef.h>
Include dependency graph for debug.h:

Go to the source code of this file.

Classes

struct  __wine_debug_channel
 
struct  __wine_debug_functions
 

Macros

#define __RELFILE__   __FILE__
 
#define UNIMPLEMENTED   WINE_FIXME("%s is UNIMPLEMENTED!\n", __FUNCTION__)
 
#define __WINE_GET_DEBUGGING_TRACE(dbch)   ((dbch)->flags & (1 << __WINE_DBCL_TRACE))
 
#define __WINE_GET_DEBUGGING_WARN(dbch)   ((dbch)->flags & (1 << __WINE_DBCL_WARN))
 
#define __WINE_GET_DEBUGGING_FIXME(dbch)   ((dbch)->flags & (1 << __WINE_DBCL_FIXME))
 
#define __WINE_GET_DEBUGGING_ERR(dbch)   ((dbch)->flags & (1 << __WINE_DBCL_ERR))
 
#define __WINE_GET_DEBUGGING(dbcl, dbch)   __WINE_GET_DEBUGGING##dbcl(dbch)
 
#define __WINE_IS_DEBUG_ON(dbcl, dbch)    (__WINE_GET_DEBUGGING##dbcl(dbch) && (__wine_dbg_get_channel_flags(dbch) & (1 << __WINE_DBCL##dbcl)))
 
#define __WINE_DPRINTF(dbcl, dbch)
 
#define __WINE_DBG_LOG(...)    ros_dbg_log( __dbcl, __dbch, __RELFILE__, __FUNCTION__, __LINE__, __VA_ARGS__); } } while(0)
 
#define __WINE_PRINTF_ATTR(fmt, args)   __attribute__((format (printf,fmt,args)))
 
#define WINE_TRACE   __WINE_DPRINTF(_TRACE,__wine_dbch___default)
 
#define WINE_TRACE_(ch)   __WINE_DPRINTF(_TRACE,&__wine_dbch_##ch)
 
#define WINE_TRACE_ON(ch)   __WINE_IS_DEBUG_ON(_TRACE,&__wine_dbch_##ch)
 
#define WINE_WARN   __WINE_DPRINTF(_WARN,__wine_dbch___default)
 
#define WINE_WARN_(ch)   __WINE_DPRINTF(_WARN,&__wine_dbch_##ch)
 
#define WINE_WARN_ON(ch)   __WINE_IS_DEBUG_ON(_WARN,&__wine_dbch_##ch)
 
#define WINE_FIXME   __WINE_DPRINTF(_FIXME,__wine_dbch___default)
 
#define WINE_FIXME_(ch)   __WINE_DPRINTF(_FIXME,&__wine_dbch_##ch)
 
#define WINE_FIXME_ON(ch)   __WINE_IS_DEBUG_ON(_FIXME,&__wine_dbch_##ch)
 
#define WINE_ERR   __WINE_DPRINTF(_ERR,__wine_dbch___default)
 
#define WINE_ERR_(ch)   __WINE_DPRINTF(_ERR,&__wine_dbch_##ch)
 
#define WINE_ERR_ON(ch)   __WINE_IS_DEBUG_ON(_ERR,&__wine_dbch_##ch)
 
#define WINE_DECLARE_DEBUG_CHANNEL(ch)    static struct __wine_debug_channel __wine_dbch_##ch = { (unsigned char)~0, #ch }
 
#define WINE_DEFAULT_DEBUG_CHANNEL(ch)
 
#define WINE_DPRINTF   wine_dbg_printf
 
#define WINE_MESSAGE   wine_dbg_printf
 
#define TRACE   WINE_TRACE
 
#define TRACE_(ch)   WINE_TRACE_(ch)
 
#define TRACE_ON(ch)   WINE_TRACE_ON(ch)
 
#define WARN   WINE_WARN
 
#define WARN_(ch)   WINE_WARN_(ch)
 
#define WARN_ON(ch)   WINE_WARN_ON(ch)
 
#define FIXME   WINE_FIXME
 
#define FIXME_(ch)   WINE_FIXME_(ch)
 
#define FIXME_ON(ch)   WINE_FIXME_ON(ch)
 
#define ERR   WINE_ERR
 
#define ERR_(ch)   WINE_ERR_(ch)
 
#define ERR_ON(ch)   WINE_ERR_ON(ch)
 
#define DPRINTF   WINE_DPRINTF
 
#define MESSAGE   WINE_MESSAGE
 

Enumerations

enum  __wine_debug_class {
  __WINE_DBCL_FIXME = 0 , __WINE_DBCL_ERR = 1 , __WINE_DBCL_WARN = 2 , __WINE_DBCL_TRACE = 3 ,
  __WINE_DBCL_INIT = 0x7
}
 

Functions

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)
 
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_an (const char *s, int n)
 
const char * wine_dbgstr_wn (const WCHAR *s, int n)
 
const char * wine_dbg_sprintf (const char *format,...) __WINE_PRINTF_ATTR(1
 
const char int wine_dbg_printf (const char *format,...) __WINE_PRINTF_ATTR(1
 
const char int int __cdecl __wine_dbg_output (const char *str)
 
int wine_dbg_log (enum __wine_debug_class cls, struct __wine_debug_channel *ch, const char *func, const char *format,...) __WINE_PRINTF_ATTR(4
 
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
 
int int static __inline const char * wine_dbgstr_a (const char *s)
 
static __inline const char * wine_dbgstr_w (const WCHAR *s)
 
static __inline const char * wine_dbgstr_guid (const GUID *id)
 
static __inline const char * wine_dbgstr_point (const POINT *pt)
 
static __inline const char * wine_dbgstr_size (const SIZE *size)
 
static __inline const char * wine_dbgstr_rect (const RECT *rect)
 
static __inline const char * wine_dbgstr_longlong (ULONGLONG ll)
 
static __inline const char * debugstr_an (const char *s, int n)
 
static __inline const char * debugstr_wn (const WCHAR *s, int n)
 
static __inline const char * debugstr_guid (const struct _GUID *id)
 
static __inline const char * debugstr_a (const char *s)
 
static __inline const char * debugstr_w (const WCHAR *s)
 
static __inline const char * debugstr_fourcc (unsigned int cc)
 

Macro Definition Documentation

◆ __RELFILE__

#define __RELFILE__   __FILE__

Definition at line 33 of file debug.h.

◆ __WINE_DBG_LOG

#define __WINE_DBG_LOG (   ...)     ros_dbg_log( __dbcl, __dbch, __RELFILE__, __FUNCTION__, __LINE__, __VA_ARGS__); } } while(0)

Definition at line 98 of file debug.h.

◆ __WINE_DPRINTF

#define __WINE_DPRINTF (   dbcl,
  dbch 
)
Value:
do { if(__WINE_GET_DEBUGGING(dbcl,(dbch))) { \
struct __wine_debug_channel * const __dbch = (dbch); \
const enum __wine_debug_class __dbcl = __WINE_DBCL##dbcl; \
__wine_debug_class
Definition: debug.h:52
#define __WINE_DBG_LOG(...)
Definition: debug.h:98
#define __WINE_GET_DEBUGGING(dbcl, dbch)
Definition: debug.h:87

Definition at line 92 of file debug.h.

◆ __WINE_GET_DEBUGGING

#define __WINE_GET_DEBUGGING (   dbcl,
  dbch 
)    __WINE_GET_DEBUGGING##dbcl(dbch)

Definition at line 87 of file debug.h.

◆ __WINE_GET_DEBUGGING_ERR

#define __WINE_GET_DEBUGGING_ERR (   dbch)    ((dbch)->flags & (1 << __WINE_DBCL_ERR))

Definition at line 85 of file debug.h.

◆ __WINE_GET_DEBUGGING_FIXME

#define __WINE_GET_DEBUGGING_FIXME (   dbch)    ((dbch)->flags & (1 << __WINE_DBCL_FIXME))

Definition at line 78 of file debug.h.

◆ __WINE_GET_DEBUGGING_TRACE

#define __WINE_GET_DEBUGGING_TRACE (   dbch)    ((dbch)->flags & (1 << __WINE_DBCL_TRACE))

Definition at line 71 of file debug.h.

◆ __WINE_GET_DEBUGGING_WARN

#define __WINE_GET_DEBUGGING_WARN (   dbch)    ((dbch)->flags & (1 << __WINE_DBCL_WARN))

Definition at line 77 of file debug.h.

◆ __WINE_IS_DEBUG_ON

#define __WINE_IS_DEBUG_ON (   dbcl,
  dbch 
)     (__WINE_GET_DEBUGGING##dbcl(dbch) && (__wine_dbg_get_channel_flags(dbch) & (1 << __WINE_DBCL##dbcl)))

Definition at line 89 of file debug.h.

◆ __WINE_PRINTF_ATTR

#define __WINE_PRINTF_ATTR (   fmt,
  args 
)    __attribute__((format (printf,fmt,args)))

Definition at line 103 of file debug.h.

◆ DPRINTF

#define DPRINTF   WINE_DPRINTF

Definition at line 425 of file debug.h.

◆ ERR

#define ERR   WINE_ERR

Definition at line 421 of file debug.h.

◆ ERR_

#define ERR_ (   ch)    WINE_ERR_(ch)

Definition at line 422 of file debug.h.

◆ ERR_ON

#define ERR_ON (   ch)    WINE_ERR_ON(ch)

Definition at line 423 of file debug.h.

◆ FIXME

#define FIXME   WINE_FIXME

Definition at line 416 of file debug.h.

◆ FIXME_

#define FIXME_ (   ch)    WINE_FIXME_(ch)

Definition at line 417 of file debug.h.

◆ FIXME_ON

#define FIXME_ON (   ch)    WINE_FIXME_ON(ch)

Definition at line 418 of file debug.h.

◆ MESSAGE

#define MESSAGE   WINE_MESSAGE

Definition at line 426 of file debug.h.

◆ TRACE

#define TRACE   WINE_TRACE

Definition at line 408 of file debug.h.

◆ TRACE_

#define TRACE_ (   ch)    WINE_TRACE_(ch)

Definition at line 409 of file debug.h.

◆ TRACE_ON

#define TRACE_ON (   ch)    WINE_TRACE_ON(ch)

Definition at line 410 of file debug.h.

◆ UNIMPLEMENTED

#define UNIMPLEMENTED   WINE_FIXME("%s is UNIMPLEMENTED!\n", __FUNCTION__)

Definition at line 68 of file debug.h.

◆ WARN

#define WARN   WINE_WARN

Definition at line 412 of file debug.h.

◆ WARN_

#define WARN_ (   ch)    WINE_WARN_(ch)

Definition at line 413 of file debug.h.

◆ WARN_ON

#define WARN_ON (   ch)    WINE_WARN_ON(ch)

Definition at line 414 of file debug.h.

◆ WINE_DECLARE_DEBUG_CHANNEL

#define WINE_DECLARE_DEBUG_CHANNEL (   ch)     static struct __wine_debug_channel __wine_dbch_##ch = { (unsigned char)~0, #ch }

Definition at line 378 of file debug.h.

◆ WINE_DEFAULT_DEBUG_CHANNEL

#define WINE_DEFAULT_DEBUG_CHANNEL (   ch)
Value:
static struct __wine_debug_channel __wine_dbch_##ch = { (unsigned char)~0, #ch }; \
static struct __wine_debug_channel * const __wine_dbch___default = &__wine_dbch_##ch
unsigned char ch[4][2]
Definition: console.c:118
unsigned char
Definition: typeof.h:29

Definition at line 380 of file debug.h.

◆ WINE_DPRINTF

#define WINE_DPRINTF   wine_dbg_printf

Definition at line 384 of file debug.h.

◆ WINE_ERR

#define WINE_ERR   __WINE_DPRINTF(_ERR,__wine_dbch___default)

Definition at line 374 of file debug.h.

◆ WINE_ERR_

#define WINE_ERR_ (   ch)    __WINE_DPRINTF(_ERR,&__wine_dbch_##ch)

Definition at line 375 of file debug.h.

◆ WINE_ERR_ON

#define WINE_ERR_ON (   ch)    __WINE_IS_DEBUG_ON(_ERR,&__wine_dbch_##ch)

Definition at line 376 of file debug.h.

◆ WINE_FIXME

#define WINE_FIXME   __WINE_DPRINTF(_FIXME,__wine_dbch___default)

Definition at line 369 of file debug.h.

◆ WINE_FIXME_

#define WINE_FIXME_ (   ch)    __WINE_DPRINTF(_FIXME,&__wine_dbch_##ch)

Definition at line 370 of file debug.h.

◆ WINE_FIXME_ON

#define WINE_FIXME_ON (   ch)    __WINE_IS_DEBUG_ON(_FIXME,&__wine_dbch_##ch)

Definition at line 372 of file debug.h.

◆ WINE_MESSAGE

#define WINE_MESSAGE   wine_dbg_printf

Definition at line 385 of file debug.h.

◆ WINE_TRACE

#define WINE_TRACE   __WINE_DPRINTF(_TRACE,__wine_dbch___default)

Definition at line 357 of file debug.h.

◆ WINE_TRACE_

#define WINE_TRACE_ (   ch)    __WINE_DPRINTF(_TRACE,&__wine_dbch_##ch)

Definition at line 358 of file debug.h.

◆ WINE_TRACE_ON

#define WINE_TRACE_ON (   ch)    __WINE_IS_DEBUG_ON(_TRACE,&__wine_dbch_##ch)

Definition at line 360 of file debug.h.

◆ WINE_WARN

#define WINE_WARN   __WINE_DPRINTF(_WARN,__wine_dbch___default)

Definition at line 363 of file debug.h.

◆ WINE_WARN_

#define WINE_WARN_ (   ch)    __WINE_DPRINTF(_WARN,&__wine_dbch_##ch)

Definition at line 364 of file debug.h.

◆ WINE_WARN_ON

#define WINE_WARN_ON (   ch)    __WINE_IS_DEBUG_ON(_WARN,&__wine_dbch_##ch)

Definition at line 366 of file debug.h.

Enumeration Type Documentation

◆ __wine_debug_class

Enumerator
__WINE_DBCL_FIXME 
__WINE_DBCL_ERR 
__WINE_DBCL_WARN 
__WINE_DBCL_TRACE 
__WINE_DBCL_INIT 

Definition at line 51 of file debug.h.

52{
53 __WINE_DBCL_FIXME = 0, /* 0x1 */
54 __WINE_DBCL_ERR = 1, /* 0x2 */
55 __WINE_DBCL_WARN = 2, /* 0x4 */
56 __WINE_DBCL_TRACE = 3, /* 0x8 */
57
58 /* lazy init flag */
60};
@ __WINE_DBCL_ERR
Definition: debug.h:54
@ __WINE_DBCL_TRACE
Definition: debug.h:56
@ __WINE_DBCL_INIT
Definition: debug.h:59
@ __WINE_DBCL_FIXME
Definition: debug.h:53
@ __WINE_DBCL_WARN
Definition: debug.h:55

Function Documentation

◆ __wine_dbg_get_channel_flags()

unsigned char __wine_dbg_get_channel_flags ( struct __wine_debug_channel *  channel)

Definition at line 72 of file debug.c.

73{
74 if (nb_debug_options == -1) debug_init();
75
77 {
79 sizeof(debug_options[0]), cmp_name );
80 if (opt) return opt->flags;
81 }
82 /* no option for this channel */
83 if (channel->flags & (1 << __WINE_DBCL_INIT)) channel->flags = default_flags;
84 return default_flags;
85}
static unsigned char default_flags
Definition: debug.c:44
static int nb_debug_options
Definition: debug.c:45
static void debug_init(void)
Definition: debug.c:209
static struct __wine_debug_channel debug_options[MAX_DEBUG_OPTIONS]
Definition: debug.c:46
static int __cdecl cmp_name(const void *p1, const void *p2)
Definition: debug.c:64
unsigned char flags
Definition: debug.h:64
#define bsearch

◆ __wine_dbg_output()

const char int int __cdecl __wine_dbg_output ( const char *  str)

Definition at line 273 of file debug.c.

274{
275 return wine_dbg_printf( "%s", str );
276}
const WCHAR * str
int wine_dbg_printf(const char *format,...)
Definition: debug.c:262

Referenced by tiff_error_handler(), tiff_warning_handler(), and vkd3d_log_callback().

◆ __wine_dbg_set_channel_flags()

int __wine_dbg_set_channel_flags ( struct __wine_debug_channel *  channel,
unsigned char  set,
unsigned char  clear 
)

Definition at line 88 of file debug.c.

90{
91 if (nb_debug_options == -1) debug_init();
92
94 {
96 sizeof(debug_options[0]), cmp_name );
97 if (opt)
98 {
99 opt->flags = (opt->flags & ~clear) | set;
100 return 1;
101 }
102 }
103 return 0;
104}
Definition: _set.h:50

◆ __wine_dbg_set_functions()

void __wine_dbg_set_functions ( const struct __wine_debug_functions *  new_funcs,
struct __wine_debug_functions *  old_funcs,
size_t  size 
)

Definition at line 552 of file debug.c.

554{
555 if (old_funcs) memcpy( old_funcs, &funcs, min(sizeof(funcs),size) );
556 if (new_funcs) memcpy( &funcs, new_funcs, min(sizeof(funcs),size) );
557}
GLsizeiptr size
Definition: glext.h:5919
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define min(a, b)
Definition: monoChain.cc:55
static struct __wine_debug_functions funcs
Definition: debug.c:48

Referenced by CmdTrace().

◆ debugstr_a()

static __inline const char * debugstr_a ( const char *  s)
static

Definition at line 393 of file debug.h.

393{ return wine_dbgstr_an( s, -1 ); }
GLdouble s
Definition: gl.h:2039
const char * wine_dbgstr_an(const char *s, int n)
Definition: compat.c:313

◆ debugstr_an()

static __inline const char * debugstr_an ( const char *  s,
int  n 
)
static

Definition at line 390 of file debug.h.

390{ return wine_dbgstr_an( s, n ); }
GLdouble n
Definition: glext.h:7729

◆ debugstr_fourcc()

static __inline const char * debugstr_fourcc ( unsigned int  cc)
static

Definition at line 397 of file debug.h.

397{ return wine_dbgstr_fourcc( cc ); }
uint32_t cc
Definition: isohybrid.c:75

Referenced by analyzer_dump_user_features(), band_persist_stream_Load(), band_track_persist_stream_Load(), check_blob_part(), check_blob_strip(), collection_stream_Load(), d3d10_effect_parse(), d3dcompiler_parse_signature(), d3dcompiler_shader_reflection_init(), d3dx_pixel_format_id_from_d3dformat(), DDRAW_dump_pixelformat(), debugstr_chunk(), debugstr_DMUS_IO_CONTAINED_OBJECT_HEADER(), debugstr_sa_script(), dwritefontface_TryGetFontTable(), dwritetextanalyzer2_CheckTypographicFeature(), dwritetypography_AddFontFeature(), enum_compressors(), FM2_ReadFilterData(), fxlvm_chunk_handler(), get_fontface_table(), get_format_info(), ICCVID_dump_BITMAPINFO(), ICInfo(), ICInstall(), ICLocate(), ICOpen(), ICOpenFunction(), ICRemove(), ICSeqCompressFrameStart(), IPersistStreamImpl_Load(), MCIAVI_GetInfoAudio(), MCIAVI_GetInfoVideo(), opentype_get_sbix_formats(), parse_chordtrack_list(), parse_dls_chunk(), parse_dmbd_chunk(), parse_dmbt_chunk(), parse_dmsg_chunk(), parse_header(), parse_ins_chunk(), parse_lart_list(), parse_lbdl_list(), parse_lbil_list(), parse_lbin_list(), parse_lbnd_list(), parse_lins_list(), parse_lrgn_list(), parse_part_list(), parse_pdta_list(), parse_pref_list(), parse_pttn_list(), parse_rgn_chunk(), parse_sdta_list(), parse_seqt_chunk(), parse_sfbk_chunk(), parse_style_form(), parse_track_form(), parse_wave_chunk(), parse_wvpl_list(), segment_persist_stream_Load(), shader_dxbc_process_section(), shape_get_positions(), stream_chunk_get_data(), strmbase_dump_media_type(), track_IPersistStream_Load(), wave_object_ParseDescriptor(), and wave_persist_stream_Load().

◆ debugstr_guid()

static __inline const char * debugstr_guid ( const struct _GUID *  id)
static

Definition at line 392 of file debug.h.

392{ return wine_dbgstr_guid(id); }
static __inline const char * wine_dbgstr_guid(const GUID *id)
Definition: debug.h:181

◆ debugstr_w()

static __inline const char * debugstr_w ( const WCHAR *  s)
static

Definition at line 394 of file debug.h.

394{ return wine_dbgstr_wn( s, -1 ); }
#define wine_dbgstr_wn
Definition: testlist.c:2

◆ debugstr_wn()

static __inline const char * debugstr_wn ( const WCHAR *  s,
int  n 
)
static

Definition at line 391 of file debug.h.

391{ return wine_dbgstr_wn( s, n ); }

◆ ros_dbg_log()

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_dbg_log()

int wine_dbg_log ( enum __wine_debug_class  cls,
struct __wine_debug_channel *  ch,
const char *  func,
const char *  format,
  ... 
)

◆ wine_dbg_printf()

const char int wine_dbg_printf ( const char *  format,
  ... 
)

◆ wine_dbg_sprintf()

const char * wine_dbg_sprintf ( const char *  format,
  ... 
)

Definition at line 48 of file compat.c.

297{
298 static const int max_size = 200;
299 static char buffer[256];
300 char *ret;
301 int len;
303
305 ret = buffer;
307 if (len == -1 || len >= max_size) ret[max_size-1] = 0;
308 va_end(valist);
309 return ret;
310}
#define vsnprintf
Definition: acwin.h:108
static INT max_size
Definition: history.c:51
#define va_end(v)
Definition: stdarg.h:28
#define va_start(v, l)
Definition: stdarg.h:26
char * va_list
Definition: vadefs.h:50
return ret
Definition: mutex.c:147
GLuint buffer
Definition: glext.h:5915
GLenum GLsizei len
Definition: glext.h:6722
static va_list valist
Definition: printf.c:46

Referenced by wine_dbgstr_guid(), wine_dbgstr_longlong(), wine_dbgstr_point(), wine_dbgstr_rect(), and wine_dbgstr_size().

◆ wine_dbgstr_a()

int int static __inline const char * wine_dbgstr_a ( const char *  s)
static

Definition at line 160 of file debug.h.

161{
162 return wine_dbgstr_an( s, -1 );
163}

Referenced by _clipboard_range_contains(), AddERExcludedApplicationA(), check_prefix(), checkCreatePlayerOrGroupMessage_(), checkPlayerListCallback(), create_color_fixup_desc_from_string(), D3D10CompileEffectFromMemory(), D3DXCreateCubeTextureFromFileA(), D3DXCreateCubeTextureFromFileExA(), D3DXSaveSurfaceToFileA(), D3DXSaveTextureToFileA(), dbgStrAW(), device_load_logo(), gen_forward_chain_testdll(), gl_error(), gl_problem(), gl_warning(), ParseURLA(), PathAddBackslashA(), PathAddExtensionA(), PathAppendA(), PathCanonicalizeA(), PathCombineA(), PathCommonPrefixA(), PathFileExistsA(), PathFindExtensionA(), PathFindFileNameA(), PathFindNextComponentA(), PathGetArgsA(), PathGetDriveNumberA(), PathIsFileSpecA(), PathIsLFNFileSpecA(), PathIsPrefixA(), PathIsRelativeA(), PathIsRootA(), PathIsSameRootA(), PathIsUNCA(), PathIsUNCServerA(), PathIsUNCServerShareA(), PathIsURLA(), PathMatchSpecExA(), PathQuoteSpacesA(), PathRelativePathToA(), PathRemoveBackslashA(), PathRemoveBlanksA(), PathRemoveExtensionA(), PathRenameExtensionA(), PathSearchAndQualifyA(), PathSkipRootA(), PathStripPathA(), PathStripToRootA(), PathUnquoteSpacesA(), pdb_parse_cmd_string(), pdb_virtual_unwind(), RegLoadAppKeyA(), SHLWAPI_GetRegistryCompatFlags(), StrCatBuffA(), StrChrA(), StrChrIA(), StrCmpNA(), StrCmpNIA(), StrCpyNXA(), StrCSpnA(), StrCSpnIA(), StrDupA(), StrIsIntlEqualA(), StrPBrkA(), StrRChrA(), StrRChrIA(), StrRStrIA(), StrSpnA(), StrStrA(), StrStrIA(), StrToInt64ExA(), StrToIntA(), StrToIntExA(), subtest_export_forwarder_dep_chain(), subtest_undo(), subtest_undo_control(), test___unDName(), TEST_AssocQueryStringA(), test_CreateMetadataWriterFromReader(), test_createProcessingInstruction(), test_data_handles(), test_dbcs_WM_CHAR(), test_dbg_print_except_handler(), test_DceErrorInqTextA(), test_decodeOCSPResponseInfo(), test_environment_manipulation(), test_GetConsoleOriginalTitleA(), test_GetConsoleTitleA(), test_mbsrev(), test_NameToStrConversionA_(), TEST_Start(), test_strcpy_s(), test_strdup(), TEST_StrDupA(), test_strncat_s(), test_try_transform(), test_user_agent(), TWAIN_UserSelect(), UrlApplySchemeA(), UrlCanonicalizeA(), UrlUnescapeA(), and wsprintfATest().

◆ wine_dbgstr_an()

const char * wine_dbgstr_an ( const char *  s,
int  n 
)

Definition at line 313 of file compat.c.

314{
315 static const char hex[16] = "0123456789abcdef";
316 char *dst, *res;
317 size_t size;
318 static char buffer[256];
319
320 if (!((ULONG_PTR)str >> 16))
321 {
322 if (!str) return "(null)";
323 res = buffer;
324 sprintf( res, "#%04x", LOWORD(str) );
325 return res;
326 }
327 if (n == -1) n = strlen(str);
328 if (n < 0) n = 0;
329 size = 10 + min( 300, n * 4 );
330 dst = res = buffer;
331 *dst++ = '"';
332 while (n-- > 0 && dst <= res + size - 9)
333 {
334 unsigned char c = *str++;
335 switch (c)
336 {
337 case '\n': *dst++ = '\\'; *dst++ = 'n'; break;
338 case '\r': *dst++ = '\\'; *dst++ = 'r'; break;
339 case '\t': *dst++ = '\\'; *dst++ = 't'; break;
340 case '"': *dst++ = '\\'; *dst++ = '"'; break;
341 case '\\': *dst++ = '\\'; *dst++ = '\\'; break;
342 default:
343 if (c >= ' ' && c <= 126)
344 *dst++ = c;
345 else
346 {
347 *dst++ = '\\';
348 *dst++ = 'x';
349 *dst++ = hex[(c >> 4) & 0x0f];
350 *dst++ = hex[c & 0x0f];
351 }
352 }
353 }
354 *dst++ = '"';
355 if (n > 0)
356 {
357 *dst++ = '.';
358 *dst++ = '.';
359 *dst++ = '.';
360 }
361 *dst++ = 0;
362 return res;
363}
ios_base &_STLP_CALL hex(ios_base &__s)
Definition: _ios_base.h:324
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1597
GLuint res
Definition: glext.h:9613
const GLubyte * c
Definition: glext.h:8905
GLenum GLenum dst
Definition: glext.h:6340
#define c
Definition: ke_i.h:80
#define sprintf
Definition: sprintf.c:45
#define LOWORD(l)
Definition: pedump.c:82
uint32_t ULONG_PTR
Definition: typedefs.h:65

Referenced by _test_file_contents(), debugstr_a(), debugstr_an(), test_mui(), test_PBKDF2(), test_strftime(), test_string_data(), test_string_data_process(), wine_dbgstr_a(), and wsprintfATest().

◆ wine_dbgstr_guid()

static __inline const char * wine_dbgstr_guid ( const GUID *  id)
static

Definition at line 181 of file debug.h.

182{
183 if (!id) return "(null)";
184 if (!((ULONG_PTR)id >> 16)) return wine_dbg_sprintf( "<guid-0x%04lx>", (ULONG_PTR)id & 0xffff );
185 return wine_dbg_sprintf( "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}",
186 id->Data1, id->Data2, id->Data3,
187 id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3],
188 id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7] );
189}
GLuint id
Definition: glext.h:5910
const char * wine_dbg_sprintf(const char *format,...) __WINE_PRINTF_ATTR(1
Definition: compat.c:296

Referenced by _check_typeinfo(), CFSFolder::_CreateShellExtInstance(), CDisplayAttributeMgr::_IsInCollection(), _test_class_info(), _test_cp_args(), _test_cp_eventarg(), _test_disp(), _test_disp2(), _test_ifaces(), _test_provideclassinfo(), _test_reader_container_format(), ActiveScript_QueryInterface(), ADsOpenObject(), CDocumentMgr::AdviseSink(), allocator_QueryInterface(), Arguments2_GetIDsOfNames(), Arguments2_QueryInterface(), AssocCreateElement(), ax_qi(), AXObjectSafety_GetInterfaceSafetyOptions(), AXObjectSafety_QueryInterface(), AXObjectSafety_SetInterfaceSafetyOptions(), BindCallbackRedirect_QueryInterface(), BindInfo_QueryInterface(), Binding_QueryInterface(), BindStatusCallback_OnObjectAvailable(), BindStatusCallback_QueryInterface(), CFSFolder::BindToObject(), callback_QueryInterface(), check_bitmap_format(), check_bmp_format(), check_db_properties(), check_device_iface_(), check_device_info_(), check_known_folder(), check_png_format(), check_storage_contents(), check_tiff_format(), checkSessionListCallback(), ClassFactory_CreateInstance(), ClassFactory_QueryInterface(), codeview_process_info(), CommonDecoder_GetFrame(), CommonDecoderFrame_GetColorContexts(), CommonEncoderFrame_SetPixelFormat(), compare_bitmap_data(), ConnectionPoint_QueryInterface(), ConnectionPointContainer_FindConnectionPoint(), create_decoder(), CreateComponentInfo(), CreateXmlReader(), CreateXmlWriter(), CustomDocHostUIHandler_QueryInterface(), d2d_effect_create(), d2d_effects_init_builtins(), d2d_factory_GetEffectProperties(), DataObject_QueryInterface(), ddraw_enumerate_secondary_devices(), debugstr_guid(), debugstr_msxml_guid(), debugstr_ole_guid(), decode_frame_wic(), Disp_Invoke(), Dispatch_GetIDsOfNames(), Dispatch_Invoke(), Dispatch_QueryInterface(), DispatchEx_QueryInterface(), div_onclick_disp_Invoke(), DllGetClassObject(), DummyDispatch_Invoke(), enum_devices_callback(), EnumAddress_cb2(), EnumAddressesCallback(), EnumAddressTypeCallback(), EnumAllFeedback(), EnumEffects(), EnumJoysticks(), EnumVARIANT_QueryInterface(), EventDispatch_Invoke(), External_QueryInterface(), find_ept_entry(), FontEventsDisp_Invoke(), GdipSaveImageToStream(), get_decoder_info_from_image(), get_pixelformat_info(), CDisplayAttributeMgr::GetDisplayAttributeInfo(), getinstance_cf_CreateInstance(), CShellDispatch::GetInterfaceSafetyOptions(), CShellDispatch::GetSite(), CLangBarMgr::GetThreadMarshalInterface(), graph_QueryInterface(), Guid2str(), HlinkBrowseContext_QueryInterface(), HlinkTarget_QueryInterface(), hls_QueryInterface(), hls_QueryService(), hls_test_Moniker_BindToStorage(), Host_GetIDsOfNames(), Host_QueryInterface(), HttpSecurity_GetWindow(), ICommDlgBrowser3_fnQueryInterface(), IExplorerPaneVisibility_fnGetPaneState(), IExplorerPaneVisibility_fnQueryInterface(), INetCfgComponentPrivate_fnUnknown1(), initialize_decoder_wic(), initialize_encoder_wic(), InPlaceFrame_QueryInterface(), InternetHostSecurityManager_ProcessUrlAction(), InternetHostSecurityManager_QueryCustomPolicy(), IServiceProvider_fnQueryInterface(), IServiceProvider_fnQueryService(), ITcpipProperties_fnUnknown1(), ITcpipProperties_fnUnknown2(), load_stream(), CDefaultContextMenu::LoadDynamicContextMenuHandler(), ManagedCallback2_QueryInterface(), ManagedCallback_QueryInterface(), match_guid_attr_imp(), matchGUID(), mdbr_QueryInterface(), mdr_QueryInterface(), meminput_QueryInterface(), MimeFilter_CreateInstance(), MimeProtocol_QueryInterface(), Moniker_BindToObject(), Moniker_BindToStorage(), Moniker_GetClassID(), Moniker_QueryInterface(), MonikerProp_QueryInterface(), NewWindowManager_QueryInterface(), ObjectSafety_GetInterfaceSafetyOptions(), ObjectSafety_QueryInterface(), ObjectSafety_SetInterfaceSafetyOptions(), ok_iids_(), OleCommandTarget_Exec(), OleWindow_QueryInterface(), outer_QueryInterface(), PersistMoniker_QueryInterface(), png_encoder_create_frame(), PowerSetActiveScheme(), ProfileActivationSink_OnActivated(), property_bag_QueryInterface(), ProtocolCF_CreateInstance(), ProtocolCF_QueryInterface(), ProtocolEmul_QueryInterface(), ProtocolSink_QueryInterface(), ProtocolUnk_QueryInterface(), Proxy_UnmarshalInterface(), query_interface(), CDocumentMgr::QueryInterface(), CEnumTfContext::QueryInterface(), CAssocElement::QueryInterface(), QueryInterface(), CMenuBand::QueryService(), receiveEnumSessionsRequest_(), register_ps_clsid_thread(), reolecb_obj_QueryInsertObject(), resolver_QI(), RichEditOleCallback_QueryInterface(), run_registry_test(), ServiceProvider_QueryInterface(), ServiceProvider_QueryService(), CInternetToolbar::SetCommandTarget(), CShellDispatch::SetInterfaceSafetyOptions(), CShellBrowser::ShowBand(), sp_caller_QueryInterface(), sp_caller_QueryService(), sp_QueryInterface(), sp_QueryService(), SPInit(), START_TEST(), statusclb_OnObjectAvailable(), statusclb_OnProgress(), statusclb_OnStartBinding(), statusclb_OnStopBinding(), std_release_marshal_data(), Storage_SetClass(), StorageBaseImpl_SetClass(), stream_info(), stream_QueryInterface(), Stream_QueryInterface(), SxsLookupClrGuid(), test1_QueryInterface(), test_activator_GetClassObject(), test_add_source_filter(), test_add_stream(), test_ApphelpCheckShellObject(), test_audiostream_initialize(), test_basic_audio(), test_basic_video(), test_BindToObject(), test_bitmap_scaler(), test_CLSIDFromProgID(), test_CLSIDFromString(), test_CoCreateInstanceEx(), test_CoGetObjectContext(), test_CoGetPSClsid(), test_CoGetStandardMarshal(), test_color_formats(), test_connect_pin(), test_control_delegation(), test_CoRegisterPSClsid(), test_create_reader_from_container(), test_CreateBitmapFromHBITMAP(), test_CreateBitmapFromHICON(), test_CreateBody(), test_CreateMetadataReader(), test_CreateMetadataWriter(), test_CreateMetadataWriterFromReader(), test_data_cache_init(), test_data_cache_initnew(), test_ddrawstream_initialize(), test_ddrawstream_set_format(), test_decode(), test_decode_adobe_cmyk(), test_delegated_methods(), test_devenum(), test_device_iface(), test_device_iface_detail(), test_device_info(), test_DfMarshal_custom_marshaling(), test_disp_QI(), test_dispatch_typeinfo(), test_file_source_filter(), test_FileContents1(), test_FileContents2(), test_find_com_redirection(), test_find_ifaceps_redirection(), test_find_progid_redirection(), test_find_surrogate(), test_freethreadedmarshaldata(), test_freethreadedmarshaler(), test_GetAdaptersAddresses(), test_GetDatabaseInformation(), test_GetDatabaseInformationEmpty(), test_GetDefaultColumn(), test_GetDefaultSearchGUID(), test_GetDeviceInfo(), test_global_gif_palette(), test_global_gif_palette_2frames(), test_graph_seeking(), test_GuidFunctions(), test_iface_ptr(), test_IIDFromString(), test_IIDs(), test_IMILBitmap(), test_inheritance(), test_interface_identifier_conversion(), test_is_testdb(), test_IUnknown_GetClassID(), test_IWinHttpRequest_Invoke(), test_local_gif_palette(), test_media_seeking(), test_media_types(), test_metadata_APE(), test_metadata_App1(), test_metadata_cHRM(), test_metadata_Exif(), test_metadata_gAMA(), test_metadata_GCE(), test_metadata_gif(), test_metadata_GIF_comment(), test_metadata_Gps(), test_metadata_hIST(), test_metadata_Ifd(), test_metadata_IMD(), test_metadata_LSD(), test_metadata_tEXt(), test_metadata_tIME(), test_mode_generic(), test_moniker_BindToObject(), test_MonikerComposeWith(), test_multi_encoder_impl(), test_mxwriter_handlers(), test_namespaces_as_attributes(), test_no_gif_palette(), test_objref_moniker(), test_OleCreateStaticFromData(), test_OleDoAutoConvert(), test_persiststream(), test_pixelformat_info(), test_png_palette(), test_pointer_moniker(), test_propertyset_storage_enum(), test_PropVariantToGUID(), test_PSPropertyKeyFromString(), test_queryreader(), test_recinfo(), test_RpcIfInqId(), test_safearray_layout(), test_script_typeinfo(), test_seeking(), test_SHCreateQueryCancelAutoPlayMoniker(), Test_Shimdata(), test_SIPRetrieveSubjectGUID(), test_source_iface(), test_supporterrorinfo(), test_tiff_1bpp_palette(), test_tiff_24bpp(), test_tiff_4bps_bgra(), test_tiff_8bpp_alpha(), test_tiff_8bpp_palette(), test_truncated_gif(), test_typeinfo(), test_unk_QI(), test_UuidCreate(), test_UuidCreateSequential(), test_WICMapSchemaToName(), test_WICMapShortNameToGuid(), test_with_compat(), testclock_QueryInterface(), testenummt_QueryInterface(), testenumpins_QueryInterface(), testfilter_QueryInterface(), testinstance_QI(), testoutput_QueryInterface(), testpin_QueryInterface(), testseek_IsFormatSupported(), testseek_IsUsingTimeFormat(), testseek_SetTimeFormat(), testsource_seeking_IsFormatSupported(), threadref_QueryInterface(), Timeline_IAMTimeline_GetDefaultEffect(), Timeline_IAMTimeline_GetDefaultTransition(), Timeline_IAMTimeline_SetDefaultEffect(), Timeline_IAMTimeline_SetDefaultTransition(), TimelineObj_SetSubObjectGUID(), timeoutFunc_Invoke(), transformdest_QueryInterface(), TravelLog_QueryInterface(), unknown_QueryInterface(), Unknown_QueryInterface(), VariantChangeType_QueryInterface(), ViewAdviseSink_QueryInterface(), wb_qi(), WBE2Sink_QueryInterface(), WICMapGuidToShortName(), WICMapSchemaToName(), and WinInetHttpInfo_QueryInterface().

◆ wine_dbgstr_longlong()

static __inline const char * wine_dbgstr_longlong ( ULONGLONG  ll)
static

Definition at line 228 of file debug.h.

229{
230 if (/*sizeof(ll) > sizeof(unsigned long) &&*/ ll >> 32) /* ULONGLONG is always > long in ReactOS */
231 return wine_dbg_sprintf( "%lx%08lx", (unsigned long)(ll >> 32), (unsigned long)ll );
232 else return wine_dbg_sprintf( "%lx", (unsigned long)ll );
233}
w ll
Definition: byte_order.h:167

◆ wine_dbgstr_point()

static __inline const char * wine_dbgstr_point ( const POINT *  pt)
static

Definition at line 206 of file debug.h.

207{
208 if (!pt) return "(null)";
209 return wine_dbg_sprintf( "(%ld,%ld)", pt->x, pt->y );
210}
#define pt(x, y)
Definition: drawing.c:79

◆ wine_dbgstr_rect()

static __inline const char * wine_dbgstr_rect ( const RECT *  rect)
static

Definition at line 218 of file debug.h.

219{
220 if (!rect) return "(null)";
221 return wine_dbg_sprintf( "(%ld,%ld)-(%ld,%ld)", rect->left, rect->top,
222 rect->right, rect->bottom );
223}
RECT rect
Definition: combotst.c:67
long bottom
Definition: dcommon.idl:29
long right
Definition: dcommon.idl:29
long left
Definition: dcommon.idl:29
long top
Definition: dcommon.idl:29

◆ wine_dbgstr_size()

static __inline const char * wine_dbgstr_size ( const SIZE *  size)
static

Definition at line 212 of file debug.h.

213{
214 if (!size) return "(null)";
215 return wine_dbg_sprintf( "(%ld,%ld)", size->cx, size->cy );
216}

◆ wine_dbgstr_w()

static __inline const char * wine_dbgstr_w ( const WCHAR *  s)
static

Definition at line 165 of file debug.h.

166{
167 return wine_dbgstr_wn( s, -1 );
168}

◆ wine_dbgstr_wn()

const char * wine_dbgstr_wn ( const WCHAR *  s,
int  n 
)

Definition at line 367 of file compat.c.

368{
369 char *dst, *res;
370 size_t size;
371 static char buffer[256];
372
373 if (!((ULONG_PTR)str >> 16))
374 {
375 if (!str) return "(null)";
376 res = buffer;
377 sprintf( res, "#%04x", LOWORD(str) );
378 return res;
379 }
380 if (n == -1)
381 {
382 const WCHAR *end = str;
383 while (*end) end++;
384 n = end - str;
385 }
386 if (n < 0) n = 0;
387 size = 12 + min( 300, n * 5 );
388 dst = res = buffer;
389 *dst++ = 'L';
390 *dst++ = '"';
391 while (n-- > 0 && dst <= res + size - 10)
392 {
393 WCHAR c = *str++;
394 switch (c)
395 {
396 case '\n': *dst++ = '\\'; *dst++ = 'n'; break;
397 case '\r': *dst++ = '\\'; *dst++ = 'r'; break;
398 case '\t': *dst++ = '\\'; *dst++ = 't'; break;
399 case '"': *dst++ = '\\'; *dst++ = '"'; break;
400 case '\\': *dst++ = '\\'; *dst++ = '\\'; break;
401 default:
402 if (c >= ' ' && c <= 126)
403 *dst++ = c;
404 else
405 {
406 *dst++ = '\\';
407 sprintf(dst,"%04x",c);
408 dst+=4;
409 }
410 }
411 }
412 *dst++ = '"';
413 if (n > 0)
414 {
415 *dst++ = '.';
416 *dst++ = '.';
417 *dst++ = '.';
418 }
419 *dst++ = 0;
420 return res;
421}
GLuint GLuint end
Definition: gl.h:1545
short WCHAR
Definition: pedump.c:58