mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-15 10:51:45 +00:00
msvcrt: Add _mbsset_l implementation.
This commit is contained in:
parent
08c603a417
commit
8bb0692ff6
|
@ -1180,7 +1180,7 @@
|
|||
@ cdecl _mbsrev(str)
|
||||
@ cdecl _mbsrev_l(str ptr)
|
||||
@ cdecl _mbsset(ptr long)
|
||||
@ stub _mbsset_l
|
||||
@ cdecl _mbsset_l(ptr long ptr)
|
||||
@ stub _mbsset_s
|
||||
@ stub _mbsset_s_l
|
||||
@ cdecl _mbsspn(str str)
|
||||
|
|
|
@ -1537,7 +1537,7 @@
|
|||
@ cdecl _mbsrev(str)
|
||||
@ cdecl _mbsrev_l(str ptr)
|
||||
@ cdecl _mbsset(ptr long)
|
||||
@ stub _mbsset_l
|
||||
@ cdecl _mbsset_l(ptr long ptr)
|
||||
@ stub _mbsset_s
|
||||
@ stub _mbsset_s_l
|
||||
@ cdecl _mbsspn(str str)
|
||||
|
|
|
@ -1548,7 +1548,7 @@
|
|||
@ cdecl _mbsrev(str)
|
||||
@ cdecl _mbsrev_l(str ptr)
|
||||
@ cdecl _mbsset(ptr long)
|
||||
@ stub _mbsset_l
|
||||
@ cdecl _mbsset_l(ptr long ptr)
|
||||
@ stub _mbsset_s
|
||||
@ stub _mbsset_s_l
|
||||
@ cdecl _mbsspn(str str)
|
||||
|
|
|
@ -852,7 +852,7 @@
|
|||
@ cdecl _mbsrev(str)
|
||||
@ cdecl _mbsrev_l(str ptr)
|
||||
@ cdecl _mbsset(ptr long)
|
||||
@ stub _mbsset_l
|
||||
@ cdecl _mbsset_l(ptr long ptr)
|
||||
@ stub _mbsset_s
|
||||
@ stub _mbsset_s_l
|
||||
@ cdecl _mbsspn(str str)
|
||||
|
|
|
@ -830,7 +830,7 @@
|
|||
@ cdecl _mbsrev(str)
|
||||
@ cdecl _mbsrev_l(str ptr)
|
||||
@ cdecl _mbsset(ptr long)
|
||||
@ stub _mbsset_l
|
||||
@ cdecl _mbsset_l(ptr long ptr)
|
||||
@ stub _mbsset_s
|
||||
@ stub _mbsset_s_l
|
||||
@ cdecl _mbsspn(str str)
|
||||
|
|
|
@ -2205,27 +2205,45 @@ int CDECL _mbsbtype(const unsigned char *str, size_t count)
|
|||
return _mbsbtype_l(str, count, NULL);
|
||||
}
|
||||
|
||||
|
||||
/*********************************************************************
|
||||
* _mbsset_l(MSVCRT.@)
|
||||
*/
|
||||
unsigned char* CDECL _mbsset_l(unsigned char* str, unsigned int c, _locale_t locale)
|
||||
{
|
||||
unsigned char* ret = str;
|
||||
pthreadmbcinfo mbcinfo;
|
||||
|
||||
if (!MSVCRT_CHECK_PMT(str))
|
||||
return NULL;
|
||||
|
||||
if (locale)
|
||||
mbcinfo = locale->mbcinfo;
|
||||
else
|
||||
mbcinfo = get_mbcinfo();
|
||||
|
||||
if (!mbcinfo->ismbcodepage || c < 256)
|
||||
return u__strset(str, c); /* ASCII CP or SB char */
|
||||
|
||||
c &= 0xffff; /* Strip high bits */
|
||||
|
||||
while (str[0] && str[1])
|
||||
{
|
||||
*str++ = c >> 8;
|
||||
*str++ = c & 0xff;
|
||||
}
|
||||
if (str[0])
|
||||
str[0] = '\0'; /* FIXME: OK to shorten? */
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
* _mbsset(MSVCRT.@)
|
||||
*/
|
||||
unsigned char* CDECL _mbsset(unsigned char* str, unsigned int c)
|
||||
{
|
||||
unsigned char* ret = str;
|
||||
|
||||
if(!get_mbcinfo()->ismbcodepage || c < 256)
|
||||
return u__strset(str, c); /* ASCII CP or SB char */
|
||||
|
||||
c &= 0xffff; /* Strip high bits */
|
||||
|
||||
while(str[0] && str[1])
|
||||
{
|
||||
*str++ = c >> 8;
|
||||
*str++ = c & 0xff;
|
||||
}
|
||||
if(str[0])
|
||||
str[0] = '\0'; /* FIXME: OK to shorten? */
|
||||
|
||||
return ret;
|
||||
return _mbsset_l(str, c, NULL);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
|
|
@ -801,7 +801,7 @@
|
|||
@ cdecl _mbsrev(str)
|
||||
@ cdecl _mbsrev_l(str ptr)
|
||||
@ cdecl _mbsset(ptr long)
|
||||
# stub _mbsset_l(ptr long ptr)
|
||||
@ cdecl _mbsset_l(ptr long ptr)
|
||||
# stub _mbsset_s(ptr long long)
|
||||
# stub _mbsset_s_l(ptr long long ptr)
|
||||
@ cdecl _mbsspn(str str)
|
||||
|
|
|
@ -696,7 +696,7 @@
|
|||
@ cdecl _mbsrev(str)
|
||||
@ cdecl _mbsrev_l(str ptr)
|
||||
@ cdecl _mbsset(ptr long)
|
||||
@ stub _mbsset_l
|
||||
@ cdecl _mbsset_l(ptr long ptr)
|
||||
@ stub _mbsset_s
|
||||
@ stub _mbsset_s_l
|
||||
@ cdecl _mbsspn(str str)
|
||||
|
@ -1265,7 +1265,7 @@
|
|||
@ cdecl _o__mbsrev(str) _mbsrev
|
||||
@ cdecl _o__mbsrev_l(str ptr) _mbsrev_l
|
||||
@ cdecl _o__mbsset(ptr long) _mbsset
|
||||
@ stub _o__mbsset_l
|
||||
@ cdecl _o__mbsset_l(ptr long ptr) _mbsset_l
|
||||
@ stub _o__mbsset_s
|
||||
@ stub _o__mbsset_s_l
|
||||
@ cdecl _o__mbsspn(str str) _mbsspn
|
||||
|
|
Loading…
Reference in a new issue