Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/modules/klibc/strdup.c

Source at commit 1297 created 12 years 9 months ago.
By meklort, Removed libsaioh from all modules. Removed i386 includes from modules.
1/*
2 * strdup.c
3 */
4
5#include <string.h>
6#include <stdlib.h>
7
8char *strdup(const char *s)
9{
10int l = strlen(s) + 1;
11char *d = malloc(l);
12
13if (d)
14memcpy(d, s, l);
15
16return d;
17}
18

Archive Download this file

Revision: 1297