summaryrefslogtreecommitdiff
path: root/plugins/YAMN/debug.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-05-26 21:22:43 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-05-26 21:22:43 +0000
commitc5bc8f21d5b87482f737c5ca64a4d46ebe7a2497 (patch)
treec13b62a3f1224750108aa33919ef6f9a32a2767d /plugins/YAMN/debug.cpp
parent17f839d0a607c05ae390d6306d81ecea19c7ea45 (diff)
YAMN became partially Unicode
git-svn-id: http://svn.miranda-ng.org/main/trunk@186 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAMN/debug.cpp')
-rw-r--r--plugins/YAMN/debug.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/plugins/YAMN/debug.cpp b/plugins/YAMN/debug.cpp
index 67fbf5ce09..9b9793a965 100644
--- a/plugins/YAMN/debug.cpp
+++ b/plugins/YAMN/debug.cpp
@@ -7,12 +7,9 @@
* (c) majvan 2002-2004
*/
-/*#include <windows.h>
-#include <tchar.h>
-#include <stdio.h>*/
+#include "yamn.h"
#include "debug.h"
#ifdef YAMN_DEBUG
-#include "yamn.h"
#include "version.h"
#if defined (WIN9X)
@@ -26,7 +23,7 @@
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
-TCHAR DebugUserDirectory[MAX_PATH]=".";
+TCHAR DebugUserDirectory[MAX_PATH] = _T(".");
LPCRITICAL_SECTION FileAccessCS;
#ifdef DEBUG_SYNCHRO
@@ -52,7 +49,7 @@ void InitDebug()
#if defined (DEBUG_SYNCHRO) || defined (DEBUG_COMM) || defined (DEBUG_DECODE)
TCHAR DebugFileName[MAX_PATH];
#endif
- if(FileAccessCS==NULL)
+ if (FileAccessCS==NULL)
{
FileAccessCS=new CRITICAL_SECTION;
InitializeCriticalSection(FileAccessCS);
@@ -107,7 +104,7 @@ void DebugLog(HANDLE File,const char *fmt,...)
va_start(vararg,fmt);
str=(char *)malloc(strsize=65536);
- _stprintf(tids,_T("[%x]"),GetCurrentThreadId());
+ mir_snprintf(tids, SIZEOF(tids), "[%x]",GetCurrentThreadId());
while(_vsnprintf(str,strsize,fmt,vararg)==-1)
str=(char *)realloc(str,strsize+=65536);
va_end(vararg);
@@ -128,7 +125,7 @@ void DebugLogW(HANDLE File,const WCHAR *fmt,...)
va_start(vararg,fmt);
str=(WCHAR *)malloc((strsize=65536)*sizeof(WCHAR));
- _stprintf(tids,_T("[%x]"),GetCurrentThreadId());
+ mir_snprintf(tids, SIZEOF(tids), "[%x]",GetCurrentThreadId());
while(_vsnwprintf(str,strsize,fmt,vararg)==-1)
str=(WCHAR *)realloc(str,(strsize+=65536)*sizeof(WCHAR));
va_end(vararg);