diff --git a/dlls/gdi/tests/Makefile.in b/dlls/gdi/tests/Makefile.in index 87bb54f2752..96e2ce095bb 100644 --- a/dlls/gdi/tests/Makefile.in +++ b/dlls/gdi/tests/Makefile.in @@ -4,7 +4,6 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ TESTDLL = gdi32.dll IMPORTS = user32 gdi32 kernel32 -EXTRADEFS = -DWINE_NO_LONG_AS_INT CTESTS = \ bitmap.c \ diff --git a/dlls/gdi/tests/bitmap.c b/dlls/gdi/tests/bitmap.c index 62a57ebf2da..8503e088b50 100644 --- a/dlls/gdi/tests/bitmap.c +++ b/dlls/gdi/tests/bitmap.c @@ -300,26 +300,26 @@ static void test_dib_info(HBITMAP hbm, const void *bits, const BITMAPINFOHEADER ok(ret == sizeof(ds), "wrong size %d\n", ret); ok(ds.dsBm.bmBits == bits, "wrong bm.bmBits %p != %p\n", ds.dsBm.bmBits, bits); - ok(ds.dsBmih.biSizeImage == ds.dsBm.bmWidthBytes * ds.dsBm.bmHeight, "%lu != %u\n", + ok(ds.dsBmih.biSizeImage == ds.dsBm.bmWidthBytes * ds.dsBm.bmHeight, "%u != %u\n", ds.dsBmih.biSizeImage, ds.dsBm.bmWidthBytes * ds.dsBm.bmHeight); - ok(bmih->biSizeImage == 0, "%lu != 0\n", bmih->biSizeImage); + ok(bmih->biSizeImage == 0, "%u != 0\n", bmih->biSizeImage); ds.dsBmih.biSizeImage = 0; - ok(ds.dsBmih.biSize == bmih->biSize, "%lu != %lu\n", ds.dsBmih.biSize, bmih->biSize); - ok(ds.dsBmih.biWidth == bmih->biWidth, "%lu != %lu\n", ds.dsBmih.biWidth, bmih->biWidth); - ok(ds.dsBmih.biHeight == bmih->biHeight, "%lu != %lu\n", ds.dsBmih.biHeight, bmih->biHeight); + ok(ds.dsBmih.biSize == bmih->biSize, "%u != %u\n", ds.dsBmih.biSize, bmih->biSize); + ok(ds.dsBmih.biWidth == bmih->biWidth, "%u != %u\n", ds.dsBmih.biWidth, bmih->biWidth); + ok(ds.dsBmih.biHeight == bmih->biHeight, "%u != %u\n", ds.dsBmih.biHeight, bmih->biHeight); ok(ds.dsBmih.biPlanes == bmih->biPlanes, "%u != %u\n", ds.dsBmih.biPlanes, bmih->biPlanes); ok(ds.dsBmih.biBitCount == bmih->biBitCount, "%u != %u\n", ds.dsBmih.biBitCount, bmih->biBitCount); - ok(ds.dsBmih.biCompression == bmih->biCompression, "%lu != %lu\n", ds.dsBmih.biCompression, bmih->biCompression); - ok(ds.dsBmih.biSizeImage == bmih->biSizeImage, "%lu != %lu\n", ds.dsBmih.biSizeImage, bmih->biSizeImage); - ok(ds.dsBmih.biXPelsPerMeter == bmih->biXPelsPerMeter, "%lu != %lu\n", ds.dsBmih.biXPelsPerMeter, bmih->biXPelsPerMeter); - ok(ds.dsBmih.biYPelsPerMeter == bmih->biYPelsPerMeter, "%lu != %lu\n", ds.dsBmih.biYPelsPerMeter, bmih->biYPelsPerMeter); + ok(ds.dsBmih.biCompression == bmih->biCompression, "%u != %u\n", ds.dsBmih.biCompression, bmih->biCompression); + ok(ds.dsBmih.biSizeImage == bmih->biSizeImage, "%u != %u\n", ds.dsBmih.biSizeImage, bmih->biSizeImage); + ok(ds.dsBmih.biXPelsPerMeter == bmih->biXPelsPerMeter, "%u != %u\n", ds.dsBmih.biXPelsPerMeter, bmih->biXPelsPerMeter); + ok(ds.dsBmih.biYPelsPerMeter == bmih->biYPelsPerMeter, "%u != %u\n", ds.dsBmih.biYPelsPerMeter, bmih->biYPelsPerMeter); memset(&ds, 0xAA, sizeof(ds)); ret = GetObject(hbm, sizeof(ds) - 4, &ds); ok(ret == sizeof(ds.dsBm), "wrong size %d\n", ret); - ok(ds.dsBm.bmWidth == bmih->biWidth, "%lu != %lu\n", ds.dsBmih.biWidth, bmih->biWidth); - ok(ds.dsBm.bmHeight == bmih->biHeight, "%lu != %lu\n", ds.dsBmih.biHeight, bmih->biHeight); + ok(ds.dsBm.bmWidth == bmih->biWidth, "%u != %u\n", ds.dsBmih.biWidth, bmih->biWidth); + ok(ds.dsBm.bmHeight == bmih->biHeight, "%u != %u\n", ds.dsBmih.biHeight, bmih->biHeight); ok(ds.dsBm.bmBits == bits, "%p != %p\n", ds.dsBm.bmBits, bits); ret = GetObject(hbm, 0, &ds); @@ -383,7 +383,7 @@ static void test_dibsections(void) SetLastError(0xdeadbeef); hdib = CreateDIBSection(hdc, pbmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(hdib != NULL, "CreateDIBSection error %ld\n", GetLastError()); + ok(hdib != NULL, "CreateDIBSection error %d\n", GetLastError()); ok(GetObject(hdib, sizeof(DIBSECTION), &dibsec) != 0, "GetObject failed for DIBSection\n"); ok(dibsec.dsBm.bmBits == bits, "dibsec.dsBits %p != bits %p\n", dibsec.dsBm.bmBits, bits); @@ -392,11 +392,11 @@ static void test_dibsections(void) "VirtualQuery failed\n"); ok(info.BaseAddress == bits, "%p != %p\n", info.BaseAddress, bits); ok(info.AllocationBase == bits, "%p != %p\n", info.AllocationBase, bits); - ok(info.AllocationProtect == PAGE_READWRITE, "%lx != PAGE_READWRITE\n", info.AllocationProtect); + ok(info.AllocationProtect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.AllocationProtect); ok(info.RegionSize == 0x26000, "0x%lx != 0x26000\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "%lx != MEM_COMMIT\n", info.State); - ok(info.Protect == PAGE_READWRITE, "%lx != PAGE_READWRITE\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "%lx != MEM_PRIVATE\n", info.Type); + ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); + ok(info.Protect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.Protect); + ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); test_dib_info(hdib, bits, &pbmi->bmiHeader); DeleteObject(hdib); @@ -406,7 +406,7 @@ static void test_dibsections(void) SetLastError(0xdeadbeef); hdib = CreateDIBSection(hdc, pbmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); ok(hdib == NULL, "CreateDIBSection should fail when asked to create a compressed DIB section\n"); - ok(GetLastError() == 0xdeadbeef, "wrong error %ld\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef, "wrong error %d\n", GetLastError()); pbmi->bmiHeader.biBitCount = 16; pbmi->bmiHeader.biCompression = BI_BITFIELDS; @@ -415,18 +415,18 @@ static void test_dibsections(void) ((PDWORD)pbmi->bmiColors)[2] = 0x001f; SetLastError(0xdeadbeef); hdib = CreateDIBSection(hdc, pbmi, DIB_RGB_COLORS, (void**)&bits, NULL, 0); - ok(hdib != NULL, "CreateDIBSection error %ld\n", GetLastError()); + ok(hdib != NULL, "CreateDIBSection error %d\n", GetLastError()); /* test the DIB memory */ ok(VirtualQuery(bits, &info, sizeof(info)) == sizeof(info), "VirtualQuery failed\n"); ok(info.BaseAddress == bits, "%p != %p\n", info.BaseAddress, bits); ok(info.AllocationBase == bits, "%p != %p\n", info.AllocationBase, bits); - ok(info.AllocationProtect == PAGE_READWRITE, "%lx != PAGE_READWRITE\n", info.AllocationProtect); + ok(info.AllocationProtect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.AllocationProtect); ok(info.RegionSize == 0x19000, "0x%lx != 0x19000\n", info.RegionSize); - ok(info.State == MEM_COMMIT, "%lx != MEM_COMMIT\n", info.State); - ok(info.Protect == PAGE_READWRITE, "%lx != PAGE_READWRITE\n", info.Protect); - ok(info.Type == MEM_PRIVATE, "%lx != MEM_PRIVATE\n", info.Type); + ok(info.State == MEM_COMMIT, "%x != MEM_COMMIT\n", info.State); + ok(info.Protect == PAGE_READWRITE, "%x != PAGE_READWRITE\n", info.Protect); + ok(info.Type == MEM_PRIVATE, "%x != MEM_PRIVATE\n", info.Type); test_dib_info(hdib, bits, &pbmi->bmiHeader); DeleteObject(hdib); @@ -449,7 +449,7 @@ static void test_dibsections(void) ok(hdib != NULL, "CreateDIBSection failed\n"); ok(GetObject(hdib, sizeof(DIBSECTION), &dibsec) != 0, "GetObject failed for DIBSection\n"); ok(dibsec.dsBmih.biClrUsed == 2, - "created DIBSection: wrong biClrUsed field: %lu, should be: %u\n", dibsec.dsBmih.biClrUsed, 2); + "created DIBSection: wrong biClrUsed field: %u, should be: %u\n", dibsec.dsBmih.biClrUsed, 2); /* Test if the old BITMAPCOREINFO structure is supported */ @@ -549,7 +549,7 @@ static void test_dibsections(void) ok(hdib != NULL, "CreateDIBSection failed\n"); ok(GetObject(hdib, sizeof(DIBSECTION), &dibsec) != 0, "GetObject failed for DIB Section\n"); ok(dibsec.dsBmih.biClrUsed == 16, - "created DIBSection: wrong biClrUsed field: %lu, should be: %u\n", dibsec.dsBmih.biClrUsed, 16); + "created DIBSection: wrong biClrUsed field: %u, should be: %u\n", dibsec.dsBmih.biClrUsed, 16); test_dib_info(hdib, bits, &pbmi->bmiHeader); DeleteObject(hdib); @@ -567,7 +567,7 @@ static void test_dibsections(void) ok(hdib != NULL, "CreateDIBSection failed\n"); ok(GetObject(hdib, sizeof(DIBSECTION), &dibsec) != 0, "GetObject failed for DIB Section\n"); ok(dibsec.dsBmih.biClrUsed == 256, - "created DIBSection: wrong biClrUsed field: %lu, should be: %u\n", dibsec.dsBmih.biClrUsed, 256); + "created DIBSection: wrong biClrUsed field: %u, should be: %u\n", dibsec.dsBmih.biClrUsed, 256); oldbm = SelectObject(hdcmem, hdib); @@ -602,7 +602,7 @@ static void test_dibsections(void) ok(hdib != NULL, "CreateDIBSection failed\n"); ok(GetObject(hdib, sizeof(DIBSECTION), &dibsec) != 0, "GetObject failed for DIB Section\n"); ok(dibsec.dsBmih.biClrUsed == 2, - "created DIBSection: wrong biClrUsed field: %lu, should be: %u\n", dibsec.dsBmih.biClrUsed, 2); + "created DIBSection: wrong biClrUsed field: %u, should be: %u\n", dibsec.dsBmih.biClrUsed, 2); /* The colour table has already been grabbed from the dc, so we select back the old palette */ @@ -654,8 +654,8 @@ static void test_dibsections(void) BitBlt(hdcmem2, 0, 0, 16,16, hdcmem, 0, 0, SRCCOPY); - ok(bits32[0] == 0xff00, "lower left pixel is %08lx\n", bits32[0]); - ok(bits32[17] == 0xff00ff, "bottom but one, left pixel is %08lx\n", bits32[17]); + ok(bits32[0] == 0xff00, "lower left pixel is %08x\n", bits32[0]); + ok(bits32[17] == 0xff00ff, "bottom but one, left pixel is %08x\n", bits32[17]); SelectObject(hdcmem2, oldbm2); test_dib_info(hdib2, bits32, &pbmi->bmiHeader); @@ -694,7 +694,7 @@ static void test_dibsections(void) ok(hdib != NULL, "CreateDIBSection failed\n"); ok(GetObject(hdib, sizeof(DIBSECTION), &dibsec) != 0, "GetObject failed for DIB Section\n"); ok(dibsec.dsBmih.biClrUsed == 256, - "created DIBSection: wrong biClrUsed field: %lu, should be: %u\n", dibsec.dsBmih.biClrUsed, 256); + "created DIBSection: wrong biClrUsed field: %u, should be: %u\n", dibsec.dsBmih.biClrUsed, 256); test_dib_info(hdib, bits, &pbmi->bmiHeader); diff --git a/dlls/gdi/tests/brush.c b/dlls/gdi/tests/brush.c index c2aee7c138e..3d96a3409fa 100644 --- a/dlls/gdi/tests/brush.c +++ b/dlls/gdi/tests/brush.c @@ -58,15 +58,15 @@ static void test_solidbrush(void) stockBrush = NULL; memset(&br, 0, sizeof(br)); ret = GetObject(solidBrush, sizeof(br), &br); - ok( ret !=0, "GetObject on solid %s brush failed, error=%ld\n", stock[i].name, GetLastError()); + ok( ret !=0, "GetObject on solid %s brush failed, error=%d\n", stock[i].name, GetLastError()); ok(br.lbStyle==BS_SOLID, "%s brush has wrong style, got %d expected %d\n", stock[i].name, br.lbStyle, BS_SOLID); - ok(br.lbColor==stock[i].color, "%s brush has wrong color, got 0x%08lx expected 0x%08lx\n", stock[i].name, br.lbColor, stock[i].color); + ok(br.lbColor==stock[i].color, "%s brush has wrong color, got 0x%08x expected 0x%08x\n", stock[i].name, br.lbColor, stock[i].color); if(stockBrush) { /* Sanity check, make sure the colors being compared do in fact have a stock brush */ ret = GetObject(stockBrush, sizeof(br), &br); - ok( ret !=0, "GetObject on stock %s brush failed, error=%ld\n", stock[i].name, GetLastError()); - ok(br.lbColor==stock[i].color, "stock %s brush unexpected color, got 0x%08lx expected 0x%08lx\n", stock[i].name, br.lbColor, stock[i].color); + ok( ret !=0, "GetObject on stock %s brush failed, error=%d\n", stock[i].name, GetLastError()); + ok(br.lbColor==stock[i].color, "stock %s brush unexpected color, got 0x%08x expected 0x%08x\n", stock[i].name, br.lbColor, stock[i].color); } DeleteObject(solidBrush); diff --git a/dlls/gdi/tests/clipping.c b/dlls/gdi/tests/clipping.c index 079fbcc804c..5e1d35f63b1 100644 --- a/dlls/gdi/tests/clipping.c +++ b/dlls/gdi/tests/clipping.c @@ -52,7 +52,7 @@ static void test_GetRandomRgn(void) ret = GetRandomRgn(hdc, hrgn, 1); ok(ret != 0, "GetRandomRgn rets %d\n", ret); GetRgnBox(hrgn, &ret_rc); - ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %ld,%ld - %ld,%ld\n", + ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %d,%d - %d,%d\n", ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom); ret = GetRandomRgn(hdc, hrgn, 2); @@ -61,7 +61,7 @@ static void test_GetRandomRgn(void) ret = GetRandomRgn(hdc, hrgn, 3); ok(ret != 0, "GetRandomRgn rets %d\n", ret); GetRgnBox(hrgn, &ret_rc); - ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %ld,%ld - %ld,%ld\n", + ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %d,%d - %d,%d\n", ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom); /* Move the clip to the meta and clear the clip */ @@ -72,13 +72,13 @@ static void test_GetRandomRgn(void) ret = GetRandomRgn(hdc, hrgn, 2); ok(ret != 0, "GetRandomRgn rets %d\n", ret); GetRgnBox(hrgn, &ret_rc); - ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %ld,%ld - %ld,%ld\n", + ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %d,%d - %d,%d\n", ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom); ret = GetRandomRgn(hdc, hrgn, 3); ok(ret != 0, "GetRandomRgn rets %d\n", ret); GetRgnBox(hrgn, &ret_rc); - ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %ld,%ld - %ld,%ld\n", + ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %d,%d - %d,%d\n", ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom); /* Set a new clip (still got the meta) */ @@ -88,13 +88,13 @@ static void test_GetRandomRgn(void) ret = GetRandomRgn(hdc, hrgn, 1); ok(ret != 0, "GetRandomRgn rets %d\n", ret); GetRgnBox(hrgn, &ret_rc); - ok(EqualRect(&rc2, &ret_rc), "GetRandomRgn %ld,%ld - %ld,%ld\n", + ok(EqualRect(&rc2, &ret_rc), "GetRandomRgn %d,%d - %d,%d\n", ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom); ret = GetRandomRgn(hdc, hrgn, 2); ok(ret != 0, "GetRandomRgn rets %d\n", ret); GetRgnBox(hrgn, &ret_rc); - ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %ld,%ld - %ld,%ld\n", + ok(EqualRect(&rc, &ret_rc), "GetRandomRgn %d,%d - %d,%d\n", ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom); IntersectRect(&rc2, &rc, &rc2); @@ -102,7 +102,7 @@ static void test_GetRandomRgn(void) ret = GetRandomRgn(hdc, hrgn, 3); ok(ret != 0, "GetRandomRgn rets %d\n", ret); GetRgnBox(hrgn, &ret_rc); - ok(EqualRect(&rc2, &ret_rc), "GetRandomRgn %ld,%ld - %ld,%ld\n", + ok(EqualRect(&rc2, &ret_rc), "GetRandomRgn %d,%d - %d,%d\n", ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom); @@ -111,7 +111,7 @@ static void test_GetRandomRgn(void) GetRgnBox(hrgn, &ret_rc); if(GetVersion() & 0x80000000) OffsetRect(&window_rc, -window_rc.left, -window_rc.top); - ok(EqualRect(&window_rc, &ret_rc), "GetRandomRgn %ld,%ld - %ld,%ld\n", + ok(EqualRect(&window_rc, &ret_rc), "GetRandomRgn %d,%d - %d,%d\n", ret_rc.left, ret_rc.top, ret_rc.right, ret_rc.bottom); DeleteObject(hrgn); diff --git a/dlls/gdi/tests/dc.c b/dlls/gdi/tests/dc.c index 5b50632750d..59555facb73 100644 --- a/dlls/gdi/tests/dc.c +++ b/dlls/gdi/tests/dc.c @@ -42,9 +42,9 @@ static void dump_region(HRGN hrgn) if (!(size = GetRegionData( hrgn, 0, NULL ))) return; if (!(data = HeapAlloc( GetProcessHeap(), 0, size ))) return; GetRegionData( hrgn, size, data ); - printf( "%ld rects:", data->rdh.nCount ); + printf( "%d rects:", data->rdh.nCount ); for (i = 0, rect = (RECT *)data->Buffer; i < data->rdh.nCount; i++, rect++) - printf( " (%ld,%ld)-(%ld,%ld)", rect->left, rect->top, rect->right, rect->bottom ); + printf( " (%d,%d)-(%d,%d)", rect->left, rect->top, rect->right, rect->bottom ); printf( "\n" ); HeapFree( GetProcessHeap(), 0, data ); } @@ -74,12 +74,12 @@ static void test_savedc_2(void) ret = GetClipRgn(hdc, hrgn); ok(ret == 0, "GetClipRgn returned %d instead of 0\n", ret); ret = GetRgnBox(hrgn, &rc); - ok(ret == NULLREGION, "GetRgnBox returned %d (%ld,%ld-%ld,%ld) instead of NULLREGION\n", + ok(ret == NULLREGION, "GetRgnBox returned %d (%d,%d-%d,%d) instead of NULLREGION\n", ret, rc.left, rc.top, rc.right, rc.bottom); /*dump_region(hrgn);*/ SetRect(&rc, 0, 0, 100, 100); ok(EqualRect(&rc, &rc_clip), - "rects are not equal: (%ld,%ld-%ld,%ld) - (%ld,%ld-%ld,%ld)\n", + "rects are not equal: (%d,%d-%d,%d) - (%d,%d-%d,%d)\n", rc.left, rc.top, rc.right, rc.bottom, rc_clip.left, rc_clip.top, rc_clip.right, rc_clip.bottom); diff --git a/dlls/gdi/tests/font.c b/dlls/gdi/tests/font.c index 1af7fba9782..cc8325ea35c 100644 --- a/dlls/gdi/tests/font.c +++ b/dlls/gdi/tests/font.c @@ -130,15 +130,15 @@ static void test_font_metrics(HDC hdc, HFONT hfont, const char *test_str, GetTextMetricsA(hdc, &tm); - ok(tm.tmHeight == tm_orig->tmHeight * scale_y, "%ld != %ld\n", tm.tmHeight, tm_orig->tmHeight * scale_y); - ok(tm.tmAscent == tm_orig->tmAscent * scale_y, "%ld != %ld\n", tm.tmAscent, tm_orig->tmAscent * scale_y); - ok(tm.tmDescent == tm_orig->tmDescent * scale_y, "%ld != %ld\n", tm.tmDescent, tm_orig->tmDescent * scale_y); - ok(tm.tmAveCharWidth == tm_orig->tmAveCharWidth * scale_x, "%ld != %ld\n", tm.tmAveCharWidth, tm_orig->tmAveCharWidth * scale_x); + ok(tm.tmHeight == tm_orig->tmHeight * scale_y, "%d != %d\n", tm.tmHeight, tm_orig->tmHeight * scale_y); + ok(tm.tmAscent == tm_orig->tmAscent * scale_y, "%d != %d\n", tm.tmAscent, tm_orig->tmAscent * scale_y); + ok(tm.tmDescent == tm_orig->tmDescent * scale_y, "%d != %d\n", tm.tmDescent, tm_orig->tmDescent * scale_y); + ok(tm.tmAveCharWidth == tm_orig->tmAveCharWidth * scale_x, "%d != %d\n", tm.tmAveCharWidth, tm_orig->tmAveCharWidth * scale_x); GetTextExtentPoint32A(hdc, test_str, test_str_len, &size); - ok(size.cx == size_orig->cx * scale_x, "%ld != %ld\n", size.cx, size_orig->cx * scale_x); - ok(size.cy == size_orig->cy * scale_y, "%ld != %ld\n", size.cy, size_orig->cy * scale_y); + ok(size.cx == size_orig->cx * scale_x, "%d != %d\n", size.cx, size_orig->cx * scale_x); + ok(size.cy == size_orig->cy * scale_y, "%d != %d\n", size.cy, size_orig->cy * scale_y); GetCharWidthA(hdc, 'A', 'A', &width); @@ -169,7 +169,7 @@ static void test_bitmap_font(void) return; } - trace("found bitmap font %s, height %ld\n", bitmap_lf.lfFaceName, bitmap_lf.lfHeight); + trace("found bitmap font %s, height %d\n", bitmap_lf.lfFaceName, bitmap_lf.lfHeight); height_orig = bitmap_lf.lfHeight; hfont = create_font("bitmap", &bitmap_lf); @@ -331,24 +331,24 @@ static void test_bitmap_font_metrics(void) ret = EnumFontFamiliesEx(hdc, &lf, find_font_proc, (LPARAM)&lf, 0); if (ret) continue; - trace("found font %s, height %ld charset %x\n", lf.lfFaceName, lf.lfHeight, lf.lfCharSet); + trace("found font %s, height %d charset %x\n", lf.lfFaceName, lf.lfHeight, lf.lfCharSet); hfont = create_font(lf.lfFaceName, &lf); old_hfont = SelectObject(hdc, hfont); - ok(GetTextMetrics(hdc, &tm), "GetTextMetrics error %ld\n", GetLastError()); + ok(GetTextMetrics(hdc, &tm), "GetTextMetrics error %d\n", GetLastError()); - ok(tm.tmWeight == fd[i].weight, "%s(%d): tm.tmWeight %ld != %d\n", fd[i].face_name, fd[i].height, tm.tmWeight, fd[i].weight); - ok(tm.tmHeight == fd[i].height, "%s(%d): tm.tmHeight %ld != %d\n", fd[i].face_name, fd[i].height, tm.tmHeight, fd[i].height); - ok(tm.tmAscent == fd[i].ascent, "%s(%d): tm.tmAscent %ld != %d\n", fd[i].face_name, fd[i].height, tm.tmAscent, fd[i].ascent); - ok(tm.tmDescent == fd[i].descent, "%s(%d): tm.tmDescent %ld != %d\n", fd[i].face_name, fd[i].height, tm.tmDescent, fd[i].descent); - ok(tm.tmInternalLeading == fd[i].int_leading, "%s(%d): tm.tmInternalLeading %ld != %d\n", fd[i].face_name, fd[i].height, tm.tmInternalLeading, fd[i].int_leading); - ok(tm.tmExternalLeading == fd[i].ext_leading, "%s(%d): tm.tmExternalLeading %ld != %d\n", fd[i].face_name, fd[i].height, tm.tmExternalLeading, fd[i].ext_leading); - ok(tm.tmAveCharWidth == fd[i].ave_char_width, "%s(%d): tm.tmAveCharWidth %ld != %d\n", fd[i].face_name, fd[i].height, tm.tmAveCharWidth, fd[i].ave_char_width); + ok(tm.tmWeight == fd[i].weight, "%s(%d): tm.tmWeight %d != %d\n", fd[i].face_name, fd[i].height, tm.tmWeight, fd[i].weight); + ok(tm.tmHeight == fd[i].height, "%s(%d): tm.tmHeight %d != %d\n", fd[i].face_name, fd[i].height, tm.tmHeight, fd[i].height); + ok(tm.tmAscent == fd[i].ascent, "%s(%d): tm.tmAscent %d != %d\n", fd[i].face_name, fd[i].height, tm.tmAscent, fd[i].ascent); + ok(tm.tmDescent == fd[i].descent, "%s(%d): tm.tmDescent %d != %d\n", fd[i].face_name, fd[i].height, tm.tmDescent, fd[i].descent); + ok(tm.tmInternalLeading == fd[i].int_leading, "%s(%d): tm.tmInternalLeading %d != %d\n", fd[i].face_name, fd[i].height, tm.tmInternalLeading, fd[i].int_leading); + ok(tm.tmExternalLeading == fd[i].ext_leading, "%s(%d): tm.tmExternalLeading %d != %d\n", fd[i].face_name, fd[i].height, tm.tmExternalLeading, fd[i].ext_leading); + ok(tm.tmAveCharWidth == fd[i].ave_char_width, "%s(%d): tm.tmAveCharWidth %d != %d\n", fd[i].face_name, fd[i].height, tm.tmAveCharWidth, fd[i].ave_char_width); /* Don't run the max char width test on System/ANSI_CHARSET. We have extra characters in our font that make the max width bigger */ if(strcmp(lf.lfFaceName, "System") || lf.lfCharSet != ANSI_CHARSET) - ok(tm.tmMaxCharWidth == fd[i].max_char_width, "%s(%d): tm.tmMaxCharWidth %ld != %d\n", fd[i].face_name, fd[i].height, tm.tmMaxCharWidth, fd[i].max_char_width); + ok(tm.tmMaxCharWidth == fd[i].max_char_width, "%s(%d): tm.tmMaxCharWidth %d != %d\n", fd[i].face_name, fd[i].height, tm.tmMaxCharWidth, fd[i].max_char_width); SelectObject(hdc, old_hfont); DeleteObject(hfont); @@ -376,19 +376,19 @@ static void test_GdiGetCharDimensions(void) avgwidth = ((size.cx / 26) + 1) / 2; ret = GdiGetCharDimensions(hdc, &tm, &height); - ok(ret == avgwidth, "GdiGetCharDimensions should have returned width of %ld instead of %ld\n", avgwidth, ret); - ok(height == tm.tmHeight, "GdiGetCharDimensions should have set height to %ld instead of %ld\n", tm.tmHeight, height); + ok(ret == avgwidth, "GdiGetCharDimensions should have returned width of %d instead of %d\n", avgwidth, ret); + ok(height == tm.tmHeight, "GdiGetCharDimensions should have set height to %d instead of %d\n", tm.tmHeight, height); ret = GdiGetCharDimensions(hdc, &tm, NULL); - ok(ret == avgwidth, "GdiGetCharDimensions should have returned width of %ld instead of %ld\n", avgwidth, ret); + ok(ret == avgwidth, "GdiGetCharDimensions should have returned width of %d instead of %d\n", avgwidth, ret); ret = GdiGetCharDimensions(hdc, NULL, NULL); - ok(ret == avgwidth, "GdiGetCharDimensions should have returned width of %ld instead of %ld\n", avgwidth, ret); + ok(ret == avgwidth, "GdiGetCharDimensions should have returned width of %d instead of %d\n", avgwidth, ret); height = 0; ret = GdiGetCharDimensions(hdc, NULL, &height); - ok(ret == avgwidth, "GdiGetCharDimensions should have returned width of %ld instead of %ld\n", avgwidth, ret); - ok(height == size.cy, "GdiGetCharDimensions should have set height to %ld instead of %ld\n", size.cy, height); + ok(ret == avgwidth, "GdiGetCharDimensions should have returned width of %d instead of %d\n", avgwidth, ret); + ok(height == size.cy, "GdiGetCharDimensions should have set height to %d instead of %d\n", size.cy, height); DeleteDC(hdc); } @@ -426,7 +426,7 @@ static void test_text_extents(void) hfont = SelectObject(hdc, hfont); GetTextMetricsA(hdc, &tm); GetTextExtentPointA(hdc, "o", 1, &sz); - ok(sz.cy == tm.tmHeight, "cy %ld tmHeight %ld\n", sz.cy, tm.tmHeight); + ok(sz.cy == tm.tmHeight, "cy %d tmHeight %d\n", sz.cy, tm.tmHeight); SetLastError(0xdeadbeef); GetTextExtentExPointW(hdc, wt, 1, 1, &fit1, &fit2, &sz1); @@ -447,7 +447,7 @@ static void test_text_extents(void) GetTextExtentExPointW(hdc, wt, len, 32767, &fit1, extents, &sz1); GetTextExtentPointW(hdc, wt, len, &sz2); ok(sz1.cy == sz2.cy, - "cy from GetTextExtentExPointW (%ld) and GetTextExtentPointW (%ld) differ\n", sz1.cy, sz2.cy); + "cy from GetTextExtentExPointW (%d) and GetTextExtentPointW (%d) differ\n", sz1.cy, sz2.cy); /* Because of the '\n' in the string GetTextExtentExPoint and GetTextExtentPoint return different widths under Win2k, but under WinXP they return the same width. So we don't test that @@ -513,11 +513,11 @@ static void test_GetGlyphIndices() ok(GetTextMetrics(hdc, &textm), "GetTextMetric failed\n"); flags |= GGI_MARK_NONEXISTING_GLYPHS; charcount = GetGlyphIndicesW(hdc, testtext, (sizeof(testtext)/2)-1, glyphs, flags); - ok(charcount == 5, "GetGlyphIndices count of glyphs should = 5 not %ld\n", charcount); + ok(charcount == 5, "GetGlyphIndices count of glyphs should = 5 not %d\n", charcount); ok(glyphs[4] == 0x001f, "GetGlyphIndices should have returned a nonexistent char not %04x\n", glyphs[4]); flags = 0; charcount = GetGlyphIndicesW(hdc, testtext, (sizeof(testtext)/2)-1, glyphs, flags); - ok(charcount == 5, "GetGlyphIndices count of glyphs should = 5 not %ld\n", charcount); + ok(charcount == 5, "GetGlyphIndices count of glyphs should = 5 not %d\n", charcount); ok(glyphs[4] == textm.tmDefaultChar, "GetGlyphIndices should have returned a %04x not %04x\n", textm.tmDefaultChar, glyphs[4]); } @@ -630,7 +630,7 @@ static void test_GetKerningPairs(void) continue; } - trace("testing font %s, height %ld\n", kd[i].face_name, kd[i].height); + trace("testing font %s, height %d\n", kd[i].face_name, kd[i].height); memset(&lf, 0, sizeof(lf)); strcpy(lf.lfFaceName, kd[i].face_name); @@ -642,13 +642,13 @@ static void test_GetKerningPairs(void) SetLastError(0xdeadbeef); otm.otmSize = sizeof(otm); /* just in case for Win9x compatibility */ - ok(GetOutlineTextMetricsW(hdc, sizeof(otm), &otm) == sizeof(otm), "GetOutlineTextMetricsW error %ld\n", GetLastError()); + ok(GetOutlineTextMetricsW(hdc, sizeof(otm), &otm) == sizeof(otm), "GetOutlineTextMetricsW error %d\n", GetLastError()); - ok(kd[i].tmHeight == otm.otmTextMetrics.tmHeight, "expected %ld, got %ld\n", + ok(kd[i].tmHeight == otm.otmTextMetrics.tmHeight, "expected %d, got %d\n", kd[i].tmHeight, otm.otmTextMetrics.tmHeight); - ok(kd[i].tmAscent == otm.otmTextMetrics.tmAscent, "expected %ld, got %ld\n", + ok(kd[i].tmAscent == otm.otmTextMetrics.tmAscent, "expected %d, got %d\n", kd[i].tmAscent, otm.otmTextMetrics.tmAscent); - ok(kd[i].tmDescent == otm.otmTextMetrics.tmDescent, "expected %ld, got %ld\n", + ok(kd[i].tmDescent == otm.otmTextMetrics.tmDescent, "expected %d, got %d\n", kd[i].tmDescent, otm.otmTextMetrics.tmDescent); ok(kd[i].otmEMSquare == otm.otmEMSquare, "expected %u, got %u\n", @@ -677,7 +677,7 @@ todo_wine { } total_kern_pairs = GetKerningPairsW(hdc, 0, NULL); - trace("total_kern_pairs %lu\n", total_kern_pairs); + trace("total_kern_pairs %u\n", total_kern_pairs); kern_pair = HeapAlloc(GetProcessHeap(), 0, total_kern_pairs * sizeof(*kern_pair)); #if 0 /* Win98 (GetKerningPairsA) and XP behave differently here, the test passes on XP */ @@ -689,13 +689,13 @@ todo_wine { #endif ret = GetKerningPairsW(hdc, 100, NULL); - ok(ret == total_kern_pairs, "got %lu, expected %lu\n", ret, total_kern_pairs); + ok(ret == total_kern_pairs, "got %u, expected %u\n", ret, total_kern_pairs); ret = GetKerningPairsW(hdc, total_kern_pairs/2, kern_pair); - ok(ret == total_kern_pairs/2, "got %lu, expected %lu\n", ret, total_kern_pairs/2); + ok(ret == total_kern_pairs/2, "got %u, expected %u\n", ret, total_kern_pairs/2); ret = GetKerningPairsW(hdc, total_kern_pairs, kern_pair); - ok(ret == total_kern_pairs, "got %lu, expected %lu\n", ret, total_kern_pairs); + ok(ret == total_kern_pairs, "got %u, expected %u\n", ret, total_kern_pairs); matches = 0; @@ -721,7 +721,7 @@ todo_wine { } } - ok(matches == kd[i].total_kern_pairs, "got matches %lu, expected %lu\n", + ok(matches == kd[i].total_kern_pairs, "got matches %u, expected %u\n", matches, kd[i].total_kern_pairs); HeapFree(GetProcessHeap(), 0, kern_pair); diff --git a/dlls/gdi/tests/gdiobj.c b/dlls/gdi/tests/gdiobj.c index 21310b11685..c7588fd16b5 100644 --- a/dlls/gdi/tests/gdiobj.c +++ b/dlls/gdi/tests/gdiobj.c @@ -44,55 +44,55 @@ static void test_gdi_objects(void) SetLastError(0); hp = SelectObject(NULL, GetStockObject(BLACK_PEN)); ok(!hp && GetLastError() == ERROR_INVALID_HANDLE, - "SelectObject(NULL DC) expected 0, ERROR_INVALID_HANDLE, got %p, 0x%08lx\n", + "SelectObject(NULL DC) expected 0, ERROR_INVALID_HANDLE, got %p, 0x%08x\n", hp, GetLastError()); /* With a valid DC and a NULL object, the call returns 0 but does not SetLastError() */ SetLastError(0); hp = SelectObject(hdc, NULL); ok(!hp && !GetLastError(), - "SelectObject(NULL obj) expected 0, NO_ERROR, got %p, 0x%08lx\n", + "SelectObject(NULL obj) expected 0, NO_ERROR, got %p, 0x%08x\n", hp, GetLastError()); /* The DC is unaffected by the NULL SelectObject */ SetLastError(0); hp = SelectObject(hdc, GetStockObject(BLACK_PEN)); ok(hp && !GetLastError(), - "SelectObject(post NULL) expected non-null, NO_ERROR, got %p, 0x%08lx\n", + "SelectObject(post NULL) expected non-null, NO_ERROR, got %p, 0x%08x\n", hp, GetLastError()); /* GetCurrentObject does not SetLastError() on a null object */ SetLastError(0); hp = GetCurrentObject(NULL, OBJ_PEN); ok(!hp && !GetLastError(), - "GetCurrentObject(NULL DC) expected 0, NO_ERROR, got %p, 0x%08lx\n", + "GetCurrentObject(NULL DC) expected 0, NO_ERROR, got %p, 0x%08x\n", hp, GetLastError()); /* DeleteObject does not SetLastError() on a null object */ ret = DeleteObject(NULL); ok( !ret && !GetLastError(), - "DeleteObject(NULL obj), expected 0, NO_ERROR, got %d, 0x%08lx\n", + "DeleteObject(NULL obj), expected 0, NO_ERROR, got %d, 0x%08x\n", ret, GetLastError()); /* GetObject does not SetLastError() on a null object */ SetLastError(0); i = GetObjectA(NULL, sizeof(buff), buff); ok (!i && !GetLastError(), - "GetObject(NULL obj), expected 0, NO_ERROR, got %d, 0x%08lx\n", + "GetObject(NULL obj), expected 0, NO_ERROR, got %d, 0x%08x\n", i, GetLastError()); /* GetObjectType does SetLastError() on a null object */ SetLastError(0); i = GetObjectType(NULL); ok (!i && GetLastError() == ERROR_INVALID_HANDLE, - "GetObjectType(NULL obj), expected 0, ERROR_INVALID_HANDLE, got %d, 0x%08lx\n", + "GetObjectType(NULL obj), expected 0, ERROR_INVALID_HANDLE, got %d, 0x%08x\n", i, GetLastError()); /* UnrealizeObject does not SetLastError() on a null object */ SetLastError(0); i = UnrealizeObject(NULL); ok (!i && !GetLastError(), - "UnrealizeObject(NULL obj), expected 0, NO_ERROR, got %d, 0x%08lx\n", + "UnrealizeObject(NULL obj), expected 0, NO_ERROR, got %d, 0x%08x\n", i, GetLastError()); ReleaseDC(NULL, hdc); @@ -113,7 +113,7 @@ static DWORD WINAPI thread_proc(void *param) struct hgdiobj_event *hgdiobj_event = (struct hgdiobj_event *)param; hgdiobj_event->hdc = CreateDC("display", NULL, NULL, NULL); - ok(hgdiobj_event->hdc != NULL, "CreateDC error %ld\n", GetLastError()); + ok(hgdiobj_event->hdc != NULL, "CreateDC error %d\n", GetLastError()); hgdiobj_event->hgdiobj1 = CreatePen(PS_DASHDOTDOT, 17, RGB(1, 2, 3)); ok(hgdiobj_event->hgdiobj1 != 0, "Failed to create pen\n"); @@ -123,7 +123,7 @@ static DWORD WINAPI thread_proc(void *param) SetEvent(hgdiobj_event->ready_event); ok(WaitForSingleObject(hgdiobj_event->stop_event, INFINITE) == WAIT_OBJECT_0, - "WaitForSingleObject error %ld\n", GetLastError()); + "WaitForSingleObject error %d\n", GetLastError()); ok(!GetObject(hgdiobj_event->hgdiobj1, sizeof(lp), &lp), "GetObject should fail\n"); @@ -141,40 +141,40 @@ static void test_thread_objects(void) INT ret; hgdiobj_event.stop_event = CreateEvent(NULL, 0, 0, NULL); - ok(hgdiobj_event.stop_event != NULL, "CreateEvent error %ld\n", GetLastError()); + ok(hgdiobj_event.stop_event != NULL, "CreateEvent error %d\n", GetLastError()); hgdiobj_event.ready_event = CreateEvent(NULL, 0, 0, NULL); - ok(hgdiobj_event.ready_event != NULL, "CreateEvent error %ld\n", GetLastError()); + ok(hgdiobj_event.ready_event != NULL, "CreateEvent error %d\n", GetLastError()); hthread = CreateThread(NULL, 0, thread_proc, &hgdiobj_event, 0, &tid); - ok(hthread != NULL, "CreateThread error %ld\n", GetLastError()); + ok(hthread != NULL, "CreateThread error %d\n", GetLastError()); ok(WaitForSingleObject(hgdiobj_event.ready_event, INFINITE) == WAIT_OBJECT_0, - "WaitForSingleObject error %ld\n", GetLastError()); + "WaitForSingleObject error %d\n", GetLastError()); ok(GetObject(hgdiobj_event.hgdiobj1, sizeof(lp), &lp) == sizeof(lp), - "GetObject error %ld\n", GetLastError()); + "GetObject error %d\n", GetLastError()); ok(lp.lopnStyle == PS_DASHDOTDOT, "wrong pen style %d\n", lp.lopnStyle); - ok(lp.lopnWidth.x == 17, "wrong pen width.y %ld\n", lp.lopnWidth.x); - ok(lp.lopnWidth.y == 0, "wrong pen width.y %ld\n", lp.lopnWidth.y); - ok(lp.lopnColor == RGB(1, 2, 3), "wrong pen width.y %08lx\n", lp.lopnColor); + ok(lp.lopnWidth.x == 17, "wrong pen width.y %d\n", lp.lopnWidth.x); + ok(lp.lopnWidth.y == 0, "wrong pen width.y %d\n", lp.lopnWidth.y); + ok(lp.lopnColor == RGB(1, 2, 3), "wrong pen width.y %08x\n", lp.lopnColor); ret = GetDeviceCaps(hgdiobj_event.hdc, TECHNOLOGY); ok(ret == DT_RASDISPLAY, "GetDeviceCaps(TECHNOLOGY) should return DT_RASDISPLAY not %d\n", ret); - ok(DeleteObject(hgdiobj_event.hgdiobj1), "DeleteObject error %ld\n", GetLastError()); - ok(DeleteDC(hgdiobj_event.hdc), "DeleteDC error %ld\n", GetLastError()); + ok(DeleteObject(hgdiobj_event.hgdiobj1), "DeleteObject error %d\n", GetLastError()); + ok(DeleteDC(hgdiobj_event.hdc), "DeleteDC error %d\n", GetLastError()); type = GetObjectType(hgdiobj_event.hgdiobj2); - ok(type == OBJ_REGION, "GetObjectType returned %lu\n", type); + ok(type == OBJ_REGION, "GetObjectType returned %u\n", type); SetEvent(hgdiobj_event.stop_event); ok(WaitForSingleObject(hthread, INFINITE) == WAIT_OBJECT_0, - "WaitForSingleObject error %ld\n", GetLastError()); + "WaitForSingleObject error %d\n", GetLastError()); CloseHandle(hthread); type = GetObjectType(hgdiobj_event.hgdiobj2); - ok(type == OBJ_REGION, "GetObjectType returned %lu\n", type); - ok(DeleteObject(hgdiobj_event.hgdiobj2), "DeleteObject error %ld\n", GetLastError()); + ok(type == OBJ_REGION, "GetObjectType returned %u\n", type); + ok(DeleteObject(hgdiobj_event.hgdiobj2), "DeleteObject error %d\n", GetLastError()); CloseHandle(hgdiobj_event.stop_event); CloseHandle(hgdiobj_event.ready_event); @@ -199,7 +199,7 @@ static void test_GetCurrentObject(void) assert(hdc != 0); type = GetObjectType(hdc); - ok(type == OBJ_MEMDC, "GetObjectType returned %lu\n", type); + ok(type == OBJ_MEMDC, "GetObjectType returned %u\n", type); hpen = CreatePen(PS_SOLID, 10, RGB(10, 20, 30)); assert(hpen != 0); diff --git a/dlls/gdi/tests/mapping.c b/dlls/gdi/tests/mapping.c index 2baeb2d8004..836ecdffbee 100644 --- a/dlls/gdi/tests/mapping.c +++ b/dlls/gdi/tests/mapping.c @@ -64,22 +64,22 @@ void test_SetWindowExt(HDC hdc, LONG cx, LONG cy, LONG expected_vp_cx, LONG expe SetWindowExtEx(hdc, cx, cy, NULL); GetWindowExtEx(hdc, &windowExt); ok(windowExt.cx == cx && windowExt.cy == cy, - "Window extension: Expected %ldx%ld, got %ldx%ld\n", + "Window extension: Expected %dx%d, got %dx%d\n", cx, cy, windowExt.cx, windowExt.cy); GetViewportExtEx(hdc, &viewportExt); ok(viewportExt.cx == expected_vp_cx && viewportExt.cy == expected_vp_cy, - "Viewport extents have not been properly adjusted: Expected %ldx%ld, got %ldx%ld\n", + "Viewport extents have not been properly adjusted: Expected %dx%d, got %dx%d\n", expected_vp_cx, expected_vp_cy, viewportExt.cx, viewportExt.cy); GetWindowOrgEx(hdc, &windowOrgAfter); ok(windowOrg.x == windowOrgAfter.x && windowOrg.y == windowOrgAfter.y, - "Window origin changed from (%ld,%ld) to (%ld,%ld)\n", + "Window origin changed from (%d,%d) to (%d,%d)\n", windowOrg.x, windowOrg.y, windowOrgAfter.x, windowOrgAfter.y); GetViewportOrgEx(hdc, &viewportOrgAfter); ok(viewportOrg.x == viewportOrgAfter.x && viewportOrg.y == viewportOrgAfter.y, - "Viewport origin changed from (%ld,%ld) to (%ld,%ld)\n", + "Viewport origin changed from (%d,%d) to (%d,%d)\n", viewportOrg.x, viewportOrg.y, viewportOrgAfter.x, viewportOrgAfter.y); } @@ -95,22 +95,22 @@ void test_SetViewportExt(HDC hdc, LONG cx, LONG cy, LONG expected_vp_cx, LONG ex SetViewportExtEx(hdc, cx, cy, NULL); GetViewportExtEx(hdc, &viewportExt); ok(viewportExt.cx == expected_vp_cx && viewportExt.cy == expected_vp_cy, - "Viewport extents have not been properly adjusted: Expected %ldx%ld, got %ldx%ld\n", + "Viewport extents have not been properly adjusted: Expected %dx%d, got %dx%d\n", expected_vp_cx, expected_vp_cy, viewportExt.cx, viewportExt.cy); GetWindowExtEx(hdc, &windowExtAfter); ok(windowExt.cx == windowExtAfter.cx && windowExt.cy == windowExtAfter.cy, - "Window extension changed from %ldx%ld to %ldx%ld\n", + "Window extension changed from %dx%d to %dx%d\n", windowExt.cx, windowExt.cy, windowExtAfter.cx, windowExtAfter.cy); GetWindowOrgEx(hdc, &windowOrgAfter); ok(windowOrg.x == windowOrgAfter.x && windowOrg.y == windowOrgAfter.y, - "Window origin changed from (%ld,%ld) to (%ld,%ld)\n", + "Window origin changed from (%d,%d) to (%d,%d)\n", windowOrg.x, windowOrg.y, windowOrgAfter.x, windowOrgAfter.y); GetViewportOrgEx(hdc, &viewportOrgAfter); ok(viewportOrg.x == viewportOrgAfter.x && viewportOrg.y == viewportOrgAfter.y, - "Viewport origin changed from (%ld,%ld) to (%ld,%ld)\n", + "Viewport origin changed from (%d,%d) to (%d,%d)\n", viewportOrg.x, viewportOrg.y, viewportOrgAfter.x, viewportOrgAfter.y); } diff --git a/dlls/gdi/tests/metafile.c b/dlls/gdi/tests/metafile.c index 3610bf89265..d7e655e8e5e 100644 --- a/dlls/gdi/tests/metafile.c +++ b/dlls/gdi/tests/metafile.c @@ -66,7 +66,7 @@ static int CALLBACK eto_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table, LOGFONTA device_lf; INT ret; - trace("hdc %p, emr->iType %ld, emr->nSize %ld, param %p\n", + trace("hdc %p, emr->iType %d, emr->nSize %d, param %p\n", hdc, emr->iType, emr->nSize, (void *)param); if(!hdc) return 1; @@ -77,8 +77,8 @@ static int CALLBACK eto_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table, { case EMR_HEADER: ok(GetTextAlign(hdc) == 0, "text align %08x\n", GetTextAlign(hdc)); - ok(GetBkColor(hdc) == RGB(0xff, 0xff, 0xff), "bk color %08lx\n", GetBkColor(hdc)); - ok(GetTextColor(hdc) == RGB(0x0, 0x0, 0x0), "text color %08lx\n", GetTextColor(hdc)); + ok(GetBkColor(hdc) == RGB(0xff, 0xff, 0xff), "bk color %08x\n", GetBkColor(hdc)); + ok(GetTextColor(hdc) == RGB(0x0, 0x0, 0x0), "text color %08x\n", GetTextColor(hdc)); ok(GetROP2(hdc) == R2_COPYPEN, "rop %d\n", GetROP2(hdc)); ok(GetArcDirection(hdc) == AD_COUNTERCLOCKWISE, "arc dir %d\n", GetArcDirection(hdc)); ok(GetPolyFillMode(hdc) == ALTERNATE, "poly fill %d\n", GetPolyFillMode(hdc)); @@ -98,7 +98,7 @@ static int CALLBACK eto_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table, dx = (const INT *)((const char *)emr + emr_ExtTextOutA->emrtext.offDx); ret = GetObjectA(GetCurrentObject(hdc, OBJ_FONT), sizeof(device_lf), &device_lf); - ok( ret == sizeof(device_lf), "GetObjectA error %ld\n", GetLastError()); + ok( ret == sizeof(device_lf), "GetObjectA error %d\n", GetLastError()); /* compare up to lfOutPrecision, other values are not interesting, * and in fact sometimes arbitrary adapted by Win9x. @@ -108,7 +108,7 @@ static int CALLBACK eto_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table, for(i = 0; i < emr_ExtTextOutA->emrtext.nChars; i++) { - ok(orig_dx[i] == dx[i], "pass %d: dx[%ld] (%d) didn't match %d\n", + ok(orig_dx[i] == dx[i], "pass %d: dx[%d] (%d) didn't match %d\n", n_record, i, dx[i], orig_dx[i]); } n_record++; @@ -122,7 +122,7 @@ static int CALLBACK eto_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table, dx = (const INT *)((const char *)emr + emr_ExtTextOutW->emrtext.offDx); ret = GetObjectA(GetCurrentObject(hdc, OBJ_FONT), sizeof(device_lf), &device_lf); - ok( ret == sizeof(device_lf), "GetObjectA error %ld\n", GetLastError()); + ok( ret == sizeof(device_lf), "GetObjectA error %d\n", GetLastError()); /* compare up to lfOutPrecision, other values are not interesting, * and in fact sometimes arbitrary adapted by Win9x. @@ -132,7 +132,7 @@ static int CALLBACK eto_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table, for(i = 0; i < emr_ExtTextOutW->emrtext.nChars; i++) { - ok(orig_dx[i] == dx[i], "pass %d: dx[%ld] (%d) didn't match %d\n", + ok(orig_dx[i] == dx[i], "pass %d: dx[%d] (%d) didn't match %d\n", n_record, i, dx[i], orig_dx[i]); } n_record++; @@ -163,10 +163,10 @@ static void test_ExtTextOut(void) /* Win9x doesn't play EMFs on invisible windows */ hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE, 0, 0, 200, 200, 0, 0, 0, NULL); - ok(hwnd != 0, "CreateWindowExA error %ld\n", GetLastError()); + ok(hwnd != 0, "CreateWindowExA error %d\n", GetLastError()); hdcDisplay = GetDC(hwnd); - ok(hdcDisplay != 0, "GetDC error %ld\n", GetLastError()); + ok(hdcDisplay != 0, "GetDC error %d\n", GetLastError()); trace("hdcDisplay %p\n", hdcDisplay); @@ -181,7 +181,7 @@ static void test_ExtTextOut(void) orig_lf.lfQuality = DEFAULT_QUALITY; lstrcpyA(orig_lf.lfFaceName, "Arial"); hFont = CreateFontIndirectA(&orig_lf); - ok(hFont != 0, "CreateFontIndirectA error %ld\n", GetLastError()); + ok(hFont != 0, "CreateFontIndirectA error %d\n", GetLastError()); hFont = SelectObject(hdcDisplay, hFont); @@ -189,12 +189,12 @@ static void test_ExtTextOut(void) for (i = 0; i < len; i++) { ret = GetCharWidthA(hdcDisplay, text[i], text[i], &dx[i]); - ok( ret, "GetCharWidthA error %ld\n", GetLastError()); + ok( ret, "GetCharWidthA error %d\n", GetLastError()); } hFont = SelectObject(hdcDisplay, hFont); hdcMetafile = CreateEnhMetaFileA(hdcDisplay, NULL, NULL, NULL); - ok(hdcMetafile != 0, "CreateEnhMetaFileA error %ld\n", GetLastError()); + ok(hdcMetafile != 0, "CreateEnhMetaFileA error %d\n", GetLastError()); trace("hdcMetafile %p\n", hdcMetafile); @@ -205,23 +205,23 @@ static void test_ExtTextOut(void) /* 1. pass NULL lpDx */ ret = ExtTextOutA(hdcMetafile, 0, 0, 0, &rc, text, lstrlenA(text), NULL); - ok( ret, "ExtTextOutA error %ld\n", GetLastError()); + ok( ret, "ExtTextOutA error %d\n", GetLastError()); /* 2. pass custom lpDx */ ret = ExtTextOutA(hdcMetafile, 0, 20, 0, &rc, text, lstrlenA(text), dx); - ok( ret, "ExtTextOutA error %ld\n", GetLastError()); + ok( ret, "ExtTextOutA error %d\n", GetLastError()); hFont = SelectObject(hdcMetafile, hFont); ret = DeleteObject(hFont); - ok( ret, "DeleteObject error %ld\n", GetLastError()); + ok( ret, "DeleteObject error %d\n", GetLastError()); hMetafile = CloseEnhMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseEnhMetaFile error %ld\n", GetLastError()); + ok(hMetafile != 0, "CloseEnhMetaFile error %d\n", GetLastError()); ok(!GetObjectType(hdcMetafile), "CloseEnhMetaFile has to destroy metafile hdc\n"); ret = PlayEnhMetaFile(hdcDisplay, hMetafile, &rc); - ok( ret, "PlayEnhMetaFile error %ld\n", GetLastError()); + ok( ret, "PlayEnhMetaFile error %d\n", GetLastError()); SetTextAlign(hdcDisplay, TA_UPDATECP | TA_CENTER | TA_BASELINE | TA_RTLREADING ); SetBkColor(hdcDisplay, RGB(0xff, 0, 0)); @@ -235,12 +235,12 @@ static void test_ExtTextOut(void) SetBkMode(hdcDisplay, OPAQUE); ret = EnumEnhMetaFile(hdcDisplay, hMetafile, eto_emf_enum_proc, dx, &rc); - ok( ret, "EnumEnhMetaFile error %ld\n", GetLastError()); + ok( ret, "EnumEnhMetaFile error %d\n", GetLastError()); ok( GetTextAlign(hdcDisplay) == (TA_UPDATECP | TA_CENTER | TA_BASELINE | TA_RTLREADING), "text align %08x\n", GetTextAlign(hdcDisplay)); - ok( GetBkColor(hdcDisplay) == RGB(0xff, 0, 0), "bk color %08lx\n", GetBkColor(hdcDisplay)); - ok( GetTextColor(hdcDisplay) == RGB(0, 0xff, 0), "text color %08lx\n", GetTextColor(hdcDisplay)); + ok( GetBkColor(hdcDisplay) == RGB(0xff, 0, 0), "bk color %08x\n", GetBkColor(hdcDisplay)); + ok( GetTextColor(hdcDisplay) == RGB(0, 0xff, 0), "text color %08x\n", GetTextColor(hdcDisplay)); ok( GetROP2(hdcDisplay) == R2_NOT, "rop2 %d\n", GetROP2(hdcDisplay)); ok( GetArcDirection(hdcDisplay) == AD_CLOCKWISE, "arc dir %d\n", GetArcDirection(hdcDisplay)); ok( GetPolyFillMode(hdcDisplay) == WINDING, "poly fill %d\n", GetPolyFillMode(hdcDisplay)); @@ -255,9 +255,9 @@ static void test_ExtTextOut(void) "A null hdc does not require a valid rc\n"); ret = DeleteEnhMetaFile(hMetafile); - ok( ret, "DeleteEnhMetaFile error %ld\n", GetLastError()); + ok( ret, "DeleteEnhMetaFile error %d\n", GetLastError()); ret = ReleaseDC(hwnd, hdcDisplay); - ok( ret, "ReleaseDC error %ld\n", GetLastError()); + ok( ret, "ReleaseDC error %d\n", GetLastError()); DestroyWindow(hwnd); } @@ -284,14 +284,14 @@ static int CALLBACK savedc_emf_enum_proc(HDC hdc, HANDLETABLE *handle_table, switch(++restore_no) { case 1: - ok(restoredc->iRelative == -1, "first restore %ld\n", restoredc->iRelative); + ok(restoredc->iRelative == -1, "first restore %d\n", restoredc->iRelative); break; case 2: - ok(restoredc->iRelative == -3, "second restore %ld\n", restoredc->iRelative); + ok(restoredc->iRelative == -3, "second restore %d\n", restoredc->iRelative); break; case 3: - ok(restoredc->iRelative == -2, "third restore %ld\n", restoredc->iRelative); + ok(restoredc->iRelative == -2, "third restore %d\n", restoredc->iRelative); break; } ok(restore_no <= 3, "restore_no %d\n", restore_no); @@ -318,13 +318,13 @@ void test_SaveDC(void) /* Win9x doesn't play EMFs on invisible windows */ hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE, 0, 0, 200, 200, 0, 0, 0, NULL); - ok(hwnd != 0, "CreateWindowExA error %ld\n", GetLastError()); + ok(hwnd != 0, "CreateWindowExA error %d\n", GetLastError()); hdcDisplay = GetDC(hwnd); - ok(hdcDisplay != 0, "GetDC error %ld\n", GetLastError()); + ok(hdcDisplay != 0, "GetDC error %d\n", GetLastError()); hdcMetafile = CreateEnhMetaFileA(hdcDisplay, NULL, NULL, NULL); - ok(hdcMetafile != 0, "CreateEnhMetaFileA error %ld\n", GetLastError()); + ok(hdcMetafile != 0, "CreateEnhMetaFileA error %d\n", GetLastError()); /* Need to write something to the emf, otherwise Windows won't play it back */ LineTo(hdcMetafile, 100, 100); @@ -354,15 +354,15 @@ void test_SaveDC(void) ok(ret == 2, "ret = %d\n", ret); hMetafile = CloseEnhMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseEnhMetaFile error %ld\n", GetLastError()); + ok(hMetafile != 0, "CloseEnhMetaFile error %d\n", GetLastError()); ret = EnumEnhMetaFile(hdcDisplay, hMetafile, savedc_emf_enum_proc, 0, &rc); ok( ret == 1, "EnumEnhMetaFile rets %d\n", ret); ret = DeleteEnhMetaFile(hMetafile); - ok( ret, "DeleteEnhMetaFile error %ld\n", GetLastError()); + ok( ret, "DeleteEnhMetaFile error %d\n", GetLastError()); ret = ReleaseDC(hwnd, hdcDisplay); - ok( ret, "ReleaseDC error %ld\n", GetLastError()); + ok( ret, "ReleaseDC error %d\n", GetLastError()); DestroyWindow(hwnd); } @@ -598,7 +598,7 @@ static const unsigned char EMF_LINETO_MM_TEXT_BITS[] = { static INT CALLBACK mf_enum_proc(HDC hdc, HANDLETABLE *ht, METARECORD *mr, INT nobj, LPARAM param) { - trace("hdc %p, mr->rdFunction %04x, mr->rdSize %lu, param %p\n", + trace("hdc %p, mr->rdFunction %04x, mr->rdSize %u, param %p\n", hdc, mr->rdFunction, mr->rdSize, (void *)param); return TRUE; } @@ -683,11 +683,11 @@ static int compare_mf_disk_bits(LPCSTR name, const BYTE *bits, UINT bsize, const assert(mfsize <= MF_BUFSIZE); ret = ReadFile(hfile, buf, sizeof(buf), &rd_size, NULL); - ok( ret && rd_size == mfsize, "ReadFile: error %ld\n", GetLastError()); + ok( ret && rd_size == mfsize, "ReadFile: error %d\n", GetLastError()); CloseHandle(hfile); - ok(mfsize == bsize, "%s: mfsize=%ld, bsize=%d.\n", desc, mfsize, bsize); + ok(mfsize == bsize, "%s: mfsize=%d, bsize=%d.\n", desc, mfsize, bsize); if (mfsize != bsize) return -1; @@ -698,7 +698,7 @@ static int compare_mf_disk_bits(LPCSTR name, const BYTE *bits, UINT bsize, const if (buf[i] != bits[i]) diff++; } - ok(diff == 0, "%s: mfsize=%ld, bsize=%d, diff=%d\n", + ok(diff == 0, "%s: mfsize=%d, bsize=%d, diff=%d\n", desc, mfsize, bsize, diff); return diff; @@ -740,7 +740,7 @@ static void dump_emf_records(const HENHMETAFILE mf, const char *desc) if (!winetest_debug) return; mfsize = GetEnhMetaFileBits(mf, MF_BUFSIZE, buf); - ok (mfsize > 0, "%s: GetEnhMetaFileBits error %ld\n", desc, GetLastError()); + ok (mfsize > 0, "%s: GetEnhMetaFileBits error %d\n", desc, GetLastError()); printf("EMF %s has records:\n", desc); @@ -749,7 +749,7 @@ static void dump_emf_records(const HENHMETAFILE mf, const char *desc) while(offset < mfsize) { EMR *emr = (EMR *)(emf + offset); - printf("emr->iType %ld, emr->nSize %lu\n", emr->iType, emr->nSize); + printf("emr->iType %d, emr->nSize %u\n", emr->iType, emr->nSize); /*trace("emr->iType 0x%04lx, emr->nSize 0x%04lx\n", emr->iType, emr->nSize);*/ offset += emr->nSize; } @@ -769,7 +769,7 @@ static int compare_emf_bits(const HENHMETAFILE mf, const unsigned char *bits, int diff; mfsize = GetEnhMetaFileBits(mf, MF_BUFSIZE, buf); - ok (mfsize > 0, "%s: GetEnhMetaFileBits error %ld\n", desc, GetLastError()); + ok (mfsize > 0, "%s: GetEnhMetaFileBits error %d\n", desc, GetLastError()); if (mfsize < MF_BUFSIZE) { @@ -823,7 +823,7 @@ static void test_mf_Blank(void) INT type; hdcMetafile = CreateMetaFileA(NULL); - ok(hdcMetafile != 0, "CreateMetaFileA(NULL) error %ld\n", GetLastError()); + ok(hdcMetafile != 0, "CreateMetaFileA(NULL) error %d\n", GetLastError()); trace("hdcMetafile %p\n", hdcMetafile); /* Tests on metafile initialization */ @@ -832,7 +832,7 @@ static void test_mf_Blank(void) "GetDeviceCaps: TECHNOLOGY=%d != DT_METAFILE.\n", caps); hMetafile = CloseMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseMetaFile error %ld\n", GetLastError()); + ok(hMetafile != 0, "CloseMetaFile error %d\n", GetLastError()); type = GetObjectType(hMetafile); ok(type == OBJ_METAFILE, "CloseMetaFile created object with type %d\n", type); ok(!GetObjectType(hdcMetafile), "CloseMetaFile has to destroy metafile hdc\n"); @@ -845,7 +845,7 @@ static void test_mf_Blank(void) } ret = DeleteMetaFile(hMetafile); - ok( ret, "DeleteMetaFile(%p) error %ld\n", hMetafile, GetLastError()); + ok( ret, "DeleteMetaFile(%p) error %d\n", hMetafile, GetLastError()); } static void test_CopyMetaFile(void) @@ -858,11 +858,11 @@ static void test_CopyMetaFile(void) INT type; hdcMetafile = CreateMetaFileA(NULL); - ok(hdcMetafile != 0, "CreateMetaFileA(NULL) error %ld\n", GetLastError()); + ok(hdcMetafile != 0, "CreateMetaFileA(NULL) error %d\n", GetLastError()); trace("hdcMetafile %p\n", hdcMetafile); hMetafile = CloseMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseMetaFile error %ld\n", GetLastError()); + ok(hMetafile != 0, "CloseMetaFile error %d\n", GetLastError()); type = GetObjectType(hMetafile); ok(type == OBJ_METAFILE, "CloseMetaFile created object with type %d\n", type); @@ -877,13 +877,13 @@ static void test_CopyMetaFile(void) GetTempFileNameA(temp_path, "wmf", 0, mf_name); hmf_copy = CopyMetaFileA(hMetafile, mf_name); - ok(hmf_copy != 0, "CopyMetaFile error %ld\n", GetLastError()); + ok(hmf_copy != 0, "CopyMetaFile error %d\n", GetLastError()); type = GetObjectType(hmf_copy); ok(type == OBJ_METAFILE, "CopyMetaFile created object with type %d\n", type); ret = DeleteMetaFile(hMetafile); - ok( ret, "DeleteMetaFile(%p) error %ld\n", hMetafile, GetLastError()); + ok( ret, "DeleteMetaFile(%p) error %d\n", hMetafile, GetLastError()); if (compare_mf_disk_bits(mf_name, MF_BLANK_BITS, sizeof(MF_BLANK_BITS), "mf_blank") != 0) { @@ -892,7 +892,7 @@ static void test_CopyMetaFile(void) } ret = DeleteMetaFile(hmf_copy); - ok( ret, "DeleteMetaFile(%p) error %ld\n", hmf_copy, GetLastError()); + ok( ret, "DeleteMetaFile(%p) error %d\n", hmf_copy, GetLastError()); DeleteFileA(mf_name); } @@ -906,7 +906,7 @@ static void test_SetMetaFileBits(void) METAHEADER *mh; hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS), MF_GRAPHICS_BITS); - ok(hmf != 0, "SetMetaFileBitsEx error %ld\n", GetLastError()); + ok(hmf != 0, "SetMetaFileBitsEx error %d\n", GetLastError()); type = GetObjectType(hmf); ok(type == OBJ_METAFILE, "SetMetaFileBitsEx created object with type %d\n", type); @@ -917,7 +917,7 @@ static void test_SetMetaFileBits(void) } ret = DeleteMetaFile(hmf); - ok(ret, "DeleteMetaFile(%p) error %ld\n", hmf, GetLastError()); + ok(ret, "DeleteMetaFile(%p) error %d\n", hmf, GetLastError()); /* NULL data crashes XP SP1 */ /*hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS), NULL);*/ @@ -926,13 +926,13 @@ static void test_SetMetaFileBits(void) SetLastError(0xdeadbeef); hmf = SetMetaFileBitsEx(0, MF_GRAPHICS_BITS); ok(!hmf, "SetMetaFileBitsEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "wrong error %ld\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "wrong error %d\n", GetLastError()); /* Now with not even size */ SetLastError(0xdeadbeef); hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS) - 1, MF_GRAPHICS_BITS); ok(!hmf, "SetMetaFileBitsEx should fail\n"); - ok(GetLastError() == 0xdeadbeef /* XP SP1 */, "wrong error %ld\n", GetLastError()); + ok(GetLastError() == 0xdeadbeef /* XP SP1 */, "wrong error %d\n", GetLastError()); /* Now with zeroed out or faked some header fields */ assert(sizeof(buf) >= sizeof(MF_GRAPHICS_BITS)); @@ -945,7 +945,7 @@ static void test_SetMetaFileBits(void) SetLastError(0xdeadbeef); hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS), buf); ok(!hmf, "SetMetaFileBitsEx should fail\n"); - ok(GetLastError() == ERROR_INVALID_DATA, "wrong error %ld\n", GetLastError()); + ok(GetLastError() == ERROR_INVALID_DATA, "wrong error %d\n", GetLastError()); /* Now with corrupted mtSize field */ memcpy(buf, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS)); @@ -953,7 +953,7 @@ static void test_SetMetaFileBits(void) /* corruption of mtSize doesn't lead to a failure */ mh->mtSize *= 2; hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS), buf); - ok(hmf != 0, "SetMetaFileBitsEx error %ld\n", GetLastError()); + ok(hmf != 0, "SetMetaFileBitsEx error %d\n", GetLastError()); if (compare_mf_bits(hmf, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS), "mf_Graphics") != 0) { @@ -962,7 +962,7 @@ static void test_SetMetaFileBits(void) } ret = DeleteMetaFile(hmf); - ok(ret, "DeleteMetaFile(%p) error %ld\n", hmf, GetLastError()); + ok(ret, "DeleteMetaFile(%p) error %d\n", hmf, GetLastError()); /* Now with zeroed out mtSize field */ memcpy(buf, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS)); @@ -970,7 +970,7 @@ static void test_SetMetaFileBits(void) /* zeroing mtSize doesn't lead to a failure */ mh->mtSize = 0; hmf = SetMetaFileBitsEx(sizeof(MF_GRAPHICS_BITS), buf); - ok(hmf != 0, "SetMetaFileBitsEx error %ld\n", GetLastError()); + ok(hmf != 0, "SetMetaFileBitsEx error %d\n", GetLastError()); if (compare_mf_bits(hmf, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS), "mf_Graphics") != 0) { @@ -979,7 +979,7 @@ static void test_SetMetaFileBits(void) } ret = DeleteMetaFile(hmf); - ok(ret, "DeleteMetaFile(%p) error %ld\n", hmf, GetLastError()); + ok(ret, "DeleteMetaFile(%p) error %d\n", hmf, GetLastError()); } /* Simple APIs from mfdrv/graphics.c @@ -993,15 +993,15 @@ static void test_mf_Graphics(void) BOOL ret; hdcMetafile = CreateMetaFileA(NULL); - ok(hdcMetafile != 0, "CreateMetaFileA(NULL) error %ld\n", GetLastError()); + ok(hdcMetafile != 0, "CreateMetaFileA(NULL) error %d\n", GetLastError()); trace("hdcMetafile %p\n", hdcMetafile); ret = MoveToEx(hdcMetafile, 1, 1, NULL); - ok( ret, "MoveToEx error %ld.\n", GetLastError()); + ok( ret, "MoveToEx error %d.\n", GetLastError()); ret = LineTo(hdcMetafile, 2, 2); - ok( ret, "LineTo error %ld.\n", GetLastError()); + ok( ret, "LineTo error %d.\n", GetLastError()); ret = MoveToEx(hdcMetafile, 1, 1, &oldpoint); - ok( ret, "MoveToEx error %ld.\n", GetLastError()); + ok( ret, "MoveToEx error %d.\n", GetLastError()); /* oldpoint gets garbage under Win XP, so the following test would * work under Wine but fails under Windows: @@ -1012,10 +1012,10 @@ static void test_mf_Graphics(void) */ ret = Ellipse(hdcMetafile, 0, 0, 2, 2); - ok( ret, "Ellipse error %ld.\n", GetLastError()); + ok( ret, "Ellipse error %d.\n", GetLastError()); hMetafile = CloseMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseMetaFile error %ld\n", GetLastError()); + ok(hMetafile != 0, "CloseMetaFile error %d\n", GetLastError()); ok(!GetObjectType(hdcMetafile), "CloseMetaFile has to destroy metafile hdc\n"); if (compare_mf_bits (hMetafile, MF_GRAPHICS_BITS, sizeof(MF_GRAPHICS_BITS), @@ -1026,7 +1026,7 @@ static void test_mf_Graphics(void) } ret = DeleteMetaFile(hMetafile); - ok( ret, "DeleteMetaFile(%p) error %ld\n", + ok( ret, "DeleteMetaFile(%p) error %d\n", hMetafile, GetLastError()); } @@ -1043,20 +1043,20 @@ static void test_mf_PatternBrush(void) orig_lb->lbStyle = BS_PATTERN; orig_lb->lbColor = RGB(0, 0, 0); orig_lb->lbHatch = (ULONG_PTR)CreateBitmap (8, 8, 1, 1, SAMPLE_PATTERN_BRUSH); - ok((HBITMAP)orig_lb->lbHatch != NULL, "CreateBitmap error %ld.\n", GetLastError()); + ok((HBITMAP)orig_lb->lbHatch != NULL, "CreateBitmap error %d.\n", GetLastError()); hBrush = CreateBrushIndirect (orig_lb); - ok(hBrush != 0, "CreateBrushIndirect error %ld\n", GetLastError()); + ok(hBrush != 0, "CreateBrushIndirect error %d\n", GetLastError()); hdcMetafile = CreateMetaFileA(NULL); - ok(hdcMetafile != 0, "CreateMetaFileA error %ld\n", GetLastError()); + ok(hdcMetafile != 0, "CreateMetaFileA error %d\n", GetLastError()); trace("hdcMetafile %p\n", hdcMetafile); hBrush = SelectObject(hdcMetafile, hBrush); - ok(hBrush != 0, "SelectObject error %ld.\n", GetLastError()); + ok(hBrush != 0, "SelectObject error %d.\n", GetLastError()); hMetafile = CloseMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseMetaFile error %ld\n", GetLastError()); + ok(hMetafile != 0, "CloseMetaFile error %d\n", GetLastError()); ok(!GetObjectType(hdcMetafile), "CloseMetaFile has to destroy metafile hdc\n"); if (compare_mf_bits (hMetafile, MF_PATTERN_BRUSH_BITS, sizeof(MF_PATTERN_BRUSH_BITS), @@ -1067,11 +1067,11 @@ static void test_mf_PatternBrush(void) } ret = DeleteMetaFile(hMetafile); - ok( ret, "DeleteMetaFile error %ld\n", GetLastError()); + ok( ret, "DeleteMetaFile error %d\n", GetLastError()); ret = DeleteObject(hBrush); - ok( ret, "DeleteObject(HBRUSH) error %ld\n", GetLastError()); + ok( ret, "DeleteObject(HBRUSH) error %d\n", GetLastError()); ret = DeleteObject((HBITMAP)orig_lb->lbHatch); - ok( ret, "DeleteObject(HBITMAP) error %ld\n", + ok( ret, "DeleteObject(HBITMAP) error %d\n", GetLastError()); HeapFree (GetProcessHeap(), 0, orig_lb); } @@ -1084,20 +1084,20 @@ static void test_mf_ExtTextOut_on_path(void) static const INT dx[4] = { 3, 5, 8, 12 }; hdcMetafile = CreateMetaFileA(NULL); - ok(hdcMetafile != 0, "CreateMetaFileA(NULL) error %ld\n", GetLastError()); + ok(hdcMetafile != 0, "CreateMetaFileA(NULL) error %d\n", GetLastError()); trace("hdcMetafile %p\n", hdcMetafile); ret = BeginPath(hdcMetafile); ok(!ret, "BeginPath on metafile DC should fail\n"); ret = ExtTextOutA(hdcMetafile, 11, 22, 0, NULL, "Test", 4, dx); - ok(ret, "ExtTextOut error %ld\n", GetLastError()); + ok(ret, "ExtTextOut error %d\n", GetLastError()); ret = EndPath(hdcMetafile); ok(!ret, "EndPath on metafile DC should fail\n"); hMetafile = CloseMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseMetaFile error %ld\n", GetLastError()); + ok(hMetafile != 0, "CloseMetaFile error %d\n", GetLastError()); if (compare_mf_bits(hMetafile, MF_TEXTOUT_ON_PATH_BITS, sizeof(MF_TEXTOUT_ON_PATH_BITS), "mf_TextOut_on_path") != 0) @@ -1107,7 +1107,7 @@ static void test_mf_ExtTextOut_on_path(void) } ret = DeleteMetaFile(hMetafile); - ok(ret, "DeleteMetaFile(%p) error %ld\n", hMetafile, GetLastError()); + ok(ret, "DeleteMetaFile(%p) error %d\n", hMetafile, GetLastError()); } static void test_emf_ExtTextOut_on_path(void) @@ -1121,25 +1121,25 @@ static void test_emf_ExtTextOut_on_path(void) /* Win9x doesn't play EMFs on invisible windows */ hwnd = CreateWindowExA(0, "static", NULL, WS_POPUP | WS_VISIBLE, 0, 0, 200, 200, 0, 0, 0, NULL); - ok(hwnd != 0, "CreateWindowExA error %ld\n", GetLastError()); + ok(hwnd != 0, "CreateWindowExA error %d\n", GetLastError()); hdcDisplay = GetDC(hwnd); - ok(hdcDisplay != 0, "GetDC error %ld\n", GetLastError()); + ok(hdcDisplay != 0, "GetDC error %d\n", GetLastError()); hdcMetafile = CreateEnhMetaFileA(hdcDisplay, NULL, NULL, NULL); - ok(hdcMetafile != 0, "CreateEnhMetaFileA error %ld\n", GetLastError()); + ok(hdcMetafile != 0, "CreateEnhMetaFileA error %d\n", GetLastError()); ret = BeginPath(hdcMetafile); - ok(ret, "BeginPath error %ld\n", GetLastError()); + ok(ret, "BeginPath error %d\n", GetLastError()); ret = ExtTextOutA(hdcMetafile, 11, 22, 0, NULL, "Test", 4, dx); - ok(ret, "ExtTextOut error %ld\n", GetLastError()); + ok(ret, "ExtTextOut error %d\n", GetLastError()); ret = EndPath(hdcMetafile); - ok(ret, "EndPath error %ld\n", GetLastError()); + ok(ret, "EndPath error %d\n", GetLastError()); hMetafile = CloseEnhMetaFile(hdcMetafile); - ok(hMetafile != 0, "CloseEnhMetaFile error %ld\n", GetLastError()); + ok(hMetafile != 0, "CloseEnhMetaFile error %d\n", GetLastError()); /* this doesn't succeed yet: EMF has correct size, all EMF records * are there, but their contents don't match for different reasons. @@ -1152,9 +1152,9 @@ static void test_emf_ExtTextOut_on_path(void) } ret = DeleteEnhMetaFile(hMetafile); - ok(ret, "DeleteEnhMetaFile error %ld\n", GetLastError()); + ok(ret, "DeleteEnhMetaFile error %d\n", GetLastError()); ret = ReleaseDC(hwnd, hdcDisplay); - ok(ret, "ReleaseDC error %ld\n", GetLastError()); + ok(ret, "ReleaseDC error %d\n", GetLastError()); DestroyWindow(hwnd); } @@ -1166,7 +1166,7 @@ static INT CALLBACK EmfEnumProc(HDC hdc, HANDLETABLE *lpHTable, const ENHMETAREC * until a record is played which actually outputs something */ PlayEnhMetaFileRecord(hdc, lpHTable, lpEMFR, nObj); LPtoDP(hdc, mapping, 2); - trace("Meta record: iType %ld, nSize %ld, (%ld,%ld)-(%ld,%ld)\n", + trace("Meta record: iType %d, nSize %d, (%d,%d)-(%d,%d)\n", lpEMFR->iType, lpEMFR->nSize, mapping[0].x, mapping[0].y, mapping[1].x, mapping[1].y); @@ -1182,7 +1182,7 @@ static INT CALLBACK EmfEnumProc(HDC hdc, HANDLETABLE *lpHTable, const ENHMETAREC } else { - ok(lpMFP->mm == MM_ANISOTROPIC, "mm=%ld\n", lpMFP->mm); + ok(lpMFP->mm == MM_ANISOTROPIC, "mm=%d\n", lpMFP->mm); x0 = MulDiv(0, GetDeviceCaps(hdc, HORZSIZE) * 100, GetDeviceCaps(hdc, HORZRES)); y0 = MulDiv(0, GetDeviceCaps(hdc, VERTSIZE) * 100, GetDeviceCaps(hdc, VERTRES)); @@ -1190,7 +1190,7 @@ static INT CALLBACK EmfEnumProc(HDC hdc, HANDLETABLE *lpHTable, const ENHMETAREC y1 = MulDiv(10, GetDeviceCaps(hdc, VERTSIZE) * 100, GetDeviceCaps(hdc, VERTRES)); } ok(mapping[0].x == x0 && mapping[0].y == y0 && mapping[1].x == x1 && mapping[1].y == y1, - "(%ld,%ld)->(%ld,%ld), expected (%d,%d)->(%d,%d)\n", + "(%d,%d)->(%d,%d), expected (%d,%d)->(%d,%d)\n", mapping[0].x, mapping[0].y, mapping[1].x, mapping[1].y, x0, y0, x1, y1); } @@ -1206,11 +1206,11 @@ static HENHMETAFILE create_converted_emf(const METAFILEPICT *mfp) LPBYTE pBits; hdcMf = CreateMetaFile(NULL); - ok(hdcMf != NULL, "CreateMetaFile failed with error %ld\n", GetLastError()); + ok(hdcMf != NULL, "CreateMetaFile failed with error %d\n", GetLastError()); ret = LineTo(hdcMf, (INT)LINE_X, (INT)LINE_Y); - ok(ret, "LineTo failed with error %ld\n", GetLastError()); + ok(ret, "LineTo failed with error %d\n", GetLastError()); hmf = CloseMetaFile(hdcMf); - ok(hmf != NULL, "CloseMetaFile failed with error %ld\n", GetLastError()); + ok(hmf != NULL, "CloseMetaFile failed with error %d\n", GetLastError()); if (compare_mf_bits (hmf, MF_LINETO_BITS, sizeof(MF_LINETO_BITS), "mf_LineTo") != 0) { @@ -1219,7 +1219,7 @@ static HENHMETAFILE create_converted_emf(const METAFILEPICT *mfp) } size = GetMetaFileBitsEx(hmf, 0, NULL); - ok(size, "GetMetaFileBitsEx failed with error %ld\n", GetLastError()); + ok(size, "GetMetaFileBitsEx failed with error %d\n", GetLastError()); pBits = HeapAlloc(GetProcessHeap(), 0, size); GetMetaFileBitsEx(hmf, size, pBits); DeleteMetaFile(hmf); @@ -1354,18 +1354,18 @@ static void checkConvertedFrameAndBounds(UINT buffer_size, BYTE * buffer, BOOL m case MM_ISOTROPIC: mm_str = "MM_ISOTROPIC"; break; default: mm_str = "Unexpected"; } - sprintf(buf, "mm=%s, xExt=%ld, yExt=%ld", mm_str, xExt, yExt); + sprintf(buf, "mm=%s, xExt=%d, yExt=%d", mm_str, xExt, yExt); msg = buf; } - ok(rclBounds.left == rclBoundsExpected->left, "rclBounds.left: Expected %ld, got %ld (%s)\n", rclBoundsExpected->left, rclBounds.left, msg); - ok(rclBounds.top == rclBoundsExpected->top, "rclBounds.top: Expected %ld, got %ld (%s)\n", rclBoundsExpected->top, rclBounds.top, msg); - ok(rclBounds.right == rclBoundsExpected->right, "rclBounds.right: Expected %ld, got %ld (%s)\n", rclBoundsExpected->right, rclBounds.right, msg); - ok(rclBounds.bottom == rclBoundsExpected->bottom, "rclBounds.bottom: Expected %ld, got %ld (%s)\n", rclBoundsExpected->bottom, rclBounds.bottom, msg); - ok(rclFrame.left == rclFrameExpected->left, "rclFrame.left: Expected %ld, got %ld (%s)\n", rclFrameExpected->left, rclFrame.left, msg); - ok(rclFrame.top == rclFrameExpected->top, "rclFrame.top: Expected %ld, got %ld (%s)\n", rclFrameExpected->top, rclFrame.top, msg); - ok(rclFrame.right == rclFrameExpected->right, "rclFrame.right: Expected %ld, got %ld (%s)\n", rclFrameExpected->right, rclFrame.right, msg); - ok(rclFrame.bottom == rclFrameExpected->bottom, "rclFrame.bottom: Expected %ld, got %ld (%s)\n", rclFrameExpected->bottom, rclFrame.bottom, msg); + ok(rclBounds.left == rclBoundsExpected->left, "rclBounds.left: Expected %d, got %d (%s)\n", rclBoundsExpected->left, rclBounds.left, msg); + ok(rclBounds.top == rclBoundsExpected->top, "rclBounds.top: Expected %d, got %d (%s)\n", rclBoundsExpected->top, rclBounds.top, msg); + ok(rclBounds.right == rclBoundsExpected->right, "rclBounds.right: Expected %d, got %d (%s)\n", rclBoundsExpected->right, rclBounds.right, msg); + ok(rclBounds.bottom == rclBoundsExpected->bottom, "rclBounds.bottom: Expected %d, got %d (%s)\n", rclBoundsExpected->bottom, rclBounds.bottom, msg); + ok(rclFrame.left == rclFrameExpected->left, "rclFrame.left: Expected %d, got %d (%s)\n", rclFrameExpected->left, rclFrame.left, msg); + ok(rclFrame.top == rclFrameExpected->top, "rclFrame.top: Expected %d, got %d (%s)\n", rclFrameExpected->top, rclFrame.top, msg); + ok(rclFrame.right == rclFrameExpected->right, "rclFrame.right: Expected %d, got %d (%s)\n", rclFrameExpected->right, rclFrame.right, msg); + ok(rclFrame.bottom == rclFrameExpected->bottom, "rclFrame.bottom: Expected %d, got %d (%s)\n", rclFrameExpected->bottom, rclFrame.bottom, msg); } } @@ -1439,7 +1439,7 @@ static void test_SetWinMetaFileBits(void) { ok(rclBoundsAnisotropic.right == GetDeviceCaps(dc, HORZRES) / 2 - 1 && rclBoundsAnisotropic.bottom == GetDeviceCaps(dc, VERTRES) / 2 - 1, - "SetWinMetaFileBits (MM_ANISOTROPIC): Reference bounds: The whole device surface must be used (%dx%d), but got (%ldx%ld)\n", + "SetWinMetaFileBits (MM_ANISOTROPIC): Reference bounds: The whole device surface must be used (%dx%d), but got (%dx%d)\n", GetDeviceCaps(dc, HORZRES) / 2 - 1, GetDeviceCaps(dc, VERTRES) / 2 - 1, rclBoundsAnisotropic.right, rclBoundsAnisotropic.bottom); } @@ -1451,7 +1451,7 @@ static void test_SetWinMetaFileBits(void) todo_wine { ok(diffx <= 1 && diffy <= 1, - "SetWinMetaFileBits (MM_ANISOTROPIC): Reference frame: The whole device surface must be used (%dx%d), but got (%ldx%ld)\n", + "SetWinMetaFileBits (MM_ANISOTROPIC): Reference frame: The whole device surface must be used (%dx%d), but got (%dx%d)\n", GetDeviceCaps(dc, HORZSIZE) / 2, GetDeviceCaps(dc, VERTSIZE) / 2, rclFrameAnisotropic.right / 100, rclFrameAnisotropic.bottom / 100); } DeleteDC(dc); diff --git a/dlls/gdi/tests/palette.c b/dlls/gdi/tests/palette.c index 994763985f7..40e6c7c0727 100644 --- a/dlls/gdi/tests/palette.c +++ b/dlls/gdi/tests/palette.c @@ -59,7 +59,7 @@ static void test_DIB_PAL_COLORS(void) { memcpy( logpalette->palPalEntry, logpalettedata, sizeof(logpalettedata) ); hpal = CreatePalette( logpalette ); hpalOld = SelectPalette( memhdc, hpal, FALSE ); - ok( hpalOld != NULL, "error=%ld\n", GetLastError() ); + ok( hpalOld != NULL, "error=%d\n", GetLastError() ); /* Create a DIB BMP which references colours in the logical palette */ memset( bmp, 0x00, sizeof(BITMAPINFO) ); @@ -79,9 +79,9 @@ static void test_DIB_PAL_COLORS(void) { *bmpPalPtr++ = 19; /* Pointer to bad logical palette index */ hbmp = CreateDIBSection( memhdc, bmp, DIB_PAL_COLORS, 0, 0, 0 ); - ok( hbmp != NULL, "error=%ld\n", GetLastError() ); + ok( hbmp != NULL, "error=%d\n", GetLastError() ); hbmpOld = SelectObject( memhdc, hbmp ); - ok( hbmpOld != NULL, "error=%ld\n", GetLastError() ); + ok( hbmpOld != NULL, "error=%d\n", GetLastError() ); /* Test with a RGB to DIB_PAL_COLORS */ setColor = RGB( logpalettedata[1].peRed, logpalettedata[1].peGreen, logpalettedata[1].peBlue ); diff --git a/dlls/gdi/tests/pen.c b/dlls/gdi/tests/pen.c index 4c93348adc2..77b1044bab7 100644 --- a/dlls/gdi/tests/pen.c +++ b/dlls/gdi/tests/pen.c @@ -76,62 +76,62 @@ static void test_logpen(void) lp.lopnColor = pen[i].color; SetLastError(0xdeadbeef); hpen = CreatePenIndirect(&lp); - ok(hpen != 0, "CreatePen error %ld\n", GetLastError()); + ok(hpen != 0, "CreatePen error %d\n", GetLastError()); obj_type = GetObjectType(hpen); - ok(obj_type == OBJ_PEN, "wrong object type %lu\n", obj_type); + ok(obj_type == OBJ_PEN, "wrong object type %u\n", obj_type); memset(&lp, 0xb0, sizeof(lp)); SetLastError(0xdeadbeef); size = GetObject(hpen, sizeof(lp), &lp); - ok(size == sizeof(lp), "GetObject returned %d, error %ld\n", size, GetLastError()); + ok(size == sizeof(lp), "GetObject returned %d, error %d\n", size, GetLastError()); ok(lp.lopnStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, lp.lopnStyle); - ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %ld\n", pen[i].ret_width, lp.lopnWidth.x); - ok(lp.lopnWidth.y == 0, "expected 0, got %ld\n", lp.lopnWidth.y); - ok(lp.lopnColor == pen[i].ret_color, "expected %08lx, got %08lx\n", pen[i].ret_color, lp.lopnColor); + ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %d\n", pen[i].ret_width, lp.lopnWidth.x); + ok(lp.lopnWidth.y == 0, "expected 0, got %d\n", lp.lopnWidth.y); + ok(lp.lopnColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, lp.lopnColor); DeleteObject(hpen); /* CreatePen behaviour */ SetLastError(0xdeadbeef); hpen = CreatePen(pen[i].style, pen[i].width, pen[i].color); - ok(hpen != 0, "CreatePen error %ld\n", GetLastError()); + ok(hpen != 0, "CreatePen error %d\n", GetLastError()); obj_type = GetObjectType(hpen); - ok(obj_type == OBJ_PEN, "wrong object type %lu\n", obj_type); + ok(obj_type == OBJ_PEN, "wrong object type %u\n", obj_type); /* check what's the real size of the object */ size = GetObject(hpen, 0, NULL); - ok(size == sizeof(lp), "GetObject returned %d, error %ld\n", size, GetLastError()); + ok(size == sizeof(lp), "GetObject returned %d, error %d\n", size, GetLastError()); /* ask for truncated data */ memset(&lp, 0xb0, sizeof(lp)); SetLastError(0xdeadbeef); size = GetObject(hpen, sizeof(lp.lopnStyle), &lp); - ok(!size, "GetObject should fail: size %d, error %ld\n", size, GetLastError()); + ok(!size, "GetObject should fail: size %d, error %d\n", size, GetLastError()); /* see how larger buffer sizes are handled */ memset(&lp, 0xb0, sizeof(lp)); SetLastError(0xdeadbeef); size = GetObject(hpen, sizeof(lp) * 2, &lp); - ok(size == sizeof(lp), "GetObject returned %d, error %ld\n", size, GetLastError()); + ok(size == sizeof(lp), "GetObject returned %d, error %d\n", size, GetLastError()); /* see how larger buffer sizes are handled */ memset(&elp, 0xb0, sizeof(elp)); SetLastError(0xdeadbeef); size = GetObject(hpen, sizeof(elp) * 2, &elp); - ok(size == sizeof(lp), "GetObject returned %d, error %ld\n", size, GetLastError()); + ok(size == sizeof(lp), "GetObject returned %d, error %d\n", size, GetLastError()); memset(&lp, 0xb0, sizeof(lp)); SetLastError(0xdeadbeef); size = GetObject(hpen, sizeof(lp), &lp); - ok(size == sizeof(lp), "GetObject returned %d, error %ld\n", size, GetLastError()); + ok(size == sizeof(lp), "GetObject returned %d, error %d\n", size, GetLastError()); ok(lp.lopnStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, lp.lopnStyle); - ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %ld\n", pen[i].ret_width, lp.lopnWidth.x); - ok(lp.lopnWidth.y == 0, "expected 0, got %ld\n", lp.lopnWidth.y); - ok(lp.lopnColor == pen[i].ret_color, "expected %08lx, got %08lx\n", pen[i].ret_color, lp.lopnColor); + ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %d\n", pen[i].ret_width, lp.lopnWidth.x); + ok(lp.lopnWidth.y == 0, "expected 0, got %d\n", lp.lopnWidth.y); + ok(lp.lopnColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, lp.lopnColor); memset(&elp, 0xb0, sizeof(elp)); SetLastError(0xdeadbeef); @@ -140,22 +140,22 @@ static void test_logpen(void) /* for some reason XP differentiates PS_NULL here */ if (pen[i].style == PS_NULL) { - ok(size == sizeof(EXTLOGPEN), "GetObject returned %d, error %ld\n", size, GetLastError()); - ok(elp.elpPenStyle == pen[i].ret_style, "expected %u, got %lu\n", pen[i].ret_style, elp.elpPenStyle); - ok(elp.elpWidth == 0, "expected 0, got %lu\n", elp.elpWidth); - ok(elp.elpColor == pen[i].ret_color, "expected %08lx, got %08lx\n", pen[i].ret_color, elp.elpColor); + ok(size == sizeof(EXTLOGPEN), "GetObject returned %d, error %d\n", size, GetLastError()); + ok(elp.elpPenStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, elp.elpPenStyle); + ok(elp.elpWidth == 0, "expected 0, got %u\n", elp.elpWidth); + ok(elp.elpColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, elp.elpColor); ok(elp.elpBrushStyle == BS_SOLID, "expected BS_SOLID, got %u\n", elp.elpBrushStyle); ok(elp.elpHatch == 0, "expected 0, got %p\n", (void *)elp.elpHatch); - ok(elp.elpNumEntries == 0, "expected 0, got %lx\n", elp.elpNumEntries); + ok(elp.elpNumEntries == 0, "expected 0, got %x\n", elp.elpNumEntries); } else { - ok(size == sizeof(LOGPEN), "GetObject returned %d, error %ld\n", size, GetLastError()); + ok(size == sizeof(LOGPEN), "GetObject returned %d, error %d\n", size, GetLastError()); memcpy(&lp, &elp, sizeof(lp)); ok(lp.lopnStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, lp.lopnStyle); - ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %ld\n", pen[i].ret_width, lp.lopnWidth.x); - ok(lp.lopnWidth.y == 0, "expected 0, got %ld\n", lp.lopnWidth.y); - ok(lp.lopnColor == pen[i].ret_color, "expected %08lx, got %08lx\n", pen[i].ret_color, lp.lopnColor); + ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %d\n", pen[i].ret_width, lp.lopnWidth.x); + ok(lp.lopnWidth.y == 0, "expected 0, got %d\n", lp.lopnWidth.y); + ok(lp.lopnColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, lp.lopnColor); } DeleteObject(hpen); @@ -170,14 +170,14 @@ static void test_logpen(void) { ok(hpen == 0, "ExtCreatePen should fail\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "wrong last error value %ld\n", GetLastError()); + "wrong last error value %d\n", GetLastError()); SetLastError(0xdeadbeef); hpen = ExtCreatePen(pen[i].style, pen[i].width, &lb, 0, NULL); if (pen[i].style != PS_NULL) { ok(hpen == 0, "ExtCreatePen with width != 1 should fail\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "wrong last error value %ld\n", GetLastError()); + "wrong last error value %d\n", GetLastError()); SetLastError(0xdeadbeef); hpen = ExtCreatePen(pen[i].style, 1, &lb, 0, NULL); @@ -187,7 +187,7 @@ static void test_logpen(void) { ok(hpen == 0, "ExtCreatePen with width != 1 should fail\n"); ok(GetLastError() == ERROR_INVALID_PARAMETER, - "wrong last error value %ld\n", GetLastError()); + "wrong last error value %d\n", GetLastError()); SetLastError(0xdeadbeef); hpen = ExtCreatePen(pen[i].style, 1, &lb, 2, user_style); } @@ -197,14 +197,14 @@ static void test_logpen(void) ok(hpen == 0, "ExtCreatePen should fail\n"); goto test_geometric_pens; } - ok(hpen != 0, "ExtCreatePen error %ld\n", GetLastError()); + ok(hpen != 0, "ExtCreatePen error %d\n", GetLastError()); obj_type = GetObjectType(hpen); /* for some reason XP differentiates PS_NULL here */ if (pen[i].style == PS_NULL) - ok(obj_type == OBJ_PEN, "wrong object type %lu\n", obj_type); + ok(obj_type == OBJ_PEN, "wrong object type %u\n", obj_type); else - ok(obj_type == OBJ_EXTPEN, "wrong object type %lu\n", obj_type); + ok(obj_type == OBJ_EXTPEN, "wrong object type %u\n", obj_type); /* check what's the real size of the object */ SetLastError(0xdeadbeef); @@ -213,17 +213,17 @@ static void test_logpen(void) { case PS_NULL: ok(size == sizeof(LOGPEN), - "GetObject returned %d, error %ld\n", size, GetLastError()); + "GetObject returned %d, error %d\n", size, GetLastError()); break; case PS_USERSTYLE: ok(size == sizeof(EXTLOGPEN) - sizeof(elp.elpStyleEntry) + sizeof(user_style), - "GetObject returned %d, error %ld\n", size, GetLastError()); + "GetObject returned %d, error %d\n", size, GetLastError()); break; default: ok(size == sizeof(EXTLOGPEN) - sizeof(elp.elpStyleEntry), - "GetObject returned %d, error %ld\n", size, GetLastError()); + "GetObject returned %d, error %d\n", size, GetLastError()); break; } @@ -231,7 +231,7 @@ static void test_logpen(void) memset(&elp, 0xb0, sizeof(elp)); SetLastError(0xdeadbeef); size = GetObject(hpen, sizeof(elp.elpPenStyle), &elp); - ok(!size, "GetObject should fail: size %d, error %ld\n", size, GetLastError()); + ok(!size, "GetObject should fail: size %d, error %d\n", size, GetLastError()); /* see how larger buffer sizes are handled */ memset(&ext_pen, 0xb0, sizeof(ext_pen)); @@ -241,49 +241,49 @@ static void test_logpen(void) { case PS_NULL: ok(size == sizeof(LOGPEN), - "GetObject returned %d, error %ld\n", size, GetLastError()); + "GetObject returned %d, error %d\n", size, GetLastError()); memcpy(&lp, &ext_pen.elp, sizeof(lp)); ok(lp.lopnStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, lp.lopnStyle); - ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %ld\n", pen[i].ret_width, lp.lopnWidth.x); - ok(lp.lopnWidth.y == 0, "expected 0, got %ld\n", lp.lopnWidth.y); - ok(lp.lopnColor == pen[i].ret_color, "expected %08lx, got %08lx\n", pen[i].ret_color, lp.lopnColor); + ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %d\n", pen[i].ret_width, lp.lopnWidth.x); + ok(lp.lopnWidth.y == 0, "expected 0, got %d\n", lp.lopnWidth.y); + ok(lp.lopnColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, lp.lopnColor); /* for PS_NULL it also works this way */ memset(&elp, 0xb0, sizeof(elp)); SetLastError(0xdeadbeef); size = GetObject(hpen, sizeof(elp), &elp); ok(size == sizeof(EXTLOGPEN), - "GetObject returned %d, error %ld\n", size, GetLastError()); + "GetObject returned %d, error %d\n", size, GetLastError()); ok(ext_pen.elp.elpHatch == 0xb0b0b0b0, "expected 0xb0b0b0b0, got %p\n", (void *)ext_pen.elp.elpHatch); - ok(ext_pen.elp.elpNumEntries == 0xb0b0b0b0, "expected 0xb0b0b0b0, got %lx\n", ext_pen.elp.elpNumEntries); + ok(ext_pen.elp.elpNumEntries == 0xb0b0b0b0, "expected 0xb0b0b0b0, got %x\n", ext_pen.elp.elpNumEntries); break; case PS_USERSTYLE: ok(size == sizeof(EXTLOGPEN) - sizeof(elp.elpStyleEntry) + sizeof(user_style), - "GetObject returned %d, error %ld\n", size, GetLastError()); + "GetObject returned %d, error %d\n", size, GetLastError()); ok(ext_pen.elp.elpHatch == HS_CROSS, "expected HS_CROSS, got %p\n", (void *)ext_pen.elp.elpHatch); - ok(ext_pen.elp.elpNumEntries == 2, "expected 0, got %lx\n", ext_pen.elp.elpNumEntries); - ok(ext_pen.elp.elpStyleEntry[0] == 0xabc, "expected 0xabc, got %lx\n", ext_pen.elp.elpStyleEntry[0]); - ok(ext_pen.elp.elpStyleEntry[1] == 0xdef, "expected 0xabc, got %lx\n", ext_pen.elp.elpStyleEntry[1]); + ok(ext_pen.elp.elpNumEntries == 2, "expected 0, got %x\n", ext_pen.elp.elpNumEntries); + ok(ext_pen.elp.elpStyleEntry[0] == 0xabc, "expected 0xabc, got %x\n", ext_pen.elp.elpStyleEntry[0]); + ok(ext_pen.elp.elpStyleEntry[1] == 0xdef, "expected 0xabc, got %x\n", ext_pen.elp.elpStyleEntry[1]); break; default: ok(size == sizeof(EXTLOGPEN) - sizeof(elp.elpStyleEntry), - "GetObject returned %d, error %ld\n", size, GetLastError()); + "GetObject returned %d, error %d\n", size, GetLastError()); ok(ext_pen.elp.elpHatch == HS_CROSS, "expected HS_CROSS, got %p\n", (void *)ext_pen.elp.elpHatch); - ok(ext_pen.elp.elpNumEntries == 0, "expected 0, got %lx\n", ext_pen.elp.elpNumEntries); + ok(ext_pen.elp.elpNumEntries == 0, "expected 0, got %x\n", ext_pen.elp.elpNumEntries); break; } if (pen[i].style == PS_USERSTYLE) { todo_wine - ok(ext_pen.elp.elpPenStyle == pen[i].style, "expected %x, got %lx\n", pen[i].style, ext_pen.elp.elpPenStyle); + ok(ext_pen.elp.elpPenStyle == pen[i].style, "expected %x, got %x\n", pen[i].style, ext_pen.elp.elpPenStyle); } else - ok(ext_pen.elp.elpPenStyle == pen[i].style, "expected %x, got %lx\n", pen[i].style, ext_pen.elp.elpPenStyle); - ok(ext_pen.elp.elpWidth == 1, "expected 1, got %lx\n", ext_pen.elp.elpWidth); - ok(ext_pen.elp.elpColor == pen[i].ret_color, "expected %08lx, got %08lx\n", pen[i].ret_color, ext_pen.elp.elpColor); + ok(ext_pen.elp.elpPenStyle == pen[i].style, "expected %x, got %x\n", pen[i].style, ext_pen.elp.elpPenStyle); + ok(ext_pen.elp.elpWidth == 1, "expected 1, got %x\n", ext_pen.elp.elpWidth); + ok(ext_pen.elp.elpColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, ext_pen.elp.elpColor); ok(ext_pen.elp.elpBrushStyle == BS_SOLID, "expected BS_SOLID, got %x\n", ext_pen.elp.elpBrushStyle); DeleteObject(hpen); @@ -307,14 +307,14 @@ test_geometric_pens: ok(hpen == 0, "ExtCreatePen should fail\n"); continue; } - ok(hpen != 0, "ExtCreatePen error %ld\n", GetLastError()); + ok(hpen != 0, "ExtCreatePen error %d\n", GetLastError()); obj_type = GetObjectType(hpen); /* for some reason XP differentiates PS_NULL here */ if (pen[i].style == PS_NULL) - ok(obj_type == OBJ_PEN, "wrong object type %lu\n", obj_type); + ok(obj_type == OBJ_PEN, "wrong object type %u\n", obj_type); else - ok(obj_type == OBJ_EXTPEN, "wrong object type %lu\n", obj_type); + ok(obj_type == OBJ_EXTPEN, "wrong object type %u\n", obj_type); /* check what's the real size of the object */ size = GetObject(hpen, 0, NULL); @@ -322,17 +322,17 @@ test_geometric_pens: { case PS_NULL: ok(size == sizeof(LOGPEN), - "GetObject returned %d, error %ld\n", size, GetLastError()); + "GetObject returned %d, error %d\n", size, GetLastError()); break; case PS_USERSTYLE: ok(size == sizeof(EXTLOGPEN) - sizeof(elp.elpStyleEntry) + sizeof(user_style), - "GetObject returned %d, error %ld\n", size, GetLastError()); + "GetObject returned %d, error %d\n", size, GetLastError()); break; default: ok(size == sizeof(EXTLOGPEN) - sizeof(elp.elpStyleEntry), - "GetObject returned %d, error %ld\n", size, GetLastError()); + "GetObject returned %d, error %d\n", size, GetLastError()); break; } @@ -340,7 +340,7 @@ test_geometric_pens: memset(&lp, 0xb0, sizeof(lp)); SetLastError(0xdeadbeef); size = GetObject(hpen, sizeof(lp.lopnStyle), &lp); - ok(!size, "GetObject should fail: size %d, error %ld\n", size, GetLastError()); + ok(!size, "GetObject should fail: size %d, error %d\n", size, GetLastError()); memset(&lp, 0xb0, sizeof(lp)); SetLastError(0xdeadbeef); @@ -348,16 +348,16 @@ test_geometric_pens: /* for some reason XP differenciates PS_NULL here */ if (pen[i].style == PS_NULL) { - ok(size == sizeof(LOGPEN), "GetObject returned %d, error %ld\n", size, GetLastError()); + ok(size == sizeof(LOGPEN), "GetObject returned %d, error %d\n", size, GetLastError()); ok(lp.lopnStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, lp.lopnStyle); - ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %ld\n", pen[i].ret_width, lp.lopnWidth.x); - ok(lp.lopnWidth.y == 0, "expected 0, got %ld\n", lp.lopnWidth.y); - ok(lp.lopnColor == pen[i].ret_color, "expected %08lx, got %08lx\n", pen[i].ret_color, lp.lopnColor); + ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %d\n", pen[i].ret_width, lp.lopnWidth.x); + ok(lp.lopnWidth.y == 0, "expected 0, got %d\n", lp.lopnWidth.y); + ok(lp.lopnColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, lp.lopnColor); } else /* XP doesn't set last error here */ ok(!size /*&& GetLastError() == ERROR_INVALID_PARAMETER*/, - "GetObject should fail: size %d, error %ld\n", size, GetLastError()); + "GetObject should fail: size %d, error %d\n", size, GetLastError()); memset(&ext_pen, 0xb0, sizeof(ext_pen)); SetLastError(0xdeadbeef); @@ -367,60 +367,60 @@ test_geometric_pens: { case PS_NULL: ok(size == sizeof(EXTLOGPEN), - "GetObject returned %d, error %ld\n", size, GetLastError()); + "GetObject returned %d, error %d\n", size, GetLastError()); ok(ext_pen.elp.elpHatch == 0, "expected 0, got %p\n", (void *)ext_pen.elp.elpHatch); - ok(ext_pen.elp.elpNumEntries == 0, "expected 0, got %lx\n", ext_pen.elp.elpNumEntries); + ok(ext_pen.elp.elpNumEntries == 0, "expected 0, got %x\n", ext_pen.elp.elpNumEntries); /* for PS_NULL it also works this way */ SetLastError(0xdeadbeef); size = GetObject(hpen, sizeof(ext_pen), &lp); ok(size == sizeof(LOGPEN), - "GetObject returned %d, error %ld\n", size, GetLastError()); + "GetObject returned %d, error %d\n", size, GetLastError()); ok(lp.lopnStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, lp.lopnStyle); - ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %ld\n", pen[i].ret_width, lp.lopnWidth.x); - ok(lp.lopnWidth.y == 0, "expected 0, got %ld\n", lp.lopnWidth.y); - ok(lp.lopnColor == pen[i].ret_color, "expected %08lx, got %08lx\n", pen[i].ret_color, lp.lopnColor); + ok(lp.lopnWidth.x == pen[i].ret_width, "expected %u, got %d\n", pen[i].ret_width, lp.lopnWidth.x); + ok(lp.lopnWidth.y == 0, "expected 0, got %d\n", lp.lopnWidth.y); + ok(lp.lopnColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, lp.lopnColor); break; case PS_USERSTYLE: ok(!size /*&& GetLastError() == ERROR_INVALID_PARAMETER*/, - "GetObject should fail: size %d, error %ld\n", size, GetLastError()); + "GetObject should fail: size %d, error %d\n", size, GetLastError()); size = GetObject(hpen, sizeof(ext_pen), &ext_pen.elp); ok(size == sizeof(EXTLOGPEN) - sizeof(elp.elpStyleEntry) + sizeof(user_style), - "GetObject returned %d, error %ld\n", size, GetLastError()); + "GetObject returned %d, error %d\n", size, GetLastError()); ok(ext_pen.elp.elpHatch == HS_CROSS, "expected HS_CROSS, got %p\n", (void *)ext_pen.elp.elpHatch); - ok(ext_pen.elp.elpNumEntries == 2, "expected 0, got %lx\n", ext_pen.elp.elpNumEntries); - ok(ext_pen.elp.elpStyleEntry[0] == 0xabc, "expected 0xabc, got %lx\n", ext_pen.elp.elpStyleEntry[0]); - ok(ext_pen.elp.elpStyleEntry[1] == 0xdef, "expected 0xabc, got %lx\n", ext_pen.elp.elpStyleEntry[1]); + ok(ext_pen.elp.elpNumEntries == 2, "expected 0, got %x\n", ext_pen.elp.elpNumEntries); + ok(ext_pen.elp.elpStyleEntry[0] == 0xabc, "expected 0xabc, got %x\n", ext_pen.elp.elpStyleEntry[0]); + ok(ext_pen.elp.elpStyleEntry[1] == 0xdef, "expected 0xabc, got %x\n", ext_pen.elp.elpStyleEntry[1]); break; default: ok(size == sizeof(EXTLOGPEN) - sizeof(elp.elpStyleEntry), - "GetObject returned %d, error %ld\n", size, GetLastError()); + "GetObject returned %d, error %d\n", size, GetLastError()); ok(ext_pen.elp.elpHatch == HS_CROSS, "expected HS_CROSS, got %p\n", (void *)ext_pen.elp.elpHatch); - ok(ext_pen.elp.elpNumEntries == 0, "expected 0, got %lx\n", ext_pen.elp.elpNumEntries); + ok(ext_pen.elp.elpNumEntries == 0, "expected 0, got %x\n", ext_pen.elp.elpNumEntries); break; } /* for some reason XP differenciates PS_NULL here */ if (pen[i].style == PS_NULL) - ok(ext_pen.elp.elpPenStyle == pen[i].ret_style, "expected %x, got %lx\n", pen[i].ret_style, ext_pen.elp.elpPenStyle); + ok(ext_pen.elp.elpPenStyle == pen[i].ret_style, "expected %x, got %x\n", pen[i].ret_style, ext_pen.elp.elpPenStyle); else { if (pen[i].style == PS_USERSTYLE) { todo_wine - ok(ext_pen.elp.elpPenStyle == (PS_GEOMETRIC | pen[i].style), "expected %x, got %lx\n", PS_GEOMETRIC | pen[i].style, ext_pen.elp.elpPenStyle); + ok(ext_pen.elp.elpPenStyle == (PS_GEOMETRIC | pen[i].style), "expected %x, got %x\n", PS_GEOMETRIC | pen[i].style, ext_pen.elp.elpPenStyle); } else - ok(ext_pen.elp.elpPenStyle == (PS_GEOMETRIC | pen[i].style), "expected %x, got %lx\n", PS_GEOMETRIC | pen[i].style, ext_pen.elp.elpPenStyle); + ok(ext_pen.elp.elpPenStyle == (PS_GEOMETRIC | pen[i].style), "expected %x, got %x\n", PS_GEOMETRIC | pen[i].style, ext_pen.elp.elpPenStyle); } if (pen[i].style == PS_NULL) - ok(ext_pen.elp.elpWidth == 0, "expected 0, got %lx\n", ext_pen.elp.elpWidth); + ok(ext_pen.elp.elpWidth == 0, "expected 0, got %x\n", ext_pen.elp.elpWidth); else - ok(ext_pen.elp.elpWidth == pen[i].ret_width, "expected %u, got %lx\n", pen[i].ret_width, ext_pen.elp.elpWidth); - ok(ext_pen.elp.elpColor == pen[i].ret_color, "expected %08lx, got %08lx\n", pen[i].ret_color, ext_pen.elp.elpColor); + ok(ext_pen.elp.elpWidth == pen[i].ret_width, "expected %u, got %x\n", pen[i].ret_width, ext_pen.elp.elpWidth); + ok(ext_pen.elp.elpColor == pen[i].ret_color, "expected %08x, got %08x\n", pen[i].ret_color, ext_pen.elp.elpColor); ok(ext_pen.elp.elpBrushStyle == BS_SOLID, "expected BS_SOLID, got %x\n", ext_pen.elp.elpBrushStyle); DeleteObject(hpen);