1 /* getcpy.c - copy a string in managed memory */
13 if ((cp = malloc ((unsigned) (1))) == NULL)
14 adios (NULLCP, "unable to allocate string storage");
15 (void) strcpy (cp, "");
17 if ((cp = malloc ((unsigned) (strlen (str) + 1))) == NULL)
18 adios (NULLCP, "unable to allocate string storage");
20 (void) strcpy (cp, str);