ReactOS  0.4.14-dev-376-gaedba84
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 
14 unsigned int _mbbtolower(unsigned int c)
15 {
16  if (!_ismbblead(c) )
17  return tolower(c);
18  return c;
19 }
20 
21 /*
22  * @implemented
23  */
24 unsigned int _mbctolower(unsigned int c)
25 {
26  return _ismbcupper (c) ? c + 0x21 : c;
27 }
28 
29 /*
30  * @implemented
31  */
32 unsigned 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 }
unsigned int _mbctolower(unsigned int c)
Definition: mbslwr.c:24
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
unsigned char * _mbslwr(unsigned char *x)
Definition: mbslwr.c:32
_Check_return_ _CRTIMP int __cdecl _ismbcupper(_In_ unsigned int _Ch)
smooth NULL
Definition: ftsmooth.c:416
unsigned int _mbbtolower(unsigned int c)
Definition: mbslwr.c:14
const GLubyte * c
Definition: glext.h:8905
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
int __cdecl _ismbblead(unsigned int)
Definition: ismblead.c:20
#define c
Definition: ke_i.h:80
int tolower(int c)
Definition: utclib.c:902