msvcr: Add _putch_nolock implementation.
This commit is contained in:
parent
3bd60974a9
commit
0a600ccde8
|
@ -1234,7 +1234,7 @@
|
|||
@ cdecl _purecall()
|
||||
@ cdecl _putc_nolock(long ptr) MSVCRT__fputc_nolock
|
||||
@ cdecl _putch(long)
|
||||
@ stub _putch_nolock
|
||||
@ cdecl _putch_nolock(long)
|
||||
@ cdecl _putenv(str)
|
||||
@ cdecl _putenv_s(str str)
|
||||
@ cdecl _putw(long ptr) MSVCRT__putw
|
||||
|
|
|
@ -1592,7 +1592,7 @@
|
|||
@ cdecl _purecall()
|
||||
@ cdecl _putc_nolock(long ptr) MSVCRT__fputc_nolock
|
||||
@ cdecl _putch(long)
|
||||
@ stub _putch_nolock
|
||||
@ cdecl _putch_nolock(long)
|
||||
@ cdecl _putenv(str)
|
||||
@ cdecl _putenv_s(str str)
|
||||
@ cdecl _putw(long ptr) MSVCRT__putw
|
||||
|
|
|
@ -1600,7 +1600,7 @@
|
|||
@ cdecl _purecall()
|
||||
@ cdecl _putc_nolock(long ptr) MSVCRT__fputc_nolock
|
||||
@ cdecl _putch(long)
|
||||
@ stub _putch_nolock
|
||||
@ cdecl _putch_nolock(long)
|
||||
@ cdecl _putenv(str)
|
||||
@ cdecl _putenv_s(str str)
|
||||
@ cdecl _putw(long ptr) MSVCRT__putw
|
||||
|
|
|
@ -909,7 +909,7 @@
|
|||
@ cdecl _purecall()
|
||||
@ cdecl _putc_nolock(long ptr) MSVCRT__fputc_nolock
|
||||
@ cdecl _putch(long)
|
||||
@ stub _putch_nolock
|
||||
@ cdecl _putch_nolock(long)
|
||||
@ cdecl _putenv(str)
|
||||
@ cdecl _putenv_s(str str)
|
||||
@ cdecl _putw(long ptr) MSVCRT__putw
|
||||
|
|
|
@ -884,7 +884,7 @@
|
|||
@ cdecl _purecall()
|
||||
@ cdecl _putc_nolock(long ptr) MSVCRT__fputc_nolock
|
||||
@ cdecl _putch(long)
|
||||
@ stub _putch_nolock
|
||||
@ cdecl _putch_nolock(long)
|
||||
@ cdecl _putenv(str)
|
||||
@ cdecl _putenv_s(str str)
|
||||
@ cdecl _putw(long ptr) MSVCRT__putw
|
||||
|
|
|
@ -194,18 +194,26 @@ int CDECL _getch(void)
|
|||
return ret;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _putch_nolock (MSVCR80.@)
|
||||
*/
|
||||
int CDECL _putch_nolock(int c)
|
||||
{
|
||||
DWORD count;
|
||||
if (WriteConsoleA(MSVCRT_console_out, &c, 1, &count, NULL) && count == 1)
|
||||
return c;
|
||||
return MSVCRT_EOF;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _putch (MSVCRT.@)
|
||||
*/
|
||||
int CDECL _putch(int c)
|
||||
{
|
||||
int retval = MSVCRT_EOF;
|
||||
DWORD count;
|
||||
LOCK_CONSOLE;
|
||||
if (WriteConsoleA(MSVCRT_console_out, &c, 1, &count, NULL) && count == 1)
|
||||
retval = c;
|
||||
UNLOCK_CONSOLE;
|
||||
return retval;
|
||||
LOCK_CONSOLE;
|
||||
c = _putch_nolock(c);
|
||||
UNLOCK_CONSOLE;
|
||||
return c;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
|
Loading…
Reference in New Issue