diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2013-07-25 20:15:05 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2013-07-25 20:15:05 +0000 |
commit | 9d32b9cd791fb5f51dad17567152c70a8511a500 (patch) | |
tree | fd7aa3250ed409e720f26c341c0a5d736ed8083c /plugins/Scriver/src | |
parent | 125a25c86eed41352d45eb8fb6f994f65700c3ec (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/Scriver/src')
-rw-r--r-- | plugins/Scriver/src/chat/clist.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/chat/tools.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/msgwindow.cpp | 16 | ||||
-rw-r--r-- | plugins/Scriver/src/utils.cpp | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/plugins/Scriver/src/chat/clist.cpp b/plugins/Scriver/src/chat/clist.cpp index 4cb3d46be0..64fe7dfd7f 100644 --- a/plugins/Scriver/src/chat/clist.cpp +++ b/plugins/Scriver/src/chat/clist.cpp @@ -260,7 +260,7 @@ BOOL CList_AddEvent(HANDLE hContact, HICON Icon, HANDLE event, int type, TCHAR* TCHAR* szBuf = (TCHAR*)alloca(4096 * sizeof(TCHAR));
va_list marker;
va_start(marker, fmt);
- _vsntprintf(szBuf, 4096, fmt, marker);
+ mir_vsntprintf(szBuf, 4096, fmt, marker);
va_end(marker);
CLISTEVENT cle = { sizeof(cle) };
diff --git a/plugins/Scriver/src/chat/tools.cpp b/plugins/Scriver/src/chat/tools.cpp index 122a869fcc..a3ab13a391 100644 --- a/plugins/Scriver/src/chat/tools.cpp +++ b/plugins/Scriver/src/chat/tools.cpp @@ -113,7 +113,7 @@ static int ShowPopup (HANDLE hContact, SESSION_INFO *si, HICON hIcon, char* pszP va_list marker;
va_start(marker, fmt);
- _vsntprintf(szBuf, 4096, fmt, marker);
+ mir_vsntprintf(szBuf, 4096, fmt, marker);
va_end(marker);
POPUPDATAT pd = {0};
diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp index d7763423c4..5b9ea9d56e 100644 --- a/plugins/Scriver/src/msgwindow.cpp +++ b/plugins/Scriver/src/msgwindow.cpp @@ -868,14 +868,14 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR char *szNamePrefix = (!savePerContact && dat->isChat) ? "chat" : "";
if (!dat->windowWasCascaded) {
- wsprintfA(szSettingName,"%sx",szNamePrefix);
+ mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sx", szNamePrefix);
db_set_dw(hContact, SRMMMOD, szSettingName, wp.rcNormalPosition.left);
- wsprintfA(szSettingName,"%sy",szNamePrefix);
+ mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sy", szNamePrefix);
db_set_dw(hContact, SRMMMOD, szSettingName, wp.rcNormalPosition.top);
}
- wsprintfA(szSettingName,"%swidth",szNamePrefix);
+ mir_snprintf(szSettingName, SIZEOF(szSettingName), "%swidth", szNamePrefix);
db_set_dw(hContact, SRMMMOD, szSettingName, wp.rcNormalPosition.right - wp.rcNormalPosition.left);
- wsprintfA(szSettingName,"%sheight",szNamePrefix);
+ mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sheight", szNamePrefix);
db_set_dw(hContact, SRMMMOD, szSettingName, wp.rcNormalPosition.bottom - wp.rcNormalPosition.top);
db_set_b(hContact, SRMMMOD, SRMSGSET_TOPMOST, (BYTE)dat->bTopmost);
if (g_dat.lastParent == dat)
@@ -1550,9 +1550,9 @@ int ScriverRestoreWindowPosition(HWND hwnd,HANDLE hContact,const char *szModule, // SystemParametersInfo(SPI_GETWORKAREA, 0, &rcDesktop, 0);
wp.length=sizeof(wp);
GetWindowPlacement(hwnd,&wp);
- wsprintfA(szSettingName,"%sx",szNamePrefix);
+ mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sx", szNamePrefix);
x=db_get_dw(hContact,szModule,szSettingName,-1);
- wsprintfA(szSettingName,"%sy",szNamePrefix);
+ mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sy", szNamePrefix);
y=(int)db_get_dw(hContact,szModule,szSettingName,-1);
if (x==-1) return 1;
if (flags&RWPF_NOSIZE) {
@@ -1560,9 +1560,9 @@ int ScriverRestoreWindowPosition(HWND hwnd,HANDLE hContact,const char *szModule, } else {
wp.rcNormalPosition.left=x;
wp.rcNormalPosition.top=y;
- wsprintfA(szSettingName,"%swidth",szNamePrefix);
+ mir_snprintf(szSettingName, SIZEOF(szSettingName), "%swidth", szNamePrefix);
wp.rcNormalPosition.right=wp.rcNormalPosition.left+db_get_dw(hContact,szModule,szSettingName,-1);
- wsprintfA(szSettingName,"%sheight",szNamePrefix);
+ mir_snprintf(szSettingName, SIZEOF(szSettingName), "%sheight", szNamePrefix);
wp.rcNormalPosition.bottom=wp.rcNormalPosition.top+db_get_dw(hContact,szModule,szSettingName,-1);
}
wp.flags=0;
diff --git a/plugins/Scriver/src/utils.cpp b/plugins/Scriver/src/utils.cpp index 5d92d914f6..3ef388b7f8 100644 --- a/plugins/Scriver/src/utils.cpp +++ b/plugins/Scriver/src/utils.cpp @@ -76,7 +76,7 @@ void logInfo(const char *fmt, ...) { GetLocalTime(&time);
va_start(vararg, fmt);
str = (char*) malloc(strsize=2048);
- while (_vsnprintf(str, strsize, fmt, vararg) == -1)
+ while (mir_vsnprintf(str, strsize, fmt, vararg) == -1)
str = (char*) realloc(str, strsize+=2048);
va_end(vararg);
fprintf(flog,"%04d-%02d-%02d %02d:%02d:%02d,%03d [%s]",time.wYear,time.wMonth,time.wDay,time.wHour,time.wMinute,time.wSecond,time.wMilliseconds, "INFO");
@@ -281,7 +281,7 @@ void AppendToBuffer(char **buffer, int *cbBufferEnd, int *cbBufferAlloced, const va_start(va, fmt);
for (;;) {
- charsDone = _vsnprintf(*buffer + *cbBufferEnd, *cbBufferAlloced - *cbBufferEnd, fmt, va);
+ charsDone = mir_vsnprintf(*buffer + *cbBufferEnd, *cbBufferAlloced - *cbBufferEnd, fmt, va);
if (charsDone >= 0)
break;
*cbBufferAlloced += 1024;
|