From 4914f51c096dc6d19f9c4c3fdecb0b17b3ed1008 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Thu, 4 Feb 2021 13:19:46 +0300 Subject: [PATCH] dwrite: Change remaining traces to have consistent format. Signed-off-by: Nikolay Sivov Signed-off-by: Alexandre Julliard --- dlls/dwrite/analyzer.c | 50 +++++++++++++++++++----------------- dlls/dwrite/font.c | 58 ++++++++++++++++++++---------------------- dlls/dwrite/layout.c | 4 +-- dlls/dwrite/main.c | 2 +- dlls/dwrite/opentype.c | 2 +- 5 files changed, 58 insertions(+), 58 deletions(-) diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c index 8d573ed530d..f717bb47c80 100644 --- a/dlls/dwrite/analyzer.c +++ b/dlls/dwrite/analyzer.c @@ -820,7 +820,7 @@ static HRESULT analyze_linebreaks(const WCHAR *text, UINT32 count, DWRITE_LINE_B static HRESULT WINAPI dwritetextanalyzer_QueryInterface(IDWriteTextAnalyzer2 *iface, REFIID riid, void **obj) { - TRACE("(%s %p)\n", debugstr_guid(riid), obj); + TRACE("%s, %p.\n", debugstr_guid(riid), obj); if (IsEqualIID(riid, &IID_IDWriteTextAnalyzer2) || IsEqualIID(riid, &IID_IDWriteTextAnalyzer1) || @@ -894,7 +894,7 @@ static HRESULT WINAPI dwritetextanalyzer_AnalyzeScript(IDWriteTextAnalyzer2 *ifa const WCHAR *text; HRESULT hr; - TRACE("(%p %u %u %p)\n", source, position, length, sink); + TRACE("%p, %u, %u, %p.\n", source, position, length, sink); if (length == 0) return S_OK; @@ -919,7 +919,7 @@ static HRESULT WINAPI dwritetextanalyzer_AnalyzeBidi(IDWriteTextAnalyzer2 *iface const WCHAR *text; HRESULT hr; - TRACE("(%p %u %u %p)\n", source, position, length, sink); + TRACE("%p, %u, %u, %p.\n", source, position, length, sink); if (!length) return S_OK; @@ -990,7 +990,7 @@ static HRESULT WINAPI dwritetextanalyzer_AnalyzeLineBreakpoints(IDWriteTextAnaly HRESULT hr; UINT32 len; - TRACE("(%p %u %u %p)\n", source, position, length, sink); + TRACE("%p, %u, %u, %p.\n", source, position, length, sink); if (length == 0) return S_OK; @@ -1156,7 +1156,7 @@ static HRESULT WINAPI dwritetextanalyzer_GetGlyphs(IDWriteTextAnalyzer2 *iface, WCHAR digits[NATIVE_DIGITS_LEN]; HRESULT hr; - TRACE("(%s:%u %p %d %d %s %s %p %p %p %u %u %p %p %p %p %p)\n", debugstr_wn(text, length), + TRACE("%s:%u, %p, %d, %d, %s, %s, %p, %p, %p, %u, %u, %p, %p, %p, %p, %p.\n", debugstr_wn(text, length), length, fontface, is_sideways, is_rtl, debugstr_sa_script(analysis->script), debugstr_w(locale), substitution, features, feature_range_lengths, feature_ranges, max_glyph_count, clustermap, text_props, glyphs, glyph_props, actual_glyph_count); @@ -1512,7 +1512,7 @@ static HRESULT WINAPI dwritetextanalyzer1_ApplyCharacterSpacing(IDWriteTextAnaly { unsigned int i; - TRACE("(%.2f %.2f %.2f %u %u %p %p %p %p %p %p)\n", leading_spacing, trailing_spacing, min_advance_width, + TRACE("%.2f, %.2f, %.2f, %u, %u, %p, %p, %p, %p, %p, %p.\n", leading_spacing, trailing_spacing, min_advance_width, len, glyph_count, clustermap, advances, offsets, props, modified_advances, modified_offsets); if (min_advance_width < 0.0f) { @@ -1607,14 +1607,15 @@ static HRESULT WINAPI dwritetextanalyzer1_AnalyzeVerticalGlyphOrientation(IDWrit static HRESULT WINAPI dwritetextanalyzer1_GetGlyphOrientationTransform(IDWriteTextAnalyzer2 *iface, DWRITE_GLYPH_ORIENTATION_ANGLE angle, BOOL is_sideways, DWRITE_MATRIX *transform) { - TRACE("(%d %d %p)\n", angle, is_sideways, transform); + TRACE("%d, %d, %p.\n", angle, is_sideways, transform); + return IDWriteTextAnalyzer2_GetGlyphOrientationTransform(iface, angle, is_sideways, 0.0, 0.0, transform); } static HRESULT WINAPI dwritetextanalyzer1_GetScriptProperties(IDWriteTextAnalyzer2 *iface, DWRITE_SCRIPT_ANALYSIS sa, DWRITE_SCRIPT_PROPERTIES *props) { - TRACE("(%u %p)\n", sa.script, props); + TRACE("%u, %p.\n", sa.script, props); if (sa.script > Script_LastId) return E_INVALIDARG; @@ -1641,7 +1642,7 @@ static HRESULT WINAPI dwritetextanalyzer1_GetTextComplexity(IDWriteTextAnalyzer2 HRESULT hr = S_OK; int i; - TRACE("(%s:%u %p %p %p %p)\n", debugstr_wn(text, len), len, face, is_simple, len_read, indices); + TRACE("%s:%u, %p, %p, %p, %p.\n", debugstr_wn(text, len), len, face, is_simple, len_read, indices); *is_simple = FALSE; *len_read = 0; @@ -1723,7 +1724,7 @@ static HRESULT WINAPI dwritetextanalyzer2_GetGlyphOrientationTransform(IDWriteTe { 0.0f, -1.0f, 1.0f, 0.0f, 0.0f, 0.0f } }; - TRACE("(%d %d %.2f %.2f %p)\n", angle, is_sideways, originX, originY, m); + TRACE("%d, %d, %.2f, %.2f, %p.\n", angle, is_sideways, originX, originY, m); if ((UINT32)angle > DWRITE_GLYPH_ORIENTATION_ANGLE_270_DEGREES) { memset(m, 0, sizeof(*m)); @@ -1850,9 +1851,7 @@ IDWriteTextAnalyzer *get_text_analyzer(void) static HRESULT WINAPI dwritenumbersubstitution_QueryInterface(IDWriteNumberSubstitution *iface, REFIID riid, void **obj) { - struct dwrite_numbersubstitution *This = impl_from_IDWriteNumberSubstitution(iface); - - TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), obj); + TRACE("%p, %s, %p.\n", iface, debugstr_guid(riid), obj); if (IsEqualIID(riid, &IID_IDWriteNumberSubstitution) || IsEqualIID(riid, &IID_IUnknown)) @@ -1871,25 +1870,28 @@ static HRESULT WINAPI dwritenumbersubstitution_QueryInterface(IDWriteNumberSubst static ULONG WINAPI dwritenumbersubstitution_AddRef(IDWriteNumberSubstitution *iface) { - struct dwrite_numbersubstitution *This = impl_from_IDWriteNumberSubstitution(iface); - ULONG ref = InterlockedIncrement(&This->ref); - TRACE("(%p)->(%d)\n", This, ref); - return ref; + struct dwrite_numbersubstitution *object = impl_from_IDWriteNumberSubstitution(iface); + ULONG refcount = InterlockedIncrement(&object->ref); + + TRACE("%p, refcount %d.\n", iface, refcount); + + return refcount; } static ULONG WINAPI dwritenumbersubstitution_Release(IDWriteNumberSubstitution *iface) { - struct dwrite_numbersubstitution *This = impl_from_IDWriteNumberSubstitution(iface); - ULONG ref = InterlockedDecrement(&This->ref); + struct dwrite_numbersubstitution *object = impl_from_IDWriteNumberSubstitution(iface); + ULONG refcount = InterlockedDecrement(&object->ref); - TRACE("(%p)->(%d)\n", This, ref); + TRACE("%p, refcount %d.\n", iface, refcount); - if (!ref) { - heap_free(This->locale); - heap_free(This); + if (!refcount) + { + heap_free(object->locale); + heap_free(object); } - return ref; + return refcount; } static const IDWriteNumberSubstitutionVtbl numbersubstitutionvtbl = diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index f1db6dd732b..e22e4abf271 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -6662,9 +6662,7 @@ HRESULT create_fontfacereference(IDWriteFactory7 *factory, IDWriteFontFile *file static HRESULT WINAPI inmemoryfilestream_QueryInterface(IDWriteFontFileStream *iface, REFIID riid, void **obj) { - struct dwrite_inmemory_filestream *stream = inmemory_impl_from_IDWriteFontFileStream(iface); - - TRACE_(dwrite_file)("(%p)->(%s, %p)\n", stream, debugstr_guid(riid), obj); + TRACE_(dwrite_file)("%p, %s, %p.\n", iface, debugstr_guid(riid), obj); if (IsEqualIID(riid, &IID_IDWriteFontFileStream) || IsEqualIID(riid, &IID_IUnknown)) { *obj = iface; @@ -6681,24 +6679,27 @@ static HRESULT WINAPI inmemoryfilestream_QueryInterface(IDWriteFontFileStream *i static ULONG WINAPI inmemoryfilestream_AddRef(IDWriteFontFileStream *iface) { struct dwrite_inmemory_filestream *stream = inmemory_impl_from_IDWriteFontFileStream(iface); - ULONG ref = InterlockedIncrement(&stream->ref); - TRACE_(dwrite_file)("(%p)->(%u)\n", stream, ref); - return ref; + ULONG refcount = InterlockedIncrement(&stream->ref); + + TRACE_(dwrite_file)("%p, refcount %u.\n", iface, refcount); + + return refcount; } static ULONG WINAPI inmemoryfilestream_Release(IDWriteFontFileStream *iface) { struct dwrite_inmemory_filestream *stream = inmemory_impl_from_IDWriteFontFileStream(iface); - ULONG ref = InterlockedDecrement(&stream->ref); + ULONG refcount = InterlockedDecrement(&stream->ref); - TRACE_(dwrite_file)("(%p)->(%u)\n", stream, ref); + TRACE_(dwrite_file)("%p, refcount %u.\n", iface, refcount); - if (!ref) { + if (!refcount) + { release_inmemory_stream(stream->data); heap_free(stream); } - return ref; + return refcount; } static HRESULT WINAPI inmemoryfilestream_ReadFileFragment(IDWriteFontFileStream *iface, void const **fragment_start, @@ -6706,7 +6707,7 @@ static HRESULT WINAPI inmemoryfilestream_ReadFileFragment(IDWriteFontFileStream { struct dwrite_inmemory_filestream *stream = inmemory_impl_from_IDWriteFontFileStream(iface); - TRACE_(dwrite_file)("(%p)->(%p, 0x%s, 0x%s, %p)\n", stream, fragment_start, + TRACE_(dwrite_file)("%p, %p, 0x%s, 0x%s, %p.\n", iface, fragment_start, wine_dbgstr_longlong(offset), wine_dbgstr_longlong(fragment_size), fragment_context); *fragment_context = NULL; @@ -6722,16 +6723,14 @@ static HRESULT WINAPI inmemoryfilestream_ReadFileFragment(IDWriteFontFileStream static void WINAPI inmemoryfilestream_ReleaseFileFragment(IDWriteFontFileStream *iface, void *fragment_context) { - struct dwrite_inmemory_filestream *stream = inmemory_impl_from_IDWriteFontFileStream(iface); - - TRACE_(dwrite_file)("(%p)->(%p)\n", stream, fragment_context); + TRACE_(dwrite_file)("%p, %p.\n", iface, fragment_context); } static HRESULT WINAPI inmemoryfilestream_GetFileSize(IDWriteFontFileStream *iface, UINT64 *size) { struct dwrite_inmemory_filestream *stream = inmemory_impl_from_IDWriteFontFileStream(iface); - TRACE_(dwrite_file)("(%p)->(%p)\n", stream, size); + TRACE_(dwrite_file)("%p, %p.\n", iface, size); *size = stream->data->size; @@ -6740,9 +6739,7 @@ static HRESULT WINAPI inmemoryfilestream_GetFileSize(IDWriteFontFileStream *ifac static HRESULT WINAPI inmemoryfilestream_GetLastWriteTime(IDWriteFontFileStream *iface, UINT64 *last_writetime) { - struct dwrite_inmemory_filestream *stream = inmemory_impl_from_IDWriteFontFileStream(iface); - - TRACE_(dwrite_file)("(%p)->(%p)\n", stream, last_writetime); + TRACE_(dwrite_file)("%p, %p.\n", iface, last_writetime); *last_writetime = 0; @@ -6762,9 +6759,7 @@ static const IDWriteFontFileStreamVtbl inmemoryfilestreamvtbl = { static HRESULT WINAPI inmemoryfontfileloader_QueryInterface(IDWriteInMemoryFontFileLoader *iface, REFIID riid, void **obj) { - struct dwrite_inmemory_fileloader *loader = impl_from_IDWriteInMemoryFontFileLoader(iface); - - TRACE("(%p)->(%s, %p)\n", loader, debugstr_guid(riid), obj); + TRACE("%p, %s, %p.\n", iface, debugstr_guid(riid), obj); if (IsEqualIID(riid, &IID_IDWriteInMemoryFontFileLoader) || IsEqualIID(riid, &IID_IDWriteFontFileLoader) || @@ -6785,27 +6780,30 @@ static HRESULT WINAPI inmemoryfontfileloader_QueryInterface(IDWriteInMemoryFontF static ULONG WINAPI inmemoryfontfileloader_AddRef(IDWriteInMemoryFontFileLoader *iface) { struct dwrite_inmemory_fileloader *loader = impl_from_IDWriteInMemoryFontFileLoader(iface); - ULONG ref = InterlockedIncrement(&loader->ref); - TRACE("(%p)->(%u)\n", loader, ref); - return ref; + ULONG refcount = InterlockedIncrement(&loader->ref); + + TRACE("%p, refcount %u.\n", iface, refcount); + + return refcount; } static ULONG WINAPI inmemoryfontfileloader_Release(IDWriteInMemoryFontFileLoader *iface) { struct dwrite_inmemory_fileloader *loader = impl_from_IDWriteInMemoryFontFileLoader(iface); - ULONG ref = InterlockedDecrement(&loader->ref); + ULONG refcount = InterlockedDecrement(&loader->ref); size_t i; - TRACE("(%p)->(%u)\n", loader, ref); + TRACE("%p, refcount %u.\n", iface, refcount); - if (!ref) { + if (!refcount) + { for (i = 0; i < loader->count; ++i) release_inmemory_stream(loader->streams[i]); heap_free(loader->streams); heap_free(loader); } - return ref; + return refcount; } static HRESULT WINAPI inmemoryfontfileloader_CreateStreamFromKey(IDWriteInMemoryFontFileLoader *iface, @@ -6815,7 +6813,7 @@ static HRESULT WINAPI inmemoryfontfileloader_CreateStreamFromKey(IDWriteInMemory struct dwrite_inmemory_filestream *stream; DWORD index; - TRACE("(%p)->(%p, %u, %p)\n", loader, key, key_size, ret); + TRACE("%p, %p, %u, %p.\n", iface, key, key_size, ret); *ret = NULL; @@ -6847,7 +6845,7 @@ static HRESULT WINAPI inmemoryfontfileloader_CreateInMemoryFontFileReference(IDW struct dwrite_inmemory_stream_data *stream; DWORD key; - TRACE("(%p)->(%p, %p, %u, %p, %p)\n", loader, factory, data, data_size, owner, fontfile); + TRACE("%p, %p, %p, %u, %p, %p.\n", iface, factory, data, data_size, owner, fontfile); *fontfile = NULL; diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index 0b5bad80339..b68daf0345b 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -4935,7 +4935,7 @@ static HRESULT WINAPI dwritetextlayout_source_GetTextAtPosition(IDWriteTextAnaly { struct dwrite_textlayout *layout = impl_from_IDWriteTextAnalysisSource1(iface); - TRACE("(%p)->(%u %p %p)\n", layout, position, text, text_len); + TRACE("%p, %u, %p, %p.\n", iface, position, text, text_len); if (position < layout->len) { *text = &layout->str[position]; @@ -4954,7 +4954,7 @@ static HRESULT WINAPI dwritetextlayout_source_GetTextBeforePosition(IDWriteTextA { struct dwrite_textlayout *layout = impl_from_IDWriteTextAnalysisSource1(iface); - TRACE("(%p)->(%u %p %p)\n", layout, position, text, text_len); + TRACE("%p, %u, %p, %p.\n", iface, position, text, text_len); if (position > 0 && position < layout->len) { *text = layout->str; diff --git a/dlls/dwrite/main.c b/dlls/dwrite/main.c index f550c204b6d..40c82b6cd05 100644 --- a/dlls/dwrite/main.c +++ b/dlls/dwrite/main.c @@ -1931,7 +1931,7 @@ HRESULT WINAPI DWriteCreateFactory(DWRITE_FACTORY_TYPE type, REFIID riid, IUnkno struct dwritefactory *factory; HRESULT hr; - TRACE("(%d, %s, %p)\n", type, debugstr_guid(riid), ret); + TRACE("%d, %s, %p.\n", type, debugstr_guid(riid), ret); *ret = NULL; diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index ae9a88a876c..0e5b8c75f62 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -2159,7 +2159,7 @@ void opentype_get_font_properties(struct file_stream_desc *stream_desc, struct d IDWriteFontFileStream_ReleaseFileFragment(stream_desc->stream, colr.context); } - TRACE("stretch=%d, weight=%d, style %d\n", props->stretch, props->weight, props->style); + TRACE("stretch %d, weight %d, style %d\n", props->stretch, props->weight, props->style); if (os2.data) IDWriteFontFileStream_ReleaseFileFragment(stream_desc->stream, os2.context);