1 /* 2 AWFFull - A Webalizer Fork, Full o' features 3 4 xmalloc.h 5 memory handling wrapper 6 7 Copyright (C) 2006, 2008 by Stephen McInerney 8 (spm@stedee.id.au) 9 10 This file is part of AWFFull. 11 12 AWFFull is free software: you can redistribute it and/or modify 13 it under the terms of the GNU General Public License as published by 14 the Free Software Foundation, either version 3 of the License, or 15 (at your option) any later version. 16 17 AWFFull is distributed in the hope that it will be useful, 18 but WITHOUT ANY WARRANTY; without even the implied warranty of 19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 GNU General Public License for more details. 21 22 You should have received a copy of the GNU General Public License 23 along with AWFFull. If not, see <http://www.gnu.org/licenses/>. 24 25 */ 26 27 #ifndef AWFFULL_XMALLOC_H 28 #define AWFFULL_XMALLOC_H 1 29 30 31 /************************************************************************ 32 * MACROS * 33 ************************************************************************/ 34 #define XMALLOC(type, count) ((type *) xmalloc ((count) * sizeof(type))) 35 #define XFREE(stuff) free (stuff); stuff = NULL; 36 37 38 /************************************************************************ 39 * GLOBALS * 40 ************************************************************************/ 41 extern void *xmalloc(size_t num); 42 43 44 #endif /* AWFFULL_XMALLOC_H */ 45 46 /************************************************************************ 47 ************************************************************************ 48 * END OF FILE * 49 ************************************************************************ 50 ************************************************************************/ 51