/[gnats]/gnats/libiberty/calloc.c
ViewVC logotype

Diff of /gnats/libiberty/calloc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by pdm, Mon Dec 10 23:03:27 2001 UTC revision 1.3 by chewie, Sat Nov 13 05:14:17 2004 UTC
# Line 1  Line 1 
1  /* calloc -- allocate memory which has been initialized to zero.  /* calloc -- allocate memory which has been initialized to zero.
2     This function is in the public domain. */     This function is in the public domain. */
3    
4    /*
5    
6    @deftypefn Supplemental void* calloc (size_t @var{nelem}, size_t @var{elsize})
7    
8    Uses @code{malloc} to allocate storage for @var{nelem} objects of
9    @var{elsize} bytes each, then zeros the memory.
10    
11    @end deftypefn
12    
13    */
14    
15  #include "ansidecl.h"  #include "ansidecl.h"
 #include "libiberty.h"  
   
16  #ifdef ANSI_PROTOTYPES  #ifdef ANSI_PROTOTYPES
17  #include <stddef.h>  #include <stddef.h>
18  #else  #else
# Line 12  Line 21 
21    
22  /* For systems with larger pointers than ints, this must be declared.  */  /* For systems with larger pointers than ints, this must be declared.  */
23  PTR malloc PARAMS ((size_t));  PTR malloc PARAMS ((size_t));
24    void bzero PARAMS ((PTR, size_t));
25    
26  PTR  PTR
27  calloc (nelem, elsize)  calloc (nelem, elsize)

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26