mirror of
https://github.com/vivier/EMILE.git
synced 2024-12-30 17:29:43 +00:00
9bd9755dbb
Signed-off-by: Laurent Vivier <Laurent@Vivier.EU>
21 lines
294 B
C
21 lines
294 B
C
/*
|
|
*
|
|
* (c) 2004,2005 Laurent Vivier <Laurent@Vivier.EU>
|
|
*
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
char *strdup (__const char *__restrict __src)
|
|
{
|
|
char *__dest;
|
|
|
|
__dest = (char*)malloc(strlen(__src) + 1);
|
|
if (__dest == NULL)
|
|
return NULL;
|
|
strcpy(__dest, __src);
|
|
|
|
return __dest;
|
|
}
|