2 Copyright © 1995-2012, The AROS Development Team. All rights reserved.
5 POSIX.1-2008 function strdup().
10 /*****************************************************************************
21 Create a copy of a string. The copy can be freed with free() or will
22 be freed when the program ends.
25 str1 - Strings to duplicate
28 A copy of the string which can be freed with free().
40 ******************************************************************************/
45 if ((copy
= malloc (strlen (orig
)+1)))
49 while ((*ptr
++ = *orig
++));