Alexandre Julliard : kernel32: Remove initialization of the global argv.
Alexandre Julliard
julliard at winehq.org
Mon Dec 9 16:57:35 CST 2019
Module: wine
Branch: master
Commit: a2c107fca35c14455493f895a8b1ff486e68c8f8
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a2c107fca35c14455493f895a8b1ff486e68c8f8
Author: Alexandre Julliard <julliard at winehq.org>
Date: Sat Dec 7 14:45:50 2019 +0100
kernel32: Remove initialization of the global argv.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/kernel32/kernel_main.c | 31 -------------------------------
1 file changed, 31 deletions(-)
diff --git a/dlls/kernel32/kernel_main.c b/dlls/kernel32/kernel_main.c
index 1d61853d86..9247e3c117 100644
--- a/dlls/kernel32/kernel_main.c
+++ b/dlls/kernel32/kernel_main.c
@@ -77,36 +77,6 @@ static void set_entry_point( HMODULE module, const char *name, DWORD rva )
}
-/***********************************************************************
- * set_library_argv
- *
- * Set the Wine library argv global variable.
- */
-static void set_library_argv( WCHAR **wargv )
-{
- int argc;
- char *p, **argv;
- DWORD total = 0;
-
- /* convert argv back from Unicode since it has to be in the Ansi codepage not the Unix one */
-
- for (argc = 0; wargv[argc]; argc++)
- total += WideCharToMultiByte( CP_ACP, 0, wargv[argc], -1, NULL, 0, NULL, NULL );
-
- argv = RtlAllocateHeap( GetProcessHeap(), 0, total + (argc + 1) * sizeof(*argv) );
- p = (char *)(argv + argc + 1);
- for (argc = 0; wargv[argc]; argc++)
- {
- DWORD reslen = WideCharToMultiByte( CP_ACP, 0, wargv[argc], -1, p, total, NULL, NULL );
- argv[argc] = p;
- p += reslen;
- total -= reslen;
- }
- argv[argc] = NULL;
- __wine_main_argv = argv;
-}
-
-
/***********************************************************************
* KERNEL process initialisation routine
*/
@@ -114,7 +84,6 @@ static BOOL process_attach( HMODULE module )
{
RTL_USER_PROCESS_PARAMETERS *params = NtCurrentTeb()->Peb->ProcessParameters;
- set_library_argv( __wine_main_wargv );
NtQuerySystemInformation( SystemBasicInformation, &system_info, sizeof(system_info), NULL );
/* Setup registry timezone information */
More information about the wine-cvs
mailing list