From 159b565b390687258ee65a3b66596e118752063c Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 May 2015 12:33:13 +0000 Subject: replace strcmp to mir_strcmp git-svn-id: http://svn.miranda-ng.org/main/trunk@13752 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/JabberG/src/jabber_byte.cpp | 2 +- protocols/JabberG/src/jabber_events.cpp | 8 ++++---- protocols/JabberG/src/jabber_file.cpp | 2 +- protocols/JabberG/src/jabber_icolib.cpp | 2 +- protocols/JabberG/src/jabber_iqid.cpp | 2 +- protocols/JabberG/src/jabber_list.h | 2 +- protocols/JabberG/src/jabber_menu.cpp | 2 +- protocols/JabberG/src/jabber_proto.cpp | 6 +++--- protocols/JabberG/src/jabber_secur.cpp | 10 +++++----- protocols/JabberG/src/jabber_svc.cpp | 2 +- protocols/JabberG/src/jabber_userinfo.cpp | 2 +- protocols/JabberG/src/jabber_util.cpp | 2 +- protocols/JabberG/src/jabber_xstatus.cpp | 4 ++-- 13 files changed, 23 insertions(+), 23 deletions(-) (limited to 'protocols/JabberG/src') diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp index 40545f9203..b271da6373 100644 --- a/protocols/JabberG/src/jabber_byte.cpp +++ b/protocols/JabberG/src/jabber_byte.cpp @@ -218,7 +218,7 @@ void CJabberProto::ByteSendThread(JABBER_BYTE_TRANSFER *jbt) NETLIBIPLIST* ihaddr = (NETLIBIPLIST*)CallService(MS_NETLIB_GETMYIP, 1, 0); for (unsigned i=0; i < ihaddr->cbNum; i++) - if (strcmp(localAddr, ihaddr->szIp[i])) + if (mir_strcmp(localAddr, ihaddr->szIp[i])) query << XCHILD(_T("streamhost")) << XATTR(_T("jid"), m_ThreadInfo->fullJID) << XATTR(_T("host"), _A2T(ihaddr->szIp[i])) << XATTRI(_T("port"), nlb.wPort); mir_free(ihaddr); diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index 927fb6c405..ab33180bd2 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -162,14 +162,14 @@ int __cdecl CJabberProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) return 0; DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam; - if (strcmp(cws->szModule, "CList")) + if (mir_strcmp(cws->szModule, "CList")) return 0; - if (!strcmp(cws->szSetting, "Group")) + if (!mir_strcmp(cws->szSetting, "Group")) OnRenameGroup(cws, hContact); - else if (!strcmp(cws->szSetting, "MyHandle")) + else if (!mir_strcmp(cws->szSetting, "MyHandle")) OnRenameContact(cws, hContact); - else if (!strcmp(cws->szSetting, "NotOnList")) + else if (!mir_strcmp(cws->szSetting, "NotOnList")) OnAddContactForever(cws, hContact); return 0; diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp index 0a45ead7b0..1c51a3b87e 100644 --- a/protocols/JabberG/src/jabber_file.cpp +++ b/protocols/JabberG/src/jabber_file.cpp @@ -129,7 +129,7 @@ int CJabberProto::FileReceiveParse(filetransfer *ft, char* buffer, int datalen) } else if ((s = strchr(str, ':')) != NULL) { *s = '\0'; - if (!strcmp(str, "Content-Length")) + if (!mir_strcmp(str, "Content-Length")) ft->std.totalBytes = ft->std.currentFileSize = _atoi64(s + 1); } } diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index a85f2fdaa7..0b582f3548 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -185,7 +185,7 @@ HICON CJabberProto::LoadIconEx(const char* name, bool big) if (HICON result = g_LoadIconEx(name, big)) return result; - if (!strcmp(name, "main")) + if (!mir_strcmp(name, "main")) return Skin_GetIconByHandle(m_hProtoIcon, big); return NULL; diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 3567c46592..041f665e58 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -193,7 +193,7 @@ void CJabberProto::OnLoggedIn() QueryPrivacyLists(m_ThreadInfo); ptrA szServerName(getStringA("LastLoggedServer")); - if (szServerName == NULL || strcmp(m_ThreadInfo->conn.server, szServerName)) + if (szServerName == NULL || mir_strcmp(m_ThreadInfo->conn.server, szServerName)) SendGetVcard(m_szJabberJID); setString("LastLoggedServer", m_ThreadInfo->conn.server); diff --git a/protocols/JabberG/src/jabber_list.h b/protocols/JabberG/src/jabber_list.h index 69b8ee1f61..39080cca86 100644 --- a/protocols/JabberG/src/jabber_list.h +++ b/protocols/JabberG/src/jabber_list.h @@ -220,7 +220,7 @@ struct JABBER_HTTP_AVATARS ~JABBER_HTTP_AVATARS() { mir_free(Url); } static int compare(const JABBER_HTTP_AVATARS *p1, const JABBER_HTTP_AVATARS *p2) - { return strcmp(p1->Url, p2->Url); } + { return mir_strcmp(p1->Url, p2->Url); } }; #endif diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 5c2715f7bf..2c1b351fe6 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -80,7 +80,7 @@ static CJabberProto* JabberGetInstanceByHContact(MCONTACT hContact) return NULL; for (int i=0; i < g_Instances.getCount(); i++) - if (!strcmp(szProto, g_Instances[i]->m_szModuleName)) + if (!mir_strcmp(szProto, g_Instances[i]->m_szModuleName)) return g_Instances[i]; return NULL; diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index a471b49703..79ce43efeb 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -351,7 +351,7 @@ MCONTACT __cdecl CJabberProto::AddToListByEvent(int flags, int /*iContact*/, MEV return NULL; if (db_event_get(hDbEvent, &dbei)) return NULL; - if (strcmp(dbei.szModule, m_szModuleName)) + if (mir_strcmp(dbei.szModule, m_szModuleName)) return NULL; /* @@ -392,7 +392,7 @@ int CJabberProto::Authorize(MEVENT hDbEvent) return 1; if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return 1; - if (strcmp(dbei.szModule, m_szModuleName)) + if (mir_strcmp(dbei.szModule, m_szModuleName)) return 1; char *nick = (char*)(dbei.pBlob + sizeof(DWORD)*2); @@ -446,7 +446,7 @@ int CJabberProto::AuthDeny(MEVENT hDbEvent, const TCHAR*) if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return 1; - if (strcmp(dbei.szModule, m_szModuleName)) + if (mir_strcmp(dbei.szModule, m_szModuleName)) return 1; char *nick = (char*)(dbei.pBlob + sizeof(DWORD)*2); diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index 3d380eb32a..ce2cafb2fc 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -35,11 +35,11 @@ TNtlmAuth::TNtlmAuth(ThreadData *info, const char* mechanism, const TCHAR *hostn szHostName = hostname; const TCHAR *szProvider; - if (!strcmp(mechanism, "GSS-SPNEGO")) + if (!mir_strcmp(mechanism, "GSS-SPNEGO")) szProvider = _T("Negotiate"); - else if (!strcmp(mechanism, "GSSAPI")) + else if (!mir_strcmp(mechanism, "GSSAPI")) szProvider = _T("GSSAPI"); - else if (!strcmp(mechanism, "NTLM")) + else if (!mir_strcmp(mechanism, "NTLM")) szProvider = _T("NTLM"); else { LBL_Invalid: @@ -49,8 +49,8 @@ LBL_Invalid: } TCHAR szSpn[1024] = _T(""); - if (strcmp(mechanism, "NTLM")) - if (!getSpn(szSpn, SIZEOF(szSpn)) && !strcmp(mechanism, "GSSAPI")) + if (mir_strcmp(mechanism, "NTLM")) + if (!getSpn(szSpn, SIZEOF(szSpn)) && !mir_strcmp(mechanism, "GSSAPI")) goto LBL_Invalid; if ((hProvider = Netlib_InitSecurityProvider2(szProvider, szSpn)) == NULL) diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index 968ec55fab..f43f712e83 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -137,7 +137,7 @@ INT_PTR __cdecl CJabberProto::JabberGetAvatarInfo(WPARAM wParam, LPARAM lParam) if (::_taccess(AI->filename, 0) == 0) { ptrA szSavedHash( getStringA(AI->hContact, "AvatarSaved")); - if (szSavedHash != NULL && !strcmp(szSavedHash, szHashValue)) { + if (szSavedHash != NULL && !mir_strcmp(szSavedHash, szHashValue)) { debugLogA("Avatar is Ok: %s == %s", szSavedHash, szHashValue); return GAIR_SUCCESS; } diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 91cbcd76b9..3b5af188c2 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -811,7 +811,7 @@ int CJabberProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) } char *szProto = GetContactProto(hContact); - if (szProto != NULL && !strcmp(szProto, m_szModuleName)) { + if (szProto != NULL && !mir_strcmp(szProto, m_szModuleName)) { OPTIONSDIALOGPAGE odp = { 0 }; odp.hInstance = hInst; odp.dwInitParam = (LPARAM)this; diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index e82202ade2..73bc6a6cc8 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -679,7 +679,7 @@ TStringPairs::~TStringPairs() const char* TStringPairs::operator[](const char* key) const { for (int i = 0; i < numElems; i++) - if (!strcmp(elems[i].name, key)) + if (!mir_strcmp(elems[i].name, key)) return elems[i].value; return ""; diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index f110240a91..9aded8f3e3 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -876,7 +876,7 @@ static int ActivityCheck(LPCTSTR szFirstNode, LPCTSTR szSecondNode) int i = 0, nFirst = -1, nSecond = -1; while (g_arrActivities[i].szFirst || g_arrActivities[i].szSecond) { // check first node - if (g_arrActivities[i].szFirst && !strcmp(s1, g_arrActivities[i].szFirst)) { + if (g_arrActivities[i].szFirst && !mir_strcmp(s1, g_arrActivities[i].szFirst)) { // first part found nFirst = i; if (!s2) { @@ -885,7 +885,7 @@ static int ActivityCheck(LPCTSTR szFirstNode, LPCTSTR szSecondNode) } i++; // move to next while (g_arrActivities[i].szSecond) { - if (!strcmp(g_arrActivities[i].szSecond, s2)) { + if (!mir_strcmp(g_arrActivities[i].szSecond, s2)) { nSecond = i; break; } -- cgit v1.2.3