Module: wine Branch: master Commit: f0ccd389d4e999c4c82631604f65a2db9b8e00e1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=f0ccd389d4e999c4c82631604f...
Author: Francois Gouget fgouget@free.fr Date: Wed Dec 6 12:05:31 2006 +0100
ole32: Convert dump_FORMATETC() into debugstr_formatetc(), a proper debug trace function.
---
dlls/ole32/datacache.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/dlls/ole32/datacache.c b/dlls/ole32/datacache.c index 301be87..33795f3 100644 --- a/dlls/ole32/datacache.c +++ b/dlls/ole32/datacache.c @@ -189,11 +189,11 @@ static inline DataCache *impl_from_IOleC return (DataCache *)((char*)iface - FIELD_OFFSET(DataCache, lpvtblIOleCacheControl)); }
-static void dump_FORMATETC(const FORMATETC *formatetc) +static const char * debugstr_formatetc(const FORMATETC *formatetc) { - TRACE("{ cfFormat = 0x%x, ptd = %p, dwAspect = %d, lindex = %d, tymed = %d }", - formatetc->cfFormat, formatetc->ptd, formatetc->dwAspect, - formatetc->lindex, formatetc->tymed); + return wine_dbg_sprintf("{ cfFormat = 0x%x, ptd = %p, dwAspect = %d, lindex = %d, tymed = %d }", + formatetc->cfFormat, formatetc->ptd, formatetc->dwAspect, + formatetc->lindex, formatetc->tymed); }
/* @@ -580,7 +580,7 @@ static HRESULT DataCacheEntry_Save(DataC IStream *pres_stream; void *data = NULL;
- TRACE("stream_number = %d, fmtetc = ", This->stream_number); dump_FORMATETC(&This->fmtetc); TRACE("\n"); + TRACE("stream_number = %d, fmtetc = %s\n", This->stream_number, debugstr_formatetc(&This->fmtetc));
hr = DataCacheEntry_CreateStream(This, storage, &pres_stream); if (FAILED(hr)) @@ -1268,7 +1268,7 @@ static HRESULT WINAPI DataCache_Load( fmtetc.lindex = header.lindex; fmtetc.tymed = header.tymed;
- TRACE("loading entry with formatetc: "); dump_FORMATETC(&fmtetc); TRACE("\n"); + TRACE("loading entry with formatetc: %s\n", debugstr_formatetc(&fmtetc));
cache_entry = DataCache_GetEntryForFormatEtc(This, &fmtetc); if (!cache_entry) @@ -1876,7 +1876,7 @@ static HRESULT WINAPI DataCache_Cache( HRESULT hr;
TRACE("(%p, 0x%x, %p)\n", pformatetc, advf, pdwConnection); - TRACE("pformatetc = "); dump_FORMATETC(pformatetc); TRACE("\n"); + TRACE("pformatetc = %s\n", debugstr_formatetc(pformatetc));
*pdwConnection = 0;
@@ -1944,7 +1944,7 @@ static HRESULT WINAPI DataCache_IOleCach HRESULT hr;
TRACE("(%p, %p, %s)\n", pformatetc, pmedium, fRelease ? "TRUE" : "FALSE"); - TRACE("formatetc = "); dump_FORMATETC(pformatetc); TRACE("\n"); + TRACE("formatetc = %s\n", debugstr_formatetc(pformatetc));
cache_entry = DataCache_GetEntryForFormatEtc(This, pformatetc); if (cache_entry)