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