diff options
author | George Hazan <george.hazan@gmail.com> | 2013-08-14 19:04:55 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-08-14 19:04:55 +0000 |
commit | b67c40f21c0fe0c80a3ddd31b0b09f71bf5d97d7 (patch) | |
tree | fa22404f4a40f81b86447c5bd7def26fd6815722 /protocols/JabberG/src/jabber_search.cpp | |
parent | c95efb840d744ec332edfe311b69f1c7ac56560a (diff) |
mir_*printf patch for protocols
git-svn-id: http://svn.miranda-ng.org/main/trunk@5690 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_search.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_search.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/protocols/JabberG/src/jabber_search.cpp b/protocols/JabberG/src/jabber_search.cpp index 49f946cd42..5393322265 100644 --- a/protocols/JabberG/src/jabber_search.cpp +++ b/protocols/JabberG/src/jabber_search.cpp @@ -191,7 +191,7 @@ void CJabberProto::OnIqResultGetSearchFields(HXML iqNode) code = xmlGetAttrValue(errorNode, _T("code"));
description = xmlGetText(errorNode);
}
- _sntprintf(buff,SIZEOF(buff),TranslateT("Error %s %s\r\nPlease select other server"),code ? code : _T(""),description?description:_T(""));
+ mir_sntprintf(buff, SIZEOF(buff), TranslateT("Error %s %s\r\nPlease select other server"), code ? code : _T(""), description ? description : _T(""));
SetDlgItemText(searchHandleDlg,IDC_INSTRUCTIONS,buff);
}
else SetDlgItemText(searchHandleDlg, IDC_INSTRUCTIONS, TranslateT("Error Unknown reply recieved\r\nPlease select other server"));
@@ -269,7 +269,7 @@ void CJabberProto::SearchReturnResults(HANDLE id, void * pvUsersInfo, U_TCHAR_M int k=0;
while (nickfields[k] && !nick) nick=pmUserData->operator [](nickfields[k++]);
if (_tcsicmp(nick, Results.jsr.jid))
- _sntprintf(buff,SIZEOF(buff),_T("%s (%s)"),nick, Results.jsr.jid);
+ mir_sntprintf(buff, SIZEOF(buff), _T("%s (%s)"), nick, Results.jsr.jid);
else
_tcsncpy(buff, nick, SIZEOF(buff));
Results.jsr.hdr.nick = nick ? buff : NULL;
@@ -378,7 +378,7 @@ void CJabberProto::OnIqResultAdvancedSearch(HXML iqNode) description = xmlGetText(errorNode);
}
- _sntprintf(buff,SIZEOF(buff),TranslateT("Error %s %s\r\nTry to specify more detailed"),code ? code : _T(""),description?description:_T(""));
+ mir_sntprintf(buff, SIZEOF(buff), TranslateT("Error %s %s\r\nTry to specify more detailed"), code ? code : _T(""), description ? description : _T(""));
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
if (searchHandleDlg)
SetDlgItemText(searchHandleDlg,IDC_INSTRUCTIONS,buff);
@@ -486,20 +486,20 @@ void CJabberProto::SearchDeleteFromRecent(const TCHAR *szAddr, BOOL deleteLastFr char key[30];
//search in recent
for (int i=0; i<10; i++) {
- sprintf(key,"RecentlySearched_%d",i);
+ mir_snprintf(key, SIZEOF(key), "RecentlySearched_%d", i);
if ( !getTString(key, &dbv)) {
if ( !_tcsicmp(szAddr, dbv.ptszVal)) {
db_free(&dbv);
for (int j=i; j<10; j++) {
- sprintf(key, "RecentlySearched_%d", j+1);
+ mir_snprintf(key, SIZEOF(key), "RecentlySearched_%d", j + 1);
if ( !getTString(key, &dbv)) {
- sprintf(key,"RecentlySearched_%d",j);
+ mir_snprintf(key, SIZEOF(key), "RecentlySearched_%d", j);
setTString(NULL,key,dbv.ptszVal);
db_free(&dbv);
}
else {
if (deleteLastFromDB) {
- sprintf(key,"RecentlySearched_%d",j);
+ mir_snprintf(key, SIZEOF(key), "RecentlySearched_%d", j);
delSetting(NULL,key);
}
break;
@@ -515,14 +515,14 @@ void CJabberProto::SearchAddToRecent(const TCHAR *szAddr, HWND hwndDialog) char key[30];
SearchDeleteFromRecent(szAddr);
for (int j=9; j > 0; j--) {
- sprintf(key, "RecentlySearched_%d", j-1);
+ mir_snprintf(key, SIZEOF(key), "RecentlySearched_%d", j - 1);
if ( !getTString(key, &dbv)) {
- sprintf(key,"RecentlySearched_%d",j);
+ mir_snprintf(key, SIZEOF(key), "RecentlySearched_%d", j);
setTString(NULL,key,dbv.ptszVal);
db_free(&dbv);
} }
- sprintf(key, "RecentlySearched_%d", 0);
+ mir_snprintf(key, SIZEOF(key), "RecentlySearched_%d", 0);
setTString(key, szAddr);
if (hwndDialog)
JabberSearchAddUrlToRecentCombo(hwndDialog, szAddr);
@@ -555,7 +555,7 @@ static INT_PTR CALLBACK JabberSearchAdvancedDlgProc(HWND hwndDlg, UINT msg, WPAR DBVARIANT dbv;
for (i=0; i < 10; i++) {
char key[30];
- sprintf(key,"RecentlySearched_%d",i);
+ mir_snprintf(key, SIZEOF(key), "RecentlySearched_%d", i);
if ( !dat->ppro->getTString(key, &dbv)) {
JabberSearchAddUrlToRecentCombo(hwndDlg, dbv.ptszVal);
db_free(&dbv);
|