diff options
author | Stef Walter <stef@thewalter.net> | 2004-04-01 04:35:55 +0000 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2004-04-01 04:35:55 +0000 |
commit | de5167a304b5e3b2db7462329334ac01d492d72c (patch) | |
tree | f091b1c7679c9120579875d17bbf7295a4ccbc9f /src/debug.h | |
parent | 048987b4e95b70a4559b9163d90e57dd69097203 (diff) |
- Fixes all round
- Uncontiguous FAT
- Move to C (instead of C++)
- Preparing for porting
Diffstat (limited to 'src/debug.h')
-rw-r--r-- | src/debug.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/debug.h b/src/debug.h new file mode 100644 index 0000000..e776fd1 --- /dev/null +++ b/src/debug.h @@ -0,0 +1,56 @@ +/* + * AUTHOR + * N. Nielsen + * + * LICENSE + * This software is in the public domain. + * + * The software is provided "as is", without warranty of any kind, + * express or implied, including but not limited to the warranties + * of merchantability, fitness for a particular purpose, and + * noninfringement. In no event shall the author(s) be liable for any + * claim, damages, or other liability, whether in an action of + * contract, tort, or otherwise, arising from, out of, or in connection + * with the software or the use or other dealings in the software. + * + * SUPPORT + * Send bug reports to: <nielsen@memberwebs.com> + */ + +#ifdef _DEBUG + +#include <stdarg.h> + +#ifndef ASSERT + #ifdef ATLASSERT + #define ASSERT ATLASSERT + #else + #include <assert.h> + #define ASSERT assert + #endif +#endif + +#ifndef VERIFY +#define VERIFY(f) ASSERT(f) +#endif + +#ifndef DEBUG_ONLY +#define DEBUG_ONLY(f) (f) +#endif + + +#else /* !DEBUG */ + +#ifndef ASSERT +#define ASSERT(f) ((void)0) +#endif + +#ifndef VERIFY +#define VERIFY(f) ((void)(f)) +#endif + +#ifndef DEBUG_ONLY +#define DEBUG_ONLY(f) ((void)0) +#endif + +#endif /* _DEBUG */ |