OSDN Git Service

* simplify.c (gfc_simplify_transfer): Zero-initialize the
[pf3gnuchains/gcc-fork.git] / libiberty / calloc.c
index 334b18d..f4bd27b 100644 (file)
@@ -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 <stddef.h>
-#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;