]>
diplodocus.org Git - nmh/blob - sbr/strdup.c
ebc29f59a4eaaba07636ab4aed3ab8e94707e7a0
3 * strdup.c -- duplicate a string
7 * This code is Copyright (c) 2002, by the authors of nmh. See the
8 * COPYRIGHT file in the root directory of the nmh distribution for
9 * complete copyright information.
17 strdup (const char *str
)
25 len
= strlen(str
) + 1;
26 cp
= mh_xmalloc (len
);
27 memcpy (cp
, str
, len
);