00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #pragma once
00024 #ifndef SEAP_DEBUG_H
00025 #define SEAP_DEBUG_H
00026
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030
00031 #include <assert.h>
00032 #ifndef _A
00033 #define _A(x) assert(x)
00034 #endif
00035
00036 #ifndef _D
00037 #if defined(NDEBUG)
00038 # define _D(...) while(0)
00039 # define _LOGCALL_ while(0)
00040 #else
00041 # include <stddef.h>
00042 # include <stdarg.h>
00043 void __seap_debuglog (const char *, const char *, size_t , const char *, ...);
00044 # define _D(...) __seap_debuglog (__FILE__, __PRETTY_FUNCTION__, __LINE__, __VA_ARGS__)
00045 # define _LOGCALL_ _D("called\n");
00046 #endif
00047 #endif
00048
00049 #define SEAP_DEBUG_FILE "seap_debug.log"
00050 #define SEAP_DEBUG_FILE_ENV "SEAP_DEBUG_FILE"
00051
00052 #ifdef __cplusplus
00053 }
00054 #endif
00055
00056 #endif