-- v3: msvfw32: Use the debugstr_fourcc function instead of reimplementing it. mscms: Use the debugstr_fourcc function instead of reimplementing it. mciavi32: Use the debugstr_fourcc function instead of reimplementing it. ddraw: Use the debugstr_fourcc function instead of reimplementing it. comctl32: Use the debugstr_fourcc function instead of reimplementing it. include: Introduce wine_dbgstr_fourcc and debugstr_fourcc.
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 +- dlls/winecoreaudio.drv/coreaudio.h | 2 +- dlls/winecoreaudio.drv/coremidi.c | 24 ++++++++++++------------ include/wine/debug.h | 11 +++++++++++ libs/strmbase/mediatype.c | 8 -------- 9 files changed, 28 insertions(+), 41 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/dlls/winecoreaudio.drv/coreaudio.h b/dlls/winecoreaudio.drv/coreaudio.h index e04043c4010..687bad54b55 100644 --- a/dlls/winecoreaudio.drv/coreaudio.h +++ b/dlls/winecoreaudio.drv/coreaudio.h @@ -23,7 +23,7 @@ #include "wine/debug.h"
/* fourcc is in native order, where MSB is the first character. */ -static inline const char* wine_dbgstr_fourcc(INT32 fourcc) +static inline const char* coreaudio_dbgstr_fourcc(INT32 fourcc) { char buf[4] = { (char) (fourcc >> 24), (char) (fourcc >> 16), (char) (fourcc >> 8), (char) fourcc }; diff --git a/dlls/winecoreaudio.drv/coremidi.c b/dlls/winecoreaudio.drv/coremidi.c index c9b377f68b0..37cf859a913 100644 --- a/dlls/winecoreaudio.drv/coremidi.c +++ b/dlls/winecoreaudio.drv/coremidi.c @@ -448,7 +448,7 @@ static BOOL synth_unit_create_default(AUGraph *graph, AudioUnit *synth) sc = NewAUGraph(graph); if (sc != noErr) { - ERR("NewAUGraph return %s\n", wine_dbgstr_fourcc(sc)); + ERR("NewAUGraph return %s\n", coreaudio_dbgstr_fourcc(sc)); return FALSE; }
@@ -463,7 +463,7 @@ static BOOL synth_unit_create_default(AUGraph *graph, AudioUnit *synth) sc = AUGraphAddNode(*graph, &desc, &synth_node); if (sc != noErr) { - ERR("AUGraphAddNode cannot create synthNode : %s\n", wine_dbgstr_fourcc(sc)); + ERR("AUGraphAddNode cannot create synthNode : %s\n", coreaudio_dbgstr_fourcc(sc)); return FALSE; }
@@ -474,14 +474,14 @@ static BOOL synth_unit_create_default(AUGraph *graph, AudioUnit *synth) sc = AUGraphAddNode(*graph, &desc, &out_node); if (sc != noErr) { - ERR("AUGraphAddNode cannot create outNode %s\n", wine_dbgstr_fourcc(sc)); + ERR("AUGraphAddNode cannot create outNode %s\n", coreaudio_dbgstr_fourcc(sc)); return FALSE; }
sc = AUGraphOpen(*graph); if (sc != noErr) { - ERR("AUGraphOpen returns %s\n", wine_dbgstr_fourcc(sc)); + ERR("AUGraphOpen returns %s\n", coreaudio_dbgstr_fourcc(sc)); return FALSE; }
@@ -490,7 +490,7 @@ static BOOL synth_unit_create_default(AUGraph *graph, AudioUnit *synth) if (sc != noErr) { ERR("AUGraphConnectNodeInput cannot connect synthNode to outNode : %s\n", - wine_dbgstr_fourcc(sc)); + coreaudio_dbgstr_fourcc(sc)); return FALSE; }
@@ -498,7 +498,7 @@ static BOOL synth_unit_create_default(AUGraph *graph, AudioUnit *synth) sc = AUGraphNodeInfo(*graph, synth_node, 0, synth); if (sc != noErr) { - ERR("AUGraphNodeInfo return %s\n", wine_dbgstr_fourcc(sc)); + ERR("AUGraphNodeInfo return %s\n", coreaudio_dbgstr_fourcc(sc)); return FALSE; }
@@ -512,14 +512,14 @@ static BOOL synth_unit_init(AudioUnit synth, AUGraph graph) sc = AUGraphInitialize(graph); if (sc != noErr) { - ERR("AUGraphInitialize(%p) returns %s\n", graph, wine_dbgstr_fourcc(sc)); + ERR("AUGraphInitialize(%p) returns %s\n", graph, coreaudio_dbgstr_fourcc(sc)); return FALSE; }
sc = AUGraphStart(graph); if (sc != noErr) { - ERR("AUGraphStart(%p) returns %s\n", graph, wine_dbgstr_fourcc(sc)); + ERR("AUGraphStart(%p) returns %s\n", graph, coreaudio_dbgstr_fourcc(sc)); return FALSE; }
@@ -533,14 +533,14 @@ static BOOL synth_unit_close(AUGraph graph) sc = AUGraphStop(graph); if (sc != noErr) { - ERR("AUGraphStop(%p) returns %s\n", graph, wine_dbgstr_fourcc(sc)); + ERR("AUGraphStop(%p) returns %s\n", graph, coreaudio_dbgstr_fourcc(sc)); return FALSE; }
sc = DisposeAUGraph(graph); if (sc != noErr) { - ERR("DisposeAUGraph(%p) returns %s\n", graph, wine_dbgstr_fourcc(sc)); + ERR("DisposeAUGraph(%p) returns %s\n", graph, coreaudio_dbgstr_fourcc(sc)); return FALSE; }
@@ -686,7 +686,7 @@ static UINT midi_out_data(WORD dev_id, UINT data) sc = MusicDeviceMIDIEvent(dest->synth, bytes[0], bytes[1], bytes[2], 0); if (sc != noErr) { - ERR("MusicDeviceMIDIEvent returns %s\n", wine_dbgstr_fourcc(sc)); + ERR("MusicDeviceMIDIEvent returns %s\n", coreaudio_dbgstr_fourcc(sc)); return MMSYSERR_ERROR; } } @@ -739,7 +739,7 @@ static UINT midi_out_long_data(WORD dev_id, MIDIHDR *hdr, UINT hdr_size, struct sc = MusicDeviceSysEx(dest->synth, (const UInt8 *)hdr->lpData, hdr->dwBufferLength); if (sc != noErr) { - ERR("MusicDeviceSysEx returns %s\n", wine_dbgstr_fourcc(sc)); + ERR("MusicDeviceSysEx returns %s\n", coreaudio_dbgstr_fourcc(sc)); return MMSYSERR_ERROR; } } 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 */
From: Alex Henrie alexhenrie24@gmail.com
--- dlls/msvfw32/msvideo_main.c | 48 ++++++++++++++----------------------- 1 file changed, 18 insertions(+), 30 deletions(-)
diff --git a/dlls/msvfw32/msvideo_main.c b/dlls/msvfw32/msvideo_main.c index b9e49d30923..d332300c711 100644 --- a/dlls/msvfw32/msvideo_main.c +++ b/dlls/msvfw32/msvideo_main.c @@ -56,18 +56,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvideo); (str)[3] = HIBYTE(HIWORD(fcc)); \ } while(0)
-static inline const char *wine_dbgstr_fcc( DWORD fcc ) -{ - char fcc_str[5]; - fourcc_to_string(fcc_str, fcc); - fcc_str[4] = '\0'; - /* Last byte may be ' ' in some cases like "DIB " */ - if (isalnum(fcc_str[0]) && isalnum(fcc_str[1]) && isalnum(fcc_str[2]) - && (isalnum(fcc_str[3]) || isspace(fcc_str[3]))) - return wine_dbg_sprintf("%s", fcc_str); - return wine_dbg_sprintf("0x%08lx", fcc); -} - static const char *wine_dbgstr_icerr( int ret ) { const char *str; @@ -276,7 +264,7 @@ BOOL VFWAPI ICInfo(DWORD type, DWORD handler, ICINFO *info) HKEY key;
TRACE("type %s, handler %s, info %p.\n", - wine_dbgstr_fcc(type), wine_dbgstr_fcc(handler), info); + debugstr_fourcc(type), debugstr_fourcc(handler), info);
memset(info, 0, sizeof(*info)); info->dwSize = sizeof(*info); @@ -336,7 +324,7 @@ BOOL VFWAPI ICInfo(DWORD type, DWORD handler, ICINFO *info)
info->fccType = type; info->fccHandler = handler; - WARN("No driver found for codec %s.%s.\n", wine_dbgstr_fcc(type), wine_dbgstr_fcc(handler)); + WARN("No driver found for codec %s.%s.\n", debugstr_fourcc(type), debugstr_fourcc(handler)); return FALSE; }
@@ -350,7 +338,7 @@ BOOL VFWAPI ICInstall(DWORD type, DWORD handler, LPARAM lparam, char *desc, UINT struct reg_driver *driver;
TRACE("type %s, handler %s, lparam %#Ix, desc %s, flags %#x.\n", - wine_dbgstr_fcc(type), wine_dbgstr_fcc(handler), lparam, debugstr_a(desc), flags); + debugstr_fourcc(type), debugstr_fourcc(handler), lparam, debugstr_a(desc), flags);
LIST_FOR_EACH_ENTRY(driver, ®_driver_list, struct reg_driver, entry) { @@ -405,7 +393,7 @@ BOOL VFWAPI ICRemove(DWORD type, DWORD handler, UINT flags) LONG res;
TRACE("type %s, handler %s, flags %#x.\n", - wine_dbgstr_fcc(type), wine_dbgstr_fcc(handler), flags); + debugstr_fourcc(type), debugstr_fourcc(handler), flags);
LIST_FOR_EACH_ENTRY(driver, ®_driver_list, struct reg_driver, entry) { @@ -446,7 +434,7 @@ HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode) struct reg_driver *driver; HDRVR hdrv = NULL;
- TRACE("(%s,%s,0x%08x)\n", wine_dbgstr_fcc(fccType), wine_dbgstr_fcc(fccHandler), wMode); + TRACE("(%s,%s,0x%08x)\n", debugstr_fourcc(fccType), debugstr_fourcc(fccHandler), wMode);
if (!fccHandler) /* No specific handler, return the first valid for wMode */ { @@ -463,7 +451,7 @@ HIC VFWAPI ICOpen(DWORD fccType, DWORD fccHandler, UINT wMode) if (local != 0) { TRACE("Returning %s as default handler for %s\n", - wine_dbgstr_fcc(info.fccHandler), wine_dbgstr_fcc(fccType)); + debugstr_fourcc(info.fccHandler), debugstr_fourcc(fccType)); return local; } } @@ -537,7 +525,7 @@ HIC VFWAPI ICOpenFunction(DWORD fccType, DWORD fccHandler, UINT wMode, DRIVERPRO WINE_HIC* whic;
TRACE("(%s,%s,%d,%p)\n", - wine_dbgstr_fcc(fccType), wine_dbgstr_fcc(fccHandler), wMode, lpfnHandler); + debugstr_fourcc(fccType), debugstr_fourcc(fccHandler), wMode, lpfnHandler);
icopen.dwSize = sizeof(ICOPEN); icopen.fccType = fccType; @@ -638,7 +626,7 @@ HIC VFWAPI ICLocate(DWORD type, DWORD handler, BITMAPINFOHEADER *in, DWORD i;
TRACE("type %s, handler %s, in %p, out %p, mode %u.\n", - wine_dbgstr_fcc(type), wine_dbgstr_fcc(handler), in, out, mode); + debugstr_fourcc(type), debugstr_fourcc(handler), in, out, mode);
switch (mode) { @@ -662,8 +650,8 @@ HIC VFWAPI ICLocate(DWORD type, DWORD handler, BITMAPINFOHEADER *in, { if (!ICSendMessage(hic, msg, (DWORD_PTR)in, (DWORD_PTR)out)) { - TRACE("Found codec %s.%s.\n", wine_dbgstr_fcc(type), - wine_dbgstr_fcc(handler)); + TRACE("Found codec %s.%s.\n", debugstr_fourcc(type), + debugstr_fourcc(handler)); return hic; } ICClose(hic); @@ -675,8 +663,8 @@ HIC VFWAPI ICLocate(DWORD type, DWORD handler, BITMAPINFOHEADER *in, { if (!ICSendMessage(hic, msg, (DWORD_PTR)in, (DWORD_PTR)out)) { - TRACE("Found codec %s.%s.\n", wine_dbgstr_fcc(info.fccType), - wine_dbgstr_fcc(info.fccHandler)); + TRACE("Found codec %s.%s.\n", debugstr_fourcc(info.fccType), + debugstr_fourcc(info.fccHandler)); return hic; } ICClose(hic); @@ -687,7 +675,7 @@ HIC VFWAPI ICLocate(DWORD type, DWORD handler, BITMAPINFOHEADER *in, return ICLocate(ICTYPE_VIDEO, handler, in, out, mode);
WARN("Could not find a driver for codec %s.%s.\n", - wine_dbgstr_fcc(type), wine_dbgstr_fcc(handler)); + debugstr_fourcc(type), debugstr_fourcc(handler));
return 0; } @@ -886,7 +874,7 @@ static BOOL enum_compressors(HWND list, COMPVARS *pcv, BOOL enum_all) if (ICCompressQuery(hic, pcv->lpbiIn, NULL) != ICERR_OK) { TRACE("fccHandler %s doesn't support input DIB format %ld\n", - wine_dbgstr_fcc(icinfo.fccHandler), pcv->lpbiIn->bmiHeader.biCompression); + debugstr_fourcc(icinfo.fccHandler), pcv->lpbiIn->bmiHeader.biCompression); ICClose(hic); continue; } @@ -1580,12 +1568,12 @@ BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS pc, LPBITMAPINFO lpbiIn)
TRACE("Input: %lux%lu, fcc %s, bpp %u, size %lu\n", pc->lpbiIn->bmiHeader.biWidth, pc->lpbiIn->bmiHeader.biHeight, - wine_dbgstr_fcc(pc->lpbiIn->bmiHeader.biCompression), + debugstr_fourcc(pc->lpbiIn->bmiHeader.biCompression), pc->lpbiIn->bmiHeader.biBitCount, pc->lpbiIn->bmiHeader.biSizeImage); TRACE("Output: %lux%lu, fcc %s, bpp %u, size %lu\n", pc->lpbiOut->bmiHeader.biWidth, pc->lpbiOut->bmiHeader.biHeight, - wine_dbgstr_fcc(pc->lpbiOut->bmiHeader.biCompression), + debugstr_fourcc(pc->lpbiOut->bmiHeader.biCompression), pc->lpbiOut->bmiHeader.biBitCount, pc->lpbiOut->bmiHeader.biSizeImage);
@@ -1605,8 +1593,8 @@ BOOL VFWAPI ICSeqCompressFrameStart(PCOMPVARS pc, LPBITMAPINFO lpbiIn) "\thandler: %s\n" "\tin/out: %p/%p\n" "\tkey/data/quality: %li/%li/%li\n", - pc->cbSize, pc->dwFlags, pc->hic, wine_dbgstr_fcc(pc->fccType), - wine_dbgstr_fcc(pc->fccHandler), pc->lpbiIn, pc->lpbiOut, pc->lKey, + pc->cbSize, pc->dwFlags, pc->hic, debugstr_fourcc(pc->fccType), + debugstr_fourcc(pc->fccHandler), pc->lpbiIn, pc->lpbiOut, pc->lKey, pc->lDataRate, pc->lQ);
ret = ICSendMessage(pc->hic, ICM_COMPRESS_BEGIN, (DWORD_PTR)pc->lpbiIn, (DWORD_PTR)pc->lpbiOut);
On Wed Oct 4 05:01:56 2023 +0000, Alex Henrie wrote:
changed this line in [version 3 of the diff](/wine/wine/-/merge_requests/3994/diffs?diff_id=73707&start_sha=f22acc2bfabcc116c5e22f03e63c426f36d6e75f#4d6491f8d93fc507edba4eb9283114b7e36ceea5_333_332)
Fixed, thanks.
This merge request was approved by Zebediah Figura.