msvcr: Add _putch_nolock implementation.

oldstable
Piotr Caban 2015-06-11 17:54:28 +02:00 committed by Alexandre Julliard
parent 3bd60974a9
commit 0a600ccde8
6 changed files with 20 additions and 12 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;
}
/*********************************************************************