summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-04 22:23:03 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-04 22:23:03 +0000
commitefd438ad7b533ba2adb4f22a1cb358ee449db825 (patch)
treea5a4a84ee1b46b8902fc646d42056d574369b85a /plugins/Scriver
parent65c19c2a4f8e907c56fbdbfb5bf500f33c218574 (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 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/chat/tools.cpp2
-rw-r--r--plugins/Scriver/src/chat/window.cpp8
-rw-r--r--plugins/Scriver/src/infobar.cpp2
-rw-r--r--plugins/Scriver/src/msgdialog.cpp12
-rw-r--r--plugins/Scriver/src/msgtimedout.cpp2
5 files changed, 13 insertions, 13 deletions
diff --git a/plugins/Scriver/src/chat/tools.cpp b/plugins/Scriver/src/chat/tools.cpp
index 52a474df61..c099d50a83 100644
--- a/plugins/Scriver/src/chat/tools.cpp
+++ b/plugins/Scriver/src/chat/tools.cpp
@@ -63,7 +63,7 @@ UINT CreateGCMenu(HWND hwnd, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO *s
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/plugins/Scriver/src/chat/window.cpp b/plugins/Scriver/src/chat/window.cpp
index bad5e0c81c..638c8feb85 100644
--- a/plugins/Scriver/src/chat/window.cpp
+++ b/plugins/Scriver/src/chat/window.cpp
@@ -1181,17 +1181,17 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
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;
}
tbd.iFlags = TBDF_TEXT | TBDF_ICON;
@@ -1204,7 +1204,7 @@ static INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPAR
{
MODULEINFO *mi = pci->MM_FindModule(si->pszModule);
hIcon = si->wStatus == ID_STATUS_ONLINE ? mi->hOnlineIcon : mi->hOfflineIcon;
- mir_sntprintf(szTemp, SIZEOF(szTemp), _T("%s : %s"), mi->ptszModDispName, si->ptszStatusbarText ? si->ptszStatusbarText : _T(""));
+ mir_sntprintf(szTemp, _T("%s : %s"), mi->ptszModDispName, si->ptszStatusbarText ? si->ptszStatusbarText : _T(""));
StatusBarData sbd;
sbd.iItem = 0;
diff --git a/plugins/Scriver/src/infobar.cpp b/plugins/Scriver/src/infobar.cpp
index 301ab1f909..1aa9bfcae4 100644
--- a/plugins/Scriver/src/infobar.cpp
+++ b/plugins/Scriver/src/infobar.cpp
@@ -84,7 +84,7 @@ void RefreshInfobar(InfobarWindowData* idat)
TCHAR szText[2048];
SETTEXTEX st;
if ( szXStatusMsg && *szXStatusMsg )
- mir_sntprintf(szText, SIZEOF(szText), _T("%s (%s)"), TranslateTS(szXStatusName), szXStatusMsg);
+ mir_sntprintf(szText, _T("%s (%s)"), TranslateTS(szXStatusName), szXStatusMsg);
else
_tcsncpy_s(szText, TranslateTS(szXStatusName), _TRUNCATE);
st.flags = ST_DEFAULT;
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 14d5606ac9..40ba1f0732 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -166,12 +166,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));
FindClose(hFind);
@@ -561,7 +561,7 @@ static void UpdateReadChars(HWND hwndDlg, SrmmWindowData *dat)
sbd.iFlags = SBDF_TEXT | SBDF_ICON;
sbd.hIcon = NULL;
sbd.pszText = szText;
- mir_sntprintf(szText, SIZEOF(szText), _T("%d"), len);
+ mir_sntprintf(szText, _T("%d"), len);
SendMessage(dat->hwndParent, CM_UPDATESTATUSBAR, (WPARAM)&sbd, (LPARAM)hwndDlg);
}
}
@@ -1360,13 +1360,13 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
if (dat->messagesInProgress && (g_dat.flags & SMF_SHOWPROGRESS)) {
sbd.hIcon = GetCachedIcon("scriver_DELIVERING");
sbd.pszText = szText;
- mir_sntprintf(szText, SIZEOF(szText), TranslateT("Sending in progress: %d message(s) left..."), dat->messagesInProgress);
+ mir_sntprintf(szText, TranslateT("Sending in progress: %d message(s) left..."), dat->messagesInProgress);
}
else if (dat->nTypeSecs) {
TCHAR *szContactName = GetNickname(dat->hContact, dat->szProto);
sbd.hIcon = GetCachedIcon("scriver_TYPING");
sbd.pszText = szText;
- mir_sntprintf(szText, SIZEOF(szText), TranslateT("%s is typing a message..."), szContactName);
+ mir_sntprintf(szText, TranslateT("%s is typing a message..."), szContactName);
mir_free(szContactName);
dat->nTypeSecs--;
}
@@ -1374,7 +1374,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
TCHAR date[64], time[64];
tmi.printTimeStamp(NULL, dat->lastMessage, _T("d"), date, SIZEOF(date), 0);
tmi.printTimeStamp(NULL, dat->lastMessage, _T("t"), time, SIZEOF(time), 0);
- mir_sntprintf(szText, SIZEOF(szText), TranslateT("Last message received on %s at %s."), date, time);
+ mir_sntprintf(szText, TranslateT("Last message received on %s at %s."), date, time);
sbd.pszText = szText;
}
else sbd.pszText = _T("");
diff --git a/plugins/Scriver/src/msgtimedout.cpp b/plugins/Scriver/src/msgtimedout.cpp
index 79915a1e22..0238bc5806 100644
--- a/plugins/Scriver/src/msgtimedout.cpp
+++ b/plugins/Scriver/src/msgtimedout.cpp
@@ -50,7 +50,7 @@ INT_PTR CALLBACK ErrorDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
SendDlgItemMessage(hwndDlg, IDC_MSGTEXT, EM_SETTEXTEX, (WPARAM)&st, (LPARAM)ewd->szText);
}
if (ewd->szName)
- mir_sntprintf(szText, SIZEOF(szText), _T("%s - %s"), TranslateT("Send error"), ewd->szName);
+ mir_sntprintf(szText, _T("%s - %s"), TranslateT("Send error"), ewd->szName);
else
_tcsncpy_s(szText, TranslateT("Send error"), _TRUNCATE);