X-Git-Url: https://git.distorted.org.uk/u/mdw/catacomb/blobdiff_plain/02d7884df1f33c9c7dc3a14c4b1a5f520ebe090a..813390c45f438f411662b1a55678e63f11681eb4:/mparena.c diff --git a/mparena.c b/mparena.c index b9b1f84..c726912 100644 --- a/mparena.c +++ b/mparena.c @@ -1,13 +1,13 @@ /* -*-c-*- * - * $Id: mparena.c,v 1.6 2004/04/03 03:32:05 mdw Exp $ + * $Id$ * * Allocation and freeing of MP buffers * * (c) 1999 Straylight/Edgeware */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of Catacomb. * @@ -15,41 +15,18 @@ * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 of the * License, or (at your option) any later version. - * + * * Catacomb 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 Library General Public License for more details. - * + * * You should have received a copy of the GNU Library General Public * License along with Catacomb; if not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: mparena.c,v $ - * Revision 1.6 2004/04/03 03:32:05 mdw - * General robustification. - * - * Revision 1.5 2000/06/17 11:35:48 mdw - * Overhaul to use mLib's arena system underneath. - * - * Revision 1.4 1999/12/10 23:28:52 mdw - * Memory allocation counting. - * - * Revision 1.3 1999/11/22 13:58:00 mdw - * Document the tweakables. - * - * Revision 1.2 1999/11/21 22:14:19 mdw - * Fix bug. Improve diagnostic capabilities. - * - * Revision 1.1 1999/11/17 18:02:16 mdw - * New multiprecision integer arithmetic suite. - * - */ - /*----- Header files ------------------------------------------------------*/ #include @@ -71,7 +48,7 @@ * itself. */ -/* #define MPARENA_TRIVIAL */ +#define MPARENA_TRIVIAL /* --- @MPARENA_DEBUG@ --- * * @@ -199,7 +176,7 @@ void mparena_destroy(mparena *a) unsigned mparena_count(mparena *a) { return (a->n); -} +} /* --- @mpalloc@ --- * * @@ -236,7 +213,7 @@ mpw *mpalloc(mparena *a, size_t sz) #ifdef MPARENA_DEBUG MPARENA_OPENFILE; - fprintf(debugfp, "alloc %u\n before: ", sz); + fprintf(debugfp, "alloc %u\n before: ", sz); tdump(a->root); putc('\n', debugfp); #endif