3 * ***** BEGIN GPL LICENSE BLOCK *****
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
20 * All rights reserved.
22 * The Original Code is: all of this file.
24 * Contributor(s): none yet.
26 * ***** END GPL LICENSE BLOCK *****
29 /** \file ghost/intern/GHOST_Debug.h
31 * Macro's used in GHOST debug target.
34 #ifndef _GHOST_DEBUG_H_
35 #define _GHOST_DEBUG_H_
37 #if defined(WIN32) && !defined(FREE_WINDOWS)
39 #pragma warning (disable:4786) // suppress stl-MSVC debug info warning
40 // #define GHOST_DEBUG
44 #ifdef WITH_GHOST_DEBUG
45 #define GHOST_DEBUG // spit ghost events to stdout
46 #endif // WITH_GHOST_DEBUG
50 #include <stdio.h> //for printf()
55 #define GHOST_PRINT(x) { std::cout << x; }
56 #define GHOST_PRINTF(x, ...) { printf(x, __VA_ARGS__); }
58 #define GHOST_PRINT(x)
59 #define GHOST_PRINTF(x, ...)
64 #define GHOST_ASSERT(x, info) { if (!(x)) {GHOST_PRINT("assertion failed: "); GHOST_PRINT(info); GHOST_PRINT("\n"); } }
66 #define GHOST_ASSERT(x, info)
69 #endif // _GHOST_DEBUG_H_