Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | 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
}