summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15/src/LCDFramework/debug.cpp
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2013-11-04 08:59:15 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2013-11-04 08:59:15 +0000
commitc77821d0b4b3ae09e47ce6d6ca9d6b21dbb56d30 (patch)
tree4063ea096104679033e757b724b22da17534da21 /plugins/MirandaG15/src/LCDFramework/debug.cpp
parent9d51dbf389539696b5d5e3417683c1709d957b6b (diff)
LCDFramework project removed, integrated to MirandaG15 project
git-svn-id: http://svn.miranda-ng.org/main/trunk@6767 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirandaG15/src/LCDFramework/debug.cpp')
-rw-r--r--plugins/MirandaG15/src/LCDFramework/debug.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/plugins/MirandaG15/src/LCDFramework/debug.cpp b/plugins/MirandaG15/src/LCDFramework/debug.cpp
new file mode 100644
index 0000000000..abca919bfe
--- /dev/null
+++ b/plugins/MirandaG15/src/LCDFramework/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
+