Initial commit

This commit is contained in:
Bahadir Balban
2008-01-13 13:53:52 +00:00
commit e2b791a3d8
789 changed files with 95825 additions and 0 deletions

15
libs/c/src/strdup.c Normal file
View File

@@ -0,0 +1,15 @@
#define _USE_XOPEN
#include <string.h>
#include <stdlib.h>
char *
strdup(const char *s)
{
int len = strlen(s);
char *d;
d = malloc(len);
if (d == NULL)
return NULL;
strcpy(d, s);
return d;
}