From: Alex Henrie alexhenrie24@gmail.com
--- dlls/d3dxof/parsing.c | 9 --------- dlls/dmusic/dmobject.h | 7 ------- dlls/mfplat/buffer.c | 2 +- dlls/mfplat/mediatype.c | 4 ++-- dlls/mfplat/mfplat_private.h | 2 +- include/wine/debug.h | 11 +++++++++++ libs/strmbase/mediatype.c | 8 -------- 7 files changed, 15 insertions(+), 28 deletions(-)
diff --git a/dlls/d3dxof/parsing.c b/dlls/d3dxof/parsing.c index c87517c0f15..149e2371168 100644 --- a/dlls/d3dxof/parsing.c +++ b/dlls/d3dxof/parsing.c @@ -70,15 +70,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3dxof_parsing);
#define CLSIDFMT "<%08lX-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X>"
-/* FOURCC to string conversion for debug messages */ -static const char *debugstr_fourcc(DWORD fourcc) -{ - if (!fourcc) return "'null'"; - return wine_dbg_sprintf ("'%c%c%c%c'", - (char)(fourcc), (char)(fourcc >> 8), - (char)(fourcc >> 16), (char)(fourcc >> 24)); -} - static const char* get_primitive_string(DWORD token) { switch(token) diff --git a/dlls/dmusic/dmobject.h b/dlls/dmusic/dmobject.h index 82ac05f31b9..bab96c77724 100644 --- a/dlls/dmusic/dmobject.h +++ b/dlls/dmusic/dmobject.h @@ -121,10 +121,3 @@ HRESULT WINAPI unimpl_IPersistStream_GetSizeMax(IPersistStream *iface, const char *debugstr_chunk(const struct chunk_entry *chunk); const char *debugstr_dmguid(const GUID *id); void dump_DMUS_OBJECTDESC(DMUS_OBJECTDESC *desc); - -static inline const char *debugstr_fourcc(DWORD fourcc) -{ - if (!fourcc) return "''"; - return wine_dbg_sprintf("'%c%c%c%c'", (char)(fourcc), (char)(fourcc >> 8), - (char)(fourcc >> 16), (char)(fourcc >> 24)); -} diff --git a/dlls/mfplat/buffer.c b/dlls/mfplat/buffer.c index cb1b3176a08..932b1147cb8 100644 --- a/dlls/mfplat/buffer.c +++ b/dlls/mfplat/buffer.c @@ -1627,7 +1627,7 @@ HRESULT WINAPI MFCreateAlignedMemoryBuffer(DWORD max_length, DWORD alignment, IM */ HRESULT WINAPI MFCreate2DMediaBuffer(DWORD width, DWORD height, DWORD fourcc, BOOL bottom_up, IMFMediaBuffer **buffer) { - TRACE("%lu, %lu, %s, %d, %p.\n", width, height, debugstr_fourcc(fourcc), bottom_up, buffer); + TRACE("%lu, %lu, %s, %d, %p.\n", width, height, mf_debugstr_fourcc(fourcc), bottom_up, buffer);
return create_2d_buffer(width, height, fourcc, bottom_up, buffer); } diff --git a/dlls/mfplat/mediatype.c b/dlls/mfplat/mediatype.c index eed06ef02ef..0b4a6fa4eaf 100644 --- a/dlls/mfplat/mediatype.c +++ b/dlls/mfplat/mediatype.c @@ -2696,7 +2696,7 @@ HRESULT WINAPI MFGetStrideForBitmapInfoHeader(DWORD fourcc, DWORD width, LONG *s struct uncompressed_video_format *format; GUID subtype;
- TRACE("%s, %lu, %p.\n", debugstr_fourcc(fourcc), width, stride); + TRACE("%s, %lu, %p.\n", mf_debugstr_fourcc(fourcc), width, stride);
memcpy(&subtype, &MFVideoFormat_Base, sizeof(subtype)); subtype.Data1 = fourcc; @@ -2766,7 +2766,7 @@ HRESULT WINAPI MFGetPlaneSize(DWORD fourcc, DWORD width, DWORD height, DWORD *si unsigned int stride; GUID subtype;
- TRACE("%s, %lu, %lu, %p.\n", debugstr_fourcc(fourcc), width, height, size); + TRACE("%s, %lu, %lu, %p.\n", mf_debugstr_fourcc(fourcc), width, height, size);
memcpy(&subtype, &MFVideoFormat_Base, sizeof(subtype)); subtype.Data1 = fourcc; diff --git a/dlls/mfplat/mfplat_private.h b/dlls/mfplat/mfplat_private.h index 9cd3d601587..c9af96d88f9 100644 --- a/dlls/mfplat/mfplat_private.h +++ b/dlls/mfplat/mfplat_private.h @@ -148,7 +148,7 @@ static inline const char *debugstr_propvar(const PROPVARIANT *v) } }
-static inline const char *debugstr_fourcc(DWORD format) +static inline const char *mf_debugstr_fourcc(DWORD format) { static const struct format_name { diff --git a/include/wine/debug.h b/include/wine/debug.h index 9c92fd3d6d6..d1d751a2d8a 100644 --- a/include/wine/debug.h +++ b/include/wine/debug.h @@ -324,6 +324,16 @@ static inline const char *wine_dbgstr_guid( const GUID *id ) id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7] ); }
+static inline const char *wine_dbgstr_fourcc( unsigned int fourcc ) +{ + char str[4] = { fourcc, fourcc >> 8, fourcc >> 16, fourcc >> 24 }; + if (!fourcc) + return "''"; + if (isprint( str[0] ) && isprint( str[1] ) && isprint( str[2] ) && isprint( str[3] )) + return wine_dbg_sprintf( "'%4s'", str ); + return wine_dbg_sprintf( "0x%08x", fourcc ); +} + static inline const char *wine_dbgstr_point( const POINT *pt ) { if (!pt) return "(null)"; @@ -504,6 +514,7 @@ static inline const char *wine_dbgstr_variant( const VARIANT *v ) static inline const char *debugstr_an( const char * s, int n ) { return wine_dbgstr_an( s, n ); } static inline const char *debugstr_wn( const WCHAR *s, int n ) { return wine_dbgstr_wn( s, n ); } static inline const char *debugstr_guid( const struct _GUID *id ) { return wine_dbgstr_guid(id); } +static inline const char *debugstr_fourcc( unsigned int cc ) { return wine_dbgstr_fourcc( cc ); } static inline const char *debugstr_a( const char *s ) { return wine_dbgstr_an( s, -1 ); } static inline const char *debugstr_w( const WCHAR *s ) { return wine_dbgstr_wn( s, -1 ); }
diff --git a/libs/strmbase/mediatype.c b/libs/strmbase/mediatype.c index 90c9bd01206..af813e2ffee 100644 --- a/libs/strmbase/mediatype.c +++ b/libs/strmbase/mediatype.c @@ -55,14 +55,6 @@ static const char *strmbase_debugstr_guid(const GUID *guid) return debugstr_guid(guid); }
-static const char *debugstr_fourcc(DWORD fourcc) -{ - char str[4] = {fourcc, fourcc >> 8, fourcc >> 16, fourcc >> 24}; - if (isprint(str[0]) && isprint(str[1]) && isprint(str[2]) && isprint(str[3])) - return wine_dbgstr_an(str, 4); - return wine_dbg_sprintf("%#lx", fourcc); -} - void strmbase_dump_media_type(const AM_MEDIA_TYPE *mt) { if (!TRACE_ON(quartz) || !mt) return;
From: Alex Henrie alexhenrie24@gmail.com
--- dlls/comctl32/animate.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/dlls/comctl32/animate.c b/dlls/comctl32/animate.c index f4d848fef91..721379f329c 100644 --- a/dlls/comctl32/animate.c +++ b/dlls/comctl32/animate.c @@ -534,14 +534,8 @@ static BOOL ANIMATE_GetAviInfo(ANIMATE_INFO *infoPtr)
mmioRead(infoPtr->hMMio, (LPSTR)&infoPtr->ash, sizeof(infoPtr->ash));
- TRACE("ash.fccType='%c%c%c%c'\n", LOBYTE(LOWORD(infoPtr->ash.fccType)), - HIBYTE(LOWORD(infoPtr->ash.fccType)), - LOBYTE(HIWORD(infoPtr->ash.fccType)), - HIBYTE(HIWORD(infoPtr->ash.fccType))); - TRACE("ash.fccHandler='%c%c%c%c'\n", LOBYTE(LOWORD(infoPtr->ash.fccHandler)), - HIBYTE(LOWORD(infoPtr->ash.fccHandler)), - LOBYTE(HIWORD(infoPtr->ash.fccHandler)), - HIBYTE(HIWORD(infoPtr->ash.fccHandler))); + TRACE("ash.fccType=%s\n", debugstr_fourcc(infoPtr->ash.fccType)); + TRACE("ash.fccHandler=%s\n", debugstr_fourcc(infoPtr->ash.fccHandler)); TRACE("ash.dwFlags=%ld\n", infoPtr->ash.dwFlags); TRACE("ash.wPriority=%d\n", infoPtr->ash.wPriority); TRACE("ash.wLanguage=%d\n", infoPtr->ash.wLanguage);
From: Alex Henrie alexhenrie24@gmail.com
--- dlls/ddraw/utils.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/dlls/ddraw/utils.c b/dlls/ddraw/utils.c index 1915f9dd7f0..4204587dd91 100644 --- a/dlls/ddraw/utils.c +++ b/dlls/ddraw/utils.c @@ -826,12 +826,8 @@ DDRAW_dump_pixelformat(const DDPIXELFORMAT *pf) TRACE("( "); DDRAW_dump_pixelformat_flag(pf->dwFlags); if (pf->dwFlags & DDPF_FOURCC) - TRACE(", dwFourCC code '%c%c%c%c' (0x%08lx) - %lu bits per pixel", - (unsigned char)( pf->dwFourCC &0xff), - (unsigned char)((pf->dwFourCC>> 8)&0xff), - (unsigned char)((pf->dwFourCC>>16)&0xff), - (unsigned char)((pf->dwFourCC>>24)&0xff), - pf->dwFourCC, + TRACE(", dwFourCC code %s - %lu bits per pixel", + debugstr_fourcc(pf->dwFourCC), pf->dwYUVBitCount); if (pf->dwFlags & DDPF_RGB) {
From: Alex Henrie alexhenrie24@gmail.com
--- dlls/mciavi32/mmoutput.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/dlls/mciavi32/mmoutput.c b/dlls/mciavi32/mmoutput.c index 948b33ae3e1..dd8f96e1314 100644 --- a/dlls/mciavi32/mmoutput.c +++ b/dlls/mciavi32/mmoutput.c @@ -28,15 +28,9 @@ static BOOL MCIAVI_GetInfoAudio(WINE_MCIAVI* wma, const MMCKINFO* mmckList, MMCK { MMCKINFO mmckInfo;
- TRACE("ash.fccType='%c%c%c%c'\n", LOBYTE(LOWORD(wma->ash_audio.fccType)), - HIBYTE(LOWORD(wma->ash_audio.fccType)), - LOBYTE(HIWORD(wma->ash_audio.fccType)), - HIBYTE(HIWORD(wma->ash_audio.fccType))); + TRACE("ash.fccType=%s\n", debugstr_fourcc(wma->ash_audio.fccType)); if (wma->ash_audio.fccHandler) /* not all streams specify a handler */ - TRACE("ash.fccHandler='%c%c%c%c'\n", LOBYTE(LOWORD(wma->ash_audio.fccHandler)), - HIBYTE(LOWORD(wma->ash_audio.fccHandler)), - LOBYTE(HIWORD(wma->ash_audio.fccHandler)), - HIBYTE(HIWORD(wma->ash_audio.fccHandler))); + TRACE("ash.fccHandler=%s\n", debugstr_fourcc(wma->ash_audio.fccHandler)); else TRACE("ash.fccHandler=0, no handler specified\n"); TRACE("ash.dwFlags=%ld\n", wma->ash_audio.dwFlags); @@ -89,14 +83,8 @@ static BOOL MCIAVI_GetInfoVideo(WINE_MCIAVI* wma, const MMCKINFO* mmckList, MMCK { MMCKINFO mmckInfo;
- TRACE("ash.fccType='%c%c%c%c'\n", LOBYTE(LOWORD(wma->ash_video.fccType)), - HIBYTE(LOWORD(wma->ash_video.fccType)), - LOBYTE(HIWORD(wma->ash_video.fccType)), - HIBYTE(HIWORD(wma->ash_video.fccType))); - TRACE("ash.fccHandler='%c%c%c%c'\n", LOBYTE(LOWORD(wma->ash_video.fccHandler)), - HIBYTE(LOWORD(wma->ash_video.fccHandler)), - LOBYTE(HIWORD(wma->ash_video.fccHandler)), - HIBYTE(HIWORD(wma->ash_video.fccHandler))); + TRACE("ash.fccType=%s\n", debugstr_fourcc(wma->ash_video.fccType)); + TRACE("ash.fccHandler=%s\n", debugstr_fourcc(wma->ash_video.fccHandler)); TRACE("ash.dwFlags=%ld\n", wma->ash_video.dwFlags); TRACE("ash.wPriority=%d\n", wma->ash_video.wPriority); TRACE("ash.wLanguage=%d\n", wma->ash_video.wLanguage);
From: Alex Henrie alexhenrie24@gmail.com
--- dlls/mscms/mscms_priv.h | 2 -- dlls/mscms/profile.c | 28 +++++++++++----------------- dlls/mscms/stub.c | 10 +++++----- dlls/mscms/transform.c | 2 +- 4 files changed, 17 insertions(+), 25 deletions(-)
diff --git a/dlls/mscms/mscms_priv.h b/dlls/mscms/mscms_priv.h index 06f55606719..d5caa54b696 100644 --- a/dlls/mscms/mscms_priv.h +++ b/dlls/mscms/mscms_priv.h @@ -76,5 +76,3 @@ extern BOOL get_tag_data( const struct profile *, TAGTYPE, DWORD, void *, DWORD extern BOOL set_tag_data( const struct profile *, TAGTYPE, DWORD, const void *, DWORD * ); extern void get_profile_header( const struct profile *, PROFILEHEADER * ); extern void set_profile_header( const struct profile *, const PROFILEHEADER * ); - -extern const char *dbgstr_tag(DWORD); diff --git a/dlls/mscms/profile.c b/dlls/mscms/profile.c index 5ecd5f83273..aa30fc47b8d 100644 --- a/dlls/mscms/profile.c +++ b/dlls/mscms/profile.c @@ -51,12 +51,6 @@ static inline WCHAR *strdupW( const char *str ) return ret; }
-const char *dbgstr_tag( DWORD tag ) -{ - return wine_dbg_sprintf( "'%c%c%c%c'", - (char)(tag >> 24), (char)(tag >> 16), (char)(tag >> 8), (char)(tag) ); -} - WINE_DEFAULT_DEBUG_CHANNEL(mscms);
/****************************************************************************** @@ -671,36 +665,36 @@ static BOOL match_profile( PENUMTYPEW rec, PPROFILEHEADER hdr ) } if (rec->dwFields & ET_DEVICECLASS) { - FIXME( "ET_DEVICECLASS: %s\n", dbgstr_tag(rec->dwMediaType) ); + FIXME( "ET_DEVICECLASS: %s\n", debugstr_fourcc(rec->dwMediaType) ); } if (rec->dwFields & ET_CMMTYPE) { - TRACE( "ET_CMMTYPE: %s\n", dbgstr_tag(rec->dwCMMType) ); + TRACE( "ET_CMMTYPE: %s\n", debugstr_fourcc(rec->dwCMMType) ); if (rec->dwCMMType != hdr->phCMMType) return FALSE; } if (rec->dwFields & ET_CLASS) { - TRACE( "ET_CLASS: %s\n", dbgstr_tag(rec->dwClass) ); + TRACE( "ET_CLASS: %s\n", debugstr_fourcc(rec->dwClass) ); if (rec->dwClass != hdr->phClass) return FALSE; } if (rec->dwFields & ET_DATACOLORSPACE) { - TRACE( "ET_DATACOLORSPACE: %s\n", dbgstr_tag(rec->dwDataColorSpace) ); + TRACE( "ET_DATACOLORSPACE: %s\n", debugstr_fourcc(rec->dwDataColorSpace) ); if (rec->dwDataColorSpace != hdr->phDataColorSpace) return FALSE; } if (rec->dwFields & ET_CONNECTIONSPACE) { - TRACE( "ET_CONNECTIONSPACE: %s\n", dbgstr_tag(rec->dwConnectionSpace) ); + TRACE( "ET_CONNECTIONSPACE: %s\n", debugstr_fourcc(rec->dwConnectionSpace) ); if (rec->dwConnectionSpace != hdr->phConnectionSpace) return FALSE; } if (rec->dwFields & ET_SIGNATURE) { - TRACE( "ET_SIGNATURE: %s\n", dbgstr_tag(rec->dwSignature) ); + TRACE( "ET_SIGNATURE: %s\n", debugstr_fourcc(rec->dwSignature) ); if (rec->dwSignature != hdr->phSignature) return FALSE; } if (rec->dwFields & ET_PLATFORM) { - TRACE( "ET_PLATFORM: %s\n", dbgstr_tag(rec->dwPlatform) ); + TRACE( "ET_PLATFORM: %s\n", debugstr_fourcc(rec->dwPlatform) ); if (rec->dwPlatform != hdr->phPlatform) return FALSE; } if (rec->dwFields & ET_PROFILEFLAGS) @@ -710,12 +704,12 @@ static BOOL match_profile( PENUMTYPEW rec, PPROFILEHEADER hdr ) } if (rec->dwFields & ET_MANUFACTURER) { - TRACE( "ET_MANUFACTURER: %s\n", dbgstr_tag(rec->dwManufacturer) ); + TRACE( "ET_MANUFACTURER: %s\n", debugstr_fourcc(rec->dwManufacturer) ); if (rec->dwManufacturer != hdr->phManufacturer) return FALSE; } if (rec->dwFields & ET_MODEL) { - TRACE( "ET_MODEL: %s\n", dbgstr_tag(rec->dwModel) ); + TRACE( "ET_MODEL: %s\n", debugstr_fourcc(rec->dwModel) ); if (rec->dwModel != hdr->phModel) return FALSE; } if (rec->dwFields & ET_ATTRIBUTES) @@ -732,7 +726,7 @@ static BOOL match_profile( PENUMTYPEW rec, PPROFILEHEADER hdr ) } if (rec->dwFields & ET_CREATOR) { - TRACE( "ET_CREATOR: %s\n", dbgstr_tag(rec->dwCreator) ); + TRACE( "ET_CREATOR: %s\n", debugstr_fourcc(rec->dwCreator) ); if (rec->dwCreator != hdr->phCreator) return FALSE; } return TRUE; @@ -1448,7 +1442,7 @@ BOOL WINAPI CloseColorProfile( HPROFILE handle ) */ BOOL WINAPI WcsGetUsePerUserProfiles( const WCHAR* name, DWORD class, BOOL* use_per_user_profile ) { - FIXME( "%s %s %p\n", debugstr_w(name), dbgstr_tag(class), use_per_user_profile ); + FIXME( "%s %s %p\n", debugstr_w(name), debugstr_fourcc(class), use_per_user_profile ); SetLastError( ERROR_CALL_NOT_IMPLEMENTED ); return FALSE; } diff --git a/dlls/mscms/stub.c b/dlls/mscms/stub.c index 6ac777a86f7..05c2919566e 100644 --- a/dlls/mscms/stub.c +++ b/dlls/mscms/stub.c @@ -135,21 +135,21 @@ BOOL WINAPI GetPS2ColorSpaceArray( HPROFILE profile, DWORD intent, DWORD type, P
BOOL WINAPI RegisterCMMA( PCSTR machine, DWORD id, PCSTR dll ) { - FIXME( "( %p, %s, %p ) stub\n", machine, dbgstr_tag(id), dll ); + FIXME( "( %p, %s, %p ) stub\n", machine, debugstr_fourcc(id), dll );
return TRUE; }
BOOL WINAPI RegisterCMMW( PCWSTR machine, DWORD id, PCWSTR dll ) { - FIXME( "( %p, %s, %p ) stub\n", machine, dbgstr_tag(id), dll ); + FIXME( "( %p, %s, %p ) stub\n", machine, debugstr_fourcc(id), dll );
return TRUE; }
BOOL WINAPI SelectCMM( DWORD id ) { - FIXME( "(%s) stub\n", dbgstr_tag(id) ); + FIXME( "(%s) stub\n", debugstr_fourcc(id) );
return TRUE; } @@ -188,14 +188,14 @@ BOOL WINAPI SpoolerCopyFileEvent( LPWSTR printer, LPWSTR key, DWORD event )
BOOL WINAPI UnregisterCMMA( PCSTR machine, DWORD id ) { - FIXME( "( %p, %s ) stub\n", machine, dbgstr_tag(id) ); + FIXME( "( %p, %s ) stub\n", machine, debugstr_fourcc(id) );
return TRUE; }
BOOL WINAPI UnregisterCMMW( PCWSTR machine, DWORD id ) { - FIXME( "( %p, %s ) stub\n", machine, dbgstr_tag(id) ); + FIXME( "( %p, %s ) stub\n", machine, debugstr_fourcc(id) );
return TRUE; } diff --git a/dlls/mscms/transform.c b/dlls/mscms/transform.c index f02b8442579..c66c76a4c41 100644 --- a/dlls/mscms/transform.c +++ b/dlls/mscms/transform.c @@ -146,7 +146,7 @@ HTRANSFORM WINAPI CreateColorTransformW( LPLOGCOLORSPACEW space, HPROFILE dest, intent = space->lcsIntent > 3 ? INTENT_PERCEPTUAL : space->lcsIntent;
TRACE( "lcsIntent: %#lx\n", space->lcsIntent ); - TRACE( "lcsCSType: %s\n", dbgstr_tag( space->lcsCSType ) ); + TRACE( "lcsCSType: %s\n", debugstr_fourcc( space->lcsCSType ) ); TRACE( "lcsFilename: %s\n", debugstr_w( space->lcsFilename ) );
input = cmsCreate_sRGBProfile(); /* FIXME: create from supplied color space */
MAC build is not happy about this ```make: *** [dlls/winecoreaudio.drv/coremidi.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from ../dlls/winecoreaudio.drv/midi.c:39: ../dlls/winecoreaudio.drv/coreaudio.h:26:27: error: conflicting types for 'wine_dbgstr_fourcc'; have 'const char *(INT32)' {aka 'const char *(int)'} 26 | static inline const char* wine_dbgstr_fourcc(INT32 fourcc) | ^~~~~~~~~~~~~~~~~~ In file included from ../dlls/winecoreaudio.drv/midi.c:37: ../include/wine/debug.h:327:27: note: previous definition of 'wine_dbgstr_fourcc' with type 'const char *(unsigned int)' 327 | static inline const char *wine_dbgstr_fourcc( unsigned int fourcc ) | ^~~~~~~~~~~~~~~~~~ make: *** [dlls/winecoreaudio.drv/x86_64-windows/midi.o] Error 1```