shithub: purgatorio

ref: 87d72e7e8614d96b4f61adae5fb05b0534231c4c
dir: /lib9/strdup.c/

View raw version
#include "lib9.h"

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

	os = malloc(strlen(s) + 1);
	if(os == 0)
		return 0;
	return strcpy(os, s);
}