Piotr Caban : msvcrt: Add _getwche implementation.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Jun 15 08:49:08 CDT 2015


Module: wine
Branch: master
Commit: d4fab07110aeb5d61339aa917ea0b1b6d7f77fa0
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d4fab07110aeb5d61339aa917ea0b1b6d7f77fa0

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Sun Jun 14 14:31:23 2015 +0200

msvcrt: Add _getwche implementation.

---

 dlls/msvcr100/msvcr100.spec |  4 ++--
 dlls/msvcr110/msvcr110.spec |  4 ++--
 dlls/msvcr120/msvcr120.spec |  4 ++--
 dlls/msvcr70/msvcr70.spec   |  2 +-
 dlls/msvcr71/msvcr71.spec   |  2 +-
 dlls/msvcr80/msvcr80.spec   |  4 ++--
 dlls/msvcr90/msvcr90.spec   |  4 ++--
 dlls/msvcrt/console.c       | 25 +++++++++++++++++++++++++
 dlls/msvcrt/msvcrt.spec     |  2 +-
 9 files changed, 38 insertions(+), 13 deletions(-)

diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec
index 2a3ab47..ce36cdf 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 d0a4c05..8cf1202 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 a86edff..bbf8f90 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 0905603..299a645 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 35e515e..4741b85 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 7b37e71..8f1f6f9 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 f7a9818..109e2ad 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 9c3cccf..59b1dbb 100644
--- a/dlls/msvcrt/console.c
+++ b/dlls/msvcrt/console.c
@@ -354,6 +354,31 @@ int CDECL _getche(void)
 }
 
 /*********************************************************************
+ *              _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.@)
  */
 char* CDECL _cgets(char* str)
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index 4ac232c..b81ebf9 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




More information about the wine-cvs mailing list