incorporated changes from Boudewijn

svn path=/trunk/; revision=207
This commit is contained in:
Rex Jolliff 1999-02-05 19:27:21 +00:00
parent 67c37a748e
commit df27ab373b

View file

@ -23,7 +23,7 @@ int
_getch(void)
{
DWORD NumberOfCharsRead;
DWORD NumberOfCharsRead = 0;
char c;
if (char_avail)
{
@ -32,11 +32,11 @@ _getch(void)
}
else
{
if( !ReadFile(filehnd(stdin->_file), &c,1,&NumberOfCharsRead ,NULL))
return -1;
ReadConsoleA(filehnd(stdin->_file), &c,1,&NumberOfCharsRead ,NULL);
}
printk("%c",c);
if ( c == 10 )
c = 13;
putchar(c);
return c;
}