From 790f97cb3080bbec2794f608893f4b4176887e43 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Thu, 14 Feb 2019 14:35:02 +0100 Subject: [PATCH] msvcrt: Add _ismbbtrail_l implementation. Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- .../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/msvcr120_app/msvcr120_app.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- dlls/msvcrt/mbcs.c | 16 +++++++++++++++- dlls/msvcrt/msvcrt.spec | 2 +- dlls/ucrtbase/ucrtbase.spec | 2 +- 10 files changed, 24 insertions(+), 10 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 1c987d0fc74..31ccd0fd11e 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 @@ -23,7 +23,7 @@ @ cdecl _ismbbpunct(long) ucrtbase._ismbbpunct @ stub _ismbbpunct_l @ cdecl _ismbbtrail(long) ucrtbase._ismbbtrail -@ stub _ismbbtrail_l +@ cdecl _ismbbtrail_l(long ptr) ucrtbase._ismbbtrail_l @ cdecl _ismbcalnum(long) ucrtbase._ismbcalnum @ stub _ismbcalnum_l @ cdecl _ismbcalpha(long) ucrtbase._ismbcalpha diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index c4574c67057..5e30c7772a1 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -973,7 +973,7 @@ @ stub _ismbbpunct(long) @ stub _ismbbpunct_l @ cdecl _ismbbtrail(long) -@ stub _ismbbtrail_l +@ cdecl _ismbbtrail_l(long ptr) @ cdecl _ismbcalnum(long) @ stub _ismbcalnum_l @ cdecl _ismbcalpha(long) diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 59ed70310ca..8f35f48bd12 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1319,7 +1319,7 @@ @ stub _ismbbpunct(long) @ stub _ismbbpunct_l @ cdecl _ismbbtrail(long) -@ stub _ismbbtrail_l +@ cdecl _ismbbtrail_l(long ptr) @ cdecl _ismbcalnum(long) @ stub _ismbcalnum_l @ cdecl _ismbcalpha(long) diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 4e25c6898df..49b33272d5c 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -1322,7 +1322,7 @@ @ stub _ismbbpunct(long) @ stub _ismbbpunct_l @ cdecl _ismbbtrail(long) -@ stub _ismbbtrail_l +@ cdecl _ismbbtrail_l(long ptr) @ cdecl _ismbcalnum(long) @ stub _ismbcalnum_l @ cdecl _ismbcalpha(long) diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index c1f6e0bcf08..e3323dd83ad 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -1225,7 +1225,7 @@ @ cdecl _ismbbpunct(long) msvcr120._ismbbpunct @ stub _ismbbpunct_l @ cdecl _ismbbtrail(long) msvcr120._ismbbtrail -@ stub _ismbbtrail_l +@ cdecl _ismbbtrail_l(long ptr) msvcr120._ismbbtrail_l @ cdecl _isnan(double) msvcr120._isnan @ cdecl -arch=x86_64 _isnanf(float) msvcr120._isnanf @ cdecl _isprint_l(long ptr) msvcr120._isprint_l diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index c9863d953c6..c1b3d8bd5cd 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -645,7 +645,7 @@ @ stub _ismbbpunct(long) @ stub _ismbbpunct_l @ cdecl _ismbbtrail(long) -@ stub _ismbbtrail_l +@ cdecl _ismbbtrail_l(long ptr) @ cdecl _ismbcalnum(long) @ stub _ismbcalnum_l @ cdecl _ismbcalpha(long) diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index b6861223ed9..3da8fdf991c 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -623,7 +623,7 @@ @ stub _ismbbpunct(long) @ stub _ismbbpunct_l @ cdecl _ismbbtrail(long) -@ stub _ismbbtrail_l +@ cdecl _ismbbtrail_l(long ptr) @ cdecl _ismbcalnum(long) @ stub _ismbcalnum_l @ cdecl _ismbcalpha(long) diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index d00c31af4cf..d470f100e3f 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -1551,13 +1551,27 @@ int CDECL _ismbblead(unsigned int c) return _ismbblead_l(c, NULL); } +/********************************************************************* + * _ismbbtrail_l(MSVCRT.@) + */ +int CDECL _ismbbtrail_l(unsigned int c, MSVCRT__locale_t locale) +{ + MSVCRT_pthreadmbcinfo mbcinfo; + + if(!locale) + mbcinfo = get_mbcinfo(); + else + mbcinfo = locale->mbcinfo; + + return (mbcinfo->mbctype[(c&0xff) + 1] & _M2) != 0; +} /********************************************************************* * _ismbbtrail(MSVCRT.@) */ int CDECL _ismbbtrail(unsigned int c) { - return (get_mbcinfo()->mbctype[(c&0xff) + 1] & _M2) != 0; + return _ismbbtrail_l(c, NULL); } /********************************************************************* diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 2a74d5186c7..0154998f059 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -594,7 +594,7 @@ @ stub _ismbbpunct(long) # stub _ismbbpunct_l(long ptr) @ cdecl _ismbbtrail(long) -# stub _ismbbtrail_l(long ptr) +@ cdecl _ismbbtrail_l(long ptr) @ cdecl _ismbcalnum(long) # stub _ismbcalnum_l(long ptr) @ cdecl _ismbcalpha(long) diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 2d1d8da3562..021d9b24e4f 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -461,7 +461,7 @@ @ stub _ismbbpunct(long) @ stub _ismbbpunct_l @ cdecl _ismbbtrail(long) -@ stub _ismbbtrail_l +@ cdecl _ismbbtrail_l(long ptr) @ cdecl _ismbcalnum(long) @ stub _ismbcalnum_l @ cdecl _ismbcalpha(long)