Annotation of 43BSD/contrib/mh/sbr/getcpy.c, revision 1.1

1.1     ! root        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: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.