Commit 141e53ba authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

kernel32: Remove no longer needed CONSOLE_Init.

parent 826a9615
......@@ -265,31 +265,6 @@ DWORD WINAPI GetConsoleProcessList(LPDWORD processlist, DWORD processcount)
return 0;
}
BOOL CONSOLE_Init(RTL_USER_PROCESS_PARAMETERS *params)
{
/* convert value from server:
* + INVALID_HANDLE_VALUE => TEB: 0, STARTUPINFO: INVALID_HANDLE_VALUE
* + 0 => TEB: 0, STARTUPINFO: INVALID_HANDLE_VALUE
* + console handle needs to be mapped
*/
if (!params->hStdInput || params->hStdInput == INVALID_HANDLE_VALUE)
params->hStdInput = 0;
else if (!is_console_handle(params->hStdInput) && VerifyConsoleIoHandle(params->hStdInput))
params->hStdInput = console_handle_map(params->hStdInput);
if (!params->hStdOutput || params->hStdOutput == INVALID_HANDLE_VALUE)
params->hStdOutput = 0;
else if (!is_console_handle(params->hStdOutput) && VerifyConsoleIoHandle(params->hStdOutput))
params->hStdOutput = console_handle_map(params->hStdOutput);
if (!params->hStdError || params->hStdError == INVALID_HANDLE_VALUE)
params->hStdError = 0;
else if (!is_console_handle(params->hStdError) && VerifyConsoleIoHandle(params->hStdError))
params->hStdError = console_handle_map(params->hStdError);
return TRUE;
}
/* Undocumented, called by native doskey.exe */
/* FIXME: Should use CONSOLE_GetHistory() above for full implementation */
DWORD WINAPI GetConsoleCommandHistoryA(DWORD unknown1, DWORD unknown2, DWORD unknown3)
......
......@@ -120,15 +120,11 @@ static void copy_startup_info(void)
*/
static BOOL process_attach( HMODULE module )
{
RTL_USER_PROCESS_PARAMETERS *params = NtCurrentTeb()->Peb->ProcessParameters;
kernel32_handle = module;
RtlSetUnhandledExceptionFilter( UnhandledExceptionFilter );
NtQuerySystemInformation( SystemBasicInformation, &system_info, sizeof(system_info), NULL );
CONSOLE_Init(params);
copy_startup_info();
#ifdef __i386__
......
......@@ -22,18 +22,6 @@
#define __WINE_KERNEL_PRIVATE_H
NTSTATUS WINAPI BaseGetNamedObjectDirectory( HANDLE *dir );
BOOL CONSOLE_Init(RTL_USER_PROCESS_PARAMETERS *params) DECLSPEC_HIDDEN;
static inline BOOL is_console_handle(HANDLE h)
{
return h != INVALID_HANDLE_VALUE && ((UINT_PTR)h & 3) == 3;
}
/* map a real wineserver handle onto a kernel32 console handle */
static inline HANDLE console_handle_map(HANDLE h)
{
return h != INVALID_HANDLE_VALUE ? (HANDLE)((UINT_PTR)h ^ 3) : INVALID_HANDLE_VALUE;
}
static inline BOOL set_ntstatus( NTSTATUS status )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment