summaryrefslogtreecommitdiff
path: root/plugins/YAMN/src/debug.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-07-25 20:15:05 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-07-25 20:15:05 +0000
commit9d32b9cd791fb5f51dad17567152c70a8511a500 (patch)
treefd7aa3250ed409e720f26c341c0a5d736ed8083c /plugins/YAMN/src/debug.cpp
parent125a25c86eed41352d45eb8fb6f994f65700c3ec (diff)
replace sprintf to mir_snprintf (part 6)
git-svn-id: http://svn.miranda-ng.org/main/trunk@5485 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAMN/src/debug.cpp')
-rw-r--r--plugins/YAMN/src/debug.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/YAMN/src/debug.cpp b/plugins/YAMN/src/debug.cpp
index c459d0cbb7..2f2d3d1069 100644
--- a/plugins/YAMN/src/debug.cpp
+++ b/plugins/YAMN/src/debug.cpp
@@ -43,21 +43,21 @@ void InitDebug()
InitializeCriticalSection(&FileAccessCS);
#ifdef DEBUG_SYNCHRO
- _stprintf(DebugFileName,DebugSynchroFileName2,DebugUserDirectory);
+ mir_sntprintf(DebugFileName, SIZEOF(DebugFileName), DebugSynchroFileName2, DebugUserDirectory);
SynchroFile=CreateFile(DebugFileName,GENERIC_WRITE,FILE_SHARE_WRITE|FILE_SHARE_READ,NULL,CREATE_ALWAYS,0,NULL);
DebugLog(SynchroFile,"Synchro debug file created by %s\n",YAMN_VER);
#endif
#ifdef DEBUG_COMM
- _stprintf(DebugFileName,DebugCommFileName2,DebugUserDirectory);
+ mir_sntprintf(DebugFileName, SIZEOF(DebugFileName), DebugCommFileName2, DebugUserDirectory);
CommFile=CreateFile(DebugFileName,GENERIC_WRITE,FILE_SHARE_WRITE|FILE_SHARE_READ,NULL,CREATE_ALWAYS,0,NULL);
DebugLog(CommFile,"Communication debug file created by %s\n",YAMN_VER);
#endif
#ifdef DEBUG_DECODE
- _stprintf(DebugFileName,DebugDecodeFileName2,DebugUserDirectory);
+ mir_sntprintf(DebugFileName, SIZEOF(DebugFileName), DebugDecodeFileName2, DebugUserDirectory);
DecodeFile=CreateFile(DebugFileName,GENERIC_WRITE,FILE_SHARE_WRITE|FILE_SHARE_READ,NULL,CREATE_ALWAYS,0,NULL);
DebugLog(DecodeFile,"Decoding kernel debug file created by %s\n",YAMN_VER);
@@ -93,7 +93,7 @@ void DebugLog(HANDLE File,const char *fmt,...)
va_start(vararg,fmt);
str=(char *)malloc(strsize=65536);
mir_snprintf(tids, SIZEOF(tids), "[%x]",GetCurrentThreadId());
- while(_vsnprintf(str,strsize,fmt,vararg)==-1)
+ while(mir_vsnprintf(str, strsize, fmt, vararg)==-1)
str=(char *)realloc(str,strsize+=65536);
va_end(vararg);
EnterCriticalSection(&FileAccessCS);
@@ -114,7 +114,7 @@ void DebugLogW(HANDLE File,const WCHAR *fmt,...)
va_start(vararg,fmt);
str=(WCHAR *)malloc((strsize=65536)*sizeof(WCHAR));
mir_snprintf(tids, SIZEOF(tids), "[%x]",GetCurrentThreadId());
- while(_vsnwprintf(str,strsize,fmt,vararg)==-1)
+ while(mir_vsnwprintf(str, strsize, fmt, vararg)==-1)
str=(WCHAR *)realloc(str,(strsize+=65536)*sizeof(WCHAR));
va_end(vararg);
EnterCriticalSection(&FileAccessCS);