From bc3d4b5d76ab251ff22b7dd263c54c185a327985 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Thu, 12 Dec 2019 01:10:55 +0100 Subject: [PATCH] dmband: Move debugstr_fourcc() to dmobject.h. Signed-off-by: Michael Stefaniuc Signed-off-by: Alexandre Julliard --- dlls/dmband/dmobject.c | 7 ------- dlls/dmband/dmobject.h | 12 ++++++++++-- dlls/dmband/dmutils.c | 9 +-------- dlls/dmband/dmutils.h | 2 -- 4 files changed, 11 insertions(+), 19 deletions(-) diff --git a/dlls/dmband/dmobject.c b/dlls/dmband/dmobject.c index 25f3198d2bc..3b71a2719c7 100644 --- a/dlls/dmband/dmobject.c +++ b/dlls/dmband/dmobject.c @@ -34,13 +34,6 @@ WINE_DECLARE_DEBUG_CHANNEL(dmfile); /* RIFF format parsing */ #define CHUNK_HDR_SIZE (sizeof(FOURCC) + sizeof(DWORD)) -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)); -} - const char *debugstr_chunk(const struct chunk_entry *chunk) { const char *type = ""; diff --git a/dlls/dmband/dmobject.h b/dlls/dmband/dmobject.h index 4a721cc1521..9e287a4126b 100644 --- a/dlls/dmband/dmobject.h +++ b/dlls/dmband/dmobject.h @@ -60,8 +60,6 @@ static inline HRESULT stream_reset_chunk_start(IStream *stream, const struct chu return IStream_Seek(stream, offset, STREAM_SEEK_SET, NULL); } -const char *debugstr_chunk(const struct chunk_entry *chunk) DECLSPEC_HIDDEN; - /* IDirectMusicObject base object */ struct dmobject { @@ -106,3 +104,13 @@ HRESULT WINAPI unimpl_IPersistStream_Save(IPersistStream *iface, IStream *stream BOOL clear_dirty) DECLSPEC_HIDDEN; HRESULT WINAPI unimpl_IPersistStream_GetSizeMax(IPersistStream *iface, ULARGE_INTEGER *size) DECLSPEC_HIDDEN; + +/* Debugging helpers */ +const char *debugstr_chunk(const struct chunk_entry *chunk) DECLSPEC_HIDDEN; + +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/dmband/dmutils.c b/dlls/dmband/dmutils.c index af24054bf4e..2401b20a601 100644 --- a/dlls/dmband/dmutils.c +++ b/dlls/dmband/dmutils.c @@ -40,6 +40,7 @@ #include "dmusics.h" #include "dmutils.h" +#include "dmobject.h" WINE_DEFAULT_DEBUG_CHANNEL(dmusic); WINE_DECLARE_DEBUG_CHANNEL(dmfile); @@ -296,14 +297,6 @@ HRESULT IDirectMusicUtils_IPersistStream_ParseReference (LPPERSISTSTREAM iface, return hr; } -/* FOURCC to string conversion for debug messages */ -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)); -} - /* returns name of given GUID */ const char *debugstr_dmguid (const GUID *id) { static const guid_info guids[] = { diff --git a/dlls/dmband/dmutils.h b/dlls/dmband/dmutils.h index bb93e05c2ba..5a845a81a80 100644 --- a/dlls/dmband/dmutils.h +++ b/dlls/dmband/dmutils.h @@ -52,8 +52,6 @@ typedef struct { #define FE(x) { x, #x } #define GE(x) { &x, #x } -/* FOURCC to string conversion for debug messages */ -extern const char *debugstr_fourcc (DWORD fourcc) DECLSPEC_HIDDEN; /* returns name of given GUID */ extern const char *debugstr_dmguid (const GUID *id) DECLSPEC_HIDDEN;