Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

debug.h

Go to the documentation of this file.
00001 // debug.h
00002 //
00003 // Copyright (C) 2001, Chris Laurel <claurel@shatters.net>
00004 //
00005 // This program is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU General Public License
00007 // as published by the Free Software Foundation; either version 2
00008 // of the License, or (at your option) any later version.
00009 
00010 #ifndef _DEBUG_H_
00011 #define _DEBUG_H_
00012 
00013 // Define the DPRINTF macro; g++ supports macros with variable
00014 // length arguments, so we'll use those when we can.
00015 #ifndef DPRINTF
00016 
00017 #ifdef __GNUC__
00018 
00019 #ifndef DEBUG
00020 #define DPRINTF(level, args...)
00021 #else
00022 #define DPRINTF(level, args...) DebugPrint(level, args)
00023 extern void DebugPrint(int level, char *format, ...);
00024 #endif
00025 
00026 #else
00027 
00028 #ifndef _DEBUG
00029 #define DPRINTF //
00030 #else
00031 #define DPRINTF DebugPrint
00032 extern void DebugPrint(int level, char *format, ...);
00033 #endif
00034 
00035 #endif // __GNUC__
00036 
00037 #endif // DPRINTF
00038 
00039 extern void SetDebugVerbosity(int);
00040 extern int GetDebugVerbosity();
00041 
00042 #endif // _DEBUG_H_
00043 

Generated on Sat Jan 14 22:30:32 2006 for Celestia by  doxygen 1.4.1