diff options
author | George Hazan <george.hazan@gmail.com> | 2015-08-28 16:22:41 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-08-28 16:22:41 +0000 |
commit | c370af60855db957c5b200914bf0bde743845528 (patch) | |
tree | 0bd2ef127097c9e937c2650e8b202c3f09453323 /protocols/Sametime/src | |
parent | 7f082bd5d4865c30b313661b7a02f048b4b137be (diff) |
mir_sntprintf / mir_snprintf: obsoleted second parameter removed wherever possible
git-svn-id: http://svn.miranda-ng.org/main/trunk@15064 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Sametime/src')
-rw-r--r-- | protocols/Sametime/src/conference.cpp | 2 | ||||
-rw-r--r-- | protocols/Sametime/src/files.cpp | 2 | ||||
-rw-r--r-- | protocols/Sametime/src/messaging.cpp | 2 | ||||
-rw-r--r-- | protocols/Sametime/src/options.cpp | 4 | ||||
-rw-r--r-- | protocols/Sametime/src/sametime.cpp | 4 | ||||
-rw-r--r-- | protocols/Sametime/src/sametime_proto.cpp | 4 | ||||
-rw-r--r-- | protocols/Sametime/src/sametime_session.cpp | 2 | ||||
-rw-r--r-- | protocols/Sametime/src/utils.cpp | 12 |
8 files changed, 16 insertions, 16 deletions
diff --git a/protocols/Sametime/src/conference.cpp b/protocols/Sametime/src/conference.cpp index 4aaf949a27..4c9ce74460 100644 --- a/protocols/Sametime/src/conference.cpp +++ b/protocols/Sametime/src/conference.cpp @@ -410,7 +410,7 @@ INT_PTR CSametimeProto::onMenuCreateChat(WPARAM wParam, LPARAM lParam) if (my_login_info && GetAwareIdFromContact(hContact, &id_block)) {
TCHAR title[512];
TCHAR* ts = mir_utf8decodeT(my_login_info->user_name);
- mir_sntprintf(title, _countof(title), TranslateT("%s's conference"), ts);
+ mir_sntprintf(title, TranslateT("%s's conference"), ts);
mir_free(ts);
idb.user = id_block.user;
diff --git a/protocols/Sametime/src/files.cpp b/protocols/Sametime/src/files.cpp index 8393eb31a8..53141f1587 100644 --- a/protocols/Sametime/src/files.cpp +++ b/protocols/Sametime/src/files.cpp @@ -33,7 +33,7 @@ void mwFileTransfer_offered(mwFileTransfer* ft) TCHAR descriptionT[512];
if (message) {
TCHAR* messageT = mir_utf8decodeT(message);
- mir_sntprintf(descriptionT, _countof(descriptionT), _T("%s - %s"), filenameT, messageT);
+ mir_sntprintf(descriptionT, _T("%s - %s"), filenameT, messageT);
mir_free(messageT);
} else
_tcsncpy_s(descriptionT, filenameT, _TRUNCATE);
diff --git a/protocols/Sametime/src/messaging.cpp b/protocols/Sametime/src/messaging.cpp index 46540ad090..0a7f8a24f2 100644 --- a/protocols/Sametime/src/messaging.cpp +++ b/protocols/Sametime/src/messaging.cpp @@ -98,7 +98,7 @@ void mwIm_place_invite(struct mwConversation* conv, const char* message, const c TCHAR* tszMessage = mir_utf8decodeT(message);
TCHAR msg[512];
- mir_sntprintf(msg, _countof(msg), TranslateT("SERVICE NOT IMPLEMENTED. %s"), tszMessage);
+ mir_sntprintf(msg, TranslateT("SERVICE NOT IMPLEMENTED. %s"), tszMessage);
proto->showPopup(msg, SAMETIME_POPUP_INFO);
mir_free(tszMessage);
diff --git a/protocols/Sametime/src/options.cpp b/protocols/Sametime/src/options.cpp index d8c3c33bbc..6d47ca05fd 100644 --- a/protocols/Sametime/src/options.cpp +++ b/protocols/Sametime/src/options.cpp @@ -103,14 +103,14 @@ static INT_PTR CALLBACK DlgProcOptNet(HWND hwndDlg, UINT msg, WPARAM wParam, LPA WORD client_ver = proto->GetClientVersion();
if (client_ver) {
TCHAR verbuf[100];
- mir_sntprintf(verbuf, _countof(verbuf), TranslateT("Client protocol version: %03d.%03d"), (client_ver & 0xFF00) >> 8, client_ver & 0xFF);
+ mir_sntprintf(verbuf, TranslateT("Client protocol version: %03d.%03d"), (client_ver & 0xFF00) >> 8, client_ver & 0xFF);
SetDlgItemText(hwndDlg, IDC_ST_CLIENTVER, verbuf);
}
WORD server_ver = proto->GetServerVersion();
if (server_ver) {
TCHAR verbuf[100];
- mir_sntprintf(verbuf, _countof(verbuf), TranslateT("Server protocol version: %03d.%03d"), (server_ver & 0xFF00) >> 8, server_ver & 0xFF);
+ mir_sntprintf(verbuf, TranslateT("Server protocol version: %03d.%03d"), (server_ver & 0xFF00) >> 8, server_ver & 0xFF);
SetDlgItemText(hwndDlg, IDC_ST_SERVERVER, verbuf);
}
diff --git a/protocols/Sametime/src/sametime.cpp b/protocols/Sametime/src/sametime.cpp index 863430b20d..3f04f7ee22 100644 --- a/protocols/Sametime/src/sametime.cpp +++ b/protocols/Sametime/src/sametime.cpp @@ -108,14 +108,14 @@ HANDLE GetIconHandle(int iconId) HICON LoadIconEx(const char* name, bool big)
{
char szSettingName[100];
- mir_snprintf(szSettingName, _countof(szSettingName), "%s_%s", "SAMETIME", name);
+ mir_snprintf(szSettingName, "%s_%s", "SAMETIME", name);
return IcoLib_GetIcon(szSettingName, big);
}
void ReleaseIconEx(const char* name, bool big)
{
char szSettingName[100];
- mir_snprintf(szSettingName, _countof(szSettingName), "%s_%s", "SAMETIME", name);
+ mir_snprintf(szSettingName, "%s_%s", "SAMETIME", name);
IcoLib_Release(szSettingName, big);
}
diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp index 1e568c1a31..5a9b5cd2d5 100644 --- a/protocols/Sametime/src/sametime_proto.cpp +++ b/protocols/Sametime/src/sametime_proto.cpp @@ -15,7 +15,7 @@ CSametimeProto::CSametimeProto(const char* pszProtoName, const TCHAR* tszUserNam {
// Register m_hNetlibUser user
TCHAR name[128];
- mir_sntprintf(name, _countof(name), TranslateT("%s connection"), m_tszUserName);
+ mir_sntprintf(name, TranslateT("%s connection"), m_tszUserName);
NETLIBUSER nlu = { 0 };
nlu.cbSize = sizeof(nlu);
nlu.flags = NUF_TCHAR | NUF_OUTGOING | NUF_INCOMING | NUF_HTTPCONNS;
@@ -45,7 +45,7 @@ CSametimeProto::CSametimeProto(const char* pszProtoName, const TCHAR* tszUserNam RegisterPopups();
InitAwayMsg();
- mir_snprintf(szProtoGroups, _countof(szProtoGroups), "%s_GROUPS", m_szModuleName);
+ mir_snprintf(szProtoGroups, "%s_GROUPS", m_szModuleName);
m_iStatus = ID_STATUS_OFFLINE;
previous_status = ID_STATUS_OFFLINE;
diff --git a/protocols/Sametime/src/sametime_session.cpp b/protocols/Sametime/src/sametime_session.cpp index abd9a0b508..a0e6eb8bdf 100644 --- a/protocols/Sametime/src/sametime_session.cpp +++ b/protocols/Sametime/src/sametime_session.cpp @@ -155,7 +155,7 @@ void __cdecl SessionAnnounce(struct mwSession* session, struct mwLoginInfo* from TCHAR stzFromBuff[256];
stzFrom = mir_utf8decodeT(from->user_name);
stzText = mir_utf8decodeT(text);
- mir_sntprintf(stzFromBuff, _countof(stzFromBuff), TranslateT("Session announcement - from '%s'"), stzFrom);
+ mir_sntprintf(stzFromBuff, TranslateT("Session announcement - from '%s'"), stzFrom);
MessageBox(0, TranslateTS(stzText), stzFromBuff, MB_OK);
mir_free(stzText);
mir_free(stzFrom);
diff --git a/protocols/Sametime/src/utils.cpp b/protocols/Sametime/src/utils.cpp index 8bf46c72d1..346ccd5027 100644 --- a/protocols/Sametime/src/utils.cpp +++ b/protocols/Sametime/src/utils.cpp @@ -40,8 +40,8 @@ void CSametimeProto::RegisterPopups() puc.ptszDescription = szDescr;
puc.pszName = szName;
- mir_snprintf(szName, _countof(szName), "%s_%s", m_szModuleName, "Notify");
- mir_sntprintf(szDescr, _countof(szDescr), _T("%s/%s"), m_tszUserName, TranslateT("Notification"));
+ mir_snprintf(szName, "%s_%s", m_szModuleName, "Notify");
+ mir_sntprintf(szDescr, _T("%s/%s"), m_tszUserName, TranslateT("Notification"));
puc.hIcon = CopyIcon(LoadIconEx("notify", FALSE));
ReleaseIconEx("notify", FALSE);
puc.iSeconds = 8;
@@ -49,8 +49,8 @@ void CSametimeProto::RegisterPopups() puc.colorText = GetSysColor(COLOR_WINDOWTEXT);
hPopupNotify = Popup_RegisterClass(&puc);
- mir_snprintf(szName, _countof(szName), "%s_%s", m_szModuleName, "Error");
- mir_sntprintf(szDescr, _countof(szDescr), _T("%s/%s"), m_tszUserName, TranslateT("Error"));
+ mir_snprintf(szName, "%s_%s", m_szModuleName, "Error");
+ mir_sntprintf(szDescr, _T("%s/%s"), m_tszUserName, TranslateT("Error"));
puc.hIcon = CopyIcon(LoadIconEx("error", FALSE));
ReleaseIconEx("error", FALSE);
puc.iSeconds = 10;
@@ -89,9 +89,9 @@ void CALLBACK sttMainThreadCallback(PVOID dwParam) ppd.ptszTitle = puData->title;
ppd.ptszText = puData->text;
if (puData->flag == SAMETIME_POPUP_ERROR)
- mir_snprintf(szName, _countof(szName), "%s_%s", proto->m_szModuleName, "Error");
+ mir_snprintf(szName, "%s_%s", proto->m_szModuleName, "Error");
else
- mir_snprintf(szName, _countof(szName), "%s_%s", proto->m_szModuleName, "Notify");
+ mir_snprintf(szName, "%s_%s", proto->m_szModuleName, "Notify");
ppd.pszClassName = szName;
CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd);
}
|