| Server IP : 209.209.40.120 / Your IP : 216.73.217.112 Web Server : Microsoft-IIS/10.0 System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586 User : NEWWWW$ ( 0) PHP Version : 8.3.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Program Files (x86)/Windows Kits/10/Source/10.0.19041.0/ucrt/mbstring/ |
Upload File : |
/***
*mbtolwr.c - Convert character to lower case (MBCS).
*
* Copyright (c) Microsoft Corporation. All rights reserved.
*
*Purpose:
* Convert character to lower case (MBCS).
*
*******************************************************************************/
#ifndef _MBCS
#error This file should only be compiled with _MBCS defined
#endif
#include <corecrt_internal_mbstring.h>
#include <locale.h>
/***
* _mbctolower - Convert character to lower case (MBCS)
*
*Purpose:
* If the given character is upper case, convert it to lower case.
* Handles MBCS characters correctly.
*
* Note: Use test against 0x00FF instead of _ISLEADBYTE
* to ensure that we don't call SBCS routine with a two-byte
* value.
*
*Entry:
* unsigned int c = character to convert
*
*Exit:
* Returns converted character
*
*Exceptions:
*
*******************************************************************************/
extern "C" unsigned int __cdecl _mbctolower_l (
unsigned int c,
_locale_t plocinfo
)
{
unsigned char val[2];
unsigned char ret[4];
_LocaleUpdate _loc_update(plocinfo);
if (c > 0x00FF)
{
val[0] = (c >> 8) & 0xFF;
val[1] = c & 0xFF;
if ( !_ismbblead_l(val[0], _loc_update.GetLocaleT()) )
return c;
if ( __acrt_LCMapStringA(
_loc_update.GetLocaleT(),
_loc_update.GetLocaleT()->mbcinfo->mblocalename,
LCMAP_LOWERCASE,
(const char *)val,
2,
(char *)ret,
2,
_loc_update.GetLocaleT()->mbcinfo->mbcodepage,
TRUE ) == 0 )
return c;
c = ret[1];
c += ret[0] << 8;
return c;
}
else
return (unsigned int)_mbbtolower_l((int)c, _loc_update.GetLocaleT());
}
extern "C" unsigned int (__cdecl _mbctolower) (
unsigned int c
)
{
return _mbctolower_l(c, nullptr);
}