From c5bc8f21d5b87482f737c5ca64a4d46ebe7a2497 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 26 May 2012 21:22:43 +0000 Subject: YAMN became partially Unicode git-svn-id: http://svn.miranda-ng.org/main/trunk@186 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/YAMN/debug.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'plugins/YAMN/debug.cpp') 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 -#include -#include */ +#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); -- cgit v1.2.3