msvcr: Add _getch_nolock implementation.

oldstable
Piotr Caban 2015-06-11 17:54:13 +02:00 committed by Alexandre Julliard
parent d0cb2519b6
commit 3bd60974a9
6 changed files with 20 additions and 9 deletions

View File

@ -890,7 +890,7 @@
@ cdecl _get_wpgmptr(ptr)
@ cdecl _getc_nolock(ptr) MSVCRT__fgetc_nolock
@ cdecl _getch()
@ stub _getch_nolock
@ cdecl _getch_nolock()
@ cdecl _getche()
@ stub _getche_nolock
@ cdecl _getcwd(str long) MSVCRT__getcwd

View File

@ -1238,7 +1238,7 @@
@ cdecl _get_wpgmptr(ptr)
@ cdecl _getc_nolock(ptr) MSVCRT__fgetc_nolock
@ cdecl _getch()
@ stub _getch_nolock
@ cdecl _getch_nolock()
@ cdecl _getche()
@ stub _getche_nolock
@ cdecl _getcwd(str long) MSVCRT__getcwd

View File

@ -1236,7 +1236,7 @@
@ cdecl _get_wpgmptr(ptr)
@ cdecl _getc_nolock(ptr) MSVCRT__fgetc_nolock
@ cdecl _getch()
@ stub _getch_nolock
@ cdecl _getch_nolock()
@ cdecl _getche()
@ stub _getche_nolock
@ cdecl _getcwd(str long) MSVCRT__getcwd

View File

@ -564,7 +564,7 @@
@ cdecl _get_wpgmptr(ptr)
@ cdecl _getc_nolock(ptr) MSVCRT__fgetc_nolock
@ cdecl _getch()
@ stub _getch_nolock
@ cdecl _getch_nolock()
@ cdecl _getche()
@ stub _getche_nolock
@ cdecl _getcwd(str long) MSVCRT__getcwd

View File

@ -541,7 +541,7 @@
@ cdecl _get_wpgmptr(ptr)
@ cdecl _getc_nolock(ptr) MSVCRT__fgetc_nolock
@ cdecl _getch()
@ stub _getch_nolock
@ cdecl _getch_nolock()
@ cdecl _getche()
@ stub _getche_nolock
@ cdecl _getcwd(str long) MSVCRT__getcwd

View File

@ -113,13 +113,12 @@ static const struct {unsigned vk; unsigned ch[4][2];} enh_map[] = {
};
/*********************************************************************
* _getch (MSVCRT.@)
* _getch_nolock (MSVCR80.@)
*/
int CDECL _getch(void)
int CDECL _getch_nolock(void)
{
int retval = MSVCRT_EOF;
LOCK_CONSOLE;
if (__MSVCRT_console_buffer != MSVCRT_EOF)
{
retval = __MSVCRT_console_buffer;
@ -179,10 +178,22 @@ int CDECL _getch(void)
if (mode)
SetConsoleMode(MSVCRT_console_in, mode);
}
UNLOCK_CONSOLE;
return retval;
}
/*********************************************************************
* _getch (MSVCRT.@)
*/
int CDECL _getch(void)
{
int ret;
LOCK_CONSOLE;
ret = _getch_nolock();
UNLOCK_CONSOLE;
return ret;
}
/*********************************************************************
* _putch (MSVCRT.@)
*/