winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
wine-commits
October 2019
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
614 discussions
Start a n
N
ew thread
Zebediah Figura : qwave: Don't test the last error in the successful case.
by Alexandre Julliard
21 Oct '19
21 Oct '19
Module: wine Branch: master Commit: 5cded9530870fc2c744fb89fdd6e1b1d63ea5e76 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5cded9530870fc2c744fb89f…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Oct 19 14:47:35 2019 -0500 qwave: Don't test the last error in the successful case. On Windows 8 and above we may get ERROR_SERVICE_ALREADY_RUNNING. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qwave/tests/qos.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/dlls/qwave/tests/qos.c b/dlls/qwave/tests/qos.c index 5cb3e53996..10a32f7495 100644 --- a/dlls/qwave/tests/qos.c +++ b/dlls/qwave/tests/qos.c @@ -44,12 +44,10 @@ static void test_QOSCreateHandle(void) ok(ret == FALSE, "Expected FALSE, got %d\n", ret); ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", GetLastError()); - SetLastError(0xdeadbeef); ver.MajorVersion = 1; ver.MinorVersion = 0; ret = QOSCreateHandle(&ver, &h); todo_wine ok(ret == TRUE, "Expected TRUE, got %d\n", ret); - todo_wine ok(GetLastError() == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", GetLastError()); SetLastError(0xdeadbeef); ver.MajorVersion = 1;
1
0
0
0
Zebediah Figura : psapi/tests: Remove an unreliable test.
by Alexandre Julliard
21 Oct '19
21 Oct '19
Module: wine Branch: master Commit: e2206eefdbd459f99fc9886852e52a561c9ee1cc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e2206eefdbd459f99fc98868…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Oct 19 14:39:59 2019 -0500 psapi/tests: Remove an unreliable test. This fails on Windows 10 version 1709 and later. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/psapi/tests/psapi_main.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c index 78aac2c044..b02ceed5ec 100644 --- a/dlls/psapi/tests/psapi_main.c +++ b/dlls/psapi/tests/psapi_main.c @@ -724,7 +724,6 @@ static void test_GetModuleBaseName(void) static void test_ws_functions(void) { PSAPI_WS_WATCH_INFORMATION wswi[4096]; - ULONG_PTR pages[4096]; HANDLE ws_handle; char *addr; unsigned int i; @@ -773,22 +772,6 @@ static void test_ws_functions(void) goto free_page; } - SetLastError(0xdeadbeef); - ret = QueryWorkingSet(hpQI, pages, 4096 * sizeof(ULONG_PTR)); - todo_wine ok(ret == 1, "failed with %d\n", GetLastError()); - if(ret == 1) - { - for(i = 0; i < pages[0]; i++) - if((pages[i+1] & ~0xfffL) == (ULONG_PTR)addr) - { - todo_wine ok(ret == 1, "QueryWorkingSet found our page\n"); - goto test_gwsc; - } - - todo_wine ok(0, "QueryWorkingSet didn't find our page\n"); - } - -test_gwsc: SetLastError(0xdeadbeef); ret = GetWsChanges(hpQI, wswi, sizeof(wswi)); todo_wine ok(ret == 1, "failed with %d\n", GetLastError());
1
0
0
0
Zebediah Figura : psapi/tests: Increase the GetPerformanceInfo() margins again.
by Alexandre Julliard
21 Oct '19
21 Oct '19
Module: wine Branch: master Commit: ccf3dabd7ead21b5b08addb3b2347af23da946b2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ccf3dabd7ead21b5b08addb3…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Sat Oct 19 14:39:58 2019 -0500 psapi/tests: Increase the GetPerformanceInfo() margins again. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/psapi/tests/psapi_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c index d565053722..78aac2c044 100644 --- a/dlls/psapi/tests/psapi_main.c +++ b/dlls/psapi/tests/psapi_main.c @@ -259,7 +259,7 @@ static void test_GetPerformanceInfo(void) ok(ret, "GetPerformanceInfo failed with %d\n", GetLastError()); ok(info.cb == sizeof(PERFORMANCE_INFORMATION), "got %d\n", info.cb); - ok(check_with_margin(info.CommitTotal, sys_performance_info->TotalCommittedPages, 288), + ok(check_with_margin(info.CommitTotal, sys_performance_info->TotalCommittedPages, 2048), "expected approximately %ld but got %d\n", info.CommitTotal, sys_performance_info->TotalCommittedPages); ok(check_with_margin(info.CommitLimit, sys_performance_info->TotalCommitLimit, 32), @@ -268,7 +268,7 @@ static void test_GetPerformanceInfo(void) ok(check_with_margin(info.CommitPeak, sys_performance_info->PeakCommitment, 32), "expected approximately %ld but got %d\n", info.CommitPeak, sys_performance_info->PeakCommitment); - ok(check_with_margin(info.PhysicalAvailable, sys_performance_info->AvailablePages, 512), + ok(check_with_margin(info.PhysicalAvailable, sys_performance_info->AvailablePages, 2048), "expected approximately %ld but got %d\n", info.PhysicalAvailable, sys_performance_info->AvailablePages); /* TODO: info.SystemCache not checked yet - to which field(s) does this value correspond to? */ @@ -322,7 +322,7 @@ static void test_GetPerformanceInfo(void) } HeapFree(GetProcessHeap(), 0, sys_process_info); - ok(check_with_margin(info.HandleCount, handle_count, 256), + ok(check_with_margin(info.HandleCount, handle_count, 512), "expected approximately %d but got %d\n", info.HandleCount, handle_count); ok(check_with_margin(info.ProcessCount, process_count, 4),
1
0
0
0
Sven Baars : mf: Leave instead of enter a critical section.
by Alexandre Julliard
21 Oct '19
21 Oct '19
Module: wine Branch: master Commit: 96062c4c79f431e4e5d268c7190cba169cc325e5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=96062c4c79f431e4e5d268c7…
Author: Sven Baars <sven.wine(a)gmail.com> Date: Sun Oct 20 13:20:31 2019 +0200 mf: Leave instead of enter a critical section. Signed-off-by: Sven Baars <sven.wine(a)gmail.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/samplegrabber.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/mf/samplegrabber.c b/dlls/mf/samplegrabber.c index c3dc2e1b7f..205bc70b1b 100644 --- a/dlls/mf/samplegrabber.c +++ b/dlls/mf/samplegrabber.c @@ -1040,7 +1040,7 @@ static HRESULT WINAPI sample_grabber_sink_Shutdown(IMFMediaSink *iface) IMFStreamSink_Release(&grabber->stream->IMFStreamSink_iface); grabber->stream = NULL; } - EnterCriticalSection(&grabber->cs); + LeaveCriticalSection(&grabber->cs); return hr; }
1
0
0
0
Alexandre Julliard : notepad: Fix parsing of quoted command line.
by Alexandre Julliard
21 Oct '19
21 Oct '19
Module: wine Branch: master Commit: bc968469f224a604ea07ec7e2b93c3808014a959 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bc968469f224a604ea07ec7e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Oct 21 17:11:08 2019 +0200 notepad: Fix parsing of quoted command line. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/notepad/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/programs/notepad/main.c b/programs/notepad/main.c index 37ee7ec18d..fee15ce6a3 100644 --- a/programs/notepad/main.c +++ b/programs/notepad/main.c @@ -629,6 +629,8 @@ static void HandleCommandLine(LPWSTR cmdline) if (*cmdline == delimiter) cmdline++; + while (*cmdline == ' ') cmdline++; + ptr = cmdline; while (*ptr == ' ' || *ptr == '-' || *ptr == '/') {
1
0
0
0
Jeff Smith : kernel32: Quote first command line arg in process paramenters.
by Alexandre Julliard
21 Oct '19
21 Oct '19
Module: wine Branch: master Commit: ceb32f668360ef51b932fa6350858a6b8d2d26ec URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ceb32f668360ef51b932fa63…
Author: Jeff Smith <whydoubt(a)gmail.com> Date: Fri Oct 4 23:18:22 2019 -0500 kernel32: Quote first command line arg in process paramenters. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47790
Signed-off-by: Jeff Smith <whydoubt(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index 693179fa05..5cb470e0c7 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -987,7 +987,7 @@ static BOOL build_command_line( WCHAR **argv ) has_space=FALSE; bcount=0; a=*arg; - if( !*a ) has_space=TRUE; + if( arg == argv || !*a ) has_space=TRUE; while (*a!='\0') { if (*a=='\\') { bcount++; @@ -1024,7 +1024,7 @@ static BOOL build_command_line( WCHAR **argv ) /* Check for quotes and spaces in this argument */ has_space=has_quote=FALSE; a=*arg; - if( !*a ) has_space=TRUE; + if( arg == argv || !*a ) has_space=TRUE; while (*a!='\0') { if (*a==' ' || *a=='\t') { has_space=TRUE;
1
0
0
0
Alexandre Julliard : kernel32: Add the new image path to the dll path for a new process.
by Alexandre Julliard
21 Oct '19
21 Oct '19
Module: wine Branch: master Commit: c258b5ef1100c8c238aab0a17ca743a326829aac URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c258b5ef1100c8c238aab0a1…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sun Oct 20 13:54:05 2019 +0200 kernel32: Add the new image path to the dll path for a new process. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/process.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c index d2682ac83e..693179fa05 100644 --- a/dlls/kernel32/process.c +++ b/dlls/kernel32/process.c @@ -1885,9 +1885,9 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( LPCWSTR filename, LPC const STARTUPINFOW *startup ) { RTL_USER_PROCESS_PARAMETERS *params; - UNICODE_STRING imageW, curdirW, cmdlineW, titleW, desktopW, runtimeW, newdirW; + UNICODE_STRING imageW, dllpathW, curdirW, cmdlineW, titleW, desktopW, runtimeW, newdirW; WCHAR imagepath[MAX_PATH]; - WCHAR *envW = env; + WCHAR *load_path, *dummy, *envW = env; if(!GetLongPathNameW( filename, imagepath, MAX_PATH )) lstrcpynW( imagepath, filename, MAX_PATH ); @@ -1914,20 +1914,24 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( LPCWSTR filename, LPC else cur_dir = NULL; } + LdrGetDllPath( imagepath, LOAD_WITH_ALTERED_SEARCH_PATH, &load_path, &dummy ); RtlInitUnicodeString( &imageW, imagepath ); + RtlInitUnicodeString( &dllpathW, load_path ); RtlInitUnicodeString( &curdirW, cur_dir ); RtlInitUnicodeString( &cmdlineW, cmdline ); RtlInitUnicodeString( &titleW, startup->lpTitle ? startup->lpTitle : imagepath ); RtlInitUnicodeString( &desktopW, startup->lpDesktop ); runtimeW.Buffer = (WCHAR *)startup->lpReserved2; runtimeW.Length = runtimeW.MaximumLength = startup->cbReserved2; - if (RtlCreateProcessParametersEx( ¶ms, &imageW, NULL, cur_dir ? &curdirW : NULL, + if (RtlCreateProcessParametersEx( ¶ms, &imageW, &dllpathW, cur_dir ? &curdirW : NULL, &cmdlineW, envW, &titleW, &desktopW, NULL, &runtimeW, PROCESS_PARAMS_FLAG_NORMALIZED )) { + RtlReleasePath( load_path ); if (envW != env) HeapFree( GetProcessHeap(), 0, envW ); return NULL; } + RtlReleasePath( load_path ); if (flags & CREATE_NEW_PROCESS_GROUP) params->ConsoleFlags = 1; if (flags & CREATE_NEW_CONSOLE) params->ConsoleHandle = KERNEL32_CONSOLE_ALLOC;
1
0
0
0
Alexandre Julliard : kernelbase: Fix variable name aliasing issue.
by Alexandre Julliard
21 Oct '19
21 Oct '19
Module: wine Branch: master Commit: 9551cb0b84dc0c0c9c1778cc37d7bafef4fd4299 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9551cb0b84dc0c0c9c1778cc…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat Oct 19 15:23:32 2019 +0200 kernelbase: Fix variable name aliasing issue. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernelbase/loader.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/kernelbase/loader.c b/dlls/kernelbase/loader.c index 5b70dfd874..456a9f2da4 100644 --- a/dlls/kernelbase/loader.c +++ b/dlls/kernelbase/loader.c @@ -114,12 +114,12 @@ static BOOL load_library_as_datafile( LPCWSTR load_path, DWORD flags, LPCWSTR na if (flags & LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE) { - struct exclusive_datafile *file = HeapAlloc( GetProcessHeap(), 0, sizeof(*file) ); - if (!file) goto failed; - file->module = *mod_ret; - file->file = file; - list_add_head( &exclusive_datafile_list, &file->entry ); - TRACE( "delaying close %p for module %p\n", file->file, file->module ); + struct exclusive_datafile *datafile = HeapAlloc( GetProcessHeap(), 0, sizeof(*datafile) ); + if (!datafile) goto failed; + datafile->module = *mod_ret; + datafile->file = file; + list_add_head( &exclusive_datafile_list, &datafile->entry ); + TRACE( "delaying close %p for module %p\n", datafile->file, datafile->module ); return TRUE; } }
1
0
0
0
Alexandre Julliard : kernel32: Retrieve the Unix codepage from ntdll.
by Alexandre Julliard
21 Oct '19
21 Oct '19
Module: wine Branch: master Commit: 6d8c58d7cc2a54a61a15aa83cd5e32ad4914fa59 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6d8c58d7cc2a54a61a15aa83…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat Oct 19 14:17:40 2019 +0200 kernel32: Retrieve the Unix codepage from ntdll. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/locale.c | 156 +++++-------------------------------------------- dlls/ntdll/directory.c | 6 ++ dlls/ntdll/ntdll.spec | 3 +- dlls/ntdll/rtlstr.c | 3 +- 4 files changed, 24 insertions(+), 144 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=6d8c58d7cc2a54a61a15…
1
0
0
0
Alexandre Julliard : ntdll: Initialize Unix codepage early during startup.
by Alexandre Julliard
21 Oct '19
21 Oct '19
Module: wine Branch: master Commit: 4f4208876261737d69923552ddfc317beea38553 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4f4208876261737d69923552…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat Oct 19 14:16:19 2019 +0200 ntdll: Initialize Unix codepage early during startup. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/directory.c | 128 +++++++++++++++++++++++++++++++++++++++++++++++++ dlls/ntdll/rtlstr.c | 22 --------- 2 files changed, 128 insertions(+), 22 deletions(-) diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index e3f805a48f..398f25e290 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -30,6 +30,8 @@ #endif #include <errno.h> #include <fcntl.h> +#include <locale.h> +#include <langinfo.h> #include <stdarg.h> #include <string.h> #include <stdlib.h> @@ -167,6 +169,8 @@ struct file_identity static struct file_identity ignored_files[MAX_IGNORED_FILES]; static unsigned int ignored_files_count; +static const union cptable *unix_table; /* NULL if UTF8 */ + union file_directory_info { ULONG next; @@ -229,6 +233,109 @@ static RTL_CRITICAL_SECTION_DEBUG critsect_debug = static RTL_CRITICAL_SECTION dir_section = { &critsect_debug, -1, 0, 0, 0, 0 }; +#if !defined(__APPLE__) && !defined(__ANDROID__) /* these platforms always use UTF-8 */ + +/* charset to codepage map, sorted by name */ +static const struct { const char *name; UINT cp; } charset_names[] = +{ + { "ANSIX341968", 20127 }, + { "BIG5", 950 }, + { "BIG5HKSCS", 950 }, + { "CP1250", 1250 }, + { "CP1251", 1251 }, + { "CP1252", 1252 }, + { "CP1253", 1253 }, + { "CP1254", 1254 }, + { "CP1255", 1255 }, + { "CP1256", 1256 }, + { "CP1257", 1257 }, + { "CP1258", 1258 }, + { "CP932", 932 }, + { "CP936", 936 }, + { "CP949", 949 }, + { "CP950", 950 }, + { "EUCJP", 20932 }, + { "EUCKR", 949 }, + { "GB18030", 936 /* 54936 */ }, + { "GB2312", 936 }, + { "GBK", 936 }, + { "IBM037", 37 }, + { "IBM1026", 1026 }, + { "IBM424", 424 }, + { "IBM437", 437 }, + { "IBM500", 500 }, + { "IBM850", 850 }, + { "IBM852", 852 }, + { "IBM855", 855 }, + { "IBM857", 857 }, + { "IBM860", 860 }, + { "IBM861", 861 }, + { "IBM862", 862 }, + { "IBM863", 863 }, + { "IBM864", 864 }, + { "IBM865", 865 }, + { "IBM866", 866 }, + { "IBM869", 869 }, + { "IBM874", 874 }, + { "IBM875", 875 }, + { "ISO88591", 28591 }, + { "ISO885910", 28600 }, + { "ISO885911", 28601 }, + { "ISO885913", 28603 }, + { "ISO885914", 28604 }, + { "ISO885915", 28605 }, + { "ISO885916", 28606 }, + { "ISO88592", 28592 }, + { "ISO88593", 28593 }, + { "ISO88594", 28594 }, + { "ISO88595", 28595 }, + { "ISO88596", 28596 }, + { "ISO88597", 28597 }, + { "ISO88598", 28598 }, + { "ISO88599", 28599 }, + { "KOI8R", 20866 }, + { "KOI8U", 21866 }, + { "TIS620", 28601 }, + { "UTF8", CP_UTF8 } +}; + +static void init_unix_codepage(void) +{ + char charset_name[16]; + const char *name; + size_t i, j; + int min = 0, max = ARRAY_SIZE(charset_names) - 1; + + setlocale( LC_CTYPE, "" ); + if (!(name = nl_langinfo( CODESET ))) return; + + /* remove punctuation characters from charset name */ + for (i = j = 0; name[i] && j < sizeof(charset_name)-1; i++) + if (isalnum((unsigned char)name[i])) charset_name[j++] = name[i]; + charset_name[j] = 0; + + while (min <= max) + { + int pos = (min + max) / 2; + int res = _strnicmp( charset_names[pos].name, charset_name, -1 ); + if (!res) + { + if (charset_names[pos].cp == CP_UTF8) return; + unix_table = wine_cp_get_table( charset_names[pos].cp ); + return; + } + if (res > 0) max = pos - 1; + else min = pos + 1; + } + ERR( "unrecognized charset '%s'\n", name ); +} + +#else /* __APPLE__ || __ANDROID__ */ + +static void init_unix_codepage(void) { } + +#endif /* __APPLE__ || __ANDROID__ */ + /* check if a given Unicode char is OK in a DOS short name */ static inline BOOL is_invalid_dos_char( WCHAR ch ) { @@ -395,6 +502,26 @@ static void free_dir_data( struct dir_data *data ) RtlFreeHeap( GetProcessHeap(), 0, data ); } +int ntdll_umbstowcs( DWORD flags, const char *src, int srclen, WCHAR *dst, int dstlen ) +{ +#ifdef __APPLE__ + /* work around broken Mac OS X filesystem that enforces decomposed Unicode */ + flags |= MB_COMPOSITE; +#endif + return unix_table ? + wine_cp_mbstowcs( unix_table, flags, src, srclen, dst, dstlen ) : + wine_utf8_mbstowcs( flags, src, srclen, dst, dstlen ); +} + +int ntdll_wcstoumbs( DWORD flags, const WCHAR *src, int srclen, char *dst, int dstlen, + const char *defchar, int *used ) +{ + if (unix_table) + return wine_cp_wcstombs( unix_table, flags, src, srclen, dst, dstlen, defchar, used ); + if (used) *used = 0; /* all chars are valid for UTF-8 */ + return wine_utf8_wcstombs( flags, src, srclen, dst, dstlen ); +} + /* support for a directory queue for filesystem searches */ @@ -2319,6 +2446,7 @@ static int get_redirect_path( char *unix_name, int pos, const WCHAR *name, int l */ void init_directories(void) { + init_unix_codepage(); #ifndef _WIN64 if (is_wow64) init_redirects(); #endif diff --git a/dlls/ntdll/rtlstr.c b/dlls/ntdll/rtlstr.c index 977f57a907..94370e7ff6 100644 --- a/dlls/ntdll/rtlstr.c +++ b/dlls/ntdll/rtlstr.c @@ -48,7 +48,6 @@ extern const union cptable cptable_20127; /* 7-bit ASCII */ static const union cptable *ansi_table = &cptable_20127; static const union cptable *oem_table = &cptable_20127; -static const union cptable* unix_table; /* NULL if UTF8 */ /************************************************************************** @@ -61,30 +60,9 @@ void CDECL __wine_init_codepages( const union cptable *ansi, const union cptable { ansi_table = ansi; oem_table = oem; - unix_table = ucp; NlsAnsiCodePage = ansi->info.codepage; } -int ntdll_umbstowcs(DWORD flags, const char* src, int srclen, WCHAR* dst, int dstlen) -{ -#ifdef __APPLE__ - /* work around broken Mac OS X filesystem that enforces decomposed Unicode */ - if (!unix_table) flags |= MB_COMPOSITE; -#endif - return (unix_table) ? - wine_cp_mbstowcs( unix_table, flags, src, srclen, dst, dstlen ) : - wine_utf8_mbstowcs( flags, src, srclen, dst, dstlen ); -} - -int ntdll_wcstoumbs(DWORD flags, const WCHAR* src, int srclen, char* dst, int dstlen, - const char* defchar, int *used ) -{ - if (unix_table) - return wine_cp_wcstombs( unix_table, flags, src, srclen, dst, dstlen, defchar, used ); - if (used) *used = 0; /* all chars are valid for UTF-8 */ - return wine_utf8_wcstombs( flags, src, srclen, dst, dstlen ); -} - /************************************************************************** * RtlInitAnsiString (NTDLL.@) *
1
0
0
0
← Newer
1
...
28
29
30
31
32
33
34
...
62
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
Results per page:
10
25
50
100
200