00001 #pragma once
00002 #ifndef SEAP_DEBUG_H
00003 #define SEAP_DEBUG_H
00004
00005 #ifdef __cplusplus
00006 extern "C" {
00007 #endif
00008
00009 #include <assert.h>
00010 #ifndef _A
00011 #define _A(x) assert(x)
00012 #endif
00013
00014 #ifndef _D
00015 #if defined(NDEBUG)
00016 # define _D(...) while(0)
00017 # define _LOGCALL_ while(0)
00018 #else
00019 # include <stddef.h>
00020 # include <stdarg.h>
00021 void __seap_debuglog (const char *, const char *, size_t , const char *, ...);
00022 # define _D(...) __seap_debuglog (__FILE__, __PRETTY_FUNCTION__, __LINE__, __VA_ARGS__)
00023 # define _LOGCALL_ _D("called\n");
00024 #endif
00025 #endif
00026
00027 #define SEAP_DEBUG_FILE "seap_debug.log"
00028 #define SEAP_DEBUG_FILE_ENV "SEAP_DEBUG_FILE"
00029
00030 #ifdef __cplusplus
00031 }
00032 #endif
00033
00034 #endif