msvcr: Add _ungetch_nolock implementation.
This commit is contained in:
parent
57754bdb29
commit
853d4343db
|
@ -1410,7 +1410,7 @@
|
||||||
@ stub _umask_s
|
@ stub _umask_s
|
||||||
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
|
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
|
||||||
@ cdecl _ungetch(long)
|
@ cdecl _ungetch(long)
|
||||||
@ stub _ungetch_nolock
|
@ cdecl _ungetch_nolock(long)
|
||||||
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
|
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
|
||||||
@ stub _ungetwch
|
@ stub _ungetwch
|
||||||
@ stub _ungetwch_nolock
|
@ stub _ungetwch_nolock
|
||||||
|
|
|
@ -1768,7 +1768,7 @@
|
||||||
@ stub _umask_s
|
@ stub _umask_s
|
||||||
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
|
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
|
||||||
@ cdecl _ungetch(long)
|
@ cdecl _ungetch(long)
|
||||||
@ stub _ungetch_nolock
|
@ cdecl _ungetch_nolock(long)
|
||||||
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
|
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
|
||||||
@ stub _ungetwch
|
@ stub _ungetwch
|
||||||
@ stub _ungetwch_nolock
|
@ stub _ungetwch_nolock
|
||||||
|
|
|
@ -1782,7 +1782,7 @@
|
||||||
@ stub _umask_s
|
@ stub _umask_s
|
||||||
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
|
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
|
||||||
@ cdecl _ungetch(long)
|
@ cdecl _ungetch(long)
|
||||||
@ stub _ungetch_nolock
|
@ cdecl _ungetch_nolock(long)
|
||||||
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
|
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
|
||||||
@ stub _ungetwch
|
@ stub _ungetwch
|
||||||
@ stub _ungetwch_nolock
|
@ stub _ungetwch_nolock
|
||||||
|
|
|
@ -1090,7 +1090,7 @@
|
||||||
@ stub _umask_s
|
@ stub _umask_s
|
||||||
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
|
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
|
||||||
@ cdecl _ungetch(long)
|
@ cdecl _ungetch(long)
|
||||||
@ stub _ungetch_nolock
|
@ cdecl _ungetch_nolock(long)
|
||||||
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
|
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
|
||||||
@ stub _ungetwch
|
@ stub _ungetwch
|
||||||
@ stub _ungetwch_nolock
|
@ stub _ungetwch_nolock
|
||||||
|
|
|
@ -1065,7 +1065,7 @@
|
||||||
@ stub _umask_s
|
@ stub _umask_s
|
||||||
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
|
@ cdecl _ungetc_nolock(long ptr) MSVCRT__ungetc_nolock
|
||||||
@ cdecl _ungetch(long)
|
@ cdecl _ungetch(long)
|
||||||
@ stub _ungetch_nolock
|
@ cdecl _ungetch_nolock(long)
|
||||||
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
|
@ cdecl _ungetwc_nolock(long ptr) MSVCRT__ungetwc_nolock
|
||||||
@ stub _ungetwch
|
@ stub _ungetwch
|
||||||
@ stub _ungetwch_nolock
|
@ stub _ungetwch_nolock
|
||||||
|
|
|
@ -279,17 +279,26 @@ char* CDECL _cgets(char* str)
|
||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*********************************************************************
|
||||||
|
* _ungetch_nolock (MSVCRT.@)
|
||||||
|
*/
|
||||||
|
int CDECL _ungetch_nolock(int c)
|
||||||
|
{
|
||||||
|
int retval = MSVCRT_EOF;
|
||||||
|
if (c != MSVCRT_EOF && __MSVCRT_console_buffer == MSVCRT_EOF)
|
||||||
|
retval = __MSVCRT_console_buffer = c;
|
||||||
|
return retval;
|
||||||
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* _ungetch (MSVCRT.@)
|
* _ungetch (MSVCRT.@)
|
||||||
*/
|
*/
|
||||||
int CDECL _ungetch(int c)
|
int CDECL _ungetch(int c)
|
||||||
{
|
{
|
||||||
int retval = MSVCRT_EOF;
|
LOCK_CONSOLE;
|
||||||
LOCK_CONSOLE;
|
c = _ungetch_nolock(c);
|
||||||
if (c != MSVCRT_EOF && __MSVCRT_console_buffer == MSVCRT_EOF)
|
UNLOCK_CONSOLE;
|
||||||
retval = __MSVCRT_console_buffer = c;
|
return c;
|
||||||
UNLOCK_CONSOLE;
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
|
|
Loading…
Reference in New Issue