ReactOS  0.4.13-dev-73-gcfe54aa
mbsset.c File Reference
#include <mbstring.h>
Include dependency graph for mbsset.c:

Go to the source code of this file.

Functions

size_t _mbclen2 (const unsigned int s)
 
unsigned char_mbsset (unsigned char *src, unsigned int c)
 

Function Documentation

◆ _mbclen2()

size_t _mbclen2 ( const unsigned int  s)

Definition at line 23 of file mbclen.c.

24 {
25  return (_ismbblead(s>>8) && _ismbbtrail(s&0x00FF)) ? 2 : 1;
26 }
_Check_return_ _CRTIMP int __cdecl _ismbbtrail(_In_ unsigned int _C)
GLdouble s
Definition: gl.h:2039
int __cdecl _ismbblead(unsigned int)
Definition: ismblead.c:20

Referenced by _mbsset().

◆ _mbsset()

unsigned char* _mbsset ( unsigned char src,
unsigned int  c 
)

Definition at line 18 of file mbsset.c.

19 {
20  unsigned char *char_src = src;
21  unsigned short *short_src = (unsigned short *)src;
22 
23  if ( _mbclen2(c) == 1 ) {
24 
25  while(*char_src != 0) {
26  *char_src = c;
27  char_src++;
28  }
29  *char_src = 0;
30  }
31  else {
32  while(*short_src != 0) {
33  *short_src = c;
34  short_src++;
35  }
36  *short_src = 0;
37  }
38 
39  return src;
40 }
const GLubyte * c
Definition: glext.h:8905
size_t _mbclen2(const unsigned int s)
Definition: mbclen.c:23
GLenum src
Definition: glext.h:6340
#define c
Definition: ke_i.h:80