Commit 853d4343 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcr: Add _ungetch_nolock implementation.

parent 57754bdb
......@@ -1410,7 +1410,7 @@
@ stub _umask_s
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
@ cdecl _ungetch(long)
@ stub _ungetch_nolock
@ cdecl _ungetch_nolock(long)
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
@ stub _ungetwch
@ stub _ungetwch_nolock
......
......@@ -1768,7 +1768,7 @@
@ stub _umask_s
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
@ cdecl _ungetch(long)
@ stub _ungetch_nolock
@ cdecl _ungetch_nolock(long)
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
@ stub _ungetwch
@ stub _ungetwch_nolock
......
......@@ -1782,7 +1782,7 @@
@ stub _umask_s
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
@ cdecl _ungetch(long)
@ stub _ungetch_nolock
@ cdecl _ungetch_nolock(long)
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
@ stub _ungetwch
@ stub _ungetwch_nolock
......
......@@ -1090,7 +1090,7 @@
@ stub _umask_s
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
@ cdecl _ungetch(long)
@ stub _ungetch_nolock
@ cdecl _ungetch_nolock(long)
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
@ stub _ungetwch
@ stub _ungetwch_nolock
......
......@@ -1065,7 +1065,7 @@
@ stub _umask_s
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
@ cdecl _ungetch(long)
@ stub _ungetch_nolock
@ cdecl _ungetch_nolock(long)
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
@ stub _ungetwch
@ stub _ungetwch_nolock
......
......@@ -280,19 +280,28 @@ char* CDECL _cgets(char* str)
}
/*********************************************************************
* _ungetch (MSVCRT.@)
* _ungetch_nolock (MSVCRT.@)
*/
int CDECL _ungetch(int c)
int CDECL _ungetch_nolock(int c)
{
int retval = MSVCRT_EOF;
LOCK_CONSOLE;
if (c != MSVCRT_EOF && __MSVCRT_console_buffer == MSVCRT_EOF)
retval = __MSVCRT_console_buffer = c;
UNLOCK_CONSOLE;
return retval;
}
/*********************************************************************
* _ungetch (MSVCRT.@)
*/
int CDECL _ungetch(int c)
{
LOCK_CONSOLE;
c = _ungetch_nolock(c);
UNLOCK_CONSOLE;
return c;
}
/*********************************************************************
* _kbhit (MSVCRT.@)
*/
int CDECL _kbhit(void)
......
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