diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-04 22:23:03 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-04 22:23:03 +0000 |
commit | efd438ad7b533ba2adb4f22a1cb358ee449db825 (patch) | |
tree | a5a4a84ee1b46b8902fc646d42056d574369b85a /src/core | |
parent | 65c19c2a4f8e907c56fbdbfb5bf500f33c218574 (diff) |
new mir_sntprintf templates without SIZEOF
git-svn-id: http://svn.miranda-ng.org/main/trunk@14004 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/stdchat/src/tools.cpp | 2 | ||||
-rw-r--r-- | src/core/stdchat/src/window.cpp | 8 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 10 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/core/stdchat/src/tools.cpp b/src/core/stdchat/src/tools.cpp index 284499ef98..3537b61689 100644 --- a/src/core/stdchat/src/tools.cpp +++ b/src/core/stdchat/src/tools.cpp @@ -144,7 +144,7 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO else if (iIndex == 0) {
TCHAR szTemp[50];
if (pszWordText)
- mir_sntprintf(szTemp, SIZEOF(szTemp), TranslateT("&Message %s"), pszWordText);
+ mir_sntprintf(szTemp, TranslateT("&Message %s"), pszWordText);
else
mir_tstrncpy(szTemp, TranslateT("&Message"), SIZEOF(szTemp) - 1);
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp index e8e9071dd4..a710d2be23 100644 --- a/src/core/stdchat/src/window.cpp +++ b/src/core/stdchat/src/window.cpp @@ -1315,17 +1315,17 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam) TCHAR szTemp[100];
switch(si->iType) {
case GCW_CHATROOM:
- mir_sntprintf(szTemp, SIZEOF(szTemp),
+ mir_sntprintf(szTemp,
(si->nUsersInNicklist == 1) ? TranslateT("%s: chat room (%u user)") : TranslateT("%s: chat room (%u users)"),
si->ptszName, si->nUsersInNicklist);
break;
case GCW_PRIVMESS:
- mir_sntprintf(szTemp, SIZEOF(szTemp),
+ mir_sntprintf(szTemp,
(si->nUsersInNicklist == 1) ? TranslateT("%s: message session") : TranslateT("%s: message session (%u users)"),
si->ptszName, si->nUsersInNicklist);
break;
case GCW_SERVER:
- mir_sntprintf(szTemp, SIZEOF(szTemp), _T("%s: Server"), si->ptszName);
+ mir_sntprintf(szTemp, _T("%s: Server"), si->ptszName);
break;
}
SetWindowText(hwndDlg, szTemp);
@@ -2436,7 +2436,7 @@ LABEL_SHOWWINDOW: ValidateFilename(szName);
mir_sntprintf(szFolder, SIZEOF(szFolder), _T("%s\\%s"), g_Settings.pszLogDir, szName);
- mir_sntprintf(szName, SIZEOF(szName), _T("%s.log"), si->ptszID);
+ mir_sntprintf(szName, _T("%s.log"), si->ptszID);
ValidateFilename(szName);
mir_sntprintf(szFile, SIZEOF(szFile), _T("%s\\%s"), szFolder, szName);
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index a04e8ee3ca..5b04d948dc 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -96,12 +96,12 @@ static void AddToFileList(TCHAR ***pppFiles, int *totalCount, const TCHAR* szFil if (GetFileAttributes(szFilename) & FILE_ATTRIBUTE_DIRECTORY) {
WIN32_FIND_DATA fd;
TCHAR szPath[MAX_PATH];
- mir_sntprintf(szPath, SIZEOF(szPath), _T("%s\\*"), szFilename);
+ mir_sntprintf(szPath, _T("%s\\*"), szFilename);
HANDLE hFind = FindFirstFile(szPath, &fd);
if (hFind != INVALID_HANDLE_VALUE) {
do {
if (!mir_tstrcmp(fd.cFileName, _T(".")) || !mir_tstrcmp(fd.cFileName, _T(".."))) continue;
- mir_sntprintf(szPath, SIZEOF(szPath), _T("%s\\%s"), szFilename, fd.cFileName);
+ mir_sntprintf(szPath, _T("%s\\%s"), szFilename, fd.cFileName);
AddToFileList(pppFiles, totalCount, szPath);
}
while (FindNextFile(hFind, &fd));
@@ -122,7 +122,7 @@ static void UpdateReadChars(HWND hwndDlg, HWND hwndStatus) TCHAR buf[32];
int len = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_MESSAGE));
- mir_sntprintf(buf, SIZEOF(buf), _T("%d"), len);
+ mir_sntprintf(buf, _T("%d"), len);
SendMessage(hwndStatus, SB_SETTEXT, 1, (LPARAM)buf);
}
}
@@ -955,7 +955,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP break;
case CNFT_DWORD:
- mir_sntprintf(buf, SIZEOF(buf), _T("%u"), ci.dVal);
+ mir_sntprintf(buf, _T("%u"), ci.dVal);
break;
}
}
@@ -1061,7 +1061,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP mir_free(ci.pszVal);
break;
case CNFT_DWORD:
- mir_sntprintf(buf, SIZEOF(buf), _T("%u"), ci.dVal);
+ mir_sntprintf(buf, _T("%u"), ci.dVal);
break;
}
}
|