Fix win32 define. Change dprintf to function
This commit is contained in:
parent
cf517691bd
commit
300994d5cb
|
@ -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,...);
|
||||
|
|
|
@ -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"
|
||||
|
|
19
src/log.cpp
Normal file
19
src/log.cpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include "log.h"
|
||||
#include <cstdarg>
|
||||
#include <cstdio>
|
||||
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
|
Reference in New Issue
Block a user