1 2 /* This is a modified version of the file "arena.h" from 3 "C Interfaces and Implementations", by David R. Hanson. 4 The license is below. 5 */ 6 /* 7 8 The author of this software is David R. Hanson. 9 10 Copyright (c) 1994,1995,1996,1997 by David R. Hanson. All Rights Reserved. 11 12 Permission to use, copy, modify, and distribute this software for any 13 purpose, subject to the provisions described below, without fee is 14 hereby granted, provided that this entire notice is included in all 15 copies of any software that is or includes a copy or modification of 16 this software and in all copies of the supporting documentation for 17 such software. 18 19 THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED 20 WARRANTY. IN PARTICULAR, THE AUTHOR DOES MAKE ANY REPRESENTATION OR 21 WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY OF THIS SOFTWARE OR 22 ITS FITNESS FOR ANY PARTICULAR PURPOSE. 23 24 David Hanson / drh (at) microsoft.com / http://www.research.microsoft.com/~drh/ 25 $Id: CPYRIGHT,v 1.2 1997/11/04 22:31:40 drh Exp $ 26 */ 27 28 /* $Id: H:/drh/idioms/book/RCS/arena.doc,v 1.10 1997/02/21 19:45:19 drh Exp $ */ 29 30 #ifndef _CII_ARENA_H 31 #define _CII_ARENA_H 32 33 //#include "except.h" 34 #define T Arena_T 35 typedef struct T *T; 36 //extern const Except_T Arena_NewFailed; 37 //extern const Except_T Arena_Failed; 38 extern T Arena_new (void); 39 extern void Arena_dispose(T *ap); 40 extern void *Arena_alloc (T arena, long nbytes, 41 const char *file, int line); 42 extern void *Arena_calloc(T arena, long count, 43 long nbytes, const char *file, int line); 44 extern void Arena_free (T arena); 45 #undef T 46 47 #endif /* ndef _CII_ARENA_H */ 48