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
ead47126
Commit
ead47126
authored
Nov 28, 2010
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Properly manage ctrl-Z (and ctrl-D) in ReadFile when dealing with a console handle.
parent
9c577630
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
file.c
dlls/kernel32/file.c
+17
-1
No files found.
dlls/kernel32/file.c
View file @
ead47126
...
...
@@ -406,7 +406,23 @@ BOOL WINAPI ReadFile( HANDLE hFile, LPVOID buffer, DWORD bytesToRead,
if
(
!
bytesToRead
)
return
TRUE
;
if
(
is_console_handle
(
hFile
))
return
ReadConsoleA
(
hFile
,
buffer
,
bytesToRead
,
bytesRead
,
NULL
);
{
DWORD
conread
,
mode
;
if
(
!
ReadConsoleA
(
hFile
,
buffer
,
bytesToRead
,
&
conread
,
NULL
)
||
!
GetConsoleMode
(
hFile
,
&
mode
))
return
FALSE
;
/* ctrl-Z (26) means end of file on window (if at beginning of buffer)
* but Unix uses ctrl-D (4), and ctrl-Z is a bad idea on Unix :-/
* So map both ctrl-D ctrl-Z to EOF.
*/
if
((
mode
&
ENABLE_PROCESSED_INPUT
)
&&
conread
>
0
&&
(((
char
*
)
buffer
)[
0
]
==
26
||
((
char
*
)
buffer
)[
0
]
==
4
))
{
conread
=
0
;
}
if
(
bytesRead
)
*
bytesRead
=
conread
;
return
TRUE
;
}
if
(
overlapped
!=
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