Wine-Devel
Threads by month
- ----- 2026 -----
- 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
- 4 participants
- 84544 discussions
March 18, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/ntdll/tests/env.c | 161 ++++++++++++++++++++++++------------------------
1 file changed, 81 insertions(+), 80 deletions(-)
diff --git a/dlls/ntdll/tests/env.c b/dlls/ntdll/tests/env.c
index 9cfbf9eb435..09a91d35807 100644
--- a/dlls/ntdll/tests/env.c
+++ b/dlls/ntdll/tests/env.c
@@ -17,6 +17,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <stdio.h>
@@ -111,7 +112,7 @@ static void testQuery(void)
pRtlMultiByteToUnicodeN( bn, sizeof(bn), NULL, test->var, strlen(test->var)+1 );
nts = pRtlQueryEnvironmentVariable_U(small_env, &name, &value);
ok( nts == test->status || (test->alt && nts == test->alt),
- "[%d]: Wrong status for '%s', expecting %x got %x\n",
+ "[%d]: Wrong status for '%s', expecting %lx got %lx\n",
i, test->var, test->status, nts );
if (nts == test->status) switch (nts)
{
@@ -144,20 +145,20 @@ static void testQuery(void)
pRtlMultiByteToUnicodeN(bn, sizeof(bn), NULL, test->var, strlen(test->var) + 1);
nts = pRtlQueryEnvironmentVariable(small_env, bn, name_length, bv, value_length, &return_length);
ok(nts == test->status || (test->alt && nts == test->alt),
- "[%d]: Wrong status for '%s', expecting %x got %x\n",
+ "[%d]: Wrong status for '%s', expecting %lx got %lx\n",
i, test->var, test->status, nts);
if (nts == test->status) switch (nts)
{
case STATUS_SUCCESS:
pRtlMultiByteToUnicodeN(bn, sizeof(bn), NULL, test->val, strlen(test->val) + 1);
- ok(return_length == strlen(test->val), "Wrong length %ld for %s\n",
+ ok(return_length == strlen(test->val), "Wrong length %Id for %s\n",
return_length, test->var);
ok(!memcmp(bv, bn, return_length), "Wrong result for %s/%d\n", test->var, test->len);
ok(bv[test->len] == '@', "Writing too far away in the buffer for %s/%d\n", test->var, test->len);
break;
case STATUS_BUFFER_TOO_SMALL:
ok(return_length == (strlen(test->val) + 1),
- "Wrong returned length %ld (too small buffer) for %s\n", return_length, test->var);
+ "Wrong returned length %Id (too small buffer) for %s\n", return_length, test->var);
break;
}
}
@@ -207,20 +208,20 @@ static void testExpand(void)
us_dst.Buffer = NULL;
nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul);
- ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%u)\n", nts);
+ ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%lu)\n", nts);
ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR),
- "Wrong returned length for %s: %u\n", test->src, ul );
+ "Wrong returned length for %s: %lu\n", test->src, ul );
us_dst.Length = 0;
us_dst.MaximumLength = sizeof(dst);
us_dst.Buffer = dst;
nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul);
- ok(nts == STATUS_SUCCESS, "Call failed (%u)\n", nts);
+ ok(nts == STATUS_SUCCESS, "Call failed (%lu)\n", nts);
ok(ul == us_dst.Length + sizeof(WCHAR),
- "Wrong returned length for %s: %u\n", test->src, ul);
+ "Wrong returned length for %s: %lu\n", test->src, ul);
ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR),
- "Wrong returned length for %s: %u\n", test->src, ul);
+ "Wrong returned length for %s: %lu\n", test->src, ul);
ok(lstrcmpW(dst, rst) == 0, "Wrong result for %s: expecting %s\n",
test->src, test->dst);
@@ -229,9 +230,9 @@ static void testExpand(void)
us_dst.Buffer = dst;
dst[8] = '-';
nts = pRtlExpandEnvironmentStrings_U(small_env, &us_src, &us_dst, &ul);
- ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%u)\n", nts);
+ ok(nts == STATUS_BUFFER_TOO_SMALL, "Call failed (%lu)\n", nts);
ok(ul == strlen(test->dst) * sizeof(WCHAR) + sizeof(WCHAR),
- "Wrong returned length for %s (with buffer too small): %u\n", test->src, ul);
+ "Wrong returned length for %s (with buffer too small): %lu\n", test->src, ul);
ok(dst[8] == '-', "Writing too far in buffer (got %c/%d)\n", dst[8], dst[8]);
}
@@ -273,7 +274,7 @@ static UINT_PTR check_string_( int line, RTL_USER_PROCESS_PARAMETERS *params, UN
}
ok_(__FILE__,line)( (UINT_PTR)str->Buffer == align(pos, sizeof(void *)) ||
(!expect && (UINT_PTR)str->Buffer == pos) || /* initial params are not aligned */
- broken( (UINT_PTR)str->Buffer == align(pos, 4) ), "wrong buffer %lx/%lx\n",
+ broken( (UINT_PTR)str->Buffer == align(pos, 4) ), "wrong buffer %Ix/%Ix\n",
(UINT_PTR)str->Buffer, pos );
if (str->Length < str->MaximumLength)
{
@@ -305,39 +306,39 @@ static void test_process_params(void)
MEMORY_BASIC_INFORMATION info;
NTSTATUS status = pRtlCreateProcessParameters( ¶ms, &image, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL );
- ok( !status, "failed %x\n", status );
+ ok( !status, "failed %lx\n", status );
if (VirtualQuery( params, &info, sizeof(info) ) && info.AllocationBase == params)
{
size = info.RegionSize;
ok( broken(TRUE), "not a heap block %p\n", params ); /* winxp */
ok( params->AllocationSize == info.RegionSize,
- "wrong AllocationSize %x/%lx\n", params->AllocationSize, info.RegionSize );
+ "wrong AllocationSize %lx/%Ix\n", params->AllocationSize, info.RegionSize );
}
else
{
size = HeapSize( GetProcessHeap(), 0, params );
ok( size != ~(SIZE_T)0, "not a heap block %p\n", params );
ok( params->AllocationSize == params->Size,
- "wrong AllocationSize %x/%x\n", params->AllocationSize, params->Size );
+ "wrong AllocationSize %lx/%lx\n", params->AllocationSize, params->Size );
}
ok( params->Size < size || broken(params->Size == size), /* <= win2k3 */
- "wrong Size %x/%lx\n", params->Size, size );
- ok( params->Flags == 0, "wrong Flags %u\n", params->Flags );
- ok( params->DebugFlags == 0, "wrong Flags %u\n", params->DebugFlags );
+ "wrong Size %lx/%Ix\n", params->Size, size );
+ ok( params->Flags == 0, "wrong Flags %lu\n", params->Flags );
+ ok( params->DebugFlags == 0, "wrong Flags %lu\n", params->DebugFlags );
ok( params->ConsoleHandle == 0, "wrong ConsoleHandle %p\n", params->ConsoleHandle );
- ok( params->ConsoleFlags == 0, "wrong ConsoleFlags %u\n", params->ConsoleFlags );
+ ok( params->ConsoleFlags == 0, "wrong ConsoleFlags %lu\n", params->ConsoleFlags );
ok( params->hStdInput == 0, "wrong hStdInput %p\n", params->hStdInput );
ok( params->hStdOutput == 0, "wrong hStdOutput %p\n", params->hStdOutput );
ok( params->hStdError == 0, "wrong hStdError %p\n", params->hStdError );
- ok( params->dwX == 0, "wrong dwX %u\n", params->dwX );
- ok( params->dwY == 0, "wrong dwY %u\n", params->dwY );
- ok( params->dwXSize == 0, "wrong dwXSize %u\n", params->dwXSize );
- ok( params->dwYSize == 0, "wrong dwYSize %u\n", params->dwYSize );
- ok( params->dwXCountChars == 0, "wrong dwXCountChars %u\n", params->dwXCountChars );
- ok( params->dwYCountChars == 0, "wrong dwYCountChars %u\n", params->dwYCountChars );
- ok( params->dwFillAttribute == 0, "wrong dwFillAttribute %u\n", params->dwFillAttribute );
- ok( params->dwFlags == 0, "wrong dwFlags %u\n", params->dwFlags );
- ok( params->wShowWindow == 0, "wrong wShowWindow %u\n", params->wShowWindow );
+ ok( params->dwX == 0, "wrong dwX %lu\n", params->dwX );
+ ok( params->dwY == 0, "wrong dwY %lu\n", params->dwY );
+ ok( params->dwXSize == 0, "wrong dwXSize %lu\n", params->dwXSize );
+ ok( params->dwYSize == 0, "wrong dwYSize %lu\n", params->dwYSize );
+ ok( params->dwXCountChars == 0, "wrong dwXCountChars %lu\n", params->dwXCountChars );
+ ok( params->dwYCountChars == 0, "wrong dwYCountChars %lu\n", params->dwYCountChars );
+ ok( params->dwFillAttribute == 0, "wrong dwFillAttribute %lu\n", params->dwFillAttribute );
+ ok( params->dwFlags == 0, "wrong dwFlags %lu\n", params->dwFlags );
+ ok( params->wShowWindow == 0, "wrong wShowWindow %lu\n", params->wShowWindow );
pos = (UINT_PTR)params->CurrentDirectory.DosPath.Buffer;
ok( params->CurrentDirectory.DosPath.MaximumLength == MAX_PATH * sizeof(WCHAR),
@@ -356,18 +357,18 @@ static void test_process_params(void)
pos = check_string( params, ¶ms->RuntimeInfo, &null_str, pos );
pos = align(pos, 4);
ok( pos == params->Size || pos + 4 == params->Size,
- "wrong pos %lx/%x\n", pos, params->Size );
+ "wrong pos %Ix/%lx\n", pos, params->Size );
pos = params->Size;
if ((char *)params->Environment > (char *)params &&
(char *)params->Environment < (char *)params + size)
{
ok( (char *)params->Environment - (char *)params == (UINT_PTR)pos,
- "wrong env %lx/%lx\n", (UINT_PTR)((char *)params->Environment - (char *)params), pos);
+ "wrong env %Ix/%Ix\n", (UINT_PTR)((char *)params->Environment - (char *)params), pos);
pos += get_env_length(params->Environment) * sizeof(WCHAR);
ok( align(pos, sizeof(void *)) == size ||
- broken( align(pos, 4) == size ), "wrong size %lx/%lx\n", pos, size );
+ broken( align(pos, 4) == size ), "wrong size %Ix/%Ix\n", pos, size );
ok( params->EnvironmentSize == size - ((char *)params->Environment - (char *)params),
- "wrong len %lx/%lx\n", params->EnvironmentSize,
+ "wrong len %Ix/%Ix\n", params->EnvironmentSize,
size - ((char *)params->Environment - (char *)params) );
}
else ok( broken(TRUE), "environment not inside block\n" ); /* <= win2k3 */
@@ -375,23 +376,23 @@ static void test_process_params(void)
status = pRtlCreateProcessParameters( ¶ms, &image, &dummy, &dummy, &dummy, dummy_env,
&dummy, &dummy, &dummy, &dummy );
- ok( !status, "failed %x\n", status );
+ ok( !status, "failed %lx\n", status );
if (VirtualQuery( params, &info, sizeof(info) ) && info.AllocationBase == params)
{
size = info.RegionSize;
ok( broken(TRUE), "not a heap block %p\n", params ); /* winxp */
ok( params->AllocationSize == info.RegionSize,
- "wrong AllocationSize %x/%lx\n", params->AllocationSize, info.RegionSize );
+ "wrong AllocationSize %lx/%Ix\n", params->AllocationSize, info.RegionSize );
}
else
{
size = HeapSize( GetProcessHeap(), 0, params );
ok( size != ~(SIZE_T)0, "not a heap block %p\n", params );
ok( params->AllocationSize == params->Size,
- "wrong AllocationSize %x/%x\n", params->AllocationSize, params->Size );
+ "wrong AllocationSize %lx/%lx\n", params->AllocationSize, params->Size );
}
ok( params->Size < size || broken(params->Size == size), /* <= win2k3 */
- "wrong Size %x/%lx\n", params->Size, size );
+ "wrong Size %lx/%Ix\n", params->Size, size );
pos = (UINT_PTR)params->CurrentDirectory.DosPath.Buffer;
if (params->CurrentDirectory.DosPath.Length == dummy_dir.Length + sizeof(WCHAR))
@@ -410,18 +411,18 @@ static void test_process_params(void)
pos = check_string( params, ¶ms->RuntimeInfo, &dummy, pos );
pos = align(pos, 4);
ok( pos == params->Size || pos + 4 == params->Size,
- "wrong pos %lx/%x\n", pos, params->Size );
+ "wrong pos %Ix/%lx\n", pos, params->Size );
pos = params->Size;
if ((char *)params->Environment > (char *)params &&
(char *)params->Environment < (char *)params + size)
{
ok( (char *)params->Environment - (char *)params == pos,
- "wrong env %lx/%lx\n", (UINT_PTR)((char *)params->Environment - (char *)params), pos);
+ "wrong env %Ix/%Ix\n", (UINT_PTR)((char *)params->Environment - (char *)params), pos);
pos += get_env_length(params->Environment) * sizeof(WCHAR);
ok( align(pos, sizeof(void *)) == size ||
- broken( align(pos, 4) == size ), "wrong size %lx/%lx\n", pos, size );
+ broken( align(pos, 4) == size ), "wrong size %Ix/%Ix\n", pos, size );
ok( params->EnvironmentSize == size - ((char *)params->Environment - (char *)params),
- "wrong len %lx/%lx\n", params->EnvironmentSize,
+ "wrong len %Ix/%Ix\n", params->EnvironmentSize,
size - ((char *)params->Environment - (char *)params) );
}
else ok( broken(TRUE), "environment not inside block\n" ); /* <= win2k3 */
@@ -434,15 +435,15 @@ static void test_process_params(void)
{
ok( broken(TRUE), "not a heap block %p\n", cur_params ); /* winxp */
ok( cur_params->AllocationSize == info.RegionSize,
- "wrong AllocationSize %x/%lx\n", cur_params->AllocationSize, info.RegionSize );
+ "wrong AllocationSize %lx/%Ix\n", cur_params->AllocationSize, info.RegionSize );
}
else
{
size = HeapSize( GetProcessHeap(), 0, cur_params );
ok( size != ~(SIZE_T)0, "not a heap block %p\n", cur_params );
ok( cur_params->AllocationSize == cur_params->Size,
- "wrong AllocationSize %x/%x\n", cur_params->AllocationSize, cur_params->Size );
- ok( cur_params->Size == size, "wrong Size %x/%lx\n", cur_params->Size, size );
+ "wrong AllocationSize %lx/%lx\n", cur_params->AllocationSize, cur_params->Size );
+ ok( cur_params->Size == size, "wrong Size %lx/%Ix\n", cur_params->Size, size );
}
/* CurrentDirectory points outside the params, and DllPath may be null */
@@ -475,7 +476,7 @@ static void test_process_params(void)
size = HeapSize( GetProcessHeap(), 0, initial_env );
ok( size != ~(SIZE_T)0, "env is not a heap block %p / %p\n", cur_params, initial_env );
ok( cur_params->EnvironmentSize == size,
- "wrong len %lx/%lx\n", cur_params->EnvironmentSize, size );
+ "wrong len %Ix/%Ix\n", cur_params->EnvironmentSize, size );
}
}
@@ -493,13 +494,13 @@ static void check_env_var_(int line, const char *var, const char *value)
DWORD size = GetEnvironmentVariableA(var, buffer, sizeof(buffer));
if (value)
{
- ok_(__FILE__, line)(size == strlen(value), "wrong size %u\n", size);
+ ok_(__FILE__, line)(size == strlen(value), "wrong size %lu\n", size);
ok_(__FILE__, line)(!strcmp(buffer, value), "wrong value %s\n", debugstr_a(buffer));
}
else
{
- ok_(__FILE__, line)(!size, "wrong size %u\n", size);
- ok_(__FILE__, line)(GetLastError() == ERROR_ENVVAR_NOT_FOUND, "got error %u\n", GetLastError());
+ ok_(__FILE__, line)(!size, "wrong size %lu\n", size);
+ ok_(__FILE__, line)(GetLastError() == ERROR_ENVVAR_NOT_FOUND, "got error %lu\n", GetLastError());
}
}
#define check_env_var(a, b) check_env_var_(__LINE__, a, b)
@@ -512,31 +513,31 @@ static void test_RtlSetCurrentEnvironment(void)
SIZE_T size;
status = RtlCreateEnvironment(FALSE, &env);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
ret = SetEnvironmentVariableA("testenv1", "heis");
- ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
ret = SetEnvironmentVariableA("testenv2", "dyo");
- ok(ret, "got error %u\n", GetLastError());
+ ok(ret, "got error %lu\n", GetLastError());
status = set_env_var(&env, L"testenv1", L"unus");
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
status = set_env_var(&env, L"testenv3", L"tres");
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
old_env = NtCurrentTeb()->Peb->ProcessParameters->Environment;
ok(NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == get_env_length(old_env) * sizeof(WCHAR),
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
ok(NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == HeapSize( GetProcessHeap(), 0, old_env ),
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
RtlSetCurrentEnvironment(env, &prev);
ok(prev == old_env, "got wrong previous env %p\n", prev);
ok(NtCurrentTeb()->Peb->ProcessParameters->Environment == env, "got wrong current env\n");
ok(NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == get_env_length(env) * sizeof(WCHAR),
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
ok(NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == HeapSize( GetProcessHeap(), 0, env ),
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
check_env_var("testenv1", "unus");
check_env_var("testenv2", NULL);
@@ -546,14 +547,14 @@ static void test_RtlSetCurrentEnvironment(void)
env = HeapReAlloc( GetProcessHeap(), 0, env, HeapSize( GetProcessHeap(), 0, env) + 120 );
RtlSetCurrentEnvironment(env, &prev);
ok(NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == HeapSize( GetProcessHeap(), 0, env ),
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
RtlSetCurrentEnvironment(old_env, NULL);
ok(NtCurrentTeb()->Peb->ProcessParameters->Environment == old_env, "got wrong current env\n");
ok(NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == get_env_length(old_env) * sizeof(WCHAR),
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
ok(NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == HeapSize( GetProcessHeap(), 0, old_env ),
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize);
check_env_var("testenv1", "heis");
check_env_var("testenv2", "dyo");
@@ -562,19 +563,19 @@ static void test_RtlSetCurrentEnvironment(void)
env = NtCurrentTeb()->Peb->ProcessParameters->Environment;
size = get_env_length(env) * sizeof(WCHAR);
ok( NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == size,
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize );
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize );
ok( size == HeapSize( GetProcessHeap(), 0, env ),
- "got wrong size %lu / %lu\n", size, HeapSize( GetProcessHeap(), 0, env ));
+ "got wrong size %Iu / %Iu\n", size, HeapSize( GetProcessHeap(), 0, env ));
SetEnvironmentVariableA("testenv1", NULL);
SetEnvironmentVariableA("testenv2", NULL);
env = NtCurrentTeb()->Peb->ProcessParameters->Environment;
ok( NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize == size,
- "got wrong size %lu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize );
+ "got wrong size %Iu\n", NtCurrentTeb()->Peb->ProcessParameters->EnvironmentSize );
ok( size == HeapSize( GetProcessHeap(), 0, env ),
- "got wrong size %lu / %lu\n", size, HeapSize( GetProcessHeap(), 0, env ));
- ok( size > get_env_length(env) * sizeof(WCHAR), "got wrong size %lu\n", size );
+ "got wrong size %Iu / %Iu\n", size, HeapSize( GetProcessHeap(), 0, env ));
+ ok( size > get_env_length(env) * sizeof(WCHAR), "got wrong size %Iu\n", size );
}
static void query_env_var_(int line, WCHAR *env, const WCHAR *var, const WCHAR *value)
@@ -590,13 +591,13 @@ static void query_env_var_(int line, WCHAR *env, const WCHAR *var, const WCHAR *
status = RtlQueryEnvironmentVariable_U(env, &var_string, &value_string);
if (value)
{
- ok_(__FILE__, line)(!status, "got %#x\n", status);
+ ok_(__FILE__, line)(!status, "got %#lx\n", status);
ok_(__FILE__, line)(value_string.Length/sizeof(WCHAR) == wcslen(value),
- "wrong size %u\n", value_string.Length/sizeof(WCHAR));
+ "wrong size %Iu\n", value_string.Length/sizeof(WCHAR));
ok_(__FILE__, line)(!wcscmp(value_string.Buffer, value), "wrong value %s\n", debugstr_w(value_string.Buffer));
}
else
- ok_(__FILE__, line)(status == STATUS_VARIABLE_NOT_FOUND, "got %#x\n", status);
+ ok_(__FILE__, line)(status == STATUS_VARIABLE_NOT_FOUND, "got %#lx\n", status);
}
#define query_env_var(a, b, c) query_env_var_(__LINE__, a, b, c)
@@ -606,52 +607,52 @@ static void test_RtlSetEnvironmentVariable(void)
WCHAR *env;
status = RtlCreateEnvironment(FALSE, &env);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
status = set_env_var(&env, L"cat", L"dog");
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"cat", L"dog");
status = set_env_var(&env, L"cat", L"horse");
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"cat", L"horse");
status = set_env_var(&env, L"cat", NULL);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"cat", NULL);
status = set_env_var(&env, L"cat", NULL);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
status = set_env_var(&env, L"foo", L"meouw");
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"foo", L"meouw");
status = set_env_var(&env, L"fOo", NULL);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"foo", NULL);
status = set_env_var(&env, L"horse", NULL);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"horse", NULL);
status = set_env_var(&env, L"me=too", L"also");
- ok(status == STATUS_INVALID_PARAMETER, "got %#x\n", status);
+ ok(status == STATUS_INVALID_PARAMETER, "got %#lx\n", status);
status = set_env_var(&env, L"me", L"too=also");
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"me", L"too=also");
status = set_env_var(&env, L"=too", L"also");
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"=too", L"also");
status = set_env_var(&env, L"=", L"also");
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
query_env_var(env, L"=", L"also");
status = RtlDestroyEnvironment(env);
- ok(!status, "got %#x\n", status);
+ ok(!status, "got %#lx\n", status);
}
START_TEST(env)
1
0
[PATCH] dlls/ntdll/tests/directory.c: enable compilation with long types
by Eric Pouech March 18, 2022
by Eric Pouech March 18, 2022
March 18, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/ntdll/tests/directory.c | 239 +++++++++++++++++++++---------------------
1 file changed, 120 insertions(+), 119 deletions(-)
diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c
index 8a8047c6392..77b17a50037 100644
--- a/dlls/ntdll/tests/directory.c
+++ b/dlls/ntdll/tests/directory.c
@@ -23,6 +23,7 @@
* We use function pointers here as there is no import library for NTDLL on
* windows.
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <stdio.h>
#include <stdarg.h>
@@ -89,7 +90,7 @@ static void set_up_attribute_test(const WCHAR *testdir)
BOOL ret;
ret = CreateDirectoryW(testdir, NULL);
- ok(ret, "couldn't create dir %s, error %d\n", wine_dbgstr_w(testdir), GetLastError());
+ ok(ret, "couldn't create dir %s, error %ld\n", wine_dbgstr_w(testdir), GetLastError());
for (i=0; i < test_dir_count; i++) {
WCHAR buf[MAX_PATH];
@@ -101,7 +102,7 @@ static void set_up_attribute_test(const WCHAR *testdir)
lstrcatW( buf, testfiles[i].name );
if (testfiles[i].attr & FILE_ATTRIBUTE_DIRECTORY) {
ret = CreateDirectoryW(buf, NULL);
- ok(ret, "couldn't create dir %s, error %d\n", wine_dbgstr_w(buf), GetLastError());
+ ok(ret, "couldn't create dir %s, error %ld\n", wine_dbgstr_w(buf), GetLastError());
} else {
HANDLE h = CreateFileW(buf,
GENERIC_READ|GENERIC_WRITE,
@@ -137,11 +138,11 @@ static void tear_down_attribute_test(const WCHAR *testdir)
if (testfiles[i].attr & FILE_ATTRIBUTE_DIRECTORY) {
ret = RemoveDirectoryW(buf);
ok(ret || (GetLastError() == ERROR_PATH_NOT_FOUND),
- "Failed to rmdir %s, error %d\n", wine_dbgstr_w(buf), GetLastError());
+ "Failed to rmdir %s, error %ld\n", wine_dbgstr_w(buf), GetLastError());
} else {
ret = DeleteFileW(buf);
ok(ret || (GetLastError() == ERROR_PATH_NOT_FOUND),
- "Failed to rm %s, error %d\n", wine_dbgstr_w(buf), GetLastError());
+ "Failed to rm %s, error %ld\n", wine_dbgstr_w(buf), GetLastError());
}
}
RemoveDirectoryW(testdir);
@@ -163,7 +164,7 @@ static void tally_test_file(FILE_BOTH_DIRECTORY_INFORMATION *dir_info)
continue;
if (!testfiles[i].attr_done) {
todo_wine_if (testfiles[i].todo)
- ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%x), got %x (is your linux new enough?)\n", wine_dbgstr_w(testfiles[i].name), testfiles[i].description, testfiles[i].attr, attrib);
+ ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%lx), got %lx (is your linux new enough?)\n", wine_dbgstr_w(testfiles[i].name), testfiles[i].description, testfiles[i].attr, attrib);
testfiles[i].attr_done = TRUE;
}
testfiles[i].nfound++;
@@ -195,7 +196,7 @@ static void test_flags_NtQueryDirectoryFile(OBJECT_ATTRIBUTES *attr, const char
/* Read the directory and note which files are found */
status = pNtOpenFile( &dirh, SYNCHRONIZE | FILE_LIST_DIRECTORY, attr, &io, FILE_SHARE_READ,
FILE_SYNCHRONOUS_IO_NONALERT|FILE_OPEN_FOR_BACKUP_INTENT|FILE_DIRECTORY_FILE);
- ok (status == STATUS_SUCCESS, "failed to open dir '%s', ret 0x%x, error %d\n", testdirA, status, GetLastError());
+ ok (status == STATUS_SUCCESS, "failed to open dir '%s', ret 0x%lx, error %ld\n", testdirA, status, GetLastError());
if (status != STATUS_SUCCESS) {
skip("can't test if we can't open the directory\n");
return;
@@ -204,8 +205,8 @@ static void test_flags_NtQueryDirectoryFile(OBJECT_ATTRIBUTES *attr, const char
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( dirh, NULL, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, single_entry, mask, restart_flag );
- ok (status == STATUS_SUCCESS, "failed to query directory; status %x\n", status);
- ok (U(io).Status == STATUS_SUCCESS, "failed to query directory; status %x\n", U(io).Status);
+ ok (status == STATUS_SUCCESS, "failed to query directory; status %lx\n", status);
+ ok (U(io).Status == STATUS_SUCCESS, "failed to query directory; status %lx\n", U(io).Status);
data_len = io.Information;
ok (data_len >= sizeof(FILE_BOTH_DIRECTORY_INFORMATION), "not enough data in directory\n");
@@ -224,9 +225,9 @@ static void test_flags_NtQueryDirectoryFile(OBJECT_ATTRIBUTES *attr, const char
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( new_dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, single_entry, &dummy_mask, FALSE );
- ok (U(io).Status == status, "wrong status %x / %x\n", status, U(io).Status);
+ ok (U(io).Status == status, "wrong status %lx / %lx\n", status, U(io).Status);
if (status == STATUS_NO_MORE_FILES) break;
- ok (status == STATUS_SUCCESS, "failed to query directory; status %x\n", status);
+ ok (status == STATUS_SUCCESS, "failed to query directory; status %lx\n", status);
data_len = io.Information;
if (data_len < sizeof(FILE_BOTH_DIRECTORY_INFORMATION))
break;
@@ -278,8 +279,8 @@ static void test_directory_sort( const WCHAR *testdir )
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( handle, NULL, NULL, NULL, &io, data, sizeof(data),
FileBothDirectoryInformation, FALSE, NULL, TRUE );
- ok( status == STATUS_SUCCESS, "failed to query directory; status %x\n", status );
- ok( U(io).Status == STATUS_SUCCESS, "failed to query directory; status %x\n", U(io).Status );
+ ok( status == STATUS_SUCCESS, "failed to query directory; status %lx\n", status );
+ ok( U(io).Status == STATUS_SUCCESS, "failed to query directory; status %lx\n", U(io).Status );
data_len = io.Information;
ok( data_len >= sizeof(FILE_BOTH_DIRECTORY_INFORMATION), "not enough data in directory\n" );
data_pos = 0;
@@ -316,9 +317,9 @@ static void test_directory_sort( const WCHAR *testdir )
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( handle, 0, NULL, NULL, &io, data, sizeof(data),
FileBothDirectoryInformation, FALSE, NULL, FALSE );
- ok (U(io).Status == status, "wrong status %x / %x\n", status, U(io).Status);
+ ok (U(io).Status == status, "wrong status %lx / %lx\n", status, U(io).Status);
if (status == STATUS_NO_MORE_FILES) break;
- ok( status == STATUS_SUCCESS, "failed to query directory; status %x\n", status );
+ ok( status == STATUS_SUCCESS, "failed to query directory; status %lx\n", status );
data_len = io.Information;
data_pos = 0;
}
@@ -346,9 +347,9 @@ static void test_NtQueryDirectoryFile_classes( HANDLE handle, UNICODE_STRING *ma
status = pNtQueryDirectoryFile( handle, 0, NULL, NULL, &io, data, data_size,
class, FALSE, mask, TRUE );
- ok( U(io).Status == 0xdeadbeef, "%u: wrong status %x\n", class, U(io).Status );
- ok( U(io).Information == 0xdeadbeef, "%u: wrong info %lx\n", class, U(io).Information );
- ok(data[0] == 0x55555555, "%u: wrong offset %x\n", class, data[0] );
+ ok( U(io).Status == 0xdeadbeef, "%u: wrong status %lx\n", class, U(io).Status );
+ ok( U(io).Information == 0xdeadbeef, "%u: wrong info %Ix\n", class, U(io).Information );
+ ok(data[0] == 0x55555555, "%u: wrong offset %lx\n", class, data[0] );
switch (class)
{
@@ -366,11 +367,11 @@ static void test_NtQueryDirectoryFile_classes( HANDLE handle, UNICODE_STRING *ma
case FileObjectIdInformation:
case FileQuotaInformation:
case FileReparsePointInformation:
- ok( status == STATUS_INFO_LENGTH_MISMATCH, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_INFO_LENGTH_MISMATCH, "%u: wrong status %lx\n", class, status );
break;
default:
ok( status == STATUS_INVALID_INFO_CLASS || status == STATUS_NOT_IMPLEMENTED,
- "%u: wrong status %x\n", class, status );
+ "%u: wrong status %lx\n", class, status );
continue;
}
@@ -380,16 +381,16 @@ static void test_NtQueryDirectoryFile_classes( HANDLE handle, UNICODE_STRING *ma
class, FALSE, mask, TRUE );
if (status == STATUS_BUFFER_OVERFLOW)
{
- ok( U(io).Status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %x\n", class, U(io).Status );
+ ok( U(io).Status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, U(io).Status );
ok( U(io).Information == data_size || broken(!U(io).Information), /* win10 1709 */
- "%u: wrong info %lx\n", class, U(io).Information );
- if (U(io).Information) ok(data[0] == 0, "%u: wrong offset %x\n", class, data[0] );
+ "%u: wrong info %Ix\n", class, U(io).Information );
+ if (U(io).Information) ok(data[0] == 0, "%u: wrong offset %lx\n", class, data[0] );
}
else
{
- ok( U(io).Status == 0xdeadbeef, "%u: wrong status %x\n", class, U(io).Status );
- ok( U(io).Information == 0xdeadbeef, "%u: wrong info %lx\n", class, U(io).Information );
- ok(data[0] == 0x55555555, "%u: wrong offset %x\n", class, data[0] );
+ ok( U(io).Status == 0xdeadbeef, "%u: wrong status %lx\n", class, U(io).Status );
+ ok( U(io).Information == 0xdeadbeef, "%u: wrong info %Ix\n", class, U(io).Information );
+ ok(data[0] == 0x55555555, "%u: wrong offset %lx\n", class, data[0] );
}
if (status != STATUS_INFO_LENGTH_MISMATCH) break;
}
@@ -397,50 +398,50 @@ static void test_NtQueryDirectoryFile_classes( HANDLE handle, UNICODE_STRING *ma
switch (class)
{
case FileDirectoryInformation:
- ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, status );
ok( data_size == ((offsetof( FILE_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7),
"%u: wrong size %u\n", class, data_size );
break;
case FileFullDirectoryInformation:
- ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, status );
ok( data_size == ((offsetof( FILE_FULL_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7),
"%u: wrong size %u\n", class, data_size );
break;
case FileBothDirectoryInformation:
- ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, status );
ok( data_size == ((offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7),
"%u: wrong size %u\n", class, data_size );
break;
case FileNamesInformation:
- ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, status );
ok( data_size == ((offsetof( FILE_NAMES_INFORMATION, FileName[1] ) + 7) & ~7),
"%u: wrong size %u\n", class, data_size );
break;
case FileIdBothDirectoryInformation:
- ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, status );
ok( data_size == ((offsetof( FILE_ID_BOTH_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7),
"%u: wrong size %u\n", class, data_size );
break;
case FileIdFullDirectoryInformation:
- ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, status );
ok( data_size == ((offsetof( FILE_ID_FULL_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7),
"%u: wrong size %u\n", class, data_size );
break;
case FileIdGlobalTxDirectoryInformation:
- ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "%u: wrong status %lx\n", class, status );
ok( data_size == ((offsetof( FILE_ID_GLOBAL_TX_DIR_INFORMATION, FileName[1] ) + 7) & ~7),
"%u: wrong size %u\n", class, data_size );
break;
case FileObjectIdInformation:
- ok( status == STATUS_INVALID_INFO_CLASS, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_INVALID_INFO_CLASS, "%u: wrong status %lx\n", class, status );
ok( data_size == sizeof(FILE_OBJECTID_INFORMATION), "%u: wrong size %u\n", class, data_size );
break;
case FileQuotaInformation:
- ok( status == STATUS_INVALID_INFO_CLASS, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_INVALID_INFO_CLASS, "%u: wrong status %lx\n", class, status );
ok( data_size == sizeof(FILE_QUOTA_INFORMATION), "%u: wrong size %u\n", class, data_size );
break;
case FileReparsePointInformation:
- ok( status == STATUS_INVALID_INFO_CLASS, "%u: wrong status %x\n", class, status );
+ ok( status == STATUS_INVALID_INFO_CLASS, "%u: wrong status %lx\n", class, status );
ok( data_size == sizeof(FILE_REPARSE_POINT_INFORMATION), "%u: wrong size %u\n", class, data_size );
break;
}
@@ -504,16 +505,16 @@ static void test_NtQueryDirectoryFile(void)
return;
}
status = pNtQueryInformationFile( dirh, &io, &pos_info, sizeof(pos_info), FilePositionInformation );
- ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %lx\n", status );
ok( pos_info.CurrentByteOffset.QuadPart == 0, "wrong pos %s\n",
wine_dbgstr_longlong(pos_info.CurrentByteOffset.QuadPart));
pos_info.CurrentByteOffset.QuadPart = 0xbeef;
status = pNtSetInformationFile( dirh, &io, &pos_info, sizeof(pos_info), FilePositionInformation );
- ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %lx\n", status );
status = pNtQueryInformationFile( dirh, &io, &pos_info, sizeof(pos_info), FilePositionInformation );
- ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %lx\n", status );
ok( pos_info.CurrentByteOffset.QuadPart == 0xbeef, "wrong pos %s\n",
wine_dbgstr_longlong(pos_info.CurrentByteOffset.QuadPart));
@@ -523,12 +524,12 @@ static void test_NtQueryDirectoryFile(void)
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, FALSE);
- ok(status == STATUS_SUCCESS, "failed to query directory; status %x\n", status);
- ok(U(io).Status == STATUS_SUCCESS, "failed to query directory; status %x\n", U(io).Status);
+ ok(status == STATUS_SUCCESS, "failed to query directory; status %lx\n", status);
+ ok(U(io).Status == STATUS_SUCCESS, "failed to query directory; status %lx\n", U(io).Status);
ok(fbdi->ShortName[0], "ShortName is empty\n");
status = pNtQueryInformationFile( dirh, &io, &pos_info, sizeof(pos_info), FilePositionInformation );
- ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %lx\n", status );
ok( pos_info.CurrentByteOffset.QuadPart == 0xbeef, "wrong pos %s\n",
wine_dbgstr_longlong(pos_info.CurrentByteOffset.QuadPart) );
@@ -539,17 +540,17 @@ static void test_NtQueryDirectoryFile(void)
U(io).Information = 0xdeadbeef;
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, TRUE);
- ok(status == STATUS_SUCCESS, "failed to query directory status %x\n", status);
- ok(U(io).Status == STATUS_SUCCESS, "failed to query directory status %x\n", U(io).Status);
+ ok(status == STATUS_SUCCESS, "failed to query directory status %lx\n", status);
+ ok(U(io).Status == STATUS_SUCCESS, "failed to query directory status %lx\n", U(io).Status);
ok(U(io).Information == offsetof(FILE_BOTH_DIRECTORY_INFORMATION, FileName[lstrlenW(testfiles[0].name)]),
- "wrong info %lx\n", U(io).Information);
+ "wrong info %Ix\n", U(io).Information);
ok(fbdi->FileNameLength == lstrlenW(testfiles[0].name)*sizeof(WCHAR) &&
!memcmp(fbdi->FileName, testfiles[0].name, fbdi->FileNameLength),
"incorrect long file name: %s\n", wine_dbgstr_wn(fbdi->FileName,
fbdi->FileNameLength/sizeof(WCHAR)));
status = pNtQueryInformationFile( dirh, &io, &pos_info, sizeof(pos_info), FilePositionInformation );
- ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %x\n", status );
+ ok( status == STATUS_SUCCESS, "NtQueryInformationFile failed %lx\n", status );
ok( pos_info.CurrentByteOffset.QuadPart == 0xbeef, "wrong pos %s\n",
wine_dbgstr_longlong(pos_info.CurrentByteOffset.QuadPart) );
@@ -560,16 +561,16 @@ static void test_NtQueryDirectoryFile(void)
data_size = offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] );
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, TRUE);
- ok( status == STATUS_BUFFER_OVERFLOW, "wrong status %x\n", status );
- ok( U(io).Status == STATUS_BUFFER_OVERFLOW, "wrong status %x\n", U(io).Status );
+ ok( status == STATUS_BUFFER_OVERFLOW, "wrong status %lx\n", status );
+ ok( U(io).Status == STATUS_BUFFER_OVERFLOW, "wrong status %lx\n", U(io).Status );
ok( U(io).Information == data_size || broken( U(io).Information == 0),
- "wrong info %lx\n", U(io).Information );
+ "wrong info %Ix\n", U(io).Information );
ok( fbdi->NextEntryOffset == 0 || fbdi->NextEntryOffset == 0x55555555, /* win10 >= 1709 */
- "wrong offset %x\n", fbdi->NextEntryOffset );
+ "wrong offset %lx\n", fbdi->NextEntryOffset );
if (!fbdi->NextEntryOffset)
{
ok( fbdi->FileNameLength == lstrlenW(testfiles[0].name) * sizeof(WCHAR),
- "wrong length %x\n", fbdi->FileNameLength );
+ "wrong length %lx\n", fbdi->FileNameLength );
ok( filename[0] == testfiles[0].name[0], "incorrect long file name: %s\n",
wine_dbgstr_wn(fbdi->FileName, fbdi->FileNameLength/sizeof(WCHAR)));
ok( filename[1] == 0x5555, "incorrect long file name: %s\n",
@@ -584,8 +585,8 @@ static void test_NtQueryDirectoryFile(void)
data_size = offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[256] );
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, TRUE);
- ok( status == STATUS_SUCCESS || status == STATUS_NO_MORE_FILES, "wrong status %x\n", status );
- ok( U(io).Status == status, "wrong status %x / %x\n", U(io).Status, status );
+ ok( status == STATUS_SUCCESS || status == STATUS_NO_MORE_FILES, "wrong status %lx\n", status );
+ ok( U(io).Status == status, "wrong status %lx / %lx\n", U(io).Status, status );
if (!status)
ok( fbdi->FileNameLength == lstrlenW(testfiles[0].name)*sizeof(WCHAR) &&
!memcmp(fbdi->FileName, testfiles[0].name, fbdi->FileNameLength),
@@ -604,18 +605,18 @@ static void test_NtQueryDirectoryFile(void)
U(io).Information = 0xdeadbeef;
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, FALSE, NULL, TRUE);
- ok(status == STATUS_SUCCESS, "wrong status %x\n", status);
- ok(U(io).Status == STATUS_SUCCESS, "wrong status %x\n", U(io).Status);
- ok(U(io).Information > 0 && U(io).Information < data_size, "wrong info %lx\n", U(io).Information);
+ ok(status == STATUS_SUCCESS, "wrong status %lx\n", status);
+ ok(U(io).Status == STATUS_SUCCESS, "wrong status %lx\n", U(io).Status);
+ ok(U(io).Information > 0 && U(io).Information < data_size, "wrong info %Ix\n", U(io).Information);
ok( fbdi->NextEntryOffset == ((offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7),
- "wrong offset %x\n", fbdi->NextEntryOffset );
- ok( fbdi->FileNameLength == sizeof(WCHAR), "wrong length %x\n", fbdi->FileNameLength );
+ "wrong offset %lx\n", fbdi->NextEntryOffset );
+ ok( fbdi->FileNameLength == sizeof(WCHAR), "wrong length %lx\n", fbdi->FileNameLength );
ok( fbdi->FileName[0] == '.', "incorrect long file name: %s\n",
wine_dbgstr_wn(fbdi->FileName, fbdi->FileNameLength/sizeof(WCHAR)));
next = (FILE_BOTH_DIRECTORY_INFORMATION *)(data + fbdi->NextEntryOffset);
ok( next->NextEntryOffset == ((offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[2] ) + 7) & ~7),
- "wrong offset %x\n", next->NextEntryOffset );
- ok( next->FileNameLength == 2 * sizeof(WCHAR), "wrong length %x\n", next->FileNameLength );
+ "wrong offset %lx\n", next->NextEntryOffset );
+ ok( next->FileNameLength == 2 * sizeof(WCHAR), "wrong length %lx\n", next->FileNameLength );
filename = next->FileName;
ok( filename[0] == '.' && filename[1] == '.', "incorrect long file name: %s\n",
wine_dbgstr_wn(next->FileName, next->FileNameLength/sizeof(WCHAR)));
@@ -626,16 +627,16 @@ static void test_NtQueryDirectoryFile(void)
U(io).Information = 0xdeadbeef;
status = pNtQueryDirectoryFile( dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, FALSE, NULL, TRUE );
- ok( status == STATUS_SUCCESS, "wrong status %x\n", status );
- ok( U(io).Status == STATUS_SUCCESS, "wrong status %x\n", U(io).Status );
+ ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
+ ok( U(io).Status == STATUS_SUCCESS, "wrong status %lx\n", U(io).Status );
ok( U(io).Information == offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ),
- "wrong info %lx\n", U(io).Information );
- ok( fbdi->NextEntryOffset == 0, "wrong offset %x\n", fbdi->NextEntryOffset );
- ok( fbdi->FileNameLength == sizeof(WCHAR), "wrong length %x\n", fbdi->FileNameLength );
+ "wrong info %Ix\n", U(io).Information );
+ ok( fbdi->NextEntryOffset == 0, "wrong offset %lx\n", fbdi->NextEntryOffset );
+ ok( fbdi->FileNameLength == sizeof(WCHAR), "wrong length %lx\n", fbdi->FileNameLength );
ok( fbdi->FileName[0] == '.', "incorrect long file name: %s\n",
wine_dbgstr_wn(fbdi->FileName, fbdi->FileNameLength/sizeof(WCHAR)));
next = (FILE_BOTH_DIRECTORY_INFORMATION *)&fbdi->FileName[1];
- ok( next->NextEntryOffset == 0x55555555, "wrong offset %x\n", next->NextEntryOffset );
+ ok( next->NextEntryOffset == 0x55555555, "wrong offset %lx\n", next->NextEntryOffset );
data_size = fbdi->NextEntryOffset + offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[2] );
memset( data, 0x55, data_size );
@@ -643,11 +644,11 @@ static void test_NtQueryDirectoryFile(void)
U(io).Information = 0xdeadbeef;
status = pNtQueryDirectoryFile( dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, FALSE, NULL, TRUE );
- ok( status == STATUS_SUCCESS, "wrong status %x\n", status );
- ok( U(io).Status == STATUS_SUCCESS, "wrong status %x\n", U(io).Status );
+ ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
+ ok( U(io).Status == STATUS_SUCCESS, "wrong status %lx\n", U(io).Status );
ok( U(io).Information == offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ),
- "wrong info %lx\n", U(io).Information );
- ok( fbdi->NextEntryOffset == 0, "wrong offset %x\n", fbdi->NextEntryOffset );
+ "wrong info %Ix\n", U(io).Information );
+ ok( fbdi->NextEntryOffset == 0, "wrong offset %lx\n", fbdi->NextEntryOffset );
data_size = ((offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7) +
offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[2] );
@@ -656,18 +657,18 @@ static void test_NtQueryDirectoryFile(void)
U(io).Information = 0xdeadbeef;
status = pNtQueryDirectoryFile( dirh, 0, NULL, NULL, &io, data, (data_size + 7) & ~7,
FileBothDirectoryInformation, FALSE, NULL, TRUE );
- ok( status == STATUS_SUCCESS, "wrong status %x\n", status );
- ok( U(io).Status == STATUS_SUCCESS, "wrong status %x\n", U(io).Status );
+ ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
+ ok( U(io).Status == STATUS_SUCCESS, "wrong status %lx\n", U(io).Status );
ok( U(io).Information == data_size || U(io).Information == ((data_size + 7) & ~7),
- "wrong info %lx / %x\n", U(io).Information, data_size );
+ "wrong info %Ix / %x\n", U(io).Information, data_size );
ok( fbdi->NextEntryOffset == ((offsetof( FILE_BOTH_DIRECTORY_INFORMATION, FileName[1] ) + 7) & ~7),
- "wrong offset %x\n", fbdi->NextEntryOffset );
- ok( fbdi->FileNameLength == sizeof(WCHAR), "wrong length %x\n", fbdi->FileNameLength );
+ "wrong offset %lx\n", fbdi->NextEntryOffset );
+ ok( fbdi->FileNameLength == sizeof(WCHAR), "wrong length %lx\n", fbdi->FileNameLength );
ok( fbdi->FileName[0] == '.', "incorrect long file name: %s\n",
wine_dbgstr_wn(fbdi->FileName, fbdi->FileNameLength/sizeof(WCHAR)));
next = (FILE_BOTH_DIRECTORY_INFORMATION *)(data + fbdi->NextEntryOffset);
- ok( next->NextEntryOffset == 0, "wrong offset %x\n", next->NextEntryOffset );
- ok( next->FileNameLength == 2 * sizeof(WCHAR), "wrong length %x\n", next->FileNameLength );
+ ok( next->NextEntryOffset == 0, "wrong offset %lx\n", next->NextEntryOffset );
+ ok( next->FileNameLength == 2 * sizeof(WCHAR), "wrong length %lx\n", next->FileNameLength );
filename = next->FileName;
ok( filename[0] == '.' && filename[1] == '.', "incorrect long file name: %s\n",
wine_dbgstr_wn(next->FileName, next->FileNameLength/sizeof(WCHAR)));
@@ -679,18 +680,18 @@ static void test_NtQueryDirectoryFile(void)
U(io).Information = 0xdeadbeef;
status = pNtQueryDirectoryFile( dirh, 0, NULL, NULL, &io, data, data_size,
FileNamesInformation, FALSE, NULL, TRUE );
- ok( status == STATUS_SUCCESS, "wrong status %x\n", status );
- ok( U(io).Status == STATUS_SUCCESS, "wrong status %x\n", U(io).Status );
- ok( U(io).Information == data_size, "wrong info %lx / %x\n", U(io).Information, data_size );
+ ok( status == STATUS_SUCCESS, "wrong status %lx\n", status );
+ ok( U(io).Status == STATUS_SUCCESS, "wrong status %lx\n", U(io).Status );
+ ok( U(io).Information == data_size, "wrong info %Ix / %x\n", U(io).Information, data_size );
names = (FILE_NAMES_INFORMATION *)data;
ok( names->NextEntryOffset == ((offsetof( FILE_NAMES_INFORMATION, FileName[1] ) + 7) & ~7),
- "wrong offset %x\n", names->NextEntryOffset );
- ok( names->FileNameLength == sizeof(WCHAR), "wrong length %x\n", names->FileNameLength );
+ "wrong offset %lx\n", names->NextEntryOffset );
+ ok( names->FileNameLength == sizeof(WCHAR), "wrong length %lx\n", names->FileNameLength );
ok( names->FileName[0] == '.', "incorrect long file name: %s\n",
wine_dbgstr_wn(names->FileName, names->FileNameLength/sizeof(WCHAR)));
names = (FILE_NAMES_INFORMATION *)(data + names->NextEntryOffset);
- ok( names->NextEntryOffset == 0, "wrong offset %x\n", names->NextEntryOffset );
- ok( names->FileNameLength == 2 * sizeof(WCHAR), "wrong length %x\n", names->FileNameLength );
+ ok( names->NextEntryOffset == 0, "wrong offset %lx\n", names->NextEntryOffset );
+ ok( names->FileNameLength == 2 * sizeof(WCHAR), "wrong length %lx\n", names->FileNameLength );
filename = names->FileName;
ok( filename[0] == '.' && filename[1] == '.', "incorrect long file name: %s\n",
wine_dbgstr_wn(names->FileName, names->FileNameLength/sizeof(WCHAR)));
@@ -707,28 +708,28 @@ static void test_NtQueryDirectoryFile(void)
data_size = sizeof(data);
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, TRUE);
- ok(status == STATUS_NO_SUCH_FILE, "wrong status %x\n", status);
- ok(U(io).Status == 0xdeadbeef, "wrong status %x\n", U(io).Status);
+ ok(status == STATUS_NO_SUCH_FILE, "wrong status %lx\n", status);
+ ok(U(io).Status == 0xdeadbeef, "wrong status %lx\n", U(io).Status);
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, NULL, FALSE);
- ok(status == STATUS_NO_MORE_FILES, "wrong status %x\n", status);
- ok(U(io).Status == STATUS_NO_MORE_FILES, "wrong status %x\n", U(io).Status);
+ ok(status == STATUS_NO_MORE_FILES, "wrong status %lx\n", status);
+ ok(U(io).Status == STATUS_NO_MORE_FILES, "wrong status %lx\n", U(io).Status);
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile(dirh, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, NULL, TRUE);
- ok(status == STATUS_NO_MORE_FILES, "wrong status %x\n", status);
- ok(U(io).Status == STATUS_NO_MORE_FILES, "wrong status %x\n", U(io).Status);
+ ok(status == STATUS_NO_MORE_FILES, "wrong status %lx\n", status);
+ ok(U(io).Status == STATUS_NO_MORE_FILES, "wrong status %lx\n", U(io).Status);
pNtClose(dirh);
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( (HANDLE)0xbeef, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, NULL, TRUE );
- ok(status == STATUS_INVALID_HANDLE, "wrong status %x\n", status);
- ok(U(io).Status == 0xdeadbeef, "wrong status %x\n", U(io).Status);
+ ok(status == STATUS_INVALID_HANDLE, "wrong status %lx\n", status);
+ ok(U(io).Status == 0xdeadbeef, "wrong status %lx\n", U(io).Status);
GetModuleFileNameA( 0, buffer, sizeof(buffer) );
h = CreateFileA( buffer, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, 0 );
@@ -737,8 +738,8 @@ static void test_NtQueryDirectoryFile(void)
U(io).Status = 0xdeadbeef;
status = pNtQueryDirectoryFile( h, 0, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, NULL, TRUE );
- ok(status == STATUS_INVALID_PARAMETER, "wrong status %x\n", status);
- ok(U(io).Status == 0xdeadbeef, "wrong status %x\n", U(io).Status);
+ ok(status == STATUS_INVALID_PARAMETER, "wrong status %lx\n", status);
+ ok(U(io).Status == 0xdeadbeef, "wrong status %lx\n", U(io).Status);
CloseHandle ( h );
}
@@ -755,7 +756,7 @@ static void set_up_case_test(const char *testdir)
HANDLE h;
ret = CreateDirectoryA(testdir, NULL);
- ok(ret, "couldn't create dir '%s', error %d\n", testdir, GetLastError());
+ ok(ret, "couldn't create dir '%s', error %ld\n", testdir, GetLastError());
sprintf(buf, "%s\\%s", testdir, "TesT");
h = CreateFileA(buf, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
@@ -772,7 +773,7 @@ static void tear_down_case_test(const char *testdir)
sprintf(buf, "%s\\%s", testdir, "TesT");
ret = DeleteFileA(buf);
ok(ret || (GetLastError() == ERROR_PATH_NOT_FOUND),
- "Failed to rm %s, error %d\n", buf, GetLastError());
+ "Failed to rm %s, error %ld\n", buf, GetLastError());
RemoveDirectoryA(testdir);
}
@@ -814,7 +815,7 @@ static void test_NtQueryDirectoryFile_case(void)
status = pNtOpenFile(&dirh, SYNCHRONIZE | FILE_LIST_DIRECTORY, &attr, &io, FILE_SHARE_READ,
FILE_SYNCHRONOUS_IO_NONALERT | FILE_OPEN_FOR_BACKUP_INTENT | FILE_DIRECTORY_FILE);
- ok (status == STATUS_SUCCESS, "failed to open dir '%s', ret 0x%x, error %d\n", testdir, status, GetLastError());
+ ok (status == STATUS_SUCCESS, "failed to open dir '%s', ret 0x%lx, error %ld\n", testdir, status, GetLastError());
if (status != STATUS_SUCCESS)
{
skip("can't test if we can't open the directory\n");
@@ -825,14 +826,14 @@ static void test_NtQueryDirectoryFile_case(void)
mask.Length = mask.MaximumLength = sizeof(testmask);
pNtQueryDirectoryFile(dirh, NULL, NULL, NULL, &io, data, data_size,
FileBothDirectoryInformation, TRUE, &mask, FALSE);
- ok(U(io).Status == STATUS_SUCCESS, "failed to query directory; status %x\n", U(io).Status);
+ ok(U(io).Status == STATUS_SUCCESS, "failed to query directory; status %lx\n", U(io).Status);
data_len = io.Information;
ok(data_len >= sizeof(FILE_BOTH_DIRECTORY_INFORMATION), "not enough data in directory\n");
name = dir_info->FileName;
name_len = dir_info->FileNameLength / sizeof(WCHAR);
- ok(name_len == testfile_len, "unexpected filename length %u\n", name_len);
+ ok(name_len == testfile_len, "unexpected filename length %lu\n", name_len);
ok(!memcmp(name, testfile_w, testfile_len * sizeof(WCHAR)), "unexpected filename %s\n",
wine_dbgstr_wn(name, name_len));
@@ -894,7 +895,7 @@ static void test_redirection(void)
skip( "Wow64 redirection not supported\n" );
return;
}
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
#ifndef _WIN64
if (NtCurrentTeb()->GdiBatchCount)
@@ -902,46 +903,46 @@ static void test_redirection(void)
#endif
status = pRtlWow64EnableFsRedirectionEx( FALSE, &cur );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
- ok( !cur, "RtlWow64EnableFsRedirectionEx got %u\n", cur );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
+ ok( !cur, "RtlWow64EnableFsRedirectionEx got %lu\n", cur );
if (tls64) ok( *tls64 == FALSE, "wrong tls %s\n", wine_dbgstr_longlong(*tls64) );
status = pRtlWow64EnableFsRedirectionEx( TRUE, &cur );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
status = pRtlWow64EnableFsRedirectionEx( TRUE, &cur );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
- ok( cur == 1, "RtlWow64EnableFsRedirectionEx got %u\n", cur );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
+ ok( cur == 1, "RtlWow64EnableFsRedirectionEx got %lu\n", cur );
if (tls64) ok( *tls64 == TRUE, "wrong tls %s\n", wine_dbgstr_longlong(*tls64) );
status = pRtlWow64EnableFsRedirection( TRUE );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
status = pRtlWow64EnableFsRedirectionEx( TRUE, &cur );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
- ok( !cur, "RtlWow64EnableFsRedirectionEx got %u\n", cur );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
+ ok( !cur, "RtlWow64EnableFsRedirectionEx got %lu\n", cur );
if (tls64) ok( *tls64 == TRUE, "wrong tls %s\n", wine_dbgstr_longlong(*tls64) );
status = pRtlWow64EnableFsRedirectionEx( 123, &cur );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
- ok( cur == TRUE, "RtlWow64EnableFsRedirectionEx got %u\n", cur );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
+ ok( cur == TRUE, "RtlWow64EnableFsRedirectionEx got %lu\n", cur );
if (tls64) ok( *tls64 == 123, "wrong tls %s\n", wine_dbgstr_longlong(*tls64) );
status = pRtlWow64EnableFsRedirectionEx( 0xdeadbeef, &cur );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
- ok( cur == 123, "RtlWow64EnableFsRedirectionEx got %u\n", cur );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
+ ok( cur == 123, "RtlWow64EnableFsRedirectionEx got %lu\n", cur );
if (tls64) ok( *tls64 == 0xdeadbeef, "wrong tls %s\n", wine_dbgstr_longlong(*tls64) );
status = pRtlWow64EnableFsRedirectionEx( TRUE, NULL );
- ok( status == STATUS_ACCESS_VIOLATION, "RtlWow64EnableFsRedirectionEx failed with status %x\n", status );
+ ok( status == STATUS_ACCESS_VIOLATION, "RtlWow64EnableFsRedirectionEx failed with status %lx\n", status );
status = pRtlWow64EnableFsRedirectionEx( TRUE, (void*)1 );
- ok( status == STATUS_ACCESS_VIOLATION, "RtlWow64EnableFsRedirectionEx failed with status %x\n", status );
+ ok( status == STATUS_ACCESS_VIOLATION, "RtlWow64EnableFsRedirectionEx failed with status %lx\n", status );
status = pRtlWow64EnableFsRedirectionEx( TRUE, (void*)0xDEADBEEF );
- ok( status == STATUS_ACCESS_VIOLATION, "RtlWow64EnableFsRedirectionEx failed with status %x\n", status );
+ ok( status == STATUS_ACCESS_VIOLATION, "RtlWow64EnableFsRedirectionEx failed with status %lx\n", status );
status = pRtlWow64EnableFsRedirection( FALSE );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
status = pRtlWow64EnableFsRedirectionEx( FALSE, &cur );
- ok( !status, "RtlWow64EnableFsRedirectionEx failed status %x\n", status );
- ok( cur == 1, "RtlWow64EnableFsRedirectionEx got %u\n", cur );
+ ok( !status, "RtlWow64EnableFsRedirectionEx failed status %lx\n", status );
+ ok( cur == 1, "RtlWow64EnableFsRedirectionEx got %lu\n", cur );
if (tls64) ok( *tls64 == FALSE, "wrong tls %s\n", wine_dbgstr_longlong(*tls64) );
if (tls64)
@@ -993,13 +994,13 @@ static void test_redirection(void)
pRtlWow64EnableFsRedirection( FALSE );
status = get_file_id( &info, tests[i].root, tests[i].name );
ok( !status || status == tests[i].expect || (tests[i].alt && status == tests[i].alt),
- "%u: got %x / %x for %s + %s without redirect\n", i, status, tests[i].expect,
+ "%u: got %lx / %lx for %s + %s without redirect\n", i, status, tests[i].expect,
debugstr_w( tests[i].root ), debugstr_w( tests[i].name ));
if (status) memset( &info, 0xcc, sizeof(info) );
pRtlWow64EnableFsRedirection( TRUE );
status = get_file_id( &info_redir, tests[i].root, tests[i].name );
ok( status == tests[i].expect || (tests[i].alt && status == tests[i].alt),
- "%u: got %x / %x for %s + %s\n", i, status, tests[i].expect,
+ "%u: got %lx / %lx for %s + %s\n", i, status, tests[i].expect,
debugstr_w( tests[i].root ), debugstr_w( tests[i].name ));
if (!status)
{
1
0
March 18, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/ntdll/tests/change.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/ntdll/tests/change.c b/dlls/ntdll/tests/change.c
index e7201b52a3c..89e319bccd7 100644
--- a/dlls/ntdll/tests/change.c
+++ b/dlls/ntdll/tests/change.c
@@ -17,6 +17,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <ntstatus.h>
#define WIN32_NO_STATUS
@@ -301,9 +302,9 @@ static void test_ntncdf_async(void)
CloseHandle(hdir);
- ok(U(iosb).Status == STATUS_CANCELLED, "status wrong %x\n",U(iosb).Status);
- ok(U(iosb2).Status == STATUS_CANCELLED, "status wrong %x\n",U(iosb2).Status);
- ok(U(iosb3).Status == STATUS_SUCCESS, "status wrong %x\n",U(iosb3).Status);
+ ok(U(iosb).Status == STATUS_CANCELLED, "status wrong %lx\n",U(iosb).Status);
+ ok(U(iosb2).Status == STATUS_CANCELLED, "status wrong %lx\n",U(iosb2).Status);
+ ok(U(iosb3).Status == STATUS_SUCCESS, "status wrong %lx\n",U(iosb3).Status);
ok(iosb.Information == 0, "info wrong\n");
ok(iosb2.Information == 0, "info wrong\n");
@@ -312,8 +313,8 @@ static void test_ntncdf_async(void)
U(iosb3).Status = 0x111111;
iosb3.Information = 0x222222;
r = pNtCancelIoFile(hdir, &iosb3);
- ok( r == STATUS_INVALID_HANDLE, "cancel failed %x\n", r);
- ok(U(iosb3).Status == 0x111111, "status wrong %x\n",U(iosb3).Status);
+ ok( r == STATUS_INVALID_HANDLE, "cancel failed %lx\n", r);
+ ok(U(iosb3).Status == 0x111111, "status wrong %lx\n",U(iosb3).Status);
ok(iosb3.Information == 0x222222, "info wrong\n");
r = RemoveDirectoryW( path );
1
0
March 18, 2022
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
---
dlls/ntdll/tests/atom.c | 187 ++++++++++++++++++++++++-----------------------
1 file changed, 94 insertions(+), 93 deletions(-)
diff --git a/dlls/ntdll/tests/atom.c b/dlls/ntdll/tests/atom.c
index 6bb789867bf..f93194d450f 100644
--- a/dlls/ntdll/tests/atom.c
+++ b/dlls/ntdll/tests/atom.c
@@ -20,6 +20,7 @@
* We use function pointers here as there is no import library for NTDLL on
* windows.
*/
+#undef WINE_NO_LONG_TYPES /* temporary for migration */
#include <stdio.h>
#include <stdarg.h>
@@ -100,30 +101,30 @@ static DWORD WINAPI RtlAtomTestThread(LPVOID Table)
WCHAR Name[64];
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &Atom);
- ok(!res, "Unable to find atom from another thread, retval: %x\n", res);
+ ok(!res, "Unable to find atom from another thread, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &Atom);
- ok(!res, "Unable to lookup pinned atom in table, retval: %x\n", res);
+ ok(!res, "Unable to lookup pinned atom in table, retval: %lx\n", res);
res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, Name, &Len);
- ok(res == STATUS_BUFFER_TOO_SMALL, "We got wrong retval: %x\n", res);
+ ok(res == STATUS_BUFFER_TOO_SMALL, "We got wrong retval: %lx\n", res);
Len = 64;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, Name, &Len);
- ok(!res, "Failed with long enough buffer, retval: %x\n", res);
- ok(RefCount == 1, "Refcount was not 1 but %x\n", RefCount);
- ok(PinCount == 1, "Pincount was not 1 but %x\n", PinCount);
+ ok(!res, "Failed with long enough buffer, retval: %lx\n", res);
+ ok(RefCount == 1, "Refcount was not 1 but %lx\n", RefCount);
+ ok(PinCount == 1, "Pincount was not 1 but %lx\n", PinCount);
ok(!lstrcmpW(Name, testAtom2), "We found wrong atom!!\n");
- ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len);
+ ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len);
Len = 64;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom, NULL, NULL, Name, &Len);
- ok(!res, "RtlQueryAtomInAtomTable with optional args invalid failed, retval: %x\n", res);
+ ok(!res, "RtlQueryAtomInAtomTable with optional args invalid failed, retval: %lx\n", res);
ok(!lstrcmpW(Name, testAtom2), "Found Wrong atom!\n");
- ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len);
+ ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len);
res = pRtlPinAtomInAtomTable(AtomTable, Atom);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
return 0;
}
@@ -145,39 +146,39 @@ static void test_NtAtom(void)
if (!res)
{
res = pRtlDestroyAtomTable(AtomTable);
- ok(!res, "We could create the atom table, but we couldn't destroy it! retval: %x\n", res);
+ ok(!res, "We could create the atom table, but we couldn't destroy it! retval: %lx\n", res);
}
AtomTable = NULL;
res = pRtlCreateAtomTable(37, &AtomTable);
- ok(!res, "We're unable to create an atom table with a valid table size retval: %x\n", res);
+ ok(!res, "We're unable to create an atom table with a valid table size retval: %lx\n", res);
if (!res)
{
- ok( *(DWORD *)AtomTable == 0x6d6f7441, "wrong signature %x\n", *(DWORD *)AtomTable );
+ ok( *(DWORD *)AtomTable == 0x6d6f7441, "wrong signature %lx\n", *(DWORD *)AtomTable );
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1);
- ok(!res, "We were unable to add a simple atom to the atom table, retval: %x\n", res);
+ ok(!res, "We were unable to add a simple atom to the atom table, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1Cap, &testAtom);
- ok(!res, "We were unable to find capital version of the atom, retval: %x\n", res);
+ ok(!res, "We were unable to find capital version of the atom, retval: %lx\n", res);
ok(Atom1 == testAtom, "Found wrong atom in table when querying capital atom\n");
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1Low, &testAtom);
- ok(!res, "Unable to find lowercase version of the atom, retval: %x\n", res);
+ ok(!res, "Unable to find lowercase version of the atom, retval: %lx\n", res);
ok(testAtom == Atom1, "Found wrong atom when querying lowercase atom\n");
res = pRtlAddAtomToAtomTable(AtomTable, EmptyAtom, &testEAtom);
- ok(res == STATUS_OBJECT_NAME_INVALID, "Got wrong retval, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_INVALID, "Got wrong retval, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(!res, "Failed to find totally legitimate atom, retval: %x\n", res);
+ ok(!res, "Failed to find totally legitimate atom, retval: %lx\n", res);
ok(testAtom == Atom1, "Found wrong atom!\n");
res = pRtlAddAtomToAtomTable(AtomTable, testAtom2, &Atom2);
- ok(!res, "Unable to add other legitimate atom to table, retval: %x\n", res);
+ ok(!res, "Unable to add other legitimate atom to table, retval: %lx\n", res);
res = pRtlPinAtomInAtomTable(AtomTable, Atom2);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
testThread = CreateThread(NULL, 0, RtlAtomTestThread, &AtomTable, 0, NULL);
WaitForSingleObject(testThread, INFINITE);
@@ -185,28 +186,28 @@ static void test_NtAtom(void)
Len = 64;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, &RefCount, &PinCount, Name, &Len);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
- ok(RefCount == 1, "RefCount is not 1 but %x\n", RefCount);
- ok(PinCount == 1, "PinCount is not 1 but %x\n", PinCount);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
+ ok(RefCount == 1, "RefCount is not 1 but %lx\n", RefCount);
+ ok(PinCount == 1, "PinCount is not 1 but %lx\n", PinCount);
ok(!lstrcmpW(Name, testAtom2), "We found wrong atom\n");
- ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len);
+ ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len);
res = pRtlEmptyAtomTable(AtomTable, FALSE);
- ok(!res, "Unable to empty atom table, retval %x\n", res);
+ ok(!res, "Unable to empty atom table, retval %lx\n", res);
Len = 64;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, &RefCount, &PinCount, Name, &Len);
- ok(!res, "It seems RtlEmptyAtomTable deleted our pinned atom eaven though we asked it not to, retval: %x\n", res);
- ok(RefCount == 1, "RefCount is not 1 but %x\n", RefCount);
- ok(PinCount == 1, "PinCount is not 1 but %x\n", PinCount);
+ ok(!res, "It seems RtlEmptyAtomTable deleted our pinned atom eaven though we asked it not to, retval: %lx\n", res);
+ ok(RefCount == 1, "RefCount is not 1 but %lx\n", RefCount);
+ ok(PinCount == 1, "PinCount is not 1 but %lx\n", PinCount);
ok(!lstrcmpW(Name, testAtom2), "We found wrong atom\n");
- ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %d\n", Len);
+ ok((lstrlenW(testAtom2) * sizeof(WCHAR)) == Len, "Returned wrong length %ld\n", Len);
Len = 8;
Name[0] = Name[1] = Name[2] = Name[3] = Name[4] = 0x1337;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom2, NULL, NULL, Name, &Len);
- ok(!res, "query atom %x\n", res);
- ok(Len == 6, "wrong length %u\n", Len);
+ ok(!res, "query atom %lx\n", res);
+ ok(Len == 6, "wrong length %lu\n", Len);
ok(!memcmp(Name, testAtom2, Len), "wrong atom string\n");
ok(!Name[3], "wrong string termination\n");
ok(Name[4] == 0x1337, "buffer overwrite\n");
@@ -214,75 +215,75 @@ static void test_NtAtom(void)
Len = lstrlenW(testAtom2) * sizeof(WCHAR);
memset(Name, '.', sizeof(Name));
res = pRtlQueryAtomInAtomTable( AtomTable, Atom2, NULL, NULL, Name, &Len );
- ok(!res, "query atom %x\n", res);
- ok(Len == (lstrlenW(testAtom2) - 1) * sizeof(WCHAR), "wrong length %u\n", Len);
+ ok(!res, "query atom %lx\n", res);
+ ok(Len == (lstrlenW(testAtom2) - 1) * sizeof(WCHAR), "wrong length %lu\n", Len);
ok(!memcmp(testAtom2, Name, (lstrlenW(testAtom2) - 1) * sizeof(WCHAR)), "wrong atom name\n");
ok(Name[lstrlenW(testAtom2) - 1] == '\0', "wrong char\n");
ok(Name[lstrlenW(testAtom2)] == ('.' << 8) + '.', "wrong char\n");
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &testAtom);
- ok(!res, "We can't find our pinned atom!! retval: %x\n", res);
+ ok(!res, "We can't find our pinned atom!! retval: %lx\n", res);
ok(testAtom == Atom2, "We found wrong atom!!!\n");
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "We found the atom in our table eaven though we asked RtlEmptyAtomTable to remove it, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "We found the atom in our table eaven though we asked RtlEmptyAtomTable to remove it, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtom3, &Atom3);
- ok(!res, "Unable to add atom to table, retval: %x\n", res);
+ ok(!res, "Unable to add atom to table, retval: %lx\n", res);
res = pRtlEmptyAtomTable(AtomTable, TRUE);
- ok(!res, "Unable to empty atom table, retval: %x\n", res);
+ ok(!res, "Unable to empty atom table, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom2, &testAtom);
- ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "The pinned atom should be removed, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "The pinned atom should be removed, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom3, &testAtom);
- ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Non pinned atom should also be removed, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Non pinned atom should also be removed, retval: %lx\n", res);
res = pRtlDestroyAtomTable(AtomTable);
- ok(!res, "Can't destroy atom table, retval: %x\n", res);
+ ok(!res, "Can't destroy atom table, retval: %lx\n", res);
}
AtomTable = NULL;
res = pRtlCreateAtomTable(37, &AtomTable);
- ok(!res, "Unable to create atom table, retval: %x\n", res);
+ ok(!res, "Unable to create atom table, retval: %lx\n", res);
if (!res)
{
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Didn't get expected retval with querying an empty atom table, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Didn't get expected retval with querying an empty atom table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1);
- ok(!res, "Unable to add atom to atom table, retval %x\n", res);
+ ok(!res, "Unable to add atom to atom table, retval %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(!res, "Can't find previously added atom in table, retval: %x\n", res);
- ok(testAtom == Atom1, "Found wrong atom! retval: %x\n", res);
+ ok(!res, "Can't find previously added atom in table, retval: %lx\n", res);
+ ok(testAtom == Atom1, "Found wrong atom! retval: %lx\n", res);
res = pRtlDeleteAtomFromAtomTable(AtomTable, Atom1);
- ok(!res, "Unable to delete atom from table, retval: %x\n", res);
+ ok(!res, "Unable to delete atom from table, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Able to find previously deleted atom in table, retval: %x\n", res);
+ ok(res == STATUS_OBJECT_NAME_NOT_FOUND, "Able to find previously deleted atom in table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom1);
- ok(!res, "Unable to add atom to atom table, retval: %x\n", res);
+ ok(!res, "Unable to add atom to atom table, retval: %lx\n", res);
Len = 0;
res = pRtlQueryAtomInAtomTable(AtomTable, Atom1, NULL, NULL, Name, &Len);
- ok(res == STATUS_BUFFER_TOO_SMALL, "Got wrong retval, retval: %x\n", res);
- ok((lstrlenW(testAtom1) * sizeof(WCHAR)) == Len || broken(!Len) /* nt4 */, "Got wrong length %x\n", Len);
+ ok(res == STATUS_BUFFER_TOO_SMALL, "Got wrong retval, retval: %lx\n", res);
+ ok((lstrlenW(testAtom1) * sizeof(WCHAR)) == Len || broken(!Len) /* nt4 */, "Got wrong length %lx\n", Len);
if (!Len) pNtAddAtomNT4 = (void *)pNtAddAtom;
res = pRtlPinAtomInAtomTable(AtomTable, Atom1);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
- ok(!res, "Unable to find atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to find atom in atom table, retval: %lx\n", res);
ok(testAtom == Atom1, "Wrong atom found\n");
res = pRtlDeleteAtomFromAtomTable(AtomTable, Atom1);
- ok(res == STATUS_WAS_LOCKED, "Unable to delete atom from table, retval: %x\n", res);
+ ok(res == STATUS_WAS_LOCKED, "Unable to delete atom from table, retval: %lx\n", res);
res = pRtlLookupAtomInAtomTable(AtomTable, testAtom1, &testAtom);
ok(!res, "Able to find deleted atom in table\n");
@@ -305,82 +306,82 @@ static void test_NtIntAtom(void)
AtomTable = NULL;
res = pRtlCreateAtomTable(37, &AtomTable);
- ok(!res, "Unable to create atom table, %x\n", res);
+ ok(!res, "Unable to create atom table, %lx\n", res);
if (!res)
{
/* According to the kernel32 functions, integer atoms are only allowed from
* 0x0001 to 0xbfff and not 0xc000 to 0xffff, which is correct */
res = pRtlAddAtomToAtomTable(AtomTable, NULL, &testAtom);
- ok(res == STATUS_INVALID_PARAMETER, "Didn't get expected result from adding 0 int atom, retval: %x\n", res);
+ ok(res == STATUS_INVALID_PARAMETER, "Didn't get expected result from adding 0 int atom, retval: %lx\n", res);
for (i = 1; i <= 0xbfff; i++)
{
res = pRtlAddAtomToAtomTable(AtomTable, (LPWSTR)i, &testAtom);
- ok(!res, "Unable to add valid integer atom %li, retval: %x\n", i, res);
+ ok(!res, "Unable to add valid integer atom %Ii, retval: %lx\n", i, res);
}
for (i = 1; i <= 0xbfff; i++)
{
res = pRtlLookupAtomInAtomTable(AtomTable, (LPWSTR)i, &testAtom);
- ok(!res, "Unable to find int atom %li, retval: %x\n", i, res);
+ ok(!res, "Unable to find int atom %Ii, retval: %lx\n", i, res);
if (!res)
{
res = pRtlPinAtomInAtomTable(AtomTable, testAtom);
- ok(!res, "Unable to pin int atom %li, retval: %x\n", i, res);
+ ok(!res, "Unable to pin int atom %Ii, retval: %lx\n", i, res);
}
}
for (i = 0xc000; i <= 0xffff; i++)
{
res = pRtlAddAtomToAtomTable(AtomTable, (LPWSTR)i, &testAtom);
- ok(res, "Able to illeageal integer atom %li, retval: %x\n", i, res);
+ ok(res, "Able to illeageal integer atom %Ii, retval: %lx\n", i, res);
}
res = pRtlDestroyAtomTable(AtomTable);
- ok(!res, "Unable to destroy atom table, retval: %x\n", res);
+ ok(!res, "Unable to destroy atom table, retval: %lx\n", res);
}
AtomTable = NULL;
res = pRtlCreateAtomTable(37, &AtomTable);
- ok(!res, "Unable to create atom table, %x\n", res);
+ ok(!res, "Unable to create atom table, %lx\n", res);
if (!res)
{
res = pRtlLookupAtomInAtomTable(AtomTable, (PWSTR)123, &testAtom);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtomInt, &testAtom);
- ok(!res, "Unable to add int atom to table, retval: %x\n", res);
+ ok(!res, "Unable to add int atom to table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtomIntInv, &testAtom);
- ok(!res, "Unable to add int atom to table, retval: %x\n", res);
+ ok(!res, "Unable to add int atom to table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)123, &testAtom);
- ok(!res, "Unable to add int atom to table, retval: %x\n", res);
+ ok(!res, "Unable to add int atom to table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, (PWSTR)123, &testAtom);
- ok(!res, "Unable to re-add int atom to table, retval: %x\n", res);
+ ok(!res, "Unable to re-add int atom to table, retval: %lx\n", res);
Len = 64;
res = pRtlQueryAtomInAtomTable(AtomTable, testAtom, &RefCount, &PinCount, Name, &Len);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
- ok(PinCount == 1, "Expected pincount 1 but got %x\n", PinCount);
- ok(RefCount == 1, "Expected refcount 1 but got %x\n", RefCount);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
+ ok(PinCount == 1, "Expected pincount 1 but got %lx\n", PinCount);
+ ok(RefCount == 1, "Expected refcount 1 but got %lx\n", RefCount);
ok(!lstrcmpW(testAtomOTT, Name), "Got wrong atom name\n");
- ok((lstrlenW(testAtomOTT) * sizeof(WCHAR)) == Len, "Got wrong len %d\n", Len);
+ ok((lstrlenW(testAtomOTT) * sizeof(WCHAR)) == Len, "Got wrong len %ld\n", Len);
res = pRtlPinAtomInAtomTable(AtomTable, testAtom);
- ok(!res, "Unable to pin int atom, retval: %x\n", res);
+ ok(!res, "Unable to pin int atom, retval: %lx\n", res);
res = pRtlPinAtomInAtomTable(AtomTable, testAtom);
- ok(!res, "Unable to pin int atom, retval: %x\n", res);
+ ok(!res, "Unable to pin int atom, retval: %lx\n", res);
res = pRtlQueryAtomInAtomTable(AtomTable, testAtom, &RefCount, &PinCount, NULL, NULL);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
- ok(PinCount == 1, "Expected pincount 1 but got %x\n", PinCount);
- ok(RefCount == 1, "Expected refcount 1 but got %x\n", RefCount);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
+ ok(PinCount == 1, "Expected pincount 1 but got %lx\n", PinCount);
+ ok(RefCount == 1, "Expected refcount 1 but got %lx\n", RefCount);
res = pRtlDestroyAtomTable(AtomTable);
- ok(!res, "Unable to destroy atom table, retval: %x\n", res);
+ ok(!res, "Unable to destroy atom table, retval: %lx\n", res);
}
}
@@ -394,40 +395,40 @@ static void test_NtRefPinAtom(void)
AtomTable = NULL;
res = pRtlCreateAtomTable(37, &AtomTable);
- ok(!res, "Unable to create atom table, %x\n", res);
+ ok(!res, "Unable to create atom table, %lx\n", res);
if (!res)
{
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom);
- ok(!res, "Unable to add our atom to the atom table, retval: %x\n", res);
+ ok(!res, "Unable to add our atom to the atom table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom);
- ok(!res, "Unable to add our atom to the atom table, retval: %x\n", res);
+ ok(!res, "Unable to add our atom to the atom table, retval: %lx\n", res);
res = pRtlAddAtomToAtomTable(AtomTable, testAtom1, &Atom);
- ok(!res, "Unable to add our atom to the atom table, retval: %x\n", res);
+ ok(!res, "Unable to add our atom to the atom table, retval: %lx\n", res);
res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, NULL, NULL);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
- ok(PinCount == 0, "Expected pincount 0 but got %x\n", PinCount);
- ok(RefCount == 3, "Expected refcount 3 but got %x\n", RefCount);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
+ ok(PinCount == 0, "Expected pincount 0 but got %lx\n", PinCount);
+ ok(RefCount == 3, "Expected refcount 3 but got %lx\n", RefCount);
res = pRtlPinAtomInAtomTable(AtomTable, Atom);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
res = pRtlPinAtomInAtomTable(AtomTable, Atom);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
res = pRtlPinAtomInAtomTable(AtomTable, Atom);
- ok(!res, "Unable to pin atom in atom table, retval: %x\n", res);
+ ok(!res, "Unable to pin atom in atom table, retval: %lx\n", res);
res = pRtlQueryAtomInAtomTable(AtomTable, Atom, &RefCount, &PinCount, NULL, NULL);
- ok(!res, "Unable to query atom in atom table, retval: %x\n", res);
- ok(PinCount == 1, "Expected pincount 1 but got %x\n", PinCount);
- ok(RefCount == 3, "Expected refcount 3 but got %x\n", RefCount);
+ ok(!res, "Unable to query atom in atom table, retval: %lx\n", res);
+ ok(PinCount == 1, "Expected pincount 1 but got %lx\n", PinCount);
+ ok(RefCount == 3, "Expected refcount 3 but got %lx\n", RefCount);
res = pRtlDestroyAtomTable(AtomTable);
- ok(!res, "Unable to destroy atom table, retval: %x\n", res);
+ ok(!res, "Unable to destroy atom table, retval: %lx\n", res);
}
}
@@ -444,7 +445,7 @@ static void test_Global(void)
else
res = pNtAddAtom(testAtom1, lstrlenW(testAtom1) * sizeof(WCHAR), &atom);
- ok(!res, "Added atom (%x)\n", res);
+ ok(!res, "Added atom (%lx)\n", res);
memset( ptr, 0xcc, sizeof(ptr) );
res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL );
@@ -456,14 +457,14 @@ static void test_Global(void)
ptr_size = sizeof(ATOM_BASIC_INFORMATION);
res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL );
- ok(res == STATUS_BUFFER_TOO_SMALL, "wrong return status (%x)\n", res);
+ ok(res == STATUS_BUFFER_TOO_SMALL, "wrong return status (%lx)\n", res);
ok(abi->NameLength == lstrlenW(testAtom1) * sizeof(WCHAR) || broken(abi->NameLength == sizeof(WCHAR)), /* nt4 */
"string length %u\n",abi->NameLength);
memset( ptr, 0xcc, sizeof(ptr) );
ptr_size = sizeof(ATOM_BASIC_INFORMATION) + lstrlenW(testAtom1) * sizeof(WCHAR);
res = pNtQueryInformationAtom( atom, AtomBasicInformation, (void*)ptr, ptr_size, NULL );
- ok(!res, "atom lookup %x\n", res);
+ ok(!res, "atom lookup %lx\n", res);
ok(!lstrcmpW(abi->Name, testAtom1), "strings don't match\n");
ok(abi->NameLength == lstrlenW(testAtom1) * sizeof(WCHAR), "wrong string length\n");
ok(abi->Name[lstrlenW(testAtom1)] == 0, "buffer overwrite %x\n", abi->Name[lstrlenW(testAtom1)]);
1
0
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
---
loader/wine.inf.in | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index 0e488d87dcb..3e6194a3929 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -71,6 +71,7 @@ AddReg=\
Services, \
SessionMgr,\
Tapi,\
+ ThemeManager,\
Timezones,\
LicenseInformation
@@ -95,6 +96,7 @@ AddReg=\
Services, \
SessionMgr,\
Tapi,\
+ ThemeManager,\
Timezones,\
VersionInfo,\
LicenseInformation
@@ -121,6 +123,7 @@ AddReg=\
Services, \
SessionMgr,\
Tapi,\
+ ThemeManager,\
Timezones,\
VersionInfo.ntamd64,\
LicenseInformation
@@ -147,6 +150,7 @@ AddReg=\
Services, \
SessionMgr,\
Tapi,\
+ ThemeManager,\
Timezones,\
VersionInfo.ntamd64,\
LicenseInformation
@@ -5494,6 +5498,12 @@ ServiceType=32
StartType=3
ErrorControl=1
+[ThemeManager]
+HKCU,"Software\Microsoft\Windows\CurrentVersion\ThemeManager","ThemeActive",2,"1"
+HKCU,"Software\Microsoft\Windows\CurrentVersion\ThemeManager","DllName",2,"%10%\resources\themes\light\light.msstyles"
+HKCU,"Software\Microsoft\Windows\CurrentVersion\ThemeManager","ColorName",2,"Blue"
+HKCU,"Software\Microsoft\Windows\CurrentVersion\ThemeManager","SizeName",2,"NormalSize"
+
[WinmgmtService]
Description="Provides access to Windows Management Instrumentation"
DisplayName="Windows Management Instrumentation Service"
--
2.32.0
3
4
Re: [PATCH vkd3d v3 2/8] vkd3d-shader/hlsl: Add default writemask for matrix stores.
by Zebediah Figura March 17, 2022
by Zebediah Figura March 17, 2022
March 17, 2022
On 3/7/22 09:09, Francisco Casas wrote:
> Hello,
>
> March 4, 2022 10:01 PM, "Zebediah Figura (she/her)" <zfigura(a)codeweavers.com> wrote:
>
>> On 3/2/22 12:31, Francisco Casas wrote:
>>
>>> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
>>> ---
>>> v3:
>>> - This patch is new.
>>> - While we don't use the default writemask for matrices (yet),
>>> I think it is good for consistency, since we are getting rid
>>> of the type_is_single_reg() function.
>>> Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
>>> ---
>>> libs/vkd3d-shader/hlsl.c | 12 ++++++++----
>>> 1 file changed, 8 insertions(+), 4 deletions(-)
>>> diff --git a/libs/vkd3d-shader/hlsl.c b/libs/vkd3d-shader/hlsl.c
>>> index 00a374b4..5152aec4 100644
>>> --- a/libs/vkd3d-shader/hlsl.c
>>> +++ b/libs/vkd3d-shader/hlsl.c
>>> @@ -527,9 +527,13 @@ struct hlsl_ir_var *hlsl_new_synthetic_var(struct hlsl_ctx *ctx, const char
>>> *nam
>>> return var;
>>> }
>>>> -static bool type_is_single_reg(const struct hlsl_type *type)
>>> +static unsigned int type_default_writemask(const struct hlsl_type *type)
>>> - return type->type == HLSL_CLASS_SCALAR || type->type == HLSL_CLASS_VECTOR;
>>> + if (type->type == HLSL_CLASS_MATRIX && hlsl_type_is_row_major(type))
>>> + return (1 << type->dimy) - 1;
>>
>> I don't understand the logic here. A nonzero writemask should encompass the whole type, which this
>> does not. Why do we need this?
>>
>
> Well, I am not totally sure this patch is actually necessary, I just
> thought it could be a good default behavior since we are getting rid of
> hlsl_is_single_reg(), but maybe I am overthinking...
FWIW, I don't know that that instance of type_is_single_reg()
necessarily needs to go away. Although given 1/8, we could certainly say
that a zero writemask always means the whole variable, and let
hlsl_reg_from_deref() deal with that even for scalar and vector types.
>
> As you know, if we have a HLSL_IR_STORE with a whole matrix in the rhs,
> we have to split it in up to 4 stores, each one with a writemask that
> matches the result of this type_default_writemask() here.
Well, yeah, but we should be using the result type in that case, i.e.
vectors rather than matrices.
>
> The patch from Giovanni that implements this split_matrix_copies()
> pass (which is many patches ahead), makes sure to do it with only vectors
> in the rhs.
>
> But currently, if I am not mistaken (I could be), a HLSL_IR_STORE with a
> matrix in the rhs is producing a single MOV instruction for the first
> register that the matrix uses. Which maybe could be problematic in sm4
> with matrices with major size =1 and minor size <4.
Currently it's not producing anything, actually; we have a FIXME for
that case in write_sm[14]_instructions().
>
> I added this default behavior thinking on those cases (if they could actually
> happen), and maybe because I thought it could be useful in the future if for
> some reason we wanted to implement split_matrix_copies() in other way, by
> directly copying the store instructions.
>
> But well, maybe I'll just do
> ---
> if (!writemask && (type->type == HLSL_CLASS_SCALAR || type->type == HLSL_CLASS_VECTOR))
> writemask = (1 << rhs->data_type->dimx) - 1;
> ---
> or remove the patch altogether in the next version of the batch.
>
>
> Best regards,
> Francisco
2
1
[PATCH vkd3d v3 1/8] vkd3d-shader/hlsl: Allow offsets for scalar and vector variables.
by Francisco Casas March 17, 2022
by Francisco Casas March 17, 2022
March 17, 2022
From: Giovanni Mascellani <gmascellani(a)codeweavers.com>
Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
---
v3:
- In v3, this patch replaces
vkd3d-shader/hlsl: Move type_is_single_reg() to hlsl.h and
rename it to hlsl_type_uses_writemask().
This in order to simplify numeric variable initializations later.
Signed-off-by: Francisco Casas <fcasas(a)codeweavers.com>
---
libs/vkd3d-shader/hlsl.h | 3 +--
libs/vkd3d-shader/hlsl_codegen.c | 22 +++++-----------------
libs/vkd3d-shader/hlsl_sm1.c | 4 ++--
libs/vkd3d-shader/hlsl_sm4.c | 14 +++++++++-----
4 files changed, 17 insertions(+), 26 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h
index 243ed72b..1fd5dc58 100644
--- a/libs/vkd3d-shader/hlsl.h
+++ b/libs/vkd3d-shader/hlsl.h
@@ -793,8 +793,7 @@ unsigned int hlsl_swizzle_from_writemask(unsigned int writemask);
bool hlsl_offset_from_deref(struct hlsl_ctx *ctx, const struct hlsl_deref *deref, unsigned int *offset);
unsigned int hlsl_offset_from_deref_safe(struct hlsl_ctx *ctx, const struct hlsl_deref *deref);
-struct hlsl_reg hlsl_reg_from_deref(struct hlsl_ctx *ctx, const struct hlsl_deref *deref,
- const struct hlsl_type *type);
+struct hlsl_reg hlsl_reg_from_deref(struct hlsl_ctx *ctx, const struct hlsl_deref *deref);
bool hlsl_fold_constants(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, void *context);
diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c
index 837d39e3..d25e0ff5 100644
--- a/libs/vkd3d-shader/hlsl_codegen.c
+++ b/libs/vkd3d-shader/hlsl_codegen.c
@@ -1542,11 +1542,6 @@ static void allocate_objects(struct hlsl_ctx *ctx, enum hlsl_base_type type)
}
}
-static bool type_is_single_reg(const struct hlsl_type *type)
-{
- return type->type == HLSL_CLASS_SCALAR || type->type == HLSL_CLASS_VECTOR;
-}
-
bool hlsl_offset_from_deref(struct hlsl_ctx *ctx, const struct hlsl_deref *deref, unsigned int *offset)
{
struct hlsl_ir_node *offset_node = deref->offset.node;
@@ -1589,8 +1584,7 @@ unsigned int hlsl_offset_from_deref_safe(struct hlsl_ctx *ctx, const struct hlsl
return 0;
}
-struct hlsl_reg hlsl_reg_from_deref(struct hlsl_ctx *ctx, const struct hlsl_deref *deref,
- const struct hlsl_type *type)
+struct hlsl_reg hlsl_reg_from_deref(struct hlsl_ctx *ctx, const struct hlsl_deref *deref)
{
const struct hlsl_ir_var *var = deref->var;
struct hlsl_reg ret = var->reg;
@@ -1598,16 +1592,10 @@ struct hlsl_reg hlsl_reg_from_deref(struct hlsl_ctx *ctx, const struct hlsl_dere
ret.id += offset / 4;
- if (type_is_single_reg(var->data_type))
- {
- assert(!offset);
- ret.writemask = var->reg.writemask;
- }
- else
- {
- assert(type_is_single_reg(type));
- ret.writemask = ((1 << type->dimx) - 1) << (offset % 4);
- }
+ ret.writemask = 0xf & (0xf << (offset % 4));
+ if (var->reg.writemask)
+ ret.writemask = hlsl_combine_writemasks(var->reg.writemask, ret.writemask);
+
return ret;
}
diff --git a/libs/vkd3d-shader/hlsl_sm1.c b/libs/vkd3d-shader/hlsl_sm1.c
index 90ec6058..f661dbc2 100644
--- a/libs/vkd3d-shader/hlsl_sm1.c
+++ b/libs/vkd3d-shader/hlsl_sm1.c
@@ -663,7 +663,7 @@ static void write_sm1_expr(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *b
static void write_sm1_load(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *buffer, const struct hlsl_ir_node *instr)
{
const struct hlsl_ir_load *load = hlsl_ir_load(instr);
- const struct hlsl_reg reg = hlsl_reg_from_deref(ctx, &load->src, instr->data_type);
+ const struct hlsl_reg reg = hlsl_reg_from_deref(ctx, &load->src);
struct sm1_instruction sm1_instr =
{
.opcode = D3DSIO_MOV,
@@ -707,7 +707,7 @@ static void write_sm1_store(struct hlsl_ctx *ctx, struct vkd3d_bytecode_buffer *
{
const struct hlsl_ir_store *store = hlsl_ir_store(instr);
const struct hlsl_ir_node *rhs = store->rhs.node;
- const struct hlsl_reg reg = hlsl_reg_from_deref(ctx, &store->lhs, rhs->data_type);
+ const struct hlsl_reg reg = hlsl_reg_from_deref(ctx, &store->lhs);
struct sm1_instruction sm1_instr =
{
.opcode = D3DSIO_MOV,
diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c
index 6996bb2d..802db3c1 100644
--- a/libs/vkd3d-shader/hlsl_sm4.c
+++ b/libs/vkd3d-shader/hlsl_sm4.c
@@ -870,6 +870,8 @@ static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct sm4_register *r
if (hlsl_sm4_register_from_semantic(ctx, &var->semantic, false, ®->type, swizzle_type, &has_idx))
{
+ unsigned int offset = hlsl_offset_from_deref_safe(ctx, deref);
+
if (has_idx)
{
reg->idx[0] = var->semantic.index;
@@ -877,11 +879,11 @@ static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct sm4_register *r
}
reg->dim = VKD3D_SM4_DIMENSION_VEC4;
- *writemask = (1u << data_type->dimx) - 1;
+ *writemask = ((1u << data_type->dimx) - 1) << (offset % 4);
}
else
{
- struct hlsl_reg hlsl_reg = hlsl_reg_from_deref(ctx, deref, data_type);
+ struct hlsl_reg hlsl_reg = hlsl_reg_from_deref(ctx, deref);
assert(hlsl_reg.allocated);
reg->type = VKD3D_SM4_RT_INPUT;
@@ -899,6 +901,8 @@ static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct sm4_register *r
if (hlsl_sm4_register_from_semantic(ctx, &var->semantic, true, ®->type, swizzle_type, &has_idx))
{
+ unsigned int offset = hlsl_offset_from_deref_safe(ctx, deref);
+
if (has_idx)
{
reg->idx[0] = var->semantic.index;
@@ -909,11 +913,11 @@ static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct sm4_register *r
reg->dim = VKD3D_SM4_DIMENSION_SCALAR;
else
reg->dim = VKD3D_SM4_DIMENSION_VEC4;
- *writemask = (1u << data_type->dimx) - 1;
+ *writemask = ((1u << data_type->dimx) - 1) << (offset % 4);
}
else
{
- struct hlsl_reg hlsl_reg = hlsl_reg_from_deref(ctx, deref, data_type);
+ struct hlsl_reg hlsl_reg = hlsl_reg_from_deref(ctx, deref);
assert(hlsl_reg.allocated);
reg->type = VKD3D_SM4_RT_OUTPUT;
@@ -925,7 +929,7 @@ static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct sm4_register *r
}
else
{
- struct hlsl_reg hlsl_reg = hlsl_reg_from_deref(ctx, deref, data_type);
+ struct hlsl_reg hlsl_reg = hlsl_reg_from_deref(ctx, deref);
assert(hlsl_reg.allocated);
reg->type = VKD3D_SM4_RT_TEMP;
--
2.25.1
3
2
Signed-off-by: Lauri Kenttä <lauri.kentta(a)gmail.com>
---
po/fi.po | 104 ++++++++++++++++++-------------------------------------
1 file changed, 33 insertions(+), 71 deletions(-)
diff --git a/po/fi.po b/po/fi.po
index de3434f4d3d..be14b9b2ebd 100644
--- a/po/fi.po
+++ b/po/fi.po
@@ -5,7 +5,7 @@ msgstr ""
"Project-Id-Version: Wine\n"
"Report-Msgid-Bugs-To: https://bugs.winehq.org\n"
"POT-Creation-Date: N/A\n"
-"PO-Revision-Date: 2020-06-17 12:10+0300\n"
+"PO-Revision-Date: 2022-03-17 20:32+0200\n"
"Last-Translator: Lauri Kenttä <lauri.kentta(a)gmail.com>\n"
"Language-Team: Finnish\n"
"Language: fi\n"
@@ -10519,16 +10519,16 @@ msgstr "(UTC-03:00) Saint-Pierre ja Miquelon"
#: dlls/tzres/tzres.rc:327
msgctxt "maximum 31 characters"
msgid "Sao Tome Standard Time"
-msgstr "Sao Tomen normaaliaika"
+msgstr "São Tomén normaaliaika"
#: dlls/tzres/tzres.rc:328
msgctxt "maximum 31 characters"
msgid "Sao Tome Daylight Time"
-msgstr "Sao Tomen kesäaika"
+msgstr "São Tomén kesäaika"
#: dlls/tzres/tzres.rc:329
msgid "(UTC+00:00) Sao Tome"
-msgstr "(UTC+00:00) Sao Tome"
+msgstr "(UTC+00:00) São Tomé"
#: dlls/tzres/tzres.rc:249
msgctxt "maximum 31 characters"
@@ -10559,18 +10559,14 @@ msgid "(UTC+13:00) Nuku'alofa"
msgstr "(UTC+13:00) Nuku'alofa"
#: dlls/tzres/tzres.rc:240
-#, fuzzy
-#| msgid "Mountain Standard Time (Mexico)"
msgctxt "maximum 31 characters"
msgid "Mountain Standard Time (Mexico)"
-msgstr "Kalliovuorten normaaliaika (Meksiko)"
+msgstr "Kalliovuorten norm.aika (Meks.)"
#: dlls/tzres/tzres.rc:241
-#, fuzzy
-#| msgid "Mountain Daylight Time (Mexico)"
msgctxt "maximum 31 characters"
msgid "Mountain Daylight Time (Mexico)"
-msgstr "Kalliovuorten kesäaika (Meksiko)"
+msgstr "Kalliovuorten kesäaika (Meks.)"
#: dlls/tzres/tzres.rc:242
msgid "(UTC-07:00) Chihuahua, La Paz, Mazatlan"
@@ -10782,11 +10778,9 @@ msgid "(UTC+02:00) Kaliningrad"
msgstr "(UTC+02:00) Kaliningrad"
#: dlls/tzres/tzres.rc:282
-#, fuzzy
-#| msgid "Pacific Standard Time (Mexico)"
msgctxt "maximum 31 characters"
msgid "Pacific Standard Time (Mexico)"
-msgstr "Tyynenmeren normaaliaika (Meksiko)"
+msgstr "Tyynenmeren norm.aika (Meksiko)"
#: dlls/tzres/tzres.rc:283
msgctxt "maximum 31 characters"
@@ -10919,11 +10913,9 @@ msgid "(UTC-01:00) Azores"
msgstr "(UTC-01:00) Azorit"
#: dlls/tzres/tzres.rc:264
-#, fuzzy
-#| msgid "North Asia East Standard Time"
msgctxt "maximum 31 characters"
msgid "North Asia East Standard Time"
-msgstr "Itäisen Pohjois-Aasian normaaliaika"
+msgstr "It. Pohjois-Aasian normaaliaika"
#: dlls/tzres/tzres.rc:265
msgctxt "maximum 31 characters"
@@ -10958,18 +10950,14 @@ msgid "(UTC-03:00) City of Buenos Aires"
msgstr "(UTC-03:00) Buenos Aires"
#: dlls/tzres/tzres.rc:378
-#, fuzzy
-#| msgid "Turks And Caicos Standard Time"
msgctxt "maximum 31 characters"
msgid "Turks And Caicos Standard Time"
-msgstr "Turks- ja Caicossaarten normaaliaika"
+msgstr "Turks ja Caicos, normaaliaika"
#: dlls/tzres/tzres.rc:379
-#, fuzzy
-#| msgid "Turks And Caicos Daylight Time"
msgctxt "maximum 31 characters"
msgid "Turks And Caicos Daylight Time"
-msgstr "Turks- ja Caicossaarten kesäaika"
+msgstr "Turks ja Caicos, kesäaika"
#: dlls/tzres/tzres.rc:380
msgid "(UTC-05:00) Turks and Caicos"
@@ -11209,11 +11197,9 @@ msgid "(UTC+10:00) Canberra, Melbourne, Sydney"
msgstr "(UTC+10:00) Canberra, Melbourne, Sydney"
#: dlls/tzres/tzres.rc:246
-#, fuzzy
-#| msgid "N. Central Asia Standard Time"
msgctxt "maximum 31 characters"
msgid "N. Central Asia Standard Time"
-msgstr "Pohjoisen Keski-Aasian normaaliaika"
+msgstr "Pohj. Keski-Aasian normaaliaika"
#: dlls/tzres/tzres.rc:247
msgctxt "maximum 31 characters"
@@ -11402,11 +11388,9 @@ msgid "(UTC-02:00) Coordinated Universal Time-02"
msgstr "(UTC-02:00) Koordinoitu yleisaika -02"
#: dlls/tzres/tzres.rc:387
-#, fuzzy
-#| msgid "US Mountain Standard Time"
msgctxt "maximum 31 characters"
msgid "US Mountain Standard Time"
-msgstr "Kalliovuorten normaaliaika (USA)"
+msgstr "Kalliovuorten norm.aika (USA)"
#: dlls/tzres/tzres.rc:388
msgctxt "maximum 31 characters"
@@ -11497,16 +11481,14 @@ msgid "(UTC+09:00) Yakutsk"
msgstr "(UTC+09:00) Jakutsk"
#: dlls/tzres/tzres.rc:309
-#, fuzzy
-#| msgid "SA Eastern Standard Time"
msgctxt "maximum 31 characters"
msgid "SA Eastern Standard Time"
-msgstr "Etelä-Amerikan itäinen normaaliaika"
+msgstr "Etelä-Am. itäinen vyöhyke"
#: dlls/tzres/tzres.rc:310
msgctxt "maximum 31 characters"
msgid "SA Eastern Daylight Time"
-msgstr "Etelä-Amerikan itäinen kesäaika"
+msgstr "Etelä-Am. itäinen kesäaika"
#: dlls/tzres/tzres.rc:311
msgid "(UTC-03:00) Cayenne, Fortaleza"
@@ -11552,7 +11534,7 @@ msgstr "Tocantinsin kesäaika"
#: dlls/tzres/tzres.rc:362
msgid "(UTC-03:00) Araguaina"
-msgstr "(UTC-03:00) Araguaina"
+msgstr "(UTC-03:00) AraguaÃna"
#: dlls/tzres/tzres.rc:306
msgctxt "maximum 31 characters"
@@ -11569,11 +11551,9 @@ msgid "(UTC+03:00) Moscow, St. Petersburg"
msgstr "(UTC+03:00) Moskova, Pietari"
#: dlls/tzres/tzres.rc:63
-#, fuzzy
-#| msgid "Aus Central W. Standard Time"
msgctxt "maximum 31 characters"
msgid "Aus Central W. Standard Time"
-msgstr "Australian keskilännen normaaliaika"
+msgstr "Australian keskilännen vyöhyke"
#: dlls/tzres/tzres.rc:64
msgctxt "maximum 31 characters"
@@ -11596,7 +11576,7 @@ msgstr "Romaaninen kesäaika"
#: dlls/tzres/tzres.rc:296
msgid "(UTC+01:00) Brussels, Copenhagen, Madrid, Paris"
-msgstr "(UTC+01:00) Brysseli, Kööpenhamina, Madrid, Pariisi"
+msgstr "(UTC+01:00) Bryssel, Kööpenhamina, Madrid, Pariisi"
#: dlls/tzres/tzres.rc:159
msgctxt "maximum 31 characters"
@@ -11624,12 +11604,12 @@ msgstr "(UTC+12:00) Anadyr, Petropavlovsk-Kamtšatski"
#: dlls/tzres/tzres.rc:435
msgctxt "maximum 31 characters"
msgid "West Bank Standard Time"
-msgstr "Länsirannikon normaaliaika"
+msgstr "Länsirannan ja Gazan norm.ika"
#: dlls/tzres/tzres.rc:436
msgctxt "maximum 31 characters"
msgid "West Bank Daylight Time"
-msgstr "Länsirannikon kesäaika"
+msgstr "Länsirannan ja Gazan kesäaika"
#: dlls/tzres/tzres.rc:437
msgid "(UTC+02:00) Gaza, Hebron"
@@ -11650,11 +11630,9 @@ msgid "(UTC+02:00) Damascus"
msgstr "(UTC+02:00) Damaskos"
#: dlls/tzres/tzres.rc:60
-#, fuzzy
-#| msgid "AUS Central Standard Time"
msgctxt "maximum 31 characters"
msgid "AUS Central Standard Time"
-msgstr "Australian keskinen normaaliaika"
+msgstr "Australian keskinen norm.aika"
#: dlls/tzres/tzres.rc:61
msgctxt "maximum 31 characters"
@@ -11710,12 +11688,12 @@ msgstr "(UTC+11:00) Norfolkinsaari"
#: dlls/tzres/tzres.rc:195
msgctxt "maximum 31 characters"
msgid "Israel Standard Time"
-msgstr "Israelin normaaliaika"
+msgstr "Jerusalemin normaaliaika"
#: dlls/tzres/tzres.rc:196
msgctxt "maximum 31 characters"
msgid "Israel Daylight Time"
-msgstr "Israelin kesäaika"
+msgstr "Jerusalemin kesäaika"
#: dlls/tzres/tzres.rc:197
msgid "(UTC+02:00) Jerusalem"
@@ -11736,18 +11714,14 @@ msgid "(UTC+06:00) Dhaka"
msgstr "(UTC+06:00) Dhaka"
#: dlls/tzres/tzres.rc:312
-#, fuzzy
-#| msgid "SA Pacific Standard Time"
msgctxt "maximum 31 characters"
msgid "SA Pacific Standard Time"
-msgstr "Etelä-Amerikan Tyynenmeren normaaliaika"
+msgstr "Etelä-Am. Tyynenmeren norm.aika"
#: dlls/tzres/tzres.rc:313
-#, fuzzy
-#| msgid "SA Pacific Daylight Time"
msgctxt "maximum 31 characters"
msgid "SA Pacific Daylight Time"
-msgstr "Etelä-Amerikan Tyynenmeren kesäaika"
+msgstr "Etelä-Am. Tyynenmeren kesäaika"
#: dlls/tzres/tzres.rc:314
msgid "(UTC-05:00) Bogota, Lima, Quito, Rio Branco"
@@ -11793,7 +11767,7 @@ msgstr "Paraguayn kesäaika"
#: dlls/tzres/tzres.rc:290
msgid "(UTC-04:00) Asuncion"
-msgstr "(UTC-04:00) Asuncion"
+msgstr "(UTC-04:00) Asunción"
#: dlls/tzres/tzres.rc:132
msgctxt "maximum 31 characters"
@@ -11992,18 +11966,14 @@ msgid "(UTC+03:00) Minsk"
msgstr "(UTC+03:00) Minsk"
#: dlls/tzres/tzres.rc:315
-#, fuzzy
-#| msgid "SA Western Standard Time"
msgctxt "maximum 31 characters"
msgid "SA Western Standard Time"
-msgstr "Etelä-Amerikan läntinen normaaliaika"
+msgstr "Etelä-Am. läntinen normaaliaika"
#: dlls/tzres/tzres.rc:316
-#, fuzzy
-#| msgid "SA Western Daylight Time"
msgctxt "maximum 31 characters"
msgid "SA Western Daylight Time"
-msgstr "Etelä-Amerikan läntinen kesäaika"
+msgstr "Etelä-Am. läntinen kesäaika"
#: dlls/tzres/tzres.rc:317
msgid "(UTC-04:00) Georgetown, La Paz, Manaus, San Juan"
@@ -12173,16 +12143,14 @@ msgid "(UTC+02:00) Helsinki, Kyiv, Riga, Sofia, Tallinn, Vilnius"
msgstr "(UTC+02:00) Helsinki, Kiova, Riika, Sofia, Tallinna, Vilna"
#: dlls/tzres/tzres.rc:144
-#, fuzzy
-#| msgid "E. South America Standard Time"
msgctxt "maximum 31 characters"
msgid "E. South America Standard Time"
-msgstr "Itäisen Etelä-Amerikan normaaliaika"
+msgstr "Itäisen Etelä-Am. vyöhyke"
#: dlls/tzres/tzres.rc:145
msgctxt "maximum 31 characters"
msgid "E. South America Daylight Time"
-msgstr "Itäisen Etelä-Amerikan kesäaika"
+msgstr "Itäisen Etelä-Am. kesäaika"
#: dlls/tzres/tzres.rc:146
msgid "(UTC-03:00) Brasilia"
@@ -12203,11 +12171,9 @@ msgid "(UTC+11:00) Solomon Is., New Caledonia"
msgstr "(UTC+11:00) Salomonsaaret, Uusi-Kaledonia"
#: dlls/tzres/tzres.rc:423
-#, fuzzy
-#| msgid "W. Central Africa Standard Time"
msgctxt "maximum 31 characters"
msgid "W. Central Africa Standard Time"
-msgstr "Läntisen Keski-Afrikan normaaliaika"
+msgstr "Läntis. Keski-Afrikan norm.aika"
#: dlls/tzres/tzres.rc:424
msgctxt "maximum 31 characters"
@@ -12216,21 +12182,17 @@ msgstr "Läntisen Keski-Afrikan kesäaika"
#: dlls/tzres/tzres.rc:425
msgid "(UTC+01:00) West Central Africa"
-msgstr "(UTC+01:00) Länsi-Afrikan aika"
+msgstr "(UTC+01:00) Läntinen Keski-Afrikka"
#: dlls/tzres/tzres.rc:276
-#, fuzzy
-#| msgid "Pacific SA Standard Time"
msgctxt "maximum 31 characters"
msgid "Pacific SA Standard Time"
-msgstr "Tyynenmeren Etelä-Amerikan normaaliaika"
+msgstr "Tyynenmeren Etelä-Am. norm.aika"
#: dlls/tzres/tzres.rc:277
-#, fuzzy
-#| msgid "Pacific SA Daylight Time"
msgctxt "maximum 31 characters"
msgid "Pacific SA Daylight Time"
-msgstr "Tyynenmeren Etelä-Amerikan kesäaika"
+msgstr "Tyynenmeren Etelä-Am. kesäaika"
#: dlls/tzres/tzres.rc:278
msgid "(UTC-04:00) Santiago"
--
2.35.1
1
0
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/winealsa.drv/alsamidi.c | 41 ++++++++++++++++++++++++++++++++++--
dlls/winealsa.drv/midi.c | 36 -------------------------------
dlls/winealsa.drv/unixlib.h | 15 ++-----------
3 files changed, 41 insertions(+), 51 deletions(-)
diff --git a/dlls/winealsa.drv/alsamidi.c b/dlls/winealsa.drv/alsamidi.c
index f3de2a5ce07..b99c3aedd33 100644
--- a/dlls/winealsa.drv/alsamidi.c
+++ b/dlls/winealsa.drv/alsamidi.c
@@ -48,6 +48,17 @@
WINE_DEFAULT_DEBUG_CHANNEL(midi);
+struct midi_dest
+{
+ BOOL bEnabled;
+ MIDIOPENDESC midiDesc;
+ WORD wFlags;
+ MIDIOUTCAPSW caps;
+ snd_seq_t *seq;
+ snd_seq_addr_t addr;
+ int port_out;
+};
+
static pthread_mutex_t seq_mutex = PTHREAD_MUTEX_INITIALIZER;
static unsigned int num_dests, num_srcs;
@@ -353,9 +364,7 @@ NTSTATUS midi_init(void *args)
free( pinfo );
*params->err = NOERROR;
- params->num_dests = num_dests;
params->num_srcs = num_srcs;
- params->dests = dests;
params->srcs = srcs;
TRACE("End\n");
@@ -800,6 +809,31 @@ static UINT midi_out_get_volume(WORD dev_id, UINT* volume)
return (dests[dev_id].caps.dwSupport & MIDICAPS_VOLUME) ? 0 : MMSYSERR_NOTSUPPORTED;
}
+static UINT midi_out_reset(WORD dev_id)
+{
+ unsigned chn;
+
+ TRACE("(%04X);\n", dev_id);
+
+ if (dev_id >= num_dests) return MMSYSERR_BADDEVICEID;
+ if (!dests[dev_id].bEnabled) return MIDIERR_NODEVICE;
+
+ /* stop all notes */
+ /* FIXME: check if 0x78B0 is channel dependent or not. I coded it so that
+ * it's channel dependent...
+ */
+ for (chn = 0; chn < 16; chn++)
+ {
+ /* turn off every note */
+ midi_out_data(dev_id, 0x7800 | MIDI_CMD_CONTROL | chn);
+ /* remove sustain on all channels */
+ midi_out_data(dev_id, (MIDI_CTL_SUSTAIN << 8) | MIDI_CMD_CONTROL | chn);
+ }
+ /* FIXME: the LongData buffers must also be returned to the app */
+ return MMSYSERR_NOERROR;
+}
+
+
NTSTATUS midi_out_message(void *args)
{
struct midi_out_message_params *params = args;
@@ -844,6 +878,9 @@ NTSTATUS midi_out_message(void *args)
case MODM_SETVOLUME:
*params->err = 0;
break;
+ case MODM_RESET:
+ *params->err = midi_out_reset(params->dev_id);
+ break;
default:
TRACE("Unsupported message\n");
*params->err = MMSYSERR_NOTSUPPORTED;
diff --git a/dlls/winealsa.drv/midi.c b/dlls/winealsa.drv/midi.c
index 0ed2feb41eb..53b683f59c8 100644
--- a/dlls/winealsa.drv/midi.c
+++ b/dlls/winealsa.drv/midi.c
@@ -48,10 +48,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(midi);
static WINE_MIDIIN *MidiInDev;
-static WINE_MIDIOUT *MidiOutDev;
-/* this is the total number of MIDI out devices found (synth and port) */
-static int MODM_NumDevs = 0;
/* this is the total number of MIDI out devices found */
static int MIDM_NumDevs = 0;
@@ -605,35 +602,6 @@ static DWORD midStop(WORD wDevID)
return MMSYSERR_NOERROR;
}
-/**************************************************************************
- * modReset [internal]
- */
-static DWORD modReset(WORD wDevID)
-{
- DWORD WINAPI ALSA_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
- DWORD_PTR dwParam1, DWORD_PTR dwParam2);
- unsigned chn;
-
- TRACE("(%04X);\n", wDevID);
-
- if (wDevID >= MODM_NumDevs) return MMSYSERR_BADDEVICEID;
- if (!MidiOutDev[wDevID].bEnabled) return MIDIERR_NODEVICE;
-
- /* stop all notes */
- /* FIXME: check if 0x78B0 is channel dependent or not. I coded it so that
- * it's channel dependent...
- */
- for (chn = 0; chn < 16; chn++) {
- /* turn off every note */
- ALSA_modMessage(wDevID, MODM_DATA, 0, 0x7800 | MIDI_CMD_CONTROL | chn, 0);
- /* remove sustain on all channels */
- ALSA_modMessage(wDevID, MODM_DATA, 0, (MIDI_CTL_SUSTAIN << 8) | MIDI_CMD_CONTROL | chn, 0);
- }
- /* FIXME: the LongData buffers must also be returned to the app */
- return MMSYSERR_NOERROR;
-}
-
-
/*======================================================================*
* MIDI entry points *
*======================================================================*/
@@ -653,9 +621,7 @@ static BOOL ALSA_MidiInit(void)
if (!err)
{
- MODM_NumDevs = params.num_dests;
MIDM_NumDevs = params.num_srcs;
- MidiOutDev = params.dests;
MidiInDev = params.srcs;
}
return TRUE;
@@ -721,8 +687,6 @@ DWORD WINAPI ALSA_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
case DRVM_INIT:
ALSA_MidiInit();
return 0;
- case MODM_RESET:
- return modReset(wDevID);
}
params.dev_id = wDevID;
diff --git a/dlls/winealsa.drv/unixlib.h b/dlls/winealsa.drv/unixlib.h
index e3cd7123101..c1dbd83b84e 100644
--- a/dlls/winealsa.drv/unixlib.h
+++ b/dlls/winealsa.drv/unixlib.h
@@ -223,22 +223,11 @@ typedef struct midi_src
int port_in;
} WINE_MIDIIN;
-typedef struct midi_dest
-{
- BOOL bEnabled;
- MIDIOPENDESC midiDesc;
- WORD wFlags;
- MIDIOUTCAPSW caps;
- snd_seq_t *seq;
- snd_seq_addr_t addr;
- int port_out;
-} WINE_MIDIOUT;
-
struct midi_init_params
{
UINT *err;
- unsigned int num_dests, num_srcs;
- void *dests, *srcs;
+ unsigned int num_srcs;
+ void *srcs;
};
struct notify_context
--
2.25.1
2
1
[PATCH 6/7] winealsa: Move MODM_GETVOLUME and MODM_SETVOLUME to the unixlib.
by Huw Davies March 17, 2022
by Huw Davies March 17, 2022
March 17, 2022
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
---
dlls/winealsa.drv/alsamidi.c | 15 +++++++++++++++
dlls/winealsa.drv/midi.c | 15 ---------------
2 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/dlls/winealsa.drv/alsamidi.c b/dlls/winealsa.drv/alsamidi.c
index fa09626bc80..f3de2a5ce07 100644
--- a/dlls/winealsa.drv/alsamidi.c
+++ b/dlls/winealsa.drv/alsamidi.c
@@ -791,6 +791,15 @@ static UINT midi_out_get_devcaps(WORD dev_id, MIDIOUTCAPSW *caps, UINT size)
return MMSYSERR_NOERROR;
}
+static UINT midi_out_get_volume(WORD dev_id, UINT* volume)
+{
+ if (!volume) return MMSYSERR_INVALPARAM;
+ if (dev_id >= num_dests) return MMSYSERR_BADDEVICEID;
+
+ *volume = 0xFFFFFFFF;
+ return (dests[dev_id].caps.dwSupport & MIDICAPS_VOLUME) ? 0 : MMSYSERR_NOTSUPPORTED;
+}
+
NTSTATUS midi_out_message(void *args)
{
struct midi_out_message_params *params = args;
@@ -829,6 +838,12 @@ NTSTATUS midi_out_message(void *args)
case MODM_GETNUMDEVS:
*params->err = num_dests;
break;
+ case MODM_GETVOLUME:
+ *params->err = midi_out_get_volume(params->dev_id, (UINT *)params->param_1);
+ break;
+ case MODM_SETVOLUME:
+ *params->err = 0;
+ break;
default:
TRACE("Unsupported message\n");
*params->err = MMSYSERR_NOTSUPPORTED;
diff --git a/dlls/winealsa.drv/midi.c b/dlls/winealsa.drv/midi.c
index 4b8062390fa..0ed2feb41eb 100644
--- a/dlls/winealsa.drv/midi.c
+++ b/dlls/winealsa.drv/midi.c
@@ -605,17 +605,6 @@ static DWORD midStop(WORD wDevID)
return MMSYSERR_NOERROR;
}
-/**************************************************************************
- * modGetVolume [internal]
- */
-static DWORD modGetVolume(WORD wDevID, DWORD* lpdwVolume)
-{
- if (!lpdwVolume) return MMSYSERR_INVALPARAM;
- if (wDevID >= MODM_NumDevs) return MMSYSERR_BADDEVICEID;
- *lpdwVolume = 0xFFFFFFFF;
- return (MidiOutDev[wDevID].caps.dwSupport & MIDICAPS_VOLUME) ? 0 : MMSYSERR_NOTSUPPORTED;
-}
-
/**************************************************************************
* modReset [internal]
*/
@@ -732,10 +721,6 @@ DWORD WINAPI ALSA_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
case DRVM_INIT:
ALSA_MidiInit();
return 0;
- case MODM_GETVOLUME:
- return modGetVolume(wDevID, (DWORD*)dwParam1);
- case MODM_SETVOLUME:
- return 0;
case MODM_RESET:
return modReset(wDevID);
}
--
2.25.1
2
1