2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 ANSI C function strdup().
8 /*****************************************************************************
20 Create a copy of a string. The copy can be freed with free() or will
21 be freed when then program ends.
24 str1 - Strings to duplicate
27 A copy of the string which can be freed with free().
39 ******************************************************************************/
44 if ((copy
= malloc (strlen (orig
)+1)))
48 while ((*ptr
++ = *orig
++));