mirror of
https://github.com/vivier/EMILE.git
synced 2024-11-14 22:04:43 +00:00
21 lines
301 B
C
21 lines
301 B
C
/*
|
|
*
|
|
* (c) 2004,2005 Laurent Vivier <LaurentVivier@wanadoo.fr>
|
|
*
|
|
*/
|
|
|
|
#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;
|
|
}
|