Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
99e6bab3
Commit
99e6bab3
authored
Jul 01, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Import FreeConsole from kernelbase.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
4031265f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
43 deletions
+4
-43
console.c
dlls/kernel32/console.c
+2
-20
kernel32.spec
dlls/kernel32/kernel32.spec
+1
-1
sync.c
dlls/kernel32/sync.c
+1
-22
No files found.
dlls/kernel32/console.c
View file @
99e6bab3
...
...
@@ -425,7 +425,7 @@ static enum read_console_input_return read_console_input(HANDLE handle, PINPUT_R
if
((
fd
=
get_console_bare_fd
(
handle
))
!=
-
1
)
{
put_console_into_raw_mode
(
fd
);
if
(
WaitForSingleObject
(
GetConsoleInputWaitHandle
()
,
0
)
!=
WAIT_OBJECT_0
)
if
(
WaitForSingleObject
(
handle
,
0
)
!=
WAIT_OBJECT_0
)
{
ret
=
bare_console_fetch_input
(
handle
,
fd
,
timeout
);
}
...
...
@@ -437,7 +437,7 @@ static enum read_console_input_return read_console_input(HANDLE handle, PINPUT_R
{
if
(
!
VerifyConsoleIoHandle
(
handle
))
return
rci_error
;
if
(
WaitForSingleObject
(
GetConsoleInputWaitHandle
()
,
timeout
)
!=
WAIT_OBJECT_0
)
if
(
WaitForSingleObject
(
handle
,
timeout
)
!=
WAIT_OBJECT_0
)
return
rci_timeout
;
}
...
...
@@ -531,24 +531,6 @@ DWORD WINAPI GetConsoleTitleA(LPSTR title, DWORD size)
static
WCHAR
*
S_EditString
/* = NULL */
;
static
unsigned
S_EditStrPos
/* = 0 */
;
/***********************************************************************
* FreeConsole (KERNEL32.@)
*/
BOOL
WINAPI
FreeConsole
(
VOID
)
{
BOOL
ret
;
/* invalidate local copy of input event handle */
console_wait_event
=
0
;
SERVER_START_REQ
(
free_console
)
{
ret
=
!
wine_server_call_err
(
req
);
}
SERVER_END_REQ
;
return
ret
;
}
/******************************************************************
* start_console_renderer
*
...
...
dlls/kernel32/kernel32.spec
View file @
99e6bab3
...
...
@@ -524,7 +524,7 @@
@ stdcall -import FoldStringW(long wstr long ptr long)
@ stdcall -import FormatMessageA(long ptr long long ptr long ptr)
@ stdcall -import FormatMessageW(long ptr long long ptr long ptr)
@ stdcall FreeConsole()
@ stdcall
-import
FreeConsole()
@ stdcall -import FreeEnvironmentStringsA(ptr)
@ stdcall -import FreeEnvironmentStringsW(ptr)
@ stub -i386 FreeLSCallback
...
...
dlls/kernel32/sync.c
View file @
99e6bab3
...
...
@@ -85,24 +85,6 @@ static BOOL get_open_object_attributes( OBJECT_ATTRIBUTES *attr, UNICODE_STRING
return
TRUE
;
}
static
HANDLE
normalize_handle_if_console
(
HANDLE
handle
)
{
if
((
handle
==
(
HANDLE
)
STD_INPUT_HANDLE
)
||
(
handle
==
(
HANDLE
)
STD_OUTPUT_HANDLE
)
||
(
handle
==
(
HANDLE
)
STD_ERROR_HANDLE
))
handle
=
GetStdHandle
(
HandleToULong
(
handle
)
);
/* yes, even screen buffer console handles are waitable, and are
* handled as a handle to the console itself !!
*/
if
(
is_console_handle
(
handle
))
{
if
(
VerifyConsoleIoHandle
(
handle
))
handle
=
GetConsoleInputWaitHandle
();
}
return
handle
;
}
/******************************************************************************
* GetTickCount64 (KERNEL32.@)
*/
...
...
@@ -135,10 +117,7 @@ DWORD WINAPI DECLSPEC_HOTPATCH GetTickCount(void)
BOOL
WINAPI
RegisterWaitForSingleObject
(
HANDLE
*
wait
,
HANDLE
object
,
WAITORTIMERCALLBACK
callback
,
void
*
context
,
ULONG
timeout
,
ULONG
flags
)
{
TRACE
(
"%p %p %p %p %d %d
\n
"
,
wait
,
object
,
callback
,
context
,
timeout
,
flags
);
object
=
normalize_handle_if_console
(
object
);
return
set_ntstatus
(
RtlRegisterWait
(
wait
,
object
,
callback
,
context
,
timeout
,
flags
));
return
(
*
wait
=
RegisterWaitForSingleObjectEx
(
object
,
callback
,
context
,
timeout
,
flags
))
!=
NULL
;
}
/***********************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment