#ifndef __DEBUG_H #define __DEBUG_H //--------------------------------------------------------------------------- // 간편한 디버깅 정보 출력 / jsdkts@korea.com //--------------------------------------------------------------------------- #if (defined(DEBUG_OFF) || !defined(_DEBUG)) // 릴리즈 모드나 DEBUG_OFF 시는 디버깅 코드를 완전히 없앤다. #define DEBUG 1 ? (void) 0 : ___HideDebugPrintf inline void ___HideDebugPrintf(const char *str, ...) { // empty code. } #else #ifndef __STDIO_H #include #endif void DEBUG(char * lpszFormat, ...) // EventLog 창에 표시 (ALT+CTRL+V) { char szBuffer[4097]; va_list args; va_start(args, lpszFormat); int nBuf = vsprintf(szBuffer, lpszFormat, args); va_end(args); if (nBuf < 0) OutputDebugString("DEBUG() function internal error"); else OutputDebugString(szBuffer); } #endif //--------------------------------------------------------------------------- #endif