diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 194554bc152..3e4badc0830 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -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 diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 91146329ee6..25efacdc7af 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -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 diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 9537d79d1c9..148b378a877 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -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 diff --git a/dlls/msvcr70/msvcr70.spec b/dlls/msvcr70/msvcr70.spec index c494ce0bbc7..51415a92e8e 100644 --- a/dlls/msvcr70/msvcr70.spec +++ b/dlls/msvcr70/msvcr70.spec @@ -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 diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec index f8a52f1c9f8..a28725bfd0c 100644 --- a/dlls/msvcr71/msvcr71.spec +++ b/dlls/msvcr71/msvcr71.spec @@ -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 diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 00f7ab2ade5..3c1bb873770 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -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 diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 9384a3ff14b..547f66818c1 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -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 diff --git a/dlls/msvcrt/console.c b/dlls/msvcrt/console.c index 3da7fb8ada5..d6bd40ec85f 100644 --- a/dlls/msvcrt/console.c +++ b/dlls/msvcrt/console.c @@ -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.@) */ diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 1069cf73949..241c337f6da 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -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.@) */ diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 1f2a8ce65a9..46cbf085baf 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -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