From 1eb922f8075c53a1a8487045b096693bd27b56dd Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 May 2015 19:23:27 +0000 Subject: replace _tcsicmp to mir_tstrcmpi git-svn-id: http://svn.miranda-ng.org/main/trunk@13761 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/CmdLine/src/utils.cpp | 2 +- plugins/CrashDumper/src/dumper.cpp | 2 +- plugins/DbChecker/src/selectdb.cpp | 4 +-- plugins/DbEditorPP/src/settinglist.cpp | 2 +- plugins/Import/src/miranda.cpp | 2 +- plugins/MirandaG15/src/CAppletManager.cpp | 4 +-- plugins/MirandaG15/src/CContactList.cpp | 4 +-- plugins/NewAwaySysMod/src/AwaySys.cpp | 2 +- plugins/NewAwaySysMod/src/Client.cpp | 2 +- plugins/Quotes/src/stdafx.h | 2 +- plugins/SendScreenshotPlus/src/UMainForm.cpp | 2 +- plugins/SmileyAdd/src/smileys.cpp | 2 +- plugins/TabSRMM/src/msgoptions.cpp | 2 +- plugins/TabSRMM/src/themes.cpp | 8 +++--- plugins/UserInfoEx/src/dlg_anniversarylist.cpp | 2 +- plugins/UserInfoEx/src/psp_anniversary.cpp | 2 +- plugins/UserInfoEx/src/svc_timezone_old.cpp | 2 +- plugins/Variables/src/help.cpp | 2 +- plugins/Variables/src/parse_str.cpp | 2 +- plugins/Weather/src/weather_addstn.cpp | 12 ++++----- plugins/Weather/src/weather_conv.cpp | 32 +++++++++++----------- plugins/Weather/src/weather_data.cpp | 34 ++++++++++++------------ plugins/Weather/src/weather_ini.cpp | 2 +- plugins/Weather/src/weather_update.cpp | 10 +++---- plugins/WhenWasIt/src/dlg_handlers.cpp | 2 +- plugins/WhenWasIt/src/utils.cpp | 2 +- plugins/YAPP/src/yapp_history_dlg.cpp | 2 +- plugins/YahooGroups/src/utils.cpp | 2 +- protocols/GTalkExt/src/handlers.cpp | 4 +-- protocols/Gadu-Gadu/src/image.cpp | 10 +++---- protocols/JabberG/src/jabber_events.cpp | 2 +- protocols/JabberG/src/jabber_iq.cpp | 8 +++--- protocols/JabberG/src/jabber_iqid.cpp | 2 +- protocols/JabberG/src/jabber_message_manager.cpp | 10 +++---- protocols/JabberG/src/jabber_privacy.cpp | 8 +++--- protocols/JabberG/src/jabber_proto.cpp | 4 +-- protocols/JabberG/src/jabber_search.cpp | 10 +++---- protocols/JabberG/src/jabber_search.h | 2 +- protocols/JabberG/src/jabber_svc.cpp | 12 ++++----- protocols/JabberG/src/jabber_thread.cpp | 8 +++--- protocols/MSN/src/msn_chat.cpp | 4 +-- protocols/MSN/src/msn_threads.cpp | 2 +- protocols/SkypeWeb/src/skype_utils.cpp | 12 ++++----- protocols/Twitter/src/StringUtil.h | 2 +- protocols/Xfire/src/Xfire_base.cpp | 2 +- protocols/Xfire/src/Xfire_game.cpp | 2 +- src/modules/chat/manager.cpp | 14 +++++----- src/modules/clist/clistmod.cpp | 2 +- src/modules/clist/contact.cpp | 2 +- src/modules/database/database.cpp | 12 ++++----- src/modules/extraicons/extraicons.cpp | 2 +- src/modules/findadd/searchresults.cpp | 2 +- src/modules/icolib/skin2icons.cpp | 2 +- src/modules/netlib/netlibsecurity.cpp | 8 +++--- src/modules/options/options.cpp | 4 +-- src/modules/plugins/newplugins.cpp | 4 +-- src/modules/utils/timezones.cpp | 4 +-- 57 files changed, 154 insertions(+), 154 deletions(-) diff --git a/plugins/CmdLine/src/utils.cpp b/plugins/CmdLine/src/utils.cpp index f9918523c0..c6fdf3c5d1 100644 --- a/plugins/CmdLine/src/utils.cpp +++ b/plugins/CmdLine/src/utils.cpp @@ -340,7 +340,7 @@ MCONTACT GetContactFromID(TCHAR *szID, char *szProto) tmp = (char *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0); STRNCPY(dispName, tmp, sizeof(dispName)); - if ((szHandle) && ((_tcsicmp(szHandle, szID) == 0) || (_tcsicmp(dispName, szID) == 0)) && ((szProto == NULL) || (_stricmp(szProto, cProtocol) == 0))) + if ((szHandle) && ((mir_tstrcmpi(szHandle, szID) == 0) || (mir_tstrcmpi(dispName, szID) == 0)) && ((szProto == NULL) || (_stricmp(szProto, cProtocol) == 0))) found = 1; free(szHandle); diff --git a/plugins/CrashDumper/src/dumper.cpp b/plugins/CrashDumper/src/dumper.cpp index 6891a41e62..8cd63e612a 100644 --- a/plugins/CrashDumper/src/dumper.cpp +++ b/plugins/CrashDumper/src/dumper.cpp @@ -261,7 +261,7 @@ static void GetPluginsString(CMString& buffer, unsigned& flags) else lsttmppv->next = lst; - if (_tcsicmp(FindFileData.cFileName, TEXT("weather.dll")) == 0) + if (mir_tstrcmpi(FindFileData.cFileName, TEXT("weather.dll")) == 0) flags |= VI_FLAG_WEATHER; ++count; diff --git a/plugins/DbChecker/src/selectdb.cpp b/plugins/DbChecker/src/selectdb.cpp index 74417f1c12..12cd47105b 100644 --- a/plugins/DbChecker/src/selectdb.cpp +++ b/plugins/DbChecker/src/selectdb.cpp @@ -95,7 +95,7 @@ static int AddDatabaseToList(HWND hwndList, const TCHAR* filename, TCHAR* dir) lvi.iSubItem = 0; for (lvi.iItem = ListView_GetItemCount(hwndList) - 1; lvi.iItem >= 0; lvi.iItem--) { ListView_GetItem(hwndList, &lvi); - if (!_tcsicmp((TCHAR*)lvi.lParam, filename)) + if (!mir_tstrcmpi((TCHAR*)lvi.lParam, filename)) return lvi.iItem; } @@ -117,7 +117,7 @@ static int AddDatabaseToList(HWND hwndList, const TCHAR* filename, TCHAR* dir) mir_sntprintf(szName, SIZEOF(szName), _T("%s%s"), dir, pName); TCHAR *pDot = _tcsrchr(szName, '.'); - if (pDot != NULL && !_tcsicmp(pDot, _T(".dat"))) + if (pDot != NULL && !mir_tstrcmpi(pDot, _T(".dat"))) *pDot = 0; lvi.iItem = 0; diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp index f9f96e426a..6b23e41586 100644 --- a/plugins/DbEditorPP/src/settinglist.cpp +++ b/plugins/DbEditorPP/src/settinglist.cpp @@ -661,7 +661,7 @@ INT_PTR CALLBACK SettingsCompare(LPARAM lParam1, LPARAM lParam2, LPARAM myParam) ListView_GetItemText(params.hList, lParam1, params.column, text1, SIZEOF(text1)); ListView_GetItemText(params.hList, lParam2, params.column, text2, SIZEOF(text2)); - int res = _tcsicmp(text1, text2); + int res = mir_tstrcmpi(text1, text2); res = (params.column == lastColumn) ? -res : res; return res; } diff --git a/plugins/Import/src/miranda.cpp b/plugins/Import/src/miranda.cpp index 29320fed7e..7cf271a2b3 100644 --- a/plugins/Import/src/miranda.cpp +++ b/plugins/Import/src/miranda.cpp @@ -46,7 +46,7 @@ static void SearchForLists(HWND hwndDlg, const TCHAR *mirandaPath, const TCHAR * continue; // skip the current profile too - if (mirandaProf != NULL && !_tcsicmp(mirandaProf, fd.cFileName)) + if (mirandaProf != NULL && !mir_tstrcmpi(mirandaProf, fd.cFileName)) continue; TCHAR buf[MAX_PATH], profile[MAX_PATH]; diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index 435ebd3db8..11febc29b1 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -1171,7 +1171,7 @@ int CAppletManager::HookChatInbound(WPARAM wParam,LPARAM lParam) // fetch the network name if(gcd->iType == GC_EVENT_CHANGESESSIONAME) { - if (gcd->ptszID && !_tcsicmp(gcd->ptszID,_T("Network log"))) + if (gcd->ptszID && !mir_tstrcmpi(gcd->ptszID,_T("Network log"))) { pIRCCon->strNetwork = toTstring(gce->ptszText); TRACE(_T("\t Found network identifier: %s\n"),pIRCCon->strNetwork.c_str()); @@ -1196,7 +1196,7 @@ int CAppletManager::HookChatInbound(WPARAM wParam,LPARAM lParam) strChannel = strChannel.substr(0,pos-1); else { - if(_tcsicmp(gcd->ptszID,_T("Network log"))) + if(mir_tstrcmpi(gcd->ptszID,_T("Network log"))) TRACE(_T("\t WARNING: ignoring unknown event!\n")); return 0; } diff --git a/plugins/MirandaG15/src/CContactList.cpp b/plugins/MirandaG15/src/CContactList.cpp index f8c73e78bd..7b99448c12 100644 --- a/plugins/MirandaG15/src/CContactList.cpp +++ b/plugins/MirandaG15/src/CContactList.cpp @@ -505,7 +505,7 @@ bool CContactList::CompareEntries(CListEntryiStatus != pRightEntry->iStatus) return (aiStatusPriority[pLeftEntry->iStatus - ID_STATUS_OFFLINE] > aiStatusPriority[pRightEntry->iStatus - ID_STATUS_OFFLINE]); else - return _tcsicmp(pLeftEntry->strName.c_str(),pRightEntry->strName.c_str())<0; + return mir_tstrcmpi(pLeftEntry->strName.c_str(),pRightEntry->strName.c_str())<0; } else if(pLeft->GetType() == ITEM && pRight->GetType() == CONTAINER) return false; @@ -523,7 +523,7 @@ bool CContactList::CompareEntries(CListEntryiEvents && pGroup2->iEvents) return (pGroup1->iEvents > pGroup2->iEvents); else - return _tcsicmp(pGroup1->strName.c_str(),pGroup2->strName.c_str())<0; + return mir_tstrcmpi(pGroup1->strName.c_str(),pGroup2->strName.c_str())<0; } return false; diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index d8286b8d08..fcbb410790 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -537,7 +537,7 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) TreeCtrl->DBToMem(CString(MOD_NAME)); for (int i = 0; i < TreeCtrl->Value.GetSize(); i++) { - if (!(TreeCtrl->Value[i].Flags & TIF_GROUP) && !_tcsicmp(TreeCtrl->Value[i].Title, ai->targv[1])) { + if (!(TreeCtrl->Value[i].Flags & TIF_GROUP) && !mir_tstrcmpi(TreeCtrl->Value[i].Title, ai->targv[1])) { Result = TreeCtrl->Value[i].User_Str1; break; } diff --git a/plugins/NewAwaySysMod/src/Client.cpp b/plugins/NewAwaySysMod/src/Client.cpp index 6eb74afad8..74244b3d60 100644 --- a/plugins/NewAwaySysMod/src/Client.cpp +++ b/plugins/NewAwaySysMod/src/Client.cpp @@ -146,7 +146,7 @@ int GetRecentGroupID(int iMode) return g_Messages_RecentRootID; for (int Order = 0; Order < TreeCtrl->Value.GetSize(); Order++) // find a group named accordingly to the current status - if (TreeCtrl->Value[Order].ParentID == g_Messages_RecentRootID && TreeCtrl->Value[Order].Flags & TIF_GROUP && !_tcsicmp(TreeCtrl->Value[Order].Title, iMode ? pcli->pfnGetStatusModeDescription(iMode, 0) : MSGTREE_RECENT_OTHERGROUP)) + if (TreeCtrl->Value[Order].ParentID == g_Messages_RecentRootID && TreeCtrl->Value[Order].Flags & TIF_GROUP && !mir_tstrcmpi(TreeCtrl->Value[Order].Title, iMode ? pcli->pfnGetStatusModeDescription(iMode, 0) : MSGTREE_RECENT_OTHERGROUP)) return TreeCtrl->Value[Order].ID; return -1; diff --git a/plugins/Quotes/src/stdafx.h b/plugins/Quotes/src/stdafx.h index 4096f1c191..fe6920d233 100644 --- a/plugins/Quotes/src/stdafx.h +++ b/plugins/Quotes/src/stdafx.h @@ -79,7 +79,7 @@ inline tstring quotes_a2t(const char* s) inline int quotes_stricmp(LPCTSTR p1, LPCTSTR p2) { - return _tcsicmp(p1, p2); + return mir_tstrcmpi(p1, p2); } #include "resource.h" diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp index ddbf45184d..407a953d9a 100644 --- a/plugins/SendScreenshotPlus/src/UMainForm.cpp +++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp @@ -1061,7 +1061,7 @@ INT_PTR TfrmMain::SaveScreenshot(FIBITMAP* dib) { //TCHAR* pszFormat = (TCHAR*)ComboBox_GetItemData(hwndCombo, ComboBox_GetCurSel(hwndCombo)); TCHAR pszFormat[6]; ComboBox_GetText(hwndCombo, pszFormat, 6); - if(ret && (_tcsicmp (pszFormat,_T("png")) != 0)) { + if(ret && (mir_tstrcmpi (pszFormat,_T("png")) != 0)) { fif = FIP->FI_GetFIFFromFilenameU(ret); dib_new = FIP->FI_LoadU(fif, ret,0); diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index 41a3be4d18..70004c2454 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -158,7 +158,7 @@ static DWORD_PTR ConvertServiceParam(MCONTACT hContact, const TCHAR *param) DWORD_PTR ret; if (param == NULL) ret = 0; - else if (_tcsicmp(_T("hContact"), param) == 0) + else if (mir_tstrcmpi(_T("hContact"), param) == 0) ret = (DWORD_PTR)hContact; else if (_istdigit(*param)) ret = _ttoi(param); diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 2878bb767f..7d11d89daf 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -178,7 +178,7 @@ static int TSAPI RescanSkins(HWND hwndCombobox) for (int i = 1; i < lr; i++) { TCHAR *idata = (TCHAR*)SendMessage(hwndCombobox, CB_GETITEMDATA, i, 0); if (idata && idata != (TCHAR*)CB_ERR) { - if (!_tcsicmp(dbv.ptszVal, idata)) { + if (!mir_tstrcmpi(dbv.ptszVal, idata)) { SendMessage(hwndCombobox, CB_SETCURSEL, i, 0); break; } diff --git a/plugins/TabSRMM/src/themes.cpp b/plugins/TabSRMM/src/themes.cpp index 636fd00b8c..5ed8009722 100644 --- a/plugins/TabSRMM/src/themes.cpp +++ b/plugins/TabSRMM/src/themes.cpp @@ -1208,7 +1208,7 @@ void CSkin::LoadIcon(const TCHAR *szSection, const TCHAR *name, HICON &hIcon) GetPrivateProfileString(szSection, name, _T("none"), buffer, 250, m_tszFileName); buffer[500] = 0; - if (_tcsicmp(buffer, _T("none"))) { + if (mir_tstrcmpi(buffer, _T("none"))) { TCHAR szDrive[MAX_PATH], szDir[MAX_PATH], szImagePath[MAX_PATH]; _tsplitpath(m_tszFileName, szDrive, szDir, NULL, NULL); @@ -1303,7 +1303,7 @@ void CSkin::ReadImageItem(const TCHAR *itemname) TCHAR *szImageFileName = tmpItem.Read(m_tszFileName); - if (!_tcsicmp(itemname, _T("$glyphs")) && szImageFileName != 0) { // the glyph item MUST have a valid image + if (!mir_tstrcmpi(itemname, _T("$glyphs")) && szImageFileName != 0) { // the glyph item MUST have a valid image tmpItem.Create(szImageFileName); if (tmpItem.getHbm()) { m_glyphItem = tmpItem; @@ -1321,7 +1321,7 @@ void CSkin::ReadImageItem(const TCHAR *itemname) if (!mir_tstrcmp(buffer, _T("None"))) break; for (int i = 0; i <= ID_EXTBK_LAST; i++) { - if (!_tcsicmp(SkinItems[i].szName[0] == '{' ? &SkinItems[i].szName[3] : SkinItems[i].szName, buffer)) { + if (!mir_tstrcmpi(SkinItems[i].szName[0] == '{' ? &SkinItems[i].szName[3] : SkinItems[i].szName, buffer)) { if (!(tmpItem.getFlags() & IMAGE_GLYPH)) { if (szImageFileName) tmpItem.Create(szImageFileName); @@ -1416,7 +1416,7 @@ void CSkin::Load(void) continue; } for (i = 0; i <= ID_EXTBK_LAST; i++) { - if (!_tcsicmp(&p[1], SkinItems[i].szName[0] == '{' ? &SkinItems[i].szName[3] : SkinItems[i].szName)) { + if (!mir_tstrcmpi(&p[1], SkinItems[i].szName[0] == '{' ? &SkinItems[i].szName[3] : SkinItems[i].szName)) { ReadItem(i, p); break; } diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp index 7a487842db..4b05346c66 100644 --- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp +++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp @@ -769,7 +769,7 @@ class CAnnivList // add anniversaries if (_filter.bFilterIndex != FILTER_BIRTHDAY && (!_filter.pszProto || !_strcmpi(pszProto, _filter.pszProto))) for (i = 0; !ad.DBGetAnniversaryDate(hContact, i); i++) - if (!_filter.pszAnniv || !_tcsicmp(_filter.pszAnniv, ad.Description())) + if (!_filter.pszAnniv || !mir_tstrcmpi(_filter.pszAnniv, ad.Description())) AddRow(hContact, pszProto, ad, mtNow, wDaysBefore); } } diff --git a/plugins/UserInfoEx/src/psp_anniversary.cpp b/plugins/UserInfoEx/src/psp_anniversary.cpp index f22af82f76..44fa7e62e3 100644 --- a/plugins/UserInfoEx/src/psp_anniversary.cpp +++ b/plugins/UserInfoEx/src/psp_anniversary.cpp @@ -85,7 +85,7 @@ static INT_PTR CALLBACK DlgProc_AnniversaryEditor(HWND hDlg, UINT uMsg, WPARAM w break; } - if (_tcsicmp(pszText, pDlgEditAnniv->Description())) { + if (mir_tstrcmpi(pszText, pDlgEditAnniv->Description())) { pDlgEditAnniv->Description(pszText); pDlgEditAnniv->SetFlags(MAnnivDate::MADF_HASCUSTOM | MAnnivDate::MADF_CHANGED); } diff --git a/plugins/UserInfoEx/src/svc_timezone_old.cpp b/plugins/UserInfoEx/src/svc_timezone_old.cpp index a4d49edbeb..fb82f07b18 100644 --- a/plugins/UserInfoEx/src/svc_timezone_old.cpp +++ b/plugins/UserInfoEx/src/svc_timezone_old.cpp @@ -124,7 +124,7 @@ class CTzMgr : public LIST static int sortFunc(const CTimeZone *tz1, const CTimeZone *tz2) { // DO NOT USE mir_tcsicmp here as it does only return TRUE or FALSE!!! - return _tcsicmp(tz1->ptszName, tz2->ptszName); + return mir_tstrcmpi(tz1->ptszName, tz2->ptszName); } /** diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp index 100b599a1d..22abffcfd3 100644 --- a/plugins/Variables/src/help.cpp +++ b/plugins/Variables/src/help.cpp @@ -447,7 +447,7 @@ static BOOL CALLBACK processTokenListMessage(HWND hwndDlg, UINT msg, WPARAM wPar } else text = NULL; - if (text != NULL && (last == NULL || _tcsicmp(last, text))) { + if (text != NULL && (last == NULL || mir_tstrcmpi(last, text))) { lvItem.mask = LVIF_TEXT; lvItem.pszText = text; ListView_InsertItem(hList, &lvItem); diff --git a/plugins/Variables/src/parse_str.cpp b/plugins/Variables/src/parse_str.cpp index 225ed37751..d7e797c830 100644 --- a/plugins/Variables/src/parse_str.cpp +++ b/plugins/Variables/src/parse_str.cpp @@ -542,7 +542,7 @@ static TCHAR *parseStricmp(ARGUMENTSINFO *ai) if (ai->argc != 3) return NULL; - if (_tcsicmp(ai->targv[1], ai->targv[2])) + if (mir_tstrcmpi(ai->targv[1], ai->targv[2])) ai->flags |= AIF_FALSE; return mir_tstrdup(_T("")); diff --git a/plugins/Weather/src/weather_addstn.cpp b/plugins/Weather/src/weather_addstn.cpp index cede7efbf4..5f2fd10f6b 100644 --- a/plugins/Weather/src/weather_addstn.cpp +++ b/plugins/Weather/src/weather_addstn.cpp @@ -46,12 +46,12 @@ INT_PTR WeatherAddToList(WPARAM wParam, LPARAM lParam) DBVARIANT dbv; // check ID to see if the contact already exist in the database if ( !db_get_ts(hContact, WEATHERPROTONAME, "ID", &dbv)) { - if ( !_tcsicmp(psr->email, dbv.ptszVal)) { + if ( !mir_tstrcmpi(psr->email, dbv.ptszVal)) { // remove the flag for not on list and hidden, thus make the contact visible // and add them on the list if (db_get_b(hContact, "CList", "NotOnList", 1)) { db_unset(hContact, "CList", "NotOnList"); - db_unset(hContact, "CList", "Hidden"); + db_unset(hContact, "CList", "Hidden"); } db_free(&dbv); // contact is added, function quitting @@ -322,13 +322,13 @@ int NameSearchProc(TCHAR *name, const int searchId, WINAMESEARCH *sData, TCHAR * // for single result if (sData->Single.Available && (search != NULL || !sData->Multiple.Available)) { // single result // if station ID appears first in the downloaded data - if ( !_tcsicmp(sData->Single.First, _T("ID"))) { + if ( !mir_tstrcmpi(sData->Single.First, _T("ID"))) { GetDataValue(&sData->Single.ID, str, &szInfo); mir_sntprintf(sID, SIZEOF(sID), _T("%s/%s"), svc, str); GetDataValue(&sData->Single.Name, Name, &szInfo); } // if station name appears first in the downloaded data - else if ( !_tcsicmp(sData->Single.First, _T("NAME"))) { + else if ( !mir_tstrcmpi(sData->Single.First, _T("NAME"))) { GetDataValue(&sData->Single.Name, Name, &szInfo); GetDataValue(&sData->Single.ID, str, &szInfo); mir_sntprintf(sID, SIZEOF(sID), _T("%s/%s"), svc, str); @@ -363,13 +363,13 @@ int NameSearchProc(TCHAR *name, const int searchId, WINAMESEARCH *sData, TCHAR * // search for the next occurrence of the string while (true) { // if station ID appears first in the downloaded data - if ( !_tcsicmp(sData->Multiple.First, _T("ID"))) { + if ( !mir_tstrcmpi(sData->Multiple.First, _T("ID"))) { GetDataValue(&sData->Multiple.ID, str, &szInfo); mir_sntprintf(sID, SIZEOF(sID), _T("%s/%s"), svc, str); GetDataValue(&sData->Multiple.Name, Name, &szInfo); } // if station name appears first in the downloaded data - else if ( !_tcsicmp(sData->Multiple.First, _T("NAME"))) { + else if ( !mir_tstrcmpi(sData->Multiple.First, _T("NAME"))) { GetDataValue(&sData->Multiple.Name, Name, &szInfo); GetDataValue(&sData->Multiple.ID, str, &szInfo); mir_sntprintf(sID, SIZEOF(sID), _T("%s/%s"), svc, str); diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp index b8cbb97f95..7d73d76fed 100644 --- a/plugins/Weather/src/weather_conv.cpp +++ b/plugins/Weather/src/weather_conv.cpp @@ -100,8 +100,8 @@ void GetTemp(TCHAR *tempchar, TCHAR *unit, TCHAR* str) temp = _ttof(tempchar); // convert all to F first - if ( !_tcsicmp(unit, _T("C"))) temp = (temp*9/5)+32; - else if ( !_tcsicmp(unit, _T("K"))) temp = ((temp-273.15)*9/5)+32; + if ( !mir_tstrcmpi(unit, _T("C"))) temp = (temp*9/5)+32; + else if ( !mir_tstrcmpi(unit, _T("K"))) temp = ((temp-273.15)*9/5)+32; // convert to apporiate unit switch (opt.tUnit) { @@ -143,17 +143,17 @@ void GetPressure(TCHAR *tempchar, TCHAR *unit, TCHAR* str) } // convert all to mb first - if ( !_tcsicmp(unit, _T("KPA"))) + if ( !mir_tstrcmpi(unit, _T("KPA"))) tempunit = (double)output * 10; - else if ( !_tcsicmp(unit, _T("HPA"))) + else if ( !mir_tstrcmpi(unit, _T("HPA"))) tempunit = (double)output; - else if ( !_tcsicmp(unit, _T("MB"))) + else if ( !mir_tstrcmpi(unit, _T("MB"))) tempunit = (double)output; - else if ( !_tcsicmp(unit, _T("IN"))) + else if ( !mir_tstrcmpi(unit, _T("IN"))) tempunit = (double)output * 33.86388; - else if ( !_tcsicmp(unit, _T("MM"))) + else if ( !mir_tstrcmpi(unit, _T("MM"))) tempunit = (double)output * 1.33322; - else if ( !_tcsicmp(unit, _T("TORR"))) + else if ( !mir_tstrcmpi(unit, _T("TORR"))) tempunit = (double)output * 1.33322; // convert to apporiate unit @@ -200,13 +200,13 @@ void GetSpeed(TCHAR *tempchar, TCHAR *unit, TCHAR *str) return; // convert all to m/s first - if ( !_tcsicmp(unit, _T("KM/H"))) + if ( !mir_tstrcmpi(unit, _T("KM/H"))) tempunit /= 3.6; -// else if ( !_tcsicmp(unit, _T("M/S")) +// else if ( !mir_tstrcmpi(unit, _T("M/S")) // tempunit = tempunit; - else if ( !_tcsicmp(unit, _T("MPH"))) + else if ( !mir_tstrcmpi(unit, _T("MPH"))) tempunit *= 0.44704; - else if ( !_tcsicmp(unit, _T("KNOTS"))) + else if ( !mir_tstrcmpi(unit, _T("KNOTS"))) tempunit *= 0.514444; // convert to apporiate unit @@ -249,9 +249,9 @@ void GetDist(TCHAR *tempchar, TCHAR *unit, TCHAR *str) } // convert all to km first - if ( !_tcsicmp(unit, _T("KM"))) + if ( !mir_tstrcmpi(unit, _T("KM"))) tempunit = (double)output; - else if ( !_tcsicmp(unit, _T("MILES"))) + else if ( !mir_tstrcmpi(unit, _T("MILES"))) tempunit = (double)output * 1.609; // convert to apporiate unit @@ -289,9 +289,9 @@ void GetElev(TCHAR *tempchar, TCHAR *unit, TCHAR *str) } // convert all to m first - if ( !_tcsicmp(unit, _T("M"))) + if ( !mir_tstrcmpi(unit, _T("M"))) tempunit = (double)output; - else if ( !_tcsicmp(unit, _T("FT"))) + else if ( !mir_tstrcmpi(unit, _T("FT"))) tempunit = (double)output / 3.28; // convert to apporiate unit diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp index 02ee823423..81175f2ea4 100644 --- a/plugins/Weather/src/weather_data.cpp +++ b/plugins/Weather/src/weather_data.cpp @@ -200,58 +200,58 @@ void ConvertDataValue(WIDATAITEM *UpdateData, TCHAR *Data) if ( !mir_tstrcmp(UpdateData->Name, _T("Temperature")) || !mir_tstrcmp(UpdateData->Name, _T("High")) || !mir_tstrcmp(UpdateData->Name, _T("Low")) || !mir_tstrcmp(UpdateData->Name, _T("Feel")) || !mir_tstrcmp(UpdateData->Name, _T("Dewpoint")) || - !_tcsicmp(UpdateData->Unit, _T("C")) || !_tcsicmp(UpdateData->Unit, _T("F")) || - !_tcsicmp(UpdateData->Unit, _T("K"))) + !mir_tstrcmpi(UpdateData->Unit, _T("C")) || !mir_tstrcmpi(UpdateData->Unit, _T("F")) || + !mir_tstrcmpi(UpdateData->Unit, _T("K"))) { GetTemp(Data, UpdateData->Unit, str); _tcscpy(Data, str); } // pressure - else if ( !mir_tstrcmp(UpdateData->Name, _T("Pressure")) || !_tcsicmp(UpdateData->Unit, _T("HPA")) || - !_tcsicmp(UpdateData->Unit, _T("KPA")) || !_tcsicmp(UpdateData->Unit, _T("MB")) || - !_tcsicmp(UpdateData->Unit, _T("TORR")) || !_tcsicmp(UpdateData->Unit, _T("IN")) || - !_tcsicmp(UpdateData->Unit, _T("MM"))) + else if ( !mir_tstrcmp(UpdateData->Name, _T("Pressure")) || !mir_tstrcmpi(UpdateData->Unit, _T("HPA")) || + !mir_tstrcmpi(UpdateData->Unit, _T("KPA")) || !mir_tstrcmpi(UpdateData->Unit, _T("MB")) || + !mir_tstrcmpi(UpdateData->Unit, _T("TORR")) || !mir_tstrcmpi(UpdateData->Unit, _T("IN")) || + !mir_tstrcmpi(UpdateData->Unit, _T("MM"))) { GetPressure(Data, UpdateData->Unit, str); _tcscpy(Data, str); } // speed - else if ( !mir_tstrcmp(UpdateData->Name, _T("Wind Speed")) || !_tcsicmp(UpdateData->Unit, _T("KM/H")) || - !_tcsicmp(UpdateData->Unit, _T("M/S")) || !_tcsicmp(UpdateData->Unit, _T("MPH")) || - !_tcsicmp(UpdateData->Unit, _T("KNOTS"))) + else if ( !mir_tstrcmp(UpdateData->Name, _T("Wind Speed")) || !mir_tstrcmpi(UpdateData->Unit, _T("KM/H")) || + !mir_tstrcmpi(UpdateData->Unit, _T("M/S")) || !mir_tstrcmpi(UpdateData->Unit, _T("MPH")) || + !mir_tstrcmpi(UpdateData->Unit, _T("KNOTS"))) { GetSpeed(Data, UpdateData->Unit, str); _tcscpy(Data, str); } // visibility - else if ( !mir_tstrcmp(UpdateData->Name, _T("Visibility")) || !_tcsicmp(UpdateData->Unit, _T("KM")) || - !_tcsicmp(UpdateData->Unit, _T("MILES"))) + else if ( !mir_tstrcmp(UpdateData->Name, _T("Visibility")) || !mir_tstrcmpi(UpdateData->Unit, _T("KM")) || + !mir_tstrcmpi(UpdateData->Unit, _T("MILES"))) { GetDist(Data, UpdateData->Unit, str); _tcscpy(Data, str); } // elevation - else if ( !mir_tstrcmp(UpdateData->Name, _T("Elevation")) || !_tcsicmp(UpdateData->Unit, _T("FT")) || - !_tcsicmp(UpdateData->Unit, _T("M"))) + else if ( !mir_tstrcmp(UpdateData->Name, _T("Elevation")) || !mir_tstrcmpi(UpdateData->Unit, _T("FT")) || + !mir_tstrcmpi(UpdateData->Unit, _T("M"))) { GetElev(Data, UpdateData->Unit, str); _tcscpy(Data, str); } // converting case for condition to the upper+lower format - else if ( !_tcsicmp(UpdateData->Unit, _T("COND"))) + else if ( !mir_tstrcmpi(UpdateData->Unit, _T("COND"))) CaseConv(Data); // degree sign - else if ( !_tcsicmp(UpdateData->Unit, _T("DEG"))) + else if ( !mir_tstrcmpi(UpdateData->Unit, _T("DEG"))) { if ( !opt.DoNotAppendUnit) _tcscat(Data, opt.DegreeSign); } // percent sign - else if ( !_tcsicmp(UpdateData->Unit, _T("%"))) + else if ( !mir_tstrcmpi(UpdateData->Unit, _T("%"))) { if ( !opt.DoNotAppendUnit) _tcscat(Data, _T("%")); } // truncating strings for day/month to 2 or 3 characters - else if ( !_tcsicmp(UpdateData->Unit, _T("DAY")) || !_tcsicmp(UpdateData->Unit, _T("MONTH"))) + else if ( !mir_tstrcmpi(UpdateData->Unit, _T("DAY")) || !mir_tstrcmpi(UpdateData->Unit, _T("MONTH"))) if (opt.dUnit > 1 && mir_tstrlen(Data) > opt.dUnit) Data[opt.dUnit] = '\0'; } diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp index e563353491..812ec987f3 100644 --- a/plugins/Weather/src/weather_ini.cpp +++ b/plugins/Weather/src/weather_ini.cpp @@ -196,7 +196,7 @@ bool LoadWIData(bool dial) chop = _tcsrchr(FileName, '\\'); chop[1] = '\0'; _tcsncat(FileName, fd.cFileName, SIZEOF(FileName) - mir_tstrlen(FileName)); - if ( _tcsicmp(fd.cFileName, _T("SAMPLE_INI.INI"))) { + if ( mir_tstrcmpi(fd.cFileName, _T("SAMPLE_INI.INI"))) { WIDATA Data; LoadStationData(FileName, fd.cFileName, &Data); if (Data.Enabled) diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp index fc94299a79..ffa4818c19 100644 --- a/plugins/Weather/src/weather_update.cpp +++ b/plugins/Weather/src/weather_update.cpp @@ -83,19 +83,19 @@ int UpdateWeather(MCONTACT hContact) // compare the old condition and determine if the weather had changed if (opt.UpdateOnlyConditionChanged) { // consider condition change if (!db_get_ts(hContact, WEATHERPROTONAME, "LastCondition", &dbv)) { - if (_tcsicmp(winfo.cond, dbv.ptszVal)) Ch = TRUE; // the weather condition is changed + if (mir_tstrcmpi(winfo.cond, dbv.ptszVal)) Ch = TRUE; // the weather condition is changed db_free(&dbv); } else Ch = TRUE; if (!db_get_ts(hContact, WEATHERPROTONAME, "LastTemperature", &dbv)) { - if (_tcsicmp(winfo.temp, dbv.ptszVal)) Ch = TRUE; // the temperature is changed + if (mir_tstrcmpi(winfo.temp, dbv.ptszVal)) Ch = TRUE; // the temperature is changed db_free(&dbv); } else Ch = TRUE; } else { // consider update time change if (!db_get_ts(hContact, WEATHERPROTONAME, "LastUpdate", &dbv)) { - if (_tcsicmp(winfo.update, dbv.ptszVal)) Ch = TRUE; // the update time is changed + if (mir_tstrcmpi(winfo.update, dbv.ptszVal)) Ch = TRUE; // the update time is changed db_free(&dbv); } else Ch = TRUE; @@ -459,7 +459,7 @@ int GetWeatherData(MCONTACT hContact) // if it is a normal item with start= and end=, then parse through the downloaded string // to get a data value. GetDataValue(&Item->Item, DataValue, &szInfo); - if ( mir_tstrcmp(Item->Item.Name, _T("Condition")) && _tcsicmp(Item->Item.Unit, _T("Cond"))) + if ( mir_tstrcmp(Item->Item.Name, _T("Condition")) && mir_tstrcmpi(Item->Item.Unit, _T("Cond"))) _tcsncpy(DataValue, TranslateTS(DataValue), MAX_DATA_LEN - 1); break; @@ -562,7 +562,7 @@ int GetWeatherData(MCONTACT hContact) CharLowerBuff(DataValue, (DWORD)mir_tstrlen(DataValue)); cond = GetIcon(DataValue, Data); } - else if ( _tcsicmp(Item->Item.Unit, _T("Cond")) == 0) { + else if ( mir_tstrcmpi(Item->Item.Unit, _T("Cond")) == 0) { TCHAR buf[128], *cbuf; mir_sntprintf(buf, SIZEOF(buf), _T("#%s Weather"), DataValue); cbuf = TranslateTS(buf); diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp index 04716317e4..caa6b711c2 100644 --- a/plugins/WhenWasIt/src/dlg_handlers.cpp +++ b/plugins/WhenWasIt/src/dlg_handlers.cpp @@ -561,7 +561,7 @@ INT_PTR CALLBACK BirthdaysCompare(LPARAM lParam1, LPARAM lParam2, LPARAM myParam else res = (value1 != value2); } - else res = _tcsicmp(text1, text2); + else res = mir_tstrcmpi(text1, text2); res = (params.column == lastColumn) ? -res : res; return res; diff --git a/plugins/WhenWasIt/src/utils.cpp b/plugins/WhenWasIt/src/utils.cpp index 37b4e9ef11..5ffcd81274 100644 --- a/plugins/WhenWasIt/src/utils.cpp +++ b/plugins/WhenWasIt/src/utils.cpp @@ -185,7 +185,7 @@ MCONTACT GetContactFromID(TCHAR *szID, char *szProto) char *m_szProto = GetContactProto(hContact); TCHAR *szHandle = GetContactID(hContact, szProto); if (szHandle) { - bool found = (!_tcsicmp(szHandle, szID) && !_stricmp(szProto, m_szProto)); + bool found = (!mir_tstrcmpi(szHandle, szID) && !_stricmp(szProto, m_szProto)); free(szHandle); if (found) return hContact; diff --git a/plugins/YAPP/src/yapp_history_dlg.cpp b/plugins/YAPP/src/yapp_history_dlg.cpp index 1a3d083519..f98482dcdd 100644 --- a/plugins/YAPP/src/yapp_history_dlg.cpp +++ b/plugins/YAPP/src/yapp_history_dlg.cpp @@ -187,7 +187,7 @@ int CALLBACK PopupsCompare(LPARAM lParam1, LPARAM lParam2, LPARAM myParam) ListView_GetItemText(params.hList, (int) lParam1, params.column, text1, SIZEOF(text1)); ListView_GetItemText(params.hList, (int) lParam2, params.column, text2, SIZEOF(text2)); - res = _tcsicmp(text1, text2); + res = mir_tstrcmpi(text1, text2); res = (params.column == lastColumn) ? -res : res; //do reverse search on second click on same column diff --git a/plugins/YahooGroups/src/utils.cpp b/plugins/YahooGroups/src/utils.cpp index a2306b69b2..36506bf4f2 100644 --- a/plugins/YahooGroups/src/utils.cpp +++ b/plugins/YahooGroups/src/utils.cpp @@ -329,7 +329,7 @@ MCONTACT GetContactFromID(TCHAR *szID, char *szProto) tmp = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR); _tcsncpy(dispName, tmp, SIZEOF(dispName)); - if ((szHandle) && ((_tcsicmp(szHandle, szID) == 0) || (_tcsicmp(dispName, szID) == 0)) && ((szProto == NULL) || (_stricmp(szProto, cProtocol) == 0))) + if ((szHandle) && ((mir_tstrcmpi(szHandle, szID) == 0) || (mir_tstrcmpi(dispName, szID) == 0)) && ((szProto == NULL) || (_stricmp(szProto, cProtocol) == 0))) found = 1; if (szHandle) { free(szHandle); } diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp index 1c8ff22dbd..16af0a823e 100644 --- a/protocols/GTalkExt/src/handlers.cpp +++ b/protocols/GTalkExt/src/handlers.cpp @@ -340,11 +340,11 @@ BOOL OnIqSetGoogleSharedStatus(IJabberInterface *ji, HXML iqNode, void *) int status; HXML query = xi.getChildByPath(iqNode, NODENAME_QUERY, 0); HXML node = xi.getChildByPath(query, _T("invisible"), 0); - if (0 == _tcsicmp(_T("true"), xi.getAttrValue(node, _T("value")))) + if (0 == mir_tstrcmpi(_T("true"), xi.getAttrValue(node, _T("value")))) status = ID_STATUS_INVISIBLE; else { LPCTSTR txt = xi.getText(xi.getChildByPath(query, _T("show"), 0)); - if (txt && 0 == _tcsicmp(_T("dnd"), txt)) + if (txt && 0 == mir_tstrcmpi(_T("dnd"), txt)) status = ID_STATUS_DND; else if (gta->m_pa->ppro->m_iStatus == ID_STATUS_DND || gta->m_pa->ppro->m_iStatus == ID_STATUS_INVISIBLE) status = ID_STATUS_ONLINE; diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp index 5f1dd86fd3..467487cfe5 100644 --- a/protocols/Gadu-Gadu/src/image.cpp +++ b/protocols/Gadu-Gadu/src/image.cpp @@ -789,12 +789,12 @@ TCHAR *gg_img_hasextension(TCHAR *filename) { size_t len = mir_tstrlen(imgtype); imgtype++; - if (len == 4 && (_tcsicmp(imgtype, _T("bmp")) == 0 || - _tcsicmp(imgtype, _T("gif")) == 0 || - _tcsicmp(imgtype, _T("jpg")) == 0 || - _tcsicmp(imgtype, _T("png")) == 0)) + if (len == 4 && (mir_tstrcmpi(imgtype, _T("bmp")) == 0 || + mir_tstrcmpi(imgtype, _T("gif")) == 0 || + mir_tstrcmpi(imgtype, _T("jpg")) == 0 || + mir_tstrcmpi(imgtype, _T("png")) == 0)) return --imgtype; - if (len == 5 && _tcsicmp(imgtype, _T("jpeg")) == 0) + if (len == 5 && mir_tstrcmpi(imgtype, _T("jpeg")) == 0) return --imgtype; } } diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index ab33180bd2..f45074ea30 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -45,7 +45,7 @@ int CJabberProto::OnContactDeleted(WPARAM hContact, LPARAM) TCHAR szStrippedJid[JABBER_MAX_JID_LEN]; JabberStripJid(m_ThreadInfo->fullJID, szStrippedJid, SIZEOF(szStrippedJid)); TCHAR *szDog = _tcschr(szStrippedJid, _T('@')); - if (szDog && _tcsicmp(szDog + 1, jid)) + if (szDog && mir_tstrcmpi(szDog + 1, jid)) m_ThreadInfo->send(XmlNodeIq(_T("set"), SerialNext(), jid) << XQUERY(JABBER_FEAT_REGISTER) << XCHILD(_T("remove"))); } diff --git a/protocols/JabberG/src/jabber_iq.cpp b/protocols/JabberG/src/jabber_iq.cpp index d0084b7125..5669757ee9 100644 --- a/protocols/JabberG/src/jabber_iq.cpp +++ b/protocols/JabberG/src/jabber_iq.cpp @@ -245,9 +245,9 @@ bool CJabberIqManager::HandleIq(int nIqId, HXML pNode) return false; int nIqType = JABBER_IQ_TYPE_FAIL; - if (!_tcsicmp(szType, _T("result"))) + if (!mir_tstrcmpi(szType, _T("result"))) nIqType = JABBER_IQ_TYPE_RESULT; - else if (!_tcsicmp(szType, _T("error"))) + else if (!mir_tstrcmpi(szType, _T("error"))) nIqType = JABBER_IQ_TYPE_ERROR; else return false; @@ -297,9 +297,9 @@ bool CJabberIqManager::HandleIqPermanent(HXML pNode) CJabberIqInfo iqInfo; iqInfo.m_nIqType = JABBER_IQ_TYPE_FAIL; - if (!_tcsicmp(szType, _T("get"))) + if (!mir_tstrcmpi(szType, _T("get"))) iqInfo.m_nIqType = JABBER_IQ_TYPE_GET; - else if (!_tcsicmp(szType, _T("set"))) + else if (!mir_tstrcmpi(szType, _T("set"))) iqInfo.m_nIqType = JABBER_IQ_TYPE_SET; else return FALSE; diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 59594259fa..e2d765b5d9 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -993,7 +993,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) if (hasFn && !hasNick) { ptrT nick(getTStringA(hContact, "Nick")); ptrT jidNick(JabberNickFromJID(jid)); - if (!nick || (jidNick && !_tcsicmp(nick, jidNick))) + if (!nick || (jidNick && !mir_tstrcmpi(nick, jidNick))) setTString(hContact, "Nick", ptrT(getTStringA(hContact, "FullName"))); } if (!hasFn) diff --git a/protocols/JabberG/src/jabber_message_manager.cpp b/protocols/JabberG/src/jabber_message_manager.cpp index f8d067080d..4709b1dea1 100644 --- a/protocols/JabberG/src/jabber_message_manager.cpp +++ b/protocols/JabberG/src/jabber_message_manager.cpp @@ -59,15 +59,15 @@ bool CJabberMessageManager::HandleMessagePermanent(HXML node, ThreadData *pThrea LPCTSTR szType = xmlGetAttrValue(node, _T("type")); if (szType) { - if (!_tcsicmp(szType, _T("normal"))) + if (!mir_tstrcmpi(szType, _T("normal"))) messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_NORMAL; - else if (!_tcsicmp(szType, _T("error"))) + else if (!mir_tstrcmpi(szType, _T("error"))) messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_ERROR; - else if (!_tcsicmp(szType, _T("chat"))) + else if (!mir_tstrcmpi(szType, _T("chat"))) messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_CHAT; - else if (!_tcsicmp(szType, _T("groupchat"))) + else if (!mir_tstrcmpi(szType, _T("groupchat"))) messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_GROUPCHAT; - else if (!_tcsicmp(szType, _T("headline"))) + else if (!mir_tstrcmpi(szType, _T("headline"))) messageInfo.m_nMessageType = JABBER_MESSAGE_TYPE_HEADLINE; else return false; diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index ac18e525cd..64b33c7916 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -104,11 +104,11 @@ void CJabberProto::OnIqResultPrivacyList(HXML iqNode, CJabberIqInfo*) const TCHAR *itemType = xmlGetAttrValue(item, _T("type")); PrivacyListRuleType nItemType = Else; if (itemType) { - if (!_tcsicmp(itemType, _T("jid"))) + if (!mir_tstrcmpi(itemType, _T("jid"))) nItemType = Jid; - else if (!_tcsicmp(itemType, _T("group"))) + else if (!mir_tstrcmpi(itemType, _T("group"))) nItemType = Group; - else if (!_tcsicmp(itemType, _T("subscription"))) + else if (!mir_tstrcmpi(itemType, _T("subscription"))) nItemType = Subscription; } @@ -116,7 +116,7 @@ void CJabberProto::OnIqResultPrivacyList(HXML iqNode, CJabberIqInfo*) const TCHAR *itemAction = xmlGetAttrValue(item, _T("action")); BOOL bAllow = TRUE; - if (itemAction && !_tcsicmp(itemAction, _T("deny"))) + if (itemAction && !mir_tstrcmpi(itemAction, _T("deny"))) bAllow = FALSE; const TCHAR *itemOrder = xmlGetAttrValue(item, _T("order")); diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index c7b61995a2..ea0d16f51b 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #pragma warning(disable:4355) static int compareTransports(const TCHAR *p1, const TCHAR *p2) -{ return _tcsicmp(p1, p2); +{ return mir_tstrcmpi(p1, p2); } static int compareListItems(const JABBER_LIST_ITEM *p1, const JABBER_LIST_ITEM *p2) @@ -719,7 +719,7 @@ HANDLE __cdecl CJabberProto::SearchBasic(const TCHAR *szJid) szServer = getTStringA(NULL, "LoginServer"); if (szServer == NULL) szServer = mir_tstrdup(_T("jabber.org")); - else if (numericjid && !_tcsicmp(szServer, _T("S.ms"))) { + else if (numericjid && !mir_tstrcmpi(szServer, _T("S.ms"))) { mir_free(szServer); szServer = mir_tstrdup(_T("sms")); } diff --git a/protocols/JabberG/src/jabber_search.cpp b/protocols/JabberG/src/jabber_search.cpp index e2646e29ac..38d53438e5 100644 --- a/protocols/JabberG/src/jabber_search.cpp +++ b/protocols/JabberG/src/jabber_search.cpp @@ -160,7 +160,7 @@ void CJabberProto::OnIqResultGetSearchFields(HXML iqNode, CJabberIqInfo*) if (!chNode) break; - if (!_tcsicmp(xmlGetName(chNode), _T("instructions")) && xmlGetText(chNode)) + if (!mir_tstrcmpi(xmlGetName(chNode), _T("instructions")) && xmlGetText(chNode)) SetDlgItemText(searchHandleDlg,IDC_INSTRUCTIONS,TranslateTS(xmlGetText(chNode))); else if (xmlGetName(chNode)) { Data *MyData=(Data*)malloc(sizeof(Data)); @@ -259,7 +259,7 @@ void CJabberProto::SearchReturnResults(HANDLE id, void * pvUsersInfo, U_TCHAR_M TCHAR* var = ListOfFields[j]; TCHAR* value = pmUserData->operator [](var); Results.pszFields[j] = value ? value : (TCHAR *)_T(" "); - if (!_tcsicmp(var,_T("jid")) && value) + if (!mir_tstrcmpi(var,_T("jid")) && value) _tcsncpy_s(Results.jsr.jid, value, _TRUNCATE); } { @@ -273,7 +273,7 @@ void CJabberProto::SearchReturnResults(HANDLE id, void * pvUsersInfo, U_TCHAR_M nick = pmUserData->operator [](nickfields[k++]); } if (nick) { - if (_tcsicmp(nick, Results.jsr.jid)) { + if (mir_tstrcmpi(nick, Results.jsr.jid)) { mir_sntprintf(buff, SIZEOF(buff), _T("%s (%s)"), nick, Results.jsr.jid); } else { _tcsncpy_s(buff, nick, _TRUNCATE); @@ -493,7 +493,7 @@ void CJabberProto::SearchDeleteFromRecent(const TCHAR *szAddr, BOOL deleteLastFr char key[30]; mir_snprintf(key, SIZEOF(key), "RecentlySearched_%d", i); ptrT szValue( getTStringA(key)); - if (szValue == NULL || _tcsicmp(szAddr, szValue)) + if (szValue == NULL || mir_tstrcmpi(szAddr, szValue)) continue; for (int j=i; j < 10; j++) { @@ -707,7 +707,7 @@ HWND __cdecl CJabberProto::CreateExtendedSearchUI(HWND parent) { if (parent && hInst) { ptrT szServer( getTStringA("LoginServer")); - if (szServer == NULL || _tcsicmp(szServer, _T("S.ms"))) + if (szServer == NULL || mir_tstrcmpi(szServer, _T("S.ms"))) return CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_SEARCHUSER), parent, JabberSearchAdvancedDlgProc, (LPARAM)this); } diff --git a/protocols/JabberG/src/jabber_search.h b/protocols/JabberG/src/jabber_search.h index 92ded72ffb..6526ac939d 100644 --- a/protocols/JabberG/src/jabber_search.h +++ b/protocols/JabberG/src/jabber_search.h @@ -271,5 +271,5 @@ public: inline int TCharKeyCmp(TCHAR* a, TCHAR* b) { - return (int)(_tcsicmp(a,b)); + return (int)(mir_tstrcmpi(a,b)); } diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index f43f712e83..c8a1181ca1 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -435,7 +435,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) *(szSecondParam++) = 0; // no command or message command - if (!szCommand || (szCommand && !_tcsicmp(szCommand, _T("message")))) { + if (!szCommand || (szCommand && !mir_tstrcmpi(szCommand, _T("message")))) { // message if (!ServiceExists(MS_MSG_SENDMESSAGEW)) return 1; @@ -462,7 +462,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) return 0; } - if (!_tcsicmp(szCommand, _T("roster"))) { + if (!mir_tstrcmpi(szCommand, _T("roster"))) { if (!HContactFromJID(szJid)) { JABBER_SEARCH_RESULT jsr = { 0 }; jsr.hdr.cbSize = sizeof(JABBER_SEARCH_RESULT); @@ -481,19 +481,19 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) } // chat join invitation - if (!_tcsicmp(szCommand, _T("join"))) { + if (!mir_tstrcmpi(szCommand, _T("join"))) { GroupchatJoinRoomByJid(NULL, szJid); return 0; } // service discovery request - if (!_tcsicmp(szCommand, _T("disco"))) { + if (!mir_tstrcmpi(szCommand, _T("disco"))) { OnMenuHandleServiceDiscovery(0, (LPARAM)szJid); return 0; } // ad-hoc commands - if (!_tcsicmp(szCommand, _T("command"))) { + if (!mir_tstrcmpi(szCommand, _T("command"))) { if (szSecondParam) { if (!_tcsnicmp(szSecondParam, _T("node="), 5)) { szSecondParam += 5; @@ -508,7 +508,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) } // send file - if (!_tcsicmp(szCommand, _T("sendfile"))) { + if (!mir_tstrcmpi(szCommand, _T("sendfile"))) { MCONTACT hContact = HContactFromJID(szJid, TRUE); if (hContact == NULL) hContact = DBCreateContact(szJid, szJid, TRUE, TRUE); diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index 594c24eff2..282f3f93bb 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -729,7 +729,7 @@ void CJabberProto::OnProcessFeatures(HXML node, ThreadData *info) } else if (!mir_tstrcmp(xmlGetName(c), _T("hostname"))) { const TCHAR *mech = xmlGetAttrValue(c, _T("mechanism")); - if (mech && _tcsicmp(mech, _T("GSSAPI")) == 0) { + if (mech && mir_tstrcmpi(mech, _T("GSSAPI")) == 0) { m_AuthMechs.m_gssapiHostName = mir_tstrdup(xmlGetText(c)); } } @@ -1035,7 +1035,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData *info) pResourceStatus pFromResource(ResourceInfoFromJID(from)); // Message receipts delivery request. Reply here, before a call to HandleMessagePermanent() to make sure message receipts are handled for external plugins too. - if ((!type || _tcsicmp(type, _T("error"))) && xmlGetChildByTag(node, "request", "xmlns", JABBER_FEAT_MESSAGE_RECEIPTS)) { + if ((!type || mir_tstrcmpi(type, _T("error"))) && xmlGetChildByTag(node, "request", "xmlns", JABBER_FEAT_MESSAGE_RECEIPTS)) { info->send( XmlNode(_T("message")) << XATTR(_T("to"), from) << XATTR(_T("id"), idStr) << XCHILDNS(_T("received"), JABBER_FEAT_MESSAGE_RECEIPTS) << XATTR(_T("id"), idStr)); @@ -1499,7 +1499,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) TCHAR szBareOurJid[JABBER_MAX_JID_LEN]; JabberStripJid(info->fullJID, szBareOurJid, SIZEOF(szBareOurJid)); - if (!_tcsicmp(szBareFrom, szBareOurJid)) + if (!mir_tstrcmpi(szBareFrom, szBareOurJid)) bSelfPresence = TRUE; LPCTSTR type = xmlGetAttrValue(node, _T("type")); @@ -1509,7 +1509,7 @@ void CJabberProto::OnProcessPresence(HXML node, ThreadData *info) return; if ((hContact = HContactFromJID(from)) == NULL) { - if (!_tcsicmp(info->fullJID, from) || (!bSelfPresence && !ListGetItemPtr(LIST_ROSTER, from))) { + if (!mir_tstrcmpi(info->fullJID, from) || (!bSelfPresence && !ListGetItemPtr(LIST_ROSTER, from))) { debugLog(_T("SKIP Receive presence online from %s (who is not in my roster and not in list - skiping)"), from); return; } diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp index bc84f3ad64..dd35207888 100644 --- a/protocols/MSN/src/msn_chat.cpp +++ b/protocols/MSN/src/msn_chat.cpp @@ -645,12 +645,12 @@ int CMsnProto::MSN_GCMenuHook(WPARAM, LPARAM lParam) { LPGENT("&Op user") , 40, MENU_ITEM, FALSE } }; GCThreadData* thread = MSN_GetThreadByChatId(gcmi->pszID); - if (thread && thread->mMe && _tcsicmp(thread->mMe->role, _T("admin"))) { + if (thread && thread->mMe && mir_tstrcmpi(thread->mMe->role, _T("admin"))) { Items[2].bDisabled = TRUE; Items[3].bDisabled = TRUE; } else { const TCHAR *pszRole = MSN_GCGetRole(thread, email); - if (pszRole && !_tcsicmp(pszRole, _T("admin"))) + if (pszRole && !mir_tstrcmpi(pszRole, _T("admin"))) Items[3].pszDesc = LPGENT("&Deop user"); } gcmi->nItems = SIZEOF(Items); diff --git a/protocols/MSN/src/msn_threads.cpp b/protocols/MSN/src/msn_threads.cpp index beddeb94dd..83ded62832 100644 --- a/protocols/MSN/src/msn_threads.cpp +++ b/protocols/MSN/src/msn_threads.cpp @@ -380,7 +380,7 @@ GCThreadData* CMsnProto::MSN_GetThreadByChatId(const TCHAR* chatId) mir_cslock lck(m_csThreads); for (int i = 0; i < m_arGCThreads.getCount(); i++) { GCThreadData *T = m_arGCThreads[i]; - if (_tcsicmp(T->mChatID, chatId) == 0) + if (mir_tstrcmpi(T->mChatID, chatId) == 0) return T; } diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp index 28413f61b4..0dc12a71b3 100644 --- a/protocols/SkypeWeb/src/skype_utils.cpp +++ b/protocols/SkypeWeb/src/skype_utils.cpp @@ -592,7 +592,7 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam) *(szSecondParam++) = 0; // no command or message command - if (!szCommand || (szCommand && !_tcsicmp(szCommand, _T("chat")))) + if (!szCommand || (szCommand && !mir_tstrcmpi(szCommand, _T("chat")))) { if (szSecondParam) { @@ -608,14 +608,14 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam) CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, NULL); return 0; } - else if (!_tcsicmp(szCommand, _T("call"))) + else if (!mir_tstrcmpi(szCommand, _T("call"))) { MCONTACT hContact = AddContact(_T2A(szJid), true); NotifyEventHooks(m_hCallHook, (WPARAM)hContact, (LPARAM)0); return 0; } - else if (!_tcsicmp(szCommand, _T("userinfo"))){ return 0; } - else if (!_tcsicmp(szCommand, _T("add"))) + else if (!mir_tstrcmpi(szCommand, _T("userinfo"))){ return 0; } + else if (!mir_tstrcmpi(szCommand, _T("add"))) { MCONTACT hContact = FindContact(_T2A(szJid)); if (hContact == NULL) @@ -633,13 +633,13 @@ INT_PTR CSkypeProto::ParseSkypeUriService(WPARAM, LPARAM lParam) } return 0; } - if (!_tcsicmp(szCommand, _T("sendfile"))) + if (!mir_tstrcmpi(szCommand, _T("sendfile"))) { //CONTACT hContact = AddContact(_T2A(szJid), true); //CallService(MS_FILE_SENDFILE, hContact, NULL); return 1; } - if (!_tcsicmp(szCommand, _T("voicemail"))) + if (!mir_tstrcmpi(szCommand, _T("voicemail"))) { return 1; } diff --git a/protocols/Twitter/src/StringUtil.h b/protocols/Twitter/src/StringUtil.h index ef88318446..643450b072 100644 --- a/protocols/Twitter/src/StringUtil.h +++ b/protocols/Twitter/src/StringUtil.h @@ -42,7 +42,7 @@ inline std::wstring UTF8ToWide(const std::string& str) inline bool Compare(const tstring& one, const tstring& two, bool caseSensitive) { - return caseSensitive ? (one == two) : (_tcsicmp(one.c_str(), two.c_str()) == 0); + return caseSensitive ? (one == two) : (mir_tstrcmpi(one.c_str(), two.c_str()) == 0); } #endif//_STRINGUTIL_H_INCLUDED_ diff --git a/protocols/Xfire/src/Xfire_base.cpp b/protocols/Xfire/src/Xfire_base.cpp index 25990abac9..dca9b7a3c3 100644 --- a/protocols/Xfire/src/Xfire_base.cpp +++ b/protocols/Xfire/src/Xfire_base.cpp @@ -627,7 +627,7 @@ BOOL Xfire_base::getPidByProcessName(TCHAR *name, DWORD *pid) { while (Process32Next(hSnapShot, processInfo) != FALSE) { if (processInfo->th32ProcessID != 0) { - if (_tcsicmp(processInfo->szExeFile, name) == 0) + if (mir_tstrcmpi(processInfo->szExeFile, name) == 0) { *pid = processInfo->th32ProcessID; CloseHandle(hSnapShot); diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp index c792d791a8..f570dee912 100644 --- a/protocols/Xfire/src/Xfire_game.cpp +++ b/protocols/Xfire/src/Xfire_game.cpp @@ -218,7 +218,7 @@ BOOL Xfire_game::checkpath(PROCESSENTRY32* processInfo) int size = mpath.size(); for (int j = 0; j < size; j++) { - if (_tcsicmp(_A2T(mpath.at(j)), fpath) == 0) + if (mir_tstrcmpi(_A2T(mpath.at(j)), fpath) == 0) { //pfad stimmt überein, commandline prüfen if (checkCommandLine(op, this->mustcontain, this->notcontain)) diff --git a/src/modules/chat/manager.cpp b/src/modules/chat/manager.cpp index 41d0571c92..bbc846c89f 100644 --- a/src/modules/chat/manager.cpp +++ b/src/modules/chat/manager.cpp @@ -177,7 +177,7 @@ static BOOL SM_SetOffline(const TCHAR *pszID, const char *pszModule) return FALSE; for (SESSION_INFO *si = ci.wndList; si != NULL; si = si->next) { - if ((pszID && _tcsicmp(si->ptszID, pszID)) || mir_strcmpi(si->pszModule, pszModule)) + if ((pszID && mir_tstrcmpi(si->ptszID, pszID)) || mir_strcmpi(si->pszModule, pszModule)) continue; ci.UM_RemoveAll(&si->pUsers); @@ -198,7 +198,7 @@ static BOOL SM_SetStatusEx(const TCHAR *pszID, const char *pszModule, const TCHA return FALSE; for (SESSION_INFO *si = ci.wndList; si != NULL; si = si->next) { - if ((pszID && _tcsicmp(si->ptszID, pszID)) || mir_strcmpi(si->pszModule, pszModule)) + if ((pszID && mir_tstrcmpi(si->ptszID, pszID)) || mir_strcmpi(si->pszModule, pszModule)) continue; ci.UM_SetStatusEx(si->pUsers, pszText, flags); @@ -310,7 +310,7 @@ static BOOL SM_RemoveUser(const TCHAR *pszID, const char *pszModule, const TCHAR return FALSE; for (SESSION_INFO *si = ci.wndList; si != NULL; si = si->next) { - if ((pszID && _tcsicmp(si->ptszID, pszID)) || mir_strcmpi(si->pszModule, pszModule)) + if ((pszID && mir_tstrcmpi(si->ptszID, pszID)) || mir_strcmpi(si->pszModule, pszModule)) continue; USERINFO *ui = ci.UM_FindUser(si->pUsers, pszUID); @@ -403,7 +403,7 @@ static LRESULT SM_SendMessage(const TCHAR *pszID, const char *pszModule, UINT ms return 0; for (SESSION_INFO *si = ci.wndList; si != NULL; si = si->next) { - if ((pszID && _tcsicmp(si->ptszID, pszID)) || mir_strcmpi(si->pszModule, pszModule)) + if ((pszID && mir_tstrcmpi(si->ptszID, pszID)) || mir_strcmpi(si->pszModule, pszModule)) continue; if (si->hWnd) { @@ -450,7 +450,7 @@ static BOOL SM_SetStatus(const TCHAR *pszID, const char *pszModule, int wStatus) return FALSE; for (SESSION_INFO *si = ci.wndList; si != NULL; si = si->next) { - if ((pszID && _tcsicmp(si->ptszID, pszID)) || mir_strcmpi(si->pszModule, pszModule)) + if ((pszID && mir_tstrcmpi(si->ptszID, pszID)) || mir_strcmpi(si->pszModule, pszModule)) continue; si->wStatus = wStatus; @@ -476,7 +476,7 @@ static BOOL SM_SendUserMessage(const TCHAR *pszID, const char *pszModule, const return FALSE; for (SESSION_INFO *si = ci.wndList; si != NULL; si = si->next) { - if ((pszID && _tcsicmp(si->ptszID, pszID)) || mir_strcmpi(si->pszModule, pszModule)) + if ((pszID && mir_tstrcmpi(si->ptszID, pszID)) || mir_strcmpi(si->pszModule, pszModule)) continue; if (si->iType == GCW_CHATROOM || si->iType == GCW_PRIVMESS) @@ -493,7 +493,7 @@ static BOOL SM_ChangeUID(const TCHAR *pszID, const char *pszModule, const TCHAR return FALSE; for (SESSION_INFO *si = ci.wndList; si != NULL; si = si->next) { - if ((pszID && _tcsicmp(si->ptszID, pszID)) || mir_strcmpi(si->pszModule, pszModule)) + if ((pszID && mir_tstrcmpi(si->ptszID, pszID)) || mir_strcmpi(si->pszModule, pszModule)) continue; USERINFO* ui = ci.UM_FindUser(si->pUsers, pszUID); diff --git a/src/modules/clist/clistmod.cpp b/src/modules/clist/clistmod.cpp index 1ab5fd2c8f..81be885ba7 100644 --- a/src/modules/clist/clistmod.cpp +++ b/src/modules/clist/clistmod.cpp @@ -464,7 +464,7 @@ static INT_PTR CompareContacts(WPARAM wParam, LPARAM lParam) nameb = cli.pfnGetContactDisplayName(b, 0); //otherwise just compare names - return _tcsicmp(namea, nameb); + return mir_tstrcmpi(namea, nameb); } /***************************************************************************************/ diff --git a/src/modules/clist/contact.cpp b/src/modules/clist/contact.cpp index 64c2727c86..661d3040cf 100644 --- a/src/modules/clist/contact.cpp +++ b/src/modules/clist/contact.cpp @@ -130,7 +130,7 @@ int fnCompareContacts(const ClcContact* c1, const ClcContact* c2) nameb = cli.pfnGetContactDisplayName(b, 0); //otherwise just compare names - return _tcsicmp(namea, nameb); + return mir_tstrcmpi(namea, nameb); } void fnSortContacts(void) diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp index b0d201f551..bdf770646d 100644 --- a/src/modules/database/database.cpp +++ b/src/modules/database/database.cpp @@ -64,7 +64,7 @@ bool IsInsideRootDir(TCHAR* profiledir, bool exact) { VARST pfd( _T("%miranda_path%")); if (exact) - return _tcsicmp(profiledir, pfd) == 0; + return mir_tstrcmpi(profiledir, pfd) == 0; return _tcsnicmp(profiledir, pfd, mir_tstrlen(pfd)) == 0; } @@ -90,7 +90,7 @@ int getProfilePath(TCHAR *buf, size_t cch) int isValidProfileName(const TCHAR *name) { size_t len = mir_tstrlen(name) - 4; - return len > 0 && _tcsicmp(&name[len], _T(".dat")) == 0; + return len > 0 && mir_tstrcmpi(&name[len], _T(".dat")) == 0; } // returns 1 if the profile manager should be shown @@ -103,7 +103,7 @@ static bool showProfileManager(void) // wanna show it? GetPrivateProfileString(_T("Database"), _T("ShowProfileMgr"), _T("never"), Mgr, SIZEOF(Mgr), mirandabootini); - return (_tcsicmp(Mgr, _T("yes")) == 0); + return (mir_tstrcmpi(Mgr, _T("yes")) == 0); } bool shouldAutoCreate(TCHAR *szProfile) @@ -113,7 +113,7 @@ bool shouldAutoCreate(TCHAR *szProfile) TCHAR ac[32]; GetPrivateProfileString(_T("Database"), _T("AutoCreate"), _T(""), ac, SIZEOF(ac), mirandabootini); - return _tcsicmp(ac, _T("yes")) == 0; + return mir_tstrcmpi(ac, _T("yes")) == 0; } static void getDefaultProfile(TCHAR *szProfile, size_t cch) @@ -157,7 +157,7 @@ static void loadProfileByShortName(const TCHAR* src, TCHAR *szProfile, size_t cc if (profileName[0]) { p = _tcsrchr(g_profileDir, '\\'); *p = 0; p = _tcsrchr(g_profileDir, '\\'); - if (p && _tcsicmp(p + 1, profileName) == 0) + if (p && mir_tstrcmpi(p + 1, profileName) == 0) *p = 0; } else szProfile[0] = 0; @@ -288,7 +288,7 @@ static int getProfileAutoRun(TCHAR *szProfile) TCHAR Mgr[32]; GetPrivateProfileString(_T("Database"), _T("ShowProfileMgr"), _T(""), Mgr, SIZEOF(Mgr), mirandabootini); - if (_tcsicmp(Mgr, _T("never"))) + if (mir_tstrcmpi(Mgr, _T("never"))) return 0; return fileExist(szProfile) || shouldAutoCreate(szProfile); diff --git a/src/modules/extraicons/extraicons.cpp b/src/modules/extraicons/extraicons.cpp index b2ca2b9c95..90ac2c35b2 100644 --- a/src/modules/extraicons/extraicons.cpp +++ b/src/modules/extraicons/extraicons.cpp @@ -369,7 +369,7 @@ INT_PTR ExtraIcon_Register(WPARAM wParam, LPARAM lParam) return 0; // Found one, now merge it - if (_tcsicmp(extra->getDescription(), desc)) { + if (mir_tstrcmpi(extra->getDescription(), desc)) { CMString newDesc = extra->getDescription(); newDesc += _T(" / "); newDesc += desc; diff --git a/src/modules/findadd/searchresults.cpp b/src/modules/findadd/searchresults.cpp index 499756ec17..20b9cc344c 100644 --- a/src/modules/findadd/searchresults.cpp +++ b/src/modules/findadd/searchresults.cpp @@ -152,7 +152,7 @@ int CALLBACK SearchResultsCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lPa TCHAR szText2[100]; ListView_GetItemText(hList, (int)lParam1, sortCol, szText1, SIZEOF(szText1)); ListView_GetItemText(hList, (int)lParam2, sortCol, szText2, SIZEOF(szText2)); - return _tcsicmp(szText1, szText2)*sortMultiplier; + return mir_tstrcmpi(szText1, szText2)*sortMultiplier; } return 0; } diff --git a/src/modules/icolib/skin2icons.cpp b/src/modules/icolib/skin2icons.cpp index 62b9a21461..2f5bfed191 100644 --- a/src/modules/icolib/skin2icons.cpp +++ b/src/modules/icolib/skin2icons.cpp @@ -50,7 +50,7 @@ LIST sectionList(20, sttCompareSections); static int sttCompareIconSourceFiles(const IconSourceFile* p1, const IconSourceFile* p2) { - return _tcsicmp(p1->file, p2->file); + return mir_tstrcmpi(p1->file, p2->file); } static LIST iconSourceFileList(10, sttCompareIconSourceFiles); diff --git a/src/modules/netlib/netlibsecurity.cpp b/src/modules/netlib/netlibsecurity.cpp index 6533a1fa5f..a1ddd855aa 100644 --- a/src/modules/netlib/netlibsecurity.cpp +++ b/src/modules/netlib/netlibsecurity.cpp @@ -106,7 +106,7 @@ HANDLE NetlibInitSecurityProvider(const TCHAR* szProvider, const TCHAR* szPrinci { HANDLE hSecurity = NULL; - if (_tcsicmp(szProvider, _T("Basic")) == 0) { + if (mir_tstrcmpi(szProvider, _T("Basic")) == 0) { NtlmHandleType* hNtlm = (NtlmHandleType*)mir_calloc(sizeof(NtlmHandleType)); hNtlm->szProvider = mir_tstrdup(szProvider); SecInvalidateHandle(&hNtlm->hClientContext); @@ -126,7 +126,7 @@ HANDLE NetlibInitSecurityProvider(const TCHAR* szProvider, const TCHAR* szPrinci if (g_pSSPI != NULL) { PSecPkgInfo ntlmSecurityPackageInfo; - bool isGSSAPI = _tcsicmp(szProvider, _T("GSSAPI")) == 0; + bool isGSSAPI = mir_tstrcmpi(szProvider, _T("GSSAPI")) == 0; const TCHAR *szProviderC = isGSSAPI ? _T("Kerberos") : szProvider; SECURITY_STATUS sc = g_pSSPI->QuerySecurityPackageInfo((LPTSTR)szProviderC, &ntlmSecurityPackageInfo); if (sc == SEC_E_OK) { @@ -251,8 +251,8 @@ char* NtlmCreateResponseFromChallenge(HANDLE hSecurity, const char *szChallenge, char *szOutputToken; NtlmHandleType* hNtlm = (NtlmHandleType*)hSecurity; - if (_tcsicmp(hNtlm->szProvider, _T("Basic"))) { - bool isGSSAPI = _tcsicmp(hNtlm->szProvider, _T("GSSAPI")) == 0; + if (mir_tstrcmpi(hNtlm->szProvider, _T("Basic"))) { + bool isGSSAPI = mir_tstrcmpi(hNtlm->szProvider, _T("GSSAPI")) == 0; TCHAR *szProvider = isGSSAPI ? _T("Kerberos") : hNtlm->szProvider; bool hasChallenge = szChallenge != NULL && szChallenge[0] != '\0'; if (hasChallenge) { diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp index c0aa2c7a86..8b52feb368 100644 --- a/src/modules/options/options.cpp +++ b/src/modules/options/options.cpp @@ -164,7 +164,7 @@ HTREEITEM FindNamedTreeItemAtRoot(HWND hwndTree, const TCHAR* name) tvi.hItem = TreeView_GetRoot(hwndTree); while (tvi.hItem != NULL) { SendMessage(hwndTree, TVM_GETITEM, 0, (LPARAM)&tvi); - if (!_tcsicmp(str, name)) + if (!mir_tstrcmpi(str, name)) return tvi.hItem; tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem); @@ -182,7 +182,7 @@ static HTREEITEM FindNamedTreeItemAtChildren(HWND hwndTree, HTREEITEM hItem, con tvi.hItem = TreeView_GetChild(hwndTree, hItem); while (tvi.hItem != NULL) { SendMessage(hwndTree, TVM_GETITEM, 0, (LPARAM)&tvi); - if (!_tcsicmp(str, name)) + if (!mir_tstrcmpi(str, name)) return tvi.hItem; tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem); diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index b2cabeecab..16f17dfed1 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -627,7 +627,7 @@ int UnloadPlugin(TCHAR* buf, int bufLen) { for (int i = pluginList.getCount() - 1; i >= 0; i--) { pluginEntry *p = pluginList[i]; - if (!_tcsicmp(p->pluginname, buf)) { + if (!mir_tstrcmpi(p->pluginname, buf)) { GetModuleFileName(p->bpi.hInst, buf, bufLen); Plugin_Uninit(p); return TRUE; @@ -694,7 +694,7 @@ void EnsureCheckerLoaded(bool bEnable) { for (int i = 0; i < pluginList.getCount(); i++) { pluginEntry *p = pluginList[i]; - if (_tcsicmp(p->pluginname, _T("dbchecker.dll"))) + if (mir_tstrcmpi(p->pluginname, _T("dbchecker.dll"))) continue; if (bEnable) { diff --git a/src/modules/utils/timezones.cpp b/src/modules/utils/timezones.cpp index aa993d73cd..ce928fbb24 100644 --- a/src/modules/utils/timezones.cpp +++ b/src/modules/utils/timezones.cpp @@ -311,9 +311,9 @@ static const ListMessages* GetListMessages(HWND hWnd, DWORD dwFlags) if (!(dwFlags & (TZF_PLF_CB | TZF_PLF_LB))) { TCHAR tszClassName[128]; GetClassName(hWnd, tszClassName, SIZEOF(tszClassName)); - if (!_tcsicmp(tszClassName, _T("COMBOBOX"))) + if (!mir_tstrcmpi(tszClassName, _T("COMBOBOX"))) dwFlags |= TZF_PLF_CB; - else if (!_tcsicmp(tszClassName, _T("LISTBOX"))) + else if (!mir_tstrcmpi(tszClassName, _T("LISTBOX"))) dwFlags |= TZF_PLF_LB; } if (dwFlags & TZF_PLF_CB) -- cgit v1.2.3