Commit dc72519c authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

kernel32: Import ReadFile from kernelbase.

parent c248999a
...@@ -276,36 +276,6 @@ UINT WINAPI SetHandleCount( UINT count ) ...@@ -276,36 +276,6 @@ UINT WINAPI SetHandleCount( UINT count )
} }
/*************************************************************************
* ReadFile (KERNEL32.@)
*/
BOOL WINAPI KERNEL32_ReadFile( HANDLE file, LPVOID buffer, DWORD count,
LPDWORD result, LPOVERLAPPED overlapped )
{
if (result) *result = 0;
if (is_console_handle( file ))
{
DWORD conread, mode;
if (!ReadConsoleA( file, buffer, count, &conread, NULL) || !GetConsoleMode( file, &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 (result) *result = conread;
return TRUE;
}
return ReadFile( file, buffer, count, result, overlapped );
}
/*********************************************************************** /***********************************************************************
* DosDateTimeToFileTime (KERNEL32.@) * DosDateTimeToFileTime (KERNEL32.@)
*/ */
......
...@@ -1205,7 +1205,7 @@ ...@@ -1205,7 +1205,7 @@
@ stdcall -import ReadConsoleOutputW(long ptr long long ptr) @ stdcall -import ReadConsoleOutputW(long ptr long long ptr)
@ stdcall -import ReadConsoleW(long ptr long ptr ptr) @ stdcall -import ReadConsoleW(long ptr long ptr ptr)
@ stdcall -import ReadDirectoryChangesW(long ptr long long long ptr ptr ptr) @ stdcall -import ReadDirectoryChangesW(long ptr long long long ptr ptr ptr)
@ stdcall ReadFile(long ptr long ptr ptr) KERNEL32_ReadFile @ stdcall -import ReadFile(long ptr long ptr ptr)
@ stdcall -import ReadFileEx(long ptr long ptr ptr) @ stdcall -import ReadFileEx(long ptr long ptr ptr)
@ stdcall -import ReadFileScatter(long ptr long ptr ptr) @ stdcall -import ReadFileScatter(long ptr long ptr ptr)
@ stdcall -import ReadProcessMemory(long ptr ptr long ptr) @ stdcall -import ReadProcessMemory(long ptr ptr long ptr)
......
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