X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=libiberty%2Fcalloc.c;h=f4bd27b1cd2a460c89c1e5ba2e3e94190db98c85;hb=b304527910c2e947c172e6a7d7ff4da82a8f2c03;hp=334b18db86a41d303e013e5380028942e663752d;hpb=33b090ebcd903ef520475bb301daec2d708a216e;p=pf3gnuchains%2Fgcc-fork.git diff --git a/libiberty/calloc.c b/libiberty/calloc.c index 334b18db86a..f4bd27b1cd2 100644 --- a/libiberty/calloc.c +++ b/libiberty/calloc.c @@ -1,21 +1,26 @@ /* calloc -- allocate memory which has been initialized to zero. This function is in the public domain. */ + +/* + +@deftypefn Supplemental void* calloc (size_t @var{nelem}, size_t @var{elsize}) + +Uses @code{malloc} to allocate storage for @var{nelem} objects of +@var{elsize} bytes each, then zeros the memory. + +@end deftypefn + +*/ #include "ansidecl.h" -#include "libiberty.h" - -#ifdef ANSI_PROTOTYPES #include -#else -#define size_t unsigned long -#endif /* For systems with larger pointers than ints, this must be declared. */ -PTR malloc PARAMS ((size_t)); +PTR malloc (size_t); +void bzero (PTR, size_t); PTR -calloc (nelem, elsize) - size_t nelem, elsize; +calloc (size_t nelem, size_t elsize) { register PTR ptr;