diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 19:23:27 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 19:23:27 +0000 |
commit | 1eb922f8075c53a1a8487045b096693bd27b56dd (patch) | |
tree | 2e4ec55f37aaa42d1f93d8a58fcde6c74b2025bb /protocols/JabberG | |
parent | e2d7ebd6315a810bd4ea54f1088b84d09c3ca5d2 (diff) |
replace _tcsicmp to mir_tstrcmpi
git-svn-id: http://svn.miranda-ng.org/main/trunk@13761 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG')
-rw-r--r-- | protocols/JabberG/src/jabber_events.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_iq.cpp | 8 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_iqid.cpp | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_message_manager.cpp | 10 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_privacy.cpp | 8 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 4 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_search.cpp | 10 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_search.h | 2 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_svc.cpp | 12 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_thread.cpp | 8 |
10 files changed, 33 insertions, 33 deletions
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index ab33180bd2..f45074ea30 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -45,7 +45,7 @@ int CJabberProto::OnContactDeleted(WPARAM hContact, LPARAM) TCHAR szStrippedJid[JABBER_MAX_JID_LEN];
JabberStripJid(m_ThreadInfo->fullJID, szStrippedJid, SIZEOF(szStrippedJid));
TCHAR *szDog = _tcschr(szStrippedJid, _T('@'));
- if (szDog && _tcsicmp(szDog + 1, jid))
+ if (szDog && mir_tstrcmpi(szDog + 1, jid))
m_ThreadInfo->send(XmlNodeIq(_T("set"), SerialNext(), jid) << XQUERY(JABBER_FEAT_REGISTER) << XCHILD(_T("remove")));
}
diff --git a/protocols/JabberG/src/jabber_iq.cpp b/protocols/JabberG/src/jabber_iq.cpp index d0084b7125..5669757ee9 100644 --- a/protocols/JabberG/src/jabber_iq.cpp +++ b/protocols/JabberG/src/jabber_iq.cpp @@ -245,9 +245,9 @@ bool CJabberIqManager::HandleIq(int nIqId, HXML pNode) return false;
int nIqType = JABBER_IQ_TYPE_FAIL;
- if (!_tcsicmp(szType, _T("result")))
+ if (!mir_tstrcmpi(szType, _T("result")))
nIqType = JABBER_IQ_TYPE_RESULT;
- else if (!_tcsicmp(szType, _T("error")))
+ else if (!mir_tstrcmpi(szType, _T("error")))
nIqType = JABBER_IQ_TYPE_ERROR;
else
return false;
@@ -297,9 +297,9 @@ bool CJabberIqManager::HandleIqPermanent(HXML pNode) CJabberIqInfo iqInfo;
iqInfo.m_nIqType = JABBER_IQ_TYPE_FAIL;
- if (!_tcsicmp(szType, _T("get")))
+ if (!mir_tstrcmpi(szType, _T("get")))
iqInfo.m_nIqType = JABBER_IQ_TYPE_GET;
- else if (!_tcsicmp(szType, _T("set")))
+ else if (!mir_tstrcmpi(szType, _T("set")))
iqInfo.m_nIqType = JABBER_IQ_TYPE_SET;
else
return FALSE;
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 59594259fa..e2d765b5d9 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -993,7 +993,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) if (hasFn && !hasNick) {
ptrT nick(getTStringA(hContact, "Nick"));
ptrT jidNick(JabberNickFromJID(jid));
- if (!nick || (jidNick && !_tcsicmp(nick, jidNick)))
+ if (!nick || (jidNick && !mir_tstrcmpi(nick, jidNick)))
setTString(hContact, "Nick", ptrT(getTStringA(hContact, "FullName")));
}
if (!hasFn)
diff --git a/protocols/JabberG/src/jabber_message_manager.cpp b/protocols/JabberG/src/jabber_message_manager.cpp index f8d067080d..4709b1dea1 100644 --- a/protocols/JabberG/src/jabber_message_manager.cpp +++ b/protocols/JabberG/src/jabber_message_manager.cpp @@ -59,15 +59,15 @@ bool CJabberMessageManager::HandleMessagePermanent(HXML node, ThreadData *pThrea LPCTSTR szType = xmlGetAttrValue(node, _T("type"));
if (szType) {
- if (!_tcsicmp(szType, _T("normal")))
+ if (!mir_tstrcmpi(szType, _T("normal")))
messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_NORMAL;
- else if (!_tcsicmp(szType, _T("error")))
+ else if (!mir_tstrcmpi(szType, _T("error")))
messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_ERROR;
- else if (!_tcsicmp(szType, _T("chat")))
+ else if (!mir_tstrcmpi(szType, _T("chat")))
messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_CHAT;
- else if (!_tcsicmp(szType, _T("groupchat")))
+ else if (!mir_tstrcmpi(szType, _T("groupchat")))
messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_GROUPCHAT;
- else if (!_tcsicmp(szType, _T("headline")))
+ else if (!mir_tstrcmpi(szType, _T("headline")))
messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_HEADLINE;
else
return false;
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index ac18e525cd..64b33c7916 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -104,11 +104,11 @@ void CJabberProto::OnIqResultPrivacyList(HXML iqNode, CJabberIqInfo*) const TCHAR *itemType = xmlGetAttrValue(item, _T("type"));
PrivacyListRuleType nItemType = Else;
if (itemType) {
- if (!_tcsicmp(itemType, _T("jid")))
+ if (!mir_tstrcmpi(itemType, _T("jid")))
nItemType = Jid;
- else if (!_tcsicmp(itemType, _T("group")))
+ else if (!mir_tstrcmpi(itemType, _T("group")))
nItemType = Group;
- else if (!_tcsicmp(itemType, _T("subscription")))
+ else if (!mir_tstrcmpi(itemType, _T("subscription")))
nItemType = Subscription;
}
@@ -116,7 +116,7 @@ void CJabberProto::OnIqResultPrivacyList(HXML iqNode, CJabberIqInfo*) const TCHAR *itemAction = xmlGetAttrValue(item, _T("action"));
BOOL bAllow = TRUE;
- if (itemAction && !_tcsicmp(itemAction, _T("deny")))
+ if (itemAction && !mir_tstrcmpi(itemAction, _T("deny")))
bAllow = FALSE;
const TCHAR *itemOrder = xmlGetAttrValue(item, _T("order"));
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index c7b61995a2..ea0d16f51b 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #pragma warning(disable:4355)
static int compareTransports(const TCHAR *p1, const TCHAR *p2)
-{ return _tcsicmp(p1, p2);
+{ return mir_tstrcmpi(p1, p2);
}
static int compareListItems(const JABBER_LIST_ITEM *p1, const JABBER_LIST_ITEM *p2)
@@ -719,7 +719,7 @@ HANDLE __cdecl CJabberProto::SearchBasic(const TCHAR *szJid) szServer = getTStringA(NULL, "LoginServer");
if (szServer == NULL)
szServer = mir_tstrdup(_T("jabber.org"));
- else if (numericjid && !_tcsicmp(szServer, _T("S.ms"))) {
+ else if (numericjid && !mir_tstrcmpi(szServer, _T("S.ms"))) {
mir_free(szServer);
szServer = mir_tstrdup(_T("sms"));
}
diff --git a/protocols/JabberG/src/jabber_search.cpp b/protocols/JabberG/src/jabber_search.cpp index e2646e29ac..38d53438e5 100644 --- a/protocols/JabberG/src/jabber_search.cpp +++ b/protocols/JabberG/src/jabber_search.cpp @@ -160,7 +160,7 @@ void CJabberProto::OnIqResultGetSearchFields(HXML iqNode, CJabberIqInfo*) if (!chNode) break; - if (!_tcsicmp(xmlGetName(chNode), _T("instructions")) && xmlGetText(chNode)) + if (!mir_tstrcmpi(xmlGetName(chNode), _T("instructions")) && xmlGetText(chNode)) SetDlgItemText(searchHandleDlg,IDC_INSTRUCTIONS,TranslateTS(xmlGetText(chNode))); else if (xmlGetName(chNode)) { Data *MyData=(Data*)malloc(sizeof(Data)); @@ -259,7 +259,7 @@ void CJabberProto::SearchReturnResults(HANDLE id, void * pvUsersInfo, U_TCHAR_M TCHAR* var = ListOfFields[j]; TCHAR* value = pmUserData->operator [](var); Results.pszFields[j] = value ? value : (TCHAR *)_T(" "); - if (!_tcsicmp(var,_T("jid")) && value) + if (!mir_tstrcmpi(var,_T("jid")) && value) _tcsncpy_s(Results.jsr.jid, value, _TRUNCATE); } { @@ -273,7 +273,7 @@ void CJabberProto::SearchReturnResults(HANDLE id, void * pvUsersInfo, U_TCHAR_M nick = pmUserData->operator [](nickfields[k++]); } if (nick) { - if (_tcsicmp(nick, Results.jsr.jid)) { + if (mir_tstrcmpi(nick, Results.jsr.jid)) { mir_sntprintf(buff, SIZEOF(buff), _T("%s (%s)"), nick, Results.jsr.jid); } else { _tcsncpy_s(buff, nick, _TRUNCATE); @@ -493,7 +493,7 @@ void CJabberProto::SearchDeleteFromRecent(const TCHAR *szAddr, BOOL deleteLastFr char key[30]; mir_snprintf(key, SIZEOF(key), "RecentlySearched_%d", i); ptrT szValue( getTStringA(key)); - if (szValue == NULL || _tcsicmp(szAddr, szValue)) + if (szValue == NULL || mir_tstrcmpi(szAddr, szValue)) continue; for (int j=i; j < 10; j++) { @@ -707,7 +707,7 @@ HWND __cdecl CJabberProto::CreateExtendedSearchUI(HWND parent) { if (parent && hInst) { ptrT szServer( getTStringA("LoginServer")); - if (szServer == NULL || _tcsicmp(szServer, _T("S.ms"))) + if (szServer == NULL || mir_tstrcmpi(szServer, _T("S.ms"))) return CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_SEARCHUSER), parent, JabberSearchAdvancedDlgProc, (LPARAM)this); } diff --git a/protocols/JabberG/src/jabber_search.h b/protocols/JabberG/src/jabber_search.h index 92ded72ffb..6526ac939d 100644 --- a/protocols/JabberG/src/jabber_search.h +++ b/protocols/JabberG/src/jabber_search.h @@ -271,5 +271,5 @@ public: inline int TCharKeyCmp(TCHAR* a, TCHAR* b)
{
- return (int)(_tcsicmp(a,b));
+ return (int)(mir_tstrcmpi(a,b));
}
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index f43f712e83..c8a1181ca1 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -435,7 +435,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) *(szSecondParam++) = 0;
// no command or message command
- if (!szCommand || (szCommand && !_tcsicmp(szCommand, _T("message")))) {
+ if (!szCommand || (szCommand && !mir_tstrcmpi(szCommand, _T("message")))) {
// message
if (!ServiceExists(MS_MSG_SENDMESSAGEW))
return 1;
@@ -462,7 +462,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) return 0;
}
- if (!_tcsicmp(szCommand, _T("roster"))) {
+ if (!mir_tstrcmpi(szCommand, _T("roster"))) {
if (!HContactFromJID(szJid)) {
JABBER_SEARCH_RESULT jsr = { 0 };
jsr.hdr.cbSize = sizeof(JABBER_SEARCH_RESULT);
@@ -481,19 +481,19 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) }
// chat join invitation
- if (!_tcsicmp(szCommand, _T("join"))) {
+ if (!mir_tstrcmpi(szCommand, _T("join"))) {
GroupchatJoinRoomByJid(NULL, szJid);
return 0;
}
// service discovery request
- if (!_tcsicmp(szCommand, _T("disco"))) {
+ if (!mir_tstrcmpi(szCommand, _T("disco"))) {
OnMenuHandleServiceDiscovery(0, (LPARAM)szJid);
return 0;
}
// ad-hoc commands
- if (!_tcsicmp(szCommand, _T("command"))) {
+ if (!mir_tstrcmpi(szCommand, _T("command"))) {
if (szSecondParam) {
if (!_tcsnicmp(szSecondParam, _T("node="), 5)) {
szSecondParam += 5;
@@ -508,7 +508,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) }
// send file
- if (!_tcsicmp(szCommand, _T("sendfile"))) {
+ if (!mir_tstrcmpi(szCommand, _T("sendfile"))) {
MCONTACT hContact = HContactFromJID(szJid, TRUE);
if (hContact == NULL)
hContact = DBCreateContact(szJid, szJid, TRUE, TRUE);
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 594c24eff2..282f3f93bb 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -729,7 +729,7 @@ void CJabberProto::OnProcessFeatures(HXML node, ThreadData *info) }
else if (!mir_tstrcmp(xmlGetName(c), _T("hostname"))) {
const TCHAR *mech = xmlGetAttrValue(c, _T("mechanism"));
- if (mech && _tcsicmp(mech, _T("GSSAPI")) == 0) {
+ if (mech && mir_tstrcmpi(mech, _T("GSSAPI")) == 0) {
m_AuthMechs.m_gssapiHostName = mir_tstrdup(xmlGetText(c));
}
}
@@ -1035,7 +1035,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) pResourceStatus pFromResource(ResourceInfoFromJID(from));
// Message receipts delivery request. Reply here, before a call to HandleMessagePermanent() to make sure message receipts are handled for external plugins too.
- if ((!type || _tcsicmp(type, _T("error"))) && xmlGetChildByTag(node, "request", "xmlns", JABBER_FEAT_MESSAGE_RECEIPTS)) {
+ if ((!type || mir_tstrcmpi(type, _T("error"))) && xmlGetChildByTag(node, "request", "xmlns", JABBER_FEAT_MESSAGE_RECEIPTS)) {
info->send(
XmlNode(_T("message")) << XATTR(_T("to"), from) << XATTR(_T("id"), idStr)
<< XCHILDNS(_T("received"), JABBER_FEAT_MESSAGE_RECEIPTS) << XATTR(_T("id"), idStr));
@@ -1499,7 +1499,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) TCHAR szBareOurJid[JABBER_MAX_JID_LEN];
JabberStripJid(info->fullJID, szBareOurJid, SIZEOF(szBareOurJid));
- if (!_tcsicmp(szBareFrom, szBareOurJid))
+ if (!mir_tstrcmpi(szBareFrom, szBareOurJid))
bSelfPresence = TRUE;
LPCTSTR type = xmlGetAttrValue(node, _T("type"));
@@ -1509,7 +1509,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) return;
if ((hContact = HContactFromJID(from)) == NULL) {
- if (!_tcsicmp(info->fullJID, from) || (!bSelfPresence && !ListGetItemPtr(LIST_ROSTER, from))) {
+ if (!mir_tstrcmpi(info->fullJID, from) || (!bSelfPresence && !ListGetItemPtr(LIST_ROSTER, from))) {
debugLog(_T("SKIP Receive presence online from %s (who is not in my roster and not in list - skiping)"), from);
return;
}
|