From 4d01f5f5096cb4d22c4a7ba17cc82977c7f5f19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Tue, 29 Oct 2013 18:17:04 +0000 Subject: Adopted MirandaG15 plugin First compilable version and 32-bit only. git-svn-id: http://svn.miranda-ng.org/main/trunk@6681 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirandaG15/LCDFramework/src/debug.cpp | 58 +++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 plugins/MirandaG15/LCDFramework/src/debug.cpp (limited to 'plugins/MirandaG15/LCDFramework/src/debug.cpp') diff --git a/plugins/MirandaG15/LCDFramework/src/debug.cpp b/plugins/MirandaG15/LCDFramework/src/debug.cpp new file mode 100644 index 0000000000..abca919bfe --- /dev/null +++ b/plugins/MirandaG15/LCDFramework/src/debug.cpp @@ -0,0 +1,58 @@ +#include "stdafx.h" + +//file debug.cpp +#ifdef _DEBUG + +#ifdef USECONSTREAM + ConStream g_ConStream; + + void InitDebug() + { + g_ConStream.Open(); + } + + void UnInitDebug() + { + g_ConStream.Close(); + } +#else + void InitDebug() + { + } + + void UnInitDebug() + { + } +#endif + +void _trace(TCHAR *fmt, ...) +{ + TCHAR out[1024]; + va_list body; + va_start(body, fmt); +#ifdef _UNICODE + vswprintf(out, fmt, body); +#else + vsprintf(out,fmt,body); +#endif + + va_end(body); +#ifdef USECONSTREAM + g_ConStream << out; +#else + OutputDebugString(out); +#endif + +} +#else + +void InitDebug() +{ +} + +void UnInitDebug() +{ +} + +#endif + -- cgit v1.2.3