ReactOS  0.4.13-dev-66-gc714b7f
mbsupr.c File Reference
#include <precomp.h>
#include <mbstring.h>
#include <ctype.h>
Include dependency graph for mbsupr.c:

Go to the source code of this file.

Functions

unsigned int _mbbtoupper (unsigned int c)
 
unsigned int _mbctoupper (unsigned int c)
 
unsigned char_mbset (unsigned char *string, int c)
 
unsigned char_mbsupr (unsigned char *string)
 

Function Documentation

◆ _mbbtoupper()

unsigned int _mbbtoupper ( unsigned int  c)

Definition at line 15 of file mbsupr.c.

16 {
17  if (!_ismbblead(c) )
18  return toupper(c);
19 
20  return c;
21 }
int toupper(int c)
Definition: utclib.c:881
const GLubyte * c
Definition: glext.h:8905
int __cdecl _ismbblead(unsigned int)
Definition: ismblead.c:20
#define c
Definition: ke_i.h:80

Referenced by _mbsnbicmp(), and _mbsnicmp().

◆ _mbctoupper()

unsigned int _mbctoupper ( unsigned int  c)

Definition at line 26 of file mbsupr.c.

27 {
28  return _ismbclower (c) ? c - 0x21 : c;
29 }
_Check_return_ _CRTIMP int __cdecl _ismbclower(_In_ unsigned int _Ch)
const GLubyte * c
Definition: glext.h:8905
#define c
Definition: ke_i.h:80

◆ _mbset()

unsigned char* _mbset ( unsigned char string,
int  c 
)

Definition at line 31 of file mbsupr.c.

32 {
33  unsigned char *save = string;
34 
35  if (_MBIS16 (c)) {
36 
37  if (_MBLMASK (c) == 0) {
38  *string++ = '\0';
39  *string++ = '\0';
40  }
41  else {
42  *string++ = _MBGETH (c);
43  *string++ = _MBGETL (c);
44  }
45 
46  }
47  else {
48 
49  *string++ = c;
50 
51  }
52 
53  return save;
54 }
#define _MBLMASK(c)
Definition: mbstring.h:20
#define _MBGETH(c)
Definition: mbstring.h:23
#define _MBIS16(c)
Definition: mbstring.h:25
const GLubyte * c
Definition: glext.h:8905
char string[160]
Definition: util.h:11
#define c
Definition: ke_i.h:80
#define _MBGETL(c)
Definition: mbstring.h:22

Referenced by _mbsncat(), and _mbsupr().

◆ _mbsupr()

unsigned char* _mbsupr ( unsigned char string)

Definition at line 59 of file mbsupr.c.

60 {
61  int c;
62  unsigned char *save = string;
63 
64  while ((c = _mbsnextc (string))) {
65 
66  if (_MBIS16 (c) == 0)
67  c = toupper (c);
68 
69  _mbset (string, c);
70 
71  string = _mbsinc (string);
72 
73  }
74 
75  return save;
76 }
unsigned char * _mbset(unsigned char *string, int c)
Definition: mbsupr.c:31
#define _MBIS16(c)
Definition: mbstring.h:25
int toupper(int c)
Definition: utclib.c:881
const GLubyte * c
Definition: glext.h:8905
_Check_return_ _CRTIMP unsigned char *__cdecl _mbsinc(_In_z_ const unsigned char *_Ptr)
_Check_return_ _CRTIMP unsigned int __cdecl _mbsnextc(_In_z_ const unsigned char *_Str)
char string[160]
Definition: util.h:11
#define c
Definition: ke_i.h:80