Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_fixcpp/sys/src/ape/lib/ap/gen/strdup.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <string.h>
2
#include <ctype.h>
3
#include <stdlib.h>
4
 
5
char*
6
strdup(char *p)
7
{
8
	int n;
9
	char *np;
10
 
11
	n = strlen(p)+1;
12
	np = malloc(n);
13
	if(np)
14
		memmove(np, p, n);
15
	return np;
16
}