msvcrt: Add _ungetwch implementation.

This commit is contained in:
Piotr Caban 2015-06-14 14:31:32 +02:00 committed by Alexandre Julliard
parent d4fab07110
commit 27b7ff73e4
9 changed files with 35 additions and 13 deletions

View File

@ -1412,8 +1412,8 @@
@ cdecl _ungetch(long)
@ cdecl _ungetch_nolock(long)
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
@ stub _ungetwch
@ stub _ungetwch_nolock
@ cdecl _ungetwch(long)
@ cdecl _ungetwch_nolock(long)
@ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long)
@ cdecl _unlock(long)

View File

@ -1770,8 +1770,8 @@
@ cdecl _ungetch(long)
@ cdecl _ungetch_nolock(long)
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
@ stub _ungetwch
@ stub _ungetwch_nolock
@ cdecl _ungetwch(long)
@ cdecl _ungetwch_nolock(long)
@ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long)
@ cdecl _unlock(long)

View File

@ -1784,8 +1784,8 @@
@ cdecl _ungetch(long)
@ cdecl _ungetch_nolock(long)
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
@ stub _ungetwch
@ stub _ungetwch_nolock
@ cdecl _ungetwch(long)
@ cdecl _ungetwch_nolock(long)
@ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long)
@ cdecl _unlock(long)

View File

@ -578,7 +578,7 @@
@ cdecl _ultow(long ptr long) ntdll._ultow
@ cdecl _umask(long) MSVCRT__umask
@ cdecl _ungetch(long)
@ stub _ungetwch
@ cdecl _ungetwch(long)
@ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long)
@ cdecl _unlock(long)

View File

@ -574,7 +574,7 @@
@ cdecl _ultow(long ptr long) ntdll._ultow
@ cdecl _umask(long) MSVCRT__umask
@ cdecl _ungetch(long)
@ stub _ungetwch
@ cdecl _ungetwch(long)
@ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long)
@ cdecl _unlock(long)

View File

@ -1092,8 +1092,8 @@
@ cdecl _ungetch(long)
@ cdecl _ungetch_nolock(long)
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
@ stub _ungetwch
@ stub _ungetwch_nolock
@ cdecl _ungetwch(long)
@ cdecl _ungetwch_nolock(long)
@ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long)
@ cdecl _unlock(long)

View File

@ -1067,8 +1067,8 @@
@ cdecl _ungetch(long)
@ cdecl _ungetch_nolock(long)
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
@ stub _ungetwch
@ stub _ungetwch_nolock
@ cdecl _ungetwch(long)
@ cdecl _ungetwch_nolock(long)
@ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long)
@ cdecl _unlock(long)

View File

@ -438,6 +438,28 @@ int CDECL _ungetch(int c)
return 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.@)
*/

View File

@ -1025,7 +1025,7 @@
@ cdecl _umask(long) MSVCRT__umask
# stub _umask_s(long ptr)
@ cdecl _ungetch(long)
# stub _ungetwch(long)
@ cdecl _ungetwch(long)
@ cdecl _unlink(str) MSVCRT__unlink
@ cdecl _unloaddll(long)
@ cdecl _unlock(long)