Sha256: 1daae708974a0fa1f0f140c039fc3f6fa8f70530d73fecb5ae4015b8c6df2e55
Contents?: true
Size: 351 Bytes
Versions: 2
Compression:
Stored size: 351 Bytes
Contents
// // strdup.c // // Copyright (c) 2014 Stephen Mathieson // MIT licensed // #ifndef HAVE_STRDUP #include <stdlib.h> #include <string.h> #include "strdup.h" char * strdup(const char *str) { if (!str) return NULL; int len = strlen(str) + 1; char *buf = malloc(len); if (buf) memcpy(buf, str, len); return buf; } #endif /* HAVE_STRDUP */
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mathematical-1.4.1 | ext/mathematical/mtex2MML/deps/strdup/strdup.c |
mathematical-1.4.0 | ext/mathematical/mtex2MML/deps/strdup/strdup.c |