mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 14:53:40 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
29
sdk/lib/crt/mbstring/mbsdup.c
Normal file
29
sdk/lib/crt/mbstring/mbsdup.c
Normal file
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS system libraries
|
||||
* FILE: lib/sdk/crt/mbstring/mbsdup.c
|
||||
* PURPOSE: Duplicates a multi byte string
|
||||
* PROGRAMER: Ariadne
|
||||
* UPDATE HISTORY:
|
||||
Modified from DJGPP strdup
|
||||
* 12/04/99: Created
|
||||
*/
|
||||
|
||||
#include <precomp.h>
|
||||
#include <mbstring.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
unsigned char * _mbsdup(const unsigned char *_s)
|
||||
{
|
||||
unsigned char *rv;
|
||||
if (_s == 0)
|
||||
return 0;
|
||||
rv = (unsigned char *)malloc(_mbslen(_s) + 1);
|
||||
if (rv == 0)
|
||||
return 0;
|
||||
_mbscpy(rv, _s);
|
||||
return rv;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue