msvcrt: Add _mbsnbcpy_s_l implementation.

This commit is contained in:
Piotr Caban 2014-05-19 11:42:58 +02:00 committed by Alexandre Julliard
parent 534394dfa2
commit aebe1c69f9
6 changed files with 17 additions and 8 deletions

View File

@ -1132,7 +1132,7 @@
@ cdecl _mbsnbcpy(ptr str long)
@ stub _mbsnbcpy_l
@ cdecl _mbsnbcpy_s(ptr long str long)
@ stub _mbsnbcpy_s_l
@ cdecl _mbsnbcpy_s_l(ptr long str long ptr)
@ cdecl _mbsnbicmp(str str long)
@ stub _mbsnbicmp_l
@ cdecl _mbsnbicoll(str str long)

View File

@ -1490,7 +1490,7 @@
@ cdecl _mbsnbcpy(ptr str long)
@ stub _mbsnbcpy_l
@ cdecl _mbsnbcpy_s(ptr long str long)
@ stub _mbsnbcpy_s_l
@ cdecl _mbsnbcpy_s_l(ptr long str long ptr)
@ cdecl _mbsnbicmp(str str long)
@ stub _mbsnbicmp_l
@ cdecl _mbsnbicoll(str str long)

View File

@ -804,7 +804,7 @@
@ cdecl _mbsnbcpy(ptr str long)
@ stub _mbsnbcpy_l
@ cdecl _mbsnbcpy_s(ptr long str long)
@ stub _mbsnbcpy_s_l
@ cdecl _mbsnbcpy_s_l(ptr long str long ptr)
@ cdecl _mbsnbicmp(str str long)
@ stub _mbsnbicmp_l
@ cdecl _mbsnbicoll(str str long)

View File

@ -782,7 +782,7 @@
@ cdecl _mbsnbcpy(ptr str long)
@ stub _mbsnbcpy_l
@ cdecl _mbsnbcpy_s(ptr long str long)
@ stub _mbsnbcpy_s_l
@ cdecl _mbsnbcpy_s_l(ptr long str long ptr)
@ cdecl _mbsnbicmp(str str long)
@ stub _mbsnbicmp_l
@ cdecl _mbsnbicoll(str str long)

View File

@ -638,12 +638,13 @@ unsigned char* CDECL _mbsncpy(unsigned char* dst, const unsigned char* src, MSVC
}
/*********************************************************************
* _mbsnbcpy_s(MSVCRT.@)
* _mbsnbcpy_s_l(MSVCRT.@)
* REMARKS
* Unlike _mbsnbcpy this function does not pad the rest of the dest
* string with 0
*/
int CDECL _mbsnbcpy_s(unsigned char* dst, MSVCRT_size_t size, const unsigned char* src, MSVCRT_size_t n)
int CDECL _mbsnbcpy_s_l(unsigned char* dst, MSVCRT_size_t size,
const unsigned char* src, MSVCRT_size_t n, MSVCRT__locale_t locale)
{
MSVCRT_size_t pos = 0;
@ -657,7 +658,7 @@ int CDECL _mbsnbcpy_s(unsigned char* dst, MSVCRT_size_t size, const unsigned cha
if(!n)
return 0;
if(get_mbcinfo()->ismbcodepage)
if((locale ? locale->mbcinfo : get_mbcinfo())->ismbcodepage)
{
int is_lead = 0;
while (*src && n)
@ -702,6 +703,14 @@ int CDECL _mbsnbcpy_s(unsigned char* dst, MSVCRT_size_t size, const unsigned cha
return 0;
}
/*********************************************************************
* _mbsnbcpy_s(MSVCRT.@)
*/
int CDECL _mbsnbcpy_s(unsigned char* dst, MSVCRT_size_t size, const unsigned char* src, MSVCRT_size_t n)
{
return _mbsnbcpy_s_l(dst, size, src, n, NULL);
}
/*********************************************************************
* _mbsnbcpy(MSVCRT.@)
* REMARKS

View File

@ -755,7 +755,7 @@
@ cdecl _mbsnbcpy(ptr str long)
# stub _mbsnbcpy_l(ptr str long ptr)
@ cdecl _mbsnbcpy_s(ptr long str long)
# stub _mbsnbcpy_s_l(ptr long str long ptr)
@ cdecl _mbsnbcpy_s_l(ptr long str long ptr)
@ cdecl _mbsnbicmp(str str long)
# stub _mbsnbicmp_l(str str long ptr)
@ cdecl _mbsnbicoll(str str long)