diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-04 22:12:13 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-04 22:12:13 +0000 |
commit | b7c74cd5b22618d544a3f4ae124985d4837e3a22 (patch) | |
tree | 468d9610a590685322ad2159a9bd2d9e2ba83f89 /protocols/GTalkExt/src | |
parent | 7de513f180c429859e246d1033d745b394e1fc28 (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/GTalkExt/src')
-rw-r--r-- | protocols/GTalkExt/src/avatar.cpp | 2 | ||||
-rw-r--r-- | protocols/GTalkExt/src/handlers.cpp | 4 | ||||
-rw-r--r-- | protocols/GTalkExt/src/inbox.cpp | 4 | ||||
-rw-r--r-- | protocols/GTalkExt/src/notifications.cpp | 6 | ||||
-rw-r--r-- | protocols/GTalkExt/src/options.cpp | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/protocols/GTalkExt/src/avatar.cpp b/protocols/GTalkExt/src/avatar.cpp index 47d760cf70..833bfeef0a 100644 --- a/protocols/GTalkExt/src/avatar.cpp +++ b/protocols/GTalkExt/src/avatar.cpp @@ -45,7 +45,7 @@ LPTSTR CreateAvaFile(HANDLE *hFile) return NULL;
TCHAR full[MAX_PATH + 2];
- mir_sntprintf(full, SIZEOF(full), AVA_FILE_NAME_FORMAT, path, name);
+ mir_sntprintf(full, AVA_FILE_NAME_FORMAT, path, name);
CreateDirectoryTreeT(full);
HANDLE h = CreateFile(full, GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp index 16af0a823e..1aa2733414 100644 --- a/protocols/GTalkExt/src/handlers.cpp +++ b/protocols/GTalkExt/src/handlers.cpp @@ -189,7 +189,7 @@ void RequestMail(LPCTSTR jidWithRes, IJabberInterface *ji) lastThreadId(ReadJidSetting(LAST_THREAD_ID_FROM_JID, jid));
TCHAR id[30];
- mir_sntprintf(id, SIZEOF(id), JABBER_IQID_FORMAT, uID);
+ mir_sntprintf(id, JABBER_IQID_FORMAT, uID);
xi.addAttr(node, ATTRNAME_ID, id);
child = xi.addChild(node, NODENAME_QUERY, NULL);
@@ -249,7 +249,7 @@ void SetNotificationSetting(LPCTSTR jidWithResource, IJabberInterface *ji) xi.addAttr(node, ATTRNAME_TO, jid);
TCHAR id[30];
- mir_sntprintf(id, SIZEOF(id), JABBER_IQID_FORMAT, ji->SerialNext());
+ mir_sntprintf(id, JABBER_IQID_FORMAT, ji->SerialNext());
xi.addAttr(node, ATTRNAME_ID, id);
child = xi.addChild(node, NODENAME_USERSETTING, NULL);
diff --git a/protocols/GTalkExt/src/inbox.cpp b/protocols/GTalkExt/src/inbox.cpp index 8db7427a0d..fcafd253b7 100644 --- a/protocols/GTalkExt/src/inbox.cpp +++ b/protocols/GTalkExt/src/inbox.cpp @@ -222,8 +222,8 @@ void OpenContactInbox(LPCSTR szModuleName) TCHAR buf[1024];
if (mir_tstrcmpi(host, COMMON_GMAIL_HOST1) && mir_tstrcmpi(host, COMMON_GMAIL_HOST2))
- mir_sntprintf(buf, SIZEOF(buf), INBOX_URL_FORMAT, _T("a/"), host); // hosted
+ mir_sntprintf(buf, INBOX_URL_FORMAT, _T("a/"), host); // hosted
else
- mir_sntprintf(buf, SIZEOF(buf), INBOX_URL_FORMAT, _T(""), _T("mail")); // common
+ mir_sntprintf(buf, INBOX_URL_FORMAT, _T(""), _T("mail")); // common
OpenUrl(szModuleName, tszJid, buf);
}
diff --git a/protocols/GTalkExt/src/notifications.cpp b/protocols/GTalkExt/src/notifications.cpp index 9e3bd386e1..e7813894c1 100644 --- a/protocols/GTalkExt/src/notifications.cpp +++ b/protocols/GTalkExt/src/notifications.cpp @@ -254,7 +254,7 @@ void UnreadMailNotification(LPCSTR acc, LPCTSTR jid, LPCTSTR url, LPCTSTR unread POPUPDATAT data = { 0 };
FormatPseudocontactDisplayName(&data.lptzContactName[0], jid, unreadCount);
- mir_sntprintf(data.lptzText, SIZEOF(data.lptzText), TranslateT("You've received an e-mail\n%s unread threads"), unreadCount);
+ mir_sntprintf(data.lptzText, TranslateT("You've received an e-mail\n%s unread threads"), unreadCount);
ShowNotification(acc, &data, jid, url, unreadCount);
}
@@ -277,9 +277,9 @@ void UnreadThreadNotification(LPCSTR acc, LPCTSTR jid, LPCTSTR url, LPCTSTR unre }
if (ReadCheckbox(0, IDC_ADDSNIP, (DWORD)TlsGetValue(itlsSettings)))
- mir_sntprintf(data.lptzText, SIZEOF(data.lptzText), TranslateTS(FULL_NOTIFICATION_FORMAT), mtn->subj, tszSenders.c_str(), mtn->snip);
+ mir_sntprintf(data.lptzText, TranslateTS(FULL_NOTIFICATION_FORMAT), mtn->subj, tszSenders.c_str(), mtn->snip);
else
- mir_sntprintf(data.lptzText, SIZEOF(data.lptzText), TranslateTS(SHORT_NOTIFICATION_FORMAT), mtn->subj, tszSenders.c_str());
+ mir_sntprintf(data.lptzText, TranslateTS(SHORT_NOTIFICATION_FORMAT), mtn->subj, tszSenders.c_str());
ShowNotification(acc, &data, jid, url, unreadCount);
}
diff --git a/protocols/GTalkExt/src/options.cpp b/protocols/GTalkExt/src/options.cpp index 053faf2bba..b15eb53042 100644 --- a/protocols/GTalkExt/src/options.cpp +++ b/protocols/GTalkExt/src/options.cpp @@ -157,8 +157,8 @@ INT_PTR CALLBACK AccOptionsDlgProc(HWND wnd, UINT msg, WPARAM wParam, LPARAM lPa void ShowTestPopup(HWND wnd)
{
POPUPDATAT data = { 0 };
- mir_sntprintf(data.lptzContactName, SIZEOF(data.lptzContactName), TranslateTS(TEST_LETTER_INBOX));
- mir_sntprintf(data.lptzText, SIZEOF(data.lptzText), TranslateTS(FULL_NOTIFICATION_FORMAT), TranslateTS(TEST_LETTER_SUBJECT), TranslateTS(TEST_LETTER_SENDER), TranslateTS(TEST_LETTER_SNIP));
+ mir_sntprintf(data.lptzContactName, TranslateTS(TEST_LETTER_INBOX));
+ mir_sntprintf(data.lptzText, TranslateTS(FULL_NOTIFICATION_FORMAT), TranslateTS(TEST_LETTER_SUBJECT), TranslateTS(TEST_LETTER_SENDER), TranslateTS(TEST_LETTER_SNIP));
int len = SendDlgItemMessage(wnd, IDC_TIMEOUTEDIT, WM_GETTEXTLENGTH, 0, 0) + 1;
LPTSTR timeout = (LPTSTR)malloc(len * sizeof(TCHAR));
|