diff --git a/src/include/log.h b/src/include/log.h index 157ce77..1167e53 100644 --- a/src/include/log.h +++ b/src/include/log.h @@ -1,13 +1,4 @@ #pragma once -#ifdef DEBUG -#ifndef dprintf -/// Debug Output API -#define dprintf(fmt,args...) printf("%s: ",__PRETTY_FUNCTION__);printf(fmt,##args) -#endif /// End of dprintf -#else -#ifndef dprintf -/// Debug Output API -#define dprintf(fmt,args...) -#endif /// End of dprintf -#endif /// End of DEBUG +/// Debug output +void dprintf(const char* fmt,...); diff --git a/src/include/zlib_wrapper.h b/src/include/zlib_wrapper.h index e1f8fcc..8da023e 100644 --- a/src/include/zlib_wrapper.h +++ b/src/include/zlib_wrapper.h @@ -1,6 +1,6 @@ #pragma once -#ifdef __WIN32 /// Windows Needs this Definition. +#ifdef _WIN32 /// Windows Needs this Definition. #define ZLIB_WINAPI #endif // __WIN32 #include "zlib/zlib.h" diff --git a/src/log.cpp b/src/log.cpp new file mode 100644 index 0000000..3a78541 --- /dev/null +++ b/src/log.cpp @@ -0,0 +1,19 @@ +#include "log.h" +#include +#include +using namespace std; + +#ifdef DEBUG +void dprintf(const char* fmt,...) +{ + va_list ap; + va_start(ap,fmt); + vprintf(fmt,ap); + va_end(ap); +} +#else +void dprintf(const char* fmt,...) +{ + +} +#endif