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: }

Defined functions

calloc defined in line 8; used 222 times

Defined variables

sccsid defined in line 2; never used
Last modified: 1986-03-10
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3359
Valid CSS Valid XHTML 1.0 Strict