Staging
v0.8.1
v0.8.1
Revision 6c38841c08edd6b0727903ec3f1acd10dc9766f6 authored by Łukasz Langa on 29 June 2020, 22:30:11 UTC, committed by Łukasz Langa on 29 June 2020, 22:30:11 UTC
1 parent dc8ce8e
strdup.c
/* strdup() replacement (from stdwin, if you must know) */
char *
strdup(const char *str)
{
if (str != NULL) {
char *copy = malloc(strlen(str) + 1);
if (copy != NULL)
return strcpy(copy, str);
}
return NULL;
}
Computing file changes ...