ReactOS 0.4.16-dev-300-g2aadf2e
mbsdup.c File Reference
#include <precomp.h>
#include <mbstring.h>
#include <stdlib.h>
Include dependency graph for mbsdup.c:

Go to the source code of this file.

Functions

unsigned char_mbsdup (const unsigned char *_s)
 

Function Documentation

◆ _mbsdup()

unsigned char * _mbsdup ( const unsigned char _s)

Definition at line 19 of file mbsdup.c.

20{
21 unsigned char *rv;
22 if (_s == 0)
23 return 0;
24 rv = (unsigned char *)malloc(_mbslen(_s) + 1);
25 if (rv == 0)
26 return 0;
27 _mbscpy(rv, _s);
28 return rv;
29}
#define malloc
Definition: debug_ros.c:4
_CRTIMP unsigned char *__cdecl _mbscpy(_Out_writes_z_(_String_length_(_Source)+1) unsigned char *_Dest, _In_z_ const unsigned char *_Source)
_Check_return_ _CRTIMP size_t __cdecl _mbslen(_In_z_ const unsigned char *_Str)