1 /* vim:expandtab:ts=2 sw=2: 2 */ 3 /* Grafx2 - The Ultimate 256-color bitmap paint program 4 5 Copyright owned by various GrafX2 authors, see COPYRIGHT.txt for details. 6 7 Grafx2 is free software; you can redistribute it and/or 8 modify it under the terms of the GNU General Public License 9 as published by the Free Software Foundation; version 2 10 of the License. 11 12 Grafx2 is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with Grafx2; if not, see <http://www.gnu.org/licenses/> 19 */ 20 #ifndef GFX2MEM_H_DEFINED 21 #define GFX2MEM_H_DEFINED 22 23 /// malloc() memory and log in case of error 24 void * GFX2_malloc_and_log(size_t size, const char * file, unsigned line); 25 26 /// malloc() memory and log in case of error 27 #define GFX2_malloc(size) GFX2_malloc_and_log((size), __FILE__, __LINE__) 28 29 /// checks if a memory zone is filled with the same byte value 30 int GFX2_is_mem_filled_with(const void * p, unsigned char b, size_t len); 31 32 #endif 33