strdup.c

src/strdup.c · 239 B

From the archive tinymux-1.1.0.tar.gz

Download the archive   « Back to the archive contents

/*
 * strdup.c - For systems like Ultrix that don't have it. 
 */

#include "copyright.h"
#include "autoconf.h"

char *strdup(const char *s)
{
	char *result;

	result = (char *)malloc(strlen(s) + 1);
	strcpy(result, s);
	return result;
}

Site Stats

Snippets: 1791
Codebases: 571