Piotr Caban : msvcrt: Add _wctype table.
Alexandre Julliard
julliard at winehq.org
Tue Jul 21 15:40:20 CDT 2020
Module: wine
Branch: master
Commit: 144803a54571a6a514b06f4719ff6215eb325e5c
URL: https://source.winehq.org/git/wine.git/?a=commit;h=144803a54571a6a514b06f4719ff6215eb325e5c
Author: Piotr Caban <piotr at codeweavers.com>
Date: Tue Jul 21 12:21:08 2020 +0200
msvcrt: Add _wctype table.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
.../api-ms-win-crt-string-l1-1-0.spec | 2 +-
dlls/msvcr100/msvcr100.spec | 2 +-
dlls/msvcr110/msvcr110.spec | 2 +-
dlls/msvcr120/msvcr120.spec | 2 +-
dlls/msvcr120_app/msvcr120_app.spec | 2 +-
dlls/msvcr70/msvcr70.spec | 2 +-
dlls/msvcr71/msvcr71.spec | 2 +-
dlls/msvcr80/msvcr80.spec | 2 +-
dlls/msvcr90/msvcr90.spec | 2 +-
dlls/msvcrt/ctype.c | 74 ++++++++++++++++++++++
dlls/msvcrt/msvcrt.spec | 2 +-
dlls/ucrtbase/ucrtbase.spec | 2 +-
12 files changed, 85 insertions(+), 11 deletions(-)
diff --git a/dlls/api-ms-win-crt-string-l1-1-0/api-ms-win-crt-string-l1-1-0.spec b/dlls/api-ms-win-crt-string-l1-1-0/api-ms-win-crt-string-l1-1-0.spec
index 6a68274479..ec984da1e8 100644
--- a/dlls/api-ms-win-crt-string-l1-1-0/api-ms-win-crt-string-l1-1-0.spec
+++ b/dlls/api-ms-win-crt-string-l1-1-0/api-ms-win-crt-string-l1-1-0.spec
@@ -96,7 +96,7 @@
@ cdecl _wcsupr_s(wstr long) ucrtbase._wcsupr_s
@ cdecl _wcsupr_s_l(wstr long ptr) ucrtbase._wcsupr_s_l
@ cdecl _wcsxfrm_l(ptr wstr long ptr) ucrtbase._wcsxfrm_l
-@ stub _wctype
+@ extern _wctype ucrtbase._wctype
@ cdecl is_wctype(long long) ucrtbase.is_wctype
@ cdecl isalnum(long) ucrtbase.isalnum
@ cdecl isalpha(long) ucrtbase.isalpha
diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec
index 6451fda152..df3f1784e5 100644
--- a/dlls/msvcr100/msvcr100.spec
+++ b/dlls/msvcr100/msvcr100.spec
@@ -1531,7 +1531,7 @@
@ cdecl _wctime64_s(ptr long ptr) MSVCRT__wctime64_s
@ cdecl _wctomb_l(ptr long ptr) MSVCRT__wctomb_l
@ cdecl _wctomb_s_l(ptr ptr long long ptr) MSVCRT__wctomb_s_l
-# extern _wctype
+@ extern _wctype MSVCRT__wctype
@ cdecl _wdupenv_s(ptr ptr wstr)
@ extern _wenviron MSVCRT__wenviron
@ varargs _wexecl(wstr wstr)
diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec
index abfbb846b3..e449b14f29 100644
--- a/dlls/msvcr110/msvcr110.spec
+++ b/dlls/msvcr110/msvcr110.spec
@@ -1889,7 +1889,7 @@
@ cdecl _wctime64_s(ptr long ptr) MSVCRT__wctime64_s
@ cdecl _wctomb_l(ptr long ptr) MSVCRT__wctomb_l
@ cdecl _wctomb_s_l(ptr ptr long long ptr) MSVCRT__wctomb_s_l
-# extern _wctype
+@ extern _wctype MSVCRT__wctype
@ cdecl _wdupenv_s(ptr ptr wstr)
@ extern _wenviron MSVCRT__wenviron
@ varargs _wexecl(wstr wstr)
diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec
index 00a1c3e49e..5c3bcfe9b9 100644
--- a/dlls/msvcr120/msvcr120.spec
+++ b/dlls/msvcr120/msvcr120.spec
@@ -1913,7 +1913,7 @@
@ cdecl _wctime64_s(ptr long ptr) MSVCRT__wctime64_s
@ cdecl _wctomb_l(ptr long ptr) MSVCRT__wctomb_l
@ cdecl _wctomb_s_l(ptr ptr long long ptr) MSVCRT__wctomb_s_l
-# extern _wctype
+@ extern _wctype MSVCRT__wctype
@ cdecl _wdupenv_s(ptr ptr wstr)
@ extern _wenviron MSVCRT__wenviron
@ varargs _wexecl(wstr wstr)
diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec
index e622f95af1..0cfd4bbf5e 100644
--- a/dlls/msvcr120_app/msvcr120_app.spec
+++ b/dlls/msvcr120_app/msvcr120_app.spec
@@ -1606,7 +1606,7 @@
@ cdecl _wctime64_s(ptr long ptr) msvcr120._wctime64_s
@ cdecl _wctomb_l(ptr long ptr) msvcr120._wctomb_l
@ cdecl _wctomb_s_l(ptr ptr long long ptr) msvcr120._wctomb_s_l
-# extern _wctype
+@ extern _wctype msvcr120._wctype
@ extern _wenviron msvcr120._wenviron
@ cdecl _wfdopen(long wstr) msvcr120._wfdopen
@ cdecl _wfindfirst32(wstr ptr) msvcr120._wfindfirst32
diff --git a/dlls/msvcr70/msvcr70.spec b/dlls/msvcr70/msvcr70.spec
index 2649034abd..12ca4ac47c 100644
--- a/dlls/msvcr70/msvcr70.spec
+++ b/dlls/msvcr70/msvcr70.spec
@@ -610,7 +610,7 @@
@ cdecl _wcsupr(wstr) MSVCRT__wcsupr
@ cdecl _wctime(ptr) MSVCRT__wctime
@ cdecl _wctime64(ptr) MSVCRT__wctime64
-# extern _wctype
+@ extern _wctype MSVCRT__wctype
@ extern _wenviron MSVCRT__wenviron
@ varargs _wexecl(wstr wstr)
@ varargs _wexecle(wstr wstr)
diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec
index 9d3e2b2ebe..009b3237c8 100644
--- a/dlls/msvcr71/msvcr71.spec
+++ b/dlls/msvcr71/msvcr71.spec
@@ -606,7 +606,7 @@
@ cdecl _wcsupr(wstr) MSVCRT__wcsupr
@ cdecl _wctime(ptr) MSVCRT__wctime
@ cdecl _wctime64(ptr) MSVCRT__wctime64
-# extern _wctype
+@ extern _wctype MSVCRT__wctype
@ extern _wenviron MSVCRT__wenviron
@ varargs _wexecl(wstr wstr)
@ varargs _wexecle(wstr wstr)
diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec
index aaa1b499c5..121b1110ee 100644
--- a/dlls/msvcr80/msvcr80.spec
+++ b/dlls/msvcr80/msvcr80.spec
@@ -1210,7 +1210,7 @@
@ cdecl _wctime64_s(ptr long ptr) MSVCRT__wctime64_s
@ cdecl _wctomb_l(ptr long ptr) MSVCRT__wctomb_l
@ cdecl _wctomb_s_l(ptr ptr long long ptr) MSVCRT__wctomb_s_l
-# extern _wctype
+@ extern _wctype MSVCRT__wctype
@ cdecl _wdupenv_s(ptr ptr wstr)
@ extern _wenviron MSVCRT__wenviron
@ varargs _wexecl(wstr wstr)
diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec
index 9267c5b1dd..ca44f28932 100644
--- a/dlls/msvcr90/msvcr90.spec
+++ b/dlls/msvcr90/msvcr90.spec
@@ -1186,7 +1186,7 @@
@ cdecl _wctime64_s(ptr long ptr) MSVCRT__wctime64_s
@ cdecl _wctomb_l(ptr long ptr) MSVCRT__wctomb_l
@ cdecl _wctomb_s_l(ptr ptr long long ptr) MSVCRT__wctomb_s_l
-# extern _wctype
+@ extern _wctype MSVCRT__wctype
@ cdecl _wdupenv_s(ptr ptr wstr)
@ extern _wenviron MSVCRT__wenviron
@ varargs _wexecl(wstr wstr)
diff --git a/dlls/msvcrt/ctype.c b/dlls/msvcrt/ctype.c
index e051c01521..b8e41a2c4d 100644
--- a/dlls/msvcrt/ctype.c
+++ b/dlls/msvcrt/ctype.c
@@ -51,6 +51,80 @@ WORD MSVCRT__ctype [257] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
};
+#if _MSVCR_VER <= 110
+# define B110 MSVCRT__BLANK
+#else
+# define B110 0
+#endif
+
+#if _MSVCR_VER == 120
+# define D120 0
+#else
+# define D120 4
+#endif
+
+#if _MSVCR_VER >= 140
+# define S140 MSVCRT__SPACE
+# define L140 MSVCRT__LOWER | 0x100
+# define C140 MSVCRT__CONTROL
+#else
+# define S140 0
+# define L140 0
+# define C140 0
+#endif
+WORD MSVCRT__wctype[257] =
+{
+ 0,
+ /* 00 */
+ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020,
+ 0x0020, 0x0028 | B110, 0x0028, 0x0028, 0x0028, 0x0028, 0x0020, 0x0020,
+ /* 10 */
+ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020,
+ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020,
+ /* 20 */
+ 0x0048, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010,
+ 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010,
+ /* 30 */
+ 0x0084, 0x0084, 0x0084, 0x0084, 0x0084, 0x0084, 0x0084, 0x0084,
+ 0x0084, 0x0084, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010,
+ /* 40 */
+ 0x0010, 0x0181, 0x0181, 0x0181, 0x0181, 0x0181, 0x0181, 0x0101,
+ 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
+ /* 50 */
+ 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
+ 0x0101, 0x0101, 0x0101, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010,
+ /* 60 */
+ 0x0010, 0x0182, 0x0182, 0x0182, 0x0182, 0x0182, 0x0182, 0x0102,
+ 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102,
+ /* 70 */
+ 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102,
+ 0x0102, 0x0102, 0x0102, 0x0010, 0x0010, 0x0010, 0x0010, 0x0020,
+ /* 80 */
+ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020 | S140, 0x0020, 0x0020,
+ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020,
+ /* 90 */
+ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020,
+ 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020, 0x0020,
+ /* a0 */
+ 0x0008 | B110, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010,
+ 0x0010, 0x0010, 0x0010 | L140, 0x0010, 0x0010, 0x0010 | C140, 0x0010, 0x0010,
+ /* b0 */
+ 0x0010, 0x0010, 0x0010 | D120, 0x0010 | D120, 0x0010, 0x0010 | L140, 0x0010, 0x0010,
+ 0x0010, 0x0010 | D120, 0x0010 | L140, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010,
+ /* c0 */
+ 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
+ 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101,
+ /* d0 */
+ 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0010,
+ 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0101, 0x0102,
+ /* e0 */
+ 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102,
+ 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102,
+ /* f0 */
+ 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0010,
+ 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102, 0x0102
+};
+
/*********************************************************************
* __p__pctype (MSVCRT.@)
*/
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index 1d26169cc1..58149de285 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -1141,7 +1141,7 @@
@ cdecl _wctime64_s(ptr long ptr) MSVCRT__wctime64_s
@ cdecl _wctomb_l(ptr long ptr) MSVCRT__wctomb_l
@ cdecl _wctomb_s_l(ptr ptr long long ptr) MSVCRT__wctomb_s_l
-# extern _wctype
+@ extern _wctype MSVCRT__wctype
@ extern _wenviron MSVCRT__wenviron
@ varargs _wexecl(wstr wstr)
@ varargs _wexecle(wstr wstr)
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec
index 8493ae79ba..7aebd81e02 100644
--- a/dlls/ucrtbase/ucrtbase.spec
+++ b/dlls/ucrtbase/ucrtbase.spec
@@ -2062,7 +2062,7 @@
@ cdecl _wctime64_s(ptr long ptr) MSVCRT__wctime64_s
@ cdecl _wctomb_l(ptr long ptr) MSVCRT__wctomb_l
@ cdecl _wctomb_s_l(ptr ptr long long ptr) MSVCRT__wctomb_s_l
-@ stub _wctype
+@ extern _wctype MSVCRT__wctype
@ cdecl _wdupenv_s(ptr ptr wstr)
@ varargs _wexecl(wstr wstr)
@ varargs _wexecle(wstr wstr)
More information about the wine-cvs
mailing list