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 270e2c23da..3f60bb4162 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 @@ -43,7 +43,7 @@ @ cdecl _ismbcl1(long) ucrtbase._ismbcl1 @ cdecl _ismbcl1_l(long ptr) ucrtbase._ismbcl1_l @ cdecl _ismbcl2(long) ucrtbase._ismbcl2 -@ stub _ismbcl2_l +@ cdecl _ismbcl2_l(long ptr) ucrtbase._ismbcl2_l @ cdecl _ismbclegal(long) ucrtbase._ismbclegal @ cdecl _ismbclegal_l(long ptr) ucrtbase._ismbclegal_l @ cdecl _ismbclower(long) ucrtbase._ismbclower diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 202042da58..eefa57348d 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -991,7 +991,7 @@ @ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) -@ stub _ismbcl2_l +@ cdecl _ismbcl2_l(long ptr) @ cdecl _ismbclegal(long) @ cdecl _ismbclegal_l(long ptr) @ cdecl _ismbclower(long) diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 1f4bfe3a92..a6ed5c1235 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1337,7 +1337,7 @@ @ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) -@ stub _ismbcl2_l +@ cdecl _ismbcl2_l(long ptr) @ cdecl _ismbclegal(long) @ cdecl _ismbclegal_l(long ptr) @ stub _ismbclower(long) diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 7e03eb1e99..441c0bee86 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -1342,7 +1342,7 @@ @ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) -@ stub _ismbcl2_l +@ cdecl _ismbcl2_l(long ptr) @ cdecl _ismbclegal(long) @ cdecl _ismbclegal_l(long ptr) @ stub _ismbclower(long) diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 7dc4ea881c..43c3e46325 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -663,7 +663,7 @@ @ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) -@ stub _ismbcl2_l +@ cdecl _ismbcl2_l(long ptr) @ cdecl _ismbclegal(long) @ cdecl _ismbclegal_l(long ptr) @ cdecl _ismbclower(long) diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 16a24735ff..a9bf0a2702 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -641,7 +641,7 @@ @ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) -@ stub _ismbcl2_l +@ cdecl _ismbcl2_l(long ptr) @ cdecl _ismbclegal(long) @ cdecl _ismbclegal_l(long ptr) @ cdecl _ismbclower(long) diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index 909ea46371..1026465644 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -2608,3 +2608,24 @@ int CDECL _ismbcl1(unsigned int c) { return _ismbcl1_l(c, NULL); } + +/********************************************************************* + * _ismbcl2_l (MSVCRT.@) + */ +int CDECL _ismbcl2_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-2 */ + return _ismbclegal(c) && c >= 0x989f && c <= 0xeaa4; + } + + return 0; +} diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 1f9ad647cf..42de9ced96 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -612,7 +612,7 @@ @ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) -# stub _ismbcl2_l(long ptr) +@ cdecl _ismbcl2_l(long ptr) @ cdecl _ismbclegal(long) @ cdecl _ismbclegal_l(long ptr) @ cdecl _ismbclower(long) diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index db894a0eb9..e1315ec1ce 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -481,7 +481,7 @@ @ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) @ stub _ismbcl2(long) -@ stub _ismbcl2_l +@ cdecl _ismbcl2_l(long ptr) @ cdecl _ismbclegal(long) @ cdecl _ismbclegal_l(long ptr) @ stub _ismbclower(long)
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 | 15 +++++++++++++++ dlls/ucrtbase/ucrtbase.spec | 2 +- 11 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index eefa57348d..aa817bfba3 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -990,7 +990,7 @@ @ cdecl _ismbcl0_l(long ptr) @ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) -@ stub _ismbcl2(long) +@ cdecl _ismbcl2(long) @ cdecl _ismbcl2_l(long ptr) @ cdecl _ismbclegal(long) @ cdecl _ismbclegal_l(long ptr) diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index a6ed5c1235..1b85830642 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1336,7 +1336,7 @@ @ cdecl _ismbcl0_l(long ptr) @ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) -@ stub _ismbcl2(long) +@ cdecl _ismbcl2(long) @ cdecl _ismbcl2_l(long ptr) @ cdecl _ismbclegal(long) @ cdecl _ismbclegal_l(long ptr) diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 441c0bee86..769ee50790 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -1341,7 +1341,7 @@ @ cdecl _ismbcl0_l(long ptr) @ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) -@ stub _ismbcl2(long) +@ cdecl _ismbcl2(long) @ cdecl _ismbcl2_l(long ptr) @ cdecl _ismbclegal(long) @ cdecl _ismbclegal_l(long ptr) diff --git a/dlls/msvcr70/msvcr70.spec b/dlls/msvcr70/msvcr70.spec index 629dce95d8..1a68a65f72 100644 --- a/dlls/msvcr70/msvcr70.spec +++ b/dlls/msvcr70/msvcr70.spec @@ -383,7 +383,7 @@ @ cdecl _ismbckata(long) @ cdecl _ismbcl0(long) @ cdecl _ismbcl1(long) -@ stub _ismbcl2(long) +@ cdecl _ismbcl2(long) @ cdecl _ismbclegal(long) @ cdecl _ismbclower(long) @ cdecl _ismbcprint(long) diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec index f0009beb6c..f4c0e6d0fa 100644 --- a/dlls/msvcr71/msvcr71.spec +++ b/dlls/msvcr71/msvcr71.spec @@ -378,7 +378,7 @@ @ cdecl _ismbckata(long) @ cdecl _ismbcl0(long) @ cdecl _ismbcl1(long) -@ stub _ismbcl2(long) +@ cdecl _ismbcl2(long) @ cdecl _ismbclegal(long) @ cdecl _ismbclower(long) @ cdecl _ismbcprint(long) diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 43c3e46325..8295a71290 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -662,7 +662,7 @@ @ cdecl _ismbcl0_l(long ptr) @ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) -@ stub _ismbcl2(long) +@ cdecl _ismbcl2(long) @ cdecl _ismbcl2_l(long ptr) @ cdecl _ismbclegal(long) @ cdecl _ismbclegal_l(long ptr) diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index a9bf0a2702..9e9777053e 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -640,7 +640,7 @@ @ cdecl _ismbcl0_l(long ptr) @ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) -@ stub _ismbcl2(long) +@ cdecl _ismbcl2(long) @ cdecl _ismbcl2_l(long ptr) @ cdecl _ismbclegal(long) @ cdecl _ismbclegal_l(long ptr) diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index 1026465644..a0560efed4 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -2629,3 +2629,11 @@ int CDECL _ismbcl2_l(unsigned int c, MSVCRT__locale_t locale)
return 0; } + +/********************************************************************* + * _ismbcl2 (MSVCRT.@) + */ +int CDECL _ismbcl2(unsigned int c) +{ + return _ismbcl2_l(c, NULL); +} diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 42de9ced96..c2c272b637 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -611,7 +611,7 @@ @ cdecl _ismbcl0_l(long ptr) @ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) -@ stub _ismbcl2(long) +@ cdecl _ismbcl2(long) @ cdecl _ismbcl2_l(long ptr) @ cdecl _ismbclegal(long) @ cdecl _ismbclegal_l(long ptr) diff --git a/dlls/msvcrt/tests/string.c b/dlls/msvcrt/tests/string.c index 53fbfd334b..eb8e304107 100644 --- a/dlls/msvcrt/tests/string.c +++ b/dlls/msvcrt/tests/string.c @@ -3278,6 +3278,9 @@ static void test__ismbclx(void) ret = _ismbcl1(0); ok(!ret, "got %d\n", ret);
+ ret = _ismbcl2(0); + ok(!ret, "got %d\n", ret); + cp = _setmbcp(1252);
ret = _ismbcl0(0x8140); @@ -3286,6 +3289,9 @@ static void test__ismbclx(void) ret = _ismbcl1(0x889f); ok(!ret, "got %d\n", ret);
+ ret = _ismbcl2(0x989f); + ok(!ret, "got %d\n", ret); + _setmbcp(932);
ret = _ismbcl0(0); @@ -3306,6 +3312,15 @@ static void test__ismbclx(void) ret = _ismbcl1(0x88fd); ok(!ret, "got %d\n", ret);
+ ret = _ismbcl2(0); + ok(!ret, "got %d\n", ret); + + ret = _ismbcl2(0x989f); + ok(ret, "got %d\n", ret); + + ret = _ismbcl2(0x993f); + ok(!ret, "got %d\n", ret); + _setmbcp(cp); }
diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index e1315ec1ce..eb08843d16 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -480,7 +480,7 @@ @ cdecl _ismbcl0_l(long ptr) @ cdecl _ismbcl1(long) @ cdecl _ismbcl1_l(long ptr) -@ stub _ismbcl2(long) +@ cdecl _ismbcl2(long) @ cdecl _ismbcl2_l(long ptr) @ cdecl _ismbclegal(long) @ cdecl _ismbclegal_l(long ptr)