Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

grinliz/gldebug.h

00001 /*
00002 Copyright (c) 2000-2003 Lee Thomason (www.grinninglizard.com)
00003 Grinning Lizard Utilities.
00004 
00005 This software is provided 'as-is', without any express or implied 
00006 warranty. In no event will the authors be held liable for any 
00007 damages arising from the use of this software.
00008 
00009 Permission is granted to anyone to use this software for any 
00010 purpose, including commercial applications, and to alter it and 
00011 redistribute it freely, subject to the following restrictions:
00012 
00013 1. The origin of this software must not be misrepresented; you must 
00014 not claim that you wrote the original software. If you use this 
00015 software in a product, an acknowledgment in the product documentation 
00016 would be appreciated but is not required.
00017 
00018 2. Altered source versions must be plainly marked as such, and 
00019 must not be misrepresented as being the original software.
00020 
00021 3. This notice may not be removed or altered from any source 
00022 distribution.
00023 */
00024 
00025 
00026 
00027 #ifndef GRINLIZ_DEBUG_INCLUDED
00028 #define GRINLIZ_DEBUG_INCLUDED
00029 
00030 #if defined( _DEBUG ) && !defined( DEBUG )
00031         #define DEBUG
00032 #endif
00033 
00034 #if defined(DEBUG)
00035         #ifdef _WIN32
00036                 void dprintf( const char* format, ... );
00037                 void WinDebugBreak();
00038                 
00039                 #define GLASSERT( x )           if ( !(x)) WinDebugBreak()
00040                 #define GLOUTPUT( x )           dprintf x
00041                 #define GLLOG( x )                      dprintf x
00042         #else
00043                 #include <assert.h>
00044         #include <stdio.h>
00045                 #define GLASSERT                assert
00046                 #define GLOUTPUT( x )   printf x        
00047                 #define GLLOG( x )              printf x
00048         #endif
00049 
00050 #else
00051 
00052         #if defined(UNIX)
00053                 #define GLOUTPUT( x )
00054         #else
00055                 #define GLOUTPUT( x )
00056         #endif
00057 
00058         #define GLASSERT( x )
00059         #define GLLOG( x )                      printf x
00060 
00061 #endif
00062 
00063 
00064 
00065 #endif

Generated on Sun Sep 25 16:25:48 2005 for Kyra by  doxygen 1.4.3