Annotation of 43BSDTahoe/lib/libc/gen/calloc.c, revision 1.1.1.1

1.1       root        1: #if defined(LIBC_SCCS) && !defined(lint)
                      2: static char sccsid[] = "@(#)calloc.c   5.2 (Berkeley) 3/9/86";
                      3: #endif LIBC_SCCS and not lint
                      4: 
                      5: /*
                      6:  * Calloc - allocate and clear memory block
                      7:  */
                      8: char *
                      9: calloc(num, size)
                     10:        register unsigned num, size;
                     11: {
                     12:        extern char *malloc();
                     13:        register char *p;
                     14: 
                     15:        size *= num;
                     16:        if (p = malloc(size))
                     17:                bzero(p, size);
                     18:        return (p);
                     19: }
                     20: 
                     21: cfree(p, num, size)
                     22:        char *p;
                     23:        unsigned num;
                     24:        unsigned size;
                     25: {
                     26:        free(p);
                     27: }

unix.superglobalmegacorp.com

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