From ce2d4f19e3f810b282eb7d47d470d426ff459e1f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 30 Nov 2014 20:25:58 +0000 Subject: mir_strcmp, mir_strcmpi, mir_wstrcmp, mir_wstrcmpi git-svn-id: http://svn.miranda-ng.org/main/trunk@11179 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- .../src/ex_import/classExImContactBase.cpp | 2 +- .../src/ex_import/classExImContactXML.cpp | 22 +++++++++++----------- .../UserInfoEx/src/ex_import/dlg_ExImModules.cpp | 16 ++++++++-------- .../UserInfoEx/src/ex_import/dlg_ExImProgress.cpp | 2 +- plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp | 2 +- plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp | 6 +++--- 6 files changed, 25 insertions(+), 25 deletions(-) (limited to 'plugins/UserInfoEx/src/ex_import') diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp index ead8d33c9d..2b4fd52fc3 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp @@ -503,7 +503,7 @@ BYTE CExImContactBase::isHandle(MCONTACT hContact) } // compare nicknames if no UID else if (!DB::Setting::GetUString(hContact, _pszProto, SET_CONTACT_NICK, &dbv)) { - if (dbv.type == DBVT_UTF8 && dbv.pszVal && !mir_stricmp(dbv.pszVal,_pszNick)) { + if (dbv.type == DBVT_UTF8 && dbv.pszVal && !mir_strcmpi(dbv.pszVal,_pszNick)) { LPTSTR ptszNick = mir_utf8decodeT(_pszNick); LPTSTR ptszProto = mir_a2t(_pszProto); int ans = MsgBox(NULL, MB_ICONQUESTION|MB_YESNO, LPGENT("Question"), LPGENT("contact identification"), diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp index 0dcd377b73..c33bc8aaf8 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp @@ -421,7 +421,7 @@ BYTE CExImContactXML::ExportEvents() // find module TiXmlNode *xmlModule; for (xmlModule = _xmlNode->FirstChild(); xmlModule != NULL; xmlModule = xmlModule->NextSibling()) - if (!mir_stricmp(((TiXmlElement*)xmlModule)->Attribute("key"), dbei.szModule)) + if (!mir_strcmpi(((TiXmlElement*)xmlModule)->Attribute("key"), dbei.szModule)) break; // create new module @@ -463,7 +463,7 @@ void CExImContactXML::CountKeys(DWORD &numSettings, DWORD &numEvents) for (TiXmlNode *xkey = xmod->FirstChild(); xkey != NULL; xkey = xkey->NextSibling()) { - if (!mir_stricmp(xkey->Value(), XKEY_SET)) + if (!mir_strcmpi(xkey->Value(), XKEY_SET)) numSettings++; else numEvents++; @@ -526,7 +526,7 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) uidk (xContact->Attribute("uidk")); if (!_pszProto) { // check if this is the owner contact - if (mir_stricmp(xContact->Value(), XKEY_OWNER)) + if (mir_strcmpi(xContact->Value(), XKEY_OWNER)) return ERROR_INVALID_PARAMS; _hContact = NULL; _xmlNode = xContact; @@ -773,7 +773,7 @@ int CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact) int CExImContactXML::ImportModule(TiXmlNode* xmlModule) { // check if parent is really a module - if (!xmlModule || mir_stricmp(xmlModule->Value(), XKEY_MOD)) + if (!xmlModule || mir_strcmpi(xmlModule->Value(), XKEY_MOD)) return ERROR_INVALID_SIGNATURE; // convert to element @@ -787,14 +787,14 @@ int CExImContactXML::ImportModule(TiXmlNode* xmlModule) return ERROR_INVALID_PARAMS; // ignore Modul 'Protocol' as it would cause trouble - if (!mir_stricmp(pszModule, "Protocol")) + if (!mir_strcmpi(pszModule, "Protocol")) return ERROR_OK; for (TiXmlElement *xKey = xmlModule->FirstChildElement(); xKey != NULL; xKey = xKey->NextSiblingElement()) { // import setting - if (!mir_stricmp(xKey->Value(), XKEY_SET)) { + if (!mir_strcmpi(xKey->Value(), XKEY_SET)) { // check if the module to import is the contact's protocol module - BYTE isProtoModule = !mir_stricmp(pszModule, _pszProto)/* || DB::Module::IsMeta(pszModule)*/; + BYTE isProtoModule = !mir_strcmpi(pszModule, _pszProto)/* || DB::Module::IsMeta(pszModule)*/; BYTE isMetaModule = DB::Module::IsMeta(pszModule); // just ignore MetaModule on normal contact to avoid errors (only keys) @@ -803,9 +803,9 @@ int CExImContactXML::ImportModule(TiXmlNode* xmlModule) // just ignore MetaModule on Meta to avoid errors (only import spetial keys) if (isProtoModule && isMetaModule) { - if (!mir_stricmp(xKey->Attribute("key"),"Nick") || - !mir_stricmp(xKey->Attribute("key"),"TzName") || - !mir_stricmp(xKey->Attribute("key"),"Timezone")) + if (!mir_strcmpi(xKey->Attribute("key"),"Nick") || + !mir_strcmpi(xKey->Attribute("key"),"TzName") || + !mir_strcmpi(xKey->Attribute("key"),"Timezone")) { if (ImportSetting(pszModule, xKey->ToElement()) == ERROR_OK) _pXmlFile->_numSettingsDone++; @@ -826,7 +826,7 @@ int CExImContactXML::ImportModule(TiXmlNode* xmlModule) return ERROR_ABORTED; } // import event - else if (!mir_stricmp(xKey->Value(), XKEY_EVT)) { + else if (!mir_strcmpi(xKey->Value(), XKEY_EVT)) { int error = ImportEvent(pszModule, xKey->ToElement()); switch (error) { case ERROR_OK: diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp index 0e294afdfe..a5346841d4 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp @@ -95,7 +95,7 @@ HTREEITEM ExportTree_FindItem(HWND hTree, HTREEITEM hParent, LPSTR pszText) tvi.hItem != NULL; tvi.hItem = TreeView_GetNextSibling(hTree, tvi.hItem)) { - if (SendMessageA(hTree, TVM_GETITEMA, NULL, (LPARAM)&tvi) && !mir_stricmp(tvi.pszText, pszText)) + if (SendMessageA(hTree, TVM_GETITEMA, NULL, (LPARAM)&tvi) && !mir_strcmpi(tvi.pszText, pszText)) return tvi.hItem; } return NULL; @@ -318,7 +318,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar } // contact's base protocol is to be added to the treeview uniquely - if (!mir_stricmp(p, pszProto)) + if (!mir_strcmpi(p, pszProto)) { if (!ExportTree_FindItem(hTree, hItemEssential, p)) { @@ -329,7 +329,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar // add optional module, which is valid for at least one contact /*/Filter/*/ - if (mir_stricmp(p, USERINFO) && mir_stricmp(p, MOD_MBIRTHDAY) && mir_stricmp(p, META_PROTO)) + if (mir_strcmpi(p, USERINFO) && mir_strcmpi(p, MOD_MBIRTHDAY) && mir_strcmpi(p, META_PROTO)) { ExportTree_AddItem(hTree, hItemOptional, p, bImagesLoaded, 1); break; @@ -342,10 +342,10 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar else if ( /*Filter/*/ !DB::Module::IsEmpty(pDat->ExImContact->hContact, p) && - (!pDat->ExImContact->hContact || mir_stricmp(p, pszProto)) && - //mir_stricmp(p, "Protocol") && - mir_stricmp(p, USERINFO) && - mir_stricmp(p, MOD_MBIRTHDAY)) + (!pDat->ExImContact->hContact || mir_strcmpi(p, pszProto)) && + //mir_strcmpi(p, "Protocol") && + mir_strcmpi(p, USERINFO) && + mir_strcmpi(p, MOD_MBIRTHDAY)) { ExportTree_AddItem(hTree, hItemOptional, (LPSTR)p, bImagesLoaded, 1); } @@ -401,7 +401,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar tvi.hItem != NULL && SendMessageA(hTree, TVM_GETITEMA, 0, (LPARAM)&tvi); tvi.hItem = (HTREEITEM)SendMessageA(hTree, TVM_GETNEXTITEM, TVGN_NEXT, (LPARAM)tvi.hItem)) { - if (!mir_stricmp(tvi.pszText, pszRoot)) { + if (!mir_strcmpi(tvi.pszText, pszRoot)) { tvi.mask = TVIF_STATE; tvi.state = INDEXTOSTATEIMAGEMASK(LOWORD(wParam) == BTN_UNCHECK ? 1 : 2); tvi.stateMask = TVIS_STATEIMAGEMASK; diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp index 9c0787ff8b..09bcaa0469 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImProgress.cpp @@ -224,7 +224,7 @@ BYTE CProgress::UpdateSetting(LPCTSTR pszFormat, ...) mir_vsntprintf(buf, SIZEOF(buf), TranslateTS(pszFormat), vl); va_end(vl); GetDlgItemText(_hDlg, TXT_SETTING, tmp, SIZEOF(tmp)); - if (mir_tcsicmp(tmp,buf)) + if (mir_tstrcmpi(tmp,buf)) SetDlgItemText(_hDlg, TXT_SETTING, buf); } SendMessage(hProg, PBM_SETPOS, (int)SendMessage(hProg, PBM_GETPOS, 0, 0) + 1, 0); diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp index 7c126562fa..42aa54c2b4 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp @@ -144,7 +144,7 @@ static BYTE ExportContact(MCONTACT hContact, DB::CEnumList* pModules, FILE* file p = (*pModules)[i]; /*Filter/ - if (mir_stricmp(p, "Protocol"))*/ + if (mir_strcmpi(p, "Protocol"))*/ { ExportModule(hContact, p, file); } diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp index 12cfcf2a1f..6f5158a941 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp @@ -256,7 +256,7 @@ int CFileXml::ImportContacts(TiXmlElement* xmlParent) // import contacts for (xContact = xmlParent->FirstChildElement(); xContact != NULL; xContact = xContact->NextSiblingElement()) { - if (!mir_stricmp(xContact->Value(), XKEY_CONTACT)) { + if (!mir_strcmpi(xContact->Value(), XKEY_CONTACT)) { // update progressbar and abort if user clicked cancel pszNick = mir_utf8decodeT(xContact->Attribute("nick")); // user clicked abort button @@ -295,7 +295,7 @@ int CFileXml::ImportContacts(TiXmlElement* xmlParent) if (pszNick) mir_free(pszNick); } // import owner contact - else if (_hContactToWorkOn == INVALID_CONTACT_ID && !mir_stricmp(xContact->Value(), XKEY_OWNER) && (vContact = xContact)) { + else if (_hContactToWorkOn == INVALID_CONTACT_ID && !mir_strcmpi(xContact->Value(), XKEY_OWNER) && (vContact = xContact)) { result = vContact.Import(); switch (result) { case ERROR_OK: @@ -327,7 +327,7 @@ DWORD CFileXml::CountContacts(TiXmlElement* xmlParent) try { // count contacts in file for progress bar for (xContact = xmlParent->FirstChild(); xContact != NULL; xContact = xContact->NextSibling()) { - if (!mir_stricmp(xContact->Value(), XKEY_CONTACT) || !mir_stricmp(xContact->Value(), XKEY_OWNER)) { + if (!mir_strcmpi(xContact->Value(), XKEY_CONTACT) || !mir_strcmpi(xContact->Value(), XKEY_OWNER)) { dwCount += CountContacts(xContact->ToElement()) + 1; } } -- cgit v1.2.3