diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 2a3ab477e6b..ce36cdf86ac 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -909,8 +909,8 @@ @ cdecl _getwc_nolock(ptr) MSVCRT__fgetwc_nolock @ cdecl _getwch() @ cdecl _getwch_nolock() -@ stub _getwche -@ stub _getwche_nolock +@ cdecl _getwche() +@ cdecl _getwche_nolock() @ cdecl _getws(ptr) MSVCRT__getws @ stub _getws_s @ cdecl -arch=i386 _global_unwind2(ptr) diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index d0a4c0529ad..8cf12020b1f 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1256,8 +1256,8 @@ @ cdecl _getwc_nolock(ptr) MSVCRT__fgetwc_nolock @ cdecl _getwch() @ cdecl _getwch_nolock() -@ stub _getwche -@ stub _getwche_nolock +@ cdecl _getwche() +@ cdecl _getwche_nolock() @ cdecl _getws(ptr) MSVCRT__getws @ stub _getws_s @ cdecl -arch=i386 _global_unwind2(ptr) diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index a86edffc943..bbf8f90fabc 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -1254,8 +1254,8 @@ @ cdecl _getwc_nolock(ptr) MSVCRT__fgetwc_nolock @ cdecl _getwch() @ cdecl _getwch_nolock() -@ stub _getwche -@ stub _getwche_nolock +@ cdecl _getwche() +@ cdecl _getwche_nolock() @ cdecl _getws(ptr) MSVCRT__getws @ stub _getws_s @ cdecl -arch=i386 _global_unwind2(ptr) diff --git a/dlls/msvcr70/msvcr70.spec b/dlls/msvcr70/msvcr70.spec index 09056037ade..299a645e8c7 100644 --- a/dlls/msvcr70/msvcr70.spec +++ b/dlls/msvcr70/msvcr70.spec @@ -344,7 +344,7 @@ @ stub _getsystime(ptr) @ cdecl _getw(ptr) MSVCRT__getw @ cdecl _getwch() -@ stub _getwche +@ cdecl _getwche() @ cdecl _getws(ptr) MSVCRT__getws @ cdecl -arch=i386 _global_unwind2(ptr) @ cdecl _gmtime64(ptr) MSVCRT__gmtime64 diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec index 35e515e18a9..4741b859b3f 100644 --- a/dlls/msvcr71/msvcr71.spec +++ b/dlls/msvcr71/msvcr71.spec @@ -339,7 +339,7 @@ @ stub _getsystime(ptr) @ cdecl _getw(ptr) MSVCRT__getw @ cdecl _getwch() -@ stub _getwche +@ cdecl _getwche() @ cdecl _getws(ptr) MSVCRT__getws @ cdecl -arch=i386 _global_unwind2(ptr) @ cdecl _gmtime64(ptr) MSVCRT__gmtime64 diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 7b37e712a7f..8f1f6f988ca 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -583,8 +583,8 @@ @ cdecl _getwc_nolock(ptr) MSVCRT__fgetwc_nolock @ cdecl _getwch() @ cdecl _getwch_nolock() -@ stub _getwche -@ stub _getwche_nolock +@ cdecl _getwche() +@ cdecl _getwche_nolock() @ cdecl _getws(ptr) MSVCRT__getws @ stub _getws_s @ cdecl -arch=i386 _global_unwind2(ptr) diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index f7a981820f3..109e2adc1c7 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -560,8 +560,8 @@ @ cdecl _getwc_nolock(ptr) MSVCRT__fgetwc_nolock @ cdecl _getwch() @ cdecl _getwch_nolock() -@ stub _getwche -@ stub _getwche_nolock +@ cdecl _getwche() +@ cdecl _getwche_nolock() @ cdecl _getws(ptr) MSVCRT__getws @ stub _getws_s @ cdecl -arch=i386 _global_unwind2(ptr) diff --git a/dlls/msvcrt/console.c b/dlls/msvcrt/console.c index 9c3cccfed68..59b1dbbbf8b 100644 --- a/dlls/msvcrt/console.c +++ b/dlls/msvcrt/console.c @@ -353,6 +353,31 @@ int CDECL _getche(void) return ret; } +/********************************************************************* + * _getwche_nolock (MSVCR80.@) + */ +MSVCRT_wchar_t CDECL _getwche_nolock(void) +{ + MSVCRT_wchar_t wch; + wch = _getch_nolock(); + if (wch == MSVCRT_WEOF) + return wch; + return _putwch_nolock(wch); +} + +/********************************************************************* + * _getwche (MSVCRT.@) + */ +MSVCRT_wchar_t CDECL _getwche(void) +{ + MSVCRT_wchar_t ret; + + LOCK_CONSOLE; + ret = _getwche_nolock(); + UNLOCK_CONSOLE; + return ret; +} + /********************************************************************* * _cgets (MSVCRT.@) */ diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 4ac232cafd7..b81ebf916d0 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -534,7 +534,7 @@ @ stub _getsystime(ptr) @ cdecl _getw(ptr) MSVCRT__getw @ cdecl _getwch() -# stub _getwche() +@ cdecl _getwche() @ cdecl _getws(ptr) MSVCRT__getws @ cdecl -arch=i386 _global_unwind2(ptr) @ cdecl _gmtime32(ptr) MSVCRT__gmtime32