Commit 46667959 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dwrite: Enable compilation with long types.

parent 86bc819f
EXTRADEFS = -DWINE_NO_LONG_TYPES
MODULE = dwrite.dll MODULE = dwrite.dll
IMPORTLIB = dwrite IMPORTLIB = dwrite
UNIXLIB = dwrite.so UNIXLIB = dwrite.so
......
...@@ -1093,7 +1093,7 @@ static void get_number_substitutes(IDWriteNumberSubstitution *substitution, BOOL ...@@ -1093,7 +1093,7 @@ static void get_number_substitutes(IDWriteNumberSubstitution *substitution, BOOL
case 1: case 1:
default: default:
if (value != 1) if (value != 1)
WARN("Unknown IDIGITSUBSTITUTION value %u, locale %s.\n", value, debugstr_w(numbersubst->locale)); WARN("Unknown IDIGITSUBSTITUTION value %lu, locale %s.\n", value, debugstr_w(numbersubst->locale));
} }
} }
else else
...@@ -1905,7 +1905,7 @@ static ULONG WINAPI dwritenumbersubstitution_AddRef(IDWriteNumberSubstitution *i ...@@ -1905,7 +1905,7 @@ static ULONG WINAPI dwritenumbersubstitution_AddRef(IDWriteNumberSubstitution *i
struct dwrite_numbersubstitution *object = impl_from_IDWriteNumberSubstitution(iface); struct dwrite_numbersubstitution *object = impl_from_IDWriteNumberSubstitution(iface);
ULONG refcount = InterlockedIncrement(&object->refcount); ULONG refcount = InterlockedIncrement(&object->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -1915,7 +1915,7 @@ static ULONG WINAPI dwritenumbersubstitution_Release(IDWriteNumberSubstitution * ...@@ -1915,7 +1915,7 @@ static ULONG WINAPI dwritenumbersubstitution_Release(IDWriteNumberSubstitution *
struct dwrite_numbersubstitution *object = impl_from_IDWriteNumberSubstitution(iface); struct dwrite_numbersubstitution *object = impl_from_IDWriteNumberSubstitution(iface);
ULONG refcount = InterlockedDecrement(&object->refcount); ULONG refcount = InterlockedDecrement(&object->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -2122,7 +2122,7 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback, ...@@ -2122,7 +2122,7 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
hr = fallback_map_characters(*mapped_font, text, length, mapped_length); hr = fallback_map_characters(*mapped_font, text, length, mapped_length);
if (FAILED(hr)) if (FAILED(hr))
WARN("Mapping with fallback family %s failed, hr %#x.\n", debugstr_w(mapping->families[i]), hr); WARN("Mapping with fallback family %s failed, hr %#lx.\n", debugstr_w(mapping->families[i]), hr);
if (!*mapped_length) { if (!*mapped_length) {
IDWriteFont_Release(*mapped_font); IDWriteFont_Release(*mapped_font);
...@@ -2247,7 +2247,7 @@ static ULONG WINAPI customfontfallback_AddRef(IDWriteFontFallback1 *iface) ...@@ -2247,7 +2247,7 @@ static ULONG WINAPI customfontfallback_AddRef(IDWriteFontFallback1 *iface)
struct dwrite_fontfallback *fallback = impl_from_IDWriteFontFallback1(iface); struct dwrite_fontfallback *fallback = impl_from_IDWriteFontFallback1(iface);
ULONG refcount = InterlockedIncrement(&fallback->refcount); ULONG refcount = InterlockedIncrement(&fallback->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -2257,7 +2257,7 @@ static ULONG WINAPI customfontfallback_Release(IDWriteFontFallback1 *iface) ...@@ -2257,7 +2257,7 @@ static ULONG WINAPI customfontfallback_Release(IDWriteFontFallback1 *iface)
struct dwrite_fontfallback *fallback = impl_from_IDWriteFontFallback1(iface); struct dwrite_fontfallback *fallback = impl_from_IDWriteFontFallback1(iface);
ULONG refcount = InterlockedDecrement(&fallback->refcount); ULONG refcount = InterlockedDecrement(&fallback->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -2320,7 +2320,7 @@ static ULONG WINAPI fontfallbackbuilder_AddRef(IDWriteFontFallbackBuilder *iface ...@@ -2320,7 +2320,7 @@ static ULONG WINAPI fontfallbackbuilder_AddRef(IDWriteFontFallbackBuilder *iface
struct dwrite_fontfallback_builder *fallbackbuilder = impl_from_IDWriteFontFallbackBuilder(iface); struct dwrite_fontfallback_builder *fallbackbuilder = impl_from_IDWriteFontFallbackBuilder(iface);
ULONG refcount = InterlockedIncrement(&fallbackbuilder->refcount); ULONG refcount = InterlockedIncrement(&fallbackbuilder->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -2331,7 +2331,7 @@ static ULONG WINAPI fontfallbackbuilder_Release(IDWriteFontFallbackBuilder *ifac ...@@ -2331,7 +2331,7 @@ static ULONG WINAPI fontfallbackbuilder_Release(IDWriteFontFallbackBuilder *ifac
ULONG refcount = InterlockedDecrement(&fallbackbuilder->refcount); ULONG refcount = InterlockedDecrement(&fallbackbuilder->refcount);
size_t i; size_t i;
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
......
...@@ -817,7 +817,7 @@ static ULONG WINAPI dwritefontface_AddRef(IDWriteFontFace5 *iface) ...@@ -817,7 +817,7 @@ static ULONG WINAPI dwritefontface_AddRef(IDWriteFontFace5 *iface)
struct dwrite_fontface *fontface = impl_from_IDWriteFontFace5(iface); struct dwrite_fontface *fontface = impl_from_IDWriteFontFace5(iface);
ULONG refcount = InterlockedIncrement(&fontface->refcount); ULONG refcount = InterlockedIncrement(&fontface->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -828,7 +828,7 @@ static ULONG WINAPI dwritefontface_Release(IDWriteFontFace5 *iface) ...@@ -828,7 +828,7 @@ static ULONG WINAPI dwritefontface_Release(IDWriteFontFace5 *iface)
ULONG refcount = InterlockedDecrement(&fontface->refcount); ULONG refcount = InterlockedDecrement(&fontface->refcount);
struct release_font_object_params params = { fontface->font_object }; struct release_font_object_params params = { fontface->font_object };
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -2240,7 +2240,7 @@ static ULONG WINAPI dwritefont_AddRef(IDWriteFont3 *iface) ...@@ -2240,7 +2240,7 @@ static ULONG WINAPI dwritefont_AddRef(IDWriteFont3 *iface)
struct dwrite_font *font = impl_from_IDWriteFont3(iface); struct dwrite_font *font = impl_from_IDWriteFont3(iface);
ULONG refcount = InterlockedIncrement(&font->refcount); ULONG refcount = InterlockedIncrement(&font->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -2250,7 +2250,7 @@ static ULONG WINAPI dwritefont_Release(IDWriteFont3 *iface) ...@@ -2250,7 +2250,7 @@ static ULONG WINAPI dwritefont_Release(IDWriteFont3 *iface)
struct dwrite_font *font = impl_from_IDWriteFont3(iface); struct dwrite_font *font = impl_from_IDWriteFont3(iface);
ULONG refcount = InterlockedDecrement(&font->refcount); ULONG refcount = InterlockedDecrement(&font->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -2608,7 +2608,7 @@ static ULONG WINAPI dwritefontlist_AddRef(IDWriteFontList2 *iface) ...@@ -2608,7 +2608,7 @@ static ULONG WINAPI dwritefontlist_AddRef(IDWriteFontList2 *iface)
struct dwrite_fontlist *fontlist = impl_from_IDWriteFontList2(iface); struct dwrite_fontlist *fontlist = impl_from_IDWriteFontList2(iface);
ULONG refcount = InterlockedIncrement(&fontlist->refcount); ULONG refcount = InterlockedIncrement(&fontlist->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -2618,7 +2618,7 @@ static ULONG WINAPI dwritefontlist_Release(IDWriteFontList2 *iface) ...@@ -2618,7 +2618,7 @@ static ULONG WINAPI dwritefontlist_Release(IDWriteFontList2 *iface)
struct dwrite_fontlist *fontlist = impl_from_IDWriteFontList2(iface); struct dwrite_fontlist *fontlist = impl_from_IDWriteFontList2(iface);
ULONG refcount = InterlockedDecrement(&fontlist->refcount); ULONG refcount = InterlockedDecrement(&fontlist->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -2775,7 +2775,7 @@ static ULONG WINAPI dwritefontfamily_AddRef(IDWriteFontFamily2 *iface) ...@@ -2775,7 +2775,7 @@ static ULONG WINAPI dwritefontfamily_AddRef(IDWriteFontFamily2 *iface)
struct dwrite_fontfamily *family = impl_from_IDWriteFontFamily2(iface); struct dwrite_fontfamily *family = impl_from_IDWriteFontFamily2(iface);
ULONG refcount = InterlockedIncrement(&family->refcount); ULONG refcount = InterlockedIncrement(&family->refcount);
TRACE("%p, %u.\n", iface, refcount); TRACE("%p, %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -2785,7 +2785,7 @@ static ULONG WINAPI dwritefontfamily_Release(IDWriteFontFamily2 *iface) ...@@ -2785,7 +2785,7 @@ static ULONG WINAPI dwritefontfamily_Release(IDWriteFontFamily2 *iface)
struct dwrite_fontfamily *family = impl_from_IDWriteFontFamily2(iface); struct dwrite_fontfamily *family = impl_from_IDWriteFontFamily2(iface);
ULONG refcount = InterlockedDecrement(&family->refcount); ULONG refcount = InterlockedDecrement(&family->refcount);
TRACE("%p, %u.\n", iface, refcount); TRACE("%p, %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -3241,7 +3241,7 @@ static ULONG WINAPI dwritefontcollection_AddRef(IDWriteFontCollection3 *iface) ...@@ -3241,7 +3241,7 @@ static ULONG WINAPI dwritefontcollection_AddRef(IDWriteFontCollection3 *iface)
struct dwrite_fontcollection *collection = impl_from_IDWriteFontCollection3(iface); struct dwrite_fontcollection *collection = impl_from_IDWriteFontCollection3(iface);
ULONG refcount = InterlockedIncrement(&collection->refcount); ULONG refcount = InterlockedIncrement(&collection->refcount);
TRACE("%p, refcount %d.\n", collection, refcount); TRACE("%p, refcount %ld.\n", collection, refcount);
return refcount; return refcount;
} }
...@@ -3252,7 +3252,7 @@ static ULONG WINAPI dwritefontcollection_Release(IDWriteFontCollection3 *iface) ...@@ -3252,7 +3252,7 @@ static ULONG WINAPI dwritefontcollection_Release(IDWriteFontCollection3 *iface)
ULONG refcount = InterlockedDecrement(&collection->refcount); ULONG refcount = InterlockedDecrement(&collection->refcount);
size_t i; size_t i;
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -4690,7 +4690,7 @@ HRESULT create_font_collection(IDWriteFactory7 *factory, IDWriteFontFileEnumerat ...@@ -4690,7 +4690,7 @@ HRESULT create_font_collection(IDWriteFactory7 *factory, IDWriteFontFileEnumerat
/* Unsupported formats are skipped. */ /* Unsupported formats are skipped. */
hr = opentype_analyze_font(stream, &supported, &file_type, &face_type, &face_count); hr = opentype_analyze_font(stream, &supported, &file_type, &face_type, &face_count);
if (FAILED(hr) || !supported || face_count == 0) { if (FAILED(hr) || !supported || face_count == 0) {
TRACE("Unsupported font (%p, 0x%08x, %d, %u)\n", file, hr, supported, face_count); TRACE("Unsupported font (%p, 0x%08lx, %d, %u)\n", file, hr, supported, face_count);
IDWriteFontFileStream_Release(stream); IDWriteFontFileStream_Release(stream);
IDWriteFontFile_Release(file); IDWriteFontFile_Release(file);
hr = S_OK; hr = S_OK;
...@@ -5022,7 +5022,7 @@ static HRESULT eudc_collection_add_family(IDWriteFactory7 *factory, struct dwrit ...@@ -5022,7 +5022,7 @@ static HRESULT eudc_collection_add_family(IDWriteFactory7 *factory, struct dwrit
/* Unsupported formats are skipped. */ /* Unsupported formats are skipped. */
hr = opentype_analyze_font(stream, &supported, &file_type, &face_type, &face_count); hr = opentype_analyze_font(stream, &supported, &file_type, &face_type, &face_count);
if (FAILED(hr) || !supported || face_count == 0) { if (FAILED(hr) || !supported || face_count == 0) {
TRACE("Unsupported font (%p, 0x%08x, %d, %u)\n", file, hr, supported, face_count); TRACE("Unsupported font (%p, 0x%08lx, %d, %u)\n", file, hr, supported, face_count);
IDWriteFontFileStream_Release(stream); IDWriteFontFileStream_Release(stream);
IDWriteFontFile_Release(file); IDWriteFontFile_Release(file);
return S_FALSE; return S_FALSE;
...@@ -5139,7 +5139,7 @@ HRESULT get_eudc_fontcollection(IDWriteFactory7 *factory, IDWriteFontCollection3 ...@@ -5139,7 +5139,7 @@ HRESULT get_eudc_fontcollection(IDWriteFactory7 *factory, IDWriteFontCollection3
{ {
hr = eudc_collection_add_family(factory, collection, L"", L"EUDC.TTE"); hr = eudc_collection_add_family(factory, collection, L"", L"EUDC.TTE");
if (hr != S_OK) if (hr != S_OK)
WARN("failed to add global default EUDC font, 0x%08x\n", hr); WARN("failed to add global default EUDC font, 0x%08lx\n", hr);
} }
/* EUDC collection offers simulated faces too */ /* EUDC collection offers simulated faces too */
...@@ -5174,7 +5174,7 @@ static ULONG WINAPI dwritefontfile_AddRef(IDWriteFontFile *iface) ...@@ -5174,7 +5174,7 @@ static ULONG WINAPI dwritefontfile_AddRef(IDWriteFontFile *iface)
struct dwrite_fontfile *file = impl_from_IDWriteFontFile(iface); struct dwrite_fontfile *file = impl_from_IDWriteFontFile(iface);
ULONG refcount = InterlockedIncrement(&file->refcount); ULONG refcount = InterlockedIncrement(&file->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -5184,7 +5184,7 @@ static ULONG WINAPI dwritefontfile_Release(IDWriteFontFile *iface) ...@@ -5184,7 +5184,7 @@ static ULONG WINAPI dwritefontfile_Release(IDWriteFontFile *iface)
struct dwrite_fontfile *file = impl_from_IDWriteFontFile(iface); struct dwrite_fontfile *file = impl_from_IDWriteFontFile(iface);
ULONG refcount = InterlockedDecrement(&file->refcount); ULONG refcount = InterlockedDecrement(&file->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -5552,7 +5552,7 @@ static ULONG WINAPI localfontfilestream_AddRef(IDWriteFontFileStream *iface) ...@@ -5552,7 +5552,7 @@ static ULONG WINAPI localfontfilestream_AddRef(IDWriteFontFileStream *iface)
struct dwrite_localfontfilestream *stream = impl_from_IDWriteFontFileStream(iface); struct dwrite_localfontfilestream *stream = impl_from_IDWriteFontFileStream(iface);
ULONG refcount = InterlockedIncrement(&stream->refcount); ULONG refcount = InterlockedIncrement(&stream->refcount);
TRACE_(dwrite_file)("%p, refcount %d.\n", iface, refcount); TRACE_(dwrite_file)("%p, refcount %ld.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -5569,7 +5569,7 @@ static ULONG WINAPI localfontfilestream_Release(IDWriteFontFileStream *iface) ...@@ -5569,7 +5569,7 @@ static ULONG WINAPI localfontfilestream_Release(IDWriteFontFileStream *iface)
struct dwrite_localfontfilestream *stream = impl_from_IDWriteFontFileStream(iface); struct dwrite_localfontfilestream *stream = impl_from_IDWriteFontFileStream(iface);
ULONG refcount = InterlockedDecrement(&stream->refcount); ULONG refcount = InterlockedDecrement(&stream->refcount);
TRACE_(dwrite_file)("%p, refcount %d.\n", iface, refcount); TRACE_(dwrite_file)("%p, refcount %ld.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -5691,7 +5691,7 @@ static ULONG WINAPI localfontfileloader_AddRef(IDWriteLocalFontFileLoader *iface ...@@ -5691,7 +5691,7 @@ static ULONG WINAPI localfontfileloader_AddRef(IDWriteLocalFontFileLoader *iface
struct dwrite_localfontfileloader *loader = impl_from_IDWriteLocalFontFileLoader(iface); struct dwrite_localfontfileloader *loader = impl_from_IDWriteLocalFontFileLoader(iface);
ULONG refcount = InterlockedIncrement(&loader->refcount); ULONG refcount = InterlockedIncrement(&loader->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -5701,7 +5701,7 @@ static ULONG WINAPI localfontfileloader_Release(IDWriteLocalFontFileLoader *ifac ...@@ -5701,7 +5701,7 @@ static ULONG WINAPI localfontfileloader_Release(IDWriteLocalFontFileLoader *ifac
struct dwrite_localfontfileloader *loader = impl_from_IDWriteLocalFontFileLoader(iface); struct dwrite_localfontfileloader *loader = impl_from_IDWriteLocalFontFileLoader(iface);
ULONG refcount = InterlockedDecrement(&loader->refcount); ULONG refcount = InterlockedDecrement(&loader->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -5721,7 +5721,7 @@ static HRESULT create_local_cached_stream(const void *key, UINT32 key_size, stru ...@@ -5721,7 +5721,7 @@ static HRESULT create_local_cached_stream(const void *key, UINT32 key_size, stru
file = CreateFileW(refkey->name, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE, file = CreateFileW(refkey->name, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (file == INVALID_HANDLE_VALUE) { if (file == INVALID_HANDLE_VALUE) {
WARN_(dwrite_file)("Failed to open the file %s, error %d.\n", debugstr_w(refkey->name), GetLastError()); WARN_(dwrite_file)("Failed to open the file %s, error %ld.\n", debugstr_w(refkey->name), GetLastError());
return E_FAIL; return E_FAIL;
} }
...@@ -5734,7 +5734,7 @@ static HRESULT create_local_cached_stream(const void *key, UINT32 key_size, stru ...@@ -5734,7 +5734,7 @@ static HRESULT create_local_cached_stream(const void *key, UINT32 key_size, stru
file_ptr = MapViewOfFile(mapping, FILE_MAP_READ, 0, 0, 0); file_ptr = MapViewOfFile(mapping, FILE_MAP_READ, 0, 0, 0);
CloseHandle(mapping); CloseHandle(mapping);
if (!file_ptr) { if (!file_ptr) {
ERR("mapping failed, file size %s, error %d\n", wine_dbgstr_longlong(size.QuadPart), GetLastError()); ERR("mapping failed, file size %s, error %ld\n", wine_dbgstr_longlong(size.QuadPart), GetLastError());
return E_FAIL; return E_FAIL;
} }
...@@ -5916,7 +5916,7 @@ static ULONG WINAPI glyphrunanalysis_AddRef(IDWriteGlyphRunAnalysis *iface) ...@@ -5916,7 +5916,7 @@ static ULONG WINAPI glyphrunanalysis_AddRef(IDWriteGlyphRunAnalysis *iface)
struct dwrite_glyphrunanalysis *analysis = impl_from_IDWriteGlyphRunAnalysis(iface); struct dwrite_glyphrunanalysis *analysis = impl_from_IDWriteGlyphRunAnalysis(iface);
ULONG refcount = InterlockedIncrement(&analysis->refcount); ULONG refcount = InterlockedIncrement(&analysis->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -5926,7 +5926,7 @@ static ULONG WINAPI glyphrunanalysis_Release(IDWriteGlyphRunAnalysis *iface) ...@@ -5926,7 +5926,7 @@ static ULONG WINAPI glyphrunanalysis_Release(IDWriteGlyphRunAnalysis *iface)
struct dwrite_glyphrunanalysis *analysis = impl_from_IDWriteGlyphRunAnalysis(iface); struct dwrite_glyphrunanalysis *analysis = impl_from_IDWriteGlyphRunAnalysis(iface);
ULONG refcount = InterlockedDecrement(&analysis->refcount); ULONG refcount = InterlockedDecrement(&analysis->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -6365,7 +6365,7 @@ static ULONG WINAPI colorglyphenum_AddRef(IDWriteColorGlyphRunEnumerator1 *iface ...@@ -6365,7 +6365,7 @@ static ULONG WINAPI colorglyphenum_AddRef(IDWriteColorGlyphRunEnumerator1 *iface
struct dwrite_colorglyphenum *glyphenum = impl_from_IDWriteColorGlyphRunEnumerator1(iface); struct dwrite_colorglyphenum *glyphenum = impl_from_IDWriteColorGlyphRunEnumerator1(iface);
ULONG refcount = InterlockedIncrement(&glyphenum->refcount); ULONG refcount = InterlockedIncrement(&glyphenum->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -6375,7 +6375,7 @@ static ULONG WINAPI colorglyphenum_Release(IDWriteColorGlyphRunEnumerator1 *ifac ...@@ -6375,7 +6375,7 @@ static ULONG WINAPI colorglyphenum_Release(IDWriteColorGlyphRunEnumerator1 *ifac
struct dwrite_colorglyphenum *glyphenum = impl_from_IDWriteColorGlyphRunEnumerator1(iface); struct dwrite_colorglyphenum *glyphenum = impl_from_IDWriteColorGlyphRunEnumerator1(iface);
ULONG refcount = InterlockedDecrement(&glyphenum->refcount); ULONG refcount = InterlockedDecrement(&glyphenum->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -6465,7 +6465,7 @@ static BOOL colorglyphenum_build_color_run(struct dwrite_colorglyphenum *glyphen ...@@ -6465,7 +6465,7 @@ static BOOL colorglyphenum_build_color_run(struct dwrite_colorglyphenum *glyphen
HRESULT hr = IDWriteFontFace5_GetPaletteEntries(glyphenum->fontface, glyphenum->palette, HRESULT hr = IDWriteFontFace5_GetPaletteEntries(glyphenum->fontface, glyphenum->palette,
colorrun->paletteIndex, 1, &colorrun->runColor); colorrun->paletteIndex, 1, &colorrun->runColor);
if (FAILED(hr)) if (FAILED(hr))
WARN("failed to get palette entry, fontface %p, palette %u, index %u, 0x%08x\n", glyphenum->fontface, WARN("failed to get palette entry, fontface %p, palette %u, index %u, 0x%08lx\n", glyphenum->fontface,
glyphenum->palette, colorrun->paletteIndex, hr); glyphenum->palette, colorrun->paletteIndex, hr);
} }
/* found a glyph position new color run starts from, origin is "original origin + distance to this glyph" */ /* found a glyph position new color run starts from, origin is "original origin + distance to this glyph" */
...@@ -6693,7 +6693,7 @@ static ULONG WINAPI fontfacereference_AddRef(IDWriteFontFaceReference1 *iface) ...@@ -6693,7 +6693,7 @@ static ULONG WINAPI fontfacereference_AddRef(IDWriteFontFaceReference1 *iface)
struct dwrite_fontfacereference *reference = impl_from_IDWriteFontFaceReference1(iface); struct dwrite_fontfacereference *reference = impl_from_IDWriteFontFaceReference1(iface);
ULONG refcount = InterlockedIncrement(&reference->refcount); ULONG refcount = InterlockedIncrement(&reference->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -6703,7 +6703,7 @@ static ULONG WINAPI fontfacereference_Release(IDWriteFontFaceReference1 *iface) ...@@ -6703,7 +6703,7 @@ static ULONG WINAPI fontfacereference_Release(IDWriteFontFaceReference1 *iface)
struct dwrite_fontfacereference *reference = impl_from_IDWriteFontFaceReference1(iface); struct dwrite_fontfacereference *reference = impl_from_IDWriteFontFaceReference1(iface);
ULONG refcount = InterlockedDecrement(&reference->refcount); ULONG refcount = InterlockedDecrement(&reference->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -7000,7 +7000,7 @@ static ULONG WINAPI inmemoryfilestream_AddRef(IDWriteFontFileStream *iface) ...@@ -7000,7 +7000,7 @@ static ULONG WINAPI inmemoryfilestream_AddRef(IDWriteFontFileStream *iface)
struct dwrite_inmemory_filestream *stream = inmemory_impl_from_IDWriteFontFileStream(iface); struct dwrite_inmemory_filestream *stream = inmemory_impl_from_IDWriteFontFileStream(iface);
ULONG refcount = InterlockedIncrement(&stream->refcount); ULONG refcount = InterlockedIncrement(&stream->refcount);
TRACE_(dwrite_file)("%p, refcount %u.\n", iface, refcount); TRACE_(dwrite_file)("%p, refcount %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -7010,7 +7010,7 @@ static ULONG WINAPI inmemoryfilestream_Release(IDWriteFontFileStream *iface) ...@@ -7010,7 +7010,7 @@ static ULONG WINAPI inmemoryfilestream_Release(IDWriteFontFileStream *iface)
struct dwrite_inmemory_filestream *stream = inmemory_impl_from_IDWriteFontFileStream(iface); struct dwrite_inmemory_filestream *stream = inmemory_impl_from_IDWriteFontFileStream(iface);
ULONG refcount = InterlockedDecrement(&stream->refcount); ULONG refcount = InterlockedDecrement(&stream->refcount);
TRACE_(dwrite_file)("%p, refcount %u.\n", iface, refcount); TRACE_(dwrite_file)("%p, refcount %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -7101,7 +7101,7 @@ static ULONG WINAPI inmemoryfontfileloader_AddRef(IDWriteInMemoryFontFileLoader ...@@ -7101,7 +7101,7 @@ static ULONG WINAPI inmemoryfontfileloader_AddRef(IDWriteInMemoryFontFileLoader
struct dwrite_inmemory_fileloader *loader = impl_from_IDWriteInMemoryFontFileLoader(iface); struct dwrite_inmemory_fileloader *loader = impl_from_IDWriteInMemoryFontFileLoader(iface);
ULONG refcount = InterlockedIncrement(&loader->refcount); ULONG refcount = InterlockedIncrement(&loader->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -7112,7 +7112,7 @@ static ULONG WINAPI inmemoryfontfileloader_Release(IDWriteInMemoryFontFileLoader ...@@ -7112,7 +7112,7 @@ static ULONG WINAPI inmemoryfontfileloader_Release(IDWriteInMemoryFontFileLoader
ULONG refcount = InterlockedDecrement(&loader->refcount); ULONG refcount = InterlockedDecrement(&loader->refcount);
size_t i; size_t i;
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -7255,7 +7255,7 @@ static ULONG WINAPI dwritefontresource_AddRef(IDWriteFontResource *iface) ...@@ -7255,7 +7255,7 @@ static ULONG WINAPI dwritefontresource_AddRef(IDWriteFontResource *iface)
struct dwrite_fontresource *resource = impl_from_IDWriteFontResource(iface); struct dwrite_fontresource *resource = impl_from_IDWriteFontResource(iface);
ULONG refcount = InterlockedIncrement(&resource->refcount); ULONG refcount = InterlockedIncrement(&resource->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -7265,7 +7265,7 @@ static ULONG WINAPI dwritefontresource_Release(IDWriteFontResource *iface) ...@@ -7265,7 +7265,7 @@ static ULONG WINAPI dwritefontresource_Release(IDWriteFontResource *iface)
struct dwrite_fontresource *resource = impl_from_IDWriteFontResource(iface); struct dwrite_fontresource *resource = impl_from_IDWriteFontResource(iface);
ULONG refcount = InterlockedDecrement(&resource->refcount); ULONG refcount = InterlockedDecrement(&resource->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -7458,7 +7458,7 @@ static ULONG WINAPI dwritefontset_AddRef(IDWriteFontSet3 *iface) ...@@ -7458,7 +7458,7 @@ static ULONG WINAPI dwritefontset_AddRef(IDWriteFontSet3 *iface)
struct dwrite_fontset *set = impl_from_IDWriteFontSet3(iface); struct dwrite_fontset *set = impl_from_IDWriteFontSet3(iface);
ULONG refcount = InterlockedIncrement(&set->refcount); ULONG refcount = InterlockedIncrement(&set->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -7543,7 +7543,7 @@ static ULONG WINAPI dwritefontset_Release(IDWriteFontSet3 *iface) ...@@ -7543,7 +7543,7 @@ static ULONG WINAPI dwritefontset_Release(IDWriteFontSet3 *iface)
ULONG refcount = InterlockedDecrement(&set->refcount); ULONG refcount = InterlockedDecrement(&set->refcount);
unsigned int i; unsigned int i;
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -8015,7 +8015,7 @@ static ULONG WINAPI dwritefontsetbuilder_AddRef(IDWriteFontSetBuilder2 *iface) ...@@ -8015,7 +8015,7 @@ static ULONG WINAPI dwritefontsetbuilder_AddRef(IDWriteFontSetBuilder2 *iface)
struct dwrite_fontset_builder *builder = impl_from_IDWriteFontSetBuilder2(iface); struct dwrite_fontset_builder *builder = impl_from_IDWriteFontSetBuilder2(iface);
ULONG refcount = InterlockedIncrement(&builder->refcount); ULONG refcount = InterlockedIncrement(&builder->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -8026,7 +8026,7 @@ static ULONG WINAPI dwritefontsetbuilder_Release(IDWriteFontSetBuilder2 *iface) ...@@ -8026,7 +8026,7 @@ static ULONG WINAPI dwritefontsetbuilder_Release(IDWriteFontSetBuilder2 *iface)
ULONG refcount = InterlockedDecrement(&builder->refcount); ULONG refcount = InterlockedDecrement(&builder->refcount);
unsigned int i; unsigned int i;
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
......
...@@ -239,7 +239,7 @@ static ULONG WINAPI dwritetextformat_AddRef(IDWriteTextFormat3 *iface) ...@@ -239,7 +239,7 @@ static ULONG WINAPI dwritetextformat_AddRef(IDWriteTextFormat3 *iface)
struct dwrite_textformat *format = impl_from_IDWriteTextFormat3(iface); struct dwrite_textformat *format = impl_from_IDWriteTextFormat3(iface);
ULONG refcount = InterlockedIncrement(&format->refcount); ULONG refcount = InterlockedIncrement(&format->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -249,7 +249,7 @@ static ULONG WINAPI dwritetextformat_Release(IDWriteTextFormat3 *iface) ...@@ -249,7 +249,7 @@ static ULONG WINAPI dwritetextformat_Release(IDWriteTextFormat3 *iface)
struct dwrite_textformat *format = impl_from_IDWriteTextFormat3(iface); struct dwrite_textformat *format = impl_from_IDWriteTextFormat3(iface);
ULONG refcount = InterlockedDecrement(&format->refcount); ULONG refcount = InterlockedDecrement(&format->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -772,7 +772,7 @@ static ULONG WINAPI dwritetrimmingsign_AddRef(IDWriteInlineObject *iface) ...@@ -772,7 +772,7 @@ static ULONG WINAPI dwritetrimmingsign_AddRef(IDWriteInlineObject *iface)
struct dwrite_trimmingsign *sign = impl_from_IDWriteInlineObject(iface); struct dwrite_trimmingsign *sign = impl_from_IDWriteInlineObject(iface);
ULONG refcount = InterlockedIncrement(&sign->refcount); ULONG refcount = InterlockedIncrement(&sign->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -782,7 +782,7 @@ static ULONG WINAPI dwritetrimmingsign_Release(IDWriteInlineObject *iface) ...@@ -782,7 +782,7 @@ static ULONG WINAPI dwritetrimmingsign_Release(IDWriteInlineObject *iface)
struct dwrite_trimmingsign *sign = impl_from_IDWriteInlineObject(iface); struct dwrite_trimmingsign *sign = impl_from_IDWriteInlineObject(iface);
ULONG refcount = InterlockedDecrement(&sign->refcount); ULONG refcount = InterlockedDecrement(&sign->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
......
...@@ -251,7 +251,7 @@ static ULONG WINAPI rendertarget_AddRef(IDWriteBitmapRenderTarget1 *iface) ...@@ -251,7 +251,7 @@ static ULONG WINAPI rendertarget_AddRef(IDWriteBitmapRenderTarget1 *iface)
struct rendertarget *target = impl_from_IDWriteBitmapRenderTarget1(iface); struct rendertarget *target = impl_from_IDWriteBitmapRenderTarget1(iface);
ULONG refcount = InterlockedIncrement(&target->refcount); ULONG refcount = InterlockedIncrement(&target->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -261,7 +261,7 @@ static ULONG WINAPI rendertarget_Release(IDWriteBitmapRenderTarget1 *iface) ...@@ -261,7 +261,7 @@ static ULONG WINAPI rendertarget_Release(IDWriteBitmapRenderTarget1 *iface)
struct rendertarget *target = impl_from_IDWriteBitmapRenderTarget1(iface); struct rendertarget *target = impl_from_IDWriteBitmapRenderTarget1(iface);
ULONG refcount = InterlockedDecrement(&target->refcount); ULONG refcount = InterlockedDecrement(&target->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -352,7 +352,7 @@ static HRESULT WINAPI rendertarget_DrawGlyphRun(IDWriteBitmapRenderTarget1 *ifac ...@@ -352,7 +352,7 @@ static HRESULT WINAPI rendertarget_DrawGlyphRun(IDWriteBitmapRenderTarget1 *ifac
RECT target_rect, bounds; RECT target_rect, bounds;
HRESULT hr; HRESULT hr;
TRACE("%p, %.8e, %.8e, %d, %p, %p, 0x%08x, %p.\n", iface, originX, originY, TRACE("%p, %.8e, %.8e, %d, %p, %p, 0x%08lx, %p.\n", iface, originX, originY,
measuring_mode, run, params, color, bbox_ret); measuring_mode, run, params, color, bbox_ret);
SetRectEmpty(bbox_ret); SetRectEmpty(bbox_ret);
...@@ -364,7 +364,7 @@ static HRESULT WINAPI rendertarget_DrawGlyphRun(IDWriteBitmapRenderTarget1 *ifac ...@@ -364,7 +364,7 @@ static HRESULT WINAPI rendertarget_DrawGlyphRun(IDWriteBitmapRenderTarget1 *ifac
return E_INVALIDARG; return E_INVALIDARG;
if (FAILED(hr = IDWriteFontFace_QueryInterface(run->fontFace, &IID_IDWriteFontFace3, (void **)&fontface))) { if (FAILED(hr = IDWriteFontFace_QueryInterface(run->fontFace, &IID_IDWriteFontFace3, (void **)&fontface))) {
WARN("Failed to get IDWriteFontFace2 interface, hr %#x.\n", hr); WARN("Failed to get IDWriteFontFace2 interface, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -435,7 +435,7 @@ static HRESULT WINAPI rendertarget_DrawGlyphRun(IDWriteBitmapRenderTarget1 *ifac ...@@ -435,7 +435,7 @@ static HRESULT WINAPI rendertarget_DrawGlyphRun(IDWriteBitmapRenderTarget1 *ifac
gridfitmode, target->antialiasmode, originX, originY, &analysis); gridfitmode, target->antialiasmode, originX, originY, &analysis);
if (FAILED(hr)) if (FAILED(hr))
{ {
WARN("failed to create analysis instance, 0x%08x\n", hr); WARN("failed to create analysis instance, 0x%08lx\n", hr);
return hr; return hr;
} }
...@@ -445,7 +445,7 @@ static HRESULT WINAPI rendertarget_DrawGlyphRun(IDWriteBitmapRenderTarget1 *ifac ...@@ -445,7 +445,7 @@ static HRESULT WINAPI rendertarget_DrawGlyphRun(IDWriteBitmapRenderTarget1 *ifac
if (FAILED(hr) || IsRectEmpty(&bounds)) { if (FAILED(hr) || IsRectEmpty(&bounds)) {
hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1, &bounds); hr = IDWriteGlyphRunAnalysis_GetAlphaTextureBounds(analysis, DWRITE_TEXTURE_CLEARTYPE_3x1, &bounds);
if (FAILED(hr)) { if (FAILED(hr)) {
WARN("GetAlphaTextureBounds() failed, 0x%08x\n", hr); WARN("GetAlphaTextureBounds() failed, 0x%08lx\n", hr);
IDWriteGlyphRunAnalysis_Release(analysis); IDWriteGlyphRunAnalysis_Release(analysis);
return hr; return hr;
} }
...@@ -655,7 +655,7 @@ static ULONG WINAPI gdiinterop_AddRef(IDWriteGdiInterop1 *iface) ...@@ -655,7 +655,7 @@ static ULONG WINAPI gdiinterop_AddRef(IDWriteGdiInterop1 *iface)
struct gdiinterop *interop = impl_from_IDWriteGdiInterop1(iface); struct gdiinterop *interop = impl_from_IDWriteGdiInterop1(iface);
LONG refcount = InterlockedIncrement(&interop->refcount); LONG refcount = InterlockedIncrement(&interop->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -665,7 +665,7 @@ static ULONG WINAPI gdiinterop_Release(IDWriteGdiInterop1 *iface) ...@@ -665,7 +665,7 @@ static ULONG WINAPI gdiinterop_Release(IDWriteGdiInterop1 *iface)
struct gdiinterop *interop = impl_from_IDWriteGdiInterop1(iface); struct gdiinterop *interop = impl_from_IDWriteGdiInterop1(iface);
LONG refcount = InterlockedDecrement(&interop->refcount); LONG refcount = InterlockedDecrement(&interop->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -860,7 +860,7 @@ static HRESULT WINAPI gdiinterop1_CreateFontFromLOGFONT(IDWriteGdiInterop1 *ifac ...@@ -860,7 +860,7 @@ static HRESULT WINAPI gdiinterop1_CreateFontFromLOGFONT(IDWriteGdiInterop1 *ifac
else { else {
hr = IDWriteFactory5_GetSystemFontCollection((IDWriteFactory5 *)interop->factory, FALSE, (IDWriteFontCollection1 **)&collection, FALSE); hr = IDWriteFactory5_GetSystemFontCollection((IDWriteFactory5 *)interop->factory, FALSE, (IDWriteFontCollection1 **)&collection, FALSE);
if (FAILED(hr)) { if (FAILED(hr)) {
ERR("failed to get system font collection: 0x%08x.\n", hr); ERR("failed to get system font collection: 0x%08lx.\n", hr);
return hr; return hr;
} }
} }
...@@ -958,7 +958,7 @@ static ULONG WINAPI memresourcestream_AddRef(IDWriteFontFileStream *iface) ...@@ -958,7 +958,7 @@ static ULONG WINAPI memresourcestream_AddRef(IDWriteFontFileStream *iface)
struct memresource_stream *stream = impl_from_IDWriteFontFileStream(iface); struct memresource_stream *stream = impl_from_IDWriteFontFileStream(iface);
ULONG refcount = InterlockedIncrement(&stream->refcount); ULONG refcount = InterlockedIncrement(&stream->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -968,7 +968,7 @@ static ULONG WINAPI memresourcestream_Release(IDWriteFontFileStream *iface) ...@@ -968,7 +968,7 @@ static ULONG WINAPI memresourcestream_Release(IDWriteFontFileStream *iface)
struct memresource_stream *stream = impl_from_IDWriteFontFileStream(iface); struct memresource_stream *stream = impl_from_IDWriteFontFileStream(iface);
ULONG refcount = InterlockedDecrement(&stream->refcount); ULONG refcount = InterlockedDecrement(&stream->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
if (!refcount) if (!refcount)
free(stream); free(stream);
......
...@@ -582,7 +582,7 @@ static void layout_get_font_metrics(struct dwrite_textlayout *layout, IDWriteFon ...@@ -582,7 +582,7 @@ static void layout_get_font_metrics(struct dwrite_textlayout *layout, IDWriteFon
if (is_layout_gdi_compatible(layout)) { if (is_layout_gdi_compatible(layout)) {
HRESULT hr = IDWriteFontFace_GetGdiCompatibleMetrics(fontface, emsize, layout->ppdip, &layout->transform, fontmetrics); HRESULT hr = IDWriteFontFace_GetGdiCompatibleMetrics(fontface, emsize, layout->ppdip, &layout->transform, fontmetrics);
if (FAILED(hr)) if (FAILED(hr))
WARN("failed to get compat metrics, 0x%08x\n", hr); WARN("failed to get compat metrics, 0x%08lx\n", hr);
} }
else else
IDWriteFontFace_GetMetrics(fontface, fontmetrics); IDWriteFontFace_GetMetrics(fontface, fontmetrics);
...@@ -651,7 +651,7 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout) ...@@ -651,7 +651,7 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
if (FAILED(hr = IDWriteFactory5_GetSystemFontCollection((IDWriteFactory5 *)layout->factory, FALSE, if (FAILED(hr = IDWriteFactory5_GetSystemFontCollection((IDWriteFactory5 *)layout->factory, FALSE,
(IDWriteFontCollection1 **)&sys_collection, FALSE))) { (IDWriteFontCollection1 **)&sys_collection, FALSE))) {
WARN("Failed to get system collection, hr %#x.\n", hr); WARN("Failed to get system collection, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -661,7 +661,7 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout) ...@@ -661,7 +661,7 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
} }
else { else {
if (FAILED(hr = IDWriteFactory7_GetSystemFontFallback(layout->factory, &fallback))) { if (FAILED(hr = IDWriteFactory7_GetSystemFontFallback(layout->factory, &fallback))) {
WARN("Failed to get system fallback, hr %#x.\n", hr); WARN("Failed to get system fallback, hr %#lx.\n", hr);
goto fatal; goto fatal;
} }
} }
...@@ -691,7 +691,7 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout) ...@@ -691,7 +691,7 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
hr = IDWriteFont_CreateFontFace(font, &run->run.fontFace); hr = IDWriteFont_CreateFontFace(font, &run->run.fontFace);
IDWriteFont_Release(font); IDWriteFont_Release(font);
if (FAILED(hr)) { if (FAILED(hr)) {
WARN("Failed to create font face, hr %#x.\n", hr); WARN("Failed to create font face, hr %#lx.\n", hr);
break; break;
} }
...@@ -720,7 +720,7 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout) ...@@ -720,7 +720,7 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
&font, &font,
&scale); &scale);
if (FAILED(hr)) { if (FAILED(hr)) {
WARN("%s: failed to map family %s, collection %p, hr %#x.\n", debugstr_rundescr(&run->descr), WARN("%s: failed to map family %s, collection %p, hr %#lx.\n", debugstr_rundescr(&run->descr),
debugstr_w(range->fontfamily), range->collection, hr); debugstr_w(range->fontfamily), range->collection, hr);
goto fatal; goto fatal;
} }
...@@ -728,7 +728,7 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout) ...@@ -728,7 +728,7 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
hr = IDWriteFont_CreateFontFace(font, &run->run.fontFace); hr = IDWriteFont_CreateFontFace(font, &run->run.fontFace);
IDWriteFont_Release(font); IDWriteFont_Release(font);
if (FAILED(hr)) { if (FAILED(hr)) {
WARN("Failed to create font face, hr %#x.\n", hr); WARN("Failed to create font face, hr %#lx.\n", hr);
goto fatal; goto fatal;
} }
...@@ -942,7 +942,7 @@ static HRESULT layout_shape_get_glyphs(struct dwrite_textlayout *layout, struct ...@@ -942,7 +942,7 @@ static HRESULT layout_shape_get_glyphs(struct dwrite_textlayout *layout, struct
} }
if (FAILED(hr)) if (FAILED(hr))
WARN("%s: shaping failed, hr %#x.\n", debugstr_rundescr(&run->descr), hr); WARN("%s: shaping failed, hr %#lx.\n", debugstr_rundescr(&run->descr), hr);
run->run.glyphIndices = run->glyphs; run->run.glyphIndices = run->glyphs;
run->descr.clusterMap = run->clustermap; run->descr.clusterMap = run->clustermap;
...@@ -1056,7 +1056,7 @@ static HRESULT layout_shape_get_positions(struct dwrite_textlayout *layout, stru ...@@ -1056,7 +1056,7 @@ static HRESULT layout_shape_get_positions(struct dwrite_textlayout *layout, stru
{ {
memset(run->advances, 0, run->glyphcount * sizeof(*run->advances)); memset(run->advances, 0, run->glyphcount * sizeof(*run->advances));
memset(run->offsets, 0, run->glyphcount * sizeof(*run->offsets)); memset(run->offsets, 0, run->glyphcount * sizeof(*run->offsets));
WARN("%s: failed to get glyph placement info, hr %#x.\n", debugstr_rundescr(&run->descr), hr); WARN("%s: failed to get glyph placement info, hr %#lx.\n", debugstr_rundescr(&run->descr), hr);
} }
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
...@@ -1116,12 +1116,12 @@ static HRESULT layout_compute_runs(struct dwrite_textlayout *layout) ...@@ -1116,12 +1116,12 @@ static HRESULT layout_compute_runs(struct dwrite_textlayout *layout)
layout->cluster_count = 0; layout->cluster_count = 0;
if (FAILED(hr = layout_itemize(layout))) { if (FAILED(hr = layout_itemize(layout))) {
WARN("Itemization failed, hr %#x.\n", hr); WARN("Itemization failed, hr %#lx.\n", hr);
return hr; return hr;
} }
if (FAILED(hr = layout_resolve_fonts(layout))) { if (FAILED(hr = layout_resolve_fonts(layout))) {
WARN("Failed to resolve layout fonts, hr %#x.\n", hr); WARN("Failed to resolve layout fonts, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -1164,7 +1164,7 @@ static HRESULT layout_compute_runs(struct dwrite_textlayout *layout) ...@@ -1164,7 +1164,7 @@ static HRESULT layout_compute_runs(struct dwrite_textlayout *layout)
} }
if (FAILED(hr = layout_shape_run(layout, run))) if (FAILED(hr = layout_shape_run(layout, run)))
WARN("%s: shaping failed, hr %#x.\n", debugstr_rundescr(&run->descr), hr); WARN("%s: shaping failed, hr %#lx.\n", debugstr_rundescr(&run->descr), hr);
/* baseline derived from font metrics */ /* baseline derived from font metrics */
layout_get_font_metrics(layout, run->run.fontFace, run->run.fontEmSize, &fontmetrics); layout_get_font_metrics(layout, run->run.fontFace, run->run.fontEmSize, &fontmetrics);
...@@ -1202,7 +1202,7 @@ static HRESULT layout_compute(struct dwrite_textlayout *layout) ...@@ -1202,7 +1202,7 @@ static HRESULT layout_compute(struct dwrite_textlayout *layout)
if (FAILED(hr = IDWriteTextAnalyzer2_AnalyzeLineBreakpoints(analyzer, if (FAILED(hr = IDWriteTextAnalyzer2_AnalyzeLineBreakpoints(analyzer,
(IDWriteTextAnalysisSource *)&layout->IDWriteTextAnalysisSource1_iface, (IDWriteTextAnalysisSource *)&layout->IDWriteTextAnalysisSource1_iface,
0, layout->len, (IDWriteTextAnalysisSink *)&layout->IDWriteTextAnalysisSink1_iface))) 0, layout->len, (IDWriteTextAnalysisSink *)&layout->IDWriteTextAnalysisSink1_iface)))
WARN("Line breakpoints analysis failed, hr %#x.\n", hr); WARN("Line breakpoints analysis failed, hr %#lx.\n", hr);
} }
free(layout->actual_breakpoints); free(layout->actual_breakpoints);
...@@ -1290,7 +1290,7 @@ static void layout_get_erun_font_metrics(struct dwrite_textlayout *layout, struc ...@@ -1290,7 +1290,7 @@ static void layout_get_erun_font_metrics(struct dwrite_textlayout *layout, struc
&layout->transform, &layout->transform,
metrics); metrics);
if (FAILED(hr)) if (FAILED(hr))
WARN("failed to get font metrics, 0x%08x\n", hr); WARN("failed to get font metrics, 0x%08lx\n", hr);
} }
else else
IDWriteFontFace_GetMetrics(erun->run->u.regular.run.fontFace, metrics); IDWriteFontFace_GetMetrics(erun->run->u.regular.run.fontFace, metrics);
...@@ -1926,7 +1926,7 @@ static void layout_add_line(struct dwrite_textlayout *layout, UINT32 first_clust ...@@ -1926,7 +1926,7 @@ static void layout_add_line(struct dwrite_textlayout *layout, UINT32 first_clust
append_trimming_run = TRUE; append_trimming_run = TRUE;
} }
else else
WARN("Failed to get trimming sign metrics, lines won't be trimmed, hr %#x.\n", hr); WARN("Failed to get trimming sign metrics, lines won't be trimmed, hr %#lx.\n", hr);
width = trimmed_width + sign_metrics.width; width = trimmed_width + sign_metrics.width;
} }
...@@ -2862,7 +2862,7 @@ static ULONG WINAPI dwritetextlayout_AddRef(IDWriteTextLayout4 *iface) ...@@ -2862,7 +2862,7 @@ static ULONG WINAPI dwritetextlayout_AddRef(IDWriteTextLayout4 *iface)
struct dwrite_textlayout *layout = impl_from_IDWriteTextLayout4(iface); struct dwrite_textlayout *layout = impl_from_IDWriteTextLayout4(iface);
ULONG refcount = InterlockedIncrement(&layout->refcount); ULONG refcount = InterlockedIncrement(&layout->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -2872,7 +2872,7 @@ static ULONG WINAPI dwritetextlayout_Release(IDWriteTextLayout4 *iface) ...@@ -2872,7 +2872,7 @@ static ULONG WINAPI dwritetextlayout_Release(IDWriteTextLayout4 *iface)
struct dwrite_textlayout *layout = impl_from_IDWriteTextLayout4(iface); struct dwrite_textlayout *layout = impl_from_IDWriteTextLayout4(iface);
ULONG refcount = InterlockedDecrement(&layout->refcount); ULONG refcount = InterlockedDecrement(&layout->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -3715,7 +3715,7 @@ static void layout_get_erun_bbox(struct dwrite_textlayout *layout, struct layout ...@@ -3715,7 +3715,7 @@ static void layout_get_erun_bbox(struct dwrite_textlayout *layout, struct layout
if (FAILED(hr = compute_glyph_origins(&glyph_run, layout->measuringmode, baseline_origin, &layout->transform, origins))) if (FAILED(hr = compute_glyph_origins(&glyph_run, layout->measuringmode, baseline_origin, &layout->transform, origins)))
{ {
WARN("Failed to compute glyph origins, hr %#x.\n", hr); WARN("Failed to compute glyph origins, hr %#lx.\n", hr);
free(origins); free(origins);
return; return;
} }
...@@ -3751,7 +3751,7 @@ static void layout_get_inlineobj_bbox(struct dwrite_textlayout *layout, struct l ...@@ -3751,7 +3751,7 @@ static void layout_get_inlineobj_bbox(struct dwrite_textlayout *layout, struct l
HRESULT hr; HRESULT hr;
if (FAILED(hr = IDWriteInlineObject_GetMetrics(run->object, &metrics))) { if (FAILED(hr = IDWriteInlineObject_GetMetrics(run->object, &metrics))) {
WARN("Failed to get inline object metrics, hr %#x.\n", hr); WARN("Failed to get inline object metrics, hr %#lx.\n", hr);
memset(bbox, 0, sizeof(*bbox)); memset(bbox, 0, sizeof(*bbox));
return; return;
} }
...@@ -5303,7 +5303,7 @@ static ULONG WINAPI dwritetypography_AddRef(IDWriteTypography *iface) ...@@ -5303,7 +5303,7 @@ static ULONG WINAPI dwritetypography_AddRef(IDWriteTypography *iface)
struct dwrite_typography *typography = impl_from_IDWriteTypography(iface); struct dwrite_typography *typography = impl_from_IDWriteTypography(iface);
ULONG refcount = InterlockedIncrement(&typography->refcount); ULONG refcount = InterlockedIncrement(&typography->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -5313,7 +5313,7 @@ static ULONG WINAPI dwritetypography_Release(IDWriteTypography *iface) ...@@ -5313,7 +5313,7 @@ static ULONG WINAPI dwritetypography_Release(IDWriteTypography *iface)
struct dwrite_typography *typography = impl_from_IDWriteTypography(iface); struct dwrite_typography *typography = impl_from_IDWriteTypography(iface);
ULONG refcount = InterlockedDecrement(&typography->refcount); ULONG refcount = InterlockedDecrement(&typography->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
......
...@@ -104,7 +104,7 @@ static ULONG WINAPI renderingparams_AddRef(IDWriteRenderingParams3 *iface) ...@@ -104,7 +104,7 @@ static ULONG WINAPI renderingparams_AddRef(IDWriteRenderingParams3 *iface)
struct renderingparams *params = impl_from_IDWriteRenderingParams3(iface); struct renderingparams *params = impl_from_IDWriteRenderingParams3(iface);
ULONG refcount = InterlockedIncrement(&params->refcount); ULONG refcount = InterlockedIncrement(&params->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -114,7 +114,7 @@ static ULONG WINAPI renderingparams_Release(IDWriteRenderingParams3 *iface) ...@@ -114,7 +114,7 @@ static ULONG WINAPI renderingparams_Release(IDWriteRenderingParams3 *iface)
struct renderingparams *params = impl_from_IDWriteRenderingParams3(iface); struct renderingparams *params = impl_from_IDWriteRenderingParams3(iface);
ULONG refcount = InterlockedDecrement(&params->refcount); ULONG refcount = InterlockedDecrement(&params->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
if (!refcount) if (!refcount)
free(params); free(params);
...@@ -299,7 +299,7 @@ static ULONG WINAPI localizedstrings_AddRef(IDWriteLocalizedStrings *iface) ...@@ -299,7 +299,7 @@ static ULONG WINAPI localizedstrings_AddRef(IDWriteLocalizedStrings *iface)
struct localizedstrings *strings = impl_from_IDWriteLocalizedStrings(iface); struct localizedstrings *strings = impl_from_IDWriteLocalizedStrings(iface);
ULONG refcount = InterlockedIncrement(&strings->refcount); ULONG refcount = InterlockedIncrement(&strings->refcount);
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -310,7 +310,7 @@ static ULONG WINAPI localizedstrings_Release(IDWriteLocalizedStrings *iface) ...@@ -310,7 +310,7 @@ static ULONG WINAPI localizedstrings_Release(IDWriteLocalizedStrings *iface)
ULONG refcount = InterlockedDecrement(&strings->refcount); ULONG refcount = InterlockedDecrement(&strings->refcount);
size_t i; size_t i;
TRACE("%p, refcount %d.\n", iface, refcount); TRACE("%p, refcount %ld.\n", iface, refcount);
if (!refcount) if (!refcount)
{ {
...@@ -715,7 +715,7 @@ static IDWriteFontCollection1 *factory_get_system_collection(struct dwritefactor ...@@ -715,7 +715,7 @@ static IDWriteFontCollection1 *factory_get_system_collection(struct dwritefactor
if (FAILED(hr = get_system_fontcollection(&factory->IDWriteFactory7_iface, &collection))) if (FAILED(hr = get_system_fontcollection(&factory->IDWriteFactory7_iface, &collection)))
{ {
WARN("Failed to create system font collection, hr %#x.\n", hr); WARN("Failed to create system font collection, hr %#lx.\n", hr);
return NULL; return NULL;
} }
...@@ -754,7 +754,7 @@ static ULONG WINAPI dwritefactory_AddRef(IDWriteFactory7 *iface) ...@@ -754,7 +754,7 @@ static ULONG WINAPI dwritefactory_AddRef(IDWriteFactory7 *iface)
struct dwritefactory *factory = impl_from_IDWriteFactory7(iface); struct dwritefactory *factory = impl_from_IDWriteFactory7(iface);
ULONG refcount = InterlockedIncrement(&factory->refcount); ULONG refcount = InterlockedIncrement(&factory->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
return refcount; return refcount;
} }
...@@ -764,7 +764,7 @@ static ULONG WINAPI dwritefactory_Release(IDWriteFactory7 *iface) ...@@ -764,7 +764,7 @@ static ULONG WINAPI dwritefactory_Release(IDWriteFactory7 *iface)
struct dwritefactory *factory = impl_from_IDWriteFactory7(iface); struct dwritefactory *factory = impl_from_IDWriteFactory7(iface);
ULONG refcount = InterlockedDecrement(&factory->refcount); ULONG refcount = InterlockedDecrement(&factory->refcount);
TRACE("%p, refcount %u.\n", iface, refcount); TRACE("%p, refcount %lu.\n", iface, refcount);
if (!refcount) if (!refcount)
release_dwritefactory(factory); release_dwritefactory(factory);
...@@ -968,7 +968,7 @@ HRESULT factory_get_cached_fontface(IDWriteFactory7 *iface, IDWriteFontFile * co ...@@ -968,7 +968,7 @@ HRESULT factory_get_cached_fontface(IDWriteFactory7 *iface, IDWriteFontFile * co
if (cached_key_size == key_size && !memcmp(cached_key, key, key_size)) if (cached_key_size == key_size && !memcmp(cached_key, key, key_size))
{ {
if (FAILED(hr = IDWriteFontFace5_QueryInterface(cached->fontface, riid, obj))) if (FAILED(hr = IDWriteFontFace5_QueryInterface(cached->fontface, riid, obj)))
WARN("Failed to get %s from fontface, hr %#x.\n", debugstr_guid(riid), hr); WARN("Failed to get %s from fontface, hr %#lx.\n", debugstr_guid(riid), hr);
TRACE("returning cached fontface %p\n", cached->fontface); TRACE("returning cached fontface %p\n", cached->fontface);
break; break;
...@@ -1335,7 +1335,7 @@ static HRESULT WINAPI dwritefactory1_GetEudcFontCollection(IDWriteFactory7 *ifac ...@@ -1335,7 +1335,7 @@ static HRESULT WINAPI dwritefactory1_GetEudcFontCollection(IDWriteFactory7 *ifac
if (FAILED(hr = get_eudc_fontcollection(iface, &eudc_collection))) if (FAILED(hr = get_eudc_fontcollection(iface, &eudc_collection)))
{ {
*collection = NULL; *collection = NULL;
WARN("Failed to get EUDC collection, hr %#x.\n", hr); WARN("Failed to get EUDC collection, hr %#lx.\n", hr);
return hr; return hr;
} }
...@@ -1634,7 +1634,7 @@ static HRESULT create_system_fontset(IDWriteFactory7 *factory, REFIID riid, void ...@@ -1634,7 +1634,7 @@ static HRESULT create_system_fontset(IDWriteFactory7 *factory, REFIID riid, void
if (i != j && !wcsicmp(paths[i], paths[j])) continue; if (i != j && !wcsicmp(paths[i], paths[j])) continue;
if (FAILED(hr = IDWriteFontSetBuilder2_AddFontFile(builder, paths[i])) && hr != DWRITE_E_FILEFORMAT) if (FAILED(hr = IDWriteFontSetBuilder2_AddFontFile(builder, paths[i])) && hr != DWRITE_E_FILEFORMAT)
WARN("Failed to add font file, hr %#x, path %s.\n", hr, debugstr_w(paths[i])); WARN("Failed to add font file, hr %#lx, path %s.\n", hr, debugstr_w(paths[i]));
j = i; j = i;
} }
......
...@@ -1777,7 +1777,7 @@ void dwrite_cmap_init(struct dwrite_cmap *cmap, IDWriteFontFile *file, unsigned ...@@ -1777,7 +1777,7 @@ void dwrite_cmap_init(struct dwrite_cmap *cmap, IDWriteFontFile *file, unsigned
/* For fontface stream is already available and preset. */ /* For fontface stream is already available and preset. */
if (!cmap->stream && FAILED(hr = get_filestream_from_file(file, &cmap->stream))) if (!cmap->stream && FAILED(hr = get_filestream_from_file(file, &cmap->stream)))
{ {
WARN("Failed to get file stream, hr %#x.\n", hr); WARN("Failed to get file stream, hr %#lx.\n", hr);
goto failed; goto failed;
} }
...@@ -2274,7 +2274,7 @@ static void get_name_record_locale(enum OPENTYPE_PLATFORM_ID platform, USHORT la ...@@ -2274,7 +2274,7 @@ static void get_name_record_locale(enum OPENTYPE_PLATFORM_ID platform, USHORT la
case OPENTYPE_PLATFORM_WIN: case OPENTYPE_PLATFORM_WIN:
if (!LCIDToLocaleName(MAKELCID(lang_id, SORT_DEFAULT), locale, locale_len, 0)) if (!LCIDToLocaleName(MAKELCID(lang_id, SORT_DEFAULT), locale, locale_len, 0))
{ {
FIXME("failed to get locale name for lcid=0x%08x\n", MAKELCID(lang_id, SORT_DEFAULT)); FIXME("failed to get locale name for lcid=0x%08lx\n", MAKELCID(lang_id, SORT_DEFAULT));
wcscpy(locale, L"en-US"); wcscpy(locale, L"en-US");
} }
break; break;
...@@ -2488,7 +2488,7 @@ static HRESULT opentype_get_font_strings_from_meta(const struct file_stream_desc ...@@ -2488,7 +2488,7 @@ static HRESULT opentype_get_font_strings_from_meta(const struct file_stream_desc
version = table_read_be_dword(&meta, 0); version = table_read_be_dword(&meta, 0);
if (version != 1) if (version != 1)
{ {
WARN("Unexpected meta table version %d.\n", version); WARN("Unexpected meta table version %ld.\n", version);
goto end; goto end;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment