mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
incorporated changes from Boudewijn
svn path=/trunk/; revision=207
This commit is contained in:
parent
67c37a748e
commit
df27ab373b
1 changed files with 6 additions and 6 deletions
|
@ -23,7 +23,7 @@ int
|
||||||
_getch(void)
|
_getch(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
DWORD NumberOfCharsRead;
|
DWORD NumberOfCharsRead = 0;
|
||||||
char c;
|
char c;
|
||||||
if (char_avail)
|
if (char_avail)
|
||||||
{
|
{
|
||||||
|
@ -32,11 +32,11 @@ _getch(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
ReadConsoleA(filehnd(stdin->_file), &c,1,&NumberOfCharsRead ,NULL);
|
||||||
if( !ReadFile(filehnd(stdin->_file), &c,1,&NumberOfCharsRead ,NULL))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
printk("%c",c);
|
if ( c == 10 )
|
||||||
|
c = 13;
|
||||||
|
putchar(c);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
Loading…
Reference in a new issue