X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flibpspp%2Fpool.h;h=fc24b2f9e6ff0ae38221a2ac7f9d3bba60aa8fbf;hb=006bed0af6dede3b1307e3eb635fe037076bebd6;hp=7dab5b47e4978806926b1e914667fa0483aa562f;hpb=c708736bdd0fea4b79f3ee4a10e00c3abb95d9e3;p=pspp-builds.git diff --git a/src/libpspp/pool.h b/src/libpspp/pool.h index 7dab5b47..fc24b2f9 100644 --- a/src/libpspp/pool.h +++ b/src/libpspp/pool.h @@ -1,21 +1,18 @@ -/* PSPP - computes sample statistics. +/* PSPP - a program for statistical analysis. Copyright (C) 2000, 2006 Free Software Foundation, Inc. - Written by Ben Pfaff . - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. - This program is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with this program. If not, see . */ #if !pool_h #define pool_h 1 @@ -34,7 +31,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; @@ -65,7 +62,8 @@ 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_strdup0 (struct pool *, const char *, size_t) MALLOC_LIKE; +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); @@ -73,6 +71,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);