summaryrefslogtreecommitdiff
path: root/protocols/MSN/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/MSN/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/MSN/src')
-rw-r--r--protocols/MSN/src/msn_contact.cpp6
-rw-r--r--protocols/MSN/src/msn_mail.cpp4
-rw-r--r--protocols/MSN/src/msn_misc.cpp20
-rw-r--r--protocols/MSN/src/msn_soapab.cpp2
4 files changed, 16 insertions, 16 deletions
diff --git a/protocols/MSN/src/msn_contact.cpp b/protocols/MSN/src/msn_contact.cpp
index b79ddcb6af..7ae6366836 100644
--- a/protocols/MSN/src/msn_contact.cpp
+++ b/protocols/MSN/src/msn_contact.cpp
@@ -113,13 +113,13 @@ void CMsnProto::AddDelUserContList(const char* email, const int list, const int
if (list < LIST_RL) {
const char* dom = strchr(email, '@');
if (dom == NULL) {
- sz = mir_snprintf(buf, SIZEOF(buf),
+ sz = mir_snprintf(buf,
"<ml><t><c n=\"%s\" l=\"%d\"/></t></ml>",
email, list);
}
else {
*(char*)dom = 0;
- sz = mir_snprintf(buf, SIZEOF(buf),
+ sz = mir_snprintf(buf,
"<ml><d n=\"%s\"><c n=\"%s\" l=\"%d\" t=\"%d\"/></d></ml>",
dom + 1, email, list, netId);
*(char*)dom = '@';
@@ -257,7 +257,7 @@ void CMsnProto::MSN_FindYahooUser(const char* email)
size_t sz;
*(char*)dom = '\0';
- sz = mir_snprintf(buf, SIZEOF(buf), "<ml><d n=\"%s\"><c n=\"%s\"/></d></ml>", dom + 1, email);
+ sz = mir_snprintf(buf, "<ml><d n=\"%s\"><c n=\"%s\"/></d></ml>", dom + 1, email);
*(char*)dom = '@';
msnNsThread->sendPacket("FQY", "%d\r\n%s", sz, buf);
}
diff --git a/protocols/MSN/src/msn_mail.cpp b/protocols/MSN/src/msn_mail.cpp
index 87587e24d0..10a968681d 100644
--- a/protocols/MSN/src/msn_mail.cpp
+++ b/protocols/MSN/src/msn_mail.cpp
@@ -295,7 +295,7 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial)
cle.hIcon = LoadSkinnedIcon(SKINICON_OTHER_SENDEMAIL);
cle.ptszTooltip = tBuffer2;
char buf[64];
- mir_snprintf(buf, SIZEOF(buf), "%s%s", m_szModuleName, MS_GOTO_INBOX);
+ mir_snprintf(buf, "%s%s", m_szModuleName, MS_GOTO_INBOX);
cle.pszService = buf;
CallService(MS_CLIST_ADDEVENT, hContact, (LPARAM)&cle);
@@ -317,7 +317,7 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial)
msgurl = "inbox";
char szUrl[256];
- mir_snprintf(szUrl, SIZEOF(szUrl), "http://mail.live.com?rru=%s", msgurl);
+ mir_snprintf(szUrl, "http://mail.live.com?rru=%s", msgurl);
MSN_ShowPopup(tBuffer, tBuffer2,
MSN_ALLOW_ENTER | MSN_ALLOW_MSGBOX | MSN_HOTMAIL_POPUP,
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp
index b788bee022..2160bd233b 100644
--- a/protocols/MSN/src/msn_misc.cpp
+++ b/protocols/MSN/src/msn_misc.cpp
@@ -154,7 +154,7 @@ char* MSN_GetAvatarHash(char* szContext, char** pszUrl)
if (i == 0)
mir_strcpy(szSetting, "Url");
else
- mir_snprintf(szSetting, SIZEOF(szSetting), "Url%d", i);
+ mir_snprintf(szSetting, "Url%d", i);
pszUrlAttr = ezxml_attr(xmli, szSetting);
if (pszUrlAttr == NULL)
break;
@@ -1021,15 +1021,15 @@ void CMsnProto::InitPopups(void)
ppc.colorBack = RGB(173, 206, 247);
ppc.colorText = GetSysColor(COLOR_WINDOWTEXT);
ppc.iSeconds = 3;
- mir_sntprintf(desc, SIZEOF(desc), _T("%s/%s"), m_tszUserName, TranslateT("Hotmail"));
- mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Hotmail");
+ mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Hotmail"));
+ mir_snprintf(name, "%s_%s", m_szModuleName, "Hotmail");
hPopupHotmail = Popup_RegisterClass(&ppc);
ppc.colorBack = RGB(173, 206, 247);
ppc.colorText = GetSysColor(COLOR_WINDOWTEXT);
ppc.iSeconds = 3;
- mir_sntprintf(desc, SIZEOF(desc), _T("%s/%s"), m_tszUserName, TranslateT("Notify"));
- mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Notify");
+ mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Notify"));
+ mir_snprintf(name, "%s_%s", m_szModuleName, "Notify");
hPopupNotify = Popup_RegisterClass(&ppc);
ppc.hIcon = (HICON)LoadImage(NULL, IDI_WARNING, IMAGE_ICON, 0, 0, LR_SHARED);
@@ -1037,8 +1037,8 @@ void CMsnProto::InitPopups(void)
ppc.colorText = RGB(255, 245, 225); //Yellow
ppc.iSeconds = 60;
- mir_sntprintf(desc, SIZEOF(desc), _T("%s/%s"), m_tszUserName, TranslateT("Error"));
- mir_snprintf(name, SIZEOF(name), "%s_%s", m_szModuleName, "Error");
+ mir_sntprintf(desc, _T("%s/%s"), m_tszUserName, TranslateT("Error"));
+ mir_snprintf(name, "%s_%s", m_szModuleName, "Error");
hPopupError = Popup_RegisterClass(&ppc);
}
@@ -1073,11 +1073,11 @@ void CALLBACK sttMainThreadCallback(PVOID dwParam)
ppd.pszClassName = name;
if (pud->flags & MSN_SHOW_ERROR)
- mir_snprintf(name, SIZEOF(name), "%s_%s", pud->proto->m_szModuleName, "Error");
+ mir_snprintf(name, "%s_%s", pud->proto->m_szModuleName, "Error");
else if (pud->flags & (MSN_HOTMAIL_POPUP | MSN_ALERT_POPUP))
- mir_snprintf(name, SIZEOF(name), "%s_%s", pud->proto->m_szModuleName, "Hotmail");
+ mir_snprintf(name, "%s_%s", pud->proto->m_szModuleName, "Hotmail");
else
- mir_snprintf(name, SIZEOF(name), "%s_%s", pud->proto->m_szModuleName, "Notify");
+ mir_snprintf(name, "%s_%s", pud->proto->m_szModuleName, "Notify");
CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd);
}
diff --git a/protocols/MSN/src/msn_soapab.cpp b/protocols/MSN/src/msn_soapab.cpp
index 48afb659bd..02f1ead4d4 100644
--- a/protocols/MSN/src/msn_soapab.cpp
+++ b/protocols/MSN/src/msn_soapab.cpp
@@ -401,7 +401,7 @@ bool CMsnProto::MSN_SharingAddDelMember(const char* szEmail, const int listId, c
ezxml_set_txt(node, "MSN.IM.BuddyType");
node = ezxml_add_child(anot, "Value", 0);
- mir_snprintf(buf, SIZEOF(buf), "%02d:", netId);
+ mir_snprintf(buf, "%02d:", netId);
ezxml_set_txt(node, buf);
}