1: /* getcpy.c - copy a string in managed memory */
   2: 
   3: #include "../h/mh.h"
   4: #include <stdio.h>
   5: 
   6: 
   7: char   *getcpy (str)
   8: register char  *str;
   9: {
  10:     register char  *cp;
  11: 
  12:     if ((cp = malloc ((unsigned) (strlen (str) + 1))) == NULL)
  13:     adios (NULLCP, "unable to allocate string storage");
  14: 
  15:     (void) strcpy (cp, str);
  16:     return cp;
  17: }
Last modified: 1985-10-29
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 968
Valid CSS Valid XHTML 1.0 Strict