00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #pragma once
00029 #ifndef SEAP_DEBUG_H
00030 #define SEAP_DEBUG_H
00031
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035
00036 #include <assert.h>
00037 #ifndef _A
00038 #define _A(x) assert(x)
00039 #endif
00040
00041 #ifndef _D
00042 #if defined(NDEBUG)
00043 # define _D(...) while(0)
00044 # define _LOGCALL_ while(0)
00045 #else
00046 # include <stddef.h>
00047 # include <stdarg.h>
00056 void __seap_debuglog (const char *srcfile, const char *srcfn, size_t srcln, const char *fmt, ...);
00062 # define _D(...) __seap_debuglog (__FILE__, __PRETTY_FUNCTION__, __LINE__, __VA_ARGS__)
00063 # define _LOGCALL_ _D("called\n");
00064 #endif
00065 #endif
00066
00069 #define SEAP_DEBUG_FILE "seap_debug.log"
00070
00074 #define SEAP_DEBUG_FILE_ENV "SEAP_DEBUG_FILE"
00075
00076 #ifdef __cplusplus
00077 }
00078 #endif
00079
00080 #endif