Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
December 2017
- 60 participants
- 748 messages
[PATCH appdb] Show additional application links
by Rosanne DiMesio
Fixes bug 44186.
Signed-off-by: Rosanne DiMesio <dimesio(a)earthlink.net>
---
include/application.php | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/application.php b/include/application.php
index f6c90b8..320ad5a 100644
--- a/include/application.php
+++ b/include/application.php
@@ -895,6 +895,11 @@ class Application {
</div>
EOT;
+ // URLs
+ if($sUrls = url::display(NULL, $this->iAppId))
+ {
+ echo $sUrls;
+ }
echo "<p>For more details and user comments, view the versions of this application</p>\n";
// display versions
--
2.12.3
Dec. 28, 2017
[PATCH] d3d8/tests: Use the available ARRAY_SIZE() macro
by Michael Stefaniuc
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/d3d8/tests/device.c | 52 ++++++++++++++++++++++++------------------------
1 file changed, 26 insertions(+), 26 deletions(-)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c
index 8743a24..a9188f0 100644
--- a/dlls/d3d8/tests/device.c
+++ b/dlls/d3d8/tests/device.c
@@ -1207,7 +1207,7 @@ static void test_display_formats(void)
d3d8 = Direct3DCreate8(D3D_SDK_VERSION);
ok(!!d3d8, "Failed to create a D3D object.\n");
- for (display = 0; display < sizeof(formats) / sizeof(*formats); ++display)
+ for (display = 0; display < ARRAY_SIZE(formats); ++display)
{
for (i = 0, has_modes = FALSE; SUCCEEDED(IDirect3D8_EnumAdapterModes(d3d8, D3DADAPTER_DEFAULT, i, &mode)); ++i)
{
@@ -1220,7 +1220,7 @@ static void test_display_formats(void)
for (windowed = 0; windowed <= 1; ++windowed)
{
- for (backbuffer = 0; backbuffer < sizeof(formats) / sizeof(*formats); ++backbuffer)
+ for (backbuffer = 0; backbuffer < ARRAY_SIZE(formats); ++backbuffer)
{
should_pass = FALSE;
@@ -4543,7 +4543,7 @@ static void test_vb_lock_flags(void)
hr = IDirect3DDevice8_CreateVertexBuffer(device, 1024, D3DUSAGE_DYNAMIC, 0, D3DPOOL_DEFAULT, &buffer);
ok(SUCCEEDED(hr), "Failed to create vertex buffer, hr %#x.\n", hr);
- for (i = 0; i < (sizeof(test_data) / sizeof(*test_data)); ++i)
+ for (i = 0; i < ARRAY_SIZE(test_data); ++i)
{
hr = IDirect3DVertexBuffer8_Lock(buffer, 0, 0, &data, test_data[i].flags);
ok(hr == test_data[i].result, "Got unexpected hr %#x for %s.\n",
@@ -4948,7 +4948,7 @@ static void test_lockrect_invalid(void)
return;
}
- for (r = 0; r < sizeof(resources) / sizeof(*resources); ++r)
+ for (r = 0; r < ARRAY_SIZE(resources); ++r)
{
texture = NULL;
cube_texture = NULL;
@@ -4988,7 +4988,7 @@ static void test_lockrect_invalid(void)
hr = IDirect3DSurface8_UnlockRect(surface);
ok(hr == expected_hr, "Got hr %#x, expected %#x, type %s.\n", hr, expected_hr, resources[r].name);
- for (i = 0; i < (sizeof(valid) / sizeof(*valid)); ++i)
+ for (i = 0; i < ARRAY_SIZE(valid); ++i)
{
const RECT *rect = &valid[i];
@@ -5038,7 +5038,7 @@ static void test_lockrect_invalid(void)
}
}
- for (i = 0; i < (sizeof(invalid) / sizeof(*invalid)); ++i)
+ for (i = 0; i < ARRAY_SIZE(invalid); ++i)
{
const RECT *rect = &invalid[i];
@@ -5509,7 +5509,7 @@ static void test_surface_double_unlock(void)
return;
}
- for (i = 0; i < (sizeof(pools) / sizeof(*pools)); ++i)
+ for (i = 0; i < ARRAY_SIZE(pools); ++i)
{
switch (pools[i])
{
@@ -5671,7 +5671,7 @@ static void test_surface_blocks(void)
tex_pow2 = !(caps.TextureCaps & D3DPTEXTURECAPS_NONPOW2CONDITIONAL);
cube_pow2 = !!(caps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP_POW2);
- for (i = 0; i < (sizeof(formats) / sizeof(*formats)); ++i)
+ for (i = 0; i < ARRAY_SIZE(formats); ++i)
{
BOOL tex_support, cube_support, surface_support, format_known;
@@ -5707,7 +5707,7 @@ static void test_surface_blocks(void)
size_is_pow2 = !(w & (w - 1) || h & (h - 1));
- for (j = 0; j < sizeof(create_tests) / sizeof(*create_tests); j++)
+ for (j = 0; j < ARRAY_SIZE(create_tests); j++)
{
BOOL support, pow2;
HRESULT expect_hr;
@@ -5802,7 +5802,7 @@ static void test_surface_blocks(void)
continue;
}
- for (j = 0; j < (sizeof(pools) / sizeof(*pools)); ++j)
+ for (j = 0; j < ARRAY_SIZE(pools); ++j)
{
hr = IDirect3DDevice8_CreateTexture(device, 128, 128, 1,
pools[j].pool == D3DPOOL_DEFAULT ? D3DUSAGE_DYNAMIC : 0,
@@ -5866,7 +5866,7 @@ static void test_surface_blocks(void)
}
}
- for (k = 0; k < sizeof(invalid) / sizeof(*invalid); ++k)
+ for (k = 0; k < ARRAY_SIZE(invalid); ++k)
{
hr = IDirect3DSurface8_LockRect(surface, &locked_rect, &invalid[k], 0);
ok(FAILED(hr) == !pools[j].success, "Invalid lock %s(%#x), expected %s, format %s, pool %s, case %u.\n",
@@ -5950,7 +5950,7 @@ static void test_set_palette(void)
return;
}
- for (i = 0; i < sizeof(pal) / sizeof(*pal); i++)
+ for (i = 0; i < ARRAY_SIZE(pal); i++)
{
pal[i].peRed = i;
pal[i].peGreen = i;
@@ -5962,7 +5962,7 @@ static void test_set_palette(void)
hr = IDirect3DDevice8_GetDeviceCaps(device, &caps);
ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr);
- for (i = 0; i < sizeof(pal) / sizeof(*pal); i++)
+ for (i = 0; i < ARRAY_SIZE(pal); i++)
{
pal[i].peRed = i;
pal[i].peGreen = i;
@@ -6194,7 +6194,7 @@ static void test_npot_textures(void)
ok(cube_pow2 == tex_pow2, "Cube texture and 2d texture pow2 restrictions mismatch.\n");
ok(vol_pow2 == tex_pow2, "Volume texture and 2d texture pow2 restrictions mismatch.\n");
- for (i = 0; i < sizeof(pools) / sizeof(*pools); i++)
+ for (i = 0; i < ARRAY_SIZE(pools); i++)
{
for (levels = 0; levels <= 2; levels++)
{
@@ -6317,7 +6317,7 @@ static void test_volume_locking(void)
goto out;
}
- for (i = 0; i < sizeof(tests) / sizeof(*tests); i++)
+ for (i = 0; i < ARRAY_SIZE(tests); i++)
{
hr = IDirect3DDevice8_CreateVolumeTexture(device, 4, 4, 4, 1, tests[i].usage,
D3DFMT_A8R8G8B8, tests[i].pool, &texture);
@@ -6424,7 +6424,7 @@ static void test_update_volumetexture(void)
goto out;
}
- for (i = 0; i < sizeof(tests) / sizeof(*tests); i++)
+ for (i = 0; i < ARRAY_SIZE(tests); i++)
{
DWORD src_usage = tests[i].src_pool == D3DPOOL_DEFAULT ? D3DUSAGE_DYNAMIC : 0;
DWORD dst_usage = tests[i].dst_pool == D3DPOOL_DEFAULT ? D3DUSAGE_DYNAMIC : 0;
@@ -6465,7 +6465,7 @@ static void test_update_volumetexture(void)
goto out;
}
- for (i = 0; i < sizeof(tests2) / sizeof(*tests2); i++)
+ for (i = 0; i < ARRAY_SIZE(tests2); i++)
{
hr = IDirect3DDevice8_CreateVolumeTexture(device,
tests2[i].src_size, tests2[i].src_size, tests2[i].src_size,
@@ -6636,7 +6636,7 @@ static void test_volume_blocks(void)
ok(SUCCEEDED(hr), "Failed to get caps, hr %#x.\n", hr);
pow2 = !!(caps.TextureCaps & D3DPTEXTURECAPS_VOLUMEMAP_POW2);
- for (i = 0; i < sizeof(formats) / sizeof(*formats); i++)
+ for (i = 0; i < ARRAY_SIZE(formats); i++)
{
hr = IDirect3D8_CheckDeviceFormat(d3d8, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8,
0, D3DRTYPE_VOLUMETEXTURE, formats[i].fmt);
@@ -6658,7 +6658,7 @@ static void test_volume_blocks(void)
size_is_pow2 = !((w & (w - 1)) || (h & (h - 1)) || (d & (d - 1)));
- for (j = 0; j < sizeof(create_tests) / sizeof(*create_tests); j++)
+ for (j = 0; j < ARRAY_SIZE(create_tests); j++)
{
BOOL may_succeed = FALSE;
@@ -6706,7 +6706,7 @@ static void test_volume_blocks(void)
ok(SUCCEEDED(hr), "Failed to create volume texture, hr %#x.\n", hr);
/* Test lockrect offset */
- for (j = 0; j < sizeof(offset_tests) / sizeof(*offset_tests); j++)
+ for (j = 0; j < ARRAY_SIZE(offset_tests); j++)
{
unsigned int bytes_per_pixel;
bytes_per_pixel = formats[i].block_size / (formats[i].block_width * formats[i].block_height);
@@ -6954,7 +6954,7 @@ static void test_lockbox_invalid(void)
hr = IDirect3DVolumeTexture8_UnlockBox(texture, 0);
ok(SUCCEEDED(hr), "Failed to unlock volume texture, hr %#x.\n", hr);
- for (i = 0; i < (sizeof(test_data) / sizeof(*test_data)); ++i)
+ for (i = 0; i < ARRAY_SIZE(test_data); ++i)
{
unsigned int offset, expected_offset;
const D3DBOX *box = &test_data[i].box;
@@ -7811,7 +7811,7 @@ static void test_resource_priority(void)
return;
}
- for (i = 0; i < sizeof(test_data) / sizeof(*test_data); i++)
+ for (i = 0; i < ARRAY_SIZE(test_data); i++)
{
hr = IDirect3DDevice8_CreateTexture(device, 16, 16, 0, 0, D3DFMT_X8R8G8B8,
test_data[i].pool, &texture);
@@ -7943,7 +7943,7 @@ static void test_swapchain_parameters(void)
present_parameters_windowed.Windowed = TRUE;
present_parameters_windowed.BackBufferCount = 1;
- for (i = 0; i < sizeof(tests) / sizeof(*tests); ++i)
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
{
UINT bb_count = tests[i].backbuffer_count ? tests[i].backbuffer_count : 1;
@@ -8123,7 +8123,7 @@ static void test_miptree_layout(void)
base_dimension = 256;
}
- for (format_idx = 0; format_idx < sizeof(formats) / sizeof(*formats); ++format_idx)
+ for (format_idx = 0; format_idx < ARRAY_SIZE(formats); ++format_idx)
{
if (FAILED(hr = IDirect3D8_CheckDeviceFormat(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
D3DFMT_X8R8G8B8, 0, D3DRTYPE_TEXTURE, formats[format_idx].format)))
@@ -8132,7 +8132,7 @@ static void test_miptree_layout(void)
continue;
}
- for (pool_idx = 0; pool_idx < sizeof(pools) / sizeof(*pools); ++pool_idx)
+ for (pool_idx = 0; pool_idx < ARRAY_SIZE(pools); ++pool_idx)
{
hr = IDirect3DDevice8_CreateTexture(device, base_dimension, base_dimension, 0, 0,
formats[format_idx].format, pools[pool_idx].pool, &texture_2d);
@@ -8169,7 +8169,7 @@ static void test_miptree_layout(void)
continue;
}
- for (pool_idx = 0; pool_idx < sizeof(pools) / sizeof(*pools); ++pool_idx)
+ for (pool_idx = 0; pool_idx < ARRAY_SIZE(pools); ++pool_idx)
{
hr = IDirect3DDevice8_CreateCubeTexture(device, base_dimension, 0, 0,
formats[format_idx].format, pools[pool_idx].pool, &texture_cube);
--
2.9.5
Dec. 28, 2017
[PATCH] msvcrt: Don't include MSVC 8.0+ string functions in SOs for older DLLs
by Alex Henrie
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
---
dlls/msvcrt/ctype.c | 2 ++
dlls/msvcrt/scanf.c | 4 ++++
dlls/msvcrt/string.c | 8 ++++++++
dlls/msvcrt/wcs.c | 37 +++++++++++++++++++++++++++++++++----
4 files changed, 47 insertions(+), 4 deletions(-)
diff --git a/dlls/msvcrt/ctype.c b/dlls/msvcrt/ctype.c
index e076d8976c..2c39a56686 100644
--- a/dlls/msvcrt/ctype.c
+++ b/dlls/msvcrt/ctype.c
@@ -469,6 +469,7 @@ int CDECL MSVCRT__tolower(int c)
return c + 0x20; /* sic */
}
+#if _MSVCR_VER>=120
/*********************************************************************
* wctype (MSVCR120.@)
*/
@@ -498,3 +499,4 @@ unsigned short __cdecl wctype(const char *property)
return 0;
}
+#endif
diff --git a/dlls/msvcrt/scanf.c b/dlls/msvcrt/scanf.c
index 50ef168a45..09ddf2863f 100644
--- a/dlls/msvcrt/scanf.c
+++ b/dlls/msvcrt/scanf.c
@@ -796,6 +796,8 @@ int WINAPIV MSVCRT__snwscanf_s_l(MSVCRT_wchar_t *input, MSVCRT_size_t length,
return res;
}
+#if _MSVCR_VER>=120
+
/*********************************************************************
* vsscanf (MSVCRT120.@)
*/
@@ -815,3 +817,5 @@ int CDECL MSVCRT_vswscanf(const MSVCRT_wchar_t *buffer, const MSVCRT_wchar_t *fo
return MSVCRT_vswscanf_l(buffer, format, NULL, valist);
}
+
+#endif /* _MSVCR_VER>=120 */
diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c
index 234d72838d..2c05e37149 100644
--- a/dlls/msvcrt/string.c
+++ b/dlls/msvcrt/string.c
@@ -499,6 +499,8 @@ double CDECL MSVCRT_strtod( const char *str, char **end )
return MSVCRT_strtod_l( str, end, NULL );
}
+#if _MSVCR_VER>=120
+
/*********************************************************************
* strtof_l (MSVCR120.@)
*/
@@ -515,6 +517,8 @@ float CDECL MSVCRT_strtof( const char *str, char **end )
return MSVCRT__strtof_l(str, end, NULL);
}
+#endif /* _MSVCR_VER>=120 */
+
/*********************************************************************
* atof (MSVCRT.@)
*/
@@ -1046,6 +1050,8 @@ int CDECL MSVCRT_atoi(const char *str)
}
#endif
+#if _MSVCR_VER>=120
+
/******************************************************************
* _atoll_l (MSVCR120.@)
*/
@@ -1062,6 +1068,8 @@ MSVCRT_longlong CDECL MSVCRT_atoll(const char* str)
return MSVCRT__atoll_l(str, NULL);
}
+#endif /* if _MSVCR_VER>=120 */
+
/******************************************************************
* _strtol_l (MSVCRT.@)
*/
diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c
index 0c54800f5d..1aa8d98b12 100644
--- a/dlls/msvcrt/wcs.c
+++ b/dlls/msvcrt/wcs.c
@@ -664,6 +664,8 @@ double CDECL MSVCRT__wtof_l(const MSVCRT_wchar_t *str, MSVCRT__locale_t locale)
return MSVCRT__wcstod_l(str, NULL, locale);
}
+#if _MSVCR_VER>=120
+
/*********************************************************************
* _wcstof_l (MSVCR120.@)
*/
@@ -680,6 +682,8 @@ float CDECL MSVCRT_wcstof( const MSVCRT_wchar_t *str, MSVCRT_wchar_t **end )
return MSVCRT__wcstof_l(str, end, NULL);
}
+#endif /* _MSVCR_VER>=120 */
+
/*********************************************************************
* arg_clbk_valist (INTERNAL)
*/
@@ -728,6 +732,8 @@ int CDECL MSVCRT_vsnprintf( char *str, MSVCRT_size_t len,
return ret;
}
+#if _MSVCR_VER>=140
+
static int puts_clbk_str_c99_a(void *ctx, int len, const char *str)
{
struct _str_ctx_a *out = ctx;
@@ -775,6 +781,8 @@ int CDECL MSVCRT__stdio_common_vsprintf( unsigned __int64 options, char *str, MS
return ret;
}
+#endif /* _MSVCR_VER>=140 */
+
/*********************************************************************
* _vsnprintf_l (MSVCRT.@)
*/
@@ -919,6 +927,8 @@ int CDECL MSVCRT_vsnprintf_s( char *str, MSVCRT_size_t sizeOfBuffer,
return MSVCRT_vsnprintf_s_l(str,sizeOfBuffer, count, format, NULL, valist);
}
+#if _MSVCR_VER>=140
+
/*********************************************************************
* __stdio_common_vsnprintf_s (UCRTBASE.@)
*/
@@ -965,6 +975,8 @@ int CDECL MSVCRT__stdio_common_vsprintf_s( unsigned __int64 options,
return MSVCRT_vsnprintf_s_l_opt(str, INT_MAX, count, format, options & UCRTBASE_PRINTF_MASK, locale, valist);
}
+#endif /* _MSVCR_VER>=140 */
+
/*********************************************************************
* vsprintf (MSVCRT.@)
*/
@@ -1150,16 +1162,18 @@ int CDECL MSVCRT_vswprintf_p_l(MSVCRT_wchar_t *buffer, MSVCRT_size_t length,
return MSVCRT_vswprintf_p_l_opt(buffer, length, format, 0, locale, args);
}
+#if _MSVCR_VER>=80
/*********************************************************************
- * _vswprintf_p (MSVCR100.@)
+ * _vswprintf_p (MSVCR80.@)
*/
int CDECL MSVCRT__vswprintf_p(MSVCRT_wchar_t *buffer, MSVCRT_size_t length,
const MSVCRT_wchar_t *format, __ms_va_list args)
{
return MSVCRT_vswprintf_p_l_opt(buffer, length, format, 0, NULL, args);
}
+#endif
-
+#if _MSVCR_VER>=140
/*********************************************************************
* __stdio_common_vswprintf_p (UCRTBASE.@)
*/
@@ -1171,6 +1185,7 @@ int CDECL MSVCRT__stdio_common_vswprintf_p( unsigned __int64 options,
FIXME("options %s not handled\n", wine_dbgstr_longlong(options));
return MSVCRT_vswprintf_p_l_opt(str, count, format, options & UCRTBASE_PRINTF_MASK, locale, valist);
}
+#endif
/*********************************************************************
* _vsnwprintf_s_l (MSVCRT.@)
@@ -1247,6 +1262,8 @@ int WINAPIV MSVCRT__snwprintf_s_l( MSVCRT_wchar_t *str, unsigned int len, unsign
return retval;
}
+#if _MSVCR_VER>=140
+
static int puts_clbk_str_c99_w(void *ctx, int len, const MSVCRT_wchar_t *str)
{
struct _str_ctx_w *out = ctx;
@@ -1295,6 +1312,8 @@ int CDECL MSVCRT__stdio_common_vswprintf( unsigned __int64 options,
return ret;
}
+#endif /* _MSVCR_VER>=140 */
+
/*********************************************************************
* sprintf (MSVCRT.@)
*/
@@ -1424,13 +1443,15 @@ int CDECL MSVCRT__vscwprintf_p_l( const MSVCRT_wchar_t *format, MSVCRT__locale_t
return MSVCRT_vswprintf_p_l_opt( NULL, INT_MAX, format, 0, locale, args );
}
+#if _MSVCR_VER>=80
/*********************************************************************
- * _vscwprintf_p (MSVCR100.@)
+ * _vscwprintf_p (MSVCR80.@)
*/
int CDECL MSVCRT__vscwprintf_p(const MSVCRT_wchar_t *format, __ms_va_list args)
{
return MSVCRT_vswprintf_p_l_opt(NULL, INT_MAX, format, 0, NULL, args);
}
+#endif
/*********************************************************************
* vswprintf_s (MSVCRT.@)
@@ -1496,6 +1517,7 @@ int CDECL MSVCRT_vsprintf_p(char *buffer, MSVCRT_size_t length,
return MSVCRT_vsprintf_p_l(buffer, length, format, NULL, args);
}
+#if _MSVCR_VER>=140
/*********************************************************************
* __stdio_common_vsprintf_p (UCRTBASE.@)
*/
@@ -1506,6 +1528,7 @@ int CDECL MSVCRT__stdio_common_vsprintf_p(unsigned __int64 options, char *buffer
FIXME("options %s not handled\n", wine_dbgstr_longlong(options));
return MSVCRT_vsprintf_p_l_opt(buffer, length, format, options & UCRTBASE_PRINTF_MASK, locale, args);
}
+#endif
/*********************************************************************
* _sprintf_p_l (MSVCRT.@)
@@ -1537,8 +1560,9 @@ int WINAPIV MSVCRT___swprintf_l( MSVCRT_wchar_t *str, const MSVCRT_wchar_t *form
return retval;
}
+#if _MSVCR_VER>=80
/*********************************************************************
- * _sprintf_p (MSVCR100.@)
+ * _sprintf_p (MSVCR80.@)
*/
int WINAPIV MSVCRT__sprintf_p(char *buffer, MSVCRT_size_t length, const char *format, ...)
{
@@ -1551,6 +1575,7 @@ int WINAPIV MSVCRT__sprintf_p(char *buffer, MSVCRT_size_t length, const char *fo
return r;
}
+#endif
/*********************************************************************
* _swprintf_p_l (MSVCRT.@)
@@ -2234,6 +2259,8 @@ MSVCRT_long __cdecl MSVCRT__wtol(const MSVCRT_wchar_t *str)
return MSVCRT__wtol_l(str, NULL);
}
+#if _MSVCR_VER>=120
+
/*********************************************************************
* _wtoll_l (MSVCR120.@)
*/
@@ -2250,6 +2277,8 @@ MSVCRT_longlong __cdecl MSVCRT__wtoll(const MSVCRT_wchar_t *str)
return MSVCRT__wtoll_l(str, NULL);
}
+#endif /* _MSVCR_VER>=120 */
+
/*********************************************************************
* _wcstoui64_l (MSVCRT.@)
*
--
2.15.1
Dec. 28, 2017
[PATCH] msvcrt: Don't include MSVC 8.0+ heap functions in SOs for older DLLs
by Alex Henrie
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
---
dlls/msvcrt/heap.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcrt/heap.c b/dlls/msvcrt/heap.c
index ed41253304..7ea80a3a50 100644
--- a/dlls/msvcrt/heap.c
+++ b/dlls/msvcrt/heap.c
@@ -373,8 +373,9 @@ MSVCRT_size_t CDECL _msize(void* mem)
return size;
}
+#if _MSVCR_VER>=80
/*********************************************************************
- * _aligned_msize (MSVCR100.@)
+ * _aligned_msize (MSVCR80.@)
*/
size_t CDECL _aligned_msize(void *p, MSVCRT_size_t alignment, MSVCRT_size_t offset)
{
@@ -388,6 +389,7 @@ size_t CDECL _aligned_msize(void *p, MSVCRT_size_t alignment, MSVCRT_size_t offs
alloc_ptr = SAVED_PTR(p);
return _msize(*alloc_ptr)-alignment-sizeof(void*);
}
+#endif
/*********************************************************************
* calloc (MSVCRT.@)
@@ -405,6 +407,7 @@ void* CDECL MSVCRT_calloc(MSVCRT_size_t count, MSVCRT_size_t size)
return msvcrt_heap_alloc(HEAP_ZERO_MEMORY, bytes);
}
+#if _MSVCR_VER>=140
/*********************************************************************
* _calloc_base (UCRTBASE.@)
*/
@@ -412,6 +415,7 @@ void* CDECL _calloc_base(MSVCRT_size_t count, MSVCRT_size_t size)
{
return MSVCRT_calloc(count, size);
}
+#endif
/*********************************************************************
* free (MSVCRT.@)
@@ -421,6 +425,7 @@ void CDECL MSVCRT_free(void* ptr)
msvcrt_heap_free(ptr);
}
+#if _MSVCR_VER>=140
/*********************************************************************
* _free_base (UCRTBASE.@)
*/
@@ -428,6 +433,7 @@ void CDECL _free_base(void* ptr)
{
msvcrt_heap_free(ptr);
}
+#endif
/*********************************************************************
* malloc (MSVCRT.@)
@@ -440,6 +446,7 @@ void* CDECL MSVCRT_malloc(MSVCRT_size_t size)
return ret;
}
+#if _MSVCR_VER>=140
/*********************************************************************
* _malloc_base (UCRTBASE.@)
*/
@@ -447,6 +454,7 @@ void* CDECL _malloc_base(MSVCRT_size_t size)
{
return MSVCRT_malloc(size);
}
+#endif
/*********************************************************************
* realloc (MSVCRT.@)
@@ -459,6 +467,7 @@ void* CDECL MSVCRT_realloc(void* ptr, MSVCRT_size_t size)
return NULL;
}
+#if _MSVCR_VER>=140
/*********************************************************************
* _realloc_base (UCRTBASE.@)
*/
@@ -466,9 +475,11 @@ void* CDECL _realloc_base(void* ptr, MSVCRT_size_t size)
{
return MSVCRT_realloc(ptr, size);
}
+#endif
+#if _MSVCR_VER>=80
/*********************************************************************
- * _recalloc (MSVCR100.@)
+ * _recalloc (MSVCR80.@)
*/
void* CDECL _recalloc(void *mem, MSVCRT_size_t num, MSVCRT_size_t size)
{
@@ -491,6 +502,7 @@ void* CDECL _recalloc(void *mem, MSVCRT_size_t num, MSVCRT_size_t size)
memset((BYTE*)ret+old_size, 0, size-old_size);
return ret;
}
+#endif
/*********************************************************************
* __p__amblksiz (MSVCRT.@)
@@ -739,6 +751,7 @@ int CDECL MSVCRT_memmove_s(void *dest, MSVCRT_size_t numberOfElements, const voi
return 0;
}
+#if _MSVCR_VER>=100
/*********************************************************************
* wmemmove_s (MSVCR100.@)
*/
@@ -761,6 +774,7 @@ int CDECL wmemmove_s(MSVCRT_wchar_t *dest, MSVCRT_size_t numberOfElements,
memmove(dest, src, sizeof(MSVCRT_wchar_t)*count);
return 0;
}
+#endif
/*********************************************************************
* memcpy_s (MSVCRT.@)
@@ -788,6 +802,7 @@ int CDECL MSVCRT_memcpy_s(void *dest, MSVCRT_size_t numberOfElements, const void
return 0;
}
+#if _MSVCR_VER>=100
/*********************************************************************
* wmemcpy_s (MSVCR100.@)
*/
@@ -813,6 +828,7 @@ int CDECL wmemcpy_s(MSVCRT_wchar_t *dest, MSVCRT_size_t numberOfElements,
memcpy(dest, src, sizeof(MSVCRT_wchar_t)*count);
return 0;
}
+#endif
/*********************************************************************
* strncpy_s (MSVCRT.@)
--
2.15.1
Dec. 28, 2017
[PATCH] user32/tests: Fix OemKeyScan failures with input method editors
by Alex Henrie
Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com>
---
This should fix the failures on Korean Windows.
dlls/user32/tests/Makefile.in | 2 +-
dlls/user32/tests/input.c | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/Makefile.in b/dlls/user32/tests/Makefile.in
index 7149dc824e..c71cbe2547 100644
--- a/dlls/user32/tests/Makefile.in
+++ b/dlls/user32/tests/Makefile.in
@@ -1,5 +1,5 @@
TESTDLL = user32.dll
-IMPORTS = user32 gdi32 advapi32
+IMPORTS = user32 gdi32 advapi32 imm32
C_SRCS = \
broadcast.c \
diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 793590ef71..a15a64420d 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -54,6 +54,7 @@
#include "winbase.h"
#include "winuser.h"
#include "winnls.h"
+#include "imm.h"
#include "wine/test.h"
@@ -2515,6 +2516,7 @@ static void test_OemKeyScan(void)
DWORD ret, expect, vkey, scan;
WCHAR oem, wchr;
char oem_char;
+ BOOL ime = ImmIsIME(GetKeyboardLayout(0));
for (oem = 0; oem < 0x200; oem++)
{
@@ -2527,7 +2529,10 @@ static void test_OemKeyScan(void)
{
vkey = VkKeyScanW( wchr );
scan = MapVirtualKeyW( LOBYTE( vkey ), MAPVK_VK_TO_VSC );
- if (!scan)
+ /* OemKeyScan returns -1 for any character that has to go through
+ * the IME, whereas VkKeyScan returns the virtual key code for the
+ * question mark key */
+ if (!scan || (ime && wchr != '?' && vkey == VkKeyScanW( '?' )))
expect = -1;
else
{
--
2.15.1
Dec. 28, 2017
[PATCH] quartz/tests: Fix resource leak.
by Andrey Gusev
Signed-off-by: Andrey Gusev <andrey.goosev(a)gmail.com>
---
dlls/quartz/tests/filtergraph.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/quartz/tests/filtergraph.c b/dlls/quartz/tests/filtergraph.c
index e66dc40a3a..0a8ac2c9bf 100644
--- a/dlls/quartz/tests/filtergraph.c
+++ b/dlls/quartz/tests/filtergraph.c
@@ -487,7 +487,7 @@ static void test_render_with_multithread(void)
IGraphBuilder_Release(graph_builder);
IClassFactory_Release(classfactory);
CoUninitialize();
- return;
+ return thread;
}
static void test_graph_builder(void)
--
2.13.6
Dec. 28, 2017
[PATCH] quartz: Enhancement for WAVEParser_create.
by Andrey Gusev
Signed-off-by: Andrey Gusev <andrey.goosev(a)gmail.com>
---
dlls/quartz/waveparser.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/quartz/waveparser.c b/dlls/quartz/waveparser.c
index f6bea2c704..f8afc527b1 100644
--- a/dlls/quartz/waveparser.c
+++ b/dlls/quartz/waveparser.c
@@ -431,10 +431,17 @@ HRESULT WAVEParser_create(IUnknown * pUnkOuter, LPVOID * ppv)
/* Note: This memory is managed by the transform filter once created */
This = CoTaskMemAlloc(sizeof(WAVEParserImpl));
+ if (!This)
+ return E_OUTOFMEMORY;
+
+ ZeroMemory(This, sizeof(WAVEParserImpl));
hr = Parser_Create(&(This->Parser), &WAVEParser_Vtbl, &CLSID_WAVEParser, WAVEParser_Sample, WAVEParser_QueryAccept, WAVEParser_InputPin_PreConnect, WAVEParser_Cleanup, WAVEParser_disconnect, WAVEParser_first_request, NULL, NULL, WAVEParserImpl_seek, NULL);
if (FAILED(hr))
+ {
+ CoTaskMemFree(This);
return hr;
+ }
*ppv = &This->Parser.filter.IBaseFilter_iface;
--
2.13.6
Dec. 28, 2017
[PATCH] quartz: Enhancement for AVISplitter_create.
by Andrey Gusev
Signed-off-by: Andrey Gusev <andrey.goosev(a)gmail.com>
---
dlls/quartz/avisplit.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/quartz/avisplit.c b/dlls/quartz/avisplit.c
index f3eccedcfc..24180aa9cc 100644
--- a/dlls/quartz/avisplit.c
+++ b/dlls/quartz/avisplit.c
@@ -1442,13 +1442,20 @@ HRESULT AVISplitter_create(IUnknown * pUnkOuter, LPVOID * ppv)
/* Note: This memory is managed by the transform filter once created */
This = CoTaskMemAlloc(sizeof(AVISplitterImpl));
- This->streams = NULL;
- This->oldindex = NULL;
+ if (!This)
+ return E_OUTOFMEMORY;
+ ZeroMemory(This, sizeof(AVISplitterImpl));
hr = Parser_Create(&(This->Parser), &AVISplitterImpl_Vtbl, &CLSID_AviSplitter, AVISplitter_Sample, AVISplitter_QueryAccept, AVISplitter_InputPin_PreConnect, AVISplitter_Flush, AVISplitter_Disconnect, AVISplitter_first_request, AVISplitter_done_process, NULL, AVISplitter_seek, NULL);
if (FAILED(hr))
+ {
+ CoTaskMemFree(This);
return hr;
+ }
+
+ This->streams = NULL;
+ This->oldindex = NULL;
*ppv = &This->Parser.filter.IBaseFilter_iface;
--
2.13.6
Dec. 28, 2017
[PATCH] user32/tests: Add some tests for A/W auto conversion in case of mismatching window vs dialog procedure types
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/user32/tests/dialog.c | 198 ++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 196 insertions(+), 2 deletions(-)
diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c
index 8bf76f112c..511f0c5723 100644
--- a/dlls/user32/tests/dialog.c
+++ b/dlls/user32/tests/dialog.c
@@ -1236,8 +1236,195 @@ static INT_PTR CALLBACK TestControlStyleDlgProc(HWND hdlg, UINT msg,
return FALSE;
}
-static void test_DialogBoxParamA(void)
+static const WCHAR testtextW[] = {'W','n','d','T','e','x','t',0};
+static INT_PTR CALLBACK test_aw_conversion_dlgprocA(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
{
+ if (msg == WM_SETTEXT)
+ {
+ if (IsWindowUnicode(hdlg))
+ {
+ WCHAR *text = (WCHAR *)lparam;
+ todo_wine
+ ok(!lstrcmpW(text, testtextW), "Unexpected text %s.\n", wine_dbgstr_w(text));
+ }
+ else
+ {
+ char *textA = (char *)lparam;
+ todo_wine
+ ok(!strcmp(textA, "WndText"), "Unexpected text %s.\n", textA);
+ }
+ }
+
+ return DefWindowProcW(hdlg, msg, wparam, lparam);
+}
+
+static INT_PTR CALLBACK test_aw_conversion_dlgprocW(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
+{
+ if (msg == WM_SETTEXT)
+ {
+ if (IsWindowUnicode(hdlg))
+ {
+ WCHAR *text = (WCHAR *)lparam;
+ ok(!lstrcmpW(text, testtextW), "Unexpected text %s.\n", wine_dbgstr_w(text));
+ }
+ else
+ {
+ char *textA = (char *)lparam;
+ ok(!strcmp(textA, "WndText"), "Unexpected text %s.\n", textA);
+ }
+ }
+
+ return DefWindowProcA(hdlg, msg, wparam, lparam);
+}
+
+static INT_PTR CALLBACK test_aw_conversion_dlgproc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
+{
+ ULONG_PTR dlgproc, originalproc;
+ WCHAR buffW[64];
+ char buff[64];
+ BOOL ret;
+ INT len;
+
+ switch (msg)
+ {
+ case WM_INITDIALOG:
+ ok(IsWindowUnicode(hdlg), "Expected unicode window.\n");
+
+ originalproc = GetWindowLongPtrW(hdlg, DWLP_DLGPROC);
+ ok(originalproc == (ULONG_PTR)test_aw_conversion_dlgproc, "Unexpected dlg proc %#lx.\n", originalproc);
+
+ dlgproc = GetWindowLongPtrA(hdlg, DWLP_DLGPROC);
+ ok(dlgproc != (ULONG_PTR)test_aw_conversion_dlgproc, "Unexpected dlg proc %#lx.\n", dlgproc);
+
+ dlgproc = SetWindowLongPtrA(hdlg, DWLP_DLGPROC, (UINT_PTR)test_aw_conversion_dlgprocA);
+ ok(IsWindowUnicode(hdlg), "Expected unicode window.\n");
+
+ dlgproc = GetWindowLongPtrW(hdlg, DWLP_DLGPROC);
+ ok(dlgproc != (ULONG_PTR)test_aw_conversion_dlgprocA, "Unexpected dlg proc %#lx.\n", dlgproc);
+
+ dlgproc = GetWindowLongPtrA(hdlg, DWLP_DLGPROC);
+ ok(dlgproc == (ULONG_PTR)test_aw_conversion_dlgprocA, "Unexpected dlg proc %#lx.\n", dlgproc);
+
+ ret = SetWindowTextW(hdlg, testtextW);
+ todo_wine
+ ok(ret, "Failed to set window text.\n");
+
+ memset(buff, 'A', sizeof(buff));
+ len = GetWindowTextA(hdlg, buff, sizeof(buff));
+ todo_wine
+ ok(buff[0] == 0 && buff[1] == 'A' && len == 0, "Unexpected window text %hhx, %hhx, len %d\n",
+ buff[0], buff[1], len);
+
+ memset(buffW, 0xff, sizeof(buffW));
+ len = GetWindowTextW(hdlg, buffW, 64);
+ todo_wine
+ ok(!lstrcmpW(buffW, testtextW) && len == 0, "Unexpected window text %s, len %d\n", wine_dbgstr_w(buffW), len);
+
+ dlgproc = SetWindowLongPtrW(hdlg, DWLP_DLGPROC, (UINT_PTR)test_aw_conversion_dlgprocW);
+ ok(IsWindowUnicode(hdlg), "Expected unicode window.\n");
+
+ dlgproc = GetWindowLongPtrW(hdlg, DWLP_DLGPROC);
+ ok(dlgproc == (ULONG_PTR)test_aw_conversion_dlgprocW, "Unexpected dlg proc %#lx.\n", dlgproc);
+
+ dlgproc = GetWindowLongPtrA(hdlg, DWLP_DLGPROC);
+ ok(dlgproc != (ULONG_PTR)test_aw_conversion_dlgprocW, "Unexpected dlg proc %#lx.\n", dlgproc);
+
+ ret = SetWindowTextA(hdlg, "WndText");
+ todo_wine
+ ok(ret, "Failed to set window text.\n");
+
+ memset(buff, 'A', sizeof(buff));
+ len = GetWindowTextA(hdlg, buff, sizeof(buff));
+ ok(buff[0] == 0 && buff[1] == 'A' && len == 0, "Unexpected window text %hhx, %hhx, len %d\n",
+ buff[0], buff[1], len);
+
+ memset(buffW, 0xff, sizeof(buffW));
+ len = GetWindowTextW(hdlg, buffW, sizeof(buffW)/sizeof(buffW[0]));
+ ok(buffW[0] == 'W' && buffW[1] == 0xffff && len == 0, "Unexpected window text %#x, %#x, len %d\n",
+ buffW[0], buffW[1], len);
+
+ SetWindowLongPtrA(hdlg, DWLP_DLGPROC, originalproc);
+ EndDialog(hdlg, -123);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static INT_PTR CALLBACK test_aw_conversion_dlgproc2(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lparam)
+{
+ ULONG_PTR dlgproc, originalproc;
+ WCHAR buffW[64];
+ char buff[64];
+ BOOL ret;
+ INT len;
+
+ switch (msg)
+ {
+ case WM_INITDIALOG:
+ ok(!IsWindowUnicode(hdlg), "Unexpected unicode window.\n");
+
+ originalproc = GetWindowLongPtrW(hdlg, DWLP_DLGPROC);
+ ok(originalproc != (ULONG_PTR)test_aw_conversion_dlgproc2, "Unexpected dlg proc %#lx.\n", originalproc);
+
+ dlgproc = GetWindowLongPtrA(hdlg, DWLP_DLGPROC);
+ ok(dlgproc == (ULONG_PTR)test_aw_conversion_dlgproc2, "Unexpected dlg proc %#lx.\n", dlgproc);
+
+ dlgproc = SetWindowLongPtrA(hdlg, DWLP_DLGPROC, (UINT_PTR)test_aw_conversion_dlgprocW);
+ ok(!IsWindowUnicode(hdlg), "Unexpected unicode window.\n");
+
+ dlgproc = GetWindowLongPtrW(hdlg, DWLP_DLGPROC);
+ ok(dlgproc != (ULONG_PTR)test_aw_conversion_dlgprocW, "Unexpected dlg proc %#lx.\n", dlgproc);
+
+ dlgproc = GetWindowLongPtrA(hdlg, DWLP_DLGPROC);
+ ok(dlgproc == (ULONG_PTR)test_aw_conversion_dlgprocW, "Unexpected dlg proc %#lx.\n", dlgproc);
+
+ ret = SetWindowTextA(hdlg, "WndText");
+ todo_wine
+ ok(ret, "Failed to set window text.\n");
+
+ memset(buff, 'A', sizeof(buff));
+ len = GetWindowTextA(hdlg, buff, sizeof(buff));
+ ok(!strcmp(buff, "WndText") && len == 0, "Unexpected window text %s, len %d\n", buff, len);
+
+ memset(buffW, 0xff, sizeof(buffW));
+ len = GetWindowTextW(hdlg, buffW, 64);
+ ok(buffW[0] == 0 && buffW[1] == 0xffff && len == 0, "Unexpected window text %s, len %d\n",
+ wine_dbgstr_w(buffW), len);
+
+ dlgproc = SetWindowLongPtrW(hdlg, DWLP_DLGPROC, (UINT_PTR)test_aw_conversion_dlgprocA);
+ ok(!IsWindowUnicode(hdlg), "Unexpected unicode window.\n");
+
+ dlgproc = GetWindowLongPtrW(hdlg, DWLP_DLGPROC);
+ ok(dlgproc == (ULONG_PTR)test_aw_conversion_dlgprocA, "Unexpected dlg proc %#lx.\n", dlgproc);
+
+ dlgproc = GetWindowLongPtrA(hdlg, DWLP_DLGPROC);
+ ok(dlgproc != (ULONG_PTR)test_aw_conversion_dlgprocA, "Unexpected dlg proc %#lx.\n", dlgproc);
+
+ ret = SetWindowTextW(hdlg, testtextW);
+ todo_wine
+ ok(ret, "Failed to set window text.\n");
+
+ memset(buff, 'A', sizeof(buff));
+ len = GetWindowTextA(hdlg, buff, sizeof(buff));
+ todo_wine
+ ok(!strcmp(buff, "WndText") && len == 0, "Unexpected window text %s, len %d\n", buff, len);
+
+ memset(buffW, 0xff, sizeof(buffW));
+ len = GetWindowTextW(hdlg, buffW, sizeof(buffW)/sizeof(buffW[0]));
+ todo_wine
+ ok(buffW[0] == 0 && buffW[1] == 0xffff && len == 0, "Unexpected window text %#x, %#x, len %d\n",
+ buffW[0], buffW[1], len);
+
+ SetWindowLongPtrA(hdlg, DWLP_DLGPROC, originalproc);
+ EndDialog(hdlg, -123);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+static void test_DialogBoxParam(void)
+{
+ static const WCHAR nameW[] = {'T','E','S','T','_','E','M','P','T','Y','_','D','I','A','L','O','G',0};
INT_PTR ret;
HWND hwnd_invalid = (HWND)0x4444;
@@ -1290,6 +1477,13 @@ static void test_DialogBoxParamA(void)
ok(ret == IDOK, "Expected IDOK\n");
DialogBoxParamA(GetModuleHandleA(NULL), "TEST_EMPTY_DIALOG", 0, TestReturnKeyDlgProc, 0);
+
+ /* WM_SETTEXT handling in case of A/W dialog procedures vs A/W dialog window. */
+ ret = DialogBoxParamW(GetModuleHandleA(NULL), nameW, 0, test_aw_conversion_dlgproc, 0);
+ ok(ret == -123, "Unexpected ret value %ld.\n", ret);
+
+ ret = DialogBoxParamA(GetModuleHandleA(NULL), "TEST_EMPTY_DIALOG", 0, test_aw_conversion_dlgproc2, 0);
+ ok(ret == -123, "Unexpected ret value %ld.\n", ret);
}
static void test_DisabledDialogTest(void)
@@ -1580,7 +1774,7 @@ START_TEST(dialog)
test_focus();
test_GetDlgItem();
test_GetDlgItemText();
- test_DialogBoxParamA();
+ test_DialogBoxParam();
test_DisabledDialogTest();
test_MessageBoxFontTest();
test_SaveRestoreFocus();
--
2.15.1
Dec. 28, 2017
[PATCH] comctl32/tests: Test some return values (Coverity)
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/comctl32/tests/imagelist.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/comctl32/tests/imagelist.c b/dlls/comctl32/tests/imagelist.c
index e0251a9601..d72e22a6b3 100644
--- a/dlls/comctl32/tests/imagelist.c
+++ b/dlls/comctl32/tests/imagelist.c
@@ -836,8 +836,11 @@ static const IStreamVtbl Test_Stream_Vtbl =
static void init_memstream(struct memstream *stream)
{
+ HRESULT hr;
+
stream->IStream_iface.lpVtbl = &Test_Stream_Vtbl;
- CreateStreamOnHGlobal(NULL, TRUE, &stream->stream);
+ hr = CreateStreamOnHGlobal(NULL, TRUE, &stream->stream);
+ ok(hr == S_OK, "Failed to create a stream, hr %#x.\n", hr);
}
static void cleanup_memstream(struct memstream *stream)
@@ -995,7 +998,8 @@ static void check_iml_data(HIMAGELIST himl, INT cx, INT cy, INT cur, INT max, IN
hr = GetHGlobalFromStream(stream.stream, &hglobal);
ok(hr == S_OK, "%s: Failed to get hglobal, %#x\n", comment, hr);
- IStream_Stat(stream.stream, &stat, STATFLAG_NONAME);
+ hr = IStream_Stat(stream.stream, &stat, STATFLAG_NONAME);
+ ok(hr == S_OK, "Stat() failed, hr %#x.\n", hr);
data = GlobalLock(hglobal);
--
2.15.1
Dec. 28, 2017