Commit 0a600ccd authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcr: Add _putch_nolock implementation.

parent 3bd60974
......@@ -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
......
......@@ -195,17 +195,25 @@ int CDECL _getch(void)
}
/*********************************************************************
* _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;
c = _putch_nolock(c);
UNLOCK_CONSOLE;
return retval;
return c;
}
/*********************************************************************
......
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