strdup.c
tinymush-3.1p1/src/strdup.c · 289 B
From the archive tm31p1.tar.gz
Download the archive « Back to the archive contents
/* strdup.c - For systems like Ultrix that don't have it. */
/* $Id: strdup.c,v 1.2 2000/05/29 22:20:56 rmg Exp $ */
#include "copyright.h"
#include "autoconf.h"
char *strdup(const char *s)
{
char *result;
result = (char *)malloc(strlen(s) + 1);
strcpy(result, s);
return result;
}