projects
/
unix-history
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
from the ANSI standard
[unix-history]
/
usr
/
src
/
lib
/
libc
/
stdlib
/
calloc.c
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
* %sccs.include.redist.c%
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char
sccsid
[] =
"@(#)calloc.c 5.4 (Berkeley) %G%"
;
#endif
/* LIBC_SCCS and not lint */
#include <stdlib.h>
void
*
calloc
(
num
,
size
)
size_t
num
;
register
size_t
size
;
{
register
void
*
p
;
size
*=
num
;
if
(
p
=
malloc
(
size
))
bzero
(
p
,
size
);
return
(
p
);
}
cfree
(
p
,
num
,
size
)
void
*
p
;
size_t
num
,
size
;
{
(
void
)
free
(
p
);
}