Chameleon

Chameleon Svn Source Tree

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

Source at commit 1362 created 12 years 10 months ago.
By ifabio, Add EnableC2/3/4 State and Npci=0x2000 options for the pkg, also edit Localizable file for English and Italian
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: 1362