Delete trailing whitespace at end of lines.
[pspp-builds.git] / src / libpspp / pool.h
index b735d912e09577826522a4d9fa2ab5747540a8e8..e35961d948e337eacc348173c0b63bdf70e0329c 100644 (file)
@@ -1,6 +1,5 @@
 /* PSPP - computes sample statistics.
-   Copyright (C) 2000 Free Software Foundation, Inc.
-   Written by Ben Pfaff <blp@gnu.org>.
+   Copyright (C) 2000, 2006 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
@@ -20,7 +19,9 @@
 #if !pool_h
 #define pool_h 1
 
+#include <stdarg.h>
 #include <stdio.h>
+#include <stdbool.h>
 #include "compiler.h"
 
 /* Maximum size of a suballocated block.  Larger blocks are allocated
@@ -32,7 +33,7 @@
 
 
 /* Records the state of a pool for later restoration. */
-struct pool_mark 
+struct pool_mark
   {
     /* Current block and offset into it. */
     struct pool_block *block;
@@ -63,7 +64,7 @@ void *pool_clone (struct pool *, const void *, size_t) MALLOC_LIKE;
 void *pool_alloc_unaligned (struct pool *, size_t) MALLOC_LIKE;
 void *pool_clone_unaligned (struct pool *, const void *, size_t) MALLOC_LIKE;
 char *pool_strdup (struct pool *, const char *) MALLOC_LIKE;
-char *pool_vasprintf (struct pool *, const char *, va_list) 
+char *pool_vasprintf (struct pool *, const char *, va_list)
      MALLOC_LIKE PRINTF_FORMAT (2, 0);
 char *pool_asprintf (struct pool *, const char *, ...)
      MALLOC_LIKE PRINTF_FORMAT (2, 3);
@@ -71,6 +72,8 @@ char *pool_asprintf (struct pool *, const char *, ...)
 /* Standard allocation routines. */
 void *pool_malloc (struct pool *, size_t) MALLOC_LIKE;
 void *pool_nmalloc (struct pool *, size_t n, size_t s) MALLOC_LIKE;
+void *pool_zalloc (struct pool *, size_t) MALLOC_LIKE;
+void *pool_calloc (struct pool *, size_t n, size_t s) MALLOC_LIKE;
 void *pool_realloc (struct pool *, void *, size_t);
 void *pool_nrealloc (struct pool *, void *, size_t n, size_t s);
 void *pool_2nrealloc (struct pool *, void *, size_t *pn, size_t s);
@@ -89,7 +92,7 @@ void pool_detach_file (struct pool *, FILE *);
 
 /* Custom allocations. */
 void pool_register (struct pool *, void (*free) (void *), void *p);
-int pool_unregister (struct pool *, void *);
+bool pool_unregister (struct pool *, void *);
 
 /* Partial freeing. */
 void pool_mark (struct pool *, struct pool_mark *);