msvcrt: Write directly to the console in _putwch.

oldstable
Piotr Caban 2015-06-14 14:30:51 +02:00 committed by Alexandre Julliard
parent 6827724e54
commit eb9e00857a
10 changed files with 35 additions and 21 deletions

View File

@ -1239,8 +1239,8 @@
@ cdecl _putenv_s(str str)
@ cdecl _putw(long ptr) MSVCRT__putw
@ cdecl _putwc_nolock(long ptr) MSVCRT__fputwc_nolock
@ cdecl _putwch(long) MSVCRT__putwch
@ stub _putwch_nolock
@ cdecl _putwch(long)
@ cdecl _putwch_nolock(long)
@ cdecl _putws(wstr) MSVCRT__putws
# extern _pwctype
@ cdecl _read(long ptr long) MSVCRT__read

View File

@ -1597,8 +1597,8 @@
@ cdecl _putenv_s(str str)
@ cdecl _putw(long ptr) MSVCRT__putw
@ cdecl _putwc_nolock(long ptr) MSVCRT__fputwc_nolock
@ cdecl _putwch(long) MSVCRT__putwch
@ stub _putwch_nolock
@ cdecl _putwch(long)
@ cdecl _putwch_nolock(long)
@ cdecl _putws(wstr) MSVCRT__putws
# extern _pwctype
@ cdecl _read(long ptr long) MSVCRT__read

View File

@ -1605,8 +1605,8 @@
@ cdecl _putenv_s(str str)
@ cdecl _putw(long ptr) MSVCRT__putw
@ cdecl _putwc_nolock(long ptr) MSVCRT__fputwc_nolock
@ cdecl _putwch(long) MSVCRT__putwch
@ stub _putwch_nolock
@ cdecl _putwch(long)
@ cdecl _putwch_nolock(long)
@ cdecl _putws(wstr) MSVCRT__putws
# extern _pwctype
@ cdecl _read(long ptr long) MSVCRT__read

View File

@ -495,7 +495,7 @@
@ cdecl _putch(long)
@ cdecl _putenv(str)
@ cdecl _putw(long ptr) MSVCRT__putw
@ cdecl _putwch(long) MSVCRT__putwch
@ cdecl _putwch(long)
@ cdecl _putws(wstr) MSVCRT__putws
# extern _pwctype
@ cdecl _read(long ptr long) MSVCRT__read

View File

@ -490,7 +490,7 @@
@ cdecl _putch(long)
@ cdecl _putenv(str)
@ cdecl _putw(long ptr) MSVCRT__putw
@ cdecl _putwch(long) MSVCRT__putwch
@ cdecl _putwch(long)
@ cdecl _putws(wstr) MSVCRT__putws
# extern _pwctype
@ cdecl _read(long ptr long) MSVCRT__read

View File

@ -914,8 +914,8 @@
@ cdecl _putenv_s(str str)
@ cdecl _putw(long ptr) MSVCRT__putw
@ cdecl _putwc_nolock(long ptr) MSVCRT__fputwc_nolock
@ cdecl _putwch(long) MSVCRT__putwch
@ stub _putwch_nolock
@ cdecl _putwch(long)
@ cdecl _putwch_nolock(long)
@ cdecl _putws(wstr) MSVCRT__putws
# extern _pwctype
@ cdecl _read(long ptr long) MSVCRT__read

View File

@ -889,8 +889,8 @@
@ cdecl _putenv_s(str str)
@ cdecl _putw(long ptr) MSVCRT__putw
@ cdecl _putwc_nolock(long ptr) MSVCRT__fputwc_nolock
@ cdecl _putwch(long) MSVCRT__putwch
@ stub _putwch_nolock
@ cdecl _putwch(long)
@ cdecl _putwch_nolock(long)
@ cdecl _putws(wstr) MSVCRT__putws
# extern _pwctype
@ cdecl _read(long ptr long) MSVCRT__read

View File

@ -217,6 +217,28 @@ int CDECL _putch(int c)
return c;
}
/*********************************************************************
* _putwch_nolock (MSVCR80.@)
*/
MSVCRT_wchar_t CDECL _putwch_nolock(MSVCRT_wchar_t c)
{
DWORD count;
if (WriteConsoleW(MSVCRT_console_out, &c, 1, &count, NULL) && count==1)
return c;
return MSVCRT_WEOF;
}
/*********************************************************************
* _putwch (MSVCRT.@)
*/
MSVCRT_wchar_t CDECL _putwch(MSVCRT_wchar_t c)
{
LOCK_CONSOLE;
c = _putwch_nolock(c);
UNLOCK_CONSOLE;
return c;
}
/*********************************************************************
* _getche_nolock (MSVCR80.@)
*/

View File

@ -4630,14 +4630,6 @@ int CDECL MSVCRT_putchar(int c)
return MSVCRT_fputc(c, MSVCRT_stdout);
}
/*********************************************************************
* _putwch (MSVCRT.@)
*/
int CDECL MSVCRT__putwch(int c)
{
return MSVCRT_fputwc(c, MSVCRT_stdout);
}
/*********************************************************************
* puts (MSVCRT.@)
*/

View File

@ -861,7 +861,7 @@
@ cdecl _putenv(str)
@ cdecl _putenv_s(str str)
@ cdecl _putw(long ptr) MSVCRT__putw
@ cdecl _putwch(long) MSVCRT__putwch
@ cdecl _putwch(long)
@ cdecl _putws(wstr) MSVCRT__putws
# extern _pwctype
@ cdecl _read(long ptr long) MSVCRT__read