summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-04 22:12:13 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-04 22:12:13 +0000
commitb7c74cd5b22618d544a3f4ae124985d4837e3a22 (patch)
tree468d9610a590685322ad2159a9bd2d9e2ba83f89 /protocols/JabberG/src
parent7de513f180c429859e246d1033d745b394e1fc28 (diff)
new mir_snprintf templates without SIZEOF
git-svn-id: http://svn.miranda-ng.org/main/trunk@14002 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src')
-rw-r--r--protocols/JabberG/src/jabber_console.cpp2
-rw-r--r--protocols/JabberG/src/jabber_disco.cpp30
-rw-r--r--protocols/JabberG/src/jabber_file.cpp2
-rw-r--r--protocols/JabberG/src/jabber_groupchat.cpp16
-rw-r--r--protocols/JabberG/src/jabber_iq_handlers.cpp2
-rw-r--r--protocols/JabberG/src/jabber_misc.cpp6
-rw-r--r--protocols/JabberG/src/jabber_notes.cpp2
-rw-r--r--protocols/JabberG/src/jabber_secur.cpp4
-rw-r--r--protocols/JabberG/src/jabber_util.cpp6
-rw-r--r--protocols/JabberG/src/jabber_vcard.cpp44
-rw-r--r--protocols/JabberG/src/jabber_xstatus.cpp30
11 files changed, 72 insertions, 72 deletions
diff --git a/protocols/JabberG/src/jabber_console.cpp b/protocols/JabberG/src/jabber_console.cpp
index 2d9a44c235..57b968ce96 100644
--- a/protocols/JabberG/src/jabber_console.cpp
+++ b/protocols/JabberG/src/jabber_console.cpp
@@ -176,7 +176,7 @@ static void sttAppendBufW(StringBuf *buf, const WCHAR *str)
tmp[0] = (char)*p;
tmp[1] = 0;
}
- else mir_snprintf(tmp, SIZEOF(tmp), "\\u%d ?", (int)*p);
+ else mir_snprintf(tmp, "\\u%d ?", (int)*p);
sttAppendBufRaw(buf, tmp);
}
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp
index 4e1a452f77..b13aac36ff 100644
--- a/protocols/JabberG/src/jabber_disco.cpp
+++ b/protocols/JabberG/src/jabber_disco.cpp
@@ -441,14 +441,14 @@ void CJabberProto::PerformBrowse(HWND hwndDlg)
int count = getDword("discoWnd_favCount", 0);
for (int i=0; i < count; i++) {
char setting[MAXMODULELABELLENGTH];
- mir_snprintf(setting, SIZEOF(setting), "discoWnd_favName_%d", i);
+ mir_snprintf(setting, "discoWnd_favName_%d", i);
ptrT tszName( getTStringA(setting));
if (tszName == NULL)
continue;
- mir_snprintf(setting, SIZEOF(setting), "discoWnd_favJID_%d", i);
+ mir_snprintf(setting, "discoWnd_favJID_%d", i);
ptrT dbvJid( getTStringA(setting));
- mir_snprintf(setting, SIZEOF(setting), "discoWnd_favNode_%d", i);
+ mir_snprintf(setting, "discoWnd_favNode_%d", i);
ptrT dbvNode( getTStringA(setting));
CJabberSDNode *pNode = m_SDManager.AddPrimaryNode(dbvJid, dbvNode, tszName);
SendBothRequests(pNode, NULL);
@@ -798,7 +798,7 @@ void CJabberDlgDiscovery::btnBookmarks_OnClick(CCtrlButton *)
int count = m_proto->getDword("discoWnd_favCount", 0);
for (int i=0; i < count; i++) {
char setting[MAXMODULELABELLENGTH];
- mir_snprintf(setting, SIZEOF(setting), "discoWnd_favName_%d", i);
+ mir_snprintf(setting, "discoWnd_favName_%d", i);
ptrT tszName( m_proto->getTStringA(setting));
if (tszName != NULL) {
HMENU hSubMenu = CreatePopupMenu();
@@ -832,11 +832,11 @@ void CJabberDlgDiscovery::btnBookmarks_OnClick(CCtrlButton *)
if (res % 10) {
res /= 10;
char setting[MAXMODULELABELLENGTH];
- mir_snprintf(setting, SIZEOF(setting), "discoWnd_favName_%d", res);
+ mir_snprintf(setting, "discoWnd_favName_%d", res);
m_proto->delSetting(setting);
- mir_snprintf(setting, SIZEOF(setting), "discoWnd_favJID_%d", res);
+ mir_snprintf(setting, "discoWnd_favJID_%d", res);
m_proto->delSetting(setting);
- mir_snprintf(setting, SIZEOF(setting), "discoWnd_favNode_%d", res);
+ mir_snprintf(setting, "discoWnd_favNode_%d", res);
m_proto->delSetting(setting);
}
else {
@@ -846,11 +846,11 @@ void CJabberDlgDiscovery::btnBookmarks_OnClick(CCtrlButton *)
SetDlgItemText(m_hwnd, IDC_COMBO_NODE, _T(""));
char setting[MAXMODULELABELLENGTH];
- mir_snprintf(setting, SIZEOF(setting), "discoWnd_favJID_%d", res);
+ mir_snprintf(setting, "discoWnd_favJID_%d", res);
ptrT dbv( m_proto->getTStringA(setting));
if (dbv) SetDlgItemText(m_hwnd, IDC_COMBO_JID, dbv);
- mir_snprintf(setting, SIZEOF(setting), "discoWnd_favNode_%d", res);
+ mir_snprintf(setting, "discoWnd_favNode_%d", res);
dbv = m_proto->getTStringA(setting);
if (dbv) SetDlgItemText(m_hwnd, IDC_COMBO_NODE, dbv);
@@ -861,11 +861,11 @@ void CJabberDlgDiscovery::btnBookmarks_OnClick(CCtrlButton *)
int count = m_proto->getDword("discoWnd_favCount", 0);
for (int i=0; i < count; i++) {
char setting[MAXMODULELABELLENGTH];
- mir_snprintf(setting, SIZEOF(setting), "discoWnd_favName_%d", i);
+ mir_snprintf(setting, "discoWnd_favName_%d", i);
m_proto->delSetting(setting);
- mir_snprintf(setting, SIZEOF(setting), "discoWnd_favJID_%d", i);
+ mir_snprintf(setting, "discoWnd_favJID_%d", i);
m_proto->delSetting(setting);
- mir_snprintf(setting, SIZEOF(setting), "discoWnd_favNode_%d", i);
+ mir_snprintf(setting, "discoWnd_favNode_%d", i);
m_proto->delSetting(setting);
}
m_proto->delSetting("discoWnd_favCount");
@@ -1334,11 +1334,11 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM
{
char setting[MAXMODULELABELLENGTH];
int count = getDword("discoWnd_favCount", 0);
- mir_snprintf(setting, SIZEOF(setting), "discoWnd_favName_%d", count);
+ mir_snprintf(setting, "discoWnd_favName_%d", count);
setTString(setting, pNode->GetName() ? pNode->GetName() : pNode->GetJid());
- mir_snprintf(setting, SIZEOF(setting), "discoWnd_favJID_%d", count);
+ mir_snprintf(setting, "discoWnd_favJID_%d", count);
setTString(setting, pNode->GetJid());
- mir_snprintf(setting, SIZEOF(setting), "discoWnd_favNode_%d", count);
+ mir_snprintf(setting, "discoWnd_favNode_%d", count);
setTString(setting, pNode->GetNode() ? pNode->GetNode() : _T(""));
setDword("discoWnd_favCount", ++count);
}
diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp
index d962cac51e..d4bfc3dd61 100644
--- a/protocols/JabberG/src/jabber_file.cpp
+++ b/protocols/JabberG/src/jabber_file.cpp
@@ -48,7 +48,7 @@ void __cdecl CJabberProto::FileReceiveThread(filetransfer *ft)
ft->s = info.s;
char buffer[JABBER_NETWORK_BUFFER_SIZE];
- int datalen = mir_snprintf(buffer, SIZEOF(buffer), "GET /%s HTTP/1.1\r\nHost: %s\r\n\r\n", ft->httpPath, ft->httpHostName);
+ int datalen = mir_snprintf(buffer, "GET /%s HTTP/1.1\r\nHost: %s\r\n\r\n", ft->httpPath, ft->httpHostName);
info.send(buffer, datalen);
ft->state = FT_CONNECTING;
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp
index 4736324897..81b37b400e 100644
--- a/protocols/JabberG/src/jabber_groupchat.cpp
+++ b/protocols/JabberG/src/jabber_groupchat.cpp
@@ -119,16 +119,16 @@ struct JabberGcRecentInfo
BOOL loadRecent(int iRecent)
{
char setting[MAXMODULELABELLENGTH];
- mir_snprintf(setting, SIZEOF(setting), "rcMuc_%d_server", iRecent);
+ mir_snprintf(setting, "rcMuc_%d_server", iRecent);
server = ppro->getTStringA(setting);
- mir_snprintf(setting, SIZEOF(setting), "rcMuc_%d_room", iRecent);
+ mir_snprintf(setting, "rcMuc_%d_room", iRecent);
room = ppro->getTStringA(setting);
- mir_snprintf(setting, SIZEOF(setting), "rcMuc_%d_nick", iRecent);
+ mir_snprintf(setting, "rcMuc_%d_nick", iRecent);
nick = ppro->getTStringA(setting);
- mir_snprintf(setting, SIZEOF(setting), "password_rcMuc_%d", iRecent);
+ mir_snprintf(setting, "password_rcMuc_%d", iRecent);
password = ppro->getTStringA(NULL, setting);
return room || server || nick || password;
@@ -138,25 +138,25 @@ struct JabberGcRecentInfo
{
char setting[MAXMODULELABELLENGTH];
- mir_snprintf(setting, SIZEOF(setting), "rcMuc_%d_server", iRecent);
+ mir_snprintf(setting, "rcMuc_%d_server", iRecent);
if (server)
ppro->setTString(setting, server);
else
ppro->delSetting(setting);
- mir_snprintf(setting, SIZEOF(setting), "rcMuc_%d_room", iRecent);
+ mir_snprintf(setting, "rcMuc_%d_room", iRecent);
if (room)
ppro->setTString(setting, room);
else
ppro->delSetting(setting);
- mir_snprintf(setting, SIZEOF(setting), "rcMuc_%d_nick", iRecent);
+ mir_snprintf(setting, "rcMuc_%d_nick", iRecent);
if (nick)
ppro->setTString(setting, nick);
else
ppro->delSetting(setting);
- mir_snprintf(setting, SIZEOF(setting), "password_rcMuc_%d", iRecent);
+ mir_snprintf(setting, "password_rcMuc_%d", iRecent);
if (password)
ppro->setTString(setting, password);
else
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp
index 131a3b0ced..252da69c2f 100644
--- a/protocols/JabberG/src/jabber_iq_handlers.cpp
+++ b/protocols/JabberG/src/jabber_iq_handlers.cpp
@@ -741,7 +741,7 @@ BOOL CJabberProto::OnHandleDiscoItemsRequest(HXML iqNode, CJabberIqInfo *pInfo)
BOOL CJabberProto::AddClistHttpAuthEvent(CJabberHttpAuthParams *pParams)
{
char szService[256];
- mir_snprintf(szService, SIZEOF(szService), "%s%s", m_szModuleName, JS_HTTP_AUTH);
+ mir_snprintf(szService, "%s%s", m_szModuleName, JS_HTTP_AUTH);
CLISTEVENT cle = { 0 };
cle.cbSize = sizeof(CLISTEVENT);
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp
index 8927b0f816..a51eefa6a2 100644
--- a/protocols/JabberG/src/jabber_misc.cpp
+++ b/protocols/JabberG/src/jabber_misc.cpp
@@ -462,10 +462,10 @@ void CJabberProto::SetContactOfflineStatus(MCONTACT hContact)
void CJabberProto::InitPopups(void)
{
TCHAR desc[256];
- mir_sntprintf(desc, SIZEOF(desc), _T("%s %s"), m_tszUserName, TranslateT("Errors"));
+ mir_sntprintf(desc, _T("%s %s"), m_tszUserName, TranslateT("Errors"));
char name[256];
- mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Error");
+ mir_snprintf(name, "%s_%s", m_szModuleName, "Error");
POPUPCLASS ppc = { sizeof(ppc) };
ppc.flags = PCF_TCHAR;
@@ -490,7 +490,7 @@ void CJabberProto::MsgPopup(MCONTACT hContact, const TCHAR *szMsg, const TCHAR *
ppd.ptszText = szMsg;
ppd.pszClassName = name;
ppd.hContact = hContact;
- mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Error");
+ mir_snprintf(name, "%s_%s", m_szModuleName, "Error");
CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd);
}
diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp
index c993dc746b..e493e54c0d 100644
--- a/protocols/JabberG/src/jabber_notes.cpp
+++ b/protocols/JabberG/src/jabber_notes.cpp
@@ -780,7 +780,7 @@ bool CJabberProto::OnIncomingNote(const TCHAR *szFrom, HXML hXml)
CLISTEVENT cle = { 0 };
char szService[256];
- mir_snprintf(szService, SIZEOF(szService), "%s%s", m_szModuleName, JS_INCOMING_NOTE_EVENT);
+ mir_snprintf(szService, "%s%s", m_szModuleName, JS_INCOMING_NOTE_EVENT);
cle.cbSize = sizeof(CLISTEVENT);
cle.hIcon = (HICON)LoadIconEx("notes");
cle.flags = CLEF_PROTOCOLGLOBAL | CLEF_TCHAR;
diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp
index a364050197..5bebb8ac3a 100644
--- a/protocols/JabberG/src/jabber_secur.cpp
+++ b/protocols/JabberG/src/jabber_secur.cpp
@@ -297,7 +297,7 @@ char* TScramAuth::getChallenge(const TCHAR *challenge)
char buf[4096];
ptrA encproof(mir_base64_encode((PBYTE)clientProof, sizeof(clientProof)));
- int cbLen = mir_snprintf(buf, SIZEOF(buf), "c=biws,r=%s,p=%s", snonce, encproof);
+ int cbLen = mir_snprintf(buf, "c=biws,r=%s,p=%s", snonce, encproof);
return mir_base64_encode((PBYTE)buf, cbLen);
}
@@ -310,7 +310,7 @@ char* TScramAuth::getInitialRequest()
cnonce = mir_base64_encode((PBYTE)nonce, sizeof(nonce));
char buf[4096];
- int cbLen = mir_snprintf(buf, SIZEOF(buf), "n,,n=%s,r=%s", uname, cnonce);
+ int cbLen = mir_snprintf(buf, "n,,n=%s,r=%s", uname, cnonce);
msg1 = mir_strdup(buf + 3);
return mir_base64_encode((PBYTE)buf, cbLen);
}
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp
index b6a142b90f..662240451c 100644
--- a/protocols/JabberG/src/jabber_util.cpp
+++ b/protocols/JabberG/src/jabber_util.cpp
@@ -692,7 +692,7 @@ void CJabberProto::ComboLoadRecentStrings(HWND hwndDlg, UINT idcCombo, char *par
{
for (int i = 0; i < recentCount; i++) {
char setting[MAXMODULELABELLENGTH];
- mir_snprintf(setting, SIZEOF(setting), "%s%d", param, i);
+ mir_snprintf(setting, "%s%d", param, i);
ptrT tszRecent(getTStringA(setting));
if (tszRecent != NULL)
SendDlgItemMessage(hwndDlg, idcCombo, CB_ADDSTRING, 0, tszRecent);
@@ -716,7 +716,7 @@ void CJabberProto::ComboAddRecentString(HWND hwndDlg, UINT idcCombo, char *param
id = getByte(param, 0);
char setting[MAXMODULELABELLENGTH];
- mir_snprintf(setting, SIZEOF(setting), "%s%d", param, id);
+ mir_snprintf(setting, "%s%d", param, id);
setTString(setting, string);
setByte(param, (id + 1) % recentCount);
}
@@ -769,7 +769,7 @@ static VOID CALLBACK sttRebuildInfoFrameApcProc(void* param)
char name[128];
char *jid_copy = mir_t2a(item->jid);
- mir_snprintf(name, SIZEOF(name), "$/Transports/%s", jid_copy);
+ mir_snprintf(name, "$/Transports/%s", jid_copy);
ppro->m_pInfoFrame->CreateInfoItem(name, true, hContact);
ppro->m_pInfoFrame->UpdateInfoItem(name, ppro->GetIconHandle(IDI_TRANSPORTL), (TCHAR *)item->jid);
ppro->m_pInfoFrame->SetInfoItemCallback(name, &CJabberProto::InfoFrame_OnTransport);
diff --git a/protocols/JabberG/src/jabber_vcard.cpp b/protocols/JabberG/src/jabber_vcard.cpp
index c4860f67ad..510abac8ac 100644
--- a/protocols/JabberG/src/jabber_vcard.cpp
+++ b/protocols/JabberG/src/jabber_vcard.cpp
@@ -552,12 +552,12 @@ static INT_PTR CALLBACK EditEmailDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
SetWindowText(hwndDlg, TranslateT("Jabber vCard: Edit Email Address"));
char idstr[33];
- mir_snprintf(idstr, SIZEOF(idstr), "e-mail%d", dat->id);
+ mir_snprintf(idstr, "e-mail%d", dat->id);
ptrA email(dat->ppro->getStringA(idstr));
if (email != NULL)
SetDlgItemTextA(hwndDlg, IDC_EMAIL, email);
- mir_snprintf(idstr, SIZEOF(idstr), "e-mailFlag%d", lParam);
+ mir_snprintf(idstr, "e-mailFlag%d", lParam);
WORD nFlag = dat->ppro->getWord(idstr, 0);
if (nFlag & JABBER_VCEMAIL_HOME) CheckDlgButton(hwndDlg, IDC_HOME, BST_CHECKED);
if (nFlag & JABBER_VCEMAIL_WORK) CheckDlgButton(hwndDlg, IDC_WORK, BST_CHECKED);
@@ -573,14 +573,14 @@ static INT_PTR CALLBACK EditEmailDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
if (dat->id < 0)
for (dat->id = 0;; dat->id++) {
- mir_snprintf(idstr, SIZEOF(idstr), "e-mail%d", dat->id);
+ mir_snprintf(idstr, "e-mail%d", dat->id);
if (ptrA(dat->ppro->getStringA(idstr)) == NULL)
break;
}
TCHAR text[128];
GetDlgItemText(hwndDlg, IDC_EMAIL, text, SIZEOF(text));
- mir_snprintf(idstr, SIZEOF(idstr), "e-mail%d", dat->id);
+ mir_snprintf(idstr, "e-mail%d", dat->id);
dat->ppro->setTString(idstr, text);
{
WORD nFlag = 0;
@@ -588,7 +588,7 @@ static INT_PTR CALLBACK EditEmailDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
if (IsDlgButtonChecked(hwndDlg, IDC_WORK)) nFlag |= JABBER_VCEMAIL_WORK;
if (IsDlgButtonChecked(hwndDlg, IDC_INTERNET)) nFlag |= JABBER_VCEMAIL_INTERNET;
if (IsDlgButtonChecked(hwndDlg, IDC_X400)) nFlag |= JABBER_VCEMAIL_X400;
- mir_snprintf(idstr, SIZEOF(idstr), "e-mailFlag%d", dat->id);
+ mir_snprintf(idstr, "e-mailFlag%d", dat->id);
dat->ppro->setWord(idstr, nFlag);
}
// fall through
@@ -614,12 +614,12 @@ static INT_PTR CALLBACK EditPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
SetWindowText(hwndDlg, TranslateT("Jabber vCard: Edit Phone Number"));
char idstr[33];
- mir_snprintf(idstr, SIZEOF(idstr), "Phone%d", dat->id);
+ mir_snprintf(idstr, "Phone%d", dat->id);
ptrA phone(dat->ppro->getStringA(idstr));
if (phone != NULL)
SetDlgItemTextA(hwndDlg, IDC_PHONE, phone);
- mir_snprintf(idstr, SIZEOF(idstr), "PhoneFlag%d", dat->id);
+ mir_snprintf(idstr, "PhoneFlag%d", dat->id);
int nFlag = dat->ppro->getWord(idstr, 0);
if (nFlag & JABBER_VCTEL_HOME) CheckDlgButton(hwndDlg, IDC_HOME, BST_CHECKED);
if (nFlag & JABBER_VCTEL_WORK) CheckDlgButton(hwndDlg, IDC_WORK, BST_CHECKED);
@@ -644,14 +644,14 @@ static INT_PTR CALLBACK EditPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
if (dat->id < 0)
for (dat->id = 0;; dat->id++) {
- mir_snprintf(idstr, SIZEOF(idstr), "Phone%d", dat->id);
+ mir_snprintf(idstr, "Phone%d", dat->id);
if (ptrA(dat->ppro->getStringA(idstr)) == NULL)
break;
}
char text[128];
GetDlgItemTextA(hwndDlg, IDC_PHONE, text, SIZEOF(text));
- mir_snprintf(idstr, SIZEOF(idstr), "Phone%d", dat->id);
+ mir_snprintf(idstr, "Phone%d", dat->id);
dat->ppro->setString(idstr, text);
WORD nFlag = 0;
@@ -667,7 +667,7 @@ static INT_PTR CALLBACK EditPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam,
if (IsDlgButtonChecked(hwndDlg, IDC_MODEM)) nFlag |= JABBER_VCTEL_MODEM;
if (IsDlgButtonChecked(hwndDlg, IDC_ISDN)) nFlag |= JABBER_VCTEL_ISDN;
if (IsDlgButtonChecked(hwndDlg, IDC_PCS)) nFlag |= JABBER_VCTEL_PCS;
- mir_snprintf(idstr, SIZEOF(idstr), "PhoneFlag%d", dat->id);
+ mir_snprintf(idstr, "PhoneFlag%d", dat->id);
dat->ppro->setWord(idstr, nFlag);
}
// fall through
@@ -729,7 +729,7 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP
lvi.iSubItem = 0;
lvi.iItem = 0;
for (i=0;;i++) {
- mir_snprintf(idstr, SIZEOF(idstr), "e-mail%d", i);
+ mir_snprintf(idstr, "e-mail%d", i);
ptrT email( ppro->getTStringA(idstr));
if (email == NULL) break;
@@ -750,7 +750,7 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP
lvi.iSubItem = 0;
lvi.iItem = 0;
for (i=0;;i++) {
- mir_snprintf(idstr, SIZEOF(idstr), "Phone%d", i);
+ mir_snprintf(idstr, "Phone%d", i);
ptrT phone( ppro->getTStringA(idstr));
if (phone == NULL) break;
@@ -860,20 +860,20 @@ static INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM, LPARAM lP
int i;
for (i = lvi.lParam;; i++) {
- mir_snprintf(idstr, SIZEOF(idstr), szIdTemplate, i + 1);
+ mir_snprintf(idstr, szIdTemplate, i + 1);
ptrA fieldVal(ppro->getStringA(idstr));
if (fieldVal == NULL) break;
- mir_snprintf(idstr, SIZEOF(idstr), szIdTemplate, i);
+ mir_snprintf(idstr, szIdTemplate, i);
ppro->setString(idstr, fieldVal);
- mir_snprintf(idstr, SIZEOF(idstr), szFlagTemplate, i + 1);
+ mir_snprintf(idstr, szFlagTemplate, i + 1);
WORD nFlag = ppro->getWord(idstr, 0);
- mir_snprintf(idstr, SIZEOF(idstr), szFlagTemplate, i);
+ mir_snprintf(idstr, szFlagTemplate, i);
ppro->setWord(idstr, nFlag);
}
- mir_snprintf(idstr, SIZEOF(idstr), szIdTemplate, i);
+ mir_snprintf(idstr, szIdTemplate, i);
ppro->delSetting(idstr);
- mir_snprintf(idstr, SIZEOF(idstr), szFlagTemplate, i);
+ mir_snprintf(idstr, szFlagTemplate, i);
ppro->delSetting(idstr);
SendMessage(hwndDlg, M_REMAKELISTS, 0, 0);
ppro->m_vCardUpdates |= (1UL << iPageId);
@@ -1032,7 +1032,7 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName)
AppendVcardFromDB(v, "GENDER", "GenderString");
for (i = 0;; i++) {
- mir_snprintf(idstr, SIZEOF(idstr), "e-mail%d", i);
+ mir_snprintf(idstr, "e-mail%d", i);
ptrT email(getTStringA(idstr));
if (email == NULL)
break;
@@ -1040,7 +1040,7 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName)
HXML e = v << XCHILD(_T("EMAIL"), email);
AppendVcardFromDB(e, "USERID", idstr);
- mir_snprintf(idstr, SIZEOF(idstr), "e-mailFlag%d", i);
+ mir_snprintf(idstr, "e-mailFlag%d", i);
WORD nFlag = getWord(idstr, 0);
if (nFlag & JABBER_VCEMAIL_HOME) e << XCHILD(_T("HOME"));
if (nFlag & JABBER_VCEMAIL_WORK) e << XCHILD(_T("WORK"));
@@ -1080,7 +1080,7 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName)
AppendVcardFromDB(v, "DESC", "About");
for (i = 0;; i++) {
- mir_snprintf(idstr, SIZEOF(idstr), "Phone%d", i);
+ mir_snprintf(idstr, "Phone%d", i);
ptrT phone(getTStringA(idstr));
if (phone == NULL)
break;
@@ -1088,7 +1088,7 @@ void CJabberProto::SetServerVcard(BOOL bPhotoChanged, TCHAR* szPhotoFileName)
n = v << XCHILD(_T("TEL"));
AppendVcardFromDB(n, "NUMBER", idstr);
- mir_snprintf(idstr, SIZEOF(idstr), "PhoneFlag%d", i);
+ mir_snprintf(idstr, "PhoneFlag%d", i);
WORD nFlag = getWord(idstr, 0);
if (nFlag & JABBER_VCTEL_HOME) n << XCHILD(_T("HOME"));
if (nFlag & JABBER_VCTEL_WORK) n << XCHILD(_T("WORK"));
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp
index 49f1bd03a5..473f0b5292 100644
--- a/protocols/JabberG/src/jabber_xstatus.cpp
+++ b/protocols/JabberG/src/jabber_xstatus.cpp
@@ -276,14 +276,14 @@ void CJabberDlgPepSimple::cbModes_OnChange(CCtrlData *)
if ((m_prevSelected >= 0) && (m_modes[m_cbModes.GetItemData(m_prevSelected)].m_id >= 0)) {
TCHAR *txt = m_txtDescription.GetText();
- mir_snprintf(szSetting, SIZEOF(szSetting), "PepMsg_%s", m_modes[m_cbModes.GetItemData(m_prevSelected)].m_name);
+ mir_snprintf(szSetting, "PepMsg_%s", m_modes[m_cbModes.GetItemData(m_prevSelected)].m_name);
m_proto->setTString(szSetting, txt);
mir_free(txt);
}
m_prevSelected = m_cbModes.GetCurSel();
if ((m_prevSelected >= 0) && (m_modes[m_cbModes.GetItemData(m_prevSelected)].m_id >= 0)) {
- mir_snprintf(szSetting, SIZEOF(szSetting), "PepMsg_%s", m_modes[m_cbModes.GetItemData(m_prevSelected)].m_name);
+ mir_snprintf(szSetting, "PepMsg_%s", m_modes[m_cbModes.GetItemData(m_prevSelected)].m_name);
ptrT szDescr( m_proto->getTStringA(szSetting));
m_txtDescription.SetText((szDescr != NULL) ? szDescr : _T(""));
@@ -447,7 +447,7 @@ CPepGuiService::~CPepGuiService()
void CPepGuiService::InitGui()
{
char szService[128];
- mir_snprintf(szService, SIZEOF(szService), "%s/AdvStatusSet/%s", m_proto->m_szModuleName, m_name);
+ mir_snprintf(szService, "%s/AdvStatusSet/%s", m_proto->m_szModuleName, m_name);
int(__cdecl CPepGuiService::*serviceProc)(WPARAM, LPARAM);
serviceProc = &CPepGuiService::OnMenuItemClick;
@@ -463,7 +463,7 @@ void CPepGuiService::RebuildMenu()
return;
char szService[128];
- mir_snprintf(szService, SIZEOF(szService), "%s/AdvStatusSet/%s", m_proto->m_szModuleName, m_name);
+ mir_snprintf(szService, "%s/AdvStatusSet/%s", m_proto->m_szModuleName, m_name);
CLISTMENUITEM mi = { sizeof(mi) };
mi.hParentMenu = hJabberRoot;
@@ -1446,7 +1446,7 @@ INT_PTR __cdecl CJabberProto::OnSetXStatusEx(WPARAM, LPARAM lParam)
void CJabberProto::RegisterAdvStatusSlot(const char *pszSlot)
{
char szSetting[256];
- mir_snprintf(szSetting, SIZEOF(szSetting), "AdvStatus/%s/%s", m_szModuleName, pszSlot);
+ mir_snprintf(szSetting, "AdvStatus/%s/%s", m_szModuleName, pszSlot);
db_set_resident(szSetting, "id");
db_set_resident(szSetting, "icon");
db_set_resident(szSetting, "title");
@@ -1456,16 +1456,16 @@ void CJabberProto::RegisterAdvStatusSlot(const char *pszSlot)
void CJabberProto::ResetAdvStatus(MCONTACT hContact, const char *pszSlot)
{
char szSetting[128];
- mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/id", m_szModuleName, pszSlot);
+ mir_snprintf(szSetting, "%s/%s/id", m_szModuleName, pszSlot);
db_unset(hContact, "AdvStatus", szSetting);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/icon", m_szModuleName, pszSlot);
+ mir_snprintf(szSetting, "%s/%s/icon", m_szModuleName, pszSlot);
db_unset(hContact, "AdvStatus", szSetting);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/title", m_szModuleName, pszSlot);
+ mir_snprintf(szSetting, "%s/%s/title", m_szModuleName, pszSlot);
db_unset(hContact, "AdvStatus", szSetting);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/text", m_szModuleName, pszSlot);
+ mir_snprintf(szSetting, "%s/%s/text", m_szModuleName, pszSlot);
db_unset(hContact, "AdvStatus", szSetting);
}
@@ -1473,16 +1473,16 @@ void CJabberProto::WriteAdvStatus(MCONTACT hContact, const char *pszSlot, const
{
char szSetting[128];
- mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/id", m_szModuleName, pszSlot);
+ mir_snprintf(szSetting, "%s/%s/id", m_szModuleName, pszSlot);
db_set_ts(hContact, "AdvStatus", szSetting, pszMode);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/icon", m_szModuleName, pszSlot);
+ mir_snprintf(szSetting, "%s/%s/icon", m_szModuleName, pszSlot);
db_set_s(hContact, "AdvStatus", szSetting, pszIcon);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/title", m_szModuleName, pszSlot);
+ mir_snprintf(szSetting, "%s/%s/title", m_szModuleName, pszSlot);
db_set_ts(hContact, "AdvStatus", szSetting, pszTitle);
- mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/text", m_szModuleName, pszSlot);
+ mir_snprintf(szSetting, "%s/%s/text", m_szModuleName, pszSlot);
if (pszText)
db_set_ts(hContact, "AdvStatus", szSetting, pszText);
else
@@ -1492,14 +1492,14 @@ void CJabberProto::WriteAdvStatus(MCONTACT hContact, const char *pszSlot, const
char* CJabberProto::ReadAdvStatusA(MCONTACT hContact, const char *pszSlot, const char *pszValue)
{
char szSetting[128];
- mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/%s", m_szModuleName, pszSlot, pszValue);
+ mir_snprintf(szSetting, "%s/%s/%s", m_szModuleName, pszSlot, pszValue);
return db_get_sa(hContact, "AdvStatus", szSetting);
}
TCHAR* CJabberProto::ReadAdvStatusT(MCONTACT hContact, const char *pszSlot, const char *pszValue)
{
char szSetting[128];
- mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/%s", m_szModuleName, pszSlot, pszValue);
+ mir_snprintf(szSetting, "%s/%s/%s", m_szModuleName, pszSlot, pszValue);
return db_get_tsa(hContact, "AdvStatus", szSetting);
}