2013-05-29 20:41:58 +00:00
|
|
|
/*
|
|
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
|
|
|
/* $Id$ */
|
|
|
|
|
2018-06-17 13:42:26 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
2013-05-29 20:41:58 +00:00
|
|
|
|
|
|
|
char*
|
|
|
|
strdup(const char *s)
|
|
|
|
{
|
|
|
|
int len = strlen(s);
|
|
|
|
char *p = malloc(len+1);
|
|
|
|
if (p)
|
|
|
|
memcpy(p, s, len+1);
|
|
|
|
return p;
|
|
|
|
}
|