diff options
Diffstat (limited to 'protocols/JabberG/src')
37 files changed, 222 insertions, 222 deletions
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index 77b373cada..65a5506111 100644 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -73,7 +73,7 @@ int bSecureIM, bMirOTR, bNewGPG, bPlatform; // Protocol instances
static int sttCompareProtocols(const CJabberProto *p1, const CJabberProto *p2)
{
- return lstrcmp(p1->m_tszUserName, p2->m_tszUserName);
+ return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName);
}
LIST<CJabberProto> g_Instances(1, sttCompareProtocols);
diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp index 6d28b2d30f..fc58e02e47 100644 --- a/protocols/JabberG/src/jabber_adhoc.cpp +++ b/protocols/JabberG/src/jabber_adhoc.cpp @@ -213,7 +213,7 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA const TCHAR *type;
if ((type = xmlGetAttrValue(workNode, _T("type"))) == NULL) return TRUE;
- if (!lstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
// wParam = <iq/> node from responder as a result of command execution
HXML commandNode, xNode;
if ((commandNode = xmlGetChild(dat->AdHocNode, _T("command"))) == NULL)
@@ -269,7 +269,7 @@ int CJabberProto::AdHoc_OnJAHMProcessResult(HWND hwndDlg, HXML workNode, JabberA SetWindowText(GetDlgItem(hwndDlg, IDCANCEL), TranslateT("Done"));
}
}
- else if (!lstrcmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, _T("error"))) {
// error occurred here
int toHide[] = { IDC_FRAME, IDC_FRAME_TEXT, IDC_VSCROLL, IDC_PREV, IDC_NEXT, IDC_COMPLETE, IDC_SUBMIT, 0};
sttShowControls(hwndDlg, FALSE, toHide);
diff --git a/protocols/JabberG/src/jabber_agent.cpp b/protocols/JabberG/src/jabber_agent.cpp index c8be23a38d..0fdb48fb5f 100644 --- a/protocols/JabberG/src/jabber_agent.cpp +++ b/protocols/JabberG/src/jabber_agent.cpp @@ -167,13 +167,13 @@ public: break;
if (xmlGetName(n)) {
- if (!lstrcmp(xmlGetName(n), _T("instructions"))) {
+ if (!mir_tstrcmp(xmlGetName(n), _T("instructions"))) {
JabberFormSetInstruction(m_hwnd, xmlGetText(n));
}
- else if (!lstrcmp(xmlGetName(n), _T("key")) || !lstrcmp(xmlGetName(n), _T("registered"))) {
+ else if (!mir_tstrcmp(xmlGetName(n), _T("key")) || !mir_tstrcmp(xmlGetName(n), _T("registered"))) {
// do nothing
}
- else if (!lstrcmp(xmlGetName(n), _T("password")))
+ else if (!mir_tstrcmp(xmlGetName(n), _T("password")))
JabberFormAppendControl(hFrame, layout_info, JFORM_CTYPE_TEXT_PRIVATE, xmlGetName(n), xmlGetText(n));
else // everything else is a normal text field
JabberFormAppendControl(hFrame, layout_info, JFORM_CTYPE_TEXT_SINGLE, xmlGetName(n), xmlGetText(n));
@@ -251,14 +251,14 @@ public: break;
if (xmlGetName(n)) {
- if (!lstrcmp(xmlGetName(n), _T("key"))) {
+ if (!mir_tstrcmp(xmlGetName(n), _T("key"))) {
// field that must be passed along with the registration
if (xmlGetText(n))
xmlAddChild(query, xmlGetName(n), xmlGetText(n));
else
xmlAddChild(query, xmlGetName(n));
}
- else if (!lstrcmp(xmlGetName(n), _T("registered")) || !lstrcmp(xmlGetName(n), _T("instructions"))) {
+ else if (!mir_tstrcmp(xmlGetName(n), _T("registered")) || !mir_tstrcmp(xmlGetName(n), _T("instructions"))) {
// do nothing, we will skip these
}
else {
diff --git a/protocols/JabberG/src/jabber_api.cpp b/protocols/JabberG/src/jabber_api.cpp index 4f662909cd..9379e767b5 100644 --- a/protocols/JabberG/src/jabber_api.cpp +++ b/protocols/JabberG/src/jabber_api.cpp @@ -206,7 +206,7 @@ int CJabberProto::RemoveHandler(HJHANDLER hHandler) JabberFeatCapPairDynamic *CJabberProto::FindFeature(LPCTSTR szFeature)
{
for (int i=0; i < m_lstJabberFeatCapPairsDynamic.getCount(); i++)
- if (!lstrcmp(m_lstJabberFeatCapPairsDynamic[i]->szFeature, szFeature))
+ if (!mir_tstrcmp(m_lstJabberFeatCapPairsDynamic[i]->szFeature, szFeature))
return m_lstJabberFeatCapPairsDynamic[i];
return NULL;
@@ -220,7 +220,7 @@ int CJabberProto::RegisterFeature(LPCTSTR szFeature, LPCTSTR szDescription) // check for this feature in core features, and return false if it's present, to prevent re-registering a core feature
int i;
for (i=0; g_JabberFeatCapPairs[i].szFeature; i++)
- if (!lstrcmp(g_JabberFeatCapPairs[i].szFeature, szFeature))
+ if (!mir_tstrcmp(g_JabberFeatCapPairs[i].szFeature, szFeature))
return false;
mir_cslock lck(m_csLists);
diff --git a/protocols/JabberG/src/jabber_archive.cpp b/protocols/JabberG/src/jabber_archive.cpp index 91752216a0..72be7ad08d 100644 --- a/protocols/JabberG/src/jabber_archive.cpp +++ b/protocols/JabberG/src/jabber_archive.cpp @@ -53,11 +53,11 @@ void CJabberProto::RetrieveMessageArchive(MCONTACT hContact, JABBER_LIST_ITEM *p void CJabberProto::OnIqResultGetCollectionList(HXML iqNode, CJabberIqInfo*)
{
const TCHAR *to = xmlGetAttrValue(iqNode, _T("to"));
- if (to == NULL || lstrcmp( xmlGetAttrValue(iqNode, _T("type")), _T("result")))
+ if (to == NULL || mir_tstrcmp( xmlGetAttrValue(iqNode, _T("type")), _T("result")))
return;
HXML list = xmlGetChild(iqNode, "list");
- if (!list || lstrcmp( xmlGetAttrValue(list, _T("xmlns")), JABBER_FEAT_ARCHIVE))
+ if (!list || mir_tstrcmp( xmlGetAttrValue(list, _T("xmlns")), JABBER_FEAT_ARCHIVE))
return;
MCONTACT hContact = NULL;
@@ -246,11 +246,11 @@ BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei) void CJabberProto::OnIqResultGetCollection(HXML iqNode, CJabberIqInfo*)
{
- if ( lstrcmp( xmlGetAttrValue(iqNode, _T("type")), _T("result")))
+ if ( mir_tstrcmp( xmlGetAttrValue(iqNode, _T("type")), _T("result")))
return;
HXML chatNode = xmlGetChild(iqNode, "chat");
- if (!chatNode || lstrcmp( xmlGetAttrValue(chatNode, _T("xmlns")), JABBER_FEAT_ARCHIVE))
+ if (!chatNode || mir_tstrcmp( xmlGetAttrValue(chatNode, _T("xmlns")), JABBER_FEAT_ARCHIVE))
return;
const TCHAR* start = xmlGetAttrValue(chatNode, _T("start"));
@@ -272,9 +272,9 @@ void CJabberProto::OnIqResultGetCollection(HXML iqNode, CJabberIqInfo*) int from;
const TCHAR *itemName = xmlGetName(itemNode);
- if (!lstrcmp(itemName, _T("to")))
+ if (!mir_tstrcmp(itemName, _T("to")))
from = DBEF_SENT;
- else if (!lstrcmp(itemName, _T("from")))
+ else if (!mir_tstrcmp(itemName, _T("from")))
from = 0;
else
continue;
diff --git a/protocols/JabberG/src/jabber_bookmarks.cpp b/protocols/JabberG/src/jabber_bookmarks.cpp index ca922e5b24..3cf333e04a 100644 --- a/protocols/JabberG/src/jabber_bookmarks.cpp +++ b/protocols/JabberG/src/jabber_bookmarks.cpp @@ -47,7 +47,7 @@ static INT_PTR CALLBACK JabberAddBookmarkDlgProc(HWND hwndDlg, UINT msg, WPARAM param->ppro->m_hwndJabberAddBookmark = hwndDlg;
TranslateDialogDefault(hwndDlg);
if (item = param->m_item) {
- if (!lstrcmp(item->type, _T("conference"))) {
+ if (!mir_tstrcmp(item->type, _T("conference"))) {
if (!_tcschr(item->jid, _T('@'))) { //no room name - consider it is transport
SendDlgItemMessage(hwndDlg, IDC_AGENT_RADIO, BM_SETCHECK, BST_CHECKED, 0);
EnableWindow(GetDlgItem(hwndDlg, IDC_NICK), FALSE);
@@ -329,7 +329,7 @@ void CJabberDlgBookmarks::OpenBookmark() JABBER_LIST_ITEM *item = m_proto->ListGetItemPtr(LIST_BOOKMARK, address);
if (item == NULL) return;
- if (!lstrcmpi(item->type, _T("conference"))) {
+ if (!mir_tstrcmpi(item->type, _T("conference"))) {
m_lvBookmarks.SetItemState(iItem, 0, LVIS_SELECTED); // Unselect the item
/* some hack for using bookmark to transport not under XEP-0048 */
@@ -391,7 +391,7 @@ void CJabberDlgBookmarks::OnProtoRefresh(WPARAM, LPARAM) LISTFOREACH(i, m_proto, LIST_BOOKMARK)
{
if (item = m_proto->ListGetItemPtrFromIndex(i)) {
- int itemType = lstrcmpi(item->type, _T("conference")) ? 1 : 0;
+ int itemType = mir_tstrcmpi(item->type, _T("conference")) ? 1 : 0;
int iItem = m_lvBookmarks.AddItem(item->name, itemType, (LPARAM)item->jid, itemType);
m_lvBookmarks.SetItem(iItem, 1, item->jid);
if (itemType == 0)
diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp index fff57b2bba..52fd10c3f0 100644 --- a/protocols/JabberG/src/jabber_byte.cpp +++ b/protocols/JabberG/src/jabber_byte.cpp @@ -414,7 +414,7 @@ void CJabberProto::IqResultStreamActivate(HXML iqNode, CJabberIqInfo*) if (item == NULL)
return;
- if (!lstrcmp(xmlGetAttrValue(iqNode, _T("type")), _T("result")))
+ if (!mir_tstrcmp(xmlGetAttrValue(iqNode, _T("type")), _T("result")))
item->jbt->bStreamActivated = TRUE;
if (item->jbt->hProxyEvent)
diff --git a/protocols/JabberG/src/jabber_captcha.cpp b/protocols/JabberG/src/jabber_captcha.cpp index 4884cfee6a..e328bbcea5 100644 --- a/protocols/JabberG/src/jabber_captcha.cpp +++ b/protocols/JabberG/src/jabber_captcha.cpp @@ -159,7 +159,7 @@ bool CJabberProto::ProcessCaptcha(HXML node, HXML parentNode, ThreadData *info) param.w = bmp.bmWidth;
param.h = bmp.bmHeight;
int res = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_CAPTCHAFORM), NULL, JabberCaptchaFormDlgProc, (LPARAM)¶m);
- if (lstrcmp(param.Result, _T("")) == 0 || !res)
+ if (mir_tstrcmp(param.Result, _T("")) == 0 || !res)
sendCaptchaError(info, param.from, param.to, param.challenge);
else
sendCaptchaResult(param.Result, info, param.from, param.challenge, param.fromjid, param.sid);
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 93b1fd047f..4692566bef 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -143,7 +143,7 @@ int CJabberProto::GcInit(JABBER_LIST_ITEM *item) ptrT tszNick( getTStringA(hContact, "MyNick"));
if (tszNick != NULL) {
- if (!lstrcmp(tszNick, szNick))
+ if (!mir_tstrcmp(tszNick, szNick))
delSetting(hContact, "MyNick");
else
setTString(hContact, "MyNick", item->nick);
@@ -292,7 +292,7 @@ void CJabberProto::GcLogUpdateMemberStatus(JABBER_LIST_ITEM *item, const TCHAR * mir_cslock lck(m_csLists);
for (int i = 0; i < item->arResources.getCount(); i++) {
JABBER_RESOURCE_STATUS *JS = item->arResources[i];
- if (!lstrcmp(resource, JS->m_tszResourceName)) {
+ if (!mir_tstrcmp(resource, JS->m_tszResourceName)) {
if (action != GC_EVENT_JOIN) {
switch (action) {
case 0:
@@ -303,7 +303,7 @@ void CJabberProto::GcLogUpdateMemberStatus(JABBER_LIST_ITEM *item, const TCHAR * gce.ptszText = TranslateT("Moderator");
}
gce.ptszStatus = TranslateTS(sttStatuses[JabberGcGetStatus(JS)]);
- gce.bIsMe = (lstrcmp(nick, myNick) == 0);
+ gce.bIsMe = (mir_tstrcmp(nick, myNick) == 0);
statusToSet = JS->m_iStatus;
break;
} } }
@@ -503,7 +503,7 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam) if (gcmi == NULL)
return 0;
- if (lstrcmpiA(gcmi->pszModule, m_szModuleName))
+ if (mir_strcmpi(gcmi->pszModule, m_szModuleName))
return 0;
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_CHATROOM, gcmi->pszID);
@@ -513,8 +513,8 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam) pResourceStatus me(NULL), him(NULL);
for (int i=0; i < item->arResources.getCount(); i++) {
JABBER_RESOURCE_STATUS *p = item->arResources[i];
- if (!lstrcmp(p->m_tszResourceName, item->nick)) me = p;
- if (!lstrcmp(p->m_tszResourceName, gcmi->pszUID)) him = p;
+ if (!mir_tstrcmp(p->m_tszResourceName, item->nick)) me = p;
+ if (!mir_tstrcmp(p->m_tszResourceName, gcmi->pszUID)) him = p;
}
if (gcmi->Type == MENU_ON_LOG) {
@@ -661,7 +661,7 @@ class CGroupchatInviteDlg : public CJabberDlgBase {
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
- if (lstrcmpA(proto, m_proto->m_szModuleName) || m_proto->isChatRoom(hContact))
+ if (mir_strcmp(proto, m_proto->m_szModuleName) || m_proto->isChatRoom(hContact))
if (HANDLE hItem = m_clc.FindContact(hContact))
m_clc.DeleteItem(hItem);
}
@@ -748,7 +748,7 @@ public: int i;
for (i=0; i < m_newJids.getCount(); i++)
- if (!lstrcmp(m_newJids[i]->jid, buf))
+ if (!mir_tstrcmp(m_newJids[i]->jid, buf))
break;
if (i != m_newJids.getCount())
return;
@@ -1388,7 +1388,7 @@ int CJabberProto::JabberGcEventHook(WPARAM, LPARAM lParam) if (gch == NULL)
return 0;
- if (lstrcmpiA(gch->pDest->pszModule, m_szModuleName))
+ if (mir_strcmpi(gch->pDest->pszModule, m_szModuleName))
return 0;
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_CHATROOM, gch->pDest->ptszID);
diff --git a/protocols/JabberG/src/jabber_console.cpp b/protocols/JabberG/src/jabber_console.cpp index b8ff053815..4a2c08e023 100644 --- a/protocols/JabberG/src/jabber_console.cpp +++ b/protocols/JabberG/src/jabber_console.cpp @@ -120,9 +120,9 @@ bool CJabberProto::RecursiveCheckFilter(HXML node, DWORD flags) bool CJabberProto::FilterXml(HXML node, DWORD flags)
{
- if (!m_filterInfo.msg && !lstrcmp(xmlGetName(node), _T("message"))) return false;
- if (!m_filterInfo.presence && !lstrcmp(xmlGetName(node), _T("presence"))) return false;
- if (!m_filterInfo.iq && !lstrcmp(xmlGetName(node), _T("iq"))) return false;
+ if (!m_filterInfo.msg && !mir_tstrcmp(xmlGetName(node), _T("message"))) return false;
+ if (!m_filterInfo.presence && !mir_tstrcmp(xmlGetName(node), _T("presence"))) return false;
+ if (!m_filterInfo.iq && !mir_tstrcmp(xmlGetName(node), _T("iq"))) return false;
if (m_filterInfo.type == TFilterInfo::T_OFF) return true;
mir_cslock lck(m_filterInfo.csPatternLock);
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index 7fbb073683..bfb4bc8a76 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -261,7 +261,7 @@ void CJabberProto::OnIqResultServiceDiscoveryRootInfo(HXML iqNode, CJabberIqInfo if (query) {
HXML feature;
for (int i = 1; (feature = xmlGetNthChild(query, _T("feature"), i)) != NULL; i++) {
- if (!lstrcmp(xmlGetAttrValue(feature, _T("var")), (TCHAR *)pInfo->m_pUserData)) {
+ if (!mir_tstrcmp(xmlGetAttrValue(feature, _T("var")), (TCHAR *)pInfo->m_pUserData)) {
CJabberSDNode *pNode = m_SDManager.AddPrimaryNode(pInfo->GetReceiver(), xmlGetAttrValue(iqNode, _T("node")), NULL);
SendBothRequests(pNode, NULL);
break;
@@ -396,7 +396,7 @@ void CJabberProto::PerformBrowse(HWND hwndDlg) mir_cslockfull lck(m_SDManager.cs());
m_SDManager.RemoveAll();
- if (!lstrcmp(szJid, _T(SD_FAKEJID_MYAGENTS))) {
+ if (!mir_tstrcmp(szJid, _T(SD_FAKEJID_MYAGENTS))) {
sttBrowseMode = SD_BROWSE_MYAGENTS;
JABBER_LIST_ITEM *item = NULL;
LISTFOREACH(i, this, LIST_ROSTER)
@@ -414,7 +414,7 @@ void CJabberProto::PerformBrowse(HWND hwndDlg) SendBothRequests(pNode, NULL);
} }
} }
- else if (!lstrcmp(szJid, _T(SD_FAKEJID_CONFERENCES))) {
+ else if (!mir_tstrcmp(szJid, _T(SD_FAKEJID_CONFERENCES))) {
sttBrowseMode = SD_BROWSE_CONFERENCES;
TCHAR *szServerJid = mir_a2t(m_ThreadInfo->conn.server);
CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultServiceDiscoveryRootItems, JABBER_IQ_TYPE_GET, szServerJid);
@@ -425,7 +425,7 @@ void CJabberProto::PerformBrowse(HWND hwndDlg) m_ThreadInfo->send(iq);
mir_free(szServerJid);
}
- else if (!lstrcmp(szJid, _T(SD_FAKEJID_AGENTS))) {
+ else if (!mir_tstrcmp(szJid, _T(SD_FAKEJID_AGENTS))) {
sttBrowseMode = SD_BROWSE_AGENTS;
TCHAR *szServerJid = mir_a2t(m_ThreadInfo->conn.server);
CJabberIqInfo *pInfo = AddIQ(&CJabberProto::OnIqResultServiceDiscoveryRootItems, JABBER_IQ_TYPE_GET, szServerJid);
@@ -436,7 +436,7 @@ void CJabberProto::PerformBrowse(HWND hwndDlg) m_ThreadInfo->send(iq);
mir_free(szServerJid);
}
- else if (!lstrcmp(szJid, _T(SD_FAKEJID_FAVORITES))) {
+ else if (!mir_tstrcmp(szJid, _T(SD_FAKEJID_FAVORITES))) {
sttBrowseMode = SD_BROWSE_FAVORITES;
int count = getDword("discoWnd_favCount", 0);
for (int i=0; i < count; i++) {
@@ -512,8 +512,8 @@ void CJabberProto::ApplyNodeIcon(HTREELISTITEM hItem, CJabberSDNode *pNode) {
CJabberSDIdentity *iIdentity;
for (iIdentity = pNode->GetFirstIdentity(); iIdentity; iIdentity = iIdentity->GetNext())
- if (!lstrcmp(iIdentity->GetCategory(), sttNodeIcons[i].category) &&
- (!sttNodeIcons[i].type || !lstrcmp(iIdentity->GetType(), sttNodeIcons[i].type)))
+ if (!mir_tstrcmp(iIdentity->GetCategory(), sttNodeIcons[i].category) &&
+ (!sttNodeIcons[i].type || !mir_tstrcmp(iIdentity->GetType(), sttNodeIcons[i].type)))
{
iIcon = sttNodeIcons[i].listIndex;
break;
@@ -525,7 +525,7 @@ void CJabberProto::ApplyNodeIcon(HTREELISTITEM hItem, CJabberSDNode *pNode) {
CJabberSDFeature *iFeature;
for (iFeature = pNode->GetFirstFeature(); iFeature; iFeature = iFeature->GetNext())
- if (!lstrcmp(iFeature->GetVar(), sttNodeIcons[i].feature))
+ if (!mir_tstrcmp(iFeature->GetVar(), sttNodeIcons[i].feature))
{
iIcon = sttNodeIcons[i].listIndex;
break;
@@ -1252,7 +1252,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM bool bFeatureOk = !bFilterItems;
if (bFilterItems)
for (CJabberSDFeature *iFeature = pNode->GetFirstFeature(); iFeature; iFeature = iFeature->GetNext())
- if (!lstrcmp(iFeature->GetVar(), items[i].feature)) {
+ if (!mir_tstrcmp(iFeature->GetVar(), items[i].feature)) {
bFeatureOk = true;
break;
}
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index 6d53a81005..6c3e0389b4 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -96,7 +96,7 @@ void __cdecl CJabberProto::OnRenameGroup(DBCONTACTWRITESETTING *cws, MCONTACT hC }
else {
TCHAR *p = sttSettingToTchar(cws);
- if (cws->value.pszVal != NULL && lstrcmp(p, item->group)) {
+ if (cws->value.pszVal != NULL && mir_tstrcmp(p, item->group)) {
debugLog(_T("Group set to %s"), p);
if (p)
AddContactToRoster(item->jid, tszNick, p);
@@ -119,7 +119,7 @@ void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING *cws, MCONTACT }
ptrT newNick( sttSettingToTchar(cws));
- if (newNick && lstrcmp(item->nick, newNick)) {
+ if (newNick && mir_tstrcmp(item->nick, newNick)) {
debugLog(_T("Renaming contact %s: %s -> %s"), item->jid, item->nick, newNick);
AddContactToRoster(item->jid, newNick, item->group);
}
diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp index c9d6cdd7a1..511825a65b 100644 --- a/protocols/JabberG/src/jabber_file.cpp +++ b/protocols/JabberG/src/jabber_file.cpp @@ -391,7 +391,7 @@ int CJabberProto::FileSendParse(JABBER_SOCKET s, filetransfer *ft, char* buffer, else
t = ft->std.ptszFiles[currentFile];
- if (ft->httpPath == NULL || lstrcmp(ft->httpPath, t)) {
+ if (ft->httpPath == NULL || mir_tstrcmp(ft->httpPath, t)) {
if (ft->httpPath == NULL)
debugLogA("Requested file name does not matched (httpPath == NULL)");
else
diff --git a/protocols/JabberG/src/jabber_form.cpp b/protocols/JabberG/src/jabber_form.cpp index 1f639e7de6..86dae77ec8 100644 --- a/protocols/JabberG/src/jabber_form.cpp +++ b/protocols/JabberG/src/jabber_form.cpp @@ -448,7 +448,7 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp TCHAR *labelStr, *valueStr;
RECT frameRect;
- if (xNode == NULL || xmlGetName(xNode) == NULL || lstrcmp(xmlGetName(xNode), _T("x")) || hwndStatic == NULL)
+ if (xNode == NULL || xmlGetName(xNode) == NULL || mir_tstrcmp(xmlGetName(xNode), _T("x")) || hwndStatic == NULL)
return;
GetClientRect(hwndStatic, &frameRect);
@@ -468,7 +468,7 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp if (!n)
break;
- if (lstrcmp(xmlGetName(n), _T("field")))
+ if (mir_tstrcmp(xmlGetName(n), _T("field")))
continue;
varStr = xmlGetAttrValue(n, _T("var"));
@@ -492,7 +492,7 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp v = xmlGetChild(n, j);
if (!v)
break;
- if (xmlGetName(v) && !lstrcmp(xmlGetName(v), _T("value")) && xmlGetText(v))
+ if (xmlGetName(v) && !mir_tstrcmp(xmlGetName(v), _T("value")) && xmlGetText(v))
size += _tcslen(xmlGetText(v)) + 2;
}
valueStr = (TCHAR*)mir_alloc(sizeof(TCHAR)*size);
@@ -501,7 +501,7 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp v = xmlGetChild(n, j);
if (!v)
break;
- if (xmlGetName(v) && !lstrcmp(xmlGetName(v), _T("value")) && xmlGetText(v)) {
+ if (xmlGetName(v) && !mir_tstrcmp(xmlGetName(v), _T("value")) && xmlGetText(v)) {
if (valueStr[0])
_tcscat(valueStr, _T("\r\n"));
_tcscat(valueStr, xmlGetText(v));
@@ -522,7 +522,7 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp if (o == NULL)
break;
- if (lstrcmp(xmlGetName(o), _T("option")))
+ if (mir_tstrcmp(xmlGetName(o), _T("option")))
continue;
if ((v = xmlGetChild(o, "value")) == NULL || xmlGetText(v) == NULL)
continue;
@@ -531,7 +531,7 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp if (str == NULL)
continue;
- bool selected = !lstrcmp(valueText, xmlGetText(v));
+ bool selected = !mir_tstrcmp(valueText, xmlGetText(v));
JabberFormAddListItem(item, str, selected);
}
}
@@ -541,7 +541,7 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp if (o == NULL)
break;
- if (lstrcmp(xmlGetName(o), _T("option")))
+ if (mir_tstrcmp(xmlGetName(o), _T("option")))
continue;
if ((v = xmlGetChild(o, "value")) == NULL || xmlGetText(v) == NULL)
continue;
@@ -555,7 +555,7 @@ void JabberFormCreateUI(HWND hwndStatic, HXML xNode, int *formHeight, BOOL bComp vs = xmlGetChild(n, k);
if (!vs)
break;
- if (!lstrcmp(xmlGetName(vs), _T("value")) && !lstrcmp(xmlGetText(vs), xmlGetText(v))) {
+ if (!mir_tstrcmp(xmlGetName(vs), _T("value")) && !mir_tstrcmp(xmlGetText(vs), xmlGetText(v))) {
selected = true;
break;
}
@@ -587,7 +587,7 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) const TCHAR *varName, *type, *fieldStr, *labelText, *str2;
TCHAR *p, *q, *str;
- if (xNode == NULL || xmlGetName(xNode) == NULL || lstrcmp(xmlGetName(xNode), _T("x")) || hwndStatic == NULL)
+ if (xNode == NULL || xmlGetName(xNode) == NULL || mir_tstrcmp(xmlGetName(xNode), _T("x")) || hwndStatic == NULL)
return NULL;
hFrame = hwndStatic;
@@ -601,7 +601,7 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) break;
fieldStr = NULL;
- if (lstrcmp(xmlGetName(n), _T("field")))
+ if (mir_tstrcmp(xmlGetName(n), _T("field")))
continue;
if ((varName = xmlGetAttrValue(n, _T("var"))) == NULL || (type = xmlGetAttrValue(n, _T("type"))) == NULL)
@@ -640,11 +640,11 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) if (!o)
break;
- if (!lstrcmp(xmlGetName(o), _T("option"))) {
+ if (!mir_tstrcmp(xmlGetName(o), _T("option"))) {
if ((v = xmlGetChild(o , "value")) != NULL && xmlGetText(v)) {
if ((str2 = xmlGetAttrValue(o, _T("label"))) == NULL)
str2 = xmlGetText(v);
- if (!lstrcmp(str2, str))
+ if (!mir_tstrcmp(str2, str))
break;
} } }
@@ -667,12 +667,12 @@ HXML JabberFormGetData(HWND hwndStatic, HXML xNode) if (!o)
break;
- if (xmlGetName(o) && !lstrcmp(xmlGetName(o), _T("option"))) {
+ if (xmlGetName(o) && !mir_tstrcmp(xmlGetName(o), _T("option"))) {
if ((v = xmlGetChild(o , "value")) != NULL && xmlGetText(v)) {
if ((labelText = xmlGetAttrValue(o, _T("label"))) == NULL)
labelText = xmlGetText(v);
- if (!lstrcmp(labelText, str))
+ if (!mir_tstrcmp(labelText, str))
field << XCHILD(_T("value"), xmlGetText(v));
} } }
mir_free(str);
diff --git a/protocols/JabberG/src/jabber_frame.cpp b/protocols/JabberG/src/jabber_frame.cpp index 0703cb8e20..57f88a79e1 100644 --- a/protocols/JabberG/src/jabber_frame.cpp +++ b/protocols/JabberG/src/jabber_frame.cpp @@ -63,7 +63,7 @@ public: static int cmp(const CJabberInfoFrameItem *p1, const CJabberInfoFrameItem *p2)
{
- return lstrcmpA(p1->m_pszName, p2->m_pszName);
+ return mir_strcmp(p1->m_pszName, p2->m_pszName);
}
};
diff --git a/protocols/JabberG/src/jabber_ft.cpp b/protocols/JabberG/src/jabber_ft.cpp index a9a897831b..24db2e9e5f 100644 --- a/protocols/JabberG/src/jabber_ft.cpp +++ b/protocols/JabberG/src/jabber_ft.cpp @@ -326,7 +326,7 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode) if (!optionNode)
break;
- if (!lstrcmp(xmlGetName(optionNode), _T("option"))) {
+ if (!mir_tstrcmp(xmlGetName(optionNode), _T("option"))) {
if ((n = xmlGetChild(optionNode , "value")) != NULL && xmlGetText(n)) {
if (!_tcscmp(xmlGetText(n), JABBER_FEAT_BYTESTREAMS)) {
ftType = FT_BYTESTREAM;
@@ -340,7 +340,7 @@ void CJabberProto::FtHandleSiRequest(HXML iqNode) if (!optionNode)
break;
- if (!lstrcmp(xmlGetName(optionNode), _T("option"))) {
+ if (!mir_tstrcmp(xmlGetName(optionNode), _T("option"))) {
if ((n = xmlGetChild(optionNode , "value")) != NULL && xmlGetText(n)) {
if (!_tcscmp(xmlGetText(n), JABBER_FEAT_IBB)) {
ftType = FT_IBB;
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index 13a468bf2c..93b65fc94e 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -173,7 +173,7 @@ private: if (!str1 && str2) return FALSE;
if (!str2 && str1) return FALSE;
- return !lstrcmp(str1, str2);
+ return !mir_tstrcmp(str1, str2);
}
};
@@ -632,7 +632,7 @@ INT_PTR CJabberDlgGcJoin::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) {
JABBER_LIST_ITEM *item = 0;
if (item = m_proto->ListGetItemPtrFromIndex(i))
- if (!lstrcmp(item->type, _T("conference")))
+ if (!mir_tstrcmp(item->type, _T("conference")))
AppendMenu(hMenu, MF_STRING, (UINT_PTR)item, item->name);
}
AppendMenu(hMenu, MF_SEPARATOR, 0, NULL);
@@ -786,7 +786,7 @@ void CJabberProto::RenameParticipantNick(JABBER_LIST_ITEM *item, const TCHAR *ol r->m_tszResourceName = mir_tstrdup(newNick);
- if (!lstrcmp(item->nick, oldNick)) {
+ if (!mir_tstrcmp(item->nick, oldNick)) {
replaceStrT(item->nick, newNick);
MCONTACT hContact = HContactFromJID(item->jid);
@@ -814,7 +814,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) {
const TCHAR *from;
- if (!node || !xmlGetName(node) || lstrcmp(xmlGetName(node), _T("presence"))) return;
+ if (!node || !xmlGetName(node) || mir_tstrcmp(xmlGetName(node), _T("presence"))) return;
if ((from = xmlGetAttrValue(node, _T("from"))) == NULL) return;
const TCHAR *resource = _tcschr(from, '/');
@@ -955,7 +955,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) if (iStatus == 301 && r != NULL)
GcLogShowInformation(item, r, INFO_BAN);
- if (!lstrcmp(resource, item->nick)) {
+ if (!mir_tstrcmp(resource, item->nick)) {
switch (iStatus) {
case 301:
case 307:
@@ -1026,12 +1026,12 @@ void CJabberProto::GroupchatProcessMessage(HXML node) const TCHAR *from, *type, *p, *nick, *resource;
JABBER_LIST_ITEM *item;
- if (!xmlGetName(node) || lstrcmp(xmlGetName(node), _T("message"))) return;
+ if (!xmlGetName(node) || mir_tstrcmp(xmlGetName(node), _T("message"))) return;
if ((from = xmlGetAttrValue(node, _T("from"))) == NULL) return;
if ((item = ListGetItemPtr(LIST_CHATROOM, from)) == NULL) return;
if ((type = xmlGetAttrValue(node, _T("type"))) == NULL) return;
- if (!lstrcmp(type, _T("error")))
+ if (!mir_tstrcmp(type, _T("error")))
return;
GCDEST gcd = { m_szModuleName, item->jid, 0 };
@@ -1110,7 +1110,7 @@ void CJabberProto::GroupchatProcessMessage(HXML node) gce.ptszNick = nick;
gce.time = msgTime;
gce.ptszText = tszText;
- gce.bIsMe = nick == NULL ? FALSE : (lstrcmp(resource, item->nick) == 0);
+ gce.bIsMe = nick == NULL ? FALSE : (mir_tstrcmp(resource, item->nick) == 0);
if (!isHistory)
gce.dwFlags |= GCEF_ADDTOLOG;
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index f22f8e0137..939ecb82a3 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -84,7 +84,7 @@ static int skinStatusToJabberStatus[] = {0,1,2,3,4,4,6,7,2,2}; int CIconPool::CPoolItem::cmp(const CPoolItem *p1, const CPoolItem *p2)
{
- return lstrcmpA(p1->m_name, p2->m_name);
+ return mir_strcmp(p1->m_name, p2->m_name);
}
CIconPool::CPoolItem::CPoolItem():
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index b8737f75b7..5da90ab751 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -49,7 +49,7 @@ void CJabberProto::OnIqResultServerDiscoInfo(HXML iqNode, CJabberIqInfo*) xmlGetAttrValue(identity, _T("type")),
xmlGetAttrValue(identity, _T("name")) };
- if (!lstrcmp(tmp.category, _T("pubsub")) && !lstrcmp(tmp.type, _T("pep"))) {
+ if (!mir_tstrcmp(tmp.category, _T("pubsub")) && !mir_tstrcmp(tmp.type, _T("pep"))) {
m_bPepSupported = true;
EnableMenuItems(TRUE);
@@ -134,7 +134,7 @@ void CJabberProto::OnProcessLoginRq(ThreadData *info, DWORD rq) LISTFOREACH(i, this, LIST_BOOKMARK)
{
JABBER_LIST_ITEM *item = ListGetItemPtrFromIndex(i);
- if (item != NULL && !lstrcmp(item->type, _T("conference")) && item->bAutoJoin)
+ if (item != NULL && !mir_tstrcmp(item->type, _T("conference")) && item->bAutoJoin)
ll.insert(item);
}
@@ -211,7 +211,7 @@ void CJabberProto::OnIqResultGetAuth(HXML iqNode, CJabberIqInfo *pInfo) if ((type = xmlGetAttrValue(iqNode, _T("type"))) == NULL) return;
if ((queryNode = xmlGetChild(iqNode, "query")) == NULL) return;
- if (!lstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
XmlNodeIq iq(AddIQ(&CJabberProto::OnIqResultSetAuth, JABBER_IQ_TYPE_SET));
HXML query = iq << XQUERY(_T("jabber:iq:auth"));
query << XCHILD(_T("username"), m_ThreadInfo->conn.username);
@@ -238,7 +238,7 @@ void CJabberProto::OnIqResultGetAuth(HXML iqNode, CJabberIqInfo *pInfo) m_ThreadInfo->send(iq);
}
- else if (!lstrcmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, _T("error"))) {
m_ThreadInfo->send("</stream:stream>");
TCHAR text[128];
@@ -257,7 +257,7 @@ void CJabberProto::OnIqResultSetAuth(HXML iqNode, CJabberIqInfo *pInfo) debugLogA("<iq/> iqIdSetAuth");
if ((type = xmlGetAttrValue(iqNode, _T("type"))) == NULL) return;
- if (!lstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
ptrT tszNick(getTStringA("Nick"));
if (tszNick == NULL)
setTString("Nick", m_ThreadInfo->conn.username);
@@ -265,7 +265,7 @@ void CJabberProto::OnIqResultSetAuth(HXML iqNode, CJabberIqInfo *pInfo) OnLoggedIn();
}
// What to do if password error? etc...
- else if (!lstrcmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, _T("error"))) {
TCHAR text[128];
m_ThreadInfo->send("</stream:stream>");
@@ -350,7 +350,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) return;
}
- if (lstrcmp(xmlGetAttrValue(queryNode, _T("xmlns")), JABBER_FEAT_IQ_ROSTER)) {
+ if (mir_tstrcmp(xmlGetAttrValue(queryNode, _T("xmlns")), JABBER_FEAT_IQ_ROSTER)) {
mir_free(szGroupDelimeter);
return;
}
@@ -426,7 +426,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) if (name != NULL) {
ptrT tszNick( getTStringA("Nick"));
if (tszNick != NULL) {
- if (lstrcmp(nick, tszNick) != 0)
+ if (mir_tstrcmp(nick, tszNick) != 0)
db_set_ts(hContact, "CList", "MyHandle", nick);
else
db_unset(hContact, "CList", "MyHandle");
@@ -460,7 +460,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) // Don't set group again if already correct, or Miranda may show wrong group count in some case
ptrT tszGroup( db_get_tsa(hContact, "CList", "Group"));
if (tszGroup != NULL) {
- if ( lstrcmp(tszGroup, item->group))
+ if ( mir_tstrcmp(tszGroup, item->group))
db_set_ts(hContact, "CList", "Group", item->group);
}
else db_set_ts(hContact, "CList", "Group", item->group);
@@ -532,11 +532,11 @@ void CJabberProto::OnIqResultGetRegister(HXML iqNode, CJabberIqInfo*) if ((type = xmlGetAttrValue(iqNode, _T("type"))) == NULL) return;
if ((queryNode = xmlGetChild(iqNode , "query")) == NULL) return;
- if (!lstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
if (m_hwndAgentRegInput)
SendMessage(m_hwndAgentRegInput, WM_JABBER_REGINPUT_ACTIVATE, 1 /*success*/, (LPARAM)xi.copyNode(iqNode));
}
- else if (!lstrcmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, _T("error"))) {
if (m_hwndAgentRegInput) {
HXML errorNode = xmlGetChild(iqNode , "error");
TCHAR *str = JabberErrorMsg(errorNode);
@@ -554,7 +554,7 @@ void CJabberProto::OnIqResultSetRegister(HXML iqNode, CJabberIqInfo*) if ((type = xmlGetAttrValue(iqNode, _T("type"))) == NULL) return;
if ((from = xmlGetAttrValue(iqNode, _T("from"))) == NULL) return;
- if (!lstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
MCONTACT hContact = HContactFromJID(from);
if (hContact != NULL)
setByte(hContact, "IsTransport", TRUE);
@@ -562,7 +562,7 @@ void CJabberProto::OnIqResultSetRegister(HXML iqNode, CJabberIqInfo*) if (m_hwndRegProgress)
SendMessage(m_hwndRegProgress, WM_JABBER_REGDLG_UPDATE, 100, (LPARAM)TranslateT("Registration successful"));
}
- else if (!lstrcmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, _T("error"))) {
if (m_hwndRegProgress) {
HXML errorNode = xmlGetChild(iqNode , "error");
TCHAR *str = JabberErrorMsg(errorNode);
@@ -664,7 +664,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) m_nJabberSearchID = -1;
if ((vCardNode = xmlGetChild(iqNode , "vCard")) != NULL) {
- if (!lstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
JABBER_SEARCH_RESULT jsr = { 0 };
jsr.hdr.cbSize = sizeof(JABBER_SEARCH_RESULT);
jsr.hdr.flags = PSR_TCHAR;
@@ -677,7 +677,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, (HANDLE)id, (LPARAM)&jsr);
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
- else if (!lstrcmp(type, _T("error")))
+ else if (!mir_tstrcmp(type, _T("error")))
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
else ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
@@ -695,13 +695,13 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) debugLogA("Other user's vcard");
}
- if (!lstrcmp(type, _T("error"))) {
+ if (!mir_tstrcmp(type, _T("error"))) {
if ((hContact = HContactFromJID(jid)) != NULL)
ProtoBroadcastAck(hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1, 0);
return;
}
- if (lstrcmp(type, _T("result")))
+ if (mir_tstrcmp(type, _T("result")))
return;
bool hasFn = false, hasNick = false, hasGiven = false, hasFamily = false, hasMiddle = false,
@@ -725,13 +725,13 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) setTString(hContact, "FullName", xmlGetText(n));
}
}
- else if (!lstrcmp(xmlGetName(n), _T("NICKNAME"))) {
+ else if (!mir_tstrcmp(xmlGetName(n), _T("NICKNAME"))) {
if (xmlGetText(n) != NULL) {
hasNick = true;
setTString(hContact, "Nick", xmlGetText(n));
}
}
- else if (!lstrcmp(xmlGetName(n), _T("N"))) {
+ else if (!mir_tstrcmp(xmlGetName(n), _T("N"))) {
// First/Last name
if (!hasGiven && !hasFamily && !hasMiddle) {
if ((m=xmlGetChild(n, "GIVEN")) != NULL && xmlGetText(m) != NULL) {
@@ -747,7 +747,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) setTString(hContact, "MiddleName", xmlGetText(m));
} }
}
- else if (!lstrcmp(xmlGetName(n), _T("EMAIL"))) {
+ else if (!mir_tstrcmp(xmlGetName(n), _T("EMAIL"))) {
// E-mail address(es)
if ((m=xmlGetChild(n, "USERID")) == NULL) // Some bad client put e-mail directly in <EMAIL/> instead of <USERID/>
m = n;
@@ -774,7 +774,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) nEmail++;
}
}
- else if (!lstrcmp(xmlGetName(n), _T("BDAY"))) {
+ else if (!mir_tstrcmp(xmlGetName(n), _T("BDAY"))) {
// Birthday
if (!hasBday && xmlGetText(n) != NULL) {
if (hContact != NULL) {
@@ -798,7 +798,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) setTString("BirthDate", xmlGetText(n));
} }
}
- else if (!lstrcmp(xmlGetName(n), _T("GENDER"))) {
+ else if (!mir_tstrcmp(xmlGetName(n), _T("GENDER"))) {
// Gender
if (!hasGender && xmlGetText(n) != NULL) {
if (hContact != NULL) {
@@ -812,7 +812,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) setTString("GenderString", xmlGetText(n));
} }
}
- else if (!lstrcmp(xmlGetName(n), _T("ADR"))) {
+ else if (!mir_tstrcmp(xmlGetName(n), _T("ADR"))) {
if (!hasHome && xmlGetChild(n, "HOME") != NULL) {
// Home address
hasHome = true;
@@ -899,7 +899,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) setTString(hContact, "CompanyCountry", xmlGetText(m));
} }
}
- else if (!lstrcmp(xmlGetName(n), _T("TEL"))) {
+ else if (!mir_tstrcmp(xmlGetName(n), _T("TEL"))) {
// Telephone/Fax/Cellular
if ((m=xmlGetChild(n, "NUMBER")) != NULL && xmlGetText(m) != NULL) {
if (hContact != NULL) {
@@ -951,14 +951,14 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) }
}
}
- else if (!lstrcmp(xmlGetName(n), _T("URL"))) {
+ else if (!mir_tstrcmp(xmlGetName(n), _T("URL"))) {
// Homepage
if (!hasUrl && xmlGetText(n) != NULL) {
hasUrl = true;
setTString(hContact, "Homepage", xmlGetText(n));
}
}
- else if (!lstrcmp(xmlGetName(n), _T("ORG"))) {
+ else if (!mir_tstrcmp(xmlGetName(n), _T("ORG"))) {
if (!hasOrgname && !hasOrgunit) {
if ((m = xmlGetChild(n, "ORGNAME")) != NULL && xmlGetText(m) != NULL) {
hasOrgname = true;
@@ -970,19 +970,19 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) }
}
}
- else if (!lstrcmp(xmlGetName(n), _T("ROLE"))) {
+ else if (!mir_tstrcmp(xmlGetName(n), _T("ROLE"))) {
if (!hasRole && xmlGetText(n) != NULL) {
hasRole = true;
setTString(hContact, "Role", xmlGetText(n));
}
}
- else if (!lstrcmp(xmlGetName(n), _T("TITLE"))) {
+ else if (!mir_tstrcmp(xmlGetName(n), _T("TITLE"))) {
if (!hasTitle && xmlGetText(n) != NULL) {
hasTitle = true;
setTString(hContact, "CompanyPosition", xmlGetText(n));
}
}
- else if (!lstrcmp(xmlGetName(n), _T("DESC"))) {
+ else if (!mir_tstrcmp(xmlGetName(n), _T("DESC"))) {
if (!hasDesc && xmlGetText(n) != NULL) {
hasDesc = true;
TCHAR *szMemo = JabberUnixToDosT(xmlGetText(n));
@@ -990,7 +990,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) mir_free(szMemo);
}
}
- else if (!lstrcmp(xmlGetName(n), _T("PHOTO")))
+ else if (!mir_tstrcmp(xmlGetName(n), _T("PHOTO")))
OnIqResultGetVcardPhoto(jid, n, hContact, hasPhoto);
} }
@@ -1139,7 +1139,7 @@ void CJabberProto::OnIqResultSetSearch(HXML iqNode, CJabberIqInfo*) if ((type = xmlGetAttrValue(iqNode, _T("type"))) == NULL) return;
if ((id = JabberGetPacketID(iqNode)) == -1) return;
- if (!lstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
if ((queryNode = xmlGetChild(iqNode, "query")) == NULL)
return;
@@ -1150,7 +1150,7 @@ void CJabberProto::OnIqResultSetSearch(HXML iqNode, CJabberIqInfo*) if (!itemNode)
break;
- if (!lstrcmp(xmlGetName(itemNode), _T("item"))) {
+ if (!mir_tstrcmp(xmlGetName(itemNode), _T("item"))) {
if ((jid = xmlGetAttrValue(itemNode, _T("jid"))) != NULL) {
_tcsncpy_s(jsr.jid, jid, _TRUNCATE);
jsr.jid[SIZEOF(jsr.jid) - 1] = '\0';
@@ -1180,7 +1180,7 @@ void CJabberProto::OnIqResultSetSearch(HXML iqNode, CJabberIqInfo*) ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
- else if (!lstrcmp(type, _T("error")))
+ else if (!mir_tstrcmp(type, _T("error")))
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
@@ -1197,14 +1197,14 @@ void CJabberProto::OnIqResultExtSearch(HXML iqNode, CJabberIqInfo*) if (id == -1)
return;
- if (!lstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
if ((queryNode=xmlGetChild(iqNode , "query")) == NULL) return;
if ((queryNode=xmlGetChild(queryNode , "x")) == NULL) return;
for (int i=0; ; i++) {
HXML itemNode = xmlGetChild(queryNode ,i);
if (!itemNode)
break;
- if (lstrcmp(xmlGetName(itemNode), _T("item")))
+ if (mir_tstrcmp(xmlGetName(itemNode), _T("item")))
continue;
JABBER_SEARCH_RESULT jsr = { 0 };
@@ -1216,7 +1216,7 @@ void CJabberProto::OnIqResultExtSearch(HXML iqNode, CJabberIqInfo*) if (!fieldNode)
break;
- if (lstrcmp(xmlGetName(fieldNode), _T("field")))
+ if (mir_tstrcmp(xmlGetName(fieldNode), _T("field")))
continue;
const TCHAR *fieldName = xmlGetAttrValue(fieldNode, _T("var"));
@@ -1227,20 +1227,20 @@ void CJabberProto::OnIqResultExtSearch(HXML iqNode, CJabberIqInfo*) if (n == NULL)
continue;
- if (!lstrcmp(fieldName, _T("jid"))) {
+ if (!mir_tstrcmp(fieldName, _T("jid"))) {
_tcsncpy_s(jsr.jid, xmlGetText(n), _TRUNCATE);
jsr.jid[SIZEOF(jsr.jid)-1] = '\0';
debugLog(_T("Result jid = %s"), jsr.jid);
}
- else if (!lstrcmp(fieldName, _T("nickname")))
+ else if (!mir_tstrcmp(fieldName, _T("nickname")))
jsr.hdr.nick = (xmlGetText(n) != NULL) ? (TCHAR*)xmlGetText(n) : _T("");
- else if (!lstrcmp(fieldName, _T("fn")))
+ else if (!mir_tstrcmp(fieldName, _T("fn")))
jsr.hdr.firstName = (xmlGetText(n) != NULL) ? (TCHAR*)xmlGetText(n) : _T("");
- else if (!lstrcmp(fieldName, _T("given")))
+ else if (!mir_tstrcmp(fieldName, _T("given")))
jsr.hdr.firstName = (xmlGetText(n) != NULL) ? (TCHAR*)xmlGetText(n) : _T("");
- else if (!lstrcmp(fieldName, _T("family")))
+ else if (!mir_tstrcmp(fieldName, _T("family")))
jsr.hdr.lastName = (xmlGetText(n) != NULL) ? (TCHAR*)xmlGetText(n) : _T("");
- else if (!lstrcmp(fieldName, _T("email")))
+ else if (!mir_tstrcmp(fieldName, _T("email")))
jsr.hdr.email = (xmlGetText(n) != NULL) ? (TCHAR*)xmlGetText(n) : _T("");
}
@@ -1249,7 +1249,7 @@ void CJabberProto::OnIqResultExtSearch(HXML iqNode, CJabberIqInfo*) ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
- else if (!lstrcmp(type, _T("error")))
+ else if (!mir_tstrcmp(type, _T("error")))
ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE)id, 0);
}
@@ -1261,11 +1261,11 @@ void CJabberProto::OnIqResultSetPassword(HXML iqNode, CJabberIqInfo *pInfo) if (type == NULL)
return;
- if (!lstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
_tcsncpy_s(m_ThreadInfo->conn.password, m_ThreadInfo->tszNewPassword, _TRUNCATE);
MessageBox(NULL, TranslateT("Password is successfully changed. Don't forget to update your password in the Jabber protocol option."), TranslateT("Change Password"), MB_OK|MB_ICONINFORMATION|MB_SETFOREGROUND);
}
- else if (!lstrcmp(type, _T("error")))
+ else if (!mir_tstrcmp(type, _T("error")))
MessageBox(NULL, TranslateT("Password cannot be changed."), TranslateT("Change Password"), MB_OK|MB_ICONSTOP|MB_SETFOREGROUND);
}
@@ -1326,7 +1326,7 @@ void CJabberProto::OnIqResultGetClientAvatar(HXML iqNode, CJabberIqInfo*) HXML queryNode = xmlGetChild(iqNode , "query");
if (queryNode != NULL) {
const TCHAR *xmlns = xmlGetAttrValue(queryNode, _T("xmlns"));
- if (!lstrcmp(xmlns, JABBER_FEAT_AVATAR))
+ if (!mir_tstrcmp(xmlns, JABBER_FEAT_AVATAR))
n = xmlGetChild(queryNode , "data");
}
}
@@ -1362,11 +1362,11 @@ void CJabberProto::OnIqResultGetServerAvatar(HXML iqNode, CJabberIqInfo *pInfo) HXML n = NULL;
const TCHAR *type = xmlGetAttrValue(iqNode, _T("type"));
- if (!lstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
HXML queryNode = xmlGetChild(iqNode , "query");
if (queryNode != NULL) {
const TCHAR *xmlns = xmlGetAttrValue(queryNode, _T("xmlns"));
- if (!lstrcmp(xmlns, JABBER_FEAT_SERVER_AVATAR))
+ if (!mir_tstrcmp(xmlns, JABBER_FEAT_SERVER_AVATAR))
n = xmlGetChild(queryNode, "data");
}
}
@@ -1398,10 +1398,10 @@ void CJabberProto::OnIqResultGotAvatar(MCONTACT hContact, HXML n, const TCHAR *m int pictureType;
if (mimeType != NULL) {
- if (!lstrcmp(mimeType, _T("image/jpeg"))) pictureType = PA_FORMAT_JPEG;
- else if (!lstrcmp(mimeType, _T("image/png"))) pictureType = PA_FORMAT_PNG;
- else if (!lstrcmp(mimeType, _T("image/gif"))) pictureType = PA_FORMAT_GIF;
- else if (!lstrcmp(mimeType, _T("image/bmp"))) pictureType = PA_FORMAT_BMP;
+ if (!mir_tstrcmp(mimeType, _T("image/jpeg"))) pictureType = PA_FORMAT_JPEG;
+ else if (!mir_tstrcmp(mimeType, _T("image/png"))) pictureType = PA_FORMAT_PNG;
+ else if (!mir_tstrcmp(mimeType, _T("image/gif"))) pictureType = PA_FORMAT_GIF;
+ else if (!mir_tstrcmp(mimeType, _T("image/bmp"))) pictureType = PA_FORMAT_BMP;
else {
LBL_ErrFormat:
debugLog(_T("Invalid mime type specified for picture: %s"), mimeType);
@@ -1459,7 +1459,7 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode, CJabberIqInfo *pInfo) return;
const TCHAR *jid;
- if (!lstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
if (m_ThreadInfo && !(m_ThreadInfo->jabberServerCaps & JABBER_CAPS_PRIVATE_STORAGE)) {
m_ThreadInfo->jabberServerCaps |= JABBER_CAPS_PRIVATE_STORAGE;
EnableMenuItems(TRUE);
@@ -1481,7 +1481,7 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode, CJabberIqInfo *pInfo) const TCHAR *autoJ = xmlGetAttrValue(itemNode, _T("autojoin"));
if (autoJ != NULL)
- item->bAutoJoin = (!lstrcmp(autoJ, _T("true")) || !lstrcmp(autoJ, _T("1"))) ? true : false;
+ 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")))) {
JABBER_LIST_ITEM *item = ListAdd(LIST_BOOKMARK, jid);
@@ -1497,7 +1497,7 @@ void CJabberProto::OnIqResultDiscoBookmarks(HXML iqNode, CJabberIqInfo *pInfo) OnProcessLoginRq(m_ThreadInfo, JABBER_LOGIN_BOOKMARKS);
}
}
- else if (!lstrcmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, _T("error"))) {
if (m_ThreadInfo->jabberServerCaps & JABBER_CAPS_PRIVATE_STORAGE) {
m_ThreadInfo->jabberServerCaps &= ~JABBER_CAPS_PRIVATE_STORAGE;
EnableMenuItems(TRUE);
@@ -1517,7 +1517,7 @@ void CJabberProto::SetBookmarkRequest (XmlNodeIq& iq) if (item == NULL || item->jid == NULL)
continue;
- if (!lstrcmp(item->type, _T("conference"))) {
+ if (!mir_tstrcmp(item->type, _T("conference"))) {
HXML itemNode = storage << XCHILD(_T("conference")) << XATTR(_T("jid"), item->jid);
if (item->name)
itemNode << XATTR(_T("name"), item->name);
@@ -1529,7 +1529,7 @@ void CJabberProto::SetBookmarkRequest (XmlNodeIq& iq) itemNode << XCHILD(_T("password"), item->password);
}
- if (!lstrcmp(item->type, _T("url"))) {
+ if (!mir_tstrcmp(item->type, _T("url"))) {
HXML itemNode = storage << XCHILD(_T("url")) << XATTR(_T("url"), item->jid);
if (item->name)
itemNode << XATTR(_T("name"), item->name);
@@ -1548,10 +1548,10 @@ void CJabberProto::OnIqResultSetBookmarks(HXML iqNode, CJabberIqInfo *pInfo) if (type == NULL)
return;
- if (!lstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
UI_SAFE_NOTIFY(m_pDlgBookmarks, WM_JABBER_REFRESH);
}
- else if (!lstrcmp(type, _T("error"))) {
+ else if (!mir_tstrcmp(type, _T("error"))) {
HXML errorNode = xmlGetChild(iqNode, "error");
TCHAR *str = JabberErrorMsg(errorNode);
MessageBox(NULL, str, TranslateT("Jabber Bookmarks Error"), MB_OK | MB_SETFOREGROUND);
diff --git a/protocols/JabberG/src/jabber_iqid_muc.cpp b/protocols/JabberG/src/jabber_iqid_muc.cpp index 5dce9f8939..30eb6fbc2a 100644 --- a/protocols/JabberG/src/jabber_iqid_muc.cpp +++ b/protocols/JabberG/src/jabber_iqid_muc.cpp @@ -53,11 +53,11 @@ void CJabberProto::OnIqResultGetMuc(HXML iqNode, CJabberIqInfo *pInfo) HXML queryNode = xmlGetChild(iqNode , _T("query"));
if (queryNode != NULL) {
LPCTSTR str = xmlGetAttrValue(queryNode, _T("xmlns"));
- if (!lstrcmp(str, JABBER_FEAT_MUC_OWNER)) {
+ if (!mir_tstrcmp(str, JABBER_FEAT_MUC_OWNER)) {
HXML xNode = xmlGetChild(queryNode , _T("x"));
if (xNode != NULL) {
str = xmlGetAttrValue(xNode, _T("xmlns"));
- if (!lstrcmp(str, JABBER_FEAT_DATA_FORMS))
+ if (!mir_tstrcmp(str, JABBER_FEAT_DATA_FORMS))
//LaunchForm(xNode);
FormCreateDialog(xNode, _T("Jabber Conference Room Configuration"), &CJabberProto::SetMucConfig, mir_tstrdup(from));
}
@@ -498,7 +498,7 @@ void CJabberProto::OnIqResultMucGetJidList(HXML iqNode, JABBER_MUC_JIDLIST_TYPE if (type == NULL)
return;
- if (!lstrcmp(type, _T("result"))) {
+ if (!mir_tstrcmp(type, _T("result"))) {
JABBER_MUC_JIDLIST_INFO *jidListInfo = new JABBER_MUC_JIDLIST_INFO;
if (jidListInfo != NULL) {
jidListInfo->type = listType;
diff --git a/protocols/JabberG/src/jabber_libstr.cpp b/protocols/JabberG/src/jabber_libstr.cpp index c1605395f3..2f34cfc394 100644 --- a/protocols/JabberG/src/jabber_libstr.cpp +++ b/protocols/JabberG/src/jabber_libstr.cpp @@ -29,5 +29,5 @@ int lstrcmp_null(const TCHAR *s1, const TCHAR *s2) if (!s1 && !s2) return 0;
if (!s1) return -1;
if (!s2) return 1;
- return lstrcmp(s1, s2);
+ return mir_tstrcmp(s1, s2);
}
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 321bb28a79..78b23f5834 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -1031,7 +1031,7 @@ int CJabberProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam) int CJabberProto::OnProcessSrmmIconClick(WPARAM hContact, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
- if (lstrcmpA(sicd->szModule, m_szModuleName))
+ if (mir_strcmp(sicd->szModule, m_szModuleName))
return 0;
if (!hContact)
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index f46c8ff619..1e54eae79e 100644 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -55,12 +55,12 @@ void JabberChatDllError() int JabberCompareJids(const TCHAR *jid1, const TCHAR *jid2)
{
- if (!lstrcmpi(jid1, jid2))
+ if (!mir_tstrcmpi(jid1, jid2))
return 0;
// match only node@domain part
TCHAR szTempJid1[JABBER_MAX_JID_LEN], szTempJid2[JABBER_MAX_JID_LEN];
- return lstrcmpi(
+ return mir_tstrcmpi(
JabberStripJid(jid1, szTempJid1, SIZEOF(szTempJid1)),
JabberStripJid(jid2, szTempJid2, SIZEOF(szTempJid2)));
}
@@ -235,7 +235,7 @@ void CJabberProto::ResolveTransportNicks(const TCHAR *jid) continue;
*p = 0;
- if (!lstrcmp(jid, p+1) && !lstrcmp(dbJid, dbNick)) {
+ if (!mir_tstrcmp(jid, p+1) && !mir_tstrcmp(dbJid, dbNick)) {
*p = '@';
m_ThreadInfo->resolveID = SendGetVcard(dbJid);
m_ThreadInfo->resolveContact = hContact;
diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp index c2c13b2549..9b7798da0a 100644 --- a/protocols/JabberG/src/jabber_notes.cpp +++ b/protocols/JabberG/src/jabber_notes.cpp @@ -109,7 +109,7 @@ bool CNoteItem::HasTag(const TCHAR *szTag) return true;
for (TCHAR *p = m_szTags; p && *p; p = p + mir_tstrlen(p) + 1)
- if (!lstrcmp(p, szTag))
+ if (!mir_tstrcmp(p, szTag))
return true;
return false;
@@ -118,9 +118,9 @@ bool CNoteItem::HasTag(const TCHAR *szTag) int CNoteItem::cmp(const CNoteItem *p1, const CNoteItem *p2)
{
int ret = 0;
- if (ret = lstrcmp(p1->m_szTitle, p2->m_szTitle)) return ret;
- if (ret = lstrcmp(p1->m_szText, p2->m_szText)) return ret;
- if (ret = lstrcmp(p1->m_szTagsStr, p2->m_szTagsStr)) return ret;
+ if (ret = mir_tstrcmp(p1->m_szTitle, p2->m_szTitle)) return ret;
+ if (ret = mir_tstrcmp(p1->m_szText, p2->m_szText)) return ret;
+ if (ret = mir_tstrcmp(p1->m_szTagsStr, p2->m_szTagsStr)) return ret;
if (p1 < p2) return -1;
if (p1 > p2) return 1;
return 0;
@@ -486,7 +486,7 @@ private: bool selected = false;
for (int j = 0; j < tagSet.getCount(); ++j) {
- bool select = !lstrcmp(szActiveTag, tagSet[j]);
+ bool select = !mir_tstrcmp(szActiveTag, tagSet[j]);
selected |= select;
InsertTag(htiRoot, tagSet[j], select);
}
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index 911bb861a5..5c64d179c0 100644 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -560,7 +560,7 @@ private: return;
m_txtPassword.GetText(pass, SIZEOF(pass));
- if (lstrcmp(buf, pass)) {
+ if (mir_tstrcmp(buf, pass)) {
MessageBox(m_hwnd, TranslateT("Passwords do not match."), _T("Miranda NG"), MB_ICONSTOP|MB_OK);
return;
}
@@ -723,7 +723,7 @@ private: if (!n)
break;
- if (!lstrcmp(xmlGetName(n), _T("item")))
+ if (!mir_tstrcmp(xmlGetName(n), _T("item")))
if (const TCHAR *jid = xmlGetAttrValue(n, _T("jid")))
if (m_cbServer.FindString(jid, -1, true) == CB_ERR)
m_cbServer.AddString(jid);
@@ -1090,16 +1090,16 @@ void CJabberProto::_RosterHandleGetRequest(HXML node, CJabberIqInfo*) BOOL bPushed = itemRoster ? TRUE : FALSE;
if (!bPushed) {
const TCHAR *rosterName = xmlGetAttrValue(itemRoster, _T("name"));
- if ((rosterName != NULL || name[0]!=0) && lstrcmpi(rosterName,name))
+ if ((rosterName != NULL || name[0]!=0) && mir_tstrcmpi(rosterName,name))
bPushed=TRUE;
if (!bPushed) {
rosterName = xmlGetAttrValue(itemRoster, _T("subscription"));
- if ((rosterName != NULL || subscr[0]!=0) && lstrcmpi(rosterName,subscr))
+ if ((rosterName != NULL || subscr[0]!=0) && mir_tstrcmpi(rosterName,subscr))
bPushed=TRUE;
}
if (!bPushed) {
const TCHAR *rosterGroup = xmlGetText( xmlGetChild(itemRoster, "group"));
- if ((rosterGroup != NULL || group[0]!=0) && lstrcmpi(rosterGroup,group))
+ if ((rosterGroup != NULL || group[0]!=0) && mir_tstrcmpi(rosterGroup,group))
bPushed=TRUE;
}
}
@@ -1318,8 +1318,8 @@ void CJabberProto::_RosterImportFromFile(HWND hwndDlg) HXML Data = (Cell) ? xmlGetChild(Cell , "Data") : XmlNode();
if (Data)
{
- if (!lstrcmpi(xmlGetText(Data),_T("+"))) bAdd=TRUE;
- else if (lstrcmpi(xmlGetText(Data),_T("-"))) continue;
+ if (!mir_tstrcmpi(xmlGetText(Data),_T("+"))) bAdd=TRUE;
+ else if (mir_tstrcmpi(xmlGetText(Data),_T("-"))) continue;
Cell = xmlGetNthChild(Row, _T("Cell"),2);
if (Cell) Data=xmlGetChild(Cell , "Data");
@@ -1657,23 +1657,23 @@ protected: mir_strncpy(manualServer, dbManualServer, SIZEOF(manualServer));
m_canregister = true;
- if (!lstrcmpA(manualServer, "talk.google.com")) {
+ if (!mir_strcmp(manualServer, "talk.google.com")) {
m_cbType.SetCurSel(ACC_GTALK);
m_canregister = false;
}
- else if (!lstrcmpA(server, "livejournal.com")) {
+ else if (!mir_strcmp(server, "livejournal.com")) {
m_cbType.SetCurSel(ACC_LJTALK);
m_canregister = false;
}
- else if (!lstrcmpA(server, "chat.facebook.com")) {
+ else if (!mir_strcmp(server, "chat.facebook.com")) {
m_cbType.SetCurSel(ACC_FBOOK);
m_canregister = false;
}
- else if (!lstrcmpA(server, "xmpp.odnoklassniki.ru")) {
+ else if (!mir_strcmp(server, "xmpp.odnoklassniki.ru")) {
m_cbType.SetCurSel(ACC_OK);
m_canregister = false;
}
- else if (!lstrcmpA(server, "S.ms")) {
+ else if (!mir_strcmp(server, "S.ms")) {
m_cbType.SetCurSel(ACC_SMS);
m_canregister = false;
}
@@ -1733,7 +1733,7 @@ protected: DWORD dwCompNameLength = MAX_COMPUTERNAME_LENGTH;
if (GetComputerName(szCompName, &dwCompNameLength)) {
m_cbResource.GetText(szResource, SIZEOF(szResource));
- if (!lstrcmp(szCompName, szResource))
+ if (!mir_tstrcmp(szCompName, szResource))
bUseHostnameAsResource = TRUE;
}
m_proto->m_options.HostNameAsResource = bUseHostnameAsResource;
@@ -1792,7 +1792,7 @@ protected: m_cbServer.GetTextA(server, SIZEOF(server));
m_txtManualHost.GetTextA(manualServer, SIZEOF(manualServer));
- if ((m_chkManualHost.GetState() == BST_CHECKED) && lstrcmpA(server, manualServer)) {
+ if ((m_chkManualHost.GetState() == BST_CHECKED) && mir_strcmp(server, manualServer)) {
m_proto->m_options.ManualConnect = TRUE;
m_proto->setString("ManualHost", manualServer);
m_proto->setWord("ManualPort", m_txtPort.GetInt());
@@ -1848,7 +1848,7 @@ private: TCHAR pass[512];
m_txtPassword.GetText(pass, SIZEOF(pass));
- if (lstrcmp(buf, pass)) {
+ if (mir_tstrcmp(buf, pass)) {
MessageBox(m_hwnd, TranslateT("Passwords do not match."), _T("Miranda NG"), MB_ICONSTOP|MB_OK);
return;
}
@@ -2122,7 +2122,7 @@ void CJabberDlgAccMgrUI::RefreshServers(HXML node) if (!n)
break;
- if (!lstrcmp(xmlGetName(n), _T("item")))
+ if (!mir_tstrcmp(xmlGetName(n), _T("item")))
if (const TCHAR *jid = xmlGetAttrValue(n, _T("jid")))
if (m_cbServer.FindString(jid, -1, true) == CB_ERR)
m_cbServer.AddString(jid);
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index 29e88cbf68..d8dfb66fb3 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -629,7 +629,7 @@ protected: HANDLE hItem;
TCHAR *jid;
- static int cmp(const TJidData *p1, const TJidData *p2) { return lstrcmp(p1->jid, p2->jid); }
+ static int cmp(const TJidData *p1, const TJidData *p2) { return mir_tstrcmp(p1->jid, p2->jid); }
};
HANDLE hItemDefault;
@@ -1244,8 +1244,8 @@ void CJabberDlgPrivacyLists::DrawLists(LPDRAWITEMSTRUCT lpdis) szName = TranslateT("<none>");
}
else {
- if (!lstrcmp(pList->GetListName(), szActive)) bActive = true;
- if (!lstrcmp(pList->GetListName(), szDefault)) bDefault = true;
+ if (!mir_tstrcmp(pList->GetListName(), szActive)) bActive = true;
+ if (!mir_tstrcmp(pList->GetListName(), szDefault)) bDefault = true;
szName = pList->GetListName();
}
@@ -1302,7 +1302,7 @@ void CJabberDlgPrivacyLists::CListFilter(HWND) {
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
- if (!proto || lstrcmpA(proto, m_proto->m_szModuleName))
+ if (!proto || mir_strcmp(proto, m_proto->m_szModuleName))
if (HANDLE hItem = m_clcClist.FindContact(hContact))
m_clcClist.DeleteItem(hItem);
}
@@ -1381,10 +1381,10 @@ void CJabberDlgPrivacyLists::CListApplyList(HWND hwndList, CPrivacyList *pList) break;
case Subscription:
- if (!lstrcmp(pRule->GetValue(), _T("none"))) hItem = clc_info.hItemSubNone;
- else if (!lstrcmp(pRule->GetValue(), _T("from"))) hItem = clc_info.hItemSubFrom;
- else if (!lstrcmp(pRule->GetValue(), _T("to"))) hItem = clc_info.hItemSubTo;
- else if (!lstrcmp(pRule->GetValue(), _T("both"))) hItem = clc_info.hItemSubBoth;
+ if (!mir_tstrcmp(pRule->GetValue(), _T("none"))) hItem = clc_info.hItemSubNone;
+ else if (!mir_tstrcmp(pRule->GetValue(), _T("from"))) hItem = clc_info.hItemSubFrom;
+ else if (!mir_tstrcmp(pRule->GetValue(), _T("to"))) hItem = clc_info.hItemSubTo;
+ else if (!mir_tstrcmp(pRule->GetValue(), _T("both"))) hItem = clc_info.hItemSubBoth;
break;
case Else:
@@ -2147,7 +2147,7 @@ void CJabberProto::BuildPrivacyListsMenu(bool bDeleteOld) mi.position++;
mi.icolibItem = LoadSkinnedIconHandle(
- lstrcmp(m_privacyListManager.GetActiveListName(), pList->GetListName()) ?
+ mir_tstrcmp(m_privacyListManager.GetActiveListName(), pList->GetListName()) ?
SKINICON_OTHER_SMALLDOT :
SKINICON_OTHER_EMPTYBLOB);
mi.ptszName = pList->GetListName();
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 723e73e4c1..de98b94710 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -43,12 +43,12 @@ static int compareListItems(const JABBER_LIST_ITEM *p1, const JABBER_LIST_ITEM * // resource must be used in the comparison
if ((p1->list == LIST_ROSTER && (p1->bUseResource == TRUE || p2->bUseResource == TRUE))
|| (p1->list == LIST_BOOKMARK) || (p1->list == LIST_VCARD_TEMP))
- return lstrcmpi(p1->jid, p2->jid);
+ return mir_tstrcmpi(p1->jid, p2->jid);
TCHAR szp1[JABBER_MAX_JID_LEN], szp2[JABBER_MAX_JID_LEN];
JabberStripJid(p1->jid, szp1, SIZEOF(szp1));
JabberStripJid(p2->jid, szp2, SIZEOF(szp2));
- return lstrcmpi(szp1, szp2);
+ return mir_tstrcmpi(szp1, szp2);
}
CJabberProto::CJabberProto(const char *aProtoName, const TCHAR *aUserName) :
@@ -1068,11 +1068,11 @@ int __cdecl CJabberProto::SendMsg(MCONTACT hContact, int flags, const char* pszS // if client knows nothing about delivery
!(jcb & (JABBER_CAPS_MESSAGE_EVENTS | JABBER_CAPS_MESSAGE_RECEIPTS)) ||
// if message sent to groupchat
- !lstrcmp(msgType, _T("groupchat")) ||
+ !mir_tstrcmp(msgType, _T("groupchat")) ||
// if message delivery check disabled in settings
!m_options.MsgAck || !getByte(hContact, "MsgAck", TRUE))
{
- if (!lstrcmp(msgType, _T("groupchat")))
+ if (!mir_tstrcmp(msgType, _T("groupchat")))
xmlAddAttr(m, _T("to"), szClientJid);
else {
id = SerialNext();
@@ -1294,7 +1294,7 @@ int __cdecl CJabberProto::SetAwayMsg(int status, const TCHAR *msg) return 1;
}
- if ((*szMsg == NULL && msg == NULL) || (*szMsg != NULL && msg != NULL && !lstrcmp(*szMsg, msg)))
+ if ((*szMsg == NULL && msg == NULL) || (*szMsg != NULL && msg != NULL && !mir_tstrcmp(*szMsg, msg)))
return 0; // Message is the same, no update needed
// Update with the new mode message
diff --git a/protocols/JabberG/src/jabber_search.cpp b/protocols/JabberG/src/jabber_search.cpp index b63f8e4672..49cde56897 100644 --- a/protocols/JabberG/src/jabber_search.cpp +++ b/protocols/JabberG/src/jabber_search.cpp @@ -141,7 +141,7 @@ void CJabberProto::OnIqResultGetSearchFields(HXML iqNode, CJabberIqInfo *pInfo) if (type == NULL) return; - if (!lstrcmp(type, _T("result"))) { + if (!mir_tstrcmp(type, _T("result"))) { HXML queryNode = xmlGetNthChild(iqNode, _T("query"), 1); HXML xNode = xmlGetChildByTag(queryNode, "x", "xmlns", JABBER_FEAT_DATA_FORMS); @@ -183,7 +183,7 @@ void CJabberProto::OnIqResultGetSearchFields(HXML iqNode, CJabberIqInfo *pInfo) PostMessage(searchHandleDlg,WM_USER+10,0,0); ShowWindow(searchHandleDlg,SW_SHOW); } - else if (!lstrcmp(type, _T("error"))) { + else if (!mir_tstrcmp(type, _T("error"))) { const TCHAR *code=NULL; const TCHAR *description=NULL; TCHAR buff[255]; @@ -315,7 +315,7 @@ void CJabberProto::OnIqResultAdvancedSearch(HXML iqNode, CJabberIqInfo *pInfo) return; } - if (!lstrcmp(type, _T("result"))) { + if (!mir_tstrcmp(type, _T("result"))) { HXML queryNode = xmlGetNthChild(iqNode, _T("query"), 1); HXML xNode = xmlGetChildByTag(queryNode, "x", "xmlns", JABBER_FEAT_DATA_FORMS); if (xNode) { @@ -375,7 +375,7 @@ void CJabberProto::OnIqResultAdvancedSearch(HXML iqNode, CJabberIqInfo *pInfo) SearchResults.insert((void*)pUserColumn); } } } - else if (!lstrcmp(type, _T("error"))) { + else if (!mir_tstrcmp(type, _T("error"))) { const TCHAR *code = NULL; const TCHAR *description = NULL; TCHAR buff[255]; diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index b0cf0ac342..b5a39e768d 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -120,7 +120,7 @@ char* TNtlmAuth::getChallenge(const TCHAR *challenge) if (!hProvider)
return NULL;
- char *text = (!lstrcmp(challenge, _T("="))) ? mir_strdup("") : mir_t2a(challenge), *result;
+ char *text = (!mir_tstrcmp(challenge, _T("="))) ? mir_strdup("") : mir_t2a(challenge), *result;
if (info->conn.password[0] != 0)
result = Netlib_NtlmCreateResponse2(hProvider, text, info->conn.username, info->conn.password, &complete);
else
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 0120ad9e4d..e214f6dbe1 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -571,7 +571,7 @@ void CJabberProto::PerformIqAuth(ThreadData *info) void CJabberProto::OnProcessStreamOpening(HXML node, ThreadData *info)
{
- if (lstrcmp(xmlGetName(node), _T("stream:stream")))
+ if (mir_tstrcmp(xmlGetName(node), _T("stream:stream")))
return;
if (!info->bIsReg) {
@@ -848,7 +848,7 @@ void CJabberProto::OnProcessChallenge(HXML node, ThreadData *info) return;
}
- if (lstrcmp(xmlGetAttrValue(node, _T("xmlns")), _T("urn:ietf:params:xml:ns:xmpp-sasl")))
+ if (mir_tstrcmp(xmlGetAttrValue(node, _T("xmlns")), _T("urn:ietf:params:xml:ns:xmpp-sasl")))
return;
char* challenge = info->auth->getChallenge(xmlGetText(node));
@@ -860,34 +860,34 @@ void CJabberProto::OnProcessProtocol(HXML node, ThreadData *info) {
OnConsoleProcessXml(node, JCPF_IN);
- if (!lstrcmp(xmlGetName(node), _T("proceed")))
+ if (!mir_tstrcmp(xmlGetName(node), _T("proceed")))
OnProcessProceed(node, info);
- else if (!lstrcmp(xmlGetName(node), _T("compressed")))
+ else if (!mir_tstrcmp(xmlGetName(node), _T("compressed")))
OnProcessCompressed(node, info);
- else if (!lstrcmp(xmlGetName(node), _T("stream:features")))
+ else if (!mir_tstrcmp(xmlGetName(node), _T("stream:features")))
OnProcessFeatures(node, info);
- else if (!lstrcmp(xmlGetName(node), _T("stream:stream")))
+ else if (!mir_tstrcmp(xmlGetName(node), _T("stream:stream")))
OnProcessStreamOpening(node, info);
- else if (!lstrcmp(xmlGetName(node), _T("success")))
+ else if (!mir_tstrcmp(xmlGetName(node), _T("success")))
OnProcessSuccess(node, info);
- else if (!lstrcmp(xmlGetName(node), _T("failure")))
+ else if (!mir_tstrcmp(xmlGetName(node), _T("failure")))
OnProcessFailure(node, info);
- else if (!lstrcmp(xmlGetName(node), _T("stream:error")))
+ else if (!mir_tstrcmp(xmlGetName(node), _T("stream:error")))
OnProcessError(node, info);
- else if (!lstrcmp(xmlGetName(node), _T("challenge")))
+ else if (!mir_tstrcmp(xmlGetName(node), _T("challenge")))
OnProcessChallenge(node, info);
else if (!info->bIsReg) {
- if (!lstrcmp(xmlGetName(node), _T("message")))
+ if (!mir_tstrcmp(xmlGetName(node), _T("message")))
OnProcessMessage(node, info);
- else if (!lstrcmp(xmlGetName(node), _T("presence")))
+ else if (!mir_tstrcmp(xmlGetName(node), _T("presence")))
OnProcessPresence(node, info);
- else if (!lstrcmp(xmlGetName(node), _T("iq")))
+ else if (!mir_tstrcmp(xmlGetName(node), _T("iq")))
OnProcessIq(node);
else
debugLogA("Invalid top-level tag (only <message/> <presence/> and <iq/> allowed)");
}
else {
- if (!lstrcmp(xmlGetName(node), _T("iq")))
+ if (!mir_tstrcmp(xmlGetName(node), _T("iq")))
OnProcessRegIq(node, info);
else
debugLogA("Invalid top-level tag (only <iq/> allowed)");
@@ -897,10 +897,10 @@ void CJabberProto::OnProcessProtocol(HXML node, ThreadData *info) void CJabberProto::OnProcessProceed(HXML node, ThreadData *info)
{
const TCHAR *type;
- if ((type = xmlGetAttrValue(node, _T("xmlns"))) != NULL && !lstrcmp(type, _T("error")))
+ if ((type = xmlGetAttrValue(node, _T("xmlns"))) != NULL && !mir_tstrcmp(type, _T("error")))
return;
- if (!lstrcmp(type, _T("urn:ietf:params:xml:ns:xmpp-tls"))) {
+ if (!mir_tstrcmp(type, _T("urn:ietf:params:xml:ns:xmpp-tls"))) {
debugLogA("Starting TLS...");
char* gtlk = strstr(info->conn.manualHost, "google.com");
@@ -925,9 +925,9 @@ void CJabberProto::OnProcessCompressed(HXML node, ThreadData *info) debugLogA("Compression confirmed");
const TCHAR *type = xmlGetAttrValue(node, _T("xmlns"));
- if (type != NULL && !lstrcmp(type, _T("error")))
+ if (type != NULL && !mir_tstrcmp(type, _T("error")))
return;
- if (lstrcmp(type, _T("http://jabber.org/protocol/compress")))
+ if (mir_tstrcmp(type, _T("http://jabber.org/protocol/compress")))
return;
debugLogA("Starting Zlib stream compression...");
@@ -1560,7 +1560,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) debugLogA("Avatar enabled");
for (int i = 1; (xNode = xmlGetNthChild(node, _T("x"), i)) != NULL; i++) {
- if (!lstrcmp(xmlGetAttrValue(xNode, _T("xmlns")), _T("jabber:x:avatar"))) {
+ if (!mir_tstrcmp(xmlGetAttrValue(xNode, _T("xmlns")), _T("jabber:x:avatar"))) {
LPCTSTR ptszHash = xmlGetText(xmlGetChild(xNode, "hash"));
if (ptszHash != NULL) {
delSetting(hContact, "AvatarXVcard");
@@ -1568,7 +1568,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) setTString(hContact, "AvatarHash", ptszHash);
bHasAvatar = true;
ptrT saved(getTStringA(hContact, "AvatarSaved"));
- if (saved != NULL || lstrcmp(saved, ptszHash)) {
+ if (saved != NULL || mir_tstrcmp(saved, ptszHash)) {
debugLogA("Avatar was changed");
ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, NULL);
}
@@ -1579,7 +1579,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) if (!bHasAvatar) { //no jabber:x:avatar. try vcard-temp:x:update
debugLogA("Not hasXAvatar");
for (int i = 1; (xNode = xmlGetNthChild(node, _T("x"), i)) != NULL; i++) {
- if (!lstrcmp(xmlGetAttrValue(xNode, _T("xmlns")), _T("vcard-temp:x:update"))) {
+ if (!mir_tstrcmp(xmlGetAttrValue(xNode, _T("xmlns")), _T("vcard-temp:x:update"))) {
if ((xNode = xmlGetChild(xNode, "photo")) != NULL) {
LPCTSTR txt = xmlGetText(xNode);
if (txt != NULL && txt[0] != 0) {
@@ -1588,7 +1588,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) setTString(hContact, "AvatarHash", txt);
bHasAvatar = true;
ptrT saved(getTStringA(hContact, "AvatarSaved"));
- if (saved || lstrcmp(saved, txt)) {
+ if (saved || mir_tstrcmp(saved, txt)) {
debugLogA("Avatar was changed. Using vcard-temp:x:update");
ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, NULL);
}
@@ -1817,7 +1817,7 @@ void CJabberProto::OnProcessIq(HXML node) LISTFOREACH(i, this, LIST_FILE)
{
JABBER_LIST_ITEM *item = ListGetItemPtrFromIndex(i);
- if (item->ft != NULL && item->ft->state == FT_CONNECTING && !lstrcmp(tszBuf, item->ft->szId)) {
+ if (item->ft != NULL && item->ft->state == FT_CONNECTING && !mir_tstrcmp(tszBuf, item->ft->szId)) {
debugLogA("Denying file sending request");
item->ft->state = FT_DENIED;
if (item->ft->hFileEvent != NULL)
diff --git a/protocols/JabberG/src/jabber_treelist.cpp b/protocols/JabberG/src/jabber_treelist.cpp index d006c4a306..5cbad3a5f7 100644 --- a/protocols/JabberG/src/jabber_treelist.cpp +++ b/protocols/JabberG/src/jabber_treelist.cpp @@ -468,12 +468,12 @@ BOOL TreeList_ProcessMessage(HWND hwnd, UINT msg, WPARAM, LPARAM lparam, UINT id }
///////////////////////////////////////////////////////////////////////////
-static int sttTreeList_SortItems_Cmp0(const void *p1, const void *p2) { return lstrcmp((*(HTREELISTITEM *)p1)->text[0], (*(HTREELISTITEM *)p2)->text[0]); }
-static int sttTreeList_SortItems_Cmp1(const void *p1, const void *p2) { return -lstrcmp((*(HTREELISTITEM *)p1)->text[0], (*(HTREELISTITEM *)p2)->text[0]); }
-static int sttTreeList_SortItems_Cmp2(const void *p1, const void *p2) { return lstrcmp((*(HTREELISTITEM *)p1)->text[1], (*(HTREELISTITEM *)p2)->text[1]); }
-static int sttTreeList_SortItems_Cmp3(const void *p1, const void *p2) { return -lstrcmp((*(HTREELISTITEM *)p1)->text[1], (*(HTREELISTITEM *)p2)->text[1]); }
-static int sttTreeList_SortItems_Cmp4(const void *p1, const void *p2) { return lstrcmp((*(HTREELISTITEM *)p1)->text[2], (*(HTREELISTITEM *)p2)->text[2]); }
-static int sttTreeList_SortItems_Cmp5(const void *p1, const void *p2) { return -lstrcmp((*(HTREELISTITEM *)p1)->text[2], (*(HTREELISTITEM *)p2)->text[2]); }
+static int sttTreeList_SortItems_Cmp0(const void *p1, const void *p2) { return mir_tstrcmp((*(HTREELISTITEM *)p1)->text[0], (*(HTREELISTITEM *)p2)->text[0]); }
+static int sttTreeList_SortItems_Cmp1(const void *p1, const void *p2) { return -mir_tstrcmp((*(HTREELISTITEM *)p1)->text[0], (*(HTREELISTITEM *)p2)->text[0]); }
+static int sttTreeList_SortItems_Cmp2(const void *p1, const void *p2) { return mir_tstrcmp((*(HTREELISTITEM *)p1)->text[1], (*(HTREELISTITEM *)p2)->text[1]); }
+static int sttTreeList_SortItems_Cmp3(const void *p1, const void *p2) { return -mir_tstrcmp((*(HTREELISTITEM *)p1)->text[1], (*(HTREELISTITEM *)p2)->text[1]); }
+static int sttTreeList_SortItems_Cmp4(const void *p1, const void *p2) { return mir_tstrcmp((*(HTREELISTITEM *)p1)->text[2], (*(HTREELISTITEM *)p2)->text[2]); }
+static int sttTreeList_SortItems_Cmp5(const void *p1, const void *p2) { return -mir_tstrcmp((*(HTREELISTITEM *)p1)->text[2], (*(HTREELISTITEM *)p2)->text[2]); }
static void sttTreeList_SortItems(HTREELISTITEM hItem, LPARAM data)
{
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index ced02ad99c..7416fa20d4 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -45,7 +45,7 @@ MCONTACT CJabberProto::ChatRoomHContactFromJID(const TCHAR *jid) if ((dbJid = getTStringA(hContact, "jid")) == NULL)
continue;
- if (!lstrcmpi(jid, dbJid) && isChatRoom(hContact))
+ if (!mir_tstrcmpi(jid, dbJid) && isChatRoom(hContact))
return hContact;
}
@@ -69,11 +69,11 @@ MCONTACT CJabberProto::HContactFromJID(const TCHAR *jid, BOOL bStripResource) if (dbJid != NULL) {
int result;
if (item != NULL)
- result = lstrcmpi(jid, dbJid);
+ result = mir_tstrcmpi(jid, dbJid);
else {
if (bStripResource == 3) {
if (bIsChat)
- result = lstrcmpi(jid, dbJid); // for chat room we have to have full contact matched
+ result = mir_tstrcmpi(jid, dbJid); // for chat room we have to have full contact matched
else if (TRUE)
result = _tcsnicmp(jid, dbJid, _tcslen(dbJid));
else
@@ -81,7 +81,7 @@ MCONTACT CJabberProto::HContactFromJID(const TCHAR *jid, BOOL bStripResource) }
// most probably it should just look full matching contact
else
- result = lstrcmpi(jid, dbJid);
+ result = mir_tstrcmpi(jid, dbJid);
}
if (result == 0)
@@ -745,7 +745,7 @@ TCHAR* CJabberProto::GetClientJID(const TCHAR *jid, TCHAR *dest, size_t destLen) mir_cslock lck(m_csLists);
JABBER_LIST_ITEM *LI = ListGetItemPtr(LIST_ROSTER, jid);
if (LI != NULL) {
- if (LI->arResources.getCount() == 1 && !lstrcmp(LI->arResources[0]->m_tszCapsNode, _T("http://talk.google.com/xmpp/bot/caps"))) {
+ if (LI->arResources.getCount() == 1 && !mir_tstrcmp(LI->arResources[0]->m_tszCapsNode, _T("http://talk.google.com/xmpp/bot/caps"))) {
if (p) *p = 0;
return dest;
}
diff --git a/protocols/JabberG/src/jabber_xml.cpp b/protocols/JabberG/src/jabber_xml.cpp index 4ed2769df8..a083e92ca1 100644 --- a/protocols/JabberG/src/jabber_xml.cpp +++ b/protocols/JabberG/src/jabber_xml.cpp @@ -254,7 +254,7 @@ HXML __fastcall xmlGetNthChild(HXML hXml, LPCTSTR tag, int nth) HXML n = xi.getChild(hXml, i);
if (!n)
break;
- if (!lstrcmp(tag, xmlGetName(n))) {
+ if (!mir_tstrcmp(tag, xmlGetName(n))) {
if (num == nth)
return n;
@@ -294,7 +294,7 @@ void XPath::ProcessPath(LookupInfo &info, bool bCreate) }
else if (info.nodeIndex) {
int idx = _ttoi(info.nodeIndex.p);
- m_hXml = lstrcmp(nodeName, _T("*")) ? xmlGetNthChild(m_hXml, nodeName, idx) : xmlGetChild(m_hXml, idx - 1);
+ m_hXml = mir_tstrcmp(nodeName, _T("*")) ? xmlGetNthChild(m_hXml, nodeName, idx) : xmlGetChild(m_hXml, idx - 1);
}
else {
HXML hXml = xmlGetChild(m_hXml, nodeName);
diff --git a/protocols/JabberG/src/jabber_xml.h b/protocols/JabberG/src/jabber_xml.h index a1031c9781..a765e09a80 100644 --- a/protocols/JabberG/src/jabber_xml.h +++ b/protocols/JabberG/src/jabber_xml.h @@ -258,11 +258,11 @@ public: }
__forceinline bool operator== (TCHAR *str)
{
- return !lstrcmp((LPCTSTR)*this, str);
+ return !mir_tstrcmp((LPCTSTR)*this, str);
}
__forceinline bool operator!= (TCHAR *str)
{
- return lstrcmp((LPCTSTR)*this, str) ? true : false;
+ return mir_tstrcmp((LPCTSTR)*this, str) ? true : false;
}
HXML operator[] (int idx)
{
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index fe209b5ef8..58f55518cd 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -678,7 +678,7 @@ void CPepMood::SetMood(MCONTACT hContact, const TCHAR *szMood, const TCHAR *szTe char* p = mir_t2a(szMood);
for (int i = 1; i < SIZEOF(g_arrMoods); i++)
- if (!lstrcmpA(g_arrMoods[i].szTag, p)) {
+ if (!mir_strcmp(g_arrMoods[i].szTag, p)) {
mood = i;
break;
}
@@ -931,9 +931,9 @@ char *ActivityGetFirst(char *szId) bool found_second = false;
while (id >= 0) {
- if (g_arrActivities[id].szFirst && (found_second || !lstrcmpA(g_arrActivities[id].szFirst, szId)))
+ if (g_arrActivities[id].szFirst && (found_second || !mir_strcmp(g_arrActivities[id].szFirst, szId)))
return g_arrActivities[id].szFirst;
- if (g_arrActivities[id].szSecond && !found_second && !lstrcmpA(g_arrActivities[id].szSecond, szId))
+ if (g_arrActivities[id].szSecond && !found_second && !mir_strcmp(g_arrActivities[id].szSecond, szId))
found_second = true;
--id;
}
@@ -1017,7 +1017,7 @@ void CPepActivity::ProcessItems(const TCHAR *from, HXML itemsNode) HXML n;
for (int i=0; n = xmlGetChild(actNode, i); i++) {
- if (lstrcmp(xmlGetName(n), _T("text"))) {
+ if (mir_tstrcmp(xmlGetName(n), _T("text"))) {
szFirstNode = xmlGetName(n);
HXML secondNode = xmlGetChild(n, 0);
if (szFirstNode && secondNode && xmlGetName(secondNode))
diff --git a/protocols/JabberG/src/jabber_xstatus.h b/protocols/JabberG/src/jabber_xstatus.h index cbe77aae6f..80bcf27ee9 100644 --- a/protocols/JabberG/src/jabber_xstatus.h +++ b/protocols/JabberG/src/jabber_xstatus.h @@ -115,7 +115,7 @@ public: CPepService *Find(TCHAR *node)
{
for (int i=0; i < getCount(); i++)
- if (!lstrcmp((*this)[i].GetNode(), node))
+ if (!mir_tstrcmp((*this)[i].GetNode(), node))
return &((*this)[i]);
return NULL;
}
diff --git a/protocols/JabberG/src/ui_utils.cpp b/protocols/JabberG/src/ui_utils.cpp index 696986e637..9718015fdf 100644 --- a/protocols/JabberG/src/ui_utils.cpp +++ b/protocols/JabberG/src/ui_utils.cpp @@ -1633,7 +1633,7 @@ HTREEITEM CCtrlTreeView::FindNamedItem(HTREEITEM hItem, const TCHAR *name) while (tvi.hItem) {
GetItem(&tvi);
- if (!lstrcmp(tvi.pszText, name))
+ if (!mir_tstrcmp(tvi.pszText, name))
return tvi.hItem;
tvi.hItem = GetNextSibling(tvi.hItem);
|