From ce00200080a9511156b4e1477c4884960477760e Mon Sep 17 00:00:00 2001 From: Alex Henrie Date: Mon, 2 Oct 2023 21:38:30 -0600 Subject: [PATCH] mscms: Use the debugstr_fourcc function instead of reimplementing it. --- 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 */