Staging
v0.8.1
v0.8.1
Revision 5889129571492a589b98f04d3bca6cc86bc43901 authored by Benjamin Peterson on 13 November 2010, 17:28:56 UTC, committed by Benjamin Peterson on 13 November 2010, 17:28:56 UTC
1 parent b87dd0c
strdup.c
/* strdup() replacement (from stdwin, if you must know) */
#include "pgenheaders.h"
char *
strdup(const char *str)
{
if (str != NULL) {
register char *copy = malloc(strlen(str) + 1);
if (copy != NULL)
return strcpy(copy, str);
}
return NULL;
}
Computing file changes ...