From d9c98bcdfca6da51a1a82dc6c0dc5996b3b6cd6d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Nov 2014 21:20:14 +0000 Subject: new sorting functions applied git-svn-id: http://svn.miranda-ng.org/main/trunk@11180 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/AimOscar/src/conv.cpp | 2 +- protocols/Dummy/src/dummy_proto.cpp | 2 +- protocols/EmLanProto/src/mlan.cpp | 4 +- protocols/GTalkExt/src/handlers.cpp | 14 ++-- protocols/GTalkExt/src/inbox.cpp | 2 +- protocols/GTalkExt/src/notifications.cpp | 6 +- protocols/GTalkExt/src/tipper_items.cpp | 4 +- protocols/Gadu-Gadu/src/groupchat.cpp | 8 +- protocols/IRCG/src/clist.cpp | 14 ++-- protocols/IRCG/src/commandmonitor.cpp | 30 +++---- protocols/IRCG/src/input.cpp | 30 +++---- protocols/IRCG/src/irclib.cpp | 4 +- protocols/IRCG/src/main.cpp | 2 +- protocols/IRCG/src/options.cpp | 2 +- protocols/IRCG/src/output.cpp | 2 +- protocols/IRCG/src/scripting.cpp | 2 +- protocols/IRCG/src/services.cpp | 8 +- protocols/IRCG/src/tools.cpp | 2 +- protocols/IRCG/src/ui_utils.cpp | 2 +- protocols/IRCG/src/userinfo.cpp | 2 +- protocols/IRCG/src/windows.cpp | 6 +- protocols/IcqOscarJ/src/icqosc_svcs.cpp | 2 +- protocols/JabberG/src/jabber.cpp | 2 +- protocols/JabberG/src/jabber_adhoc.cpp | 4 +- protocols/JabberG/src/jabber_agent.cpp | 10 +-- protocols/JabberG/src/jabber_api.cpp | 4 +- protocols/JabberG/src/jabber_archive.cpp | 12 +-- protocols/JabberG/src/jabber_bookmarks.cpp | 6 +- protocols/JabberG/src/jabber_byte.cpp | 2 +- protocols/JabberG/src/jabber_captcha.cpp | 2 +- protocols/JabberG/src/jabber_chat.cpp | 18 ++--- protocols/JabberG/src/jabber_console.cpp | 6 +- protocols/JabberG/src/jabber_disco.cpp | 18 ++--- protocols/JabberG/src/jabber_events.cpp | 4 +- protocols/JabberG/src/jabber_file.cpp | 2 +- protocols/JabberG/src/jabber_form.cpp | 28 +++---- protocols/JabberG/src/jabber_frame.cpp | 2 +- protocols/JabberG/src/jabber_ft.cpp | 4 +- protocols/JabberG/src/jabber_groupchat.cpp | 16 ++-- protocols/JabberG/src/jabber_icolib.cpp | 2 +- protocols/JabberG/src/jabber_iqid.cpp | 118 ++++++++++++++-------------- protocols/JabberG/src/jabber_iqid_muc.cpp | 6 +- protocols/JabberG/src/jabber_libstr.cpp | 2 +- protocols/JabberG/src/jabber_menu.cpp | 2 +- protocols/JabberG/src/jabber_misc.cpp | 6 +- protocols/JabberG/src/jabber_notes.cpp | 10 +-- protocols/JabberG/src/jabber_opt.cpp | 32 ++++---- protocols/JabberG/src/jabber_privacy.cpp | 18 ++--- protocols/JabberG/src/jabber_proto.cpp | 10 +-- protocols/JabberG/src/jabber_search.cpp | 8 +- protocols/JabberG/src/jabber_secur.cpp | 2 +- protocols/JabberG/src/jabber_thread.cpp | 46 +++++------ protocols/JabberG/src/jabber_treelist.cpp | 12 +-- protocols/JabberG/src/jabber_util.cpp | 10 +-- protocols/JabberG/src/jabber_xml.cpp | 4 +- protocols/JabberG/src/jabber_xml.h | 4 +- protocols/JabberG/src/jabber_xstatus.cpp | 8 +- protocols/JabberG/src/jabber_xstatus.h | 2 +- protocols/JabberG/src/ui_utils.cpp | 2 +- protocols/SkypeClassic/src/gchat.cpp | 2 +- protocols/Tlen/src/tlen_opt.cpp | 12 +-- protocols/VKontakte/src/vk_chats.cpp | 10 +-- protocols/VKontakte/src/vk_proto.cpp | 2 +- protocols/VKontakte/src/vk_thread.cpp | 12 +-- protocols/WhatsApp/src/proto.cpp | 6 +- protocols/Xfire/src/all_statusmsg.cpp | 2 +- protocols/Xfire/src/main.cpp | 10 +-- protocols/Xfire/src/options.cpp | 6 +- protocols/Xfire/src/services.cpp | 2 +- protocols/Yahoo/src/avatar.cpp | 2 +- protocols/Yahoo/src/file_transfer.cpp | 2 +- protocols/Yahoo/src/ignore.cpp | 2 +- protocols/Yahoo/src/im.cpp | 2 +- protocols/Yahoo/src/libyahoo2/libyahoo2.cpp | 2 +- protocols/Yahoo/src/main.cpp | 2 +- protocols/Yahoo/src/options.cpp | 6 +- protocols/Yahoo/src/proto.cpp | 4 +- protocols/Yahoo/src/util.cpp | 2 +- protocols/Yahoo/src/yahoo.cpp | 12 +-- 79 files changed, 347 insertions(+), 347 deletions(-) (limited to 'protocols') diff --git a/protocols/AimOscar/src/conv.cpp b/protocols/AimOscar/src/conv.cpp index d1df140180..96aff9e2e5 100644 --- a/protocols/AimOscar/src/conv.cpp +++ b/protocols/AimOscar/src/conv.cpp @@ -703,7 +703,7 @@ char* rtf_to_html(HWND hwndDlg,int DlgItem) } } } - if ( Size != isSize || Color != isColor || BackColor != isBackColor || lstrcmpA( Face, cfOld.szFaceName )) + if ( Size != isSize || Color != isColor || BackColor != isBackColor || mir_strcmp( Face, cfOld.szFaceName )) { Size=isSize; Color=isColor; diff --git a/protocols/Dummy/src/dummy_proto.cpp b/protocols/Dummy/src/dummy_proto.cpp index 2a9ddb1414..4343018c35 100644 --- a/protocols/Dummy/src/dummy_proto.cpp +++ b/protocols/Dummy/src/dummy_proto.cpp @@ -26,7 +26,7 @@ void CDummyProto::SendMsgAck(void *param) static int sttCompareProtocols(const CDummyProto *p1, const CDummyProto *p2) { - return lstrcmp(p1->m_tszUserName, p2->m_tszUserName); + return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName); } LIST dummy_Instances(1, sttCompareProtocols); diff --git a/protocols/EmLanProto/src/mlan.cpp b/protocols/EmLanProto/src/mlan.cpp index 267c17dca3..39d33a7f91 100644 --- a/protocols/EmLanProto/src/mlan.cpp +++ b/protocols/EmLanProto/src/mlan.cpp @@ -428,7 +428,7 @@ void CMLan::RecvMessageUrl(CCSDATA* ccs) ZeroMemory(&dbei,sizeof(dbei)); - if (!lstrcmpA(ccs->szProtoService, PSR_MESSAGE)) + if (!mir_strcmp(ccs->szProtoService, PSR_MESSAGE)) dbei.eventType = EVENTTYPE_MESSAGE; else dbei.eventType = EVENTTYPE_URL; @@ -438,7 +438,7 @@ void CMLan::RecvMessageUrl(CCSDATA* ccs) dbei.timestamp = pre->timestamp; dbei.flags = pre->flags&PREF_CREATEREAD?DBEF_READ:0; dbei.cbBlob = mir_tstrlen(pre->szMessage)+1; - if (!lstrcmpA(ccs->szProtoService, PSR_URL)) + if (!mir_strcmp(ccs->szProtoService, PSR_URL)) { dbei.cbBlob += 2+mir_tstrlen(pre->szMessage+dbei.cbBlob+1); } diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp index af6f5bc8f8..361c33463b 100644 --- a/protocols/GTalkExt/src/handlers.cpp +++ b/protocols/GTalkExt/src/handlers.cpp @@ -153,7 +153,7 @@ BOOL MailListHandler(IJabberInterface *ji, HXML node, void *pUserData) { LPCTSTR jidWithRes = xi.getAttrValue(node, ATTRNAME_TO); __try { - if (!node || lstrcmp(xi.getAttrValue(node, ATTRNAME_TYPE), IQTYPE_RESULT)) return TRUE; + if (!node || mir_tstrcmp(xi.getAttrValue(node, ATTRNAME_TYPE), IQTYPE_RESULT)) return TRUE; LPCTSTR jid = xi.getAttrValue(node, ATTRNAME_FROM); assert(jid); @@ -298,7 +298,7 @@ BOOL SendHandler(IJabberInterface *ji, HXML node, void *pUserData) ji->AddTemporaryIqHandler(DiscoverHandler, JABBER_IQ_TYPE_RESULT, _ttoi(ptszId+4), NULL, RESPONSE_TIMEOUT, 500); } - if ( !lstrcmp(xi.getName(node), _T("presence")) && xi.getAttrValue(node, ATTRNAME_TO) == 0) { + if ( !mir_tstrcmp(xi.getName(node), _T("presence")) && xi.getAttrValue(node, ATTRNAME_TO) == 0) { if (!gta->m_bGoogleSharedStatus) return FALSE; @@ -321,7 +321,7 @@ BOOL OnIqResultGoogleSharedStatus(IJabberInterface *ji, HXML node, void *pUserDa { GoogleTalkAcc *gta = isGoogle(LPARAM(ji)); if (gta != NULL) { - gta->m_bGoogleSharedStatus = lstrcmp(xi.getAttrValue(node, ATTRNAME_TYPE), IQTYPE_RESULT) == 0; + gta->m_bGoogleSharedStatus = mir_tstrcmp(xi.getAttrValue(node, ATTRNAME_TYPE), IQTYPE_RESULT) == 0; gta->m_bGoogleSharedStatusLock = FALSE; } return FALSE; @@ -332,7 +332,7 @@ BOOL OnIqSetGoogleSharedStatus(IJabberInterface *ji, HXML iqNode, void *pUserDat GoogleTalkAcc *gta = isGoogle(LPARAM(ji)); if (gta == NULL) return FALSE; - if (lstrcmp(xi.getAttrValue(iqNode, ATTRNAME_TYPE), IQTYPE_SET)) + if (mir_tstrcmp(xi.getAttrValue(iqNode, ATTRNAME_TYPE), IQTYPE_SET)) return FALSE; if (gta->m_bGoogleSharedStatusLock) return TRUE; @@ -368,12 +368,12 @@ void GoogleTalkAcc::SendIqGoogleSharedStatus(LPCTSTR status, LPCTSTR msg) xi.addAttrInt(query, _T("version"), 2); HXML statNode = xi.addChild(query, _T("status"), msg); - if ( !lstrcmp(status, _T("invisible"))) { + if ( !mir_tstrcmp(status, _T("invisible"))) { xi.addChild(query, _T("show"), _T("default")); xi.addAttr( xi.addChild(query, _T("invisible"), 0), _T("value"), _T("true")); } else { - if ( !lstrcmp(status, _T("dnd"))) + if ( !mir_tstrcmp(status, _T("dnd"))) xi.addChild(query, _T("show"), _T("dnd")); else xi.addChild(query, _T("show"), _T("default")); @@ -394,7 +394,7 @@ int OnServerDiscoInfo(WPARAM wParam, LPARAM lParam) // m_ThreadInfo->jabberServerCaps |= JABBER_CAPS_PING; JABBER_DISCO_FIELD *fld = (JABBER_DISCO_FIELD*)wParam; - if ( !lstrcmp(fld->category, _T("server")) && !lstrcmp(fld->type, _T("im")) && !lstrcmp(fld->name, _T("Google Talk"))) { + if ( !mir_tstrcmp(fld->category, _T("server")) && !mir_tstrcmp(fld->type, _T("im")) && !mir_tstrcmp(fld->name, _T("Google Talk"))) { HXML iq = xi.createNode(NODENAME_IQ, NULL, FALSE); xi.addAttr(iq, ATTRNAME_TYPE, IQTYPE_GET); diff --git a/protocols/GTalkExt/src/inbox.cpp b/protocols/GTalkExt/src/inbox.cpp index 6ac9790478..6cf8958914 100644 --- a/protocols/GTalkExt/src/inbox.cpp +++ b/protocols/GTalkExt/src/inbox.cpp @@ -221,7 +221,7 @@ void OpenContactInbox(LPCSTR szModuleName) *host++ = 0; TCHAR buf[1024]; - if (lstrcmpi(host, COMMON_GMAIL_HOST1) && lstrcmpi(host, COMMON_GMAIL_HOST2)) + if (mir_tstrcmpi(host, COMMON_GMAIL_HOST1) && mir_tstrcmpi(host, COMMON_GMAIL_HOST2)) mir_sntprintf(buf, SIZEOF(buf), INBOX_URL_FORMAT, _T("a/"), host); // hosted else mir_sntprintf(buf, SIZEOF(buf), INBOX_URL_FORMAT, _T(""), _T("mail")); // common diff --git a/protocols/GTalkExt/src/notifications.cpp b/protocols/GTalkExt/src/notifications.cpp index 5acef31604..ebd601737d 100644 --- a/protocols/GTalkExt/src/notifications.cpp +++ b/protocols/GTalkExt/src/notifications.cpp @@ -55,7 +55,7 @@ LPCSTR GetJidAcc(LPCTSTR jid) for (int i=0; i < count; i++) { if ( getJabberApi(protos[i]->szModuleName)) { ptrT tszJid( db_get_tsa(0, protos[i]->szModuleName, "jid")); - if ( !lstrcmpi(jid, tszJid)) + if ( !mir_tstrcmpi(jid, tszJid)) return protos[i]->szModuleName; } } @@ -158,7 +158,7 @@ static bool DoAddPopup(POPUPDATAT *data) void FormatPseudocontactDisplayName(LPTSTR buff, LPCTSTR jid, LPCTSTR unreadCount) { - if (lstrcmp(unreadCount, _T("0"))) + if (mir_tstrcmp(unreadCount, _T("0"))) wsprintf(buff, _T("%s [%s]"), jid, unreadCount); //!!!!!!!!!!! else wsprintf(buff, _T("%s"), jid); //!!!!!!!!!!! @@ -322,7 +322,7 @@ BOOL CALLBACK ClosePopupFunc(__in HWND hwnd, __in LPARAM lParam) if (!ppdh) return TRUE; - if (!lstrcmpi(ppis->url, ppdh->url) && !lstrcmpi(ppis->jid, ppdh->jid)) + if (!mir_tstrcmpi(ppis->url, ppdh->url) && !mir_tstrcmpi(ppis->jid, ppdh->jid)) SendMessage(hwnd, MESSAGE_CLOSEPOPUP, 0, 0); return TRUE; diff --git a/protocols/GTalkExt/src/tipper_items.cpp b/protocols/GTalkExt/src/tipper_items.cpp index 53db8d216e..e2420305b9 100644 --- a/protocols/GTalkExt/src/tipper_items.cpp +++ b/protocols/GTalkExt/src/tipper_items.cpp @@ -82,7 +82,7 @@ void SetLabelProp(int index, LPSTR setting) if (tszLastWritten == NULL) return; - if ( !lstrcmp(tszProp, tszLastWritten)) { + if ( !mir_tstrcmp(tszProp, tszLastWritten)) { LPTSTR label = TranslateTS(UNREAD_THREADS_LABEL); db_set_ts(0, SHORT_PLUGIN_NAME, LAST_WRITTEN_LABEL_SETTING, label); db_set_ts(0, TIPPER_ITEMS_MOD_NAME, setting, label); @@ -105,7 +105,7 @@ void AddTipperItem() mir_snprintf(setting, l, VALUE_SETTING_PROP, i); ptrT tszSetting( db_get_tsa(0, TIPPER_ITEMS_MOD_NAME, setting)); if (tszSetting) { - if ( !lstrcmp(UNREAD_THREADS_RAW, tszSetting)) { + if ( !mir_tstrcmp(UNREAD_THREADS_RAW, tszSetting)) { SetLabelProp(i, setting); return; } diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp index 97b3eea6a5..6c1abc6c9c 100644 --- a/protocols/Gadu-Gadu/src/groupchat.cpp +++ b/protocols/Gadu-Gadu/src/groupchat.cpp @@ -124,7 +124,7 @@ int GGPROTO::gc_event(WPARAM wParam, LPARAM lParam) || !gch->pDest || !gch->pDest->ptszID || !gch->pDest->pszModule - || lstrcmpiA(gch->pDest->pszModule, m_szModuleName) + || mir_strcmpi(gch->pDest->pszModule, m_szModuleName) || !(uin = getDword(GG_KEY_UIN, 0)) || !(chat = gc_lookup(gch->pDest->ptszID))) return 0; @@ -392,12 +392,12 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count static MCONTACT gg_getsubcontact(GGPROTO* gg, MCONTACT hContact) { char* szProto = GetContactProto(hContact); - if (szProto && !lstrcmpA(szProto, META_PROTO)) { + if (szProto && !mir_strcmp(szProto, META_PROTO)) { int nSubContacts = db_mc_getSubCount(hContact), i; for (i = 0; i < nSubContacts; i++) { MCONTACT hMetaContact = db_mc_getSub(hContact, i); szProto = GetContactProto(hMetaContact); - if (szProto && !lstrcmpA(szProto, gg->m_szModuleName)) + if (szProto && !mir_strcmp(szProto, gg->m_szModuleName)) return hMetaContact; } } @@ -526,7 +526,7 @@ static INT_PTR CALLBACK gg_gc_openconfdlg(HWND hwndDlg, UINT message, WPARAM wPa uin = (uin_t)gg->getDword(hContact, GG_KEY_UIN, 0); } - if (szProto == NULL || lstrcmpA(szProto, gg->m_szModuleName) || !uin || uin == gg->getDword(GG_KEY_UIN, 0)) + if (szProto == NULL || mir_strcmp(szProto, gg->m_szModuleName) || !uin || uin == gg->getDword(GG_KEY_UIN, 0)) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_DELETEITEM, (WPARAM)hItem, 0); } } diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp index 17373420c2..a4b9913dc1 100644 --- a/protocols/IRCG/src/clist.cpp +++ b/protocols/IRCG/src/clist.cpp @@ -182,24 +182,24 @@ MCONTACT CIrcProto::CList_FindContact(CONTACT *user) if (DBWildcard) CharLower(DBWildcard); if (IsChannel(user->name)) { - if (DBDefault && !lstrcmpi(DBDefault, user->name)) + if (DBDefault && !mir_tstrcmpi(DBDefault, user->name)) hContact_temp = (MCONTACT)-1; } - else if (user->ExactNick && DBNick && !lstrcmpi(DBNick, user->name)) + else if (user->ExactNick && DBNick && !mir_tstrcmpi(DBNick, user->name)) hContact_temp = hContact; - else if (user->ExactOnly && DBDefault && !lstrcmpi(DBDefault, user->name)) + else if (user->ExactOnly && DBDefault && !mir_tstrcmpi(DBDefault, user->name)) hContact_temp = hContact; else if (user->ExactWCOnly) { - if (DBWildcard && !lstrcmpi(DBWildcard, lowercasename) - || (DBWildcard && !lstrcmpi(DBNick, lowercasename) && !WCCmp(DBWildcard, lowercasename)) - || (!DBWildcard && !lstrcmpi(DBNick, lowercasename))) { + if (DBWildcard && !mir_tstrcmpi(DBWildcard, lowercasename) + || (DBWildcard && !mir_tstrcmpi(DBNick, lowercasename) && !WCCmp(DBWildcard, lowercasename)) + || (!DBWildcard && !mir_tstrcmpi(DBNick, lowercasename))) { hContact_temp = hContact; } } else if (_tcschr(user->name, ' ') == 0) { - if ((DBDefault && !lstrcmpi(DBDefault, user->name) || DBNick && !lstrcmpi(DBNick, user->name) || + if ((DBDefault && !mir_tstrcmpi(DBDefault, user->name) || DBNick && !mir_tstrcmpi(DBNick, user->name) || DBWildcard && WCCmp(DBWildcard, lowercasename)) && (WCCmp(DBUser, user->user) && WCCmp(DBHost, user->host))) { hContact_temp = hContact; diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 5bc6b89aa5..4c5236b898 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -659,7 +659,7 @@ bool CIrcProto::OnIrc_INVITE(const CIrcMessage* pmsg) if (pmsg->m_bIncoming && (m_ignore && IsIgnored(pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'i'))) return true; - if (pmsg->m_bIncoming && m_joinOnInvite && pmsg->parameters.getCount() > 1 && lstrcmpi(pmsg->parameters[0].c_str(), m_info.sNick.c_str()) == 0) + if (pmsg->m_bIncoming && m_joinOnInvite && pmsg->parameters.getCount() > 1 && mir_tstrcmpi(pmsg->parameters[0].c_str(), m_info.sNick.c_str()) == 0) PostIrcMessage(_T("/JOIN %s"), pmsg->parameters[1].c_str()); ShowMessage(pmsg); @@ -1196,7 +1196,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) // if the whois window is visible and the ctcp reply belongs to the user in it, then show the reply in the whois window if (m_whoisDlg && IsWindowVisible(m_whoisDlg->GetHwnd())) { m_whoisDlg->m_InfoNick.GetText(szTemp, SIZEOF(szTemp)); - if (lstrcmpi(szTemp, pmsg->prefix.sNick.c_str()) == 0) { + if (mir_tstrcmpi(szTemp, pmsg->prefix.sNick.c_str()) == 0) { if (pmsg->m_bIncoming && (command == _T("version") || command == _T("userinfo") || command == _T("time"))) { SetActiveWindow(m_whoisDlg->GetHwnd()); m_whoisDlg->m_Reply.SetText(DoColorCodes(GetWordAddress(mess.c_str(), 1), TRUE, FALSE)); @@ -1256,7 +1256,7 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) while (_tcschr(sUserModePrefixes.c_str(), name[index])) index++; - if (!lstrcmpi(name.Mid(index, name.GetLength()).c_str(), m_info.sNick.c_str())) { + if (!mir_tstrcmpi(name.Mid(index, name.GetLength()).c_str(), m_info.sNick.c_str())) { bFlag = true; break; } @@ -1315,7 +1315,7 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) gce.ptszUID = sTemp.c_str(); gce.ptszNick = sTemp.c_str(); gce.ptszStatus = sStat.c_str(); - BOOL bIsMe = (!lstrcmpi(gce.ptszNick, m_info.sNick.c_str())) ? TRUE : FALSE; + BOOL bIsMe = (!mir_tstrcmpi(gce.ptszNick, m_info.sNick.c_str())) ? TRUE : FALSE; if (bIsMe) { char BitNr = -1; switch (sTemp2[0]) { @@ -1362,7 +1362,7 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) wi->codepage = getCodepage(); DoEvent(GC_EVENT_SETITEMDATA, sChanName, NULL, NULL, NULL, NULL, (DWORD_PTR)wi, false, false, 0); - if (!sTopic.IsEmpty() && !lstrcmpi(GetWord(sTopic.c_str(), 0).c_str(), sChanName)) { + if (!sTopic.IsEmpty() && !mir_tstrcmpi(GetWord(sTopic.c_str(), 0).c_str(), sChanName)) { DoEvent(GC_EVENT_TOPIC, sChanName, sTopicName.IsEmpty() ? NULL : sTopicName.c_str(), GetWordAddress(sTopic.c_str(), 1), NULL, sTopicTime.IsEmpty() ? NULL : sTopicTime.c_str(), NULL, true, false); AddWindowItemData(sChanName, 0, 0, 0, GetWordAddress(sTopic.c_str(), 1)); sTopic = _T(""); @@ -1394,7 +1394,7 @@ bool CIrcProto::OnIrc_ENDNAMES(const CIrcMessage* pmsg) i++; if (!command.IsEmpty()) { CMString S = command.Mid(1, command.GetLength()); - if (!lstrcmpi(sChanName, S.c_str())) + if (!mir_tstrcmpi(sChanName, S.c_str())) break; save += command + _T(" "); @@ -1967,18 +1967,18 @@ bool CIrcProto::OnIrc_WHO_END(const CIrcMessage* pmsg) nick = GetWord(p1, 0); user = GetWord(p1, 1); host = GetWord(p1, 2); - if ((DBWildcard && WCCmp(DBWildcard, nick.c_str()) || DBNick && !lstrcmpi(DBNick, nick.c_str()) || DBDefault && !lstrcmpi(DBDefault, nick.c_str())) + if ((DBWildcard && WCCmp(DBWildcard, nick.c_str()) || DBNick && !mir_tstrcmpi(DBNick, nick.c_str()) || DBDefault && !mir_tstrcmpi(DBDefault, nick.c_str())) && (WCCmp(DBUser, user.c_str()) && WCCmp(DBHost, host.c_str()))) { if (away[0] == 'G' && getWord(hContact, "Status", ID_STATUS_OFFLINE) != ID_STATUS_AWAY) setWord(hContact, "Status", ID_STATUS_AWAY); else if (away[0] == 'H' && getWord(hContact, "Status", ID_STATUS_OFFLINE) != ID_STATUS_ONLINE) setWord(hContact, "Status", ID_STATUS_ONLINE); - if ((DBNick && lstrcmpi(nick.c_str(), DBNick)) || !DBNick) + if ((DBNick && mir_tstrcmpi(nick.c_str(), DBNick)) || !DBNick) setTString(hContact, "Nick", nick.c_str()); - if ((DBManUser && lstrcmpi(user.c_str(), DBManUser)) || !DBManUser) + if ((DBManUser && mir_tstrcmpi(user.c_str(), DBManUser)) || !DBManUser) setTString(hContact, "User", user.c_str()); - if ((DBManHost && lstrcmpi(host.c_str(), DBManHost)) || !DBManHost) + if ((DBManHost && mir_tstrcmpi(host.c_str(), DBManHost)) || !DBManHost) setTString(hContact, "Host", host.c_str()); return true; } @@ -2014,7 +2014,7 @@ bool CIrcProto::OnIrc_WHO_REPLY(const CIrcMessage* pmsg) CMString command = PeekAtReasons(2); if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 6 && command[0] == 'S') { m_whoReply.AppendFormat(_T("%s %s %s %s "), pmsg->parameters[5].c_str(), pmsg->parameters[2].c_str(), pmsg->parameters[3].c_str(), pmsg->parameters[6].c_str()); - if (lstrcmpi(pmsg->parameters[5].c_str(), m_info.sNick.c_str()) == 0) { + if (mir_tstrcmpi(pmsg->parameters[5].c_str(), m_info.sNick.c_str()) == 0) { TCHAR host[1024]; mir_tstrncpy(host, pmsg->parameters[3].c_str(), 1024); ForkThread(&CIrcProto::ResolveIPThread, new IPRESOLVE(_T2A(host), IP_AUTO)); @@ -2117,7 +2117,7 @@ bool CIrcProto::OnIrc_USERHOST_REPLY(const CIrcMessage* pmsg) // If user found, remove from checklist for (int i = 0; i < checklist.getCount(); i++) - if (!lstrcmpi(checklist[i].c_str(), nick.c_str())) + if (!mir_tstrcmpi(checklist[i].c_str(), nick.c_str())) checklist.remove(i); } } @@ -2415,12 +2415,12 @@ int CIrcProto::IsIgnored(CMString user, char type) for (int i = 0; i < m_ignoreItems.getCount(); i++) { const CIrcIgnoreItem& C = m_ignoreItems[i]; - if (type == 0 && !lstrcmpi(user.c_str(), C.mask.c_str())) + if (type == 0 && !mir_tstrcmpi(user.c_str(), C.mask.c_str())) return i + 1; bool bUserContainsWild = (_tcschr(user.c_str(), '*') != NULL || _tcschr(user.c_str(), '?') != NULL); if (!bUserContainsWild && WCCmp(C.mask.c_str(), user.c_str()) || - bUserContainsWild && !lstrcmpi(user.c_str(), C.mask.c_str())) { + bUserContainsWild && !mir_tstrcmpi(user.c_str(), C.mask.c_str())) { if (C.flags.IsEmpty() || C.flags[0] != '+') continue; @@ -2430,7 +2430,7 @@ int CIrcProto::IsIgnored(CMString user, char type) if (C.network.IsEmpty()) return i + 1; - if (IsConnected() && !lstrcmpi(C.network.c_str(), m_info.sNetwork.c_str())) + if (IsConnected() && !mir_tstrcmpi(C.network.c_str(), m_info.sNetwork.c_str())) return i + 1; } } diff --git a/protocols/IRCG/src/input.cpp b/protocols/IRCG/src/input.cpp index 019ac57cb2..9c66bffb8e 100644 --- a/protocols/IRCG/src/input.cpp +++ b/protocols/IRCG/src/input.cpp @@ -251,7 +251,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, MCONTACT hConta else S = MakeWndID(one.c_str()); } - else if (lstrcmpi(window, SERVERWINDOW) == 0) + else if (mir_tstrcmpi(window, SERVERWINDOW) == 0) S = window; else S = MakeWndID(window); @@ -273,12 +273,12 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, MCONTACT hConta DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Ignore system is disabled"), NULL, NULL, NULL, true, false); return true; } - if (!lstrcmpi(one.c_str(), _T("on"))) { + if (!mir_tstrcmpi(one.c_str(), _T("on"))) { m_ignore = 1; DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Ignore system is enabled"), NULL, NULL, NULL, true, false); return true; } - if (!lstrcmpi(one.c_str(), _T("off"))) { + if (!mir_tstrcmpi(one.c_str(), _T("off"))) { m_ignore = 0; DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Ignore system is disabled"), NULL, NULL, NULL, true, false); return true; @@ -385,12 +385,12 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, MCONTACT hConta if (one.IsEmpty()) return true; - if (!lstrcmpi(one.c_str(), _T("on"))) { + if (!mir_tstrcmpi(one.c_str(), _T("on"))) { bEcho = TRUE; DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Outgoing commands are shown"), NULL, NULL, NULL, true, false); } - if (!lstrcmpi(one.c_str(), _T("off"))) { + if (!mir_tstrcmpi(one.c_str(), _T("off"))) { DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("Outgoing commands are not shown"), NULL, NULL, NULL, true, false); bEcho = FALSE; } @@ -406,17 +406,17 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, MCONTACT hConta DoEvent(GC_EVENT_INFORMATION, NULL, m_info.sNick.c_str(), TranslateT("The buddy check function is disabled"), NULL, NULL, NULL, true, false); return true; } - if (!lstrcmpi(one.c_str(), _T("on"))) { + if (!mir_tstrcmpi(one.c_str(), _T("on"))) { bTempForceCheck = true; bTempDisableCheck = false; CallFunctionAsync(sttSetTimerOn, this); } - if (!lstrcmpi(one.c_str(), _T("off"))) { + if (!mir_tstrcmpi(one.c_str(), _T("off"))) { bTempForceCheck = false; bTempDisableCheck = true; CallFunctionAsync(sttSetTimerOff, this); } - if (!lstrcmpi(one.c_str(), _T("time")) && !two.IsEmpty()) { + if (!mir_tstrcmpi(one.c_str(), _T("time")) && !two.IsEmpty()) { m_iTempCheckTime = StrToInt(two.c_str()); if (m_iTempCheckTime < 10 && m_iTempCheckTime != 0) m_iTempCheckTime = 10; @@ -597,15 +597,15 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, MCONTACT hConta ulAdr = ConvertIPToInteger(m_IPFromServer ? m_myHost : m_myLocalHost); // if it is not dcc or if it is dcc and a local ip exist - if (lstrcmpi(two.c_str(), _T("dcc")) != 0 || ulAdr) { - if (lstrcmpi(two.c_str(), _T("ping")) == 0) + if (mir_tstrcmpi(two.c_str(), _T("dcc")) != 0 || ulAdr) { + if (mir_tstrcmpi(two.c_str(), _T("ping")) == 0) mir_sntprintf(szTemp, SIZEOF(szTemp), _T("/PRIVMSG %s \001%s %u\001"), one.c_str(), two.c_str(), time(0)); else mir_sntprintf(szTemp, SIZEOF(szTemp), _T("/PRIVMSG %s \001%s\001"), one.c_str(), GetWordAddress(text.c_str(), 2)); PostIrcMessageWnd(window, hContact, szTemp); } - if (lstrcmpi(two.c_str(), _T("dcc")) != 0) { + if (mir_tstrcmpi(two.c_str(), _T("dcc")) != 0) { mir_sntprintf(szTemp, SIZEOF(szTemp), TranslateT("CTCP %s request sent to %s"), two.c_str(), one.c_str()); DoEvent(GC_EVENT_INFORMATION, SERVERWINDOW, m_info.sNick.c_str(), szTemp, NULL, NULL, NULL, true, false); } @@ -617,7 +617,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, MCONTACT hConta if (one.IsEmpty() || two.IsEmpty()) return true; - if (lstrcmpi(one.c_str(), _T("send")) == 0) { + if (mir_tstrcmpi(one.c_str(), _T("send")) == 0) { TCHAR szTemp[1000]; unsigned long ulAdr = 0; @@ -667,7 +667,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, MCONTACT hConta return true; } - if (lstrcmpi(one.c_str(), _T("chat")) == 0) { + if (mir_tstrcmpi(one.c_str(), _T("chat")) == 0) { TCHAR szTemp[1000]; unsigned long ulAdr = 0; @@ -826,7 +826,7 @@ bool CIrcProto::PostIrcMessageWnd(TCHAR* window, MCONTACT hContact, const TCHAR* else mir_tstrncpy(windowname, SERVERWINDOW, 255); - if (lstrcmpi(window, SERVERWINDOW) != 0) { + if (mir_tstrcmpi(window, SERVERWINDOW) != 0) { TCHAR* p1 = _tcschr(windowname, ' '); if (p1) *p1 = '\0'; @@ -885,7 +885,7 @@ bool CIrcProto::PostIrcMessageWnd(TCHAR* window, MCONTACT hContact, const TCHAR* ((GetWord(DoThis.c_str(), 0)[0] == '/') && (GetWord(DoThis.c_str(), 0)[1] == '/')) || // or double backslash at the beginning hContact) { CMString S = _T("/PRIVMSG "); - if (lstrcmpi(window, SERVERWINDOW) == 0 && !m_info.sServerName.IsEmpty()) + if (mir_tstrcmpi(window, SERVERWINDOW) == 0 && !m_info.sServerName.IsEmpty()) S += m_info.sServerName + _T(" ") + DoThis; else S += CMString(windowname) + _T(" ") + DoThis; diff --git a/protocols/IRCG/src/irclib.cpp b/protocols/IRCG/src/irclib.cpp index 9cea32cdf6..3a08e3b817 100644 --- a/protocols/IRCG/src/irclib.cpp +++ b/protocols/IRCG/src/irclib.cpp @@ -29,7 +29,7 @@ int CDccSession::nDcc = 0; static int CompareHandlers( const CIrcHandler* p1, const CIrcHandler* p2 ) { - return lstrcmp( p1->m_name, p2->m_name ); + return mir_tstrcmp( p1->m_name, p2->m_name ); } OBJLIST CIrcProto::m_handlers( 30, CompareHandlers ); @@ -525,7 +525,7 @@ CDccSession* CIrcProto::FindDCCRecvByPortAndName(int iPort, const TCHAR* szName) CDccSession* p = m_dcc_xfers[i]; DBVARIANT dbv; if (!getTString(p->di->hContact, "Nick", &dbv)) { - if (p->di->iType == DCC_SEND && !p->di->bSender && !lstrcmpi(szName, dbv.ptszVal) && iPort == p->di->iPort) { + if (p->di->iType == DCC_SEND && !p->di->bSender && !mir_tstrcmpi(szName, dbv.ptszVal) && iPort == p->di->iPort) { db_free(&dbv); return p; } diff --git a/protocols/IRCG/src/main.cpp b/protocols/IRCG/src/main.cpp index f7e10448e5..e5d7dc7e3a 100644 --- a/protocols/IRCG/src/main.cpp +++ b/protocols/IRCG/src/main.cpp @@ -28,7 +28,7 @@ int hLangpack; static int CompareServers( const SERVER_INFO* p1, const SERVER_INFO* p2 ) { - return lstrcmpA( p1->m_name, p2->m_name ); + return mir_strcmp( p1->m_name, p2->m_name ); } OBJLIST g_servers( 20, CompareServers ); diff --git a/protocols/IRCG/src/options.cpp b/protocols/IRCG/src/options.cpp index 83e83cd725..ce0aaec509 100644 --- a/protocols/IRCG/src/options.cpp +++ b/protocols/IRCG/src/options.cpp @@ -1303,7 +1303,7 @@ static int CALLBACK IgnoreListSort(LPARAM lParam1, LPARAM lParam2, LPARAM lParam hwndDlg->m_list.GetItem(&lvm); if (temp1[0] && temp2[0]) - return lstrcmpi(temp1, temp2); + return mir_tstrcmpi(temp1, temp2); return (temp1[0] == 0) ? 1 : -1; } diff --git a/protocols/IRCG/src/output.cpp b/protocols/IRCG/src/output.cpp index 69a3c69335..016918f612 100644 --- a/protocols/IRCG/src/output.cpp +++ b/protocols/IRCG/src/output.cpp @@ -89,7 +89,7 @@ static CMString FormatOutput(const CIrcMessage* pmsg) tempstr.Delete(0, 1); tempstr.Delete(tempstr.GetLength() - 1, 1); CMString type = GetWord(tempstr.c_str(), 0); - if (lstrcmpi(type.c_str(), _T("ping")) == 0) + if (mir_tstrcmpi(type.c_str(), _T("ping")) == 0) mir_sntprintf(temp, SIZEOF(temp), TranslateT("CTCP %s reply sent to %s"), type.c_str(), pmsg->parameters[0].c_str()); else mir_sntprintf(temp, SIZEOF(temp), TranslateT("CTCP %s reply sent to %s: %s"), type.c_str(), pmsg->parameters[0].c_str(), GetWordAddress(tempstr.c_str(), 1)); diff --git a/protocols/IRCG/src/scripting.cpp b/protocols/IRCG/src/scripting.cpp index 3f2b63b4a6..4b18be6f63 100644 --- a/protocols/IRCG/src/scripting.cpp +++ b/protocols/IRCG/src/scripting.cpp @@ -172,7 +172,7 @@ INT_PTR __cdecl CIrcProto::Scripting_GetIrcData(WPARAM, LPARAM lparam) gci.pszModule = m_szModuleName; gci.iItem = j; if (!CallServiceSync(MS_GC_GETINFO, 0, (LPARAM)&gci)) { - if (lstrcmpi(gci.pszID, SERVERWINDOW)) { + if (mir_tstrcmpi(gci.pszID, SERVERWINDOW)) { CMString S1 = gci.pszID; int k = S1.Find(_T(" ")); if (k != -1) diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index b7a9f14381..085cc2b898 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -504,7 +504,7 @@ int __cdecl CIrcProto::GCEventHook(WPARAM wParam, LPARAM lParam) // handle the hook if (gch) { - if (!lstrcmpiA(gch->pDest->pszModule, m_szModuleName)) { + if (!mir_strcmpi(gch->pDest->pszModule, m_szModuleName)) { TCHAR *p1 = mir_tstrdup(gch->pDest->ptszID); TCHAR *p2 = _tcsstr(p1, _T(" - ")); if (p2) @@ -850,9 +850,9 @@ int __cdecl CIrcProto::GCMenuHook(WPARAM, LPARAM lParam) { GCMENUITEMS *gcmi = (GCMENUITEMS*)lParam; if (gcmi) { - if (!lstrcmpiA(gcmi->pszModule, m_szModuleName)) { + if (!mir_strcmpi(gcmi->pszModule, m_szModuleName)) { if (gcmi->Type == MENU_ON_LOG) { - if (lstrcmpi(gcmi->pszID, SERVERWINDOW)) { + if (mir_tstrcmpi(gcmi->pszID, SERVERWINDOW)) { gcmi->nItems = SIZEOF(logItems); gcmi->Item = logItems; } @@ -932,7 +932,7 @@ int __cdecl CIrcProto::OnMenuPreBuild(WPARAM hContact, LPARAM) return 0; char *szProto = GetContactProto(hContact); - if (szProto && !lstrcmpiA(szProto, m_szModuleName)) { + if (szProto && !mir_strcmpi(szProto, m_szModuleName)) { bool bIsOnline = getWord(hContact, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE; // context menu for chatrooms diff --git a/protocols/IRCG/src/tools.cpp b/protocols/IRCG/src/tools.cpp index 30c1e217f2..45c7ded352 100644 --- a/protocols/IRCG/src/tools.cpp +++ b/protocols/IRCG/src/tools.cpp @@ -400,7 +400,7 @@ INT_PTR CIrcProto::DoEvent(int iEvent, const TCHAR* pszWindow, const TCHAR* pszN } if (pszWindow) { - if (lstrcmpi(pszWindow, SERVERWINDOW)) + if (mir_tstrcmpi(pszWindow, SERVERWINDOW)) sID = pszWindow + (CMString)_T(" - ") + m_info.sNetwork; else sID = pszWindow; diff --git a/protocols/IRCG/src/ui_utils.cpp b/protocols/IRCG/src/ui_utils.cpp index daaa364a14..d1e999f7bc 100644 --- a/protocols/IRCG/src/ui_utils.cpp +++ b/protocols/IRCG/src/ui_utils.cpp @@ -1341,7 +1341,7 @@ HTREEITEM CCtrlTreeView::FindNamedItem(HTREEITEM hItem, const TCHAR *name) { GetItem(&tvi); - if (!lstrcmp(tvi.pszText, name)) + if (!mir_tstrcmp(tvi.pszText, name)) return tvi.hItem; tvi.hItem = GetNextSibling(tvi.hItem); diff --git a/protocols/IRCG/src/userinfo.cpp b/protocols/IRCG/src/userinfo.cpp index c5389d8607..ffcdbdc785 100644 --- a/protocols/IRCG/src/userinfo.cpp +++ b/protocols/IRCG/src/userinfo.cpp @@ -190,7 +190,7 @@ int __cdecl CIrcProto::OnInitUserInfo(WPARAM wParam, LPARAM lParam) { MCONTACT hContact = lParam; char *szProto = GetContactProto(hContact); - if (!hContact || !szProto || lstrcmpiA(szProto, m_szModuleName)) + if (!hContact || !szProto || mir_strcmpi(szProto, m_szModuleName)) return 0; if (isChatRoom(hContact)) diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp index 0e48fc7432..136ee34f50 100644 --- a/protocols/IRCG/src/windows.cpp +++ b/protocols/IRCG/src/windows.cpp @@ -434,7 +434,7 @@ static int CALLBACK ListViewSort(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSo param->pList->GetItem(&lvm); if (param->iSubItem != 1) { if (mir_tstrlen(temp1) != 0 && mir_tstrlen(temp2) != 0) - return lstrcmpi(temp1, temp2); + return mir_tstrcmpi(temp1, temp2); return (*temp1 == 0) ? 1 : -1; } @@ -637,7 +637,7 @@ void CQuickDlg::OnOk(CCtrlButton*) TCHAR windowname[20]; GetWindowText(m_hwnd, windowname, SIZEOF(windowname)); - if (lstrcmpi(windowname, _T("Miranda IRC")) == 0) { + if (mir_tstrcmpi(windowname, _T("Miranda IRC")) == 0) { m_proto->m_serverComboSelection = m_serverCombo.GetCurSel() - 1; m_proto->setDword("ServerComboSelection", m_proto->m_serverComboSelection); m_proto->setString("ServerName", m_proto->m_serverName); @@ -1171,7 +1171,7 @@ void CManagerDlg::OnApplyModes(CCtrlButton*) else if (GetWindowTextLength(GetDlgItem(m_hwnd, IDC_LIMIT))) { TCHAR temp[15]; GetDlgItemText(m_hwnd, IDC_LIMIT, temp, SIZEOF(temp)); - if (wi->pszLimit && lstrcmpi(wi->pszLimit, temp)) { + if (wi->pszLimit && mir_tstrcmpi(wi->pszLimit, temp)) { mir_tstrcat(toadd, _T("l")); appendixadd += _T(" ") + CMString(temp); } diff --git a/protocols/IcqOscarJ/src/icqosc_svcs.cpp b/protocols/IcqOscarJ/src/icqosc_svcs.cpp index 5c91037b7c..7f64de8f3a 100644 --- a/protocols/IcqOscarJ/src/icqosc_svcs.cpp +++ b/protocols/IcqOscarJ/src/icqosc_svcs.cpp @@ -501,7 +501,7 @@ INT_PTR CIcqProto::SetMyAvatar(WPARAM wParam, LPARAM lParam) TCHAR tszMyFile[MAX_PATH + 1]; GetFullAvatarFileName(0, NULL, dwPaFormat, tszMyFile, MAX_PATH); // if not in our storage, copy - if (lstrcmp(tszFile, tszMyFile) && !CopyFile(tszFile, tszMyFile, FALSE)) { + if (mir_tstrcmp(tszFile, tszMyFile) && !CopyFile(tszFile, tszMyFile, FALSE)) { debugLogA("Failed to copy our avatar to local storage."); return iRet; } 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 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 = 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(""); TCHAR text[128]; @@ -257,7 +257,7 @@ void CJabberProto::OnIqResultSetAuth(HXML iqNode, CJabberIqInfo *pInfo) debugLogA(" 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(""); @@ -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 instead of 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(""); } 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 and 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 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); diff --git a/protocols/SkypeClassic/src/gchat.cpp b/protocols/SkypeClassic/src/gchat.cpp index 82a66c8fcb..a8ececab4a 100644 --- a/protocols/SkypeClassic/src/gchat.cpp +++ b/protocols/SkypeClassic/src/gchat.cpp @@ -775,7 +775,7 @@ int __cdecl GCMenuHook(WPARAM,LPARAM lParam) { break; case MENU_ON_NICKLIST: if (db_get_ts(NULL, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return -1; - if (!lstrcmp(dbv.ptszVal, gcmi->pszUID)) { + if (!mir_tstrcmp(dbv.ptszVal, gcmi->pszUID)) { gcmi->nItems = sizeof(Item_nicklist_me)/sizeof(Item_nicklist_me[0]); gcmi->Item = &Item_nicklist_me[0]; } else { diff --git a/protocols/Tlen/src/tlen_opt.cpp b/protocols/Tlen/src/tlen_opt.cpp index e7e73be5be..1dacd46b80 100644 --- a/protocols/Tlen/src/tlen_opt.cpp +++ b/protocols/Tlen/src/tlen_opt.cpp @@ -163,7 +163,7 @@ INT_PTR CALLBACK TlenAccMgrUIDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR reconnectRequired = true; } else { - if(lstrcmpA(text, dbv.pszVal)) + if(mir_strcmp(text, dbv.pszVal)) reconnectRequired = true; db_free(&dbv); } @@ -175,7 +175,7 @@ INT_PTR CALLBACK TlenAccMgrUIDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR reconnectRequired = true; } else { - if(lstrcmpA(text, dbv.pszVal)) + if(mir_strcmp(text, dbv.pszVal)) reconnectRequired = true; db_free(&dbv); } @@ -307,7 +307,7 @@ static INT_PTR CALLBACK TlenBasicOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara reconnectRequired = true; } else { - if(lstrcmpA(text, dbv.pszVal)) + if(mir_strcmp(text, dbv.pszVal)) reconnectRequired = true; db_free(&dbv); } @@ -319,7 +319,7 @@ static INT_PTR CALLBACK TlenBasicOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara reconnectRequired = true; } else { - if(lstrcmpA(text, dbv.pszVal)) + if(mir_strcmp(text, dbv.pszVal)) reconnectRequired = true; db_free(&dbv); } @@ -532,7 +532,7 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, reconnectRequired = true; } else { - if(lstrcmpA(text, dbv.pszVal)) + if(mir_strcmp(text, dbv.pszVal)) reconnectRequired = true; db_free(&dbv); } @@ -543,7 +543,7 @@ static INT_PTR CALLBACK TlenAdvOptDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, reconnectRequired = true; } else { - if(lstrcmpA(text, dbv.pszVal)) + if(mir_strcmp(text, dbv.pszVal)) reconnectRequired = true; db_free(&dbv); } diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index f55c97edde..01ffaf8ce8 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -136,7 +136,7 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe JSONNODE *info = json_get(pResponse, "info"); if (info != NULL) { ptrT tszTitle(json_as_string(json_get(info, "title"))); - if (lstrcmp(tszTitle, cc->m_tszTopic)) { + if (mir_tstrcmp(tszTitle, cc->m_tszTopic)) { cc->m_tszTopic = mir_tstrdup(tszTitle); setTString(cc->m_hContact, "Nick", tszTitle); @@ -301,7 +301,7 @@ void CVkProto::AppendChatMessage(CVkChatInfo *cc, int mid, int uid, int msgTime, CVkChatInfo* CVkProto::GetChatById(LPCTSTR ptszId) { for (int i = 0; i < m_chats.getCount(); i++) - if (!lstrcmp(m_chats[i].m_tszId, ptszId)) + if (!mir_tstrcmp(m_chats[i].m_tszId, ptszId)) return &m_chats[i]; return NULL; @@ -350,7 +350,7 @@ int CVkProto::OnChatEvent(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; CVkChatInfo *cc = GetChatById(gch->pDest->ptszID); @@ -689,7 +689,7 @@ int CVkProto::OnGcMenuHook(WPARAM, LPARAM lParam) if (gcmi == NULL) return 0; - if (lstrcmpiA(gcmi->pszModule, m_szModuleName)) + if (mir_strcmpi(gcmi->pszModule, m_szModuleName)) return 0; if (gcmi->Type == MENU_ON_LOG) { @@ -710,7 +710,7 @@ static void FilterContacts(HWND hwndDlg, CVkProto *ppro) HWND hwndClist = GetDlgItem(hwndDlg, IDC_CLIST); for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { char *proto = GetContactProto(hContact); - if (lstrcmpA(proto, ppro->m_szModuleName) || ppro->isChatRoom(hContact)) + if (mir_strcmp(proto, ppro->m_szModuleName) || ppro->isChatRoom(hContact)) if (HANDLE hItem = (HANDLE)SendMessage(hwndClist, CLM_FINDCONTACT, hContact, 0)) SendMessage(hwndClist, CLM_DELETEITEM, (WPARAM)hItem, 0); } diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index a134baddb1..dbdd478119 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -19,7 +19,7 @@ along with this program. If not, see . static int sttCompareProtocols(const CVkProto *p1, const CVkProto *p2) { - return lstrcmp(p1->m_tszUserName, p2->m_tszUserName); + return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName); } LIST vk_Instances(1, sttCompareProtocols); diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 78843d5ea5..1729833541 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -1250,7 +1250,7 @@ CMString CVkProto::GetAttachmentDescr(JSONNODE *pAttachments) for (int k = 0; (pAttach = json_at(pAttachments, k)) != NULL; k++) { res.AppendChar('\t'); ptrT ptszType(json_as_string(json_get(pAttach, "type"))); - if (!lstrcmp(ptszType, L"photo")) { + if (!mir_tstrcmp(ptszType, L"photo")) { JSONNODE *pPhoto = json_get(pAttach, "photo"); if (pPhoto == NULL) continue; @@ -1270,7 +1270,7 @@ CMString CVkProto::GetAttachmentDescr(JSONNODE *pAttachments) if (m_bAddImgBbc) res.AppendFormat(L"\n\t[img]%s[/img]", ptszLink); } - else if (!lstrcmp(ptszType, L"audio")) { + else if (!mir_tstrcmp(ptszType, L"audio")) { JSONNODE *pAudio = json_get(pAttach, "audio"); if (pAudio == NULL) continue; @@ -1281,7 +1281,7 @@ CMString CVkProto::GetAttachmentDescr(JSONNODE *pAttachments) res.AppendFormat(L"%s: (%s - %s) - %s", TranslateT("Audio"), ptszArtist, ptszTitle, ptszUrl); } - else if (!lstrcmp(ptszType, L"video")) { + else if (!mir_tstrcmp(ptszType, L"video")) { JSONNODE *pVideo = json_get(pAttach, "video"); if (pVideo == NULL) continue; @@ -1291,7 +1291,7 @@ CMString CVkProto::GetAttachmentDescr(JSONNODE *pAttachments) int ownerID = json_as_int(json_get(pVideo, "owner_id")); res.AppendFormat(L"%s: %s - http://vk.com/video%d_%d", TranslateT("Video"), ptszTitle, ownerID, vid); } - else if (!lstrcmp(ptszType, L"doc")) { + else if (!mir_tstrcmp(ptszType, L"doc")) { JSONNODE *pDoc = json_get(pAttach, "doc"); if (pDoc == NULL) continue; @@ -1300,7 +1300,7 @@ CMString CVkProto::GetAttachmentDescr(JSONNODE *pAttachments) ptrT ptszUrl(json_as_string(json_get(pDoc, "url"))); res.AppendFormat(L"%s: (%s) - %s", TranslateT("Document"), ptszTitle, ptszUrl); } - else if (!lstrcmp(ptszType, L"wall")) { + else if (!mir_tstrcmp(ptszType, L"wall")) { JSONNODE *pWall = json_get(pAttach, "wall"); if (pWall == NULL) continue; @@ -1310,7 +1310,7 @@ CMString CVkProto::GetAttachmentDescr(JSONNODE *pAttachments) int fromID = json_as_int(json_get(pWall, "from_id")); res.AppendFormat(L"%s: %s - http://vk.com/wall%d_%d", TranslateT("Wall post"), ptszText ? ptszText : L" ", fromID, id); } - else if (!lstrcmp(ptszType, _T("sticker"))) { + else if (!mir_tstrcmp(ptszType, _T("sticker"))) { JSONNODE *pSticker = json_get(pAttach, "sticker"); if (pSticker == NULL) continue; diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp index 59e43defdd..50a4e5a389 100644 --- a/protocols/WhatsApp/src/proto.cpp +++ b/protocols/WhatsApp/src/proto.cpp @@ -209,9 +209,9 @@ bool WhatsAppProto::Register(int state, const string &cc, const string &number, // Status = fail JSONNODE *val = json_get(resp, "status"); - if (!lstrcmp(ptrT(json_as_string(val)), _T("fail"))) { + if (!mir_tstrcmp(ptrT(json_as_string(val)), _T("fail"))) { JSONNODE *tmpVal = json_get(resp, "reason"); - if (!lstrcmp(ptrT(json_as_string(tmpVal)), _T("stale"))) + if (!mir_tstrcmp(ptrT(json_as_string(tmpVal)), _T("stale"))) this->NotifyEvent(ptszTitle, TranslateT("Registration failed due to stale code. Please request a new code"), NULL, WHATSAPP_EVENT_CLIENT); else this->NotifyEvent(ptszTitle, TranslateT("Registration failed."), NULL, WHATSAPP_EVENT_CLIENT); @@ -229,7 +229,7 @@ bool WhatsAppProto::Register(int state, const string &cc, const string &number, val = json_get(resp, "pw"); if (val != NULL) ret = _T2A(ptrT(json_as_string(val))); - else if (!lstrcmp(ptrT(json_as_string(val)), _T("sent"))) + else if (!mir_tstrcmp(ptrT(json_as_string(val)), _T("sent"))) this->NotifyEvent(ptszTitle, TranslateT("Registration code has been sent to your phone."), NULL, WHATSAPP_EVENT_OTHER); return true; } diff --git a/protocols/Xfire/src/all_statusmsg.cpp b/protocols/Xfire/src/all_statusmsg.cpp index f09d3526a8..e542806744 100644 --- a/protocols/Xfire/src/all_statusmsg.cpp +++ b/protocols/Xfire/src/all_statusmsg.cpp @@ -67,7 +67,7 @@ BOOL BackupStatusMsg() { mir_snprintf(ttemp, 128, "%s%s", temp[i]->szModuleName, PS_SETAWAYMSG); //xfire wird geskipped, offline prots und invs prots auch, und locked status prots auch - if (!temp[i]->bIsEnabled || statusid == ID_STATUS_INVISIBLE || statusid == ID_STATUS_OFFLINE || !lstrcmpiA(temp[i]->szModuleName, protocolname) || !ServiceExists(ttemp) || db_get_b(NULL, temp[i]->szModuleName, "LockMainStatus", 0) == 1) + if (!temp[i]->bIsEnabled || statusid == ID_STATUS_INVISIBLE || statusid == ID_STATUS_OFFLINE || !mir_strcmpi(temp[i]->szModuleName, protocolname) || !ServiceExists(ttemp) || db_get_b(NULL, temp[i]->szModuleName, "LockMainStatus", 0) == 1) { XFireLog("-> Skip %s.", temp[i]->szModuleName); diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index 92b3599b51..723431b1d4 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -1001,7 +1001,7 @@ int ExtraImageApply1(WPARAM wparam, LPARAM lparam) { MCONTACT hContact = (MCONTACT)wparam; char *szProto = GetContactProto(hContact); - if (szProto != NULL && !lstrcmpiA(szProto, protocolname) && db_get_w(hContact, protocolname, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) { + if (szProto != NULL && !mir_strcmpi(szProto, protocolname) && db_get_w(hContact, protocolname, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) { int gameid = db_get_w(hContact, protocolname, "GameId", 0); if (gameid != 0) ExtraIcon_SetIcon(hExtraIcon1, hContact, xgamelist.iconmngr.getGameIconHandle(gameid)); @@ -1014,7 +1014,7 @@ int ExtraImageApply2(WPARAM wparam, LPARAM lparam) MCONTACT hContact = (MCONTACT)wparam; // TODO: maybe need to fix extra icons char *szProto = GetContactProto(hContact); - if (szProto != NULL && !lstrcmpiA(szProto, protocolname) && db_get_w(hContact, protocolname, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) { + if (szProto != NULL && !mir_strcmpi(szProto, protocolname) && db_get_w(hContact, protocolname, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) { int gameid = db_get_w(hContact, protocolname, "VoiceId", 0); if (gameid != 0) ExtraIcon_SetIcon(hExtraIcon2, hContact, xgamelist.iconmngr.getGameIconHandle(gameid)); @@ -1302,7 +1302,7 @@ INT_PTR RecvMessage(WPARAM wParam, LPARAM lParam) db_unset(ccs->hContact, "CList", "Hidden"); char *szProto = GetContactProto(ccs->hContact); - if (szProto != NULL && !lstrcmpiA(szProto, protocolname)) + if (szProto != NULL && !mir_strcmpi(szProto, protocolname)) return CallService(MS_PROTO_RECVMSG, wParam, lParam); return 1; @@ -1668,7 +1668,7 @@ MCONTACT CList_AddContact(XFireContact xfc, bool InList, bool SetOnline, int cla BOOL IsXFireContact(MCONTACT hContact) { char *szProto = GetContactProto(hContact); - if (szProto != NULL && !lstrcmpiA(szProto, protocolname)) + if (szProto != NULL && !mir_strcmpi(szProto, protocolname)) return TRUE; return FALSE; @@ -3119,7 +3119,7 @@ void CreateGroup(char*grpn, char*field) { i--; break; } - if (dbv.pszVal[0] != '\0' && !lstrcmpA(dbv.pszVal + 1, (char*)grp)) { + if (dbv.pszVal[0] != '\0' && !mir_strcmp(dbv.pszVal + 1, (char*)grp)) { db_free(&dbv); return; } diff --git a/protocols/Xfire/src/options.cpp b/protocols/Xfire/src/options.cpp index f7ee82d0ad..858683a167 100644 --- a/protocols/Xfire/src/options.cpp +++ b/protocols/Xfire/src/options.cpp @@ -264,7 +264,7 @@ static INT_PTR CALLBACK DlgProcOpts2(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR GetDlgItemTextA(hwndDlg, IDC_LOGIN, login, SIZEOF(login)); dbv.pszVal = NULL; - if (db_get(NULL, protocolname, "login", &dbv) || lstrcmpA(login, dbv.pszVal)) + if (db_get(NULL, protocolname, "login", &dbv) || mir_strcmp(login, dbv.pszVal)) reconnectRequired = 1; if (dbv.pszVal != NULL) db_free(&dbv); @@ -289,7 +289,7 @@ static INT_PTR CALLBACK DlgProcOpts2(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR //nur wenn der nick erfolgreich übertragen wurde GetDlgItemTextA(hwndDlg, IDC_NICK, login, SIZEOF(login)); dbv.pszVal = NULL; - if (db_get(NULL, protocolname, "Nick", &dbv) || lstrcmpA(login, dbv.pszVal)) + if (db_get(NULL, protocolname, "Nick", &dbv) || mir_strcmp(login, dbv.pszVal)) { if (CallService(XFIRE_SET_NICK, 0, (WPARAM)login)) db_set_s(NULL, protocolname, "Nick", login); @@ -299,7 +299,7 @@ static INT_PTR CALLBACK DlgProcOpts2(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR GetDlgItemTextA(hwndDlg, IDC_PASSWORD, str, SIZEOF(str)); dbv.pszVal = NULL; - if (db_get(NULL, protocolname, "password", &dbv) || lstrcmpA(str, dbv.pszVal)) + if (db_get(NULL, protocolname, "password", &dbv) || mir_strcmp(str, dbv.pszVal)) reconnectRequired = 1; if (dbv.pszVal != NULL) db_free(&dbv); diff --git a/protocols/Xfire/src/services.cpp b/protocols/Xfire/src/services.cpp index 70a141f6b5..380308cc14 100644 --- a/protocols/Xfire/src/services.cpp +++ b/protocols/Xfire/src/services.cpp @@ -39,7 +39,7 @@ BOOL IsContactMySelf(std::string buddyusername) { if (!db_get(NULL, protocolname, "login", &dbv)) { - if (!lstrcmpiA(dbv.pszVal, buddyusername.c_str())) + if (!mir_strcmpi(dbv.pszVal, buddyusername.c_str())) { db_free(&dbv); return TRUE; diff --git a/protocols/Yahoo/src/avatar.cpp b/protocols/Yahoo/src/avatar.cpp index 1acdb1fe5f..7bff4a98e8 100644 --- a/protocols/Yahoo/src/avatar.cpp +++ b/protocols/Yahoo/src/avatar.cpp @@ -399,7 +399,7 @@ void CYahooProto::ext_got_picture(const char *me, const char *who, const char *p LOG(("[ext_yahoo_got_picture] My Checksum: %d", mcksum)); if (!getString("AvatarURL", &dbv)) { - if (lstrcmpiA(pic_url, dbv.pszVal) == 0) { + if (mir_strcmpi(pic_url, dbv.pszVal) == 0) { DBVARIANT dbv2; /*time_t ts; DWORD ae;*/ diff --git a/protocols/Yahoo/src/file_transfer.cpp b/protocols/Yahoo/src/file_transfer.cpp index 1cfe32740f..16327f356c 100644 --- a/protocols/Yahoo/src/file_transfer.cpp +++ b/protocols/Yahoo/src/file_transfer.cpp @@ -89,7 +89,7 @@ y_filetransfer* find_ft(const char *ft_token, const char *who) for(l = file_transfers; l; l = y_list_next(l)) { f = (y_filetransfer* )l->data; - if (lstrcmpA(f->ftoken, ft_token) == 0 && lstrcmpA(f->who, who) == 0) { + if (mir_strcmp(f->ftoken, ft_token) == 0 && mir_strcmp(f->who, who) == 0) { LOG(("[find_ft] Got it!")); return f; } diff --git a/protocols/Yahoo/src/ignore.cpp b/protocols/Yahoo/src/ignore.cpp index 4c7cb47225..1f87658371 100644 --- a/protocols/Yahoo/src/ignore.cpp +++ b/protocols/Yahoo/src/ignore.cpp @@ -37,7 +37,7 @@ int CYahooProto::BuddyIgnored(const char *who) while (l != NULL) { struct yahoo_buddy *b = (struct yahoo_buddy *) l->data; - if (lstrcmpiA(b->id, who) == 0) { + if (mir_strcmpi(b->id, who) == 0) { //LOG(("User '%s' on our Ignore List. Dropping Message.", who)); return 1; } diff --git a/protocols/Yahoo/src/im.cpp b/protocols/Yahoo/src/im.cpp index 03f45a3f37..54a4d9d1cf 100644 --- a/protocols/Yahoo/src/im.cpp +++ b/protocols/Yahoo/src/im.cpp @@ -212,7 +212,7 @@ int __cdecl CYahooProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre) db_unset(hContact, "CList", "Hidden"); // NUDGES - if (!lstrcmpA(pre->szMessage, "") && ServiceExists("NUDGE/Send")) { + if (!mir_strcmp(pre->szMessage, "") && ServiceExists("NUDGE/Send")) { debugLogA("[YahooRecvMessage] Doing Nudge Service!"); NotifyEventHooks(hYahooNudge, hContact, pre->timestamp); return 0; diff --git a/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp b/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp index dbad69d900..1ff4870a9a 100644 --- a/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp +++ b/protocols/Yahoo/src/libyahoo2/libyahoo2.cpp @@ -3144,7 +3144,7 @@ static void yahoo_process_ignore(struct yahoo_input_data *yid, struct yahoo_pack while (buddy) { struct yahoo_buddy *b = (struct yahoo_buddy *) buddy->data; - if (lstrcmpiA(b->id, who) == 0) + if (mir_strcmpi(b->id, who) == 0) break; buddy = buddy->next; diff --git a/protocols/Yahoo/src/main.cpp b/protocols/Yahoo/src/main.cpp index 8078e72d67..feeb9715c6 100644 --- a/protocols/Yahoo/src/main.cpp +++ b/protocols/Yahoo/src/main.cpp @@ -72,7 +72,7 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hinst,DWORD /*fdwReason*/,LPVOID /*lpvR static int CompareProtos( const CYahooProto* p1, const CYahooProto* p2 ) { - return lstrcmp(p1->m_tszUserName, p2->m_tszUserName); + return mir_tstrcmp(p1->m_tszUserName, p2->m_tszUserName); } LIST g_instances( 1, CompareProtos ); diff --git a/protocols/Yahoo/src/options.cpp b/protocols/Yahoo/src/options.cpp index 36459e2a96..3dc9c9fbd6 100644 --- a/protocols/Yahoo/src/options.cpp +++ b/protocols/Yahoo/src/options.cpp @@ -102,7 +102,7 @@ static INT_PTR CALLBACK DlgProcYahooOpts(HWND hwndDlg, UINT msg, WPARAM wParam, reconnectRequired = true; } else { - if(lstrcmpA(str, dbv.pszVal)) + if(mir_strcmp(str, dbv.pszVal)) reconnectRequired = true; db_free(&dbv); } @@ -113,7 +113,7 @@ static INT_PTR CALLBACK DlgProcYahooOpts(HWND hwndDlg, UINT msg, WPARAM wParam, reconnectRequired = true; } else { - if(lstrcmpA(str, dbv.pszVal)) + if(mir_strcmp(str, dbv.pszVal)) reconnectRequired = true; db_free(&dbv); } @@ -220,7 +220,7 @@ static INT_PTR CALLBACK DlgProcYahooOptsConn(HWND hwndDlg, UINT msg, WPARAM wPar reconnectRequired = true; } else { - if(lstrcmpA(str, dbv.pszVal)) + if(mir_strcmp(str, dbv.pszVal)) reconnectRequired = true; db_free(&dbv); } diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index 74d562df93..635463a261 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -775,7 +775,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM reconnectRequired = true; } else { - if(lstrcmpA(str, dbv.pszVal)) + if(mir_strcmp(str, dbv.pszVal)) reconnectRequired = true; db_free(&dbv); } @@ -787,7 +787,7 @@ INT_PTR CALLBACK first_run_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM reconnectRequired = true; } else { - if(lstrcmpA(str, dbv.pszVal)) + if(mir_strcmp(str, dbv.pszVal)) reconnectRequired = true; db_free(&dbv); } diff --git a/protocols/Yahoo/src/util.cpp b/protocols/Yahoo/src/util.cpp index 46e84b09c6..d030ba7c75 100644 --- a/protocols/Yahoo/src/util.cpp +++ b/protocols/Yahoo/src/util.cpp @@ -115,7 +115,7 @@ int CYahooProto::ShowPopup(const TCHAR* nickname, const TCHAR* msg, const char * mir_tstrncpy(ppd.lptzText, msg, SIZEOF(ppd.lptzText)); if (szURL != NULL) { - ppd.lchIcon = LoadIconEx( !lstrcmpiA(szURL, "http://mail.yahoo.com") ? "mail" : "calendar"); + ppd.lchIcon = LoadIconEx( !mir_strcmpi(szURL, "http://mail.yahoo.com") ? "mail" : "calendar"); ppd.PluginData = (void*)strdup(szURL); } else ppd.lchIcon = LoadIconEx("yahoo"); diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp index 67a150e60a..05d56e98c1 100644 --- a/protocols/Yahoo/src/yahoo.cpp +++ b/protocols/Yahoo/src/yahoo.cpp @@ -289,7 +289,7 @@ MCONTACT CYahooProto::getbuddyH(const char *yahoo_id) if (getString(hContact, YAHOO_LOGINID, &dbv)) continue; - int tCompareResult = lstrcmpiA( dbv.pszVal, yahoo_id ); + int tCompareResult = mir_strcmpi( dbv.pszVal, yahoo_id ); db_free(&dbv); if ( tCompareResult ) continue; @@ -609,7 +609,7 @@ void CYahooProto::ext_got_stealth(char *stealthlist) for(s = stealth; s && *s; s++) { - if (lstrcmpiA(*s, dbv.pszVal) == 0) { + if (mir_strcmpi(*s, dbv.pszVal) == 0) { debugLogA("GOT id = %s", dbv.pszVal); found = 1; break; @@ -1240,9 +1240,9 @@ INT_PTR CYahooProto::ext_connect(const char *h, int p, int type) void CYahooProto::ext_send_http_request(enum yahoo_connection_type type, const char *method, const char *url, const char *cookies, long content_length, yahoo_get_fd_callback callback, void *callback_data) { -/* if (lstrcmpiA(method, "GET") == 0) +/* if (mir_strcmpi(method, "GET") == 0) yahoo_http_get(id, url, cookies, callback, callback_data); - else if (lstrcmpiA(method, "POST") == 0) + else if (mir_strcmpi(method, "POST") == 0) yahoo_http_post(id, url, cookies, content_length, callback, callback_data); else LOG(("ERROR: Unknown method: %s", method)); @@ -1269,7 +1269,7 @@ void CYahooProto::ext_send_http_request(enum yahoo_connection_type type, const c //return; } else { nlhr.cbSize=sizeof(nlhr); - nlhr.requestType=(lstrcmpiA(method, "GET") == 0) ? REQUEST_GET : REQUEST_POST; + nlhr.requestType=(mir_strcmpi(method, "GET") == 0) ? REQUEST_GET : REQUEST_POST; nlhr.flags=NLHRF_DUMPASTEXT|NLHRF_HTTP11; nlhr.szUrl=(char *)path; nlhr.headers = httpHeaders; @@ -1471,7 +1471,7 @@ char * CYahooProto::ext_send_https_request(struct yahoo_data *yd, const char *ho for (i=0; i < nlhrReply->headersCount; i++) { //LOG(("%s: %s", nlhrReply->headers[i].szName, nlhrReply->headers[i].szValue)); - if (lstrcmpiA(nlhrReply->headers[i].szName, "Set-Cookie") == 0) { + if (mir_strcmpi(nlhrReply->headers[i].szName, "Set-Cookie") == 0) { //LOG(("Found Cookie... Yum yum...")); if (nlhrReply->headers[i].szValue[0] == 'B' && nlhrReply->headers[i].szValue[1] == '=') { -- cgit v1.2.3