summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-22 12:49:22 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-22 12:49:22 +0000
commitb280d2eae93fb22b4fdb45218d8a06287a97030e (patch)
treef4e0d9921a57bafdb608a55a107bad3408b8f909 /protocols
parent159b565b390687258ee65a3b66596e118752063c (diff)
replace _tcscmp to mir_tstrcmp
git-svn-id: http://svn.miranda-ng.org/main/trunk@13753 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/AimOscar/src/aim.cpp2
-rw-r--r--protocols/FacebookRM/src/chat.cpp4
-rw-r--r--protocols/FacebookRM/src/contacts.cpp2
-rw-r--r--protocols/FacebookRM/src/main.cpp2
-rw-r--r--protocols/FacebookRM/src/process.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/avatar.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.cpp2
-rw-r--r--protocols/Gadu-Gadu/src/groupchat.cpp4
-rw-r--r--protocols/Gadu-Gadu/src/services.cpp2
-rw-r--r--protocols/IRCG/src/commandmonitor.cpp4
-rw-r--r--protocols/IcqOscarJ/src/icq_servlist.cpp2
-rw-r--r--protocols/JabberG/src/jabber_adhoc.cpp8
-rw-r--r--protocols/JabberG/src/jabber_byte.cpp6
-rw-r--r--protocols/JabberG/src/jabber_caps.cpp18
-rw-r--r--protocols/JabberG/src/jabber_form.cpp26
-rw-r--r--protocols/JabberG/src/jabber_ft.cpp10
-rw-r--r--protocols/JabberG/src/jabber_groupchat.cpp34
-rw-r--r--protocols/JabberG/src/jabber_ibb.cpp6
-rw-r--r--protocols/JabberG/src/jabber_iq.cpp4
-rw-r--r--protocols/JabberG/src/jabber_iq_handlers.cpp18
-rw-r--r--protocols/JabberG/src/jabber_iqid.cpp28
-rw-r--r--protocols/JabberG/src/jabber_iqid_muc.cpp2
-rw-r--r--protocols/JabberG/src/jabber_list.cpp2
-rw-r--r--protocols/JabberG/src/jabber_message_manager.cpp2
-rw-r--r--protocols/JabberG/src/jabber_opt.cpp2
-rw-r--r--protocols/JabberG/src/jabber_password.cpp4
-rw-r--r--protocols/JabberG/src/jabber_privacy.cpp10
-rw-r--r--protocols/JabberG/src/jabber_privacy.h2
-rw-r--r--protocols/JabberG/src/jabber_proto.cpp4
-rw-r--r--protocols/JabberG/src/jabber_rc.cpp20
-rw-r--r--protocols/JabberG/src/jabber_rc.h4
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp102
-rw-r--r--protocols/JabberG/src/jabber_util.cpp12
-rw-r--r--protocols/JabberG/src/jabber_xstatus.cpp2
-rw-r--r--protocols/JabberG/src/obsoleted/jabber_form2.cpp2
-rw-r--r--protocols/MRA/src/Mra_svcs.cpp2
-rw-r--r--protocols/MSN/src/msn.cpp2
-rw-r--r--protocols/MSN/src/msn_chat.cpp2
-rw-r--r--protocols/MSN/src/msn_opts.cpp2
-rw-r--r--protocols/Omegle/src/main.cpp2
-rw-r--r--protocols/Sametime/src/conference.cpp2
-rw-r--r--protocols/SkypeClassic/src/alogon.cpp8
-rw-r--r--protocols/SkypeClassic/src/contacts.cpp2
-rw-r--r--protocols/SkypeClassic/src/gchat.cpp12
-rw-r--r--protocols/SkypeWeb/src/skype_accounts.cpp2
-rw-r--r--protocols/Twitter/src/main.cpp2
-rw-r--r--protocols/VKontakte/src/vk_options.cpp2
-rw-r--r--protocols/WhatsApp/src/main.cpp2
48 files changed, 200 insertions, 200 deletions
diff --git a/protocols/AimOscar/src/aim.cpp b/protocols/AimOscar/src/aim.cpp
index 3809b86ae6..d6904e1d21 100644
--- a/protocols/AimOscar/src/aim.cpp
+++ b/protocols/AimOscar/src/aim.cpp
@@ -28,7 +28,7 @@ HINSTANCE hInstance;
// Protocol instances
static int sttCompareProtocols(const CAimProto *p1, const CAimProto *p2)
{
- return _tcscmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
OBJLIST<CAimProto> g_Instances(1, sttCompareProtocols);
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp
index f19990da10..c1e2f6d71a 100644
--- a/protocols/FacebookRM/src/chat.cpp
+++ b/protocols/FacebookRM/src/chat.cpp
@@ -71,7 +71,7 @@ int FacebookProto::OnGCEvent(WPARAM, LPARAM lParam)
return 0;
// Ignore for special chatrooms
- if (!_tcscmp(hook->pDest->ptszID, _T(FACEBOOK_NOTIFICATIONS_CHATROOM)))
+ if (!mir_tstrcmp(hook->pDest->ptszID, _T(FACEBOOK_NOTIFICATIONS_CHATROOM)))
return 0;
switch (hook->pDest->iType)
@@ -397,7 +397,7 @@ bool FacebookProto::IsSpecialChatRoom(MCONTACT hContact) {
return false;
ptrT idT(getTStringA(hContact, "ChatRoomID"));
- return idT && !_tcscmp(idT, _T(FACEBOOK_NOTIFICATIONS_CHATROOM));
+ return idT && !mir_tstrcmp(idT, _T(FACEBOOK_NOTIFICATIONS_CHATROOM));
}
void FacebookProto::PrepareNotificationsChatRoom() {
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp
index e4cd53e091..71f9b5b36e 100644
--- a/protocols/FacebookRM/src/contacts.cpp
+++ b/protocols/FacebookRM/src/contacts.cpp
@@ -98,7 +98,7 @@ MCONTACT FacebookProto::ChatIDToHContact(const std::tstring &chat_id)
continue;
ptrT id(getTStringA(hContact, "ChatRoomID"));
- if (id && !_tcscmp(id, chat_id.c_str())) {
+ if (id && !mir_tstrcmp(id, chat_id.c_str())) {
facy.chat_id_to_hcontact.insert(std::make_pair(chat_id, hContact));
return hContact;
}
diff --git a/protocols/FacebookRM/src/main.cpp b/protocols/FacebookRM/src/main.cpp
index b2bd15f4b9..e55450b78c 100644
--- a/protocols/FacebookRM/src/main.cpp
+++ b/protocols/FacebookRM/src/main.cpp
@@ -49,7 +49,7 @@ PLUGININFOEX pluginInfo = {
// Protocol instances
static int compare_protos(const FacebookProto *p1, const FacebookProto *p2)
{
- return _tcscmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
OBJLIST<FacebookProto> g_Instances(1, compare_protos);
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp
index c5687cc899..af61679db4 100644
--- a/protocols/FacebookRM/src/process.cpp
+++ b/protocols/FacebookRM/src/process.cpp
@@ -84,7 +84,7 @@ void FacebookProto::ProcessBuddyList(void*)
fbu->handle = AddToContactList(fbu, CONTACT_FRIEND);
ptrT client(getTStringA(fbu->handle, "MirVer"));
- if (!client || _tcscmp(client, fbu->getMirVer()))
+ if (!client || mir_tstrcmp(client, fbu->getMirVer()))
setTString(fbu->handle, "MirVer", fbu->getMirVer());
if (getDword(fbu->handle, "IdleTS", 0) != fbu->last_active) {
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp
index e6fcdaa74c..a0dbc4101c 100644
--- a/protocols/Gadu-Gadu/src/avatar.cpp
+++ b/protocols/Gadu-Gadu/src/avatar.cpp
@@ -88,7 +88,7 @@ bool GGPROTO::getAvatarFileInfo(uin_t uin, char **avatarurl, char **avatarts)
if (hXml != NULL) {
HXML node = xi.getChildByPath(hXml, _T("users/user/avatars/avatar"), 0);
const TCHAR *blank = (node != NULL) ? xi.getAttrValue(node, _T("blank")) : NULL;
- if (blank != NULL && _tcscmp(blank, _T("1"))) {
+ if (blank != NULL && mir_tstrcmp(blank, _T("1"))) {
node = xi.getChildByPath(hXml, _T("users/user/avatars/avatar/timestamp"), 0);
*avatarts = node != NULL ? mir_t2a(xi.getText(node)) : NULL;
node = xi.getChildByPath(hXml, _T("users/user/avatars/avatar/bigavatar"), 0); //new gg convention
@@ -112,7 +112,7 @@ bool GGPROTO::getAvatarFileInfo(uin_t uin, char **avatarurl, char **avatarts)
ptrT respJSON_blank(json_as_string(json_get(respJSONavatar, "_blank")));
ptrT respJSONoriginBigAvatar(json_as_string(json_get(respJSONavatar, "originBigAvatar")));
ptrT respJSONtimestamp(json_as_string(json_get(respJSONavatar, "timestamp")));
- if (respJSON_blank && _tcscmp(respJSON_blank, TEXT("1")) && respJSONoriginBigAvatar && respJSONtimestamp){
+ if (respJSON_blank && mir_tstrcmp(respJSON_blank, TEXT("1")) && respJSONoriginBigAvatar && respJSONtimestamp){
*avatarurl = mir_t2a(respJSONoriginBigAvatar);
*avatarts = mir_t2a(respJSONtimestamp);
}
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp
index 9f93b0c6f7..6c532d195b 100644
--- a/protocols/Gadu-Gadu/src/gg_proto.cpp
+++ b/protocols/Gadu-Gadu/src/gg_proto.cpp
@@ -692,7 +692,7 @@ int GGPROTO::SetAwayMsg(int iStatus, const PROTOCHAR *newMsg)
}
// Check if we change status here somehow
- if (*msgPtr && newMsg && !_tcscmp(*msgPtr, newMsg)
+ if (*msgPtr && newMsg && !mir_tstrcmp(*msgPtr, newMsg)
|| !*msgPtr && (!newMsg || !*newMsg))
{
if (status == m_iDesiredStatus && m_iDesiredStatus == m_iStatus)
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp
index 5386d62273..4735a055e9 100644
--- a/protocols/Gadu-Gadu/src/groupchat.cpp
+++ b/protocols/Gadu-Gadu/src/groupchat.cpp
@@ -106,7 +106,7 @@ GGGC* GGPROTO::gc_lookup(const TCHAR *id)
for(l = chats; l; l = l->next)
{
chat = (GGGC *)l->data;
- if (chat && !_tcscmp(chat->id, id))
+ if (chat && !mir_tstrcmp(chat->id, id))
return chat;
}
@@ -142,7 +142,7 @@ int GGPROTO::gc_event(WPARAM wParam, LPARAM lParam)
MCONTACT hNext = db_find_next(hContact);
DBVARIANT dbv;
if (!getTString(hContact, "ChatRoomID", &dbv)) {
- if (dbv.ptszVal && !_tcscmp(gch->pDest->ptszID, dbv.ptszVal))
+ if (dbv.ptszVal && !mir_tstrcmp(gch->pDest->ptszID, dbv.ptszVal))
CallService(MS_DB_CONTACT_DELETE, hContact, 0);
db_free(&dbv);
}
diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp
index d9f06b06aa..26c0d62734 100644
--- a/protocols/Gadu-Gadu/src/services.cpp
+++ b/protocols/Gadu-Gadu/src/services.cpp
@@ -339,7 +339,7 @@ INT_PTR GGPROTO::setmyavatar(WPARAM wParam, LPARAM lParam)
TCHAR szMyFilename[MAX_PATH];
getAvatarFilename(NULL, szMyFilename, SIZEOF(szMyFilename));
- if ( _tcscmp(szFilename, szMyFilename) && !CopyFile(szFilename, szMyFilename, FALSE)) {
+ if ( mir_tstrcmp(szFilename, szMyFilename) && !CopyFile(szFilename, szMyFilename, FALSE)) {
debugLogA("setmyavatar(): Failed to set user avatar. File with type %d could not be created/overwritten.", iAvType);
return -1;
}
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp
index 9d73f4b92c..4c2e783f9e 100644
--- a/protocols/IRCG/src/commandmonitor.cpp
+++ b/protocols/IRCG/src/commandmonitor.cpp
@@ -495,7 +495,7 @@ bool CIrcProto::OnIrc_MODE(const CIrcMessage* pmsg)
if (strchr(sUserModes.c_str(), (char)*p1)) {
CMString sStatus = ModeToStatus(*p1);
if ((int)pmsg->parameters.getCount() > iParametercount) {
- if (!_tcscmp(pmsg->parameters[2].c_str(), m_info.sNick.c_str())) {
+ if (!mir_tstrcmp(pmsg->parameters[2].c_str(), m_info.sNick.c_str())) {
char cModeBit = -1;
CHANNELINFO *wi = (CHANNELINFO *)DoEvent(GC_EVENT_GETITEMDATA, pmsg->parameters[0].c_str(), NULL, NULL, NULL, NULL, NULL, false, false, 0);
switch (*p1) {
@@ -1810,7 +1810,7 @@ static void __stdcall sttShowNickWnd(void* param)
bool CIrcProto::OnIrc_NICK_ERR(const CIrcMessage* pmsg)
{
if (pmsg->m_bIncoming) {
- if (nickflag && ((m_alternativeNick[0] != 0)) && (pmsg->parameters.getCount() > 2 && _tcscmp(pmsg->parameters[1].c_str(), m_alternativeNick))) {
+ if (nickflag && ((m_alternativeNick[0] != 0)) && (pmsg->parameters.getCount() > 2 && mir_tstrcmp(pmsg->parameters[1].c_str(), m_alternativeNick))) {
TCHAR m[200];
mir_sntprintf(m, SIZEOF(m), _T("NICK %s"), m_alternativeNick);
if (IsConnected())
diff --git a/protocols/IcqOscarJ/src/icq_servlist.cpp b/protocols/IcqOscarJ/src/icq_servlist.cpp
index fed066f96a..5193f9049e 100644
--- a/protocols/IcqOscarJ/src/icq_servlist.cpp
+++ b/protocols/IcqOscarJ/src/icq_servlist.cpp
@@ -1385,7 +1385,7 @@ int CIcqProto::getCListGroupExists(const char *szGroup)
break;
// we have found the group
- if (!_tcscmp(tszGroup, tszGroupName))
+ if (!mir_tstrcmp(tszGroup, tszGroupName))
return i;
}
diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp
index 27e864336d..fedcb897c3 100644
--- a/protocols/JabberG/src/jabber_adhoc.cpp
+++ b/protocols/JabberG/src/jabber_adhoc.cpp
@@ -143,7 +143,7 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult(HWND hwndDlg, HXML iqNode, Jabbe
{
int nodeIdx = 0;
const TCHAR * type = xmlGetAttrValue(iqNode, _T("type"));
- if (!type || !_tcscmp(type, _T("error"))) {
+ if (!type || !mir_tstrcmp(type, _T("error"))) {
// error occurred here
TCHAR buff[255];
const TCHAR *code = NULL;
@@ -157,7 +157,7 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult(HWND hwndDlg, HXML iqNode, Jabbe
mir_sntprintf(buff, SIZEOF(buff), TranslateT("Error %s %s"), (code) ? code : _T(""), (description) ? description : _T(""));
JabberFormSetInstruction(hwndDlg, buff);
}
- else if (!_tcscmp(type, _T("result"))) {
+ else if (!mir_tstrcmp(type, _T("result"))) {
BOOL validResponse = FALSE;
EnumChildWindows(GetDlgItem(hwndDlg, IDC_FRAME), sttDeleteChildWindowsProc, 0);
dat->CurrentHeight = 0;
@@ -167,7 +167,7 @@ int CJabberProto::AdHoc_OnJAHMCommandListResult(HWND hwndDlg, HXML iqNode, Jabbe
if (queryNode) {
const TCHAR *xmlns = xmlGetAttrValue(queryNode, _T("xmlns"));
const TCHAR *node = xmlGetAttrValue(queryNode, _T("node"));
- if (xmlns && node && !_tcscmp(xmlns, JABBER_FEAT_DISCO_ITEMS) && !_tcscmp(node, JABBER_FEAT_COMMANDS))
+ if (xmlns && node && !mir_tstrcmp(xmlns, JABBER_FEAT_DISCO_ITEMS) && !mir_tstrcmp(node, JABBER_FEAT_COMMANDS))
validResponse = TRUE;
}
if (queryNode && xmlGetChild(queryNode, 0) && validResponse) {
@@ -264,7 +264,7 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA
EnableDlgItem(hwndDlg, IDC_SUBMIT, TRUE);
}
- if (!status || _tcscmp(status, _T("executing"))) {
+ if (!status || mir_tstrcmp(status, _T("executing"))) {
ShowDlgItem(hwndDlg, IDC_SUBMIT, SW_HIDE);
SetDlgItemText(hwndDlg, IDCANCEL, TranslateT("Done"));
}
diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp
index b271da6373..b9910d9b5d 100644
--- a/protocols/JabberG/src/jabber_byte.cpp
+++ b/protocols/JabberG/src/jabber_byte.cpp
@@ -61,7 +61,7 @@ void CJabberProto::IqResultProxyDiscovery(HXML iqNode, CJabberIqInfo *pInfo)
HXML queryNode = xmlGetChild(iqNode , "query");
if (queryNode) {
const TCHAR *queryXmlns = xmlGetAttrValue(queryNode, _T("xmlns"));
- if (queryXmlns && !_tcscmp(queryXmlns, JABBER_FEAT_BYTESTREAMS)) {
+ if (queryXmlns && !mir_tstrcmp(queryXmlns, JABBER_FEAT_BYTESTREAMS)) {
HXML streamHostNode = xmlGetChild(queryNode , "streamhost");
if (streamHostNode) {
const TCHAR *streamJid = xmlGetAttrValue(streamHostNode, _T("jid"));
@@ -257,7 +257,7 @@ void CJabberProto::ByteSendThread(JABBER_BYTE_TRANSFER *jbt)
return;
}
- if (jbt->bProxyDiscovered && !_tcscmp(jbt->szProxyJid, jbt->szStreamhostUsed)) {
+ if (jbt->bProxyDiscovered && !mir_tstrcmp(jbt->szProxyJid, jbt->szStreamhostUsed)) {
// jabber proxy used
if (bDirect) {
SetEvent(jbt->hSendEvent);
@@ -299,7 +299,7 @@ void CJabberProto::ByteInitiateResult(HXML iqNode, CJabberIqInfo *pInfo)
HXML queryNode = xmlGetChild(iqNode , "query");
if (queryNode) {
const TCHAR *queryXmlns = xmlGetAttrValue(queryNode, _T("xmlns"));
- if (queryXmlns && !_tcscmp(queryXmlns, JABBER_FEAT_BYTESTREAMS)) {
+ if (queryXmlns && !mir_tstrcmp(queryXmlns, JABBER_FEAT_BYTESTREAMS)) {
HXML streamHostNode = xmlGetChild(queryNode , "streamhost-used");
if (streamHostNode) {
const TCHAR *streamJid = xmlGetAttrValue(streamHostNode, _T("jid"));
diff --git a/protocols/JabberG/src/jabber_caps.cpp b/protocols/JabberG/src/jabber_caps.cpp
index 7b1cfe11ff..a68814d7cf 100644
--- a/protocols/JabberG/src/jabber_caps.cpp
+++ b/protocols/JabberG/src/jabber_caps.cpp
@@ -111,7 +111,7 @@ void CJabberProto::OnIqResultCapsDiscoInfoSI(HXML, CJabberIqInfo *pInfo)
HXML xform;
for (int i = 1; (xform = xmlGetNthChild(query, _T("x"), i)) != NULL; i++) {
TCHAR *szFormTypeValue = XPath(xform, _T("field[@var='FORM_TYPE']/value"));
- if (szFormTypeValue && !_tcscmp(szFormTypeValue, _T("urn:xmpp:dataforms:softwareinfo"))) {
+ if (szFormTypeValue && !mir_tstrcmp(szFormTypeValue, _T("urn:xmpp:dataforms:softwareinfo"))) {
TCHAR *szTmp = XPath(xform, _T("field[@var='os']/value"));
if (szTmp)
r->m_tszOs = mir_tstrdup(szTmp);
@@ -148,7 +148,7 @@ void CJabberProto::OnIqResultCapsDiscoInfo(HXML, CJabberIqInfo *pInfo)
continue;
for (int j = 0; g_JabberFeatCapPairs[j].szFeature; j++) {
- if (!_tcscmp(g_JabberFeatCapPairs[j].szFeature, featureName)) {
+ if (!mir_tstrcmp(g_JabberFeatCapPairs[j].szFeature, featureName)) {
jcbCaps |= g_JabberFeatCapPairs[j].jcbCap;
break;
}
@@ -349,17 +349,17 @@ JabberCapsBits CJabberProto::GetResourceCapabilites(const TCHAR *jid, BOOL appen
JabberCapsBits jcbMainCaps = m_clientCapsManager.GetClientCaps(r->m_tszSoftware, r->m_tszSoftwareVersion);
if (jcbMainCaps == JABBER_RESOURCE_CAPS_ERROR) {
// Bombus hack:
- if (!_tcscmp(r->m_tszSoftware, _T("Bombus")) || !_tcscmp(r->m_tszSoftware, _T("BombusMod"))) {
+ if (!mir_tstrcmp(r->m_tszSoftware, _T("Bombus")) || !mir_tstrcmp(r->m_tszSoftware, _T("BombusMod"))) {
jcbMainCaps = JABBER_CAPS_SI | JABBER_CAPS_SI_FT | JABBER_CAPS_IBB | JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY | JABBER_CAPS_DATA_FORMS | JABBER_CAPS_LAST_ACTIVITY | JABBER_CAPS_VERSION | JABBER_CAPS_COMMANDS | JABBER_CAPS_VCARD_TEMP;
m_clientCapsManager.SetClientCaps(r->m_tszSoftware, r->m_tszSoftwareVersion, jcbMainCaps);
}
// Neos hack:
- else if (!_tcscmp(r->m_tszSoftware, _T("neos"))) {
+ else if (!mir_tstrcmp(r->m_tszSoftware, _T("neos"))) {
jcbMainCaps = JABBER_CAPS_OOB | JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY | JABBER_CAPS_LAST_ACTIVITY | JABBER_CAPS_VERSION;
m_clientCapsManager.SetClientCaps(r->m_tszSoftware, r->m_tszSoftwareVersion, jcbMainCaps);
}
// sim hack:
- else if (!_tcscmp(r->m_tszSoftware, _T("sim"))) {
+ else if (!mir_tstrcmp(r->m_tszSoftware, _T("sim"))) {
jcbMainCaps = JABBER_CAPS_OOB | JABBER_CAPS_VERSION | JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_EVENTS_NO_DELIVERY;
m_clientCapsManager.SetClientCaps(r->m_tszSoftware, r->m_tszSoftwareVersion, jcbMainCaps);
}
@@ -437,7 +437,7 @@ CJabberClientPartialCaps* CJabberClientCaps::FindByVersion(const TCHAR *szVer)
CJabberClientPartialCaps *pCaps = m_pCaps;
while (pCaps) {
- if (!_tcscmp(szVer, pCaps->GetVersion()))
+ if (!mir_tstrcmp(szVer, pCaps->GetVersion()))
break;
pCaps = pCaps->GetNext();
}
@@ -536,7 +536,7 @@ CJabberClientCaps * CJabberClientCapsManager::FindClient(const TCHAR *szNode)
CJabberClientCaps *pClient = m_pClients;
while (pClient) {
- if (!_tcscmp(szNode, pClient->GetNode()))
+ if (!mir_tstrcmp(szNode, pClient->GetNode()))
break;
pClient = pClient->GetNext();
}
@@ -616,7 +616,7 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con
TCHAR szExtCap[ 512 ];
mir_sntprintf(szExtCap, SIZEOF(szExtCap), _T("%s#%s"), JABBER_CAPS_MIRANDA_NODE, g_JabberFeatCapPairsExt[i].szFeature);
- if (!_tcscmp(szNode, szExtCap)) {
+ if (!mir_tstrcmp(szNode, szExtCap)) {
jcb = g_JabberFeatCapPairsExt[i].jcbCap;
break;
}
@@ -626,7 +626,7 @@ BOOL CJabberClientCapsManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, con
for (i=0; i < ppro->m_lstJabberFeatCapPairsDynamic.getCount(); i++) {
TCHAR szExtCap[ 512 ];
mir_sntprintf(szExtCap, SIZEOF(szExtCap), _T("%s#%s"), JABBER_CAPS_MIRANDA_NODE, ppro->m_lstJabberFeatCapPairsDynamic[i]->szExt);
- if (!_tcscmp(szNode, szExtCap)) {
+ if (!mir_tstrcmp(szNode, szExtCap)) {
jcb = ppro->m_lstJabberFeatCapPairsDynamic[i]->jcbCap;
break;
}
diff --git a/protocols/JabberG/src/jabber_form.cpp b/protocols/JabberG/src/jabber_form.cpp
index 0da167336d..2ec926fa4d 100644
--- a/protocols/JabberG/src/jabber_form.cpp
+++ b/protocols/JabberG/src/jabber_form.cpp
@@ -205,19 +205,19 @@ void JabberFormSetInstruction(HWND hwndForm, const TCHAR *text)
static TJabberFormControlType JabberFormTypeNameToId(const TCHAR *type)
{
- if (!_tcscmp(type, _T("text-private")))
+ if (!mir_tstrcmp(type, _T("text-private")))
return JFORM_CTYPE_TEXT_PRIVATE;
- if (!_tcscmp(type, _T("text-multi")) || !_tcscmp(type, _T("jid-multi")))
+ if (!mir_tstrcmp(type, _T("text-multi")) || !mir_tstrcmp(type, _T("jid-multi")))
return JFORM_CTYPE_TEXT_MULTI;
- if (!_tcscmp(type, _T("boolean")))
+ if (!mir_tstrcmp(type, _T("boolean")))
return JFORM_CTYPE_BOOLEAN;
- if (!_tcscmp(type, _T("list-single")))
+ if (!mir_tstrcmp(type, _T("list-single")))
return JFORM_CTYPE_LIST_SINGLE;
- if (!_tcscmp(type, _T("list-multi")))
+ if (!mir_tstrcmp(type, _T("list-multi")))
return JFORM_CTYPE_LIST_MULTI;
- if (!_tcscmp(type, _T("fixed")))
+ if (!mir_tstrcmp(type, _T("fixed")))
return JFORM_CTYPE_FIXED;
- if (!_tcscmp(type, _T("hidden")))
+ if (!mir_tstrcmp(type, _T("hidden")))
return JFORM_CTYPE_HIDDEN;
return JFORM_CTYPE_TEXT_SINGLE;
@@ -323,7 +323,7 @@ TJabberFormControlInfo *JabberFormAppendControl(HWND hwndStatic, TJabberFormLayo
WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_AUTOCHECKBOX | BS_MULTILINE,
0, 0, 0, 0,
hwndStatic, (HMENU)layout_info->id, hInst, NULL);
- if (valueStr && !_tcscmp(valueStr, _T("1")))
+ if (valueStr && !mir_tstrcmp(valueStr, _T("1")))
SendMessage(item->hCtrl, BM_SETCHECK, 1, 0);
++layout_info->id;
break;
@@ -602,7 +602,7 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode)
hCtrl = GetDlgItem(hFrame, id);
HXML field = x << XCHILD(_T("field")) << XATTR(_T("var"), varName);
- if (!_tcscmp(type, _T("text-multi")) || !_tcscmp(type, _T("jid-multi"))) {
+ if (!mir_tstrcmp(type, _T("text-multi")) || !mir_tstrcmp(type, _T("jid-multi"))) {
len = GetWindowTextLength(GetDlgItem(hFrame, id));
str = (TCHAR*)mir_alloc(sizeof(TCHAR)*(len + 1));
GetDlgItemText(hFrame, id, str, len + 1);
@@ -616,13 +616,13 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode)
mir_free(str);
id++;
}
- else if (!_tcscmp(type, _T("boolean"))) {
+ else if (!mir_tstrcmp(type, _T("boolean"))) {
TCHAR buf[10];
_itot(IsDlgButtonChecked(hFrame, id) == BST_CHECKED ? 1 : 0, buf, 10);
field << XCHILD(_T("value"), buf);
id++;
}
- else if (!_tcscmp(type, _T("list-single"))) {
+ else if (!mir_tstrcmp(type, _T("list-single"))) {
len = GetWindowTextLength(GetDlgItem(hFrame, id));
str = (TCHAR*)mir_alloc(sizeof(TCHAR)*(len + 1));
GetDlgItemText(hFrame, id, str, len + 1);
@@ -648,7 +648,7 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode)
mir_free(str);
id++;
}
- else if (!_tcscmp(type, _T("list-multi"))) {
+ else if (!mir_tstrcmp(type, _T("list-multi"))) {
int count = SendMessage(hCtrl, LB_GETCOUNT, 0, 0);
for (j = 0; j < count; j++) {
if (SendMessage(hCtrl, LB_GETSEL, j, 0) > 0) {
@@ -677,7 +677,7 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode)
}
id++;
}
- else if (!_tcscmp(type, _T("fixed")) || !_tcscmp(type, _T("hidden"))) {
+ else if (!mir_tstrcmp(type, _T("fixed")) || !mir_tstrcmp(type, _T("hidden"))) {
v = xmlGetChild(n, "value");
if (v != NULL && xmlGetText(v) != NULL)
field << XCHILD(_T("value"), xmlGetText(v));
diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp
index 33c2407aa7..34688fc5eb 100644
--- a/protocols/JabberG/src/jabber_ft.cpp
+++ b/protocols/JabberG/src/jabber_ft.cpp
@@ -140,7 +140,7 @@ void CJabberProto::OnFtSiResult(HXML iqNode, CJabberIqInfo *pInfo)
if ((xNode = xmlGetChildByTag(featureNode, "x", "xmlns", JABBER_FEAT_DATA_FORMS)) != NULL) {
if ((fieldNode = xmlGetChildByTag(xNode, "field", "var", _T("stream-method"))) != NULL) {
if ((valueNode = xmlGetChild(fieldNode , "value")) != NULL && xmlGetText(valueNode) != NULL) {
- if ((bDirect || bProxy) && !_tcscmp(xmlGetText(valueNode), JABBER_FEAT_BYTESTREAMS)) {
+ if ((bDirect || bProxy) && !mir_tstrcmp(xmlGetText(valueNode), JABBER_FEAT_BYTESTREAMS)) {
// Start Bytestream session
JABBER_BYTE_TRANSFER *jbt = new JABBER_BYTE_TRANSFER;
memset(jbt, 0, sizeof(JABBER_BYTE_TRANSFER));
@@ -154,7 +154,7 @@ void CJabberProto::OnFtSiResult(HXML iqNode, CJabberIqInfo *pInfo)
ft->jbt = jbt;
ForkThread((MyThreadFunc)&CJabberProto::ByteSendThread, jbt);
}
- else if (!_tcscmp(xmlGetText(valueNode), JABBER_FEAT_IBB)) {
+ else if (!mir_tstrcmp(xmlGetText(valueNode), JABBER_FEAT_IBB)) {
JABBER_IBB_TRANSFER *jibb = (JABBER_IBB_TRANSFER *) mir_alloc(sizeof (JABBER_IBB_TRANSFER));
memset(jibb, 0, sizeof(JABBER_IBB_TRANSFER));
jibb->srcJID = mir_tstrdup(pInfo->m_szTo);
@@ -301,7 +301,7 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode)
if (!iqNode ||
(from = xmlGetAttrValue(iqNode, _T("from"))) == NULL ||
- (str = xmlGetAttrValue(iqNode, _T("type"))) == NULL || _tcscmp(str, _T("set")) ||
+ (str = xmlGetAttrValue(iqNode, _T("type"))) == NULL || mir_tstrcmp(str, _T("set")) ||
(siNode = xmlGetChildByTag(iqNode, "si", "xmlns", JABBER_FEAT_SI)) == NULL)
return;
@@ -328,7 +328,7 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode)
if (!mir_tstrcmp(xmlGetName(optionNode), _T("option"))) {
if ((n = xmlGetChild(optionNode , "value")) != NULL && xmlGetText(n)) {
- if (!_tcscmp(xmlGetText(n), JABBER_FEAT_BYTESTREAMS)) {
+ if (!mir_tstrcmp(xmlGetText(n), JABBER_FEAT_BYTESTREAMS)) {
ftType = FT_BYTESTREAM;
break;
} } } } }
@@ -342,7 +342,7 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode)
if (!mir_tstrcmp(xmlGetName(optionNode), _T("option"))) {
if ((n = xmlGetChild(optionNode , "value")) != NULL && xmlGetText(n)) {
- if (!_tcscmp(xmlGetText(n), JABBER_FEAT_IBB)) {
+ if (!mir_tstrcmp(xmlGetText(n), JABBER_FEAT_IBB)) {
ftType = FT_IBB;
break;
} } } } }
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp
index 65fbced241..3712a1e14c 100644
--- a/protocols/JabberG/src/jabber_groupchat.cpp
+++ b/protocols/JabberG/src/jabber_groupchat.cpp
@@ -837,7 +837,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node)
const TCHAR *nick = cnick ? cnick : (r && r->m_tszNick ? r->m_tszNick : resource);
// process custom nick change
- if (cnick && r && r->m_tszNick && _tcscmp(cnick, r->m_tszNick))
+ if (cnick && r && r->m_tszNick && mir_tstrcmp(cnick, r->m_tszNick))
r->m_tszNick = mir_tstrdup(cnick);
HXML xNode = xmlGetChildByTag(node, "x", "xmlns", JABBER_FEAT_MUC_USER);
@@ -846,7 +846,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node)
const TCHAR *type = xmlGetAttrValue(node, _T("type"));
// entering room or a usual room presence
- if (type == NULL || !_tcscmp(type, _T("available"))) {
+ if (type == NULL || !mir_tstrcmp(type, _T("available"))) {
if (ptrT(JabberNickFromJID(from)) == NULL)
return;
@@ -857,10 +857,10 @@ void CJabberProto::GroupchatProcessPresence(HXML node)
int status = ID_STATUS_ONLINE;
LPCTSTR ptszShow = xmlGetText(xmlGetChild(node, "show"));
if (ptszShow) {
- if (!_tcscmp(ptszShow, _T("away"))) status = ID_STATUS_AWAY;
- else if (!_tcscmp(ptszShow, _T("xa"))) status = ID_STATUS_NA;
- else if (!_tcscmp(ptszShow, _T("dnd"))) status = ID_STATUS_DND;
- else if (!_tcscmp(ptszShow, _T("chat"))) status = ID_STATUS_FREECHAT;
+ if (!mir_tstrcmp(ptszShow, _T("away"))) status = ID_STATUS_AWAY;
+ else if (!mir_tstrcmp(ptszShow, _T("xa"))) status = ID_STATUS_NA;
+ else if (!mir_tstrcmp(ptszShow, _T("dnd"))) status = ID_STATUS_DND;
+ else if (!mir_tstrcmp(ptszShow, _T("chat"))) status = ID_STATUS_FREECHAT;
}
LPCTSTR str = xmlGetText(xmlGetChild(node, "status"));
@@ -885,16 +885,16 @@ void CJabberProto::GroupchatProcessPresence(HXML node)
JABBER_GC_ROLE role = r->m_role;
if ((str = xmlGetAttrValue(itemNode, _T("affiliation"))) != NULL) {
- if (!_tcscmp(str, _T("owner"))) affiliation = AFFILIATION_OWNER;
- else if (!_tcscmp(str, _T("admin"))) affiliation = AFFILIATION_ADMIN;
- else if (!_tcscmp(str, _T("member"))) affiliation = AFFILIATION_MEMBER;
- else if (!_tcscmp(str, _T("none"))) affiliation = AFFILIATION_NONE;
- else if (!_tcscmp(str, _T("outcast"))) affiliation = AFFILIATION_OUTCAST;
+ if (!mir_tstrcmp(str, _T("owner"))) affiliation = AFFILIATION_OWNER;
+ else if (!mir_tstrcmp(str, _T("admin"))) affiliation = AFFILIATION_ADMIN;
+ else if (!mir_tstrcmp(str, _T("member"))) affiliation = AFFILIATION_MEMBER;
+ else if (!mir_tstrcmp(str, _T("none"))) affiliation = AFFILIATION_NONE;
+ else if (!mir_tstrcmp(str, _T("outcast"))) affiliation = AFFILIATION_OUTCAST;
}
if ((str = xmlGetAttrValue(itemNode, _T("role"))) != NULL) {
- if (!_tcscmp(str, _T("moderator"))) role = ROLE_MODERATOR;
- else if (!_tcscmp(str, _T("participant"))) role = ROLE_PARTICIPANT;
- else if (!_tcscmp(str, _T("visitor"))) role = ROLE_VISITOR;
+ if (!mir_tstrcmp(str, _T("moderator"))) role = ROLE_MODERATOR;
+ else if (!mir_tstrcmp(str, _T("participant"))) role = ROLE_PARTICIPANT;
+ else if (!mir_tstrcmp(str, _T("visitor"))) role = ROLE_VISITOR;
else role = ROLE_NONE;
}
@@ -940,7 +940,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node)
// Check <created/>
if (bRoomCreated) {
HXML n = xmlGetChild(node, "created");
- if (n != NULL && (str = xmlGetAttrValue(n, _T("xmlns"))) != NULL && !_tcscmp(str, JABBER_FEAT_MUC_OWNER))
+ if (n != NULL && (str = xmlGetAttrValue(n, _T("xmlns"))) != NULL && !mir_tstrcmp(str, JABBER_FEAT_MUC_OWNER))
// A new room just created by me
// Request room config
m_ThreadInfo->send(
@@ -950,7 +950,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node)
}
// leaving room
- else if (!_tcscmp(type, _T("unavailable"))) {
+ else if (!mir_tstrcmp(type, _T("unavailable"))) {
const TCHAR *str = 0;
if (xNode != NULL && item->nick != NULL) {
HXML reasonNode = xmlGetChild(itemNode, "reason");
@@ -998,7 +998,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node)
}
// processing room errors
- else if (!_tcscmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, _T("error"))) {
int errorCode = 0;
HXML errorNode = xmlGetChild(node, "error");
ptrT str(JabberErrorMsg(errorNode, &errorCode));
diff --git a/protocols/JabberG/src/jabber_ibb.cpp b/protocols/JabberG/src/jabber_ibb.cpp
index 78d952daf7..61094fb023 100644
--- a/protocols/JabberG/src/jabber_ibb.cpp
+++ b/protocols/JabberG/src/jabber_ibb.cpp
@@ -46,11 +46,11 @@ void JabberIbbFreeJibb(JABBER_IBB_TRANSFER *jibb)
BOOL CJabberProto::OnFtHandleIbbIq(HXML iqNode, CJabberIqInfo *pInfo)
{
- if (!_tcscmp(pInfo->GetChildNodeName(), _T("open")))
+ if (!mir_tstrcmp(pInfo->GetChildNodeName(), _T("open")))
FtHandleIbbRequest(iqNode, TRUE);
- else if (!_tcscmp(pInfo->GetChildNodeName(), _T("close")))
+ else if (!mir_tstrcmp(pInfo->GetChildNodeName(), _T("close")))
FtHandleIbbRequest(iqNode, FALSE);
- else if (!_tcscmp(pInfo->GetChildNodeName(), _T("data"))) {
+ else if (!mir_tstrcmp(pInfo->GetChildNodeName(), _T("data"))) {
BOOL bOk = FALSE;
const TCHAR *sid = xmlGetAttrValue(pInfo->GetChildNode(), _T("sid"));
const TCHAR *seq = xmlGetAttrValue(pInfo->GetChildNode(), _T("seq"));
diff --git a/protocols/JabberG/src/jabber_iq.cpp b/protocols/JabberG/src/jabber_iq.cpp
index 9217a01871..d0084b7125 100644
--- a/protocols/JabberG/src/jabber_iq.cpp
+++ b/protocols/JabberG/src/jabber_iq.cpp
@@ -314,8 +314,8 @@ bool CJabberIqManager::HandleIqPermanent(HXML pNode)
const TCHAR *szTagName = xmlGetName(pFirstChild);
const TCHAR *szXmlns = xmlGetAttrValue(pFirstChild, _T("xmlns"));
- if ((!pInfo.m_szXmlns || (szXmlns && !_tcscmp(pInfo.m_szXmlns, szXmlns))) &&
- (!pInfo.m_szTag || !_tcscmp(pInfo.m_szTag, szTagName)))
+ if ((!pInfo.m_szXmlns || (szXmlns && !mir_tstrcmp(pInfo.m_szXmlns, szXmlns))) &&
+ (!pInfo.m_szTag || !mir_tstrcmp(pInfo.m_szTag, szTagName)))
{
// node suits handler criteria, call the handler
iqInfo.m_pChildNode = pFirstChild;
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp
index c8222b05d7..9e6c191168 100644
--- a/protocols/JabberG/src/jabber_iq_handlers.cpp
+++ b/protocols/JabberG/src/jabber_iq_handlers.cpp
@@ -478,7 +478,7 @@ BOOL CJabberProto::OnSiRequest(HXML node, CJabberIqInfo *pInfo)
{
const TCHAR *szProfile = xmlGetAttrValue(pInfo->GetChildNode(), _T("profile"));
- if (szProfile && !_tcscmp(szProfile, JABBER_FEAT_SI_FT))
+ if (szProfile && !mir_tstrcmp(szProfile, JABBER_FEAT_SI_FT))
FtHandleSiRequest(node);
else {
XmlNodeIq iq(_T("error"), pInfo);
@@ -512,7 +512,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo)
pDelimiter = _tcschr(szTo, _T('/'));
if (pDelimiter) *pDelimiter = 0;
- BOOL bRetVal = _tcscmp(szFrom, szTo) == 0;
+ BOOL bRetVal = mir_tstrcmp(szFrom, szTo) == 0;
mir_free(szFrom);
mir_free(szTo);
@@ -534,7 +534,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo)
if (!itemNode)
break;
- if (_tcscmp(xmlGetName(itemNode), _T("item")) != 0)
+ if (mir_tstrcmp(xmlGetName(itemNode), _T("item")) != 0)
continue;
if ((jid = xmlGetAttrValue(itemNode, _T("jid"))) == NULL)
continue;
@@ -542,7 +542,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo)
continue;
// we will not add new account when subscription=remove
- if (!_tcscmp(str, _T("to")) || !_tcscmp(str, _T("both")) || !_tcscmp(str, _T("from")) || !_tcscmp(str, _T("none"))) {
+ if (!mir_tstrcmp(str, _T("to")) || !mir_tstrcmp(str, _T("both")) || !mir_tstrcmp(str, _T("from")) || !mir_tstrcmp(str, _T("none"))) {
const TCHAR *name = xmlGetAttrValue(itemNode, _T("name"));
ptrT nick((name != NULL) ? mir_tstrdup(name) : JabberNickFromJID(jid));
if (nick != NULL) {
@@ -562,7 +562,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo)
if (name != NULL) {
ptrT tszNick(getTStringA(hContact, "Nick"));
if (tszNick != NULL) {
- if (_tcscmp(nick, tszNick) != 0)
+ if (mir_tstrcmp(nick, tszNick) != 0)
db_set_ts(hContact, "CList", "MyHandle", nick);
else
db_unset(hContact, "CList", "MyHandle");
@@ -583,15 +583,15 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo)
}
if ((item = ListGetItemPtr(LIST_ROSTER, jid)) != NULL) {
- if (!_tcscmp(str, _T("both"))) item->subscription = SUB_BOTH;
- else if (!_tcscmp(str, _T("to"))) item->subscription = SUB_TO;
- else if (!_tcscmp(str, _T("from"))) item->subscription = SUB_FROM;
+ if (!mir_tstrcmp(str, _T("both"))) item->subscription = SUB_BOTH;
+ else if (!mir_tstrcmp(str, _T("to"))) item->subscription = SUB_TO;
+ else if (!mir_tstrcmp(str, _T("from"))) item->subscription = SUB_FROM;
else item->subscription = SUB_NONE;
debugLog(_T("Roster push for jid=%s, set subscription to %s"), jid, str);
// subscription = remove is to remove from roster list
// but we will just set the contact to offline and not actually
// remove, so that history will be retained.
- if (!_tcscmp(str, _T("remove"))) {
+ if (!mir_tstrcmp(str, _T("remove"))) {
if ((hContact = HContactFromJID(jid)) != NULL) {
SetContactOfflineStatus(hContact);
ListRemove(LIST_ROSTER, jid);
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp
index 041f665e58..a109b3bea3 100644
--- a/protocols/JabberG/src/jabber_iqid.cpp
+++ b/protocols/JabberG/src/jabber_iqid.cpp
@@ -35,7 +35,7 @@ void CJabberProto::OnIqResultServerDiscoInfo(HXML iqNode, CJabberIqInfo*)
return;
const TCHAR *type = xmlGetAttrValue(iqNode, _T("type"));
- if ( _tcscmp(type, _T("result")))
+ if ( mir_tstrcmp(type, _T("result")))
return;
HXML query = xmlGetChildByTag(iqNode, "query", "xmlns", JABBER_FEAT_DISCO_INFO);
@@ -68,7 +68,7 @@ void CJabberProto::OnIqResultServerDiscoInfo(HXML iqNode, CJabberIqInfo*)
continue;
for (int j = 0; g_JabberFeatCapPairs[j].szFeature; j++) {
- if (!_tcscmp(g_JabberFeatCapPairs[j].szFeature, featureName)) {
+ if (!mir_tstrcmp(g_JabberFeatCapPairs[j].szFeature, featureName)) {
m_ThreadInfo->jabberServerCaps |= g_JabberFeatCapPairs[j].jcbCap;
break;
}
@@ -96,7 +96,7 @@ void CJabberProto::OnIqResultNestedRosterGroups(HXML iqNode, CJabberIqInfo *pInf
return;
// is our default delimiter?
- if ((!szGroupDelimeter && bPrivateStorageSupport) || (szGroupDelimeter && _tcscmp(szGroupDelimeter, _T("\\"))))
+ if ((!szGroupDelimeter && bPrivateStorageSupport) || (szGroupDelimeter && mir_tstrcmp(szGroupDelimeter, _T("\\"))))
m_ThreadInfo->send(
XmlNodeIq(_T("set"), SerialNext()) << XQUERY(JABBER_FEAT_PRIVATE_STORAGE)
<< XCHILD(_T("roster"), _T("\\")) << XATTR(_T("xmlns"), JABBER_FEAT_NESTED_ROSTER_GROUPS));
@@ -352,7 +352,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo)
return;
}
- if (!_tcscmp(szGroupDelimeter, _T("\\"))) {
+ if (!mir_tstrcmp(szGroupDelimeter, _T("\\"))) {
mir_free(szGroupDelimeter);
szGroupDelimeter = NULL;
}
@@ -367,16 +367,16 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo)
if (!itemNode)
break;
- if (_tcscmp(xmlGetName(itemNode), _T("item")))
+ if (mir_tstrcmp(xmlGetName(itemNode), _T("item")))
continue;
const TCHAR *str = xmlGetAttrValue(itemNode, _T("subscription"));
JABBER_SUBSCRIPTION sub;
if (str == NULL) sub = SUB_NONE;
- else if (!_tcscmp(str, _T("both"))) sub = SUB_BOTH;
- else if (!_tcscmp(str, _T("to"))) sub = SUB_TO;
- else if (!_tcscmp(str, _T("from"))) sub = SUB_FROM;
+ else if (!mir_tstrcmp(str, _T("both"))) sub = SUB_BOTH;
+ else if (!mir_tstrcmp(str, _T("to"))) sub = SUB_TO;
+ else if (!mir_tstrcmp(str, _T("from"))) sub = SUB_FROM;
else sub = SUB_NONE;
const TCHAR *jid = xmlGetAttrValue(itemNode, _T("jid"));
@@ -621,7 +621,7 @@ void CJabberProto::OnIqResultGetVcardPhoto(HXML n, MCONTACT hContact, bool &hasP
}
if (item != NULL) {
hasPhoto = TRUE;
- if (item->photoFileName && _tcscmp(item->photoFileName, szAvatarFileName))
+ if (item->photoFileName && mir_tstrcmp(item->photoFileName, szAvatarFileName))
DeleteFile(item->photoFileName);
replaceStrT(item->photoFileName, szAvatarFileName);
debugLog(_T("Contact's picture saved to %s"), szAvatarFileName);
@@ -715,7 +715,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*)
if (!n)
break;
if (xmlGetName(n) == NULL) continue;
- if (!_tcscmp(xmlGetName(n), _T("FN"))) {
+ if (!mir_tstrcmp(xmlGetName(n), _T("FN"))) {
if (xmlGetText(n) != NULL) {
hasFn = true;
setTString(hContact, "FullName", xmlGetText(n));
@@ -1277,7 +1277,7 @@ void CJabberProto::OnIqResultGetVCardAvatar(HXML iqNode, CJabberIqInfo*)
const TCHAR *type;
if ((type = xmlGetAttrValue(iqNode, _T("type"))) == NULL) return;
- if (_tcscmp(type, _T("result"))) return;
+ if (mir_tstrcmp(type, _T("result"))) return;
HXML vCard = xmlGetChild(iqNode , "vCard");
if (vCard == NULL) return;
@@ -1316,7 +1316,7 @@ void CJabberProto::OnIqResultGetClientAvatar(HXML iqNode, CJabberIqInfo*)
return;
HXML n = NULL;
- if ((type = xmlGetAttrValue(iqNode, _T("type"))) != NULL && !_tcscmp(type, _T("result"))) {
+ if ((type = xmlGetAttrValue(iqNode, _T("type"))) != NULL && !mir_tstrcmp(type, _T("result"))) {
HXML queryNode = xmlGetChild(iqNode , "query");
if (queryNode != NULL) {
const TCHAR *xmlns = xmlGetAttrValue(queryNode, _T("xmlns"));
@@ -1465,7 +1465,7 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode, CJabberIqInfo*)
HXML itemNode;
for (int i = 0; itemNode = xmlGetChild(storageNode, i); i++) {
if (LPCTSTR name = xmlGetName(itemNode)) {
- if (!_tcscmp(name, _T("conference")) && (jid = xmlGetAttrValue(itemNode, _T("jid")))) {
+ if (!mir_tstrcmp(name, _T("conference")) && (jid = xmlGetAttrValue(itemNode, _T("jid")))) {
JABBER_LIST_ITEM *item = ListAdd(LIST_BOOKMARK, jid);
item->name = mir_tstrdup(xmlGetAttrValue(itemNode, _T("name")));
item->type = mir_tstrdup(_T("conference"));
@@ -1477,7 +1477,7 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode, CJabberIqInfo*)
if (autoJ != NULL)
item->bAutoJoin = (!mir_tstrcmp(autoJ, _T("true")) || !mir_tstrcmp(autoJ, _T("1"))) ? true : false;
}
- else if (!_tcscmp(name, _T("url")) && (jid = xmlGetAttrValue(itemNode, _T("url")))) {
+ else if (!mir_tstrcmp(name, _T("url")) && (jid = xmlGetAttrValue(itemNode, _T("url")))) {
JABBER_LIST_ITEM *item = ListAdd(LIST_BOOKMARK, jid);
item->bUseResource = TRUE;
item->name = mir_tstrdup(xmlGetAttrValue(itemNode, _T("name")));
diff --git a/protocols/JabberG/src/jabber_iqid_muc.cpp b/protocols/JabberG/src/jabber_iqid_muc.cpp
index 24f77738ca..8beb71694a 100644
--- a/protocols/JabberG/src/jabber_iqid_muc.cpp
+++ b/protocols/JabberG/src/jabber_iqid_muc.cpp
@@ -49,7 +49,7 @@ void CJabberProto::OnIqResultGetMuc(HXML iqNode, CJabberIqInfo*)
if (from == NULL)
return;
- if (!_tcscmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
HXML queryNode = xmlGetChild(iqNode , _T("query"));
if (queryNode != NULL) {
LPCTSTR str = xmlGetAttrValue(queryNode, _T("xmlns"));
diff --git a/protocols/JabberG/src/jabber_list.cpp b/protocols/JabberG/src/jabber_list.cpp
index ff447fb832..ebb67d0626 100644
--- a/protocols/JabberG/src/jabber_list.cpp
+++ b/protocols/JabberG/src/jabber_list.cpp
@@ -221,7 +221,7 @@ pResourceStatus JABBER_LIST_ITEM::findResource(const TCHAR *resourceName) const
for (int i=0; i < arResources.getCount(); i++) {
JABBER_RESOURCE_STATUS *r = arResources[i];
- if (!_tcscmp(r->m_tszResourceName, resourceName))
+ if (!mir_tstrcmp(r->m_tszResourceName, resourceName))
return r;
}
diff --git a/protocols/JabberG/src/jabber_message_manager.cpp b/protocols/JabberG/src/jabber_message_manager.cpp
index a1411bcac0..f8d067080d 100644
--- a/protocols/JabberG/src/jabber_message_manager.cpp
+++ b/protocols/JabberG/src/jabber_message_manager.cpp
@@ -82,7 +82,7 @@ bool CJabberMessageManager::HandleMessagePermanent(HXML node, ThreadData *pThrea
LPCTSTR szTagName = xmlGetName(child);
LPCTSTR szXmlns = xmlGetAttrValue(child, _T("xmlns"));
- if ((!pInfo.m_szXmlns || (szXmlns && !_tcscmp(pInfo.m_szXmlns, szXmlns))) && (!pInfo.m_szTag || !_tcscmp(pInfo.m_szTag, szTagName))) {
+ if ((!pInfo.m_szXmlns || (szXmlns && !mir_tstrcmp(pInfo.m_szXmlns, szXmlns))) && (!pInfo.m_szTag || !mir_tstrcmp(pInfo.m_szTag, szTagName))) {
// node suits handler criteria, call the handler
messageInfo.m_hChildNode = child;
messageInfo.m_szChildTagName = szTagName;
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp
index 6b08ffc451..5afc459a87 100644
--- a/protocols/JabberG/src/jabber_opt.cpp
+++ b/protocols/JabberG/src/jabber_opt.cpp
@@ -456,7 +456,7 @@ protected:
for (int i=0; g_LanguageCodes[i].szCode; i++) {
int iItem = m_cbLocale.AddString(TranslateTS(g_LanguageCodes[i].szDescription), (LPARAM)g_LanguageCodes[i].szCode);
- if (!_tcscmp(m_proto->m_tszSelectedLang, g_LanguageCodes[i].szCode))
+ if (!mir_tstrcmp(m_proto->m_tszSelectedLang, g_LanguageCodes[i].szCode))
m_cbLocale.SetCurSel(iItem);
}
diff --git a/protocols/JabberG/src/jabber_password.cpp b/protocols/JabberG/src/jabber_password.cpp
index 08248147a0..494b685230 100644
--- a/protocols/JabberG/src/jabber_password.cpp
+++ b/protocols/JabberG/src/jabber_password.cpp
@@ -61,12 +61,12 @@ static INT_PTR CALLBACK JabberChangePasswordDlgProc(HWND hwndDlg, UINT msg, WPAR
TCHAR newPasswd[512], text[512];
GetDlgItemText(hwndDlg, IDC_NEWPASSWD, newPasswd, SIZEOF(newPasswd));
GetDlgItemText(hwndDlg, IDC_NEWPASSWD2, text, SIZEOF(text));
- if (_tcscmp(newPasswd, text)) {
+ if (mir_tstrcmp(newPasswd, text)) {
MessageBox(hwndDlg, TranslateT("New password does not match."), TranslateT("Change Password"), MB_OK|MB_ICONSTOP|MB_SETFOREGROUND);
break;
}
GetDlgItemText(hwndDlg, IDC_OLDPASSWD, text, SIZEOF(text));
- if (_tcscmp(text, ppro->m_ThreadInfo->conn.password)) {
+ if (mir_tstrcmp(text, ppro->m_ThreadInfo->conn.password)) {
MessageBox(hwndDlg, TranslateT("Current password is incorrect."), TranslateT("Change Password"), MB_OK|MB_ICONSTOP|MB_SETFOREGROUND);
break;
}
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp
index dbaea138f8..ac18e525cd 100644
--- a/protocols/JabberG/src/jabber_privacy.cpp
+++ b/protocols/JabberG/src/jabber_privacy.cpp
@@ -77,7 +77,7 @@ void CJabberProto::OnIqResultPrivacyList(HXML iqNode, CJabberIqInfo*)
if (type == NULL)
return;
- if ( _tcscmp(type, _T("result")))
+ if ( mir_tstrcmp(type, _T("result")))
return;
HXML query = xmlGetChild(iqNode , "query");
@@ -185,7 +185,7 @@ void CJabberProto::OnIqResultPrivacyListActive(HXML iqNode, CJabberIqInfo *pInfo
CMString szText;
- if (!_tcscmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
mir_cslock lck(m_privacyListManager.m_cs);
if (pList) {
m_privacyListManager.SetActiveListName(pList->GetListName());
@@ -222,7 +222,7 @@ void CJabberProto::OnIqResultPrivacyListDefault(HXML iqNode, CJabberIqInfo *pInf
szText[0] = 0;
{
mir_cslock lck(m_privacyListManager.m_cs);
- if (!_tcscmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
CPrivacyList *pList = (CPrivacyList *)pInfo->GetUserData();
if (pList) {
m_privacyListManager.SetDefaultListName(pList->GetListName());
@@ -1870,8 +1870,8 @@ void CJabberDlgPrivacyLists::btnRemoveList_OnClick(CCtrlButton *)
CPrivacyList *pList = GetSelectedList(m_hwnd);
if (pList) {
TCHAR *szListName = pList->GetListName();
- if ((m_proto->m_privacyListManager.GetActiveListName() && !_tcscmp(szListName, m_proto->m_privacyListManager.GetActiveListName())) ||
- (m_proto->m_privacyListManager.GetDefaultListName() && !_tcscmp(szListName, m_proto->m_privacyListManager.GetDefaultListName())))
+ if ((m_proto->m_privacyListManager.GetActiveListName() && !mir_tstrcmp(szListName, m_proto->m_privacyListManager.GetActiveListName())) ||
+ (m_proto->m_privacyListManager.GetDefaultListName() && !mir_tstrcmp(szListName, m_proto->m_privacyListManager.GetDefaultListName())))
{
lck.unlock();
MessageBox(m_hwnd, TranslateT("Can't remove active or default list"), TranslateT("Sorry"), MB_OK | MB_ICONSTOP);
diff --git a/protocols/JabberG/src/jabber_privacy.h b/protocols/JabberG/src/jabber_privacy.h
index 697f0efa7b..97c34839ab 100644
--- a/protocols/JabberG/src/jabber_privacy.h
+++ b/protocols/JabberG/src/jabber_privacy.h
@@ -369,7 +369,7 @@ public:
{
CPrivacyList *pList = m_pLists;
while (pList) {
- if (!_tcscmp(pList->GetListName(), szListName))
+ if (!mir_tstrcmp(pList->GetListName(), szListName))
return pList;
pList = pList->GetNext();
}
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 79ce43efeb..ac27168eb1 100644
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -620,7 +620,7 @@ int __cdecl CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/)
item = ListGetItemPtr(LIST_ROSTER, jid);
if (item == NULL) {
- bool bHasResource = _tcscmp(jid, szBareJid) != 0;
+ bool bHasResource = mir_tstrcmp(jid, szBareJid) != 0;
JABBER_LIST_ITEM *tmpItem = NULL;
if (bHasResource && (tmpItem = ListGetItemPtr(LIST_CHATROOM, szBareJid))) {
pResourceStatus him(tmpItem->findResource(szBareJid+mir_tstrlen(szBareJid)+1));
@@ -651,7 +651,7 @@ int __cdecl CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/)
m_ThreadInfo->send(iq4);
}
- if (!_tcscmp(tmp, jid)) {
+ if (!mir_tstrcmp(tmp, jid)) {
XmlNodeIq iq3(AddIQ(&CJabberProto::OnIqResultLastActivity, JABBER_IQ_TYPE_GET, tmp, JABBER_IQ_PARSE_FROM));
iq3 << XQUERY(JABBER_FEAT_LAST_ACTIVITY);
m_ThreadInfo->send(iq3);
diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp
index b83d3ef89c..a2ac93a80d 100644
--- a/protocols/JabberG/src/jabber_rc.cpp
+++ b/protocols/JabberG/src/jabber_rc.cpp
@@ -71,7 +71,7 @@ BOOL CJabberAdhocManager::HandleItemsRequest(HXML, CJabberIqInfo *pInfo, const T
if (!szNode || !m_pProto->m_options.EnableRemoteControl || !m_pProto->IsRcRequestAllowedByACL(pInfo))
return FALSE;
- if (!_tcscmp(szNode, JABBER_FEAT_COMMANDS)) {
+ if (!mir_tstrcmp(szNode, JABBER_FEAT_COMMANDS)) {
XmlNodeIq iq(_T("result"), pInfo);
HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_ITEMS) << XATTR(_T("node"), JABBER_FEAT_COMMANDS);
{
@@ -102,7 +102,7 @@ BOOL CJabberAdhocManager::HandleInfoRequest(HXML, CJabberIqInfo *pInfo, const TC
return FALSE;
// FIXME: same code twice
- if (!_tcscmp(szNode, JABBER_FEAT_COMMANDS)) {
+ if (!mir_tstrcmp(szNode, JABBER_FEAT_COMMANDS)) {
XmlNodeIq iq(_T("result"), pInfo);
HXML resultQuery = iq << XQUERY(JABBER_FEAT_DISCO_INFO) << XATTR(_T("node"), JABBER_FEAT_COMMANDS);
resultQuery << XCHILD(_T("identity")) << XATTR(_T("name"), _T("Ad-hoc commands"))
@@ -346,13 +346,13 @@ int CJabberProto::AdhocSetStatusHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhoc
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
int status;
- if (!_tcscmp(ptszValue, _T("away"))) status = ID_STATUS_AWAY;
- else if (!_tcscmp(ptszValue, _T("xa"))) status = ID_STATUS_NA;
- else if (!_tcscmp(ptszValue, _T("dnd"))) status = ID_STATUS_DND;
- else if (!_tcscmp(ptszValue, _T("chat"))) status = ID_STATUS_FREECHAT;
- else if (!_tcscmp(ptszValue, _T("online"))) status = ID_STATUS_ONLINE;
- else if (!_tcscmp(ptszValue, _T("invisible"))) status = ID_STATUS_INVISIBLE;
- else if (!_tcscmp(ptszValue, _T("offline"))) status = ID_STATUS_OFFLINE;
+ if (!mir_tstrcmp(ptszValue, _T("away"))) status = ID_STATUS_AWAY;
+ else if (!mir_tstrcmp(ptszValue, _T("xa"))) status = ID_STATUS_NA;
+ else if (!mir_tstrcmp(ptszValue, _T("dnd"))) status = ID_STATUS_DND;
+ else if (!mir_tstrcmp(ptszValue, _T("chat"))) status = ID_STATUS_FREECHAT;
+ else if (!mir_tstrcmp(ptszValue, _T("online"))) status = ID_STATUS_ONLINE;
+ else if (!mir_tstrcmp(ptszValue, _T("invisible"))) status = ID_STATUS_INVISIBLE;
+ else if (!mir_tstrcmp(ptszValue, _T("offline"))) status = ID_STATUS_OFFLINE;
else
return JABBER_ADHOC_HANDLER_STATUS_CANCEL;
@@ -763,7 +763,7 @@ int CJabberProto::AdhocLeaveGroupchatsHandler(HXML, CJabberIqInfo *pInfo, CJabbe
if (fieldNode) {
for (i=0; i < xmlGetChildCount(fieldNode); i++) {
HXML valueNode = xmlGetChild(fieldNode, i);
- if (valueNode && xmlGetName(valueNode) && xmlGetText(valueNode) && !_tcscmp(xmlGetName(valueNode), _T("value"))) {
+ if (valueNode && xmlGetName(valueNode) && xmlGetText(valueNode) && !mir_tstrcmp(xmlGetName(valueNode), _T("value"))) {
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_CHATROOM, xmlGetText(valueNode));
if (item)
GcQuit(item, 0, NULL);
diff --git a/protocols/JabberG/src/jabber_rc.h b/protocols/JabberG/src/jabber_rc.h
index 125bd796d2..a1c1eeb992 100644
--- a/protocols/JabberG/src/jabber_rc.h
+++ b/protocols/JabberG/src/jabber_rc.h
@@ -169,7 +169,7 @@ protected:
{
CJabberAdhocSession* pSession = m_pSessions;
while (pSession) {
- if (!_tcscmp(pSession->GetSessionId(), szSession))
+ if (!mir_tstrcmp(pSession->GetSessionId(), szSession))
return pSession;
pSession = pSession->GetNext();
}
@@ -192,7 +192,7 @@ protected:
{
CJabberAdhocNode* pNode = m_pNodes;
while (pNode) {
- if (!_tcscmp(pNode->GetNode(), szNode))
+ if (!mir_tstrcmp(pNode->GetNode(), szNode))
return pNode;
pNode = pNode->GetNext();
}
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 7e55a4e57b..917a0af363 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -680,29 +680,29 @@ void CJabberProto::OnProcessFeatures(HXML node, ThreadData *info)
if (!n)
break;
- if (!_tcscmp(xmlGetName(n), _T("starttls"))) {
+ if (!mir_tstrcmp(xmlGetName(n), _T("starttls"))) {
if (!info->conn.useSSL && m_options.UseTLS) {
debugLogA("Requesting TLS");
info->send(XmlNode(xmlGetName(n)) << XATTR(_T("xmlns"), _T("urn:ietf:params:xml:ns:xmpp-tls")));
return;
} }
- if (!_tcscmp(xmlGetName(n), _T("compression")) && m_options.EnableZlib == TRUE) {
+ if (!mir_tstrcmp(xmlGetName(n), _T("compression")) && m_options.EnableZlib == TRUE) {
debugLogA("Server compression available");
for (int k = 0;; k++) {
HXML c = xmlGetChild(n, k);
if (!c)
break;
- if (!_tcscmp(xmlGetName(c), _T("method"))) {
- if (!_tcscmp(xmlGetText(c), _T("zlib")) && info->zlibInit() == TRUE) {
+ if (!mir_tstrcmp(xmlGetName(c), _T("method"))) {
+ if (!mir_tstrcmp(xmlGetText(c), _T("zlib")) && info->zlibInit() == TRUE) {
debugLogA("Requesting Zlib compression");
info->send(XmlNode(_T("compress")) << XATTR(_T("xmlns"), _T("http://jabber.org/protocol/compress"))
<< XCHILD(_T("method"), _T("zlib")));
return;
} } } }
- if (!_tcscmp(xmlGetName(n), _T("mechanisms"))) {
+ if (!mir_tstrcmp(xmlGetName(n), _T("mechanisms"))) {
m_AuthMechs.isPlainAvailable = false;
m_AuthMechs.isPlainOldAvailable = false;
m_AuthMechs.isMd5Available = false;
@@ -719,16 +719,16 @@ void CJabberProto::OnProcessFeatures(HXML node, ThreadData *info)
if (!c)
break;
- if (!_tcscmp(xmlGetName(c), _T("mechanism"))) {
+ if (!mir_tstrcmp(xmlGetName(c), _T("mechanism"))) {
LPCTSTR ptszMechanism = xmlGetText(c);
- if (!_tcscmp(ptszMechanism, _T("PLAIN"))) m_AuthMechs.isPlainOldAvailable = m_AuthMechs.isPlainAvailable = true;
- else if (!_tcscmp(ptszMechanism, _T("DIGEST-MD5"))) m_AuthMechs.isMd5Available = true;
- else if (!_tcscmp(ptszMechanism, _T("SCRAM-SHA-1"))) m_AuthMechs.isScramAvailable = true;
- else if (!_tcscmp(ptszMechanism, _T("NTLM"))) m_AuthMechs.isNtlmAvailable = true;
- else if (!_tcscmp(ptszMechanism, _T("GSS-SPNEGO"))) m_AuthMechs.isSpnegoAvailable = true;
- else if (!_tcscmp(ptszMechanism, _T("GSSAPI"))) m_AuthMechs.isKerberosAvailable = true;
+ if (!mir_tstrcmp(ptszMechanism, _T("PLAIN"))) m_AuthMechs.isPlainOldAvailable = m_AuthMechs.isPlainAvailable = true;
+ else if (!mir_tstrcmp(ptszMechanism, _T("DIGEST-MD5"))) m_AuthMechs.isMd5Available = true;
+ else if (!mir_tstrcmp(ptszMechanism, _T("SCRAM-SHA-1"))) m_AuthMechs.isScramAvailable = true;
+ else if (!mir_tstrcmp(ptszMechanism, _T("NTLM"))) m_AuthMechs.isNtlmAvailable = true;
+ else if (!mir_tstrcmp(ptszMechanism, _T("GSS-SPNEGO"))) m_AuthMechs.isSpnegoAvailable = true;
+ else if (!mir_tstrcmp(ptszMechanism, _T("GSSAPI"))) m_AuthMechs.isKerberosAvailable = true;
}
- else if (!_tcscmp(xmlGetName(c), _T("hostname"))) {
+ else if (!mir_tstrcmp(xmlGetName(c), _T("hostname"))) {
const TCHAR *mech = xmlGetAttrValue(c, _T("mechanism"));
if (mech && _tcsicmp(mech, _T("GSSAPI")) == 0) {
m_AuthMechs.m_gssapiHostName = mir_tstrdup(xmlGetText(c));
@@ -736,9 +736,9 @@ void CJabberProto::OnProcessFeatures(HXML node, ThreadData *info)
}
}
}
- else if (!_tcscmp(xmlGetName(n), _T("register"))) isRegisterAvailable = true;
- else if (!_tcscmp(xmlGetName(n), _T("auth"))) m_AuthMechs.isAuthAvailable = true;
- else if (!_tcscmp(xmlGetName(n), _T("session"))) m_AuthMechs.isSessionAvailable = true;
+ else if (!mir_tstrcmp(xmlGetName(n), _T("register"))) isRegisterAvailable = true;
+ else if (!mir_tstrcmp(xmlGetName(n), _T("auth"))) m_AuthMechs.isAuthAvailable = true;
+ else if (!mir_tstrcmp(xmlGetName(n), _T("session"))) m_AuthMechs.isSessionAvailable = true;
}
if (areMechanismsDefined) {
@@ -771,7 +771,7 @@ void CJabberProto::OnProcessFailure(HXML node, ThreadData *info)
const TCHAR *type;
//failure xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\"
if ((type = xmlGetAttrValue(node, _T("xmlns"))) == NULL) return;
- if (!_tcscmp(type, _T("urn:ietf:params:xml:ns:xmpp-sasl"))) {
+ if (!mir_tstrcmp(type, _T("urn:ietf:params:xml:ns:xmpp-sasl"))) {
PerformAuthentication(info);
}
}
@@ -801,9 +801,9 @@ void CJabberProto::OnProcessError(HXML node, ThreadData *info)
else
pos += mir_sntprintf(buff + pos, 1024 - pos, _T("%s\r\n"), name);
- if (!_tcscmp(name, _T("conflict")))
+ if (!mir_tstrcmp(name, _T("conflict")))
ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_OTHERLOCATION);
- else if (!_tcscmp(name, _T("see-other-host"))) {
+ else if (!mir_tstrcmp(name, _T("see-other-host"))) {
skipMsg = true;
}
}
@@ -821,7 +821,7 @@ void CJabberProto::OnProcessSuccess(HXML node, ThreadData *info)
if ((type = xmlGetAttrValue(node, _T("xmlns"))) == NULL)
return;
- if (!_tcscmp(type, _T("urn:ietf:params:xml:ns:xmpp-sasl"))) {
+ if (!mir_tstrcmp(type, _T("urn:ietf:params:xml:ns:xmpp-sasl"))) {
if (!info->auth->validateLogin(xmlGetText(node))) {
info->send("</stream:stream>");
return;
@@ -1025,7 +1025,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info)
{
HXML xNode, n;
- if (!xmlGetName(node) || _tcscmp(xmlGetName(node), _T("message")))
+ if (!xmlGetName(node) || mir_tstrcmp(xmlGetName(node), _T("message")))
return;
LPCTSTR from, type = xmlGetAttrValue(node, _T("type"));
@@ -1193,11 +1193,11 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info)
if (ptszXmlns == NULL)
continue;
- if (!_tcscmp(ptszXmlns, JABBER_FEAT_MIRANDA_NOTES)) {
+ if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_MIRANDA_NOTES)) {
if (OnIncomingNote(from, xmlGetChild(xNode, "note")))
return;
}
- else if (!_tcscmp(ptszXmlns, _T("jabber:x:encrypted"))) {
+ else if (!mir_tstrcmp(ptszXmlns, _T("jabber:x:encrypted"))) {
LPCTSTR ptszText = xmlGetText(xNode);
if (ptszText == NULL)
return;
@@ -1209,12 +1209,12 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info)
mir_sntprintf(tempstring, len, _T("%s%s%s"), prolog, ptszText, epilog);
szMessage = tempstring;
}
- else if (!_tcscmp(ptszXmlns, JABBER_FEAT_DELAY) && msgTime == 0) {
+ else if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_DELAY) && msgTime == 0) {
const TCHAR *ptszTimeStamp = xmlGetAttrValue(xNode, _T("stamp"));
if (ptszTimeStamp != NULL)
msgTime = JabberIsoToUnixTime(ptszTimeStamp);
}
- else if (!_tcscmp(ptszXmlns, JABBER_FEAT_MESSAGE_EVENTS)) {
+ else if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_MESSAGE_EVENTS)) {
// set events support only if we discovered caps and if events not already set
JabberCapsBits jcbCaps = GetResourceCapabilites(from, TRUE);
@@ -1262,7 +1262,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info)
}
}
}
- else if (!_tcscmp(ptszXmlns, JABBER_FEAT_OOB2)) {
+ else if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_OOB2)) {
LPCTSTR ptszUrl = xmlGetText(xmlGetChild(xNode, "url"));
if (ptszUrl != NULL && *ptszUrl) {
size_t cbLen = (szMessage ? mir_tstrlen(szMessage) : 0) + mir_tstrlen(ptszUrl) + 32;
@@ -1275,7 +1275,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info)
szMessage = szTmp;
}
}
- else if (!_tcscmp(ptszXmlns, JABBER_FEAT_MUC_USER)) {
+ else if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_MUC_USER)) {
HXML inviteNode = xmlGetChild(xNode, _T("invite"));
if (inviteNode != NULL) {
inviteFromJid = xmlGetAttrValue(inviteNode, _T("from"));
@@ -1287,7 +1287,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info)
isChatRoomInvitation = true;
invitePassword = xmlGetText(xmlGetChild(xNode, "password"));
}
- else if (!_tcscmp(ptszXmlns, JABBER_FEAT_ROSTER_EXCHANGE) &&
+ else if (!mir_tstrcmp(ptszXmlns, JABBER_FEAT_ROSTER_EXCHANGE) &&
item != NULL && (item->subscription == SUB_BOTH || item->subscription == SUB_TO)) {
TCHAR chkJID[JABBER_MAX_JID_LEN] = _T("@");
JabberStripJid(from, chkJID + 1, SIZEOF(chkJID) - 1);
@@ -1301,12 +1301,12 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info)
const TCHAR *nick = xmlGetAttrValue(iNode, _T("name"));
const TCHAR *group = xmlGetText(xmlGetChild(iNode, _T("group")));
if (action && jid && _tcsstr(jid, chkJID)) {
- if (!_tcscmp(action, _T("add"))) {
+ if (!mir_tstrcmp(action, _T("add"))) {
MCONTACT hContact = DBCreateContact(jid, nick, FALSE, FALSE);
if (group)
db_set_ts(hContact, "CList", "Group", group);
}
- else if (!_tcscmp(action, _T("delete"))) {
+ else if (!mir_tstrcmp(action, _T("delete"))) {
MCONTACT hContact = HContactFromJID(jid);
if (hContact)
CallService(MS_DB_CONTACT_DELETE, hContact, 0);
@@ -1314,7 +1314,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info)
}
}
}
- else if (!isChatRoomInvitation && !_tcscmp(ptszXmlns, JABBER_FEAT_DIRECT_MUC_INVITE)) {
+ else if (!isChatRoomInvitation && !mir_tstrcmp(ptszXmlns, JABBER_FEAT_DIRECT_MUC_INVITE)) {
inviteRoomJid = xmlGetAttrValue(xNode, _T("jid"));
inviteFromJid = from;
if (inviteReason == NULL)
@@ -1479,7 +1479,7 @@ void CJabberProto::UpdateJidDbSettings(const TCHAR *jid)
void CJabberProto::OnProcessPresence(HXML node, ThreadData *info)
{
- if (!node || !xmlGetName(node) || _tcscmp(xmlGetName(node), _T("presence")))
+ if (!node || !xmlGetName(node) || mir_tstrcmp(xmlGetName(node), _T("presence")))
return;
LPCTSTR from = xmlGetAttrValue(node, _T("from"));
@@ -1504,7 +1504,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info)
bSelfPresence = TRUE;
LPCTSTR type = xmlGetAttrValue(node, _T("type"));
- if (type == NULL || !_tcscmp(type, _T("available"))) {
+ if (type == NULL || !mir_tstrcmp(type, _T("available"))) {
ptrT nick(JabberNickFromJID(from));
if (nick == NULL)
return;
@@ -1524,10 +1524,10 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info)
int status = ID_STATUS_ONLINE;
if (HXML showNode = xmlGetChild(node, "show")) {
if (LPCTSTR show = xmlGetText(showNode)) {
- if (!_tcscmp(show, _T("away"))) status = ID_STATUS_AWAY;
- else if (!_tcscmp(show, _T("xa"))) status = ID_STATUS_NA;
- else if (!_tcscmp(show, _T("dnd"))) status = ID_STATUS_DND;
- else if (!_tcscmp(show, _T("chat"))) status = ID_STATUS_FREECHAT;
+ if (!mir_tstrcmp(show, _T("away"))) status = ID_STATUS_AWAY;
+ else if (!mir_tstrcmp(show, _T("xa"))) status = ID_STATUS_NA;
+ else if (!mir_tstrcmp(show, _T("dnd"))) status = ID_STATUS_DND;
+ else if (!mir_tstrcmp(show, _T("chat"))) status = ID_STATUS_FREECHAT;
}
}
@@ -1600,7 +1600,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info)
return;
}
- if (!_tcscmp(type, _T("unavailable"))) {
+ if (!mir_tstrcmp(type, _T("unavailable"))) {
hContact = HContactFromJID(from);
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, from);
if (item != NULL) {
@@ -1631,7 +1631,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info)
return;
}
- if (!_tcscmp(type, _T("subscribe"))) {
+ if (!mir_tstrcmp(type, _T("subscribe"))) {
if (hContact = HContactFromJID(from))
AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_SUBSCRIBE);
@@ -1669,19 +1669,19 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info)
return;
}
- if (!_tcscmp(type, _T("unsubscribe")))
+ if (!mir_tstrcmp(type, _T("unsubscribe")))
if (hContact = HContactFromJID(from))
AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_UNSUBSCRIBE);
- if (!_tcscmp(type, _T("unsubscribed")))
+ if (!mir_tstrcmp(type, _T("unsubscribed")))
if (hContact = HContactFromJID(from))
AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_UNSUBSCRIBED);
- if (!_tcscmp(type, _T("error")))
+ if (!mir_tstrcmp(type, _T("error")))
if (hContact = HContactFromJID(from))
AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_ERROR);
- if (!_tcscmp(type, _T("subscribed"))) {
+ if (!mir_tstrcmp(type, _T("subscribed"))) {
if (hContact = HContactFromJID(from))
AddDbPresenceEvent(hContact, JABBER_DB_EVENT_PRESENCE_SUBSCRIBED);
@@ -1736,11 +1736,11 @@ BOOL CJabberProto::OnProcessJingle(HXML node)
if (child) {
if ((type = xmlGetAttrValue(node, _T("type"))) == NULL) return FALSE;
- if ((!_tcscmp(type, _T("get")) || !_tcscmp(type, _T("set")))) {
+ if ((!mir_tstrcmp(type, _T("get")) || !mir_tstrcmp(type, _T("set")))) {
LPCTSTR szAction = xmlGetAttrValue(child, _T("action"));
LPCTSTR idStr = xmlGetAttrValue(node, _T("id"));
LPCTSTR from = xmlGetAttrValue(node, _T("from"));
- if (szAction && !_tcscmp(szAction, _T("session-initiate"))) {
+ if (szAction && !mir_tstrcmp(szAction, _T("session-initiate"))) {
// if this is a Jingle 'session-initiate' and noone processed it yet, reply with "unsupported-applications"
m_ThreadInfo->send(XmlNodeIq(_T("result"), idStr, from));
@@ -1780,7 +1780,7 @@ void CJabberProto::OnProcessIq(HXML node)
HXML queryNode;
const TCHAR *type, *xmlns;
- if (!xmlGetName(node) || _tcscmp(xmlGetName(node), _T("iq"))) return;
+ if (!xmlGetName(node) || mir_tstrcmp(xmlGetName(node), _T("iq"))) return;
if ((type = xmlGetAttrValue(node, _T("type"))) == NULL) return;
int id = JabberGetPacketID(node);
@@ -1801,7 +1801,7 @@ void CJabberProto::OnProcessIq(HXML node)
return;
// RECVED: <iq type='error'> ...
- if (!_tcscmp(type, _T("error"))) {
+ if (!mir_tstrcmp(type, _T("error"))) {
TCHAR tszBuf[20];
_itot(id, tszBuf, 10);
@@ -1818,7 +1818,7 @@ void CJabberProto::OnProcessIq(HXML node)
}
}
}
- else if ((!_tcscmp(type, _T("get")) || !_tcscmp(type, _T("set")))) {
+ else if ((!mir_tstrcmp(type, _T("get")) || !mir_tstrcmp(type, _T("set")))) {
XmlNodeIq iq(_T("error"), id, xmlGetAttrValue(node, _T("from")));
HXML pFirstChild = xmlGetChild(node, 0);
@@ -1835,12 +1835,12 @@ void CJabberProto::OnProcessRegIq(HXML node, ThreadData *info)
{
const TCHAR *type;
- if (!xmlGetName(node) || _tcscmp(xmlGetName(node), _T("iq"))) return;
+ if (!xmlGetName(node) || mir_tstrcmp(xmlGetName(node), _T("iq"))) return;
if ((type = xmlGetAttrValue(node, _T("type"))) == NULL) return;
int id = JabberGetPacketID(node);
- if (!_tcscmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
// RECVED: result of the request for registration mechanism
// ACTION: send account registration information
if (id == iqIdRegGetReg) {
@@ -1863,7 +1863,7 @@ void CJabberProto::OnProcessRegIq(HXML node, ThreadData *info)
}
}
- else if (!_tcscmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, _T("error"))) {
TCHAR *str = JabberErrorMsg(xmlGetChild(node, "error"));
SendMessage(info->conn.reg_hwndDlg, WM_JABBER_REGDLG_UPDATE, 100, (LPARAM)str);
mir_free(str);
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp
index 73bc6a6cc8..8017aa59ec 100644
--- a/protocols/JabberG/src/jabber_util.cpp
+++ b/protocols/JabberG/src/jabber_util.cpp
@@ -310,7 +310,7 @@ TCHAR* __stdcall JabberErrorMsg(HXML errorNode, int* pErrorCode)
HXML c = xmlGetChild(errorNode, i);
if (c == NULL) break;
const TCHAR *attr = xmlGetAttrValue(c, _T("xmlns"));
- if (attr && !_tcscmp(attr, _T("urn:ietf:params:xml:ns:xmpp-stanzas"))) {
+ if (attr && !mir_tstrcmp(attr, _T("urn:ietf:params:xml:ns:xmpp-stanzas"))) {
str = xmlGetName(c);
break;
}
@@ -617,10 +617,10 @@ TCHAR* __stdcall JabberStripJid(const TCHAR *jid, TCHAR *dest, size_t destLen)
LPCTSTR __stdcall JabberGetPictureType(HXML node, const char *picBuf)
{
if (LPCTSTR ptszType = xmlGetText(xmlGetChild(node, "TYPE")))
- if (!_tcscmp(ptszType, _T("image/jpeg")) ||
- !_tcscmp(ptszType, _T("image/png")) ||
- !_tcscmp(ptszType, _T("image/gif")) ||
- !_tcscmp(ptszType, _T("image/bmp")))
+ if (!mir_tstrcmp(ptszType, _T("image/jpeg")) ||
+ !mir_tstrcmp(ptszType, _T("image/png")) ||
+ !mir_tstrcmp(ptszType, _T("image/gif")) ||
+ !mir_tstrcmp(ptszType, _T("image/bmp")))
return ptszType;
switch (ProtoGetBufferFormat(picBuf)) {
@@ -914,7 +914,7 @@ bool CJabberProto::IsMyOwnJID(LPCTSTR szJID)
if (pDelimiter)
*pDelimiter = 0;
- return _tcscmp(szFrom, szTo) == 0;
+ return mir_tstrcmp(szFrom, szTo) == 0;
}
void __cdecl CJabberProto::LoadHttpAvatars(void* param)
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp
index 9aded8f3e3..0bbcf35434 100644
--- a/protocols/JabberG/src/jabber_xstatus.cpp
+++ b/protocols/JabberG/src/jabber_xstatus.cpp
@@ -638,7 +638,7 @@ void CPepMood::ProcessItems(const TCHAR *from, HXML itemsNode)
LPCTSTR moodType = NULL, moodText = NULL;
for (int i=0; n = xmlGetChild(moodNode, i); i++) {
- if (!_tcscmp(xmlGetName(n), _T("text")))
+ if (!mir_tstrcmp(xmlGetName(n), _T("text")))
moodText = xmlGetText(n);
else
moodType = xmlGetName(n);
diff --git a/protocols/JabberG/src/obsoleted/jabber_form2.cpp b/protocols/JabberG/src/obsoleted/jabber_form2.cpp
index 02400de029..6881d08db3 100644
--- a/protocols/JabberG/src/obsoleted/jabber_form2.cpp
+++ b/protocols/JabberG/src/obsoleted/jabber_form2.cpp
@@ -580,7 +580,7 @@ public:
WS_CHILD|WS_VISIBLE|WS_TABSTOP|BS_AUTOCHECKBOX|BS_MULTILINE,
0, 0, 0, 0,
m_parent->GetHwnd(), (HMENU)m_id, hInst, NULL);
- if (m_field->GetValue() && !_tcscmp(m_field->GetValue(), _T("1")))
+ if (m_field->GetValue() && !mir_tstrcmp(m_field->GetValue(), _T("1")))
SendMessage(m_hwnd, BM_SETCHECK, 1, 0);
}
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp
index 044df17ff4..3d0ca4267f 100644
--- a/protocols/MRA/src/Mra_svcs.cpp
+++ b/protocols/MRA/src/Mra_svcs.cpp
@@ -644,7 +644,7 @@ int CMraProto::OnGroupChanged(WPARAM hContact, LPARAM lParam)
MraGroupItem *pGrp = NULL;
for (int i = 0; i < m_groups.getCount(); i++) {
MraGroupItem &p = m_groups[i];
- if (!_tcscmp(p.m_name, cgc->pszOldName)) {
+ if (!mir_tstrcmp(p.m_name, cgc->pszOldName)) {
pGrp = &p;
break;
}
diff --git a/protocols/MSN/src/msn.cpp b/protocols/MSN/src/msn.cpp
index d12430d914..de2f5bfb3c 100644
--- a/protocols/MSN/src/msn.cpp
+++ b/protocols/MSN/src/msn.cpp
@@ -62,7 +62,7 @@ int MSN_GCMenuHook(WPARAM wParam, LPARAM lParam);
// Protocol instances
static int sttCompareProtocols(const CMsnProto *p1, const CMsnProto *p2)
{
- return _tcscmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
OBJLIST<CMsnProto> g_Instances(1, sttCompareProtocols);
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp
index 0e8926f27d..b7d5bf52ab 100644
--- a/protocols/MSN/src/msn_chat.cpp
+++ b/protocols/MSN/src/msn_chat.cpp
@@ -581,7 +581,7 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam)
case 40:
{
const TCHAR *pszRole = MSN_GCGetRole(MSN_GetThreadByChatId(gch->pDest->ptszID), _T2A(gch->ptszUID));
- MSN_Promoteuser(gch, (pszRole && !_tcscmp(pszRole, _T("admin")))?"user":"admin");
+ MSN_Promoteuser(gch, (pszRole && !mir_tstrcmp(pszRole, _T("admin")))?"user":"admin");
break;
}
case 110:
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp
index b073dadd40..4a92c04457 100644
--- a/protocols/MSN/src/msn_opts.cpp
+++ b/protocols/MSN/src/msn_opts.cpp
@@ -249,7 +249,7 @@ LBL_Continue:
GetDlgItemText(hwndDlg, IDC_HANDLE2, screenStr, SIZEOF(screenStr));
if (!proto->getTString("Nick", &dbv)) {
- if (_tcscmp(dbv.ptszVal, screenStr))
+ if (mir_tstrcmp(dbv.ptszVal, screenStr))
proto->MSN_SendNickname(screenStr);
db_free(&dbv);
}
diff --git a/protocols/Omegle/src/main.cpp b/protocols/Omegle/src/main.cpp
index bc4ce92aaf..603b1ff1f3 100644
--- a/protocols/Omegle/src/main.cpp
+++ b/protocols/Omegle/src/main.cpp
@@ -49,7 +49,7 @@ PLUGININFOEX pluginInfo = {
// Protocol instances
static int compare_protos(const OmegleProto *p1, const OmegleProto *p2)
{
- return _tcscmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
OBJLIST<OmegleProto> g_Instances(1, compare_protos);
diff --git a/protocols/Sametime/src/conference.cpp b/protocols/Sametime/src/conference.cpp
index b4b242be44..a34be253cf 100644
--- a/protocols/Sametime/src/conference.cpp
+++ b/protocols/Sametime/src/conference.cpp
@@ -354,7 +354,7 @@ int CSametimeProto::GcEventHook(WPARAM wParam, LPARAM lParam) {
conferences = conf = mwServiceConference_getConferences(service_conference);
for (;conf;conf = conf->next) {
TCHAR* tszConfId = mir_utf8decodeT(mwConference_getName((mwConference*)conf->data));
- if (_tcscmp(gch->pDest->ptszID, tszConfId) == 0) {
+ if (mir_tstrcmp(gch->pDest->ptszID, tszConfId) == 0) {
switch(gch->pDest->iType) {
case GC_USER_MESSAGE:
diff --git a/protocols/SkypeClassic/src/alogon.cpp b/protocols/SkypeClassic/src/alogon.cpp
index 9ea57b5db6..3eedadc637 100644
--- a/protocols/SkypeClassic/src/alogon.cpp
+++ b/protocols/SkypeClassic/src/alogon.cpp
@@ -30,7 +30,7 @@ static HWND findWindow(HWND parent, const TCHAR* childClassName)
// Get child window
// This window is not combo box or edit box
HWND wnd = GetWindow(parent, GW_CHILD);
- while (wnd != NULL && _tcscmp(getClassName(wnd), childClassName) != 0)
+ while (wnd != NULL && mir_tstrcmp(getClassName(wnd), childClassName) != 0)
wnd = GetWindow(wnd, GW_HWNDNEXT);
return wnd;
@@ -42,8 +42,8 @@ static BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
GetWindowThreadProcessId(hWnd, &dwPID);
if (lParam != 0 && dwPID != (DWORD)lParam) return TRUE;
const TCHAR *lpszClassName = getClassName(hWnd);
- if (_tcscmp(lpszClassName, _T("tSkMainForm.UnicodeClass")) == 0 ||
- _tcscmp(lpszClassName, _T("TLoginForm.UnicodeClass")) == 0)
+ if (mir_tstrcmp(lpszClassName, _T("tSkMainForm.UnicodeClass")) == 0 ||
+ mir_tstrcmp(lpszClassName, _T("TLoginForm.UnicodeClass")) == 0)
{
HWND loginControl = GetWindow(hWnd, GW_CHILD);
@@ -55,7 +55,7 @@ static BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam)
LOG(("TLoginControl = %S", getClassName(loginControl)));
// Check for login control
- if (_tcscmp(getClassName(loginControl), _T("TLoginControl")) == 0)
+ if (mir_tstrcmp(getClassName(loginControl), _T("TLoginControl")) == 0)
{
// Find user name window
HWND userName = findWindow(loginControl, _T("TNavigableTntComboBox.UnicodeClass"));
diff --git a/protocols/SkypeClassic/src/contacts.cpp b/protocols/SkypeClassic/src/contacts.cpp
index ed10c5d43a..2e00d5750a 100644
--- a/protocols/SkypeClassic/src/contacts.cpp
+++ b/protocols/SkypeClassic/src/contacts.cpp
@@ -346,7 +346,7 @@ MCONTACT find_contactT(TCHAR *name)
if (db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0) == 0)
{
if (db_get_ts(hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) continue;
- tCompareResult = _tcscmp(dbv.ptszVal, name);
+ tCompareResult = mir_tstrcmp(dbv.ptszVal, name);
db_free(&dbv);
if (tCompareResult) continue;
return hContact; // already there, return handle
diff --git a/protocols/SkypeClassic/src/gchat.cpp b/protocols/SkypeClassic/src/gchat.cpp
index e59785a5e3..2d29dd6b86 100644
--- a/protocols/SkypeClassic/src/gchat.cpp
+++ b/protocols/SkypeClassic/src/gchat.cpp
@@ -42,7 +42,7 @@ static CRITICAL_SECTION m_GCMutex;
*/
gchat_contacts *GetChat(const TCHAR *szChatId) {
for (int i=0;i<chatcount;i++)
- if (!_tcscmp(chats[i].szChatName, szChatId))
+ if (!mir_tstrcmp(chats[i].szChatName, szChatId))
return &chats[i];
gchat_contacts *pchats = (gchat_contacts *)realloc(chats, sizeof(gchat_contacts)*(++chatcount));
@@ -62,7 +62,7 @@ gchat_contacts *GetChat(const TCHAR *szChatId) {
*/
void RemChat(TCHAR *szChatId) {
for (int i=0;i<chatcount;i++)
- if (!_tcscmp(chats[i].szChatName, szChatId)) {
+ if (!mir_tstrcmp(chats[i].szChatName, szChatId)) {
if (chats[i].szChatName) free(chats[i].szChatName);
if (chats[i].mJoinedContacts) free(chats[i].mJoinedContacts);
if (i<--chatcount) memmove(&chats[i], &chats[i+1], (chatcount-i)*sizeof(gchat_contacts));
@@ -83,7 +83,7 @@ void RemChat(TCHAR *szChatId) {
*/
static int ExistsChatContact(gchat_contacts *gc, const TCHAR *who) {
for (int i=0;i<gc->mJoinedCount;i++)
- if (_tcscmp(gc->mJoinedContacts[i].who, who)==0)
+ if (mir_tstrcmp(gc->mJoinedContacts[i].who, who)==0)
return i;
return -1;
}
@@ -153,7 +153,7 @@ void RemChatContact(gchat_contacts *gc, const TCHAR *who) {
if (!gc)
return;
for (int i=0;i<gc->mJoinedCount;i++)
- if (_tcscmp(gc->mJoinedContacts[i].who, who)==0) {
+ if (mir_tstrcmp(gc->mJoinedContacts[i].who, who)==0) {
if (i<--gc->mJoinedCount)
memmove(&gc->mJoinedContacts[i], &gc->mJoinedContacts[i+1], (gc->mJoinedCount-i)*sizeof(gchat_contact));
if (gc->mJoinedCount) gc->mJoinedContacts = (gchat_contact*)realloc(gc->mJoinedContacts, sizeof(gchat_contact)*gc->mJoinedCount);
@@ -168,7 +168,7 @@ MCONTACT find_chat(LPCTSTR chatname) {
{
DBVARIANT dbv;
if (!db_get_ts(hContact, SKYPE_PROTONAME, "ChatRoomID", &dbv)) {
- int tCompareResult = _tcscmp(dbv.ptszVal, chatname);
+ int tCompareResult = mir_tstrcmp(dbv.ptszVal, chatname);
db_free(&dbv);
if (!tCompareResult)
return hContact; // already there, return handle
@@ -768,7 +768,7 @@ int __cdecl GCMenuHook(WPARAM,LPARAM lParam) {
else {
TCHAR *szChatRole;
if (szChatRole = SkypeGetT ("CHAT", gcmi->pszID, "MYROLE")) {
- if (_tcscmp(szChatRole, _T("MASTER")) && _tcscmp(szChatRole, _T("CREATOR")))
+ if (mir_tstrcmp(szChatRole, _T("MASTER")) && mir_tstrcmp(szChatRole, _T("CREATOR")))
Item_nicklist[2].bDisabled = TRUE;
free (szChatRole);
}
diff --git a/protocols/SkypeWeb/src/skype_accounts.cpp b/protocols/SkypeWeb/src/skype_accounts.cpp
index 41eda172b0..afb741ac6a 100644
--- a/protocols/SkypeWeb/src/skype_accounts.cpp
+++ b/protocols/SkypeWeb/src/skype_accounts.cpp
@@ -21,7 +21,7 @@ LIST<CSkypeProto> Accounts(1, CSkypeProto::CompareAccounts);
int CSkypeProto::CompareAccounts(const CSkypeProto *p1, const CSkypeProto *p2)
{
- return _tcscmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
CSkypeProto* CSkypeProto::InitAccount(const char *protoName, const wchar_t *userName)
diff --git a/protocols/Twitter/src/main.cpp b/protocols/Twitter/src/main.cpp
index a35ee2916e..2238b60f10 100644
--- a/protocols/Twitter/src/main.cpp
+++ b/protocols/Twitter/src/main.cpp
@@ -46,7 +46,7 @@ PLUGININFOEX pluginInfo = {
static int compare_protos(const TwitterProto *p1, const TwitterProto *p2)
{
- return _tcscmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
OBJLIST<TwitterProto> g_Instances(1, compare_protos);
diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp
index c38dbcd839..78f417c487 100644
--- a/protocols/VKontakte/src/vk_options.cpp
+++ b/protocols/VKontakte/src/vk_options.cpp
@@ -174,7 +174,7 @@ INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
ppro->setTString("Login", str);
GetDlgItemText(hwndDlg, IDC_GROUPNAME, str, SIZEOF(str));
- if (_tcscmp(ppro->getGroup(), str)) {
+ if (mir_tstrcmp(ppro->getGroup(), str)) {
ppro->setGroup(str);
ppro->setTString("ProtoGroup", str);
}
diff --git a/protocols/WhatsApp/src/main.cpp b/protocols/WhatsApp/src/main.cpp
index 99b3fb1811..f199a94d3e 100644
--- a/protocols/WhatsApp/src/main.cpp
+++ b/protocols/WhatsApp/src/main.cpp
@@ -26,7 +26,7 @@ PLUGININFOEX pluginInfo = {
static int compare_protos(const WhatsAppProto *p1, const WhatsAppProto *p2)
{
- return _tcscmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
OBJLIST<WhatsAppProto> g_Instances(1, compare_protos);