blob: 231e35b3f61e00804533092062181b0eaf5e26d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
/* strdup.c
Duplicate a string into memory. */
#include "uucp.h"
char *
strdup (z)
const char *z;
{
size_t csize;
char *zret;
csize = strlen (z) + 1;
zret = malloc (csize);
if (zret != NULL)
memcpy (zret, z, csize);
return zret;
}
|