mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 06:15:48 +00:00
This really needs to go in a branch. It needs heavy testing and can't coincide with the current shell32 due to PSDK interface changes
svn path=/branches/shell32_new-bringup/; revision=51893
This commit is contained in:
parent
4596e5e59b
commit
4019caae75
23116 changed files with 0 additions and 1109022 deletions
55
lib/sdk/crt/mbstring/mbslwr.c
Normal file
55
lib/sdk/crt/mbstring/mbslwr.c
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
* FILE: lib/sdk/crt/mbstring/mbslwr.c
|
||||
* PURPOSE: Multibyte lowercase functions
|
||||
* PROGRAMER: Eric Kohl
|
||||
* Samuel Serapion, adapted from PROJECT C Library
|
||||
*/
|
||||
|
||||
#include <precomp.h>
|
||||
#include <mbstring.h>
|
||||
#include <ctype.h>
|
||||
|
||||
unsigned int _mbbtolower(unsigned int c)
|
||||
{
|
||||
if (!_ismbblead(c) )
|
||||
return tolower(c);
|
||||
return c;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
unsigned int _mbctolower(unsigned int c)
|
||||
{
|
||||
return _ismbcupper (c) ? c + 0x21 : c;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
unsigned char * _mbslwr(unsigned char *x)
|
||||
{
|
||||
unsigned char *y=x;
|
||||
|
||||
if (x == NULL)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
while (*y)
|
||||
{
|
||||
if (!_ismbblead(*y))
|
||||
{
|
||||
*y = tolower(*y);
|
||||
y++;
|
||||
}
|
||||
else
|
||||
{
|
||||
*y = _mbctolower(*(unsigned short *)y);
|
||||
y++;
|
||||
}
|
||||
}
|
||||
return x;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue