Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- .../api-ms-win-crt-multibyte-l1-1-0.spec | 2 +- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/mbcs.c | 27 ++++++++++++++----- dlls/msvcrt/msvcrt.spec | 2 +- dlls/ucrtbase/ucrtbase.spec | 2 +- 9 files changed, 29 insertions(+), 14 deletions(-)
diff --git a/dlls/api-ms-win-crt-multibyte-l1-1-0/api-ms-win-crt-multibyte-l1-1-0.spec b/dlls/api-ms-win-crt-multibyte-l1-1-0/api-ms-win-crt-multibyte-l1-1-0.spec index 1c987d0fc7..3ea8b3c470 100644 --- a/dlls/api-ms-win-crt-multibyte-l1-1-0/api-ms-win-crt-multibyte-l1-1-0.spec +++ b/dlls/api-ms-win-crt-multibyte-l1-1-0/api-ms-win-crt-multibyte-l1-1-0.spec @@ -39,7 +39,7 @@ @ cdecl _ismbckata(long) ucrtbase._ismbckata @ stub _ismbckata_l @ cdecl _ismbcl0(long) ucrtbase._ismbcl0 -@ stub _ismbcl0_l +@ cdecl _ismbcl0_l(long ptr) ucrtbase._ismbcl0_l @ cdecl _ismbcl1(long) ucrtbase._ismbcl1 @ stub _ismbcl1_l @ cdecl _ismbcl2(long) ucrtbase._ismbcl2 diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index c4574c6705..6973090cb3 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -987,7 +987,7 @@ @ cdecl _ismbckata(long) @ stub _ismbckata_l @ cdecl _ismbcl0(long) -@ stub _ismbcl0_l +@ cdecl _ismbcl0_l(long ptr) @ stub _ismbcl1(long) @ stub _ismbcl1_l @ stub _ismbcl2(long) diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 59ed70310c..f37380787d 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1333,7 +1333,7 @@ @ cdecl _ismbckata(long) @ stub _ismbckata_l @ cdecl _ismbcl0(long) -@ stub _ismbcl0_l +@ cdecl _ismbcl0_l(long ptr) @ stub _ismbcl1(long) @ stub _ismbcl1_l @ stub _ismbcl2(long) diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 4e25c6898d..43426bef34 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -1338,7 +1338,7 @@ @ cdecl _ismbckata(long) @ stub _ismbckata_l @ cdecl _ismbcl0(long) -@ stub _ismbcl0_l +@ cdecl _ismbcl0_l(long ptr) @ stub _ismbcl1(long) @ stub _ismbcl1_l @ stub _ismbcl2(long) diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index c9863d953c..c15d317923 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -659,7 +659,7 @@ @ cdecl _ismbckata(long) @ stub _ismbckata_l @ cdecl _ismbcl0(long) -@ stub _ismbcl0_l +@ cdecl _ismbcl0_l(long ptr) @ stub _ismbcl1(long) @ stub _ismbcl1_l @ stub _ismbcl2(long) diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index b6861223ed..35e75d69dd 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -637,7 +637,7 @@ @ cdecl _ismbckata(long) @ stub _ismbckata_l @ cdecl _ismbcl0(long) -@ stub _ismbcl0_l +@ cdecl _ismbcl0_l(long ptr) @ stub _ismbcl1(long) @ stub _ismbcl1_l @ stub _ismbcl2(long) diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index d00c31af4c..16905f95b5 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -2529,16 +2529,31 @@ unsigned int CDECL _mbctokata(unsigned int c) return c; }
+/********************************************************************* + * _ismbcl0_l (MSVCRT.@) + */ +int CDECL _ismbcl0_l(unsigned int c, MSVCRT__locale_t locale) +{ + MSVCRT_pthreadmbcinfo mbcinfo; + + if(!locale) + mbcinfo = get_mbcinfo(); + else + mbcinfo = locale->mbcinfo; + + if(mbcinfo->mbcodepage == 932) + { + /* JIS non-Kanji */ + return c >= 0x8140 && c <= 0x889e; + } + + return 0; +}
/********************************************************************* * _ismbcl0 (MSVCRT.@) */ int CDECL _ismbcl0(unsigned int c) { - if(get_mbcinfo()->mbcodepage == 932) - { - /* JIS non-Kanji */ - return (c >= 0x8140 && c <= 0x889e); - } - return 0; + return _ismbcl0_l(c, NULL); } diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 2a74d5186c..10e231b01e 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -608,7 +608,7 @@ @ cdecl _ismbckata(long) # stub _ismbckata_l(long ptr) @ cdecl _ismbcl0(long) -# stub _ismbcl0_l(long ptr) +@ cdecl _ismbcl0_l(long ptr) @ stub _ismbcl1(long) # stub _ismbcl1_l(long ptr) @ stub _ismbcl2(long) diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 2d1d8da356..6426eafdea 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -477,7 +477,7 @@ @ cdecl _ismbckata(long) @ stub _ismbckata_l @ cdecl _ismbcl0(long) -@ stub _ismbcl0_l +@ cdecl _ismbcl0_l(long ptr) @ stub _ismbcl1(long) @ stub _ismbcl1_l @ stub _ismbcl2(long)
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- .../api-ms-win-crt-multibyte-l1-1-0.spec | 2 +- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/mbcs.c | 21 +++++++++++++++++++ dlls/msvcrt/msvcrt.spec | 2 +- dlls/ucrtbase/ucrtbase.spec | 2 +- 9 files changed, 29 insertions(+), 8 deletions(-)
diff --git a/dlls/api-ms-win-crt-multibyte-l1-1-0/api-ms-win-crt-multibyte-l1-1-0.spec b/dlls/api-ms-win-crt-multibyte-l1-1-0/api-ms-win-crt-multibyte-l1-1-0.spec index 3ea8b3c470..6b3aabdf47 100644 --- a/dlls/api-ms-win-crt-multibyte-l1-1-0/api-ms-win-crt-multibyte-l1-1-0.spec +++ b/dlls/api-ms-win-crt-multibyte-l1-1-0/api-ms-win-crt-multibyte-l1-1-0.spec @@ -41,7 +41,7 @@ @ cdecl _ismbcl0(long) ucrtbase._ismbcl0 @ cdecl _ismbcl0_l(long ptr) ucrtbase._ismbcl0_l @ cdecl _ismbcl1(long) ucrtbase._ismbcl1 -@ stub _ismbcl1_l +@ cdecl _ismbcl1_l(long ptr) ucrtbase._ismbcl1_l @ cdecl _ismbcl2(long) ucrtbase._ismbcl2 @ stub _ismbcl2_l @ cdecl _ismbclegal(long) ucrtbase._ismbclegal diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 6973090cb3..9f74447e31 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -989,7 +989,7 @@ @ cdecl _ismbcl0(long) @ cdecl _ismbcl0_l(long ptr) @ stub _ismbcl1(long) -@ stub _ismbcl1_l +@ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) @ stub _ismbcl2_l @ cdecl _ismbclegal(long) diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index f37380787d..70a74646ee 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1335,7 +1335,7 @@ @ cdecl _ismbcl0(long) @ cdecl _ismbcl0_l(long ptr) @ stub _ismbcl1(long) -@ stub _ismbcl1_l +@ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) @ stub _ismbcl2_l @ cdecl _ismbclegal(long) diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 43426bef34..b22b058c61 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -1340,7 +1340,7 @@ @ cdecl _ismbcl0(long) @ cdecl _ismbcl0_l(long ptr) @ stub _ismbcl1(long) -@ stub _ismbcl1_l +@ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) @ stub _ismbcl2_l @ cdecl _ismbclegal(long) diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index c15d317923..93347fd4b5 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -661,7 +661,7 @@ @ cdecl _ismbcl0(long) @ cdecl _ismbcl0_l(long ptr) @ stub _ismbcl1(long) -@ stub _ismbcl1_l +@ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) @ stub _ismbcl2_l @ cdecl _ismbclegal(long) diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 35e75d69dd..dd7205256d 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -639,7 +639,7 @@ @ cdecl _ismbcl0(long) @ cdecl _ismbcl0_l(long ptr) @ stub _ismbcl1(long) -@ stub _ismbcl1_l +@ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) @ stub _ismbcl2_l @ cdecl _ismbclegal(long) diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index 16905f95b5..ab16dad149 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -2550,6 +2550,27 @@ int CDECL _ismbcl0_l(unsigned int c, MSVCRT__locale_t locale) return 0; }
+/********************************************************************* + * _ismbcl1_l (MSVCRT.@) + */ +int CDECL _ismbcl1_l(unsigned int c, MSVCRT__locale_t locale) +{ + MSVCRT_pthreadmbcinfo mbcinfo; + + if(!locale) + mbcinfo = get_mbcinfo(); + else + mbcinfo = locale->mbcinfo; + + if(mbcinfo->mbcodepage == 932) + { + /* JIS level-1 */ + return c >= 0x889f && c <= 0x9872; + } + + return 0; +} + /********************************************************************* * _ismbcl0 (MSVCRT.@) */ diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 10e231b01e..19ffee579b 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -610,7 +610,7 @@ @ cdecl _ismbcl0(long) @ cdecl _ismbcl0_l(long ptr) @ stub _ismbcl1(long) -# stub _ismbcl1_l(long ptr) +@ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) # stub _ismbcl2_l(long ptr) @ cdecl _ismbclegal(long) diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 6426eafdea..32ddb44575 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -479,7 +479,7 @@ @ cdecl _ismbcl0(long) @ cdecl _ismbcl0_l(long ptr) @ stub _ismbcl1(long) -@ stub _ismbcl1_l +@ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) @ stub _ismbcl2_l @ cdecl _ismbclegal(long)
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46644 Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr70/msvcr70.spec | 2 +- dlls/msvcr71/msvcr71.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/mbcs.c | 8 ++++++++ dlls/msvcrt/msvcrt.spec | 2 +- dlls/msvcrt/tests/string.c | 12 ++++++++++++ dlls/ucrtbase/ucrtbase.spec | 2 +- 11 files changed, 29 insertions(+), 9 deletions(-)
diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 9f74447e31..8b1cc5d179 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -988,7 +988,7 @@ @ stub _ismbckata_l @ cdecl _ismbcl0(long) @ cdecl _ismbcl0_l(long ptr) -@ stub _ismbcl1(long) +@ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) @ stub _ismbcl2_l diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 70a74646ee..2d814fb055 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1334,7 +1334,7 @@ @ stub _ismbckata_l @ cdecl _ismbcl0(long) @ cdecl _ismbcl0_l(long ptr) -@ stub _ismbcl1(long) +@ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) @ stub _ismbcl2_l diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index b22b058c61..3cac0f4b6c 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -1339,7 +1339,7 @@ @ stub _ismbckata_l @ cdecl _ismbcl0(long) @ cdecl _ismbcl0_l(long ptr) -@ stub _ismbcl1(long) +@ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) @ stub _ismbcl2_l diff --git a/dlls/msvcr70/msvcr70.spec b/dlls/msvcr70/msvcr70.spec index e1b373f948..629dce95d8 100644 --- a/dlls/msvcr70/msvcr70.spec +++ b/dlls/msvcr70/msvcr70.spec @@ -382,7 +382,7 @@ @ cdecl _ismbchira(long) @ cdecl _ismbckata(long) @ cdecl _ismbcl0(long) -@ stub _ismbcl1(long) +@ cdecl _ismbcl1(long) @ stub _ismbcl2(long) @ cdecl _ismbclegal(long) @ cdecl _ismbclower(long) diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec index 24bd681a4e..f0009beb6c 100644 --- a/dlls/msvcr71/msvcr71.spec +++ b/dlls/msvcr71/msvcr71.spec @@ -377,7 +377,7 @@ @ cdecl _ismbchira(long) @ cdecl _ismbckata(long) @ cdecl _ismbcl0(long) -@ stub _ismbcl1(long) +@ cdecl _ismbcl1(long) @ stub _ismbcl2(long) @ cdecl _ismbclegal(long) @ cdecl _ismbclower(long) diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 93347fd4b5..a1f3ba5d96 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -660,7 +660,7 @@ @ stub _ismbckata_l @ cdecl _ismbcl0(long) @ cdecl _ismbcl0_l(long ptr) -@ stub _ismbcl1(long) +@ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) @ stub _ismbcl2_l diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index dd7205256d..87ce6621c4 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -638,7 +638,7 @@ @ stub _ismbckata_l @ cdecl _ismbcl0(long) @ cdecl _ismbcl0_l(long ptr) -@ stub _ismbcl1(long) +@ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) @ stub _ismbcl2_l diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index ab16dad149..593df734e5 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -2578,3 +2578,11 @@ int CDECL _ismbcl0(unsigned int c) { return _ismbcl0_l(c, NULL); } + +/********************************************************************* + * _ismbcl1 (MSVCRT.@) + */ +int CDECL _ismbcl1(unsigned int c) +{ + return _ismbcl1_l(c, NULL); +} diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 19ffee579b..7e5c8b6b6c 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -609,7 +609,7 @@ # stub _ismbckata_l(long ptr) @ cdecl _ismbcl0(long) @ cdecl _ismbcl0_l(long ptr) -@ stub _ismbcl1(long) +@ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) # stub _ismbcl2_l(long ptr) diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c index d0cc51bc4a..4a04a2d2cc 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -3275,11 +3275,17 @@ static void test__ismbclx(void) ret = _ismbcl0(0); ok(!ret, "got %d\n", ret);
+ ret = _ismbcl1(0); + ok(!ret, "got %d\n", ret); + cp = _setmbcp(1252);
ret = _ismbcl0(0x8140); ok(!ret, "got %d\n", ret);
+ ret = _ismbcl1(0x889f); + ok(!ret, "got %d\n", ret); + _setmbcp(932);
ret = _ismbcl0(0); @@ -3288,6 +3294,12 @@ static void test__ismbclx(void) ret = _ismbcl0(0x8140); ok(ret, "got %d\n", ret);
+ ret = _ismbcl1(0); + ok(!ret, "got %d\n", ret); + + ret = _ismbcl1(0x889f); + ok(ret, "got %d\n", ret); + _setmbcp(cp); }
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 32ddb44575..505f5ab1cd 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -478,7 +478,7 @@ @ stub _ismbckata_l @ cdecl _ismbcl0(long) @ cdecl _ismbcl0_l(long ptr) -@ stub _ismbcl1(long) +@ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) @ stub _ismbcl2_l