event/create.h

Go to the documentation of this file.
00001 
00002 /*
00003  * $Id: create.h,v 1.1 2005/06/13 20:50:45 murrayma Exp $
00004  *
00005  * Author: Markus "iDLari" Stenberg <fingon@iki.fi>
00006  *
00007  *  Copyright (c) 1996 Markus Stenberg
00008  *       All rights reserved
00009  *
00010  * Created: Thu Aug 29 09:51:22 1996 fingon
00011  * Last modified: Fri Nov 27 20:15:14 1998 fingon
00012  *
00013  */
00014 
00015 #ifndef CREATE_H
00016 #define CREATE_H
00017 
00018 #define Create(a,b,c) \
00019 if (!((a) = ( b * ) calloc(sizeof( b ), c ) )) \
00020 { printf ("Unable to malloc!\n"); exit(1); }
00021 
00022 #define MyReCreate(a,b,c) \
00023 if (!((a) = ( b * ) realloc((void *) a, sizeof( b ) * (c) ) )) \
00024 { printf ("Unable to realloc!\n"); exit(1); }
00025 
00026 #define ReCreate(a,b,c) \
00027 if (a) { MyReCreate(a,b,c); } else { Create(a,b,c); }
00028 
00029 #define Free(a) if (a) {free(a);a=0;}
00030 
00031 #endif                          /* CREATE_H */

Generated on Mon May 28 04:25:18 2007 for BattletechMUX by  doxygen 1.4.7