From 986aa52fc41e1cf022cc72a0f40996937bb567dc Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Thu, 16 Jul 2020 15:33:38 +0200 Subject: [PATCH] msvcrt: Add _ismbcpunct_l implementation. Signed-off-by: Piotr Caban Signed-off-by: Alexandre Julliard --- .../api-ms-win-crt-multibyte-l1-1-0.spec | 2 +- .../api-ms-win-crt-private-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 | 11 +++++++++-- dlls/msvcrt/msvcrt.h | 1 + dlls/msvcrt/msvcrt.spec | 2 +- dlls/ucrtbase/ucrtbase.spec | 4 ++-- 11 files changed, 20 insertions(+), 12 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 4f6a1f7679e..84ae0f449bf 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 @@ -51,7 +51,7 @@ @ cdecl _ismbcprint(long) ucrtbase._ismbcprint @ cdecl _ismbcprint_l(long ptr) ucrtbase._ismbcprint_l @ cdecl _ismbcpunct(long) ucrtbase._ismbcpunct -@ stub _ismbcpunct_l +@ cdecl _ismbcpunct_l(long ptr) ucrtbase._ismbcpunct_l @ cdecl _ismbcspace(long) ucrtbase._ismbcspace @ cdecl _ismbcspace_l(long ptr) ucrtbase._ismbcspace_l @ cdecl _ismbcsymbol(long) ucrtbase._ismbcsymbol diff --git a/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec b/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec index c6489ab9765..af84ff943b5 100644 --- a/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec +++ b/dlls/api-ms-win-crt-private-l1-1-0/api-ms-win-crt-private-l1-1-0.spec @@ -424,7 +424,7 @@ @ cdecl _o__ismbcprint(long) ucrtbase._o__ismbcprint @ cdecl _o__ismbcprint_l(long ptr) ucrtbase._o__ismbcprint_l @ cdecl _o__ismbcpunct(long) ucrtbase._o__ismbcpunct -@ stub _o__ismbcpunct_l +@ cdecl _o__ismbcpunct_l(long ptr) ucrtbase._o__ismbcpunct_l @ cdecl _o__ismbcspace(long) ucrtbase._o__ismbcspace @ cdecl _o__ismbcspace_l(long ptr) ucrtbase._o__ismbcspace_l @ cdecl _o__ismbcsymbol(long) ucrtbase._o__ismbcsymbol diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index f054026dd96..6451fda1520 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -999,7 +999,7 @@ @ cdecl _ismbcprint(long) @ cdecl _ismbcprint_l(long ptr) @ cdecl _ismbcpunct(long) -@ stub _ismbcpunct_l +@ cdecl _ismbcpunct_l(long ptr) @ cdecl _ismbcspace(long) @ cdecl _ismbcspace_l(long ptr) @ cdecl _ismbcsymbol(long) diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 3a4ed8f6d12..abfbb846b36 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -1345,7 +1345,7 @@ @ stub _ismbcprint(long) @ cdecl _ismbcprint_l(long ptr) @ cdecl _ismbcpunct(long) -@ stub _ismbcpunct_l +@ cdecl _ismbcpunct_l(long ptr) @ cdecl _ismbcspace(long) @ cdecl _ismbcspace_l(long ptr) @ cdecl _ismbcsymbol(long) diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 3d295f83244..00a1c3e49e0 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -1350,7 +1350,7 @@ @ cdecl _ismbcprint(long) @ cdecl _ismbcprint_l(long ptr) @ cdecl _ismbcpunct(long) -@ stub _ismbcpunct_l +@ cdecl _ismbcpunct_l(long ptr) @ cdecl _ismbcspace(long) @ cdecl _ismbcspace_l(long ptr) @ cdecl _ismbcsymbol(long) diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 55e43e6c51f..aaa1b499c52 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -671,7 +671,7 @@ @ cdecl _ismbcprint(long) @ cdecl _ismbcprint_l(long ptr) @ cdecl _ismbcpunct(long) -@ stub _ismbcpunct_l +@ cdecl _ismbcpunct_l(long ptr) @ cdecl _ismbcspace(long) @ cdecl _ismbcspace_l(long ptr) @ cdecl _ismbcsymbol(long) diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 55df1046f5b..9267c5b1ddc 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -649,7 +649,7 @@ @ cdecl _ismbcprint(long) @ cdecl _ismbcprint_l(long ptr) @ cdecl _ismbcpunct(long) -@ stub _ismbcpunct_l +@ cdecl _ismbcpunct_l(long ptr) @ cdecl _ismbcspace(long) @ cdecl _ismbcspace_l(long ptr) @ cdecl _ismbcsymbol(long) diff --git a/dlls/msvcrt/mbcs.c b/dlls/msvcrt/mbcs.c index a6b5e6d4dba..359ab6fdf4b 100644 --- a/dlls/msvcrt/mbcs.c +++ b/dlls/msvcrt/mbcs.c @@ -1570,13 +1570,20 @@ int CDECL _ismbcprint(unsigned int ch) return _ismbcprint_l( ch, NULL ); } +/********************************************************************* + * _ismbcpunct_l (MSVCRT.@) + */ +int CDECL _ismbcpunct_l(unsigned int ch, MSVCRT__locale_t locale) +{ + return MSVCRT__iswpunct_l( msvcrt_mbc_to_wc_l(ch, locale), locale ); +} + /********************************************************************* * _ismbcpunct(MSVCRT.@) */ int CDECL _ismbcpunct(unsigned int ch) { - MSVCRT_wchar_t wch = msvcrt_mbc_to_wc( ch ); - return (get_char_typeW( wch ) & C1_PUNCT); + return _ismbcpunct_l( ch, NULL ); } /********************************************************************* diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 68245f6fdc2..9395b7ecac8 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -1208,6 +1208,7 @@ int __cdecl MSVCRT__iswalpha_l(MSVCRT_wchar_t, MSVCRT__locale_t); int __cdecl MSVCRT__iswlower_l(MSVCRT_wchar_t, MSVCRT__locale_t); int __cdecl MSVCRT__iswupper_l(MSVCRT_wchar_t, MSVCRT__locale_t); int __cdecl MSVCRT__iswprint_l(MSVCRT_wchar_t, MSVCRT__locale_t); +int __cdecl MSVCRT__iswpunct_l(MSVCRT_wchar_t, MSVCRT__locale_t); /* Maybe one day we'll enable the invalid parameter handlers with the full set of information (msvcrXXd) * #define MSVCRT_INVALID_PMT(x) MSVCRT_call_invalid_parameter_handler(x, __FUNCTION__, __FILE__, __LINE__, 0) diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 79918ae7abf..1d26169cc11 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -617,7 +617,7 @@ @ cdecl _ismbcprint(long) @ cdecl _ismbcprint_l(long ptr) @ cdecl _ismbcpunct(long) -# stub _ismbcpunct_l(long ptr) +@ cdecl _ismbcpunct_l(long ptr) @ cdecl _ismbcspace(long) @ cdecl _ismbcspace_l(long ptr) @ cdecl _ismbcsymbol(long) diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index c20e3f0b559..8493ae79ba4 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -489,7 +489,7 @@ @ cdecl _ismbcprint(long) @ cdecl _ismbcprint_l(long ptr) @ cdecl _ismbcpunct(long) -@ stub _ismbcpunct_l +@ cdecl _ismbcpunct_l(long ptr) @ cdecl _ismbcspace(long) @ cdecl _ismbcspace_l(long ptr) @ cdecl _ismbcsymbol(long) @@ -1088,7 +1088,7 @@ @ cdecl _o__ismbcprint(long) _ismbcprint @ cdecl _o__ismbcprint_l(long ptr) _ismbcprint_l @ cdecl _o__ismbcpunct(long) _ismbcpunct -@ stub _o__ismbcpunct_l +@ cdecl _o__ismbcpunct_l(long ptr) _ismbcpunct_l @ cdecl _o__ismbcspace(long) _ismbcspace @ cdecl _o__ismbcspace_l(long ptr) _ismbcspace_l @ cdecl _o__ismbcsymbol(long) _ismbcsymbol