Commit 27b7ff73 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Add _ungetwch implementation.

parent d4fab071
...@@ -1412,8 +1412,8 @@ ...@@ -1412,8 +1412,8 @@
@ cdecl _ungetch(long) @ cdecl _ungetch(long)
@ cdecl _ungetch_nolock(long) @ cdecl _ungetch_nolock(long)
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock @ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
@ stub _ungetwch @ cdecl _ungetwch(long)
@ stub _ungetwch_nolock @ cdecl _ungetwch_nolock(long)
@ cdecl _unlink(str) MSVCRT__unlink @ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long) @ cdecl _unloaddll(long)
@ cdecl _unlock(long) @ cdecl _unlock(long)
......
...@@ -1770,8 +1770,8 @@ ...@@ -1770,8 +1770,8 @@
@ cdecl _ungetch(long) @ cdecl _ungetch(long)
@ cdecl _ungetch_nolock(long) @ cdecl _ungetch_nolock(long)
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock @ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
@ stub _ungetwch @ cdecl _ungetwch(long)
@ stub _ungetwch_nolock @ cdecl _ungetwch_nolock(long)
@ cdecl _unlink(str) MSVCRT__unlink @ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long) @ cdecl _unloaddll(long)
@ cdecl _unlock(long) @ cdecl _unlock(long)
......
...@@ -1784,8 +1784,8 @@ ...@@ -1784,8 +1784,8 @@
@ cdecl _ungetch(long) @ cdecl _ungetch(long)
@ cdecl _ungetch_nolock(long) @ cdecl _ungetch_nolock(long)
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock @ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
@ stub _ungetwch @ cdecl _ungetwch(long)
@ stub _ungetwch_nolock @ cdecl _ungetwch_nolock(long)
@ cdecl _unlink(str) MSVCRT__unlink @ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long) @ cdecl _unloaddll(long)
@ cdecl _unlock(long) @ cdecl _unlock(long)
......
...@@ -578,7 +578,7 @@ ...@@ -578,7 +578,7 @@
@ cdecl _ultow(long ptr long) ntdll._ultow @ cdecl _ultow(long ptr long) ntdll._ultow
@ cdecl _umask(long) MSVCRT__umask @ cdecl _umask(long) MSVCRT__umask
@ cdecl _ungetch(long) @ cdecl _ungetch(long)
@ stub _ungetwch @ cdecl _ungetwch(long)
@ cdecl _unlink(str) MSVCRT__unlink @ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long) @ cdecl _unloaddll(long)
@ cdecl _unlock(long) @ cdecl _unlock(long)
......
...@@ -574,7 +574,7 @@ ...@@ -574,7 +574,7 @@
@ cdecl _ultow(long ptr long) ntdll._ultow @ cdecl _ultow(long ptr long) ntdll._ultow
@ cdecl _umask(long) MSVCRT__umask @ cdecl _umask(long) MSVCRT__umask
@ cdecl _ungetch(long) @ cdecl _ungetch(long)
@ stub _ungetwch @ cdecl _ungetwch(long)
@ cdecl _unlink(str) MSVCRT__unlink @ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long) @ cdecl _unloaddll(long)
@ cdecl _unlock(long) @ cdecl _unlock(long)
......
...@@ -1092,8 +1092,8 @@ ...@@ -1092,8 +1092,8 @@
@ cdecl _ungetch(long) @ cdecl _ungetch(long)
@ cdecl _ungetch_nolock(long) @ cdecl _ungetch_nolock(long)
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock @ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
@ stub _ungetwch @ cdecl _ungetwch(long)
@ stub _ungetwch_nolock @ cdecl _ungetwch_nolock(long)
@ cdecl _unlink(str) MSVCRT__unlink @ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long) @ cdecl _unloaddll(long)
@ cdecl _unlock(long) @ cdecl _unlock(long)
......
...@@ -1067,8 +1067,8 @@ ...@@ -1067,8 +1067,8 @@
@ cdecl _ungetch(long) @ cdecl _ungetch(long)
@ cdecl _ungetch_nolock(long) @ cdecl _ungetch_nolock(long)
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock @ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
@ stub _ungetwch @ cdecl _ungetwch(long)
@ stub _ungetwch_nolock @ cdecl _ungetwch_nolock(long)
@ cdecl _unlink(str) MSVCRT__unlink @ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long) @ cdecl _unloaddll(long)
@ cdecl _unlock(long) @ cdecl _unlock(long)
......
...@@ -439,6 +439,28 @@ int CDECL _ungetch(int c) ...@@ -439,6 +439,28 @@ int CDECL _ungetch(int c)
} }
/********************************************************************* /*********************************************************************
* _ungetwch_nolock (MSVCR80.@)
*/
MSVCRT_wchar_t CDECL _ungetwch_nolock(MSVCRT_wchar_t c)
{
MSVCRT_wchar_t retval = MSVCRT_WEOF;
if (c != MSVCRT_WEOF && __MSVCRT_console_buffer_w == MSVCRT_WEOF)
retval = __MSVCRT_console_buffer_w = c;
return retval;
}
/*********************************************************************
* _ungetwch (MSVCRT.@)
*/
MSVCRT_wchar_t CDECL _ungetwch(MSVCRT_wchar_t c)
{
LOCK_CONSOLE;
c = _ungetwch_nolock(c);
UNLOCK_CONSOLE;
return c;
}
/*********************************************************************
* _kbhit (MSVCRT.@) * _kbhit (MSVCRT.@)
*/ */
int CDECL _kbhit(void) int CDECL _kbhit(void)
......
...@@ -1025,7 +1025,7 @@ ...@@ -1025,7 +1025,7 @@
@ cdecl _umask(long) MSVCRT__umask @ cdecl _umask(long) MSVCRT__umask
# stub _umask_s(long ptr) # stub _umask_s(long ptr)
@ cdecl _ungetch(long) @ cdecl _ungetch(long)
# stub _ungetwch(long) @ cdecl _ungetwch(long)
@ cdecl _unlink(str) MSVCRT__unlink @ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long) @ cdecl _unloaddll(long)
@ cdecl _unlock(long) @ cdecl _unlock(long)
......
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