diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 12:49:22 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 12:49:22 +0000 |
commit | b280d2eae93fb22b4fdb45218d8a06287a97030e (patch) | |
tree | f4e0d9921a57bafdb608a55a107bad3408b8f909 /protocols/JabberG | |
parent | 159b565b390687258ee65a3b66596e118752063c (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/JabberG')
24 files changed, 164 insertions, 164 deletions
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);
}
|