Staging
v0.5.1
v0.5.1
Revision 78abc9dcc2a854cd56c410377449dc50d7f46e3d authored by Georg Brandl on 27 October 2013, 08:41:57 UTC, committed by Georg Brandl on 27 October 2013, 08:41:57 UTC
1 parent 2d34f41
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;
}
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...