ReactOS 0.4.16-dev-226-g79f2289
mbslwr.c
Go to the documentation of this file.
1/*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/sdk/crt/mbstring/mbslwr.c
5 * PURPOSE: Multibyte lowercase functions
6 * PROGRAMER: Eric Kohl
7 * Samuel Serapion, adapted from PROJECT C Library
8 */
9
10#include <precomp.h>
11#include <mbstring.h>
12#include <ctype.h>
13
14unsigned int _mbbtolower(unsigned int c)
15{
16 if (!_ismbblead(c) )
17 return tolower(c);
18 return c;
19}
20
21/*
22 * @implemented
23 */
24unsigned int _mbctolower(unsigned int c)
25{
26 return _ismbcupper (c) ? c + 0x21 : c;
27}
28
29/*
30 * @implemented
31 */
32unsigned char * _mbslwr(unsigned char *x)
33{
34 unsigned char *y=x;
35
36 if (x == NULL)
37 {
38 return NULL;
39 }
40
41 while (*y)
42 {
43 if (!_ismbblead(*y))
44 {
45 *y = tolower(*y);
46 y++;
47 }
48 else
49 {
50 *y = _mbctolower(*(unsigned short *)y);
51 y++;
52 }
53 }
54 return x;
55}
int tolower(int c)
Definition: utclib.c:902
#define NULL
Definition: types.h:112
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
const GLubyte * c
Definition: glext.h:8905
_Check_return_ _CRTIMP int __cdecl _ismbcupper(_In_ unsigned int _Ch)
#define c
Definition: ke_i.h:80
unsigned int _mbctolower(unsigned int c)
Definition: mbslwr.c:24
unsigned int _mbbtolower(unsigned int c)
Definition: mbslwr.c:14
unsigned char * _mbslwr(unsigned char *x)
Definition: mbslwr.c:32
int __cdecl _ismbblead(unsigned int)
Definition: ismblead.c:20