/***************************************************************************\ [*] ___ ____ ____ __ __ ____ [*] ROGUE: ROM With Attitude [*] [*] /#/ ) /#/ ) /#/ ) /#/ /#/ /#/ [*] All rights reserved [*] [*] /#/ < /#/ / /#/ _ /#/ /#/ /#/-- [*] Copyright(C) 2000-2003 [*] [*] /#/ \(#(__/ (#(__/ (#(__/#/ (#(___ [*] Kenneth Conley (Mendanbar) [*] [*] Expression of Digital Creativity.. [*] roguemud@yahoogroups.com [*] [-]---------------------------------------+-+-----------------------------[-] [*] File: memory.h [*] [*] Usage: Memory macros [*] \***************************************************************************/ #ifndef _MEMORY_H_ #define _MEMORY_H_ #include "types.h" void Free_Error(const char * file, int line); #define ALLOC(a, b) calloc(a, b) #define FREE(ptr) \ if (ptr == NULL) { \ Free_Error(__FUNCTION__, __LINE__); \ } else { \ free(ptr); \ ptr = NULL; \ } #endif