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 --- plugins/AVS/src/main.cpp | 6 +- plugins/AVS/src/options.cpp | 16 +-- plugins/AVS/src/services.cpp | 10 +- plugins/AVS/src/utils.cpp | 6 +- plugins/AssocMgr/src/assoclist.cpp | 4 +- plugins/AssocMgr/src/dde.cpp | 4 +- plugins/AssocMgr/src/reg.cpp | 8 +- plugins/AssocMgr/src/test.cpp | 14 +- plugins/AuthState/src/main.cpp | 4 +- plugins/AutoRun/src/main.cpp | 2 +- plugins/AutoShutdown/src/cpuusage.cpp | 2 +- plugins/AutoShutdown/src/watcher.cpp | 4 +- plugins/AvatarHistory/src/utils.cpp | 10 +- plugins/BASS_interface/src/Main.cpp | 4 +- plugins/BossKeyPlus/src/BossKey.cpp | 8 +- plugins/CSList/src/cslist.cpp | 8 +- .../ClientChangeNotify/src/ClientChangeNotify.cpp | 2 +- .../ClientChangeNotify/src/CommonLibs/CString.h | 4 +- plugins/Clist_blind/src/clcpaint.cpp | 2 +- plugins/Clist_blind/src/clistopts.cpp | 4 +- plugins/Clist_blind/src/init.cpp | 2 +- plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp | 2 +- plugins/Clist_modern/src/modern_clc.cpp | 4 +- plugins/Clist_modern/src/modern_clcitems.cpp | 2 +- plugins/Clist_modern/src/modern_clcpaint.cpp | 2 +- plugins/Clist_modern/src/modern_clcutils.cpp | 4 +- plugins/Clist_modern/src/modern_clistmod.cpp | 2 +- plugins/Clist_modern/src/modern_clistsettings.cpp | 2 +- plugins/Clist_modern/src/modern_clui.cpp | 2 +- plugins/Clist_modern/src/modern_skinengine.cpp | 2 +- plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp | 4 +- plugins/Clist_nicer/src/clcpaint.cpp | 2 +- plugins/Clist_nicer/src/clistopts.cpp | 4 +- plugins/ContactsPlus/src/receive.cpp | 6 +- plugins/ContactsPlus/src/utils.cpp | 2 +- plugins/CountryFlags/src/extraimg.cpp | 2 +- plugins/CountryFlags/src/ip2country.cpp | 22 ++-- plugins/DbChecker/src/selectdb.cpp | 4 +- plugins/DbEditorPP/src/exportimport.cpp | 8 +- plugins/DbEditorPP/src/settinglist.cpp | 2 +- plugins/Dropbox/src/dropbox_events.cpp | 2 +- plugins/FavContacts/src/favlist.h | 6 +- plugins/FavContacts/src/menu.cpp | 2 +- plugins/FavContacts/src/services.cpp | 2 +- plugins/FileAsMessage/src/dialog.cpp | 2 +- plugins/FloatingContacts/src/bitmap_funcs.cpp | 2 +- plugins/GmailNotifier/src/notify.cpp | 2 +- plugins/GmailNotifier/src/options.cpp | 2 +- plugins/GmailNotifier/src/utility.cpp | 2 +- plugins/HistorySweeperLight/src/main.cpp | 2 +- plugins/HistorySweeperLight/src/options.cpp | 2 +- plugins/IEView/src/TemplateHTMLBuilder.cpp | 2 +- plugins/IgnoreState/src/main.cpp | 6 +- plugins/ListeningTo/src/listeningto.cpp | 2 +- plugins/ListeningTo/src/music.cpp | 18 +-- plugins/ListeningTo/src/options.cpp | 6 +- plugins/MenuItemEx/src/main.cpp | 2 +- plugins/MirandaG15/src/CAppletManager.cpp | 10 +- plugins/MobileState/src/main.cpp | 4 +- plugins/ModernOpt/src/modernopt.cpp | 4 +- plugins/ModernOpt/src/mopt_selector.cpp | 6 +- plugins/MsgPopup/src/main.cpp | 2 +- plugins/MyDetails/src/data.cpp | 2 +- plugins/NewAwaySysMod/src/AwaySys.cpp | 18 +-- plugins/NewAwaySysMod/src/CString.h | 4 +- plugins/NewAwaySysMod/src/ContactList.cpp | 2 +- plugins/NewAwaySysMod/src/MsgEventAdded.cpp | 2 +- plugins/NewAwaySysMod/src/Properties.cpp | 2 +- plugins/NewAwaySysMod/src/SetAwayMsg.cpp | 2 +- plugins/NewXstatusNotify/src/main.cpp | 8 +- plugins/NewsAggregator/Src/CheckFeed.cpp | 120 ++++++++--------- plugins/NewsAggregator/Src/ExportImport.cpp | 22 ++-- plugins/NewsAggregator/Src/Options.cpp | 20 +-- plugins/NewsAggregator/Src/Utils.cpp | 40 +++--- plugins/Non-IM Contact/src/http.cpp | 4 +- plugins/PackUpdater/Src/Notifications.cpp | 18 +-- plugins/PackUpdater/Src/Utils.cpp | 14 +- plugins/Popup/src/actions.cpp | 2 +- plugins/Popup/src/bitmap_funcs.cpp | 2 +- plugins/Popup/src/formula.h | 4 +- plugins/Popup/src/notifications.cpp | 14 +- plugins/Popup/src/opt_adv.cpp | 2 +- plugins/Popup/src/opt_skins.cpp | 6 +- plugins/Popup/src/opttree.cpp | 6 +- plugins/Popup/src/skin.cpp | 72 +++++----- plugins/Popup/src/srmm_menu.cpp | 2 +- plugins/QuickContacts/src/quickcontacts.cpp | 2 +- plugins/QuickReplies/src/events.cpp | 4 +- plugins/Rate/src/main.cpp | 2 +- plugins/RemovePersonalSettings/src/rps.cpp | 2 +- plugins/Scriver/src/chat/manager.cpp | 4 +- plugins/Scriver/src/msgdialog.cpp | 2 +- plugins/Scriver/src/msgs.cpp | 2 +- plugins/Scriver/src/msgwindow.cpp | 2 +- plugins/SeenPlugin/src/userinfo.cpp | 2 +- plugins/ShellExt/src/shlext.cpp | 2 +- plugins/SimpleAR/src/Main.cpp | 2 +- plugins/SimpleStatusMsg/src/main.cpp | 10 +- plugins/SimpleStatusMsg/src/msgbox.cpp | 4 +- plugins/SmileyAdd/src/regexp/WCPattern.cpp | 2 +- plugins/SmileyAdd/src/smileys.cpp | 2 +- plugins/SpellChecker/src/dictionary.cpp | 10 +- plugins/SpellChecker/src/options.cpp | 6 +- plugins/SpellChecker/src/spellchecker.cpp | 2 +- plugins/SpellChecker/src/utils.cpp | 10 +- plugins/SplashScreen/src/bitmap_funcs.cpp | 2 +- plugins/SplashScreen/src/main.cpp | 6 +- .../AdvancedAutoAway/advancedautoaway.cpp | 4 +- plugins/StatusPlugins/KeepStatus/keepstatus.cpp | 8 +- .../StatusPlugins/StartupStatus/startupstatus.cpp | 4 +- plugins/StatusPlugins/confirmdialog.cpp | 2 +- plugins/StopSpamPlus/src/events.cpp | 2 +- plugins/TabSRMM/src/chat/log.cpp | 2 +- plugins/TabSRMM/src/chat/manager.cpp | 10 +- plugins/TabSRMM/src/chat/muchighlight.cpp | 2 +- plugins/TabSRMM/src/chat/tools.cpp | 2 +- plugins/TabSRMM/src/chat/window.cpp | 2 +- plugins/TabSRMM/src/container.cpp | 4 +- plugins/TabSRMM/src/globals.cpp | 6 +- plugins/TabSRMM/src/utils.cpp | 2 +- plugins/TipperYM/src/skin_parser.cpp | 16 +-- plugins/TooltipNotify/src/TooltipNotify.cpp | 4 +- plugins/TopToolBar/src/toolbar.cpp | 2 +- plugins/TrafficCounter/src/opttree.cpp | 6 +- plugins/TranslitSwitcher/src/Layoutproc.cpp | 16 +-- plugins/UserInfoEx/src/Flags/svc_flags.cpp | 6 +- plugins/UserInfoEx/src/dlg_propsheet.cpp | 4 +- .../src/ex_import/classExImContactBase.cpp | 2 +- plugins/UserInfoEx/src/psp_about.cpp | 2 +- plugins/UserInfoEx/src/svc_constants.cpp | 2 +- plugins/UserInfoEx/src/svc_gender.cpp | 2 +- plugins/UserInfoEx/src/svc_timezone_old.cpp | 4 +- plugins/Utils/mir_options.cpp | 2 +- plugins/Variables/src/variables.cpp | 2 +- plugins/WebView/src/webview.cpp | 2 +- plugins/WebView/src/webview_datawnd.cpp | 2 +- plugins/WebView/src/webview_services.cpp | 8 +- plugins/XSoundNotify/src/dialog.cpp | 2 +- plugins/XSoundNotify/src/options.cpp | 2 +- plugins/YAMN/src/mails/mails.cpp | 2 +- plugins/YAMN/src/main.cpp | 2 +- plugins/YAMN/src/services.cpp | 6 +- plugins/YAMN/src/yamn.cpp | 18 +-- plugins/ZeroNotification/src/main.cpp | 2 +- plugins/wbOSD/src/events.cpp | 2 +- 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 +- src/core/stdclist/src/clcpaint.cpp | 2 +- src/core/stdclist/src/clistopts.cpp | 4 +- src/core/stdfile/fileexistsdlg.cpp | 2 +- src/core/stdurl/url.cpp | 2 +- src/core/stdurl/urldialogs.cpp | 4 +- src/core/stduserinfo/contactinfo.cpp | 6 +- src/core/stduserinfo/userinfo.cpp | 20 +-- src/mir_core/langpack.cpp | 22 ++-- src/mir_core/utils.cpp | 16 +-- src/mir_core/winver.cpp | 2 +- src/modules/chat/chat_svc.cpp | 2 +- src/modules/chat/clist.cpp | 4 +- src/modules/chat/log.cpp | 2 +- src/modules/chat/manager.cpp | 76 +++++------ src/modules/clist/clc.cpp | 6 +- src/modules/clist/clcfiledrop.cpp | 4 +- src/modules/clist/clcitems.cpp | 10 +- src/modules/clist/clcutils.cpp | 6 +- src/modules/clist/clistevents.cpp | 4 +- src/modules/clist/clistmenus.cpp | 10 +- src/modules/clist/clisttray.cpp | 10 +- src/modules/clist/clui.cpp | 6 +- src/modules/clist/cluiservices.cpp | 2 +- src/modules/clist/contact.cpp | 2 +- src/modules/clist/genmenu.cpp | 4 +- src/modules/clist/genmenuopt.cpp | 4 +- src/modules/clist/groups.cpp | 6 +- src/modules/database/database.cpp | 4 +- src/modules/database/dbini.cpp | 28 ++-- src/modules/database/profilemanager.cpp | 2 +- src/modules/findadd/findadd.cpp | 8 +- src/modules/findadd/searchresults.cpp | 12 +- src/modules/fonts/FontOptions.cpp | 4 +- src/modules/fonts/services.cpp | 4 +- src/modules/icolib/skin2opts.cpp | 4 +- src/modules/langpack/langpack.cpp | 2 +- src/modules/metacontacts/meta_services.cpp | 2 +- src/modules/netlib/netlibhttp.cpp | 26 ++-- src/modules/netlib/netlibhttpproxy.cpp | 2 +- src/modules/netlib/netlibopts.cpp | 2 +- src/modules/options/filter.cpp | 8 +- src/modules/options/options.cpp | 12 +- src/modules/plugins/dll_sniffer.cpp | 10 +- src/modules/plugins/newplugins.cpp | 146 ++++++++++----------- src/modules/protocols/protoaccs.cpp | 2 +- src/modules/skin/hotkey_opts.cpp | 16 +-- src/modules/skin/hotkeys.cpp | 8 +- src/modules/skin/sounds.cpp | 2 +- src/modules/utils/bmpfilter.cpp | 4 +- src/modules/utils/timezones.cpp | 2 +- src/modules/utils/utils.cpp | 2 +- src/modules/xml/xmlParser.cpp | 2 +- 276 files changed, 1082 insertions(+), 1090 deletions(-) diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index c122e1f410..31daebfb79 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -45,11 +45,11 @@ void InitServices(); static int ComparePicture( const protoPicCacheEntry* p1, const protoPicCacheEntry* p2 ) { - if ((lstrcmpA(p1->szProtoname, "Global avatar") == 0) || strstr(p1->szProtoname, "Global avatar")) + if ((mir_strcmp(p1->szProtoname, "Global avatar") == 0) || strstr(p1->szProtoname, "Global avatar")) return -1; - if ((lstrcmpA(p2->szProtoname, "Global avatar") == 0) || strstr(p1->szProtoname, "Global avatar")) + if ((mir_strcmp(p2->szProtoname, "Global avatar") == 0) || strstr(p1->szProtoname, "Global avatar")) return 1; - return lstrcmpA( p1->szProtoname, p2->szProtoname ); + return mir_strcmp( p1->szProtoname, p2->szProtoname ); } OBJLIST diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index 0c2b87803c..6a10d7c842 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -53,7 +53,7 @@ static void RemoveProtoPic(const char *szProto) if (szProto == NULL) return; - if (!lstrcmpA(AVS_DEFAULT, szProto)) { + if (!mir_strcmp(AVS_DEFAULT, szProto)) { for (int i = 0; i < g_ProtoPictures.getCount(); i++) { protoPicCacheEntry &p = g_ProtoPictures[i]; if (p.szProtoname == NULL) @@ -76,10 +76,10 @@ static void RemoveProtoPic(const char *szProto) if (p.szProtoname == NULL) continue; PROTOACCOUNT *pdescr = ProtoGetAccount(p.szProtoname); - if (pdescr == NULL && lstrcmpA(p.szProtoname, szProto)) + if (pdescr == NULL && mir_strcmp(p.szProtoname, szProto)) continue; - if (!lstrcmpA(p.szProtoname, szProto) || !lstrcmpA(pdescr->szProtoName, szProtoname)) { + if (!mir_strcmp(p.szProtoname, szProto) || !mir_strcmp(pdescr->szProtoName, szProtoname)) { p.clear(); CreateAvatarInCache(0, &p, (char*)p.szProtoname); NotifyEventHooks(hEventChanged, 0, (LPARAM)&p); @@ -90,7 +90,7 @@ static void RemoveProtoPic(const char *szProto) for (int i = 0; i < g_ProtoPictures.getCount(); i++) { protoPicCacheEntry& p = g_ProtoPictures[i]; - if (!lstrcmpA(p.szProtoname, szProto)) { + if (!mir_strcmp(p.szProtoname, szProto)) { p.clear(); NotifyEventHooks(hEventChanged, 0, (LPARAM)&p); } @@ -126,13 +126,13 @@ static void SetProtoPic(char *szProto) PathToRelativeT(FileName, szNewPath, g_szDataPath); db_set_ts(NULL, PPICT_MODULE, szProto, szNewPath); - if (!lstrcmpA(AVS_DEFAULT, szProto)) { + if (!mir_strcmp(AVS_DEFAULT, szProto)) { for (int i = 0; i < g_ProtoPictures.getCount(); i++) { protoPicCacheEntry& p = g_ProtoPictures[i]; if (mir_strlen(p.szProtoname) == 0) continue; - if (p.hbmPic == 0 || !lstrcmpA(p.szProtoname, AVS_DEFAULT)) { + if (p.hbmPic == 0 || !mir_strcmp(p.szProtoname, AVS_DEFAULT)) { CreateAvatarInCache(0, &p, szProto); NotifyEventHooks(hEventChanged, 0, (LPARAM)&p); } @@ -144,10 +144,10 @@ static void SetProtoPic(char *szProto) mir_strcpy(szProtoname, strrchr(szProtoname, ' ') + 1); for (int i = 0; i < g_ProtoPictures.getCount(); i++) { PROTOACCOUNT* pdescr = (PROTOACCOUNT*)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)g_ProtoPictures[i].szProtoname); - if (pdescr == NULL && lstrcmpA(g_ProtoPictures[i].szProtoname, szProto)) + if (pdescr == NULL && mir_strcmp(g_ProtoPictures[i].szProtoname, szProto)) continue; - if (!lstrcmpA(g_ProtoPictures[i].szProtoname, szProto) || !lstrcmpA(pdescr->szProtoName, szProtoname)) { + if (!mir_strcmp(g_ProtoPictures[i].szProtoname, szProto) || !mir_strcmp(pdescr->szProtoName, szProtoname)) { protoPicCacheEntry& p = g_ProtoPictures[i]; if (mir_strlen(p.szProtoname) != 0) { if (p.hbmPic == 0) { diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp index 7334939f40..fe15a2b332 100644 --- a/plugins/AVS/src/services.cpp +++ b/plugins/AVS/src/services.cpp @@ -750,7 +750,7 @@ INT_PTR DrawAvatarPicture(WPARAM wParam, LPARAM lParam) for (int i = 0; i < g_ProtoPictures.getCount(); i++) { protoPicCacheEntry& p = g_ProtoPictures[i]; - if (!lstrcmpA(p.szProtoname, r->szProto) && mir_strlen(r->szProto) == mir_strlen(p.szProtoname) && p.hbmPic != 0) { + if (!mir_strcmp(p.szProtoname, r->szProto) && mir_strlen(r->szProto) == mir_strlen(p.szProtoname) && p.hbmPic != 0) { ace = (AVATARCACHEENTRY *)&g_ProtoPictures[i]; break; } @@ -792,7 +792,7 @@ INT_PTR GetMyAvatar(WPARAM wParam, LPARAM lParam) return 0; for (int i = 0; i < g_MyAvatars.getCount(); i++) - if (!lstrcmpA(szProto, g_MyAvatars[i].szProtoname) && g_MyAvatars[i].hbmPic != 0) + if (!mir_strcmp(szProto, g_MyAvatars[i].szProtoname) && g_MyAvatars[i].hbmPic != 0) return (INT_PTR)&g_MyAvatars[i]; return 0; @@ -810,7 +810,7 @@ static void ReloadMyAvatar(LPVOID lpParam) if (szProto[0] == 0) { // Notify to all possibles - if (lstrcmpA(myAvatarProto, szProto)) { + if (mir_strcmp(myAvatarProto, szProto)) { if (!ProtoServiceExists(myAvatarProto, PS_SETMYAVATAR)) continue; if (!Proto_IsAvatarsEnabled(myAvatarProto)) @@ -818,7 +818,7 @@ static void ReloadMyAvatar(LPVOID lpParam) } } - else if (lstrcmpA(myAvatarProto, szProto)) + else if (mir_strcmp(myAvatarProto, szProto)) continue; if (g_MyAvatars[i].hbmPic) @@ -843,7 +843,7 @@ INT_PTR ReportMyAvatarChanged(WPARAM wParam, LPARAM lParam) if (g_MyAvatars[i].dwFlags & AVS_IGNORENOTIFY) continue; - if (!lstrcmpA(g_MyAvatars[i].szProtoname, proto)) { + if (!mir_strcmp(g_MyAvatars[i].szProtoname, proto)) { LPVOID lpParam = (void *)malloc(mir_strlen(g_MyAvatars[i].szProtoname) + 2); strcpy((char *)lpParam, g_MyAvatars[i].szProtoname); mir_forkthread(ReloadMyAvatar, lpParam); diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp index fdc16d4338..bceae41a3e 100644 --- a/plugins/AVS/src/utils.cpp +++ b/plugins/AVS/src/utils.cpp @@ -98,7 +98,7 @@ int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto) if (hContact == 0) { // create a protocol picture in the proto picture cache if (tszValue = db_get_tsa(NULL, PPICT_MODULE, szProto)) MyPathToAbsolute(tszValue, tszFilename); - else if (lstrcmpA(szProto, AVS_DEFAULT)) { + else if (mir_strcmp(szProto, AVS_DEFAULT)) { if (tszValue = db_get_tsa(NULL, PPICT_MODULE, AVS_DEFAULT)) MyPathToAbsolute(tszValue, tszFilename); @@ -388,7 +388,7 @@ protoPicCacheEntry* GetProtoDefaultAvatar(MCONTACT hContact) if (szProto) { for (int i = 0; i < g_ProtoPictures.getCount(); i++) { protoPicCacheEntry& p = g_ProtoPictures[i]; - if (!lstrcmpA(p.szProtoname, szProto) && p.hbmPic != NULL) + if (!mir_strcmp(p.szProtoname, szProto) && p.hbmPic != NULL) return &g_ProtoPictures[i]; } } @@ -448,7 +448,7 @@ void DeleteGlobalUserAvatar() void SetIgnoreNotify(char *protocol, BOOL ignore) { for (int i = 0; i < g_MyAvatars.getCount(); i++) { - if (protocol == NULL || !lstrcmpA(g_MyAvatars[i].szProtoname, protocol)) { + if (protocol == NULL || !mir_strcmp(g_MyAvatars[i].szProtoname, protocol)) { if (ignore) g_MyAvatars[i].dwFlags |= AVS_IGNORENOTIFY; else diff --git a/plugins/AssocMgr/src/assoclist.cpp b/plugins/AssocMgr/src/assoclist.cpp index 7d12f4686f..9380ebfd69 100644 --- a/plugins/AssocMgr/src/assoclist.cpp +++ b/plugins/AssocMgr/src/assoclist.cpp @@ -147,7 +147,7 @@ void CleanupMimeTypeAddedSettings(void) for(i = 0;iszModule, proto)) - if (!lstrcmpA(cws->szSetting, "Auth") || !lstrcmpA(cws->szSetting, "Grant") || !lstrcmpA(cws->szSetting, "ServerId") || !lstrcmpA(cws->szSetting, "ContactType")) + if (!mir_strcmp(cws->szModule, proto)) + if (!mir_strcmp(cws->szSetting, "Auth") || !mir_strcmp(cws->szSetting, "Grant") || !mir_strcmp(cws->szSetting, "ServerId") || !mir_strcmp(cws->szSetting, "ContactType")) onExtraImageApplying(hContact, 1); return 0; diff --git a/plugins/AutoRun/src/main.cpp b/plugins/AutoRun/src/main.cpp index eeddd928e3..e3b4da8e32 100644 --- a/plugins/AutoRun/src/main.cpp +++ b/plugins/AutoRun/src/main.cpp @@ -70,7 +70,7 @@ static BOOL CmpCurrentAndRegistry() return FALSE; GetProfilePath(result, SIZEOF(result)); - return lstrcmpi(result, dbpath) == 0; + return mir_tstrcmpi(result, dbpath) == 0; } static INT_PTR CALLBACK DlgProcAutorunOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) diff --git a/plugins/AutoShutdown/src/cpuusage.cpp b/plugins/AutoShutdown/src/cpuusage.cpp index 5009f0b998..481e2ad2cc 100644 --- a/plugins/AutoShutdown/src/cpuusage.cpp +++ b/plugins/AutoShutdown/src/cpuusage.cpp @@ -130,7 +130,7 @@ static void WinNT_PollThread(void *vparam) pPerfInstance=(PERF_INSTANCE_DEFINITION*)((BYTE*)pPerfObj+pPerfObj->DefinitionLength); for(lCount=0;lCount<(pPerfObj->NumInstances);++lCount) { pPerfCounterBlock=(PERF_COUNTER_BLOCK*)((BYTE*)pPerfInstance+pPerfInstance->ByteLength); - if (!lstrcmpiW(pwszInstanceName,(WCHAR*)((BYTE*)pPerfInstance+pPerfInstance->NameOffset))) { + if (!mir_wstrcmpi(pwszInstanceName,(WCHAR*)((BYTE*)pPerfInstance+pPerfInstance->NameOffset))) { liCurrentCounterValue=*(LARGE_INTEGER*)((BYTE*)pPerfCounterBlock+pPerfCounter->CounterOffset); fFound=TRUE; break; diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp index e95b97f145..41f52be000 100644 --- a/plugins/AutoShutdown/src/watcher.cpp +++ b/plugins/AutoShutdown/src/watcher.cpp @@ -200,9 +200,9 @@ static int StatusSettingChanged(WPARAM wParam,LPARAM lParam) { if (currentWatcherType&SDWTF_STATUS) { DBCONTACTWRITESETTING *dbcws=(DBCONTACTWRITESETTING*)lParam; - if ((HANDLE)wParam != NULL && dbcws->value.wVal==ID_STATUS_OFFLINE && !lstrcmpA(dbcws->szSetting,"Status")) { + if ((HANDLE)wParam != NULL && dbcws->value.wVal==ID_STATUS_OFFLINE && !mir_strcmp(dbcws->szSetting,"Status")) { char *pszProto = GetContactProto(wParam); - if (pszProto != NULL && !lstrcmpA(dbcws->szModule,pszProto)) + if (pszProto != NULL && !mir_strcmp(dbcws->szModule,pszProto)) if (CheckAllContactsOffline()) ShutdownAndStopWatcher(); } diff --git a/plugins/AvatarHistory/src/utils.cpp b/plugins/AvatarHistory/src/utils.cpp index 2c18e2edea..69b5efb990 100644 --- a/plugins/AvatarHistory/src/utils.cpp +++ b/plugins/AvatarHistory/src/utils.cpp @@ -219,11 +219,11 @@ TCHAR * GetCachedAvatar(char *proto, TCHAR *hash) { size_t len = mir_tstrlen(finddata.cFileName); if (len > 4 - && (!lstrcmpi(&finddata.cFileName[len-4], _T(".png")) - || !lstrcmpi(&finddata.cFileName[len-4], _T(".bmp")) - || !lstrcmpi(&finddata.cFileName[len-4], _T(".gif")) - || !lstrcmpi(&finddata.cFileName[len-4], _T(".jpg")) - || !lstrcmpi(&finddata.cFileName[len-5], _T(".jpeg")))) + && (!mir_tstrcmpi(&finddata.cFileName[len-4], _T(".png")) + || !mir_tstrcmpi(&finddata.cFileName[len-4], _T(".bmp")) + || !mir_tstrcmpi(&finddata.cFileName[len-4], _T(".gif")) + || !mir_tstrcmpi(&finddata.cFileName[len-4], _T(".jpg")) + || !mir_tstrcmpi(&finddata.cFileName[len-5], _T(".jpeg")))) { mir_sntprintf(file, SIZEOF(file), _T("%s\\%s"), file, finddata.cFileName); ret = mir_tstrdup(file); diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index 6d94afb260..351a48b868 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -180,7 +180,7 @@ INT_PTR CALLBACK OptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara db_get_ts(NULL, ModuleName, OPT_OUTDEVICE, &dbv); for (int i = 1; BASS_GetDeviceInfo(i + newBass, &info); i++) { SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, CB_ADDSTRING, 0, (LPARAM)(TCHAR*)_A2T(info.name)); - if ( !lstrcmp(dbv.ptszVal, _A2T(info.name))) + if ( !mir_tstrcmp(dbv.ptszVal, _A2T(info.name))) SendDlgItemMessage(hwndDlg, IDC_OUTDEVICE, CB_SETCURSEL, i, 0); } db_free(&dbv); @@ -494,7 +494,7 @@ void LoadBassLibrary(TCHAR CurrBassPath[MAX_PATH]) if ( !db_get_ts(NULL, ModuleName, OPT_OUTDEVICE, &dbv)) for (int i = 1; BASS_GetDeviceInfo(i, &info); i++) - if ( !lstrcmp(dbv.ptszVal, _A2T(info.name))) + if ( !mir_tstrcmp(dbv.ptszVal, _A2T(info.name))) device = i; db_free(&dbv); diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index c2ca03957e..309713140c 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -127,7 +127,7 @@ INT_PTR CALLBACK DlgStdInProc(HWND hDlg, UINT uMsg,WPARAM wParam,LPARAM lParam) SendDlgItemMessage(hDlg, IDC_HEADERBAR, WM_NCPAINT, 0, 0); break; } - else if (lstrcmpA(password, g_password)) + else if (mir_strcmp(password, g_password)) { SetDlgItemText(hDlg, IDC_HEADERBAR, TranslateT("Password is not correct!\nPlease, enter correct password.")); SendDlgItemMessage(hDlg, IDC_HEADERBAR, WM_NCPAINT, 0, 0); @@ -179,12 +179,12 @@ BOOL CALLBACK EnumWindowsProc(HWND hWnd,LPARAM) TCHAR szTemp[32]; GetClassName(hWnd,szTemp,32); - if (lstrcmp(szTemp,_T("MirandaThumbsWnd")) == 0) // hide floating contacts + if (mir_tstrcmp(szTemp,_T("MirandaThumbsWnd")) == 0) // hide floating contacts { CallService("FloatingContacts/MainHideAllThumbs",0,0); g_bOldSetting |= OLD_FLTCONT; } - else if (lstrcmp(szTemp,_T("PopupWnd2")) == 0 || lstrcmp(szTemp,_T("YAPPWinClass")) == 0) // destroy opened popups + else if (mir_tstrcmp(szTemp,_T("PopupWnd2")) == 0 || mir_tstrcmp(szTemp,_T("YAPPWinClass")) == 0) // destroy opened popups PUDeletePopup(hWnd); else { @@ -410,7 +410,7 @@ LRESULT CALLBACK ListenWndProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam) TCHAR szTemp[32]; GetClassName(pCurWnd->hWnd,szTemp,32); - if (IsWindow(pCurWnd->hWnd) && lstrcmp(szTemp,_T("SysShadow")) != 0) // precaution + if (IsWindow(pCurWnd->hWnd) && mir_tstrcmp(szTemp,_T("SysShadow")) != 0) // precaution ShowWindow(pCurWnd->hWnd, SW_SHOW); delete pCurWnd; // bye-bye diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index 7926bf6af7..beb71a82d5 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -72,7 +72,7 @@ static int OnDbChanged(WPARAM hContact, LPARAM lparam) // if user changes his UIN or JID on any account if (hContact == NULL) { INT_PTR szUniqueID = CallProtoService(cws->szModule, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0); - if (szUniqueID != CALLSERVICE_NOTFOUND && !lstrcmpA(cws->szSetting, (char*)szUniqueID)) + if (szUniqueID != CALLSERVICE_NOTFOUND && !mir_strcmp(cws->szSetting, (char*)szUniqueID)) pcli->pfnReloadProtoMenus(); } return 0; @@ -582,7 +582,7 @@ void CSAMWindow::checkItemValidity() if ( CallProtoService(pdescr->szModuleName, PS_GETCUSTOMSTATUSEX, 0, (LPARAM)&cs) == 0) mir_tstrncpy(m_item->m_tszTitle, TranslateTS(tszTitle), SIZEOF(m_item->m_tszTitle)); - if ( lstrcmp(m_item->m_tszMessage, tszInputMessage)) + if ( mir_tstrcmp(m_item->m_tszMessage, tszInputMessage)) mir_tstrcpy( m_item->m_tszMessage, tszInputMessage), m_bChanged = true; } @@ -719,10 +719,10 @@ int CSItemsList::compareItems( const StatusItem* p1, const StatusItem* p2 ) else if ( p1->m_iIcon < p2->m_iIcon ) icoRes = -1; - result = lstrcmp(p1->m_tszTitle, p2->m_tszTitle); + result = mir_tstrcmp(p1->m_tszTitle, p2->m_tszTitle); ttlRes = result; - result = lstrcmp(p1->m_tszMessage, p2->m_tszMessage); + result = mir_tstrcmp(p1->m_tszMessage, p2->m_tszMessage); msgRes = result; if ( !icoRes && !ttlRes && !msgRes) diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index 9d6457a735..46111ef053 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -182,7 +182,7 @@ void ShowPopup(SHOWPOPUP_DATA *sd) int ContactSettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if (lstrcmpA(cws->szSetting, DB_MIRVER)) + if (mir_strcmp(cws->szSetting, DB_MIRVER)) return 0; SHOWPOPUP_DATA sd = {0}; diff --git a/plugins/ClientChangeNotify/src/CommonLibs/CString.h b/plugins/ClientChangeNotify/src/CommonLibs/CString.h index 161977cf28..b2a1c4accf 100644 --- a/plugins/ClientChangeNotify/src/CommonLibs/CString.h +++ b/plugins/ClientChangeNotify/src/CommonLibs/CString.h @@ -31,8 +31,8 @@ __inline int My_lstrlen(LPCSTR lpString) {return mir_strlen(lpString);} __inline int My_lstrlen(LPCWSTR lpString) {return mir_wstrlen(lpString);} -__inline int My_lstrcmp(LPCSTR lpString1, LPCSTR lpString2) {return lstrcmpA(lpString1, lpString2);} -__inline int My_lstrcmp(LPCWSTR lpString1, LPCWSTR lpString2) {return lstrcmpW(lpString1, lpString2);} +__inline int My_lstrcmp(LPCSTR lpString1, LPCSTR lpString2) {return mir_strcmp(lpString1, lpString2);} +__inline int My_lstrcmp(LPCWSTR lpString1, LPCWSTR lpString2) {return mir_wstrcmp(lpString1, lpString2);} __inline LPCSTR My_strstr(LPCSTR lpString1, LPCSTR lpString2) {return strstr(lpString1, lpString2);} __inline LPWSTR My_strstr(LPCWSTR lpString1, LPCWSTR lpString2) {return (LPWSTR)wcsstr(lpString1, lpString2);} __inline LPSTR My_lstrcpy(LPSTR lpString1, LPCSTR lpString2) {return mir_strcpy(lpString1, lpString2);} diff --git a/plugins/Clist_blind/src/clcpaint.cpp b/plugins/Clist_blind/src/clcpaint.cpp index e4a6a1408d..5dc248081c 100644 --- a/plugins/Clist_blind/src/clcpaint.cpp +++ b/plugins/Clist_blind/src/clcpaint.cpp @@ -131,7 +131,7 @@ static int GetRealStatus(struct ClcContact *contact, int status) if (!szProto) return status; for (int i = 0; i < pcli->hClcProtoCount; i++) { - if (!lstrcmpA(pcli->clcProto[i].szProto, szProto)) { + if (!mir_strcmp(pcli->clcProto[i].szProto, szProto)) { return pcli->clcProto[i].dwStatus; } } diff --git a/plugins/Clist_blind/src/clistopts.cpp b/plugins/Clist_blind/src/clistopts.cpp index aa50de4fe8..350f33568b 100644 --- a/plugins/Clist_blind/src/clistopts.cpp +++ b/plugins/Clist_blind/src/clistopts.cpp @@ -31,7 +31,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP MCONTACT hContact = (MCONTACT) wParam; DBCONTACTWRITESETTING *ws = (DBCONTACTWRITESETTING *) lParam; if (hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL - && lstrcmpiA(ws->szModule, "CList") == 0 && lstrcmpiA(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) { + && mir_strcmpi(ws->szModule, "CList") == 0 && mir_strcmpi(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) { CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, ws->value.bVal == 0); } break; @@ -125,7 +125,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP CallProtoService(accs[i]->szModuleName, PS_GETNAME, SIZEOF(szName), (LPARAM) szName); item = SendDlgItemMessageA(hwndDlg, IDC_PRIMARYSTATUS, CB_ADDSTRING, 0, (LPARAM) szName); SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETITEMDATA, item, (LPARAM) accs[i]); - if (dbv.type == DBVT_ASCIIZ && !lstrcmpA(dbv.pszVal, accs[i]->szModuleName)) + if (dbv.type == DBVT_ASCIIZ && !mir_strcmp(dbv.pszVal, accs[i]->szModuleName)) SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETCURSEL, item, 0); } db_free(&dbv); diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp index c2e6c53512..dd5a2c6cbe 100644 --- a/plugins/Clist_blind/src/init.cpp +++ b/plugins/Clist_blind/src/init.cpp @@ -425,7 +425,7 @@ static int GetRealStatus(struct ClcContact *contact, int status) if (!szProto) return status; for (i = 0; i < pcli->hClcProtoCount; i++) { - if (!lstrcmpA(pcli->clcProto[i].szProto, szProto)) { + if (!mir_strcmp(pcli->clcProto[i].szProto, szProto)) { return pcli->clcProto[i].dwStatus; } } diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp index 3821131aa1..eae9c3044f 100644 --- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp @@ -734,7 +734,7 @@ static int LocateStorePosition(int Frameid,int maxstored) if ( db_get_ts( NULL, CLUIFrameModule, settingname, &dbv )) continue; - if ( lstrcmpi(dbv.ptszVal, g_pfwFrames[Frameid].name) == 0) { + if ( mir_tstrcmpi(dbv.ptszVal, g_pfwFrames[Frameid].name) == 0) { db_free( &dbv ); return i; } diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index e579ffe7dd..c234b7d400 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -322,7 +322,7 @@ static int clcSearchNextContact(HWND hwnd, ClcData *dat, int index, const TCHAR found = _tcsstr(lowered_szText, lowered_search) != NULL; } else { - found = ((prefixOk && CSTR_EQUAL == CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, text, -1, group->cl.items[group->scanIndex]->szText, testlen)) || (!prefixOk && !lstrcmpi(text, group->cl.items[group->scanIndex]->szText))); + found = ((prefixOk && CSTR_EQUAL == CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, text, -1, group->cl.items[group->scanIndex]->szText, testlen)) || (!prefixOk && !mir_tstrcmpi(text, group->cl.items[group->scanIndex]->szText))); } if (found) { ClcGroup *contactGroup = group; @@ -1732,7 +1732,7 @@ int ClcDoProtoAck(MCONTACT wParam, ACKDATA * ack) if (ack->type == ACKTYPE_STATUS) { if (ack->result == ACKRESULT_SUCCESS) { for (int i = 0; i < pcli->hClcProtoCount; i++) { - if (!lstrcmpA(pcli->clcProto[i].szProto, ack->szModule)) { + if (!mir_strcmp(pcli->clcProto[i].szProto, ack->szModule)) { pcli->clcProto[i].dwStatus = (WORD)ack->lParam; if (pcli->clcProto[i].dwStatus >= ID_STATUS_OFFLINE) pcli->pfnTrayIconUpdateBase(pcli->clcProto[i].szProto); diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index 96eb839186..3823497854 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -105,7 +105,7 @@ ClcGroup* cli_AddGroup(HWND hwnd, ClcData *dat, const TCHAR *szName, DWORD flags { ClearRowByIndexCache(); if (!dat->force_in_dialog && !(GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN)) - if (!lstrcmp(_T("-@-HIDDEN-GROUP-@-"), szName)) { //group is hidden + if (!mir_tstrcmp(_T("-@-HIDDEN-GROUP-@-"), szName)) { //group is hidden ClearRowByIndexCache(); return NULL; } diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp index 42d4cfe939..441afca9d5 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.cpp +++ b/plugins/Clist_modern/src/modern_clcpaint.cpp @@ -369,7 +369,7 @@ int CLCPaint::_GetRealStatus( ClcContact *pContact, int nStatus ) for ( int i=0; i < pcli->hClcProtoCount; i++ ) { - if (!lstrcmpA( pcli->clcProto[i].szProto, pContact->proto )) + if (!mir_strcmp( pcli->clcProto[i].szProto, pContact->proto )) return pcli->clcProto[i].dwStatus; } return nStatus; diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp index f23dc89266..865edfe98d 100644 --- a/plugins/Clist_modern/src/modern_clcutils.cpp +++ b/plugins/Clist_modern/src/modern_clcutils.cpp @@ -745,7 +745,7 @@ int cliFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk) TCHAR *lowered_text = CharLowerW(NEWTSTR_ALLOCA(text)); found = _tcsstr(lowered_szText, lowered_text) != NULL; } - else found = (prefixOk && !_tcsnicmp(text, contact->szText, testlen)) || (!prefixOk && !lstrcmpi(text, contact->szText)); + else found = (prefixOk && !_tcsnicmp(text, contact->szText, testlen)) || (!prefixOk && !mir_tstrcmpi(text, contact->szText)); if (found) { ClcGroup *contactGroup = group; @@ -775,7 +775,7 @@ int cliFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk) TCHAR *lowered_text = CharLowerW(NEWTSTR_ALLOCA(text)); found = _tcsstr(lowered_szText, lowered_text) != NULL; } - else found = (prefixOk && !_tcsnicmp(text, subcontact->szText, testlen)) || (!prefixOk && !lstrcmpi(text, subcontact->szText)); + else found = (prefixOk && !_tcsnicmp(text, subcontact->szText, testlen)) || (!prefixOk && !mir_tstrcmpi(text, subcontact->szText)); if (found) { ClcGroup *contactGroup = group; diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index 7b9b62d0bf..0960825202 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -305,7 +305,7 @@ int GetWindowVisibleState(HWND hWnd, int iStepX, int iStepY) if (hAuxOld == hAux) { TCHAR buf[255]; GetClassName(hAux, buf, SIZEOF(buf)); - if (!lstrcmp(buf, CLUIFrameSubContainerClassName)) { + if (!mir_tstrcmp(buf, CLUIFrameSubContainerClassName)) { hWndFound = TRUE; break; } diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp index c9491636b9..b881e2b57c 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -349,7 +349,7 @@ LBL_Unknown: } tszName = pcli->pfnGetContactDisplayName(hContact, GCDNF_NOCACHE); - if (!lstrcmp(tszName, UnknownConctactTranslatedName)) { + if (!mir_tstrcmp(tszName, UnknownConctactTranslatedName)) { mir_free(tszName); goto LBL_Unknown; } diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index dc5f07d995..bb64d2635b 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -199,7 +199,7 @@ int CLUI::OnEvent_ContactMenuPreBuild(WPARAM wParam, LPARAM lParam) HWND hwndClist = GetFocus(); TCHAR cls[128]; GetClassName(hwndClist, cls, SIZEOF(cls)); - if (lstrcmp(_T(CLISTCONTROL_CLASS), cls)) + if (mir_tstrcmp(_T(CLISTCONTROL_CLASS), cls)) hwndClist = pcli->hwndContactList; MCONTACT hItem = (MCONTACT)SendMessage(hwndClist, CLM_GETSELECTION, 0, 0); diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index 7f5728783f..39108c1c96 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -3685,7 +3685,7 @@ static TCHAR *ske_ReAppend(TCHAR *lfirst, TCHAR * lsecond, int len) TCHAR* ske_ReplaceVar(TCHAR *var) { if (!var) return mir_tstrdup(_T("")); - if (!lstrcmpi(var,_T("Profile"))) { + if (!mir_tstrcmpi(var,_T("Profile"))) { char buf[MAX_PATH] = {0}; CallService(MS_DB_GETPROFILENAME,(WPARAM)MAX_PATH,(LPARAM)buf); diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp index af499ceab3..bc80f1ea3c 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp @@ -480,7 +480,7 @@ int LocateStorePosition(int Frameid, int maxstored) mir_snprintf(settingname, sizeof(settingname), "Name%d", i); ptrT frmname(db_get_tsa(0, CLUIFrameModule, settingname)); if (frmname == NULL) continue; - if (lstrcmpi(frmname, Frames[Frameid].name) == 0) + if (mir_tstrcmpi(frmname, Frames[Frameid].name) == 0) return i; } return -1; @@ -1149,7 +1149,7 @@ INT_PTR CLUIFramesShowHideFrame(WPARAM wParam, LPARAM lParam) { mir_cslock lck(csFrameHook); pos = id2pos((INT_PTR)wParam); - if (pos >= 0 && !lstrcmp(Frames[pos].name, _T("My contacts"))) + if (pos >= 0 && !mir_tstrcmp(Frames[pos].name, _T("My contacts"))) Frames[pos].visible = 1; else { if (pos >= 0 && (int)pos < nFramescount) diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp index ab0134290a..304629c432 100644 --- a/plugins/Clist_nicer/src/clcpaint.cpp +++ b/plugins/Clist_nicer/src/clcpaint.cpp @@ -165,7 +165,7 @@ static int __fastcall GetRealStatus(ClcContact *contact, int status) return status; for (int i = 0; i < pcli->hClcProtoCount; i++) - if ( !lstrcmpA(pcli->clcProto[i].szProto, szProto)) + if ( !mir_strcmp(pcli->clcProto[i].szProto, szProto)) return pcli->clcProto[i].dwStatus; return status; diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp index 7448b83792..25334d1839 100644 --- a/plugins/Clist_nicer/src/clistopts.cpp +++ b/plugins/Clist_nicer/src/clistopts.cpp @@ -41,7 +41,7 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP { MCONTACT hContact = wParam; DBCONTACTWRITESETTING *ws = (DBCONTACTWRITESETTING *)lParam; - if (hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL && lstrcmpiA(ws->szModule, "CList") == 0 && lstrcmpiA(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) + if (hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL && mir_strcmpi(ws->szModule, "CList") == 0 && mir_strcmpi(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, ws->value.bVal == 0); } break; @@ -113,7 +113,7 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP item = SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_ADDSTRING, 0, (LPARAM)accs[i]->tszAccountName); SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETITEMDATA, item, (LPARAM)accs[i]); - if (dbv.type == DBVT_ASCIIZ && !lstrcmpA(dbv.pszVal, accs[i]->szModuleName)) + if (dbv.type == DBVT_ASCIIZ && !mir_strcmp(dbv.pszVal, accs[i]->szModuleName)) SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETCURSEL, item, 0); } } diff --git a/plugins/ContactsPlus/src/receive.cpp b/plugins/ContactsPlus/src/receive.cpp index 99ff33c595..7cc55f8eaa 100644 --- a/plugins/ContactsPlus/src/receive.cpp +++ b/plugins/ContactsPlus/src/receive.cpp @@ -143,7 +143,7 @@ static MCONTACT CreateTemporaryContactForItem(HWND hwndDlg, TRecvContactsData *w wndData->rhSearch = (HANDLE)CallProtoService(szProto, PS_BASICSEARCH, 0, (LPARAM)caUIN); // find it replaceStrT(wndData->haUin, caUIN); for (int j = 0; j < wndData->cbReceived; j++) - if (!lstrcmp(wndData->maReceived[j]->mcaUIN, caUIN)) + if (!mir_tstrcmp(wndData->maReceived[j]->mcaUIN, caUIN)) return (MCONTACT)CallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(PALF_TEMPORARY, j), (LPARAM)wndData->mhDbEvent); return NULL; } @@ -315,7 +315,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara // found checked contact item, add it TCHAR *caUIN = ListView_GetItemTextEx(hLV, i, 0); for (int j = 0; j < wndData->cbReceived; j++) // determine item index in packet - if (!lstrcmp(wndData->maReceived[j]->mcaUIN, caUIN)) { + if (!mir_tstrcmp(wndData->maReceived[j]->mcaUIN, caUIN)) { char *szProto =GetContactProto(wndData->mhContact); hContact = (MCONTACT)CallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(0, j), (LPARAM)wndData->mhDbEvent); if (hContact && caGroup) { @@ -434,7 +434,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara fi.psz = wndData->haUin; int iLPos = ListView_FindItem(hLV, -1, &fi); if (iLPos == -1) iLPos = 0; - if (lstrcmp(psr->nick, _T("")) && psr->nick) + if (mir_tstrcmp(psr->nick, _T("")) && psr->nick) ListView_SetItemText(hLV, iLPos, 1, psr->nick); ListView_SetItemText(hLV, iLPos, 2, psr->firstName); ListView_SetItemText(hLV, iLPos, 3, psr->lastName); diff --git a/plugins/ContactsPlus/src/utils.cpp b/plugins/ContactsPlus/src/utils.cpp index a414d0a6b8..a5cc8e6076 100644 --- a/plugins/ContactsPlus/src/utils.cpp +++ b/plugins/ContactsPlus/src/utils.cpp @@ -126,7 +126,7 @@ void UpdateDialogTitle(HWND hwndDlg, MCONTACT hContact, TCHAR *pszTitleStart) TCHAR oldTitle[MAX_PATH]; GetDlgItemText(hwndDlg, IDC_NAME, oldTitle, SIZEOF(oldTitle)); - if (lstrcmp(uid ? uid : contactName, oldTitle)) + if (mir_tstrcmp(uid ? uid : contactName, oldTitle)) SetDlgItemText(hwndDlg, IDC_NAME, uid ? uid : contactName); TCHAR *szStatus = pcli->pfnGetStatusModeDescription(szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), 0); diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp index 0e42d64b7e..9e9d0dd307 100644 --- a/plugins/CountryFlags/src/extraimg.cpp +++ b/plugins/CountryFlags/src/extraimg.cpp @@ -165,7 +165,7 @@ static int ExtraImgSettingChanged(WPARAM hContact, LPARAM lParam) DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam; if (hContact) { /* user details update */ - if (!lstrcmpA(dbcws->szSetting,"RealIP") || !lstrcmpA(dbcws->szSetting,"Country") || !lstrcmpA(dbcws->szSetting,"CompanyCountry")) { + if (!mir_strcmp(dbcws->szSetting,"RealIP") || !mir_strcmp(dbcws->szSetting,"Country") || !mir_strcmp(dbcws->szSetting,"CompanyCountry")) { /* Extra Image */ SetExtraImage(hContact); /* Status Icon */ diff --git a/plugins/CountryFlags/src/ip2country.cpp b/plugins/CountryFlags/src/ip2country.cpp index b47ab8ded7..811c66f759 100644 --- a/plugins/CountryFlags/src/ip2country.cpp +++ b/plugins/CountryFlags/src/ip2country.cpp @@ -207,34 +207,34 @@ static int EnumIpDataLines(const char *pszFileCSV,const char *pszFileOut) buf=strchr(pszCountry,'"'); *buf=pszTwo[2]='\0'; /* corrections */ - if (!lstrcmpi(pszCountry,"ANTARCTICA")) continue; - if (!lstrcmpi(pszCountry,"TIMOR-LESTE")) continue; - if (!lstrcmpi(pszCountry,"PALESTINIAN TERRITORY, OCCUPIED")) + if (!mir_tstrcmpi(pszCountry,"ANTARCTICA")) continue; + if (!mir_tstrcmpi(pszCountry,"TIMOR-LESTE")) continue; + if (!mir_tstrcmpi(pszCountry,"PALESTINIAN TERRITORY, OCCUPIED")) mir_tstrcpy(pszCountry,"ISRAEL"); - else if (!lstrcmpi(pszCountry,"UNITED STATES MINOR OUTLYING ISLANDS")) + else if (!mir_tstrcmpi(pszCountry,"UNITED STATES MINOR OUTLYING ISLANDS")) mir_tstrcpy(pszCountry,"UNITED STATES"); - else if (!lstrcmpi(pszCountry,"SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS")) + else if (!mir_tstrcmpi(pszCountry,"SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS")) mir_tstrcpy(pszCountry,"UNITED KINGDOM"); - else if (!lstrcmpi(pszTwo,"JE")) /* map error */ + else if (!mir_tstrcmpi(pszTwo,"JE")) /* map error */ mir_tstrcpy(pszCountry,"UNITED KINGDOM"); - else if (!lstrcmpi(pszTwo,"AX")) /* Åland Island belongs to Finland */ + else if (!mir_tstrcmpi(pszTwo,"AX")) /* Åland Island belongs to Finland */ mir_tstrcpy(pszCountry,"FINLAND"); - else if (!lstrcmpi(pszTwo,"ME")) + else if (!mir_tstrcmpi(pszTwo,"ME")) mir_tstrcpy(pszCountry,"MONTENEGRO"); - else if (!lstrcmpi(pszTwo,"RS") || !lstrcmpi(pszTwo,"CS")) + else if (!mir_tstrcmpi(pszTwo,"RS") || !mir_tstrcmpi(pszTwo,"CS")) mir_tstrcpy(pszCountry,"SERBIA"); /* convert */ for(i=0;iHasAccessToken()) instance->DestroyAcceessToken(); diff --git a/plugins/FavContacts/src/favlist.h b/plugins/FavContacts/src/favlist.h index e3adeabec7..c8adf21ca1 100644 --- a/plugins/FavContacts/src/favlist.h +++ b/plugins/FavContacts/src/favlist.h @@ -56,8 +56,8 @@ public: } int res = 0; - if (res = lstrcmp(p1->group, p2->group)) return res; - if (res = lstrcmp(p1->name, p2->name)) return res; + if (res = mir_tstrcmp(p1->group, p2->group)) return res; + if (res = mir_tstrcmp(p1->name, p2->name)) return res; return 0; } }; @@ -85,7 +85,7 @@ private: TContactInfo *info = new TContactInfo(hContact, bManual); insert(info); TCHAR *group = info->getGroup(); - if (prevGroup && lstrcmp(prevGroup, group)) + if (prevGroup && mir_tstrcmp(prevGroup, group)) ++nGroups; prevGroup = group; return 1; diff --git a/plugins/FavContacts/src/menu.cpp b/plugins/FavContacts/src/menu.cpp index 6136b41c3f..1400a0f09f 100644 --- a/plugins/FavContacts/src/menu.cpp +++ b/plugins/FavContacts/src/menu.cpp @@ -463,7 +463,7 @@ int ShowMenu(bool centered) mis.CtlID = 0; mis.CtlType = ODT_MENU; - if (!prevGroup || lstrcmp(prevGroup, favList[i]->getGroup())) { + if (!prevGroup || mir_tstrcmp(prevGroup, favList[i]->getGroup())) { if (prevGroup && g_Options.bUseColumns) { szMenu.cx += szColumn.cx; szMenu.cy = max(szMenu.cy, szColumn.cy); diff --git a/plugins/FavContacts/src/services.cpp b/plugins/FavContacts/src/services.cpp index fce6dffea0..4ae06077e1 100644 --- a/plugins/FavContacts/src/services.cpp +++ b/plugins/FavContacts/src/services.cpp @@ -82,7 +82,7 @@ int ProcessSrmmEvent(WPARAM wParam, LPARAM lParam) int ProcessSrmmIconClick(WPARAM hContact, LPARAM lParam) { StatusIconClickData *sicd = (StatusIconClickData *)lParam; - if (lstrcmpA(sicd->szModule, "FavContacts")) return 0; + if (mir_strcmp(sicd->szModule, "FavContacts")) return 0; if (!hContact) return 0; diff --git a/plugins/FileAsMessage/src/dialog.cpp b/plugins/FileAsMessage/src/dialog.cpp index 5af8b3603d..6e5bdbe79b 100644 --- a/plugins/FileAsMessage/src/dialog.cpp +++ b/plugins/FileAsMessage/src/dialog.cpp @@ -75,7 +75,7 @@ static int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM { if((lpcle = (CLISTEVENT*)CallService(MS_CLIST_GETEVENT, hContact, indx)) == NULL) break; - if(lstrcmp(lpcle->pszService, SERVICE_NAME "/FERecvFile") == 0) + if(mir_tstrcmp(lpcle->pszService, SERVICE_NAME "/FERecvFile") == 0) { lpcle->lParam = (LPARAM)hWnd; break; diff --git a/plugins/FloatingContacts/src/bitmap_funcs.cpp b/plugins/FloatingContacts/src/bitmap_funcs.cpp index 05d74ff974..c585be916f 100644 --- a/plugins/FloatingContacts/src/bitmap_funcs.cpp +++ b/plugins/FloatingContacts/src/bitmap_funcs.cpp @@ -1164,7 +1164,7 @@ bool MyBitmap::loadFromFile(const char *fn, const char *fnAlpha) { char ext[5]; memcpy(ext,fn+(strlen(fn)-4),5); - if (!lstrcmpiA(ext,".png")) + if (!mir_strcmpi(ext,".png")) { return loadFromFile_png(fn, fnAlpha); } else diff --git a/plugins/GmailNotifier/src/notify.cpp b/plugins/GmailNotifier/src/notify.cpp index cf6cb8b06e..fb4609f65f 100644 --- a/plugins/GmailNotifier/src/notify.cpp +++ b/plugins/GmailNotifier/src/notify.cpp @@ -3,7 +3,7 @@ int OpenBrowser(WPARAM hContact, LPARAM lParam) { char *proto = GetContactProto(hContact); - if (proto && !lstrcmpA(proto, pluginName)) { + if (proto && !mir_strcmp(proto, pluginName)) { Account *curAcc = GetAccountByContact(hContact); PUDeletePopup(curAcc->popUpHwnd); CallServiceSync(MS_CLIST_REMOVEEVENT, (WPARAM)curAcc->hContact, (LPARAM)1); diff --git a/plugins/GmailNotifier/src/options.cpp b/plugins/GmailNotifier/src/options.cpp index b03a442c96..c031563754 100644 --- a/plugins/GmailNotifier/src/options.cpp +++ b/plugins/GmailNotifier/src/options.cpp @@ -165,7 +165,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case IDC_BTNSAV: if (GetDlgItemTextA(hwndDlg, IDC_NAME, acc[curIndex].name, SIZEOF(acc[curIndex].name))) { tail = strstr(acc[curIndex].name, "@"); - if (tail && lstrcmpA(tail + 1, "gmail.com") != 0) + if (tail && mir_strcmp(tail + 1, "gmail.com") != 0) mir_strcpy(acc[curIndex].hosted, tail + 1); SendMessageA(hwndCombo, CB_DELETESTRING, curIndex, 0); SendMessageA(hwndCombo, CB_INSERTSTRING, curIndex, (LONG_PTR)acc[curIndex].name); diff --git a/plugins/GmailNotifier/src/utility.cpp b/plugins/GmailNotifier/src/utility.cpp index 19156366fd..0cd72e28a6 100644 --- a/plugins/GmailNotifier/src/utility.cpp +++ b/plugins/GmailNotifier/src/utility.cpp @@ -24,7 +24,7 @@ void BuildList(void) for (int i = 0; i < acc_num; i++) { char *tail = strchr(acc[i].name, '@'); - if (tail && lstrcmpA(tail + 1, "gmail.com") != 0) + if (tail && mir_strcmp(tail + 1, "gmail.com") != 0) mir_strcpy(acc[i].hosted, tail + 1); acc[i].IsChecking = FALSE; } diff --git a/plugins/HistorySweeperLight/src/main.cpp b/plugins/HistorySweeperLight/src/main.cpp index 4af28a0d93..5533f35eda 100644 --- a/plugins/HistorySweeperLight/src/main.cpp +++ b/plugins/HistorySweeperLight/src/main.cpp @@ -52,7 +52,7 @@ int OnIconPressed(WPARAM hContact, LPARAM lParam) { StatusIconClickData *sicd = (StatusIconClickData *)lParam; - if (!(sicd->flags & MBCF_RIGHTBUTTON) && !lstrcmpA(sicd->szModule, ModuleName) && db_get_b(NULL, ModuleName, "ChangeInMW", 0)) { + if (!(sicd->flags & MBCF_RIGHTBUTTON) && !mir_strcmp(sicd->szModule, ModuleName) && db_get_b(NULL, ModuleName, "ChangeInMW", 0)) { int nh = sicd->dwId; StatusIconData sid = { sizeof(sid) }; diff --git a/plugins/HistorySweeperLight/src/options.cpp b/plugins/HistorySweeperLight/src/options.cpp index a7568c304d..8970fe672c 100644 --- a/plugins/HistorySweeperLight/src/options.cpp +++ b/plugins/HistorySweeperLight/src/options.cpp @@ -69,7 +69,7 @@ HICON LoadIconEx(const char* name) HANDLE GetIconHandle(const char* name) { for (int i = 0; i < SIZEOF(iconList); i++) - if (lstrcmpA(iconList[i].szName, name) == 0) + if (mir_strcmp(iconList[i].szName, name) == 0) return hIconLibItem[i]; return NULL; diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp index 0e2e5ce0be..f3d754766f 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.cpp +++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp @@ -63,7 +63,7 @@ char* TemplateHTMLBuilder::getAvatar(MCONTACT hContact, const char *szProto) if (!db_get_ts(hContact, "ContactPhoto", "File", &dbv)) { if (_tcslen(dbv.ptszVal) > 0) { TCHAR *ext = _tcsrchr(dbv.ptszVal, '.'); - if (ext && lstrcmpi(ext, _T(".xml")) == 0) + if (ext && mir_tstrcmpi(ext, _T(".xml")) == 0) result = (TCHAR*)getFlashAvatar(dbv.ptszVal, (hContact == NULL) ? 1 : 0); else { if (result == NULL) { diff --git a/plugins/IgnoreState/src/main.cpp b/plugins/IgnoreState/src/main.cpp index 3f46a7856b..e88d4aa31b 100644 --- a/plugins/IgnoreState/src/main.cpp +++ b/plugins/IgnoreState/src/main.cpp @@ -146,11 +146,11 @@ int onContactSettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if ( !lstrcmpA(cws->szModule, "Ignore") && !lstrcmpA(cws->szSetting, "Mask1")) + if ( !mir_strcmp(cws->szModule, "Ignore") && !mir_strcmp(cws->szSetting, "Mask1")) applyExtraImage(hContact); else if (hContact == 0) { - if (( !lstrcmpA(cws->szModule, MODULENAME) && !lstrcmpA(cws->szSetting, "Filter")) || - (bUseMirandaSettings && !lstrcmpA(cws->szModule, "Ignore") && !lstrcmpA(cws->szSetting, "Default1"))) + if (( !mir_strcmp(cws->szModule, MODULENAME) && !mir_strcmp(cws->szSetting, "Filter")) || + (bUseMirandaSettings && !mir_strcmp(cws->szModule, "Ignore") && !mir_strcmp(cws->szSetting, "Default1"))) { fill_filter(); } diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index 9061969c68..9caea5cd99 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -174,7 +174,7 @@ struct compareFunc : std::binary_functioncbSize != lti2->cbSize) return FALSE; - return lstrcmpi(lti1->ptszArtist, lti2->ptszArtist) == 0 - && lstrcmpi(lti1->ptszAlbum, lti2->ptszAlbum) == 0 - && lstrcmpi(lti1->ptszTitle, lti2->ptszTitle) == 0 - && lstrcmpi(lti1->ptszTrack, lti2->ptszTrack) == 0 - && lstrcmpi(lti1->ptszYear, lti2->ptszYear) == 0 - && lstrcmpi(lti1->ptszGenre, lti2->ptszGenre) == 0 - && lstrcmpi(lti1->ptszLength, lti2->ptszLength) == 0 - && lstrcmpi(lti1->ptszPlayer, lti2->ptszPlayer) == 0 - && lstrcmpi(lti1->ptszType, lti2->ptszType) == 0; + return mir_tstrcmpi(lti1->ptszArtist, lti2->ptszArtist) == 0 + && mir_tstrcmpi(lti1->ptszAlbum, lti2->ptszAlbum) == 0 + && mir_tstrcmpi(lti1->ptszTitle, lti2->ptszTitle) == 0 + && mir_tstrcmpi(lti1->ptszTrack, lti2->ptszTrack) == 0 + && mir_tstrcmpi(lti1->ptszYear, lti2->ptszYear) == 0 + && mir_tstrcmpi(lti1->ptszGenre, lti2->ptszGenre) == 0 + && mir_tstrcmpi(lti1->ptszLength, lti2->ptszLength) == 0 + && mir_tstrcmpi(lti1->ptszPlayer, lti2->ptszPlayer) == 0 + && mir_tstrcmpi(lti1->ptszType, lti2->ptszType) == 0; } diff --git a/plugins/ListeningTo/src/options.cpp b/plugins/ListeningTo/src/options.cpp index c3ee3a0059..c83109c958 100644 --- a/plugins/ListeningTo/src/options.cpp +++ b/plugins/ListeningTo/src/options.cpp @@ -135,11 +135,11 @@ BOOL IsTypeEnabled(LISTENINGTOINFO *lti) if (lti->dwFlags & LTI_UNICODE) { - if (lstrcmpi(lti->ptszType, LPGENT("Music")) == 0) + if (mir_tstrcmpi(lti->ptszType, LPGENT("Music")) == 0) return opts.enable_music; - if (lstrcmpi(lti->ptszType, LPGENT("Radio")) == 0) + if (mir_tstrcmpi(lti->ptszType, LPGENT("Radio")) == 0) return opts.enable_radio; - if (lstrcmpi(lti->ptszType, LPGENT("Video")) == 0) + if (mir_tstrcmpi(lti->ptszType, LPGENT("Video")) == 0) return opts.enable_video; return opts.enable_others; } diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index a6708aabca..4eec8a98c1 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -262,7 +262,7 @@ void CopyToClipboard(HWND hwnd,LPSTR pszMsg, LPTSTR ptszMsg) BOOL isMetaContact(MCONTACT hContact) { char *proto = GetContactProto(hContact); - if (lstrcmpA(proto, META_PROTO) == 0) + if (mir_strcmp(proto, META_PROTO) == 0) return TRUE; return FALSE; diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index 1e50d9fbc4..9ca5594c6b 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -1801,10 +1801,10 @@ int CAppletManager::HookSettingChanged(WPARAM hContact,LPARAM lParam) CEvent Event; Event.hContact = hContact; - if(!lstrcmpA(dbcws->szSetting,"Nick") || !lstrcmpA(dbcws->szSetting,"MyHandle")) { + if(!mir_strcmp(dbcws->szSetting,"Nick") || !mir_strcmp(dbcws->szSetting,"MyHandle")) { DBVARIANT dbv={0}; // if the protocol nick has changed, check if a custom handle is set - if(!lstrcmpA(dbcws->szSetting,"Nick")) { + if(!mir_strcmp(dbcws->szSetting,"Nick")) { if (!db_get_ts(Event.hContact, "CList", "MyHandle", &dbv)) { // handle found, ignore this event if(dbv.pszVal && strlen(dbv.pszVal)>0) @@ -1828,12 +1828,12 @@ int CAppletManager::HookSettingChanged(WPARAM hContact,LPARAM lParam) db_free(&dbv); } } - else if(!lstrcmpA(dbcws->szModule,"CList")) { - if(!lstrcmpA(dbcws->szSetting,"Hidden")) { + else if(!mir_strcmp(dbcws->szModule,"CList")) { + if(!mir_strcmp(dbcws->szSetting,"Hidden")) { Event.eType = EVENT_CONTACT_HIDDEN; Event.iValue = db_get_b(hContact,"CList","Hidden",0); } - else if(!lstrcmpA(dbcws->szSetting,"Group")) { + else if(!mir_strcmp(dbcws->szSetting,"Group")) { Event.eType = EVENT_CONTACT_GROUP; DBVARIANT dbv; int res = db_get_ts(hContact, "CList", "Group", &dbv); diff --git a/plugins/MobileState/src/main.cpp b/plugins/MobileState/src/main.cpp index c78672e85a..98c5f1b1ea 100644 --- a/plugins/MobileState/src/main.cpp +++ b/plugins/MobileState/src/main.cpp @@ -86,8 +86,8 @@ int onContactSettingChanged(WPARAM wParam,LPARAM lParam) if (!proto) return 0; - if (!lstrcmpA(cws->szModule,proto)) - if (!lstrcmpA(cws->szSetting, "MirVer")) + if (!mir_strcmp(cws->szModule,proto)) + if (!mir_strcmp(cws->szSetting, "MirVer")) ExtraIconsApply(wParam, 1); return 0; diff --git a/plugins/ModernOpt/src/modernopt.cpp b/plugins/ModernOpt/src/modernopt.cpp index da85a22ad9..9d696e30b6 100644 --- a/plugins/ModernOpt/src/modernopt.cpp +++ b/plugins/ModernOpt/src/modernopt.cpp @@ -121,7 +121,7 @@ static int ModernOptionsObject_Comparator(const ModernOptionsObject *ptr1, const if (obj1->optObject.lptzSubsection && obj2->optObject.lptzSubsection) { - int c = lstrcmp(obj1->optObject.lptzSubsection, obj2->optObject.lptzSubsection); + int c = mir_tstrcmp(obj1->optObject.lptzSubsection, obj2->optObject.lptzSubsection); if (c) return c; } @@ -378,7 +378,7 @@ static int lstrcmp_null(TCHAR *p1, TCHAR *p2) if (!p1 && !p2) return 0; if (!p1) return -1; if (!p2) return 1; - return lstrcmp(p1, p2); + return mir_tstrcmp(p1, p2); } static void ModernOptUI_ShowPage(HWND hwndDlg, struct ModernOptionsData *dat, int iPage) diff --git a/plugins/ModernOpt/src/mopt_selector.cpp b/plugins/ModernOpt/src/mopt_selector.cpp index 0c923acfcb..ce5145cfa9 100644 --- a/plugins/ModernOpt/src/mopt_selector.cpp +++ b/plugins/ModernOpt/src/mopt_selector.cpp @@ -129,7 +129,7 @@ struct TSelectorData static bool CheckExt(TCHAR *fn, TCHAR *ext, int n) { int l = mir_tstrlen(fn); - return (l > n) && !lstrcmp(fn + l - n, ext); + return (l > n) && !mir_tstrcmp(fn + l - n, ext); } static void BuildSkinList(HWND hwndList, TCHAR *szExt, int nExtLength = -1, bool start = true) @@ -148,7 +148,7 @@ static void BuildSkinList(HWND hwndList, TCHAR *szExt, int nExtLength = -1, bool HANDLE h = FindFirstFile(_T("*.*"), &ffd); if (h != INVALID_HANDLE_VALUE) { do { - if (!lstrcmp(ffd.cFileName, _T("")) || !lstrcmp(ffd.cFileName, _T(".")) || !lstrcmp(ffd.cFileName, _T(".."))) + if (!mir_tstrcmp(ffd.cFileName, _T("")) || !mir_tstrcmp(ffd.cFileName, _T(".")) || !mir_tstrcmp(ffd.cFileName, _T(".."))) continue; if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { @@ -315,7 +315,7 @@ INT_PTR CALLBACK ModernOptSelector_DlgProc(HWND hwndDlg, UINT msg, WPARAM wPara int cxIcon = GetSystemMetrics(SM_CXSMICON); int cyIcon = GetSystemMetrics(SM_CYSMICON); - if (sd->active && !lstrcmp(sd->active, dat->filename)) { + if (sd->active && !mir_tstrcmp(sd->active, dat->filename)) { DrawIconEx(lps->hDC, lps->rcItem.left, (lps->rcItem.top+lps->rcItem.bottom-cyIcon)/2, LoadSkinnedIcon(SKINICON_OTHER_EMPTYBLOB), cxIcon, cyIcon, 0, NULL, DI_NORMAL); diff --git a/plugins/MsgPopup/src/main.cpp b/plugins/MsgPopup/src/main.cpp index 035db49c93..ce936d1c61 100644 --- a/plugins/MsgPopup/src/main.cpp +++ b/plugins/MsgPopup/src/main.cpp @@ -121,7 +121,7 @@ void HookOnImport(HMODULE hModule, char *lpszImpModName, DWORD lpOrigFunc, DWORD { char *pszModName = (char *)((PBYTE)hModule + pImportDesc->Name); - if (lstrcmpiA(lpszImpModName, pszModName) == 0) + if (mir_strcmpi(lpszImpModName, pszModName) == 0) { PIMAGE_THUNK_DATA pThunk = (PIMAGE_THUNK_DATA)((PBYTE)hModule + pImportDesc->FirstThunk); diff --git a/plugins/MyDetails/src/data.cpp b/plugins/MyDetails/src/data.cpp index 85eba40907..ca7c6069d9 100644 --- a/plugins/MyDetails/src/data.cpp +++ b/plugins/MyDetails/src/data.cpp @@ -86,7 +86,7 @@ Protocol::~Protocol() void Protocol::lcopystr(TCHAR *dest, TCHAR *src, size_t maxlen) { - if (lstrcmp(dest, src) != 0) { + if (mir_tstrcmp(dest, src) != 0) { data_changed = true; mir_tstrncpy(dest, src, (DWORD)maxlen); } diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index 595df755f0..f5a43e8753 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -473,18 +473,18 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) ARGUMENTSINFO *ai = (ARGUMENTSINFO*)lParam; ai->flags = AIF_DONTPARSE; TCString Result; - if (!lstrcmp(ai->targv[0], VAR_AWAYSINCE_TIME)) { + if (!mir_tstrcmp(ai->targv[0], VAR_AWAYSINCE_TIME)) { GetTimeFormat(LOCALE_USER_DEFAULT, 0, g_ProtoStates[VarParseData.szProto].AwaySince, (ai->argc > 1 && *ai->targv[1]) ? ai->targv[1] : _T("H:mm"), Result.GetBuffer(256), 256); Result.ReleaseBuffer(); } - else if (!lstrcmp(ai->targv[0], VAR_AWAYSINCE_DATE)) { + else if (!mir_tstrcmp(ai->targv[0], VAR_AWAYSINCE_DATE)) { GetDateFormat(LOCALE_USER_DEFAULT, 0, g_ProtoStates[VarParseData.szProto].AwaySince, (ai->argc > 1 && *ai->targv[1]) ? ai->targv[1] : NULL, Result.GetBuffer(256), 256); Result.ReleaseBuffer(); } - else if (!lstrcmp(ai->targv[0], VAR_STATDESC)) { + else if (!mir_tstrcmp(ai->targv[0], VAR_STATDESC)) { Result = (VarParseData.Flags & VPF_XSTATUS) ? STR_XSTATUSDESC : pcli->pfnGetStatusModeDescription(g_ProtoStates[VarParseData.szProto].Status, 0); } - else if (!lstrcmp(ai->targv[0], VAR_MYNICK)) { + else if (!mir_tstrcmp(ai->targv[0], VAR_MYNICK)) { if (g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_MYNICKPERPROTO) && VarParseData.szProto) Result = db_get_s(NULL, VarParseData.szProto, "Nick", (TCHAR*)NULL); @@ -494,15 +494,15 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) if (Result == NULL) Result = TranslateT("Stranger"); } - else if (!lstrcmp(ai->targv[0], VAR_REQUESTCOUNT)) { + else if (!mir_tstrcmp(ai->targv[0], VAR_REQUESTCOUNT)) { mir_sntprintf(Result.GetBuffer(16), 16, _T("%d"), db_get_w(ai->fi->hContact, MOD_NAME, DB_REQUESTCOUNT, 0)); Result.ReleaseBuffer(); } - else if (!lstrcmp(ai->targv[0], VAR_MESSAGENUM)) { + else if (!mir_tstrcmp(ai->targv[0], VAR_MESSAGENUM)) { mir_sntprintf(Result.GetBuffer(16), 16, _T("%d"), db_get_w(ai->fi->hContact, MOD_NAME, DB_MESSAGECOUNT, 0)); Result.ReleaseBuffer(); } - else if (!lstrcmp(ai->targv[0], VAR_TIMEPASSED)) { + else if (!mir_tstrcmp(ai->targv[0], VAR_TIMEPASSED)) { ULARGE_INTEGER ul_AwaySince, ul_Now; SYSTEMTIME st; GetLocalTime(&st); @@ -519,7 +519,7 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) mir_sntprintf(Result, 256, TranslateT("%d seconds"), ul_Now.LowPart); Result.ReleaseBuffer(); } - else if (!lstrcmp(ai->targv[0], VAR_PREDEFINEDMESSAGE)) { + else if (!mir_tstrcmp(ai->targv[0], VAR_PREDEFINEDMESSAGE)) { ai->flags = 0; // reset AIF_DONTPARSE flag if (ai->argc != 2) return NULL; @@ -537,7 +537,7 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam) if (Result == NULL) // if we didn't find a message with specified title return NULL; // return it now, as later we change NULL to "" } - else if (!lstrcmp(ai->targv[0], VAR_PROTOCOL)) { + else if (!mir_tstrcmp(ai->targv[0], VAR_PROTOCOL)) { if (VarParseData.szProto) { CString AnsiResult; CallProtoService(VarParseData.szProto, PS_GETNAME, 256, (LPARAM)AnsiResult.GetBuffer(256)); diff --git a/plugins/NewAwaySysMod/src/CString.h b/plugins/NewAwaySysMod/src/CString.h index 161977cf28..b2a1c4accf 100644 --- a/plugins/NewAwaySysMod/src/CString.h +++ b/plugins/NewAwaySysMod/src/CString.h @@ -31,8 +31,8 @@ __inline int My_lstrlen(LPCSTR lpString) {return mir_strlen(lpString);} __inline int My_lstrlen(LPCWSTR lpString) {return mir_wstrlen(lpString);} -__inline int My_lstrcmp(LPCSTR lpString1, LPCSTR lpString2) {return lstrcmpA(lpString1, lpString2);} -__inline int My_lstrcmp(LPCWSTR lpString1, LPCWSTR lpString2) {return lstrcmpW(lpString1, lpString2);} +__inline int My_lstrcmp(LPCSTR lpString1, LPCSTR lpString2) {return mir_strcmp(lpString1, lpString2);} +__inline int My_lstrcmp(LPCWSTR lpString1, LPCWSTR lpString2) {return mir_wstrcmp(lpString1, lpString2);} __inline LPCSTR My_strstr(LPCSTR lpString1, LPCSTR lpString2) {return strstr(lpString1, lpString2);} __inline LPWSTR My_strstr(LPCWSTR lpString1, LPCWSTR lpString2) {return (LPWSTR)wcsstr(lpString1, lpString2);} __inline LPSTR My_lstrcpy(LPSTR lpString1, LPCSTR lpString2) {return mir_strcpy(lpString1, lpString2);} diff --git a/plugins/NewAwaySysMod/src/ContactList.cpp b/plugins/NewAwaySysMod/src/ContactList.cpp index 48248a6764..bc1fabe341 100644 --- a/plugins/NewAwaySysMod/src/ContactList.cpp +++ b/plugins/NewAwaySysMod/src/ContactList.cpp @@ -390,7 +390,7 @@ int GroupEnum(const char *szSetting, LPARAM lParam) { sGroupEnumData *GroupEnumData = (sGroupEnumData*)lParam; TCString GroupName = db_get_s(NULL, "CListGroups", szSetting, _T(" ")); - if (!lstrcmp(GroupEnumData->GroupName, &GroupName[1])) + if (!mir_tstrcmp(GroupEnumData->GroupName, &GroupName[1])) GroupEnumData->hGroup = (HANDLE)(atol(szSetting) | HCONTACT_ISGROUP); return 0; } diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp index 420e0df05f..c62d050c75 100644 --- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp +++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp @@ -164,7 +164,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam) } // ugly workaround for metacontacts, part i; store all metacontacts' events to a temporary array, so we'll be able to get the 'source' protocol when subcontact event happens later. we need the protocol to get its status and per-status settings properly - if (!lstrcmpA(szProto, META_PROTO)) { + if (!mir_strcmp(szProto, META_PROTO)) { // remove outdated events first DWORD CurTime = time(NULL); for (int i = MetacontactEvents.GetSize() - 1; i >= 0; i--) diff --git a/plugins/NewAwaySysMod/src/Properties.cpp b/plugins/NewAwaySysMod/src/Properties.cpp index ce7adf0ebd..74b21baf71 100644 --- a/plugins/NewAwaySysMod/src/Properties.cpp +++ b/plugins/NewAwaySysMod/src/Properties.cpp @@ -37,7 +37,7 @@ void ResetSettingsOnStatusChange(const char *szProto = NULL, int bResetPersonalM MCONTACT hContact = db_find_first(); while (hContact) { const char *szCurProto; - if (!szProto || ((szCurProto = GetContactProto(hContact)) && !lstrcmpA(szProto, szCurProto))) { + if (!szProto || ((szCurProto = GetContactProto(hContact)) && !mir_strcmp(szProto, szCurProto))) { ResetContactSettingsOnStatusChange(hContact); if (bResetPersonalMsgs) { CContactSettings(Status, hContact).SetMsgFormat(SMF_PERSONAL, NULL); // TODO: delete only when SAM dialog opens? diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp index 8c6e7c8e43..c774f5480c 100644 --- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp +++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp @@ -996,7 +996,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA while (hItem = CList->GetNextItem(MCLGN_NEXT | MCLGN_CONTACT | MCLGN_INFO | MCLGN_MULTILEVEL, hItem)) { if (CList->GetItemType(hItem) == MCLCIT_INFO) { char *szProto = (char*)CList->GetItemParam(hItem); - if (!wParam || !lstrcmpA(szProto, (char*)wParam)) { + if (!wParam || !mir_strcmp(szProto, (char*)wParam)) { CList->SetInfoIcon(hItem, LoadSkinnedProtoIcon(szProto, g_ProtoStates[szProto].Status)); } } diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 9a3d42a52f..d366d209ea 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -151,16 +151,16 @@ static int CompareStatusMsg(STATUSMSGINFO *smi, DBCONTACTWRITESETTING *cws_new, ret = COMPARE_DEL; } else if (dbv_old.type != cws_new->value.type) - ret = (lstrcmpW(smi->newstatusmsg, smi->oldstatusmsg) ? CheckStrW(smi->newstatusmsg, COMPARE_DIFF, COMPARE_DEL) : COMPARE_SAME); + ret = (mir_wstrcmp(smi->newstatusmsg, smi->oldstatusmsg) ? CheckStrW(smi->newstatusmsg, COMPARE_DIFF, COMPARE_DEL) : COMPARE_SAME); else if (dbv_old.type == DBVT_ASCIIZ) - ret = (lstrcmpA(cws_new->value.pszVal, dbv_old.pszVal) ? CheckStr(cws_new->value.pszVal, COMPARE_DIFF, COMPARE_DEL) : COMPARE_SAME); + ret = (mir_strcmp(cws_new->value.pszVal, dbv_old.pszVal) ? CheckStr(cws_new->value.pszVal, COMPARE_DIFF, COMPARE_DEL) : COMPARE_SAME); else if (dbv_old.type == DBVT_UTF8) - ret = (lstrcmpA(cws_new->value.pszVal, dbv_old.pszVal) ? CheckStr(cws_new->value.pszVal, COMPARE_DIFF, COMPARE_DEL) : COMPARE_SAME); + ret = (mir_strcmp(cws_new->value.pszVal, dbv_old.pszVal) ? CheckStr(cws_new->value.pszVal, COMPARE_DIFF, COMPARE_DEL) : COMPARE_SAME); else if (dbv_old.type == DBVT_WCHAR) - ret = (lstrcmpW(cws_new->value.pwszVal, dbv_old.pwszVal) ? CheckStrW(cws_new->value.pwszVal, COMPARE_DIFF, COMPARE_DEL) : COMPARE_SAME); + ret = (mir_wstrcmp(cws_new->value.pwszVal, dbv_old.pwszVal) ? CheckStrW(cws_new->value.pwszVal, COMPARE_DIFF, COMPARE_DEL) : COMPARE_SAME); db_free(&dbv_old); } diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp index deeb313f48..acd2291594 100644 --- a/plugins/NewsAggregator/Src/CheckFeed.cpp +++ b/plugins/NewsAggregator/Src/CheckFeed.cpp @@ -35,17 +35,17 @@ TCHAR* CheckFeed(TCHAR *tszURL, HWND hwndDlg) if (hXml != NULL) { int childcount = 0; HXML node; - if (!lstrcmpi(xi.getName(hXml), _T("xml"))) + if (!mir_tstrcmpi(xi.getName(hXml), _T("xml"))) node = xi.getChild(hXml, childcount); else node = hXml; while (node) { LPCTSTR szNodeName = xi.getName(node); - if (!lstrcmpi(szNodeName, _T("rss")) || !lstrcmpi(szNodeName, _T("rdf"))) { + if (!mir_tstrcmpi(szNodeName, _T("rss")) || !mir_tstrcmpi(szNodeName, _T("rdf"))) { HXML chan = xi.getChild(node, 0); for (int j = 0; j < xi.getChildCount(chan); j++) { HXML child = xi.getChild(chan, j); - if (!lstrcmpi(xi.getName(child), _T("title"))) { + if (!mir_tstrcmpi(xi.getName(child), _T("title"))) { TCHAR mes[MAX_PATH]; mir_sntprintf(mes, SIZEOF(mes), TranslateT("%s\nis a valid feed's address."), tszURL); MessageBox(hwndDlg, mes, TranslateT("News Aggregator"), MB_OK | MB_ICONINFORMATION); @@ -54,10 +54,10 @@ TCHAR* CheckFeed(TCHAR *tszURL, HWND hwndDlg) } } } - else if (!lstrcmpi(szNodeName, _T("feed"))) { + else if (!mir_tstrcmpi(szNodeName, _T("feed"))) { for (int j = 0; j < xi.getChildCount(node); j++) { HXML child = xi.getChild(node, j); - if (!lstrcmpi(xi.getName(child), _T("title"))) { + if (!mir_tstrcmpi(xi.getName(child), _T("title"))) { TCHAR mes[MAX_PATH]; mir_sntprintf(mes, SIZEOF(mes), TranslateT("%s\nis a valid feed's address."), tszURL); MessageBox(hwndDlg, mes, TranslateT("News Aggregator"), MB_OK | MB_ICONINFORMATION); @@ -140,7 +140,7 @@ static void XmlToMsg(MCONTACT hContact, CMString &title, CMString &link, CMStrin if (olddbei.timestamp < (DWORD)stamp) break; - if (strlen((char*)olddbei.pBlob) == cbOrigLen && !lstrcmpA((char*)olddbei.pBlob, pszTemp)) { + if (strlen((char*)olddbei.pBlob) == cbOrigLen && !mir_strcmp((char*)olddbei.pBlob, pszTemp)) { MesExist = true; break; } @@ -186,18 +186,18 @@ void CheckCurrentFeed(MCONTACT hContact) if (hXml != NULL) { int childcount = 0; HXML node; - if (!lstrcmpi(xi.getName(hXml), _T("xml"))) + if (!mir_tstrcmpi(xi.getName(hXml), _T("xml"))) node = xi.getChild(hXml, childcount); else node = hXml; while (node) { LPCTSTR szNodeName = xi.getName(node); - bool isRSS = !lstrcmpi(szNodeName, _T("rss")), isAtom = !lstrcmpi(szNodeName, _T("rdf")); + bool isRSS = !mir_tstrcmpi(szNodeName, _T("rss")), isAtom = !mir_tstrcmpi(szNodeName, _T("rdf")); if (isRSS || isAtom) { if (isRSS) { for (int i = 0; i < xi.getAttrCount(node); i++) { LPCTSTR szAttrName = xi.getAttrName(node, i); - if (!lstrcmpi(szAttrName, _T("version"))) { + if (!mir_tstrcmpi(szAttrName, _T("version"))) { TCHAR ver[MAX_PATH]; mir_sntprintf(ver, SIZEOF(ver), _T("RSS %s"), xi.getAttrValue(node, szAttrName)); db_set_ts(hContact, MODULE, "MirVer", ver); @@ -212,17 +212,17 @@ void CheckCurrentFeed(MCONTACT hContact) for (int j = 0; j < xi.getChildCount(chan); j++) { HXML child = xi.getChild(chan, j); LPCTSTR childName = xi.getName(child); - if (!lstrcmpi(childName, _T("title"))) { + if (!mir_tstrcmpi(childName, _T("title"))) { LPCTSTR szChildText = xi.getText(child); if (szChildText) db_set_ts(hContact, MODULE, "FirstName", ClearText(szValue, szChildText)); } - else if (!lstrcmpi(childName, _T("link"))) { + else if (!mir_tstrcmpi(childName, _T("link"))) { LPCTSTR szChildText = xi.getText(child); if (szChildText) db_set_ts(hContact, MODULE, "Homepage", ClearText(szValue, szChildText)); } - else if (!lstrcmpi(childName, _T("description"))) { + else if (!mir_tstrcmpi(childName, _T("description"))) { LPCTSTR szChildText = xi.getText(child); if (szChildText) { ClearText(szValue, szChildText); @@ -230,30 +230,30 @@ void CheckCurrentFeed(MCONTACT hContact) db_set_ts(hContact, "CList", "StatusMsg", szValue); } } - else if (!lstrcmpi(childName, _T("language"))) { + else if (!mir_tstrcmpi(childName, _T("language"))) { LPCTSTR szChildText = xi.getText(child); if (szChildText) db_set_ts(hContact, MODULE, "Language1", ClearText(szValue, szChildText)); } - else if (!lstrcmpi(childName, _T("managingEditor"))) { + else if (!mir_tstrcmpi(childName, _T("managingEditor"))) { LPCTSTR szChildText = xi.getText(child); if (szChildText) db_set_ts(hContact, MODULE, "e-mail", ClearText(szValue, szChildText)); } - else if (!lstrcmpi(childName, _T("category"))) { + else if (!mir_tstrcmpi(childName, _T("category"))) { LPCTSTR szChildText = xi.getText(child); if (szChildText) db_set_ts(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText)); } - else if (!lstrcmpi(childName, _T("copyright"))) { + else if (!mir_tstrcmpi(childName, _T("copyright"))) { LPCTSTR szChildText = xi.getText(child); if (szChildText) db_set_s(hContact, "UserInfo", "MyNotes", _T2A(ClearText(szValue, szChildText))); } - else if (!lstrcmpi(childName, _T("image"))) { + else if (!mir_tstrcmpi(childName, _T("image"))) { for (int x = 0; x < xi.getChildCount(child); x++) { HXML imageval = xi.getChild(child, x); - if (!lstrcmpi(xi.getName(imageval), _T("url"))) { + if (!mir_tstrcmpi(xi.getName(imageval), _T("url"))) { LPCTSTR url = xi.getText(imageval); db_set_ts(hContact, MODULE, "ImageURL", url); @@ -281,7 +281,7 @@ void CheckCurrentFeed(MCONTACT hContact) } } } - else if (!lstrcmpi(childName, _T("lastBuildDate"))) { + else if (!mir_tstrcmpi(childName, _T("lastBuildDate"))) { LPCTSTR szChildText = xi.getText(child); if (szChildText) { TCHAR *lastupdtime = (TCHAR *)xi.getText(child); @@ -295,36 +295,36 @@ void CheckCurrentFeed(MCONTACT hContact) } } } - else if (!lstrcmpi(childName, _T("item"))) { + else if (!mir_tstrcmpi(childName, _T("item"))) { CMString title, link, descr, author, comments, guid, category; time_t stamp = 0; for (int z = 0; z < xi.getChildCount(child); z++) { HXML itemval = xi.getChild(child, z); LPCTSTR itemName = xi.getName(itemval); // We only use the first tag for now and ignore the rest. - if (!lstrcmpi(itemName, _T("title"))) + if (!mir_tstrcmpi(itemName, _T("title"))) ClearText(title, xi.getText(itemval)); - else if (!lstrcmpi(itemName, _T("link"))) + else if (!mir_tstrcmpi(itemName, _T("link"))) ClearText(link, xi.getText(itemval)); - else if (!lstrcmpi(itemName, _T("pubDate")) || !lstrcmpi(itemName, _T("date"))) { + else if (!mir_tstrcmpi(itemName, _T("pubDate")) || !mir_tstrcmpi(itemName, _T("date"))) { if (stamp == 0) stamp = DateToUnixTime(xi.getText(itemval), 0); } - else if (!lstrcmpi(itemName, _T("description")) || !lstrcmpi(itemName, _T("encoded"))) + else if (!mir_tstrcmpi(itemName, _T("description")) || !mir_tstrcmpi(itemName, _T("encoded"))) ClearText(descr, xi.getText(itemval)); - else if (!lstrcmpi(itemName, _T("author")) || !lstrcmpi(itemName, _T("creator"))) + else if (!mir_tstrcmpi(itemName, _T("author")) || !mir_tstrcmpi(itemName, _T("creator"))) ClearText(author, xi.getText(itemval)); - else if (!lstrcmpi(itemName, _T("comments"))) + else if (!mir_tstrcmpi(itemName, _T("comments"))) ClearText(comments, xi.getText(itemval)); - else if (!lstrcmpi(itemName, _T("guid"))) + else if (!mir_tstrcmpi(itemName, _T("guid"))) ClearText(guid, xi.getText(itemval)); - else if (!lstrcmpi(itemName, _T("category"))) + else if (!mir_tstrcmpi(itemName, _T("category"))) ClearText(category, xi.getText(itemval)); } @@ -332,27 +332,27 @@ void CheckCurrentFeed(MCONTACT hContact) } } } - else if (!lstrcmpi(szNodeName, _T("feed"))) { + else if (!mir_tstrcmpi(szNodeName, _T("feed"))) { db_set_ts(hContact, MODULE, "MirVer", _T("Atom 3")); for (int j = 0; j < xi.getChildCount(node); j++) { HXML child = xi.getChild(node, j); LPCTSTR szChildName = xi.getName(child); - if (!lstrcmpi(szChildName, _T("title"))) { + if (!mir_tstrcmpi(szChildName, _T("title"))) { LPCTSTR szChildText = xi.getText(child); if (szChildText) db_set_ts(hContact, MODULE, "FirstName", ClearText(szValue, szChildText)); } - else if (!lstrcmpi(szChildName, _T("link"))) { + else if (!mir_tstrcmpi(szChildName, _T("link"))) { for (int x = 0; x < xi.getAttrCount(child); x++) { - if (!lstrcmpi(xi.getAttrName(child, x), _T("rel"))) - if (!lstrcmpi(xi.getAttrValue(child, xi.getAttrName(child, x)), _T("self"))) + if (!mir_tstrcmpi(xi.getAttrName(child, x), _T("rel"))) + if (!mir_tstrcmpi(xi.getAttrValue(child, xi.getAttrName(child, x)), _T("self"))) break; - if (!lstrcmpi(xi.getAttrName(child, x), _T("href"))) + if (!mir_tstrcmpi(xi.getAttrName(child, x), _T("href"))) db_set_ts(hContact, MODULE, "Homepage", xi.getAttrValue(child, xi.getAttrName(child, x))); } } - else if (!lstrcmpi(szChildName, _T("subtitle"))) { + else if (!mir_tstrcmpi(szChildName, _T("subtitle"))) { LPCTSTR szChildText = xi.getText(child); if (szChildText) { ClearText(szValue, szChildText); @@ -360,29 +360,29 @@ void CheckCurrentFeed(MCONTACT hContact) db_set_ts(hContact, "CList", "StatusMsg", szValue); } } - else if (!lstrcmpi(szChildName, _T("language"))) { + else if (!mir_tstrcmpi(szChildName, _T("language"))) { LPCTSTR szChildText = xi.getText(child); if (szChildText) db_set_ts(hContact, MODULE, "Language1", ClearText(szValue, szChildText)); } - else if (!lstrcmpi(szChildName, _T("author"))) { + else if (!mir_tstrcmpi(szChildName, _T("author"))) { for (int x = 0; x < xi.getChildCount(child); x++) { HXML authorval = xi.getChild(child, x); - if (!lstrcmpi(xi.getName(authorval), _T("email"))) { + if (!mir_tstrcmpi(xi.getName(authorval), _T("email"))) { db_set_ts(hContact, MODULE, "e-mail", xi.getText(authorval)); break; } } } - else if (!lstrcmpi(szChildName, _T("category"))) { + else if (!mir_tstrcmpi(szChildName, _T("category"))) { LPCTSTR szChildText = xi.getText(child); if (szChildText) db_set_ts(hContact, MODULE, "Interest0Text", ClearText(szValue, szChildText)); } - else if (!lstrcmpi(szChildName, _T("icon"))) { + else if (!mir_tstrcmpi(szChildName, _T("icon"))) { for (int x = 0; x < xi.getChildCount(child); x++) { HXML imageval = xi.getChild(child, x); - if (!lstrcmpi(xi.getName(imageval), _T("url"))) { + if (!mir_tstrcmpi(xi.getName(imageval), _T("url"))) { LPCTSTR url = xi.getText(imageval); db_set_ts(hContact, MODULE, "ImageURL", url); @@ -407,7 +407,7 @@ void CheckCurrentFeed(MCONTACT hContact) } } } - else if (!lstrcmpi(szChildName, _T("updated"))) { + else if (!mir_tstrcmpi(szChildName, _T("updated"))) { LPCTSTR szChildText = xi.getText(child); if (szChildText) { TCHAR *lastupdtime = (TCHAR *)szChildText; @@ -421,57 +421,57 @@ void CheckCurrentFeed(MCONTACT hContact) } } } - else if (!lstrcmpi(szChildName, _T("entry"))) { + else if (!mir_tstrcmpi(szChildName, _T("entry"))) { CMString title, link, descr, author, comments, guid, category; time_t stamp = 0; for (int z = 0; z < xi.getChildCount(child); z++) { HXML itemval = xi.getChild(child, z); LPCTSTR szItemName = xi.getName(itemval); - if (!lstrcmpi(szItemName, _T("title"))) { + if (!mir_tstrcmpi(szItemName, _T("title"))) { LPCTSTR szItemText = xi.getText(itemval); if (szItemText) ClearText(title, szItemText); } - else if (!lstrcmpi(szItemName, _T("link"))) { + else if (!mir_tstrcmpi(szItemName, _T("link"))) { for (int x = 0; x < xi.getAttrCount(itemval); x++) { - if (!lstrcmpi(xi.getAttrName(itemval, x), _T("href"))) { + if (!mir_tstrcmpi(xi.getAttrName(itemval, x), _T("href"))) { ClearText(link, xi.getAttrValue(itemval, xi.getAttrName(itemval, x))); break; } } } - else if (!lstrcmpi(szItemName, _T("updated"))) { + else if (!mir_tstrcmpi(szItemName, _T("updated"))) { if (stamp == 0) stamp = DateToUnixTime(xi.getText(itemval), 0); } - else if (!lstrcmpi(szItemName, _T("summary")) || !lstrcmpi(szItemName, _T("content"))) { + else if (!mir_tstrcmpi(szItemName, _T("summary")) || !mir_tstrcmpi(szItemName, _T("content"))) { LPCTSTR szItemText = xi.getText(itemval); if (szItemText) ClearText(descr, szItemText); } - else if (!lstrcmpi(szItemName, _T("author"))) { + else if (!mir_tstrcmpi(szItemName, _T("author"))) { for (int x = 0; x < xi.getChildCount(itemval); x++) { HXML authorval = xi.getChild(itemval, x); - if (!lstrcmpi(xi.getName(authorval), _T("name")) && xi.getText(authorval)) { + if (!mir_tstrcmpi(xi.getName(authorval), _T("name")) && xi.getText(authorval)) { ClearText(author, xi.getText(authorval)); break; } } } - else if (!lstrcmpi(szItemName, _T("comments"))) { + else if (!mir_tstrcmpi(szItemName, _T("comments"))) { LPCTSTR szItemText = xi.getText(itemval); if (szItemText) ClearText(comments, szItemText); } - else if (!lstrcmpi(szItemName, _T("id"))) { + else if (!mir_tstrcmpi(szItemName, _T("id"))) { LPCTSTR szItemText = xi.getText(itemval); if (szItemText) ClearText(guid, xi.getText(itemval)); } - else if (!lstrcmpi(szItemName, _T("category"))) { + else if (!mir_tstrcmpi(szItemName, _T("category"))) { for (int x = 0; x < xi.getAttrCount(itemval); x++) { LPCTSTR szAttrName = xi.getAttrName(itemval, x); - if (!lstrcmpi(szAttrName, _T("term")) && xi.getText(itemval)) { + if (!mir_tstrcmpi(szAttrName, _T("term")) && xi.getText(itemval)) { ClearText(category, xi.getAttrValue(itemval, szAttrName)); break; } @@ -521,14 +521,14 @@ void CheckCurrentFeedAvatar(MCONTACT hContact) HXML node = xi.getChild(hXml, childcount); while (node) { LPCTSTR szNodeName = xi.getName(node); - if (!lstrcmpi(szNodeName, _T("rss")) || !lstrcmpi(szNodeName, _T("rdf"))) { + if (!mir_tstrcmpi(szNodeName, _T("rss")) || !mir_tstrcmpi(szNodeName, _T("rdf"))) { HXML chan = xi.getChild(node, 0); for (int j = 0; j < xi.getChildCount(chan); j++) { HXML child = xi.getChild(chan, j); - if (!lstrcmpi(xi.getName(child), _T("image"))) { + if (!mir_tstrcmpi(xi.getName(child), _T("image"))) { for (int x = 0; x < xi.getChildCount(child); x++) { HXML imageval = xi.getChild(child, x); - if (!lstrcmpi(xi.getName(imageval), _T("url"))) { + if (!mir_tstrcmpi(xi.getName(imageval), _T("url"))) { LPCTSTR url = xi.getText(imageval); db_set_ts(hContact, MODULE, "ImageURL", url); @@ -556,13 +556,13 @@ void CheckCurrentFeedAvatar(MCONTACT hContact) } } } - else if (!lstrcmpi(szNodeName, _T("feed"))) { + else if (!mir_tstrcmpi(szNodeName, _T("feed"))) { for (int j = 0; j < xi.getChildCount(node); j++) { HXML child = xi.getChild(node, j); - if (!lstrcmpi(xi.getName(child), _T("icon"))) { + if (!mir_tstrcmpi(xi.getName(child), _T("icon"))) { for (int x = 0; x < xi.getChildCount(child); x++) { HXML imageval = xi.getChild(child, x); - if (!lstrcmpi(xi.getName(imageval), _T("url"))) { + if (!mir_tstrcmpi(xi.getName(imageval), _T("url"))) { LPCTSTR url = xi.getText(imageval); db_set_ts(hContact, MODULE, "ImageURL", url); diff --git a/plugins/NewsAggregator/Src/ExportImport.cpp b/plugins/NewsAggregator/Src/ExportImport.cpp index dfcbf68b65..894aebc04e 100644 --- a/plugins/NewsAggregator/Src/ExportImport.cpp +++ b/plugins/NewsAggregator/Src/ExportImport.cpp @@ -68,7 +68,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM node = xi.getNextNode(node); if (node) break; - } while (lstrcmpi(xi.getName(node), _T("body"))); + } while (mir_tstrcmpi(xi.getName(node), _T("body"))); } } else if (!xmlUrl && outlineChildsCount) @@ -77,7 +77,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM TCHAR *text = NULL, *url = NULL, *siteurl = NULL, *group = NULL, *utfgroup = NULL; BYTE NeedToImport = FALSE; for (int i = 0; i < outlineAttr; i++) { - if (!lstrcmpi(xi.getAttrName(node, i), _T("text"))) { + if (!mir_tstrcmpi(xi.getAttrName(node, i), _T("text"))) { text = mir_utf8decodeT(_T2A(xi.getAttrValue(node, xi.getAttrName(node, i)))); if (!text) { isTextUTF = 0; @@ -88,14 +88,14 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM for (int i = 0; i < count; i++) { TCHAR item[MAX_PATH]; SendMessage(FeedsImportList, LB_GETTEXT, i, (LPARAM)item); - if (!lstrcmpi(item, text)) { + if (!mir_tstrcmpi(item, text)) { NeedToImport = TRUE; break; } } continue; } - if (!lstrcmpi(xi.getAttrName(node, i), _T("xmlUrl"))) { + if (!mir_tstrcmpi(xi.getAttrName(node, i), _T("xmlUrl"))) { url = mir_utf8decodeT(_T2A(xi.getAttrValue(node, xi.getAttrName(node, i)))); if ( !url) { isURLUTF = 0; @@ -108,7 +108,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM } continue; } - if (!lstrcmpi(xi.getAttrName(node, i), _T("htmlUrl"))) { + if (!mir_tstrcmpi(xi.getAttrName(node, i), _T("htmlUrl"))) { siteurl = mir_utf8decodeT(_T2A(xi.getAttrValue(node, xi.getAttrName(node, i)))); if ( !siteurl) { isSiteURLUTF = 0; @@ -123,9 +123,9 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (NeedToImport) { HXML parent = xi.getParent(node); - while (lstrcmpi(xi.getName(parent), _T("body"))) { + while (mir_tstrcmpi(xi.getName(parent), _T("body"))) { for (int i = 0; i < xi.getAttrCount(parent); i++) { - if (!lstrcmpi(xi.getAttrName(parent, i), _T("text"))) { + if (!mir_tstrcmpi(xi.getAttrName(parent, i), _T("text"))) { if ( !group) group = (TCHAR *)xi.getAttrValue(parent, xi.getAttrName(parent, i)); else { @@ -196,7 +196,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (node) break; } - while (lstrcmpi(xi.getName(tmpnode), _T("body"))); + while (mir_tstrcmpi(xi.getName(tmpnode), _T("body"))); } } } @@ -262,7 +262,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM node = xi.getNextNode(node); if (node) break; - } while (lstrcmpi(xi.getName(node), _T("body"))); + } while (mir_tstrcmpi(xi.getName(node), _T("body"))); } } else if (!xmlUrl && outlineChildsCount) @@ -270,7 +270,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM else if (xmlUrl) { TCHAR *text = NULL; for (int i = 0; i < outlineAttr; i++) { - if (!lstrcmpi(xi.getAttrName(node, i), _T("text"))) { + if (!mir_tstrcmpi(xi.getAttrName(node, i), _T("text"))) { text = mir_utf8decodeT(_T2A(xi.getAttrValue(node, xi.getAttrName(node, i)))); if (!text) { isTextUTF = 0; @@ -297,7 +297,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM node = xi.getNextNode(node); if (node) break; - } while (lstrcmpi(xi.getName(tmpnode), _T("body"))); + } while (mir_tstrcmpi(xi.getName(tmpnode), _T("body"))); } } } diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp index 8a0293c4ba..198b78d701 100644 --- a/plugins/NewsAggregator/Src/Options.cpp +++ b/plugins/NewsAggregator/Src/Options.cpp @@ -44,7 +44,7 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK); break; } - if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || lstrcmp(str, _T("http://")) == 0) { + if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || mir_tstrcmp(str, _T("http://")) == 0) { MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); break; } @@ -115,7 +115,7 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE); SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait...")); TCHAR tszURL[MAX_PATH] = { 0 }, *tszTitle = NULL; - if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || lstrcmp(tszURL, _T("http://")) != 0) + if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0) tszTitle = CheckFeed(tszURL, hwndDlg); else MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); @@ -156,14 +156,14 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (dbNick == NULL) continue; - if (lstrcmp(dbNick, SelItem.nick) != 0) + if (mir_tstrcmp(dbNick, SelItem.nick) != 0) continue; ptrT dbURL(db_get_tsa(hContact, MODULE, "URL")); if (dbURL == NULL) continue; - if (lstrcmp(dbURL, SelItem.url) != 0) + if (mir_tstrcmp(dbURL, SelItem.url) != 0) continue; nSelItem->hContact = hContact; @@ -208,7 +208,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK); break; } - if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || lstrcmp(str, _T("http://")) == 0) { + if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || mir_tstrcmp(str, _T("http://")) == 0) { MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); break; } @@ -278,7 +278,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP case IDC_DISCOVERY: TCHAR tszURL[MAX_PATH] = { 0 }; - if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || lstrcmp(tszURL, _T("http://")) != 0) { + if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0) { EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE); SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait...")); TCHAR *tszTitle = CheckFeed(tszURL, hwndDlg); @@ -365,7 +365,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP MessageBox(hwndDlg, TranslateT("Enter Feed name"), TranslateT("Error"), MB_OK); break; } - if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || lstrcmp(str, _T("http://")) == 0) { + if (!GetDlgItemText(hwndDlg, IDC_FEEDURL, str, SIZEOF(str)) || mir_tstrcmp(str, _T("http://")) == 0) { MessageBox(hwndDlg, TranslateT("Enter Feed URL"), TranslateT("Error"), MB_OK); break; } @@ -433,7 +433,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP case IDC_DISCOVERY: TCHAR tszURL[MAX_PATH] = { 0 }; - if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || lstrcmp(tszURL, _T("http://")) != 0) { + if (GetDlgItemText(hwndDlg, IDC_FEEDURL, tszURL, SIZEOF(tszURL)) || mir_tstrcmp(tszURL, _T("http://")) != 0) { EnableWindow(GetDlgItem(hwndDlg, IDC_DISCOVERY), FALSE); SetDlgItemText(hwndDlg, IDC_DISCOVERY, TranslateT("Wait...")); TCHAR *tszTitle = CheckFeed(tszURL, hwndDlg); @@ -502,13 +502,13 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA ptrT dbNick(db_get_tsa(hContact, MODULE, "Nick")); if (dbNick == NULL) break; - if (lstrcmp(dbNick, nick)) + if (mir_tstrcmp(dbNick, nick)) continue; ptrT dbURL(db_get_tsa(hContact, MODULE, "URL")); if (dbURL == NULL) break; - if (lstrcmp(dbURL, url)) + if (mir_tstrcmp(dbURL, url)) continue; CallService(MS_DB_CONTACT_DELETE, hContact, 0); diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index cb85c4da41..1c7c1dba88 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -216,35 +216,35 @@ time_t __stdcall DateToUnixTime(const TCHAR *stamp, bool FeedType) int day, month, year, hour, min, sec, timezoneh, timezonem; if (_tcsstr(p, _T(","))) { _stscanf(p, _T("%3s, %d %3s %d %d:%d:%d %1s%02d%02d"), &weekday, &day, &monthstr, &year, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem); - if (!lstrcmpi(monthstr, _T("Jan"))) + if (!mir_tstrcmpi(monthstr, _T("Jan"))) month = 1; - if (!lstrcmpi(monthstr, _T("Feb"))) + if (!mir_tstrcmpi(monthstr, _T("Feb"))) month = 2; - if (!lstrcmpi(monthstr, _T("Mar"))) + if (!mir_tstrcmpi(monthstr, _T("Mar"))) month = 3; - if (!lstrcmpi(monthstr, _T("Apr"))) + if (!mir_tstrcmpi(monthstr, _T("Apr"))) month = 4; - if (!lstrcmpi(monthstr, _T("May"))) + if (!mir_tstrcmpi(monthstr, _T("May"))) month = 5; - if (!lstrcmpi(monthstr, _T("Jun"))) + if (!mir_tstrcmpi(monthstr, _T("Jun"))) month = 6; - if (!lstrcmpi(monthstr, _T("Jul"))) + if (!mir_tstrcmpi(monthstr, _T("Jul"))) month = 7; - if (!lstrcmpi(monthstr, _T("Aug"))) + if (!mir_tstrcmpi(monthstr, _T("Aug"))) month = 8; - if (!lstrcmpi(monthstr, _T("Sep"))) + if (!mir_tstrcmpi(monthstr, _T("Sep"))) month = 9; - if (!lstrcmpi(monthstr, _T("Oct"))) + if (!mir_tstrcmpi(monthstr, _T("Oct"))) month = 10; - if (!lstrcmpi(monthstr, _T("Nov"))) + if (!mir_tstrcmpi(monthstr, _T("Nov"))) month = 11; - if (!lstrcmpi(monthstr, _T("Dec"))) + if (!mir_tstrcmpi(monthstr, _T("Dec"))) month = 12; if (year < 2000) year += 2000; - if (!lstrcmp(timezonesign, _T("+"))) + if (!mir_tstrcmp(timezonesign, _T("+"))) mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour-timezoneh, min-timezonem, sec); - else if (!lstrcmp(timezonesign, _T("-"))) + else if (!mir_tstrcmp(timezonesign, _T("-"))) mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour+timezoneh, min+timezonem, sec); else mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec); @@ -256,9 +256,9 @@ time_t __stdcall DateToUnixTime(const TCHAR *stamp, bool FeedType) else { _stscanf(p, _T("%d-%d-%d %d:%d:%d %1s%02d%02d"), &year, &month, &day, &hour, &min, &sec, &timezonesign, &timezoneh, &timezonem); - if (!lstrcmp(timezonesign, _T("+"))) + if (!mir_tstrcmp(timezonesign, _T("+"))) mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour-timezoneh, min-timezonem, sec); - else if (!lstrcmp(timezonesign, _T("-"))) + else if (!mir_tstrcmp(timezonesign, _T("-"))) mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour+timezoneh, min+timezonem, sec); else mir_sntprintf(p, 4 + 2 + 2 + 1 + 2 + 1 + 2 + 1 + 2 + 1, _T("%04d%02d%02dT%02d:%02d:%02d"), year, month, day, hour, min, sec); @@ -420,11 +420,11 @@ bool DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal) if ((200 == pReply->resultCode) && (pReply->dataLength > 0)) { char *date = NULL, *size = NULL; for (int i = 0; i < pReply->headersCount; i++) { - if (!lstrcmpiA(pReply->headers[i].szName, "Last-Modified")) { + if (!mir_strcmpi(pReply->headers[i].szName, "Last-Modified")) { date = pReply->headers[i].szValue; continue; } - else if (!lstrcmpiA(pReply->headers[i].szName, "Content-Length")) { + else if (!mir_strcmpi(pReply->headers[i].szName, "Content-Length")) { size = pReply->headers[i].szValue; continue; } @@ -581,7 +581,7 @@ MCONTACT GetContactByNick(const TCHAR *nick) for (hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) { ptrW contactNick(::db_get_wsa(hContact, MODULE, "Nick")); - if (!lstrcmpi(contactNick, nick)) + if (!mir_tstrcmpi(contactNick, nick)) break; } return hContact; @@ -593,7 +593,7 @@ MCONTACT GetContactByURL(const TCHAR *url) for (hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) { ptrW contactURL(::db_get_wsa(hContact, MODULE, "URL")); - if (!lstrcmpi(contactURL, url)) + if (!mir_tstrcmpi(contactURL, url)) break; } return hContact; diff --git a/plugins/Non-IM Contact/src/http.cpp b/plugins/Non-IM Contact/src/http.cpp index 8c7ecb594d..92aacc0ec5 100644 --- a/plugins/Non-IM Contact/src/http.cpp +++ b/plugins/Non-IM Contact/src/http.cpp @@ -67,7 +67,7 @@ int InternetDownloadFile (char *szUrl) // get the url for the new location and save it to szInfo // look for the reply header "Location" for (i=0; iheadersCount; i++) { - if (!lstrcmpA(nlhrReply->headers[i].szName, "Location")) { + if (!mir_strcmp(nlhrReply->headers[i].szName, "Location")) { szData = (char *)malloc(512); // add "Moved/Location:" in front of the new URL for identification mir_snprintf(szData, 512, "Moved/Location: %s\n", nlhrReply->headers[i].szValue); @@ -86,7 +86,7 @@ int InternetDownloadFile (char *szUrl) CallService(MS_NETLIB_FREEHTTPREQUESTSTRUCT,0,(LPARAM)nlhrReply); // the recieved data is empty, data was not recieved, so return an error code of 1 - if (!lstrcmpA(szInfo, "")) return 1; + if (!mir_strcmp(szInfo, "")) return 1; return 0; } diff --git a/plugins/PackUpdater/Src/Notifications.cpp b/plugins/PackUpdater/Src/Notifications.cpp index 081cae06b8..76f687eaee 100644 --- a/plugins/PackUpdater/Src/Notifications.cpp +++ b/plugins/PackUpdater/Src/Notifications.cpp @@ -307,7 +307,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam EnableWindow(hwOk, enableOk ? TRUE : FALSE); } if (nmlv->uNewState & LVIS_SELECTED) { - if (lstrcmp(todo[lvI.iItem].tszInfoURL, _T(""))) + if (mir_tstrcmp(todo[lvI.iItem].tszInfoURL, _T(""))) EnableWindow(GetDlgItem(hDlg, IDC_INFO), TRUE); else EnableWindow(GetDlgItem(hDlg, IDC_INFO), FALSE); @@ -379,7 +379,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam UpdatesCount++; tszExt = &todo[i].File.tszDownloadURL[mir_tstrlen(todo[i].File.tszDownloadURL)-5]; - if (lstrcmp(tszExt, _T(".html")) == 0) { + if (mir_tstrcmp(tszExt, _T(".html")) == 0) { char* szUrl = mir_t2a(todo[i].File.tszDownloadURL); CallService(MS_UTILS_OPENURL, TRUE, (LPARAM)szUrl); mir_free(szUrl); @@ -412,11 +412,11 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam } } - if (UpdatesCount > 1 && lstrcmp(arExt[0].c_str(), _T(".html")) != 0) + if (UpdatesCount > 1 && mir_tstrcmp(arExt[0].c_str(), _T(".html")) != 0) mir_tstrncpy(tszBuff, TranslateT("Downloads complete. Start updating? All your data will be saved and Miranda NG will be closed."), SIZEOF(tszBuff)); - else if (UpdatesCount == 1 && lstrcmp(arExt[0].c_str(), _T(".html")) != 0) + else if (UpdatesCount == 1 && mir_tstrcmp(arExt[0].c_str(), _T(".html")) != 0) mir_tstrncpy(tszBuff, TranslateT("Download complete. Start updating? All your data will be saved and Miranda NG will be closed."), SIZEOF(tszBuff)); - if (UpdatesCount > 0 && lstrcmp(arExt[0].c_str(), _T(".html")) != 0) { + if (UpdatesCount > 0 && mir_tstrcmp(arExt[0].c_str(), _T(".html")) != 0) { INT rc = -1; Title = TranslateT("Pack Updater"); Text = tszBuff; @@ -451,7 +451,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam break; case 2: tszUtilRootPlug = Utils_ReplaceVarsT(_T("%miranda_path%\\Plugins")); - if (lstrcmp(arAdvFolder[i].c_str(), _T("")) == 0) + if (mir_tstrcmp(arAdvFolder[i].c_str(), _T("")) == 0) mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s"), tszUtilRootPlug, arFileName[i].c_str()); else mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRootPlug, arAdvFolder[i].c_str(), arFileName[i].c_str()); @@ -464,7 +464,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam break; case 3: tszUtilRootIco = Utils_ReplaceVarsT(_T("%miranda_path%\\Icons")); - if (lstrcmp(arAdvFolder[i].c_str(), _T("")) == 0) + if (mir_tstrcmp(arAdvFolder[i].c_str(), _T("")) == 0) mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s"), tszUtilRootIco, arFileName[i].c_str()); else mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRootIco, arAdvFolder[i].c_str(), arFileName[i].c_str()); @@ -477,7 +477,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam break; case 4: tszUtilRoot = Utils_ReplaceVarsT(_T("%miranda_path%")); - if (lstrcmp(arAdvFolder[i].c_str(), _T("")) == 0) + if (mir_tstrcmp(arAdvFolder[i].c_str(), _T("")) == 0) mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s"), tszUtilRoot, arFileName[i].c_str()); else mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRoot, arAdvFolder[i].c_str(), arFileName[i].c_str()); @@ -490,7 +490,7 @@ INT_PTR CALLBACK DlgUpdate(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam break; case 5: tszUtilRoot = Utils_ReplaceVarsT(_T("%miranda_path%")); - if (lstrcmp(arAdvFolder[i].c_str(), _T("")) == 0) + if (mir_tstrcmp(arAdvFolder[i].c_str(), _T("")) == 0) mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s"), tszUtilRoot, arFileName[i].c_str()); else mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRoot, arAdvFolder[i].c_str(), arFileName[i].c_str()); diff --git a/plugins/PackUpdater/Src/Utils.cpp b/plugins/PackUpdater/Src/Utils.cpp index 7a92f49655..edb28607d1 100644 --- a/plugins/PackUpdater/Src/Utils.cpp +++ b/plugins/PackUpdater/Src/Utils.cpp @@ -196,7 +196,7 @@ static void CheckUpdates(void *) // Load files info db_get_ts(NULL, MODNAME, "File_VersionURL", &dbVar); - if (lstrcmp(dbVar.ptszVal, NULL) == 0) { // URL is not set + if (mir_tstrcmp(dbVar.ptszVal, NULL) == 0) { // URL is not set Title=TranslateT("Pack Updater"); Text = TranslateT("URL for checking updates not found."); if (ServiceExists(MS_POPUP_ADDPOPUPT) && db_get_b(NULL, "Popup", "ModuleIsEnabled", 1) && db_get_b(NULL, MODNAME, "Popups1", DEFAULT_POPUP_ENABLED)) { @@ -230,7 +230,7 @@ static void CheckUpdates(void *) dbVar.ptszVal = NULL; mir_snprintf(szKey, SIZEOF(szKey), "File_%d_CurrentVersion", CurrentFile + 1); db_get_ts(NULL, MODNAME, szKey, &dbVar); - if (lstrcmp(dbVar.ptszVal, NULL) == 0) { + if (mir_tstrcmp(dbVar.ptszVal, NULL) == 0) { db_free(&dbVar); mir_tstrncpy(FileInfo.tszCurVer, _T(""), SIZEOF(FileInfo.tszCurVer)); } @@ -239,7 +239,7 @@ static void CheckUpdates(void *) dbVar.ptszVal = NULL; mir_snprintf(szKey, SIZEOF(szKey), "File_%d_LastVersion", CurrentFile + 1); db_get_ts(NULL, MODNAME, szKey, &dbVar); - if (lstrcmp(dbVar.ptszVal, NULL) == 0) { + if (mir_tstrcmp(dbVar.ptszVal, NULL) == 0) { db_free(&dbVar); mir_tstrncpy(FileInfo.tszLastVer, _T(""), SIZEOF(FileInfo.tszLastVer)); } @@ -275,7 +275,7 @@ static void CheckUpdates(void *) if (Files[CurrentFile].FileType == 2) { TCHAR pluginFolgerName[MAX_PATH]; - if (lstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0) + if (mir_tstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0) mir_sntprintf(tszBuff, SIZEOF(tszBuff), _T("Plugins\\%s"), Files[CurrentFile].File.tszDiskPath); else mir_sntprintf(tszBuff, SIZEOF(tszBuff), _T("Plugins\\%s\\%s"), Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath); @@ -307,7 +307,7 @@ static void CheckUpdates(void *) break; case 2: tszUtilRootPlug = Utils_ReplaceVarsT(_T("%miranda_path%\\Plugins")); - if (lstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0) + if (mir_tstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0) mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s"), tszUtilRootPlug, Files[CurrentFile].File.tszDiskPath); else mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRootPlug, Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath); @@ -315,7 +315,7 @@ static void CheckUpdates(void *) break; case 3: tszUtilRootIco = Utils_ReplaceVarsT(_T("%miranda_path%\\Icons")); - if (lstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0) + if (mir_tstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0) mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s"), tszUtilRootIco, Files[CurrentFile].File.tszDiskPath); else mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRootIco, Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath); @@ -324,7 +324,7 @@ static void CheckUpdates(void *) case 4: case 5: tszUtilRoot = Utils_ReplaceVarsT(_T("%miranda_path%")); - if (lstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0) + if (mir_tstrcmp(Files[CurrentFile].tszAdvFolder, _T("")) == 0) mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s"), tszUtilRoot, Files[CurrentFile].File.tszDiskPath); else mir_sntprintf(tszFilePathDest, SIZEOF(tszFilePathDest), _T("%s\\%s\\%s"), tszUtilRoot, Files[CurrentFile].tszAdvFolder, Files[CurrentFile].File.tszDiskPath); diff --git a/plugins/Popup/src/actions.cpp b/plugins/Popup/src/actions.cpp index db3e581b59..9bd52deea2 100644 --- a/plugins/Popup/src/actions.cpp +++ b/plugins/Popup/src/actions.cpp @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static int ActionsSortFunc(const POPUPACTION *p1, const POPUPACTION *p2) { - return lstrcmpA(p1->lpzTitle, p2->lpzTitle); + return mir_strcmp(p1->lpzTitle, p2->lpzTitle); } static LIST gActions(3, ActionsSortFunc); diff --git a/plugins/Popup/src/bitmap_funcs.cpp b/plugins/Popup/src/bitmap_funcs.cpp index 821aa10017..fe3a281f32 100644 --- a/plugins/Popup/src/bitmap_funcs.cpp +++ b/plugins/Popup/src/bitmap_funcs.cpp @@ -833,7 +833,7 @@ bool MyBitmap::loadFromFile(const TCHAR *fn, const TCHAR *fnAlpha) TCHAR ext[5]; _tcsncpy_s(ext, fn + (_tcslen(fn) - 4), _TRUNCATE); - if (!lstrcmpi(ext, _T(".png"))) + if (!mir_tstrcmpi(ext, _T(".png"))) return loadFromFile_png(fn, fnAlpha); return loadFromFile_default(fn, fnAlpha); diff --git a/plugins/Popup/src/formula.h b/plugins/Popup/src/formula.h index 7115b25dad..67cea481c9 100644 --- a/plugins/Popup/src/formula.h +++ b/plugins/Popup/src/formula.h @@ -46,7 +46,7 @@ public: void add(char *name, int value) { for (Item *p = items; p; p = p->next) - if (!lstrcmpA(p->name,name)) + if (!mir_strcmp(p->name,name)) { p->value = value; return; @@ -56,7 +56,7 @@ public: int get(char *name) { for (Item *p = items; p; p = p->next) - if (!lstrcmpA(p->name,name)) + if (!mir_strcmp(p->name,name)) return p->value; return 0; } diff --git a/plugins/Popup/src/notifications.cpp b/plugins/Popup/src/notifications.cpp index 57fbf18b62..7223a22100 100644 --- a/plugins/Popup/src/notifications.cpp +++ b/plugins/Popup/src/notifications.cpp @@ -30,9 +30,9 @@ HANDLE g_hntfError, g_hntfWarning, g_hntfNotification; int TreeDataSortFunc(const POPUPTREEDATA *p1, const POPUPTREEDATA *p2) { - if (int cmp = lstrcmp(p1->pszTreeRoot, p2->pszTreeRoot)) + if (int cmp = mir_tstrcmp(p1->pszTreeRoot, p2->pszTreeRoot)) return cmp; - return lstrcmp(p1->pszDescription, p2->pszDescription); + return mir_tstrcmp(p1->pszDescription, p2->pszDescription); } @@ -126,10 +126,10 @@ void SaveNotificationSettings(POPUPTREEDATA *ptd, char* szModul) for (int i=0; i < ptd->notification.actionCount; ++i) { POPUPNOTIFYACTION &p = ptd->notification.lpActions[i]; - if (!lstrcmpA(ptd->leftAction, p.lpzTitle)) + if (!mir_strcmp(ptd->leftAction, p.lpzTitle)) db_set(NULL, p.lpzLModule, p.lpzLSetting, &p.dbvLData); - if (!lstrcmpA(ptd->rightAction, p.lpzTitle)) + if (!mir_strcmp(ptd->rightAction, p.lpzTitle)) db_set(NULL, p.lpzRModule, p.lpzRSetting, &p.dbvRData); } } @@ -309,10 +309,10 @@ bool PerformAction(HANDLE hNotification, HWND hwnd, UINT message, WPARAM wparam, return false; } - if (!lstrcmpA(lpzAction, POPUP_ACTION_NOTHING)) + if (!mir_strcmp(lpzAction, POPUP_ACTION_NOTHING)) return true; - if (!lstrcmpA(lpzAction, POPUP_ACTION_DISMISS)) + if (!mir_strcmp(lpzAction, POPUP_ACTION_DISMISS)) { PUDeletePopup(hwnd); return true; @@ -322,7 +322,7 @@ bool PerformAction(HANDLE hNotification, HWND hwnd, UINT message, WPARAM wparam, { if (!(ptd->notification.lpActions[i].dwFlags&PNAF_CALLBACK)) continue; - if (lstrcmpA(ptd->notification.lpActions[i].lpzTitle, lpzAction)) + if (mir_strcmp(ptd->notification.lpActions[i].lpzTitle, lpzAction)) continue; ptd->notification.lpActions[i].pfnCallback(hwnd, message, wparam, lparam, diff --git a/plugins/Popup/src/opt_adv.cpp b/plugins/Popup/src/opt_adv.cpp index 3f0834d28e..40728b454f 100644 --- a/plugins/Popup/src/opt_adv.cpp +++ b/plugins/Popup/src/opt_adv.cpp @@ -213,7 +213,7 @@ INT_PTR CALLBACK DlgProcPopupAdvOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM for (int i = 0; i < g_lstPopupVfx.getCount(); ++i) { dwItem = ComboBox_AddString(hCtrl, TranslateTS(g_lstPopupVfx[i])); ComboBox_SetItemData(hCtrl, dwItem, i); - if (PopupOptions.UseEffect && !lstrcmp(g_lstPopupVfx[i], PopupOptions.Effect)) + if (PopupOptions.UseEffect && !mir_tstrcmp(g_lstPopupVfx[i], PopupOptions.Effect)) dwActiveItem = dwItem; } SendDlgItemMessage(hwnd, IDC_EFFECT, CB_SETCURSEL, dwActiveItem, 0); diff --git a/plugins/Popup/src/opt_skins.cpp b/plugins/Popup/src/opt_skins.cpp index 7b441978ed..ce95fadc2c 100644 --- a/plugins/Popup/src/opt_skins.cpp +++ b/plugins/Popup/src/opt_skins.cpp @@ -315,13 +315,13 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR int index = -1; OptTree_ProcessMessage(hwndDlg, msg, wParam, lParam, &index, IDC_SKIN_LIST_OPT, skinOptions, skinOptionsCount); if (index != -1) { - if (lstrcmp(skinOptions[index].pszSettingName, _T("Skin options")) == 0) { + if (mir_tstrcmp(skinOptions[index].pszSettingName, _T("Skin options")) == 0) { const PopupSkin *skin = 0; if (skin = skins.getSkin(PopupOptions.SkinPack)) { skin->setFlag(skinOptions[index].Data, skinOptions[index].bState ? true : false); } } - else if (lstrcmp(skinOptions[index].pszSettingName, _T("Global settings")) == 0) { + else if (mir_tstrcmp(skinOptions[index].pszSettingName, _T("Global settings")) == 0) { switch (skinOptions[index].dwFlag) { case (1 << 0): PopupOptions.DisplayTime = skinOptions[index].bState; @@ -421,7 +421,7 @@ INT_PTR CALLBACK DlgProcPopSkinsOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR ListBox_SetCurSel(hCtrl, ListBox_FindString(hCtrl, 0, PopupOptions.SkinPack)); //make shure we have select skin (ListBox_SetCurSel may be fail) ListBox_GetText(hCtrl, ListBox_GetCurSel(hCtrl), &szNewSkin); - if (lstrcmp(pszOldSkin, szNewSkin) != 0) { + if (mir_tstrcmp(pszOldSkin, szNewSkin) != 0) { mir_free(PopupOptions.SkinPack); PopupOptions.SkinPack = mir_tstrdup(szNewSkin); } diff --git a/plugins/Popup/src/opttree.cpp b/plugins/Popup/src/opttree.cpp index c7729d199d..515e13256e 100644 --- a/plugins/Popup/src/opttree.cpp +++ b/plugins/Popup/src/opttree.cpp @@ -85,7 +85,7 @@ HTREEITEM OptTree_FindNamedTreeItemAt(HWND hwndTree, HTREEITEM hItem, const TCHA while (tvi.hItem) { TreeView_GetItem(hwndTree, &tvi); - if (!lstrcmp(tvi.pszText, name)) + if (!mir_tstrcmp(tvi.pszText, name)) return tvi.hItem; tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem); @@ -324,7 +324,7 @@ DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int op int i; for (i = 0; i < optionCount; ++i) { if ((!options[i].pszSettingName && !pszSettingName) || - (options[i].pszSettingName && pszSettingName && !lstrcmp(options[i].pszSettingName, pszSettingName))) + (options[i].pszSettingName && pszSettingName && !mir_tstrcmp(options[i].pszSettingName, pszSettingName))) { TVITEM tvi = {0}; tvi.mask = TVIF_HANDLE | TVIF_IMAGE; @@ -342,7 +342,7 @@ void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int opt HWND hwndTree = GetDlgItem(hwnd, idcTree); for (int i = 0; i < optionCount; ++i) { if ((!options[i].pszSettingName && !pszSettingName) || - (options[i].pszSettingName && pszSettingName && !lstrcmp(options[i].pszSettingName, pszSettingName))) + (options[i].pszSettingName && pszSettingName && !mir_tstrcmp(options[i].pszSettingName, pszSettingName))) { TVITEM tvi; tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE; diff --git a/plugins/Popup/src/skin.cpp b/plugins/Popup/src/skin.cpp index c33a3f96a0..444c539c95 100644 --- a/plugins/Popup/src/skin.cpp +++ b/plugins/Popup/src/skin.cpp @@ -750,7 +750,7 @@ void PopupSkin::loadOptions(std::wistream &f) f.ignore(1024, '\n'); continue; } - if (!lstrcmp(buf, _T("option"))) { + if (!mir_tstrcmp(buf, _T("option"))) { int id, val; f >> id >> val; f.getline(buf, 1024); @@ -769,7 +769,7 @@ void PopupSkin::loadOptions(std::wistream &f) else m_flags &= ~(1 << id); } - else if (!lstrcmp(buf, _T("end"))) + else if (!mir_tstrcmp(buf, _T("end"))) break; } delete[] buf; @@ -842,40 +842,40 @@ void PopupSkin::loadSkin(std::wistream &f) continue; } - if (!lstrcmp(buf, _T("popup-version"))) { + if (!mir_tstrcmp(buf, _T("popup-version"))) { f >> m_popup_version; m_popup_version = PLUGIN_MAKE_VERSION((m_popup_version / 1000000) % 100, (m_popup_version / 10000) % 100, (m_popup_version / 100) % 100, (m_popup_version / 1) % 100); if (!isCompatible()) break; } - else if (!lstrcmp(buf, _T("padding-right"))) { + else if (!mir_tstrcmp(buf, _T("padding-right"))) { f >> m_right_gap; } - else if (!lstrcmp(buf, _T("padding-bottom"))) { + else if (!mir_tstrcmp(buf, _T("padding-bottom"))) { f >> m_bottom_gap; } - else if (!lstrcmp(buf, _T("shadow-region-opacity"))) { + else if (!mir_tstrcmp(buf, _T("shadow-region-opacity"))) { f >> m_shadow_region_opacity; } - else if (!lstrcmp(buf, _T("legacy-region-opacity"))) { + else if (!mir_tstrcmp(buf, _T("legacy-region-opacity"))) { f >> m_legacy_region_opacity; } - else if (!lstrcmp(buf, _T("w"))) { + else if (!mir_tstrcmp(buf, _T("w"))) { f.getline(buf, 1024); m_fw.set(buf); } - else if (!lstrcmp(buf, _T("h"))) { + else if (!mir_tstrcmp(buf, _T("h"))) { f.getline(buf, 1024); m_fh.set(buf); } - else if (!lstrcmp(buf, _T("object"))) { + else if (!mir_tstrcmp(buf, _T("object"))) { head->next = loadObject(f); if (head->next && ((head->next->type & ST_TYPEMASK) == ST_CLOCK)) m_internalClock = false; head = head->next; head->next = NULL; } - else if (!lstrcmp(buf, _T("options"))) { + else if (!mir_tstrcmp(buf, _T("options"))) { loadOptions(f); } } @@ -930,32 +930,32 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) continue; } - if (!lstrcmp(buf, _T("type"))) { + if (!mir_tstrcmp(buf, _T("type"))) { f >> buf; - if (!lstrcmp(buf, _T("icon"))) + if (!mir_tstrcmp(buf, _T("icon"))) element->type = (element->type & ~ST_TYPEMASK) | ST_ICON; - else if (!lstrcmp(buf, _T("bitmap"))) + else if (!mir_tstrcmp(buf, _T("bitmap"))) element->type = (element->type & ~ST_TYPEMASK) | ST_MYBITMAP; - else if (!lstrcmp(buf, _T("text"))) { + else if (!mir_tstrcmp(buf, _T("text"))) { element->type = (element->type & ~ST_TYPEMASK) | ST_TEXT; element->textColor = (COLORREF)0xffffffff; element->hfn = 0; } - else if (!lstrcmp(buf, _T("title"))) { + else if (!mir_tstrcmp(buf, _T("title"))) { element->type = (element->type & ~ST_TYPEMASK) | ST_TITLE; element->textColor = (COLORREF)0xffffffff; element->hfn = 0; } - else if (!lstrcmp(buf, _T("avatar"))) { + else if (!mir_tstrcmp(buf, _T("avatar"))) { element->type = (element->type & ~ST_TYPEMASK) | ST_AVATAR; } - else if (!lstrcmp(buf, _T("clock"))) { + else if (!mir_tstrcmp(buf, _T("clock"))) { element->type = (element->type & ~ST_TYPEMASK) | ST_CLOCK; element->textColor = (COLORREF)0xffffffff; element->hfn = 0; } } - else if (!lstrcmp(buf, _T("source"))) { + else if (!mir_tstrcmp(buf, _T("source"))) { f >> buf; if (((element->type & ST_TYPEMASK) == ST_MYBITMAP) || ((element->type & ST_TYPEMASK) == ST_CLOCK)) { TCHAR *alpha = mir_tstrdup(buf); @@ -964,46 +964,46 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) mir_free(alpha); } } - else if (!lstrcmp(buf, _T("mono"))) { + else if (!mir_tstrcmp(buf, _T("mono"))) { element->type |= ST_MONO; } - else if (!lstrcmp(buf, _T("layer"))) { + else if (!mir_tstrcmp(buf, _T("layer"))) { element->type |= ST_BLEND; } - else if (!lstrcmp(buf, _T("proportional"))) { + else if (!mir_tstrcmp(buf, _T("proportional"))) { f >> element->proportional; } - else if (!lstrcmp(buf, _T("x"))) { + else if (!mir_tstrcmp(buf, _T("x"))) { f.getline(buf, 1024); element->fx.set(buf); element->type &= ~ST_BADPOS; } - else if (!lstrcmp(buf, _T("y"))) { + else if (!mir_tstrcmp(buf, _T("y"))) { f.getline(buf, 1024); element->fy.set(buf); element->type &= ~ST_BADPOS; } - else if (!lstrcmp(buf, _T("w"))) { + else if (!mir_tstrcmp(buf, _T("w"))) { f.getline(buf, 1024); element->fw.set(buf); } - else if (!lstrcmp(buf, _T("h"))) { + else if (!mir_tstrcmp(buf, _T("h"))) { f.getline(buf, 1024); element->fh.set(buf); } - else if (!lstrcmp(buf, _T("ifset"))) { + else if (!mir_tstrcmp(buf, _T("ifset"))) { int id; f >> id; id--; element->flag_mask |= 1 << id; element->flags |= 1 << id; } - else if (!lstrcmp(buf, _T("ifnotset"))) { + else if (!mir_tstrcmp(buf, _T("ifnotset"))) { int id; f >> id; id--; element->flag_mask |= 1 << id; element->flags &= ~(1 << id); } - else if (!lstrcmp(buf, _T("color"))) { + else if (!mir_tstrcmp(buf, _T("color"))) { if (((element->type & ST_TYPEMASK) != ST_TEXT) && ((element->type & ST_TYPEMASK) != ST_TITLE) && ((element->type & ST_TYPEMASK) != ST_CLOCK)) continue; @@ -1012,7 +1012,7 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) f >> r >> g >> b; element->textColor = RGB(r, g, b); } - else if (!lstrcmp(buf, _T("clocksize"))) { + else if (!mir_tstrcmp(buf, _T("clocksize"))) { element->clockstart[0] = 0; f >> element->clocksize[0]; for (int i = 1; i < CLOCK_ITEMS; i++) { @@ -1020,7 +1020,7 @@ PopupSkin::SKINELEMENT *PopupSkin::loadObject(std::wistream &f) f >> element->clocksize[i]; } } - else if (!lstrcmp(buf, _T("end"))) { + else if (!mir_tstrcmp(buf, _T("end"))) { break; } } @@ -1119,7 +1119,7 @@ bool Skins::load(LPCTSTR dir1) WIN32_FIND_DATA ffd; HANDLE hFind = FindFirstFile(_T("*.*"), &ffd); while (hFind != INVALID_HANDLE_VALUE) { - if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && lstrcmp(_T("."), ffd.cFileName) && lstrcmp(_T(".."), ffd.cFileName)) { + if ((ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && mir_tstrcmp(_T("."), ffd.cFileName) && mir_tstrcmp(_T(".."), ffd.cFileName)) { SetCurrentDirectory(ffd.cFileName); SKINLIST *skin = new SKINLIST; @@ -1147,9 +1147,9 @@ const PopupSkin *Skins::getSkin(LPCTSTR name) { SKINLIST *any = 0; for (SKINLIST *p = m_skins; p; p = p->next) { - if (!lstrcmp(p->name, _T("* Popup Classic")) || !any) + if (!mir_tstrcmp(p->name, _T("* Popup Classic")) || !any) any = p; - if (!lstrcmpi(p->name, name)) { + if (!mir_tstrcmpi(p->name, name)) { any = p; break; } @@ -1174,7 +1174,7 @@ const PopupSkin *Skins::getSkin(LPCTSTR name) void Skins::loadActiveSkin() { for (SKINLIST *p = m_skins; p; p = p->next) - if (!lstrcmpi(p->name, PopupOptions.SkinPack)) { + if (!mir_tstrcmpi(p->name, PopupOptions.SkinPack)) { if (p->skin) break; @@ -1187,7 +1187,7 @@ void Skins::loadActiveSkin() void Skins::freeAllButActive() { for (SKINLIST *p = m_skins; p; p = p->next) - if (lstrcmpi(p->name, PopupOptions.SkinPack)) { + if (mir_tstrcmpi(p->name, PopupOptions.SkinPack)) { delete p->skin; p->skin = NULL; } diff --git a/plugins/Popup/src/srmm_menu.cpp b/plugins/Popup/src/srmm_menu.cpp index e41ee130ce..40039f13fb 100644 --- a/plugins/Popup/src/srmm_menu.cpp +++ b/plugins/Popup/src/srmm_menu.cpp @@ -70,7 +70,7 @@ static int SrmmMenu_ProcessEvent(WPARAM, LPARAM lParam) static int SrmmMenu_ProcessIconClick(WPARAM hContact, LPARAM lParam) { StatusIconClickData *sicd = (StatusIconClickData *)lParam; - if (lstrcmpA(sicd->szModule, MODULNAME)) + if (mir_strcmp(sicd->szModule, MODULNAME)) return 0; if (!hContact) diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp index b02897c206..3a04330268 100644 --- a/plugins/QuickContacts/src/quickcontacts.cpp +++ b/plugins/QuickContacts/src/quickcontacts.cpp @@ -530,7 +530,7 @@ MCONTACT GetSelectedContact(HWND hwndDlg) for(int loop = 0; loop < contacts.getCount(); loop++) { - if(!lstrcmpi(cname, GetListName(contacts[loop]))) + if(!mir_tstrcmpi(cname, GetListName(contacts[loop]))) return contacts[loop]->hcontact; } diff --git a/plugins/QuickReplies/src/events.cpp b/plugins/QuickReplies/src/events.cpp index b3dd97fdc2..493ade4f56 100644 --- a/plugins/QuickReplies/src/events.cpp +++ b/plugins/QuickReplies/src/events.cpp @@ -117,7 +117,7 @@ int OnButtonPressed(WPARAM wParam, LPARAM lParam) else replyList.insert(variables_parsedup(value, 0, wParam)); - if (!lstrcmp(value, _T("---"))) + if (!mir_tstrcmp(value, _T("---"))) AppendMenu((HMENU)hMenu, MF_SEPARATOR, i + 1, NULL); else AppendMenu((HMENU)hMenu, MF_STRING, i + 1, replyList[i]); @@ -130,7 +130,7 @@ int OnButtonPressed(WPARAM wParam, LPARAM lParam) int index = TrackPopupMenu(hMenu, TPM_RETURNCMD, cbcd->pt.x, cbcd->pt.y, 0, cbcd->hwndFrom, NULL); if (index > 0) { - if (lstrcmp(replyList[index - 1], _T(""))) + if (mir_tstrcmp(replyList[index - 1], _T(""))) { HWND hEdit = GetDlgItem(cbcd->hwndFrom, IDC_MESSAGE); if (!hEdit) hEdit = GetDlgItem(cbcd->hwndFrom, IDC_CHATMESSAGE); diff --git a/plugins/Rate/src/main.cpp b/plugins/Rate/src/main.cpp index 806981626d..17e4237e56 100644 --- a/plugins/Rate/src/main.cpp +++ b/plugins/Rate/src/main.cpp @@ -110,7 +110,7 @@ int onContactSettingChanged(WPARAM hContact,LPARAM lParam) { DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam; - if (hContact != NULL && !lstrcmpA(cws->szModule,"CList") && !lstrcmpA(cws->szSetting,"Rate")) + if (hContact != NULL && !mir_strcmp(cws->szModule,"CList") && !mir_strcmp(cws->szSetting,"Rate")) setExtraIcon(hContact, cws->value.type == DBVT_DELETED ? 0 : cws->value.bVal); return 0; diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp index a4d693c3ac..43e0ef12e4 100644 --- a/plugins/RemovePersonalSettings/src/rps.cpp +++ b/plugins/RemovePersonalSettings/src/rps.cpp @@ -615,7 +615,7 @@ void DeleteFileOrFolder(const char *name) BOOL isMetaContact(MCONTACT hContact) { - return lstrcmpA(GetContactProto(hContact), METACONTACTS_PROTOCOL_NAME) == 0; + return mir_strcmp(GetContactProto(hContact), METACONTACTS_PROTOCOL_NAME) == 0; } diff --git a/plugins/Scriver/src/chat/manager.cpp b/plugins/Scriver/src/chat/manager.cpp index 63a2a0309d..7f12c8c9e6 100644 --- a/plugins/Scriver/src/chat/manager.cpp +++ b/plugins/Scriver/src/chat/manager.cpp @@ -46,9 +46,9 @@ SESSION_INFO* SM_FindSessionAutoComplete(const char* pszModule, SESSION_INFO* cu pszCurrent = pszOriginal; while (pTemp != NULL) { - if (pTemp != currSession && !lstrcmpiA(pszModule, pTemp->pszModule)) { + if (pTemp != currSession && !mir_strcmpi(pszModule, pTemp->pszModule)) { if (my_strstri(pTemp->ptszName, pszOriginal) == pTemp->ptszName) { - if (prevSession != pTemp && lstrcmpi(pTemp->ptszName, pszCurrent) > 0 && (!pszName || lstrcmpi(pTemp->ptszName, pszName) < 0)) { + if (prevSession != pTemp && mir_tstrcmpi(pTemp->ptszName, pszCurrent) > 0 && (!pszName || mir_tstrcmpi(pTemp->ptszName, pszName) < 0)) { pResult = pTemp; pszName = pTemp->ptszName; } diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 596af74bae..475188e03b 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -205,7 +205,7 @@ static void AddToFileList(TCHAR ***pppFiles,int *totalCount,const TCHAR* szFilen mir_tstrcat(szPath,_T("\\*")); if (( hFind = FindFirstFile( szPath, &fd )) != INVALID_HANDLE_VALUE ) { do { - if ( !lstrcmp(fd.cFileName,_T(".")) || !lstrcmp(fd.cFileName,_T(".."))) continue; + if ( !mir_tstrcmp(fd.cFileName,_T(".")) || !mir_tstrcmp(fd.cFileName,_T(".."))) continue; mir_tstrcpy(szPath,szFilename); mir_tstrcat(szPath,_T("\\")); mir_tstrcat(szPath,fd.cFileName); diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 3a78488668..0b9262c7ec 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -237,7 +237,7 @@ static int MessageSettingChanged(WPARAM hContact, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lParam; char *szProto = GetContactProto(hContact); - if (!lstrcmpA(cws->szModule, "CList") || !lstrcmpA(cws->szModule, szProto)) + if (!mir_strcmp(cws->szModule, "CList") || !mir_strcmp(cws->szModule, szProto)) WindowList_Broadcast(g_dat.hMessageWindowList, DM_CLISTSETTINGSCHANGED, hContact, lParam); return 0; } diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp index bd6899a7d7..66a387739c 100644 --- a/plugins/Scriver/src/msgwindow.cpp +++ b/plugins/Scriver/src/msgwindow.cpp @@ -1262,7 +1262,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (tbd->iFlags & TBDF_TEXT) { TCHAR oldtitle[256]; GetWindowText(hwndDlg, oldtitle, SIZEOF(oldtitle)); - if (lstrcmp(tbd->pszText, oldtitle)) + if (mir_tstrcmp(tbd->pszText, oldtitle)) SetWindowText(hwndDlg, tbd->pszText); } if (tbd->iFlags & TBDF_ICON) { diff --git a/plugins/SeenPlugin/src/userinfo.cpp b/plugins/SeenPlugin/src/userinfo.cpp index e27515a8f0..db6760389a 100644 --- a/plugins/SeenPlugin/src/userinfo.cpp +++ b/plugins/SeenPlugin/src/userinfo.cpp @@ -46,7 +46,7 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) else szout = ParseString(DEFAULT_USERSTAMP, (MCONTACT)lparam, 0); SetDlgItemText(hdlg, IDC_INFOTEXT, szout); - if ( !lstrcmp(szout, TranslateT(""))) + if ( !mir_tstrcmp(szout, TranslateT(""))) EnableWindow( GetDlgItem(hdlg, IDC_INFOTEXT), FALSE); } break; diff --git a/plugins/ShellExt/src/shlext.cpp b/plugins/ShellExt/src/shlext.cpp index 702f072fe4..f0ed65c72c 100644 --- a/plugins/ShellExt/src/shlext.cpp +++ b/plugins/ShellExt/src/shlext.cpp @@ -585,7 +585,7 @@ BOOL __stdcall ProcessRequest(HWND hwnd, LPARAM param) hMirandaWorkEvent = OpenEventA(EVENT_ALL_ACCESS, false, CreateProcessUID(pid, szBuf, sizeof(szBuf))); if (hMirandaWorkEvent != 0) { GetClassNameA(hwnd, szBuf, sizeof(szBuf)); - if ( lstrcmpA(szBuf, MIRANDACLASS) != 0) { + if ( mir_strcmp(szBuf, MIRANDACLASS) != 0) { // opened but not valid. logA("ProcessRequest(%d, %p): class %s differs from %s\n", pid, hwnd, szBuf, MIRANDACLASS); CloseHandle(hMirandaWorkEvent); diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp index d92b88e851..092f6ce090 100644 --- a/plugins/SimpleAR/src/Main.cpp +++ b/plugins/SimpleAR/src/Main.cpp @@ -238,7 +238,7 @@ INT addEvent(WPARAM hContact, LPARAM lParam) TCHAR *ptszTemp, *ptszTemp2; db_get_ts(hContact,pszProto,"Nick",&dbvNick); - if (lstrcmp(dbvNick.ptszVal, NULL) == 0) + if (mir_tstrcmp(dbvNick.ptszVal, NULL) == 0) { db_free(&dbvNick); return FALSE; diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index bbf0c7fcef..4871d80f72 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -186,7 +186,7 @@ TCHAR *InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int status) mir_free(g_ptszWinampSong); g_ptszWinampSong = mir_tstrdup(ptszWinampTitle); } - else if (g_ptszWinampSong && lstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) + else if (g_ptszWinampSong && mir_tstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) && db_get_b(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1)) { ptszWinampTitle = mir_tstrdup(g_ptszWinampSong); @@ -1392,7 +1392,7 @@ VOID CALLBACK UpdateMsgTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD d mir_snprintf(szBuffer, SIZEOF(szBuffer), "Cur%sMsg", accounts->pa[i]->szModuleName); if (!db_get_ts(NULL, "SimpleStatusMsg", szBuffer, &dbv)) { - if (tszMsg && dbv.ptszVal && !lstrcmp(tszMsg, dbv.ptszVal) || !tszMsg && !dbv.ptszVal) + if (tszMsg && dbv.ptszVal && !mir_tstrcmp(tszMsg, dbv.ptszVal) || !tszMsg && !dbv.ptszVal) { db_free(&dbv); mir_free(tszMsg); @@ -1620,7 +1620,7 @@ static int CSStatusChange(WPARAM wParam, LPARAM lParam) mir_snprintf(buff, SIZEOF(buff), "SMsg%d", j); if (!db_get_ts(NULL, "SimpleStatusMsg", buff, &dbv)) { - if (!lstrcmp(dbv.ptszVal, szMsgW)) + if (!mir_tstrcmp(dbv.ptszVal, szMsgW)) { found = TRUE; mir_snprintf(szSetting, SIZEOF(szSetting), "Last%sMsg", ps[i]->szName); @@ -1666,7 +1666,7 @@ static TCHAR *ParseWinampSong(ARGUMENTSINFO *ai) mir_free(g_ptszWinampSong); g_ptszWinampSong = mir_tstrdup(ptszWinampTitle); } - else if (g_ptszWinampSong && lstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) && db_get_b(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1)) + else if (g_ptszWinampSong && mir_tstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) && db_get_b(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1)) ptszWinampTitle = mir_tstrdup(g_ptszWinampSong); return ptszWinampTitle; @@ -1864,7 +1864,7 @@ static int OnOkToExit(WPARAM, LPARAM) db_set_w(NULL, "SimpleStatusMsg", szSetting, (WORD)CallProtoService(accounts->pa[i]->szModuleName, PS_GETSTATUS, 0, 0)); } - if (g_ptszWinampSong && lstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) /*&& db_get_b(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1)*/) + if (g_ptszWinampSong && mir_tstrcmp(g_ptszWinampSong, _T("SimpleStatusMsg")) /*&& db_get_b(NULL, "SimpleStatusMsg", "AmpLeaveTitle", 1)*/) DBWriteMessage("AmpLastTitle", g_ptszWinampSong); } diff --git a/plugins/SimpleStatusMsg/src/msgbox.cpp b/plugins/SimpleStatusMsg/src/msgbox.cpp index f0b8941f09..77079b465e 100644 --- a/plugins/SimpleStatusMsg/src/msgbox.cpp +++ b/plugins/SimpleStatusMsg/src/msgbox.cpp @@ -614,7 +614,7 @@ int AddToPredefined(HWND hwndDlg, struct MsgBoxData *data) newitem.pszText = text; SendMessage(data->recent_cbex, CBEM_GETITEM, 0, (LPARAM)&newitem); - if (LOWORD(newitem.lParam) == PREDEFINED_MSG && !lstrcmp(text, msg)) + if (LOWORD(newitem.lParam) == PREDEFINED_MSG && !mir_tstrcmp(text, msg)) return num_items; } @@ -1177,7 +1177,7 @@ INT_PTR CALLBACK AwayMsgBoxDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA for (int i = 1; i <= msgbox_data->max_hist_msgs; i++) { mir_snprintf(buff, SIZEOF(buff), "SMsg%d", i); if (!db_get_ts(NULL, "SimpleStatusMsg", buff, &dbv)) { - if (!lstrcmp(dbv.ptszVal, tszMsg)) { + if (!mir_tstrcmp(dbv.ptszVal, tszMsg)) { found = TRUE; if (msgbox_data->m_szProto) { mir_snprintf(buff2, SIZEOF(buff2), "Last%sMsg", msgbox_data->m_szProto); diff --git a/plugins/SmileyAdd/src/regexp/WCPattern.cpp b/plugins/SmileyAdd/src/regexp/WCPattern.cpp index 15ea5d5149..3081143e75 100644 --- a/plugins/SmileyAdd/src/regexp/WCPattern.cpp +++ b/plugins/SmileyAdd/src/regexp/WCPattern.cpp @@ -41,7 +41,7 @@ const unsigned long WCPattern::UNIX_LINE_MODE = 0x10; #define is_alpha IsCharAlphaW #if defined(_WIN32) -#define str_icmp lstrcmpiW +#define str_icmp mir_wstrcmpi #elif defined(__CYGWIN__) || defined(__APPLE__) #include static inline int str_icmp(const wchar_t * a, const wchar_t * b) diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index 10446dbfc2..8a1947424c 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -697,7 +697,7 @@ SmileyPackType* SmileyPackListType::GetSmileyPack(CMString& filename) for (int i=0; i < m_SmileyPacks.getCount(); i++) { CMString modpath1; pathToAbsolute(m_SmileyPacks[i].GetFilename(), modpath1); - if (lstrcmpi(modpath.c_str(), modpath1.c_str()) == 0) return &m_SmileyPacks[i]; + if (mir_tstrcmpi(modpath.c_str(), modpath1.c_str()) == 0) return &m_SmileyPacks[i]; } return NULL; } diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp index c794aca5f8..44597254e0 100644 --- a/plugins/SpellChecker/src/dictionary.cpp +++ b/plugins/SpellChecker/src/dictionary.cpp @@ -741,7 +741,7 @@ BOOL CALLBACK EnumLocalesProc(LPTSTR lpLocaleString) for (int i = 0; i < tmp_dicts->getCount(); i++) { Dictionary *dict = (*tmp_dicts)[i]; - if (lstrcmpi(dict->language, name) == 0) { + if (mir_tstrcmpi(dict->language, name) == 0) { GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SENGLANGUAGE, dict->english_name, SIZEOF(dict->english_name)); GetLocaleInfo(MAKELCID(langID, 0), LOCALE_SLANGUAGE, dict->localized_name, SIZEOF(dict->localized_name)); @@ -793,7 +793,7 @@ void GetDictsInfo(LIST &dicts) if (dict->localized_name[0] == _T('\0')) { for (size_t j = 0; j < SIZEOF(aditionalLanguages); j++) { - if (!lstrcmp(aditionalLanguages[j].language, dict->language)) { + if (!mir_tstrcmp(aditionalLanguages[j].language, dict->language)) { mir_tstrncpy(dict->localized_name, TranslateTS(aditionalLanguages[j].localized_name), SIZEOF(dict->localized_name)); break; } @@ -848,7 +848,7 @@ void GetHunspellDictionariesFromFolder(LIST &dicts, TCHAR *path, TCH // Check if dict is new bool exists = false; for (int i = 0; i < dicts.getCount() && !exists; i++) - if (lstrcmp(dicts[i]->language, lang) == 0) + if (mir_tstrcmp(dicts[i]->language, lang) == 0) exists = true; if (!exists) { @@ -899,7 +899,7 @@ void GetAvaibleDictionaries(LIST &dicts, TCHAR *path, TCHAR *user_pa key[cchValue] = 0; TCHAR *pos; if (pos = _tcsrchr(key, _T('\\'))) { - if (!lstrcmpi(&pos[1], otherHunspellApps[i].key)) { + if (!mir_tstrcmpi(&pos[1], otherHunspellApps[i].key)) { pos[0] = 0; lResult = ERROR_SUCCESS; break; @@ -927,7 +927,7 @@ void GetAvaibleDictionaries(LIST &dicts, TCHAR *path, TCHAR *user_pa // Sort dicts for (int i = 0; i < dicts.getCount(); i++) { for (int j = i + 1; j < dicts.getCount(); j++) { - if (lstrcmp(dicts[i]->full_name, dicts[j]->full_name) > 0) { + if (mir_tstrcmp(dicts[i]->full_name, dicts[j]->full_name) > 0) { Dictionary *dict = dicts[i]; sl->items[i] = dicts[j]; sl->items[j] = dict; diff --git a/plugins/SpellChecker/src/options.cpp b/plugins/SpellChecker/src/options.cpp index 99f9348962..ba60ccf58d 100644 --- a/plugins/SpellChecker/src/options.cpp +++ b/plugins/SpellChecker/src/options.cpp @@ -101,7 +101,7 @@ void LoadOptions() int i; for(i = 0; i < languages.getCount(); i++) - if (lstrcmp(languages[i]->language, opts.default_language) == 0) + if (mir_tstrcmp(languages[i]->language, opts.default_language) == 0) break; if (i >= languages.getCount()) @@ -180,7 +180,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_ADDSTRING, 0, (LPARAM)languages[i]->full_name); SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_SETITEMDATA, i, (LPARAM)languages[i]); - if ( !lstrcmp(opts.default_language, languages[i]->language)) + if ( !mir_tstrcmp(opts.default_language, languages[i]->language)) sel = i; } SendDlgItemMessage(hwndDlg, IDC_DEF_LANG, CB_SETCURSEL, sel, 0); @@ -379,7 +379,7 @@ static INT_PTR CALLBACK AutoreplaceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_ADDSTRING, 0, (LPARAM)p->full_name); SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETITEMDATA, i, (LPARAM)new AutoreplaceData(p)); - if ( !lstrcmp(opts.default_language, p->language)) + if ( !mir_tstrcmp(opts.default_language, p->language)) sel = i; } SendDlgItemMessage(hwndDlg, IDC_LANGUAGE, CB_SETCURSEL, sel, 0); diff --git a/plugins/SpellChecker/src/spellchecker.cpp b/plugins/SpellChecker/src/spellchecker.cpp index 1027a2a732..cbfab5dddf 100644 --- a/plugins/SpellChecker/src/spellchecker.cpp +++ b/plugins/SpellChecker/src/spellchecker.cpp @@ -188,7 +188,7 @@ static int ModulesLoaded(WPARAM, LPARAM) mir_sntprintf(filename, MAX_PATH, _T("%s\\%s.ar"), customDictionariesFolder, dict->language); dict->autoReplace = new AutoReplaceMap(filename, dict); - if (lstrcmp(dict->language, opts.default_language) == 0) + if (mir_tstrcmp(dict->language, opts.default_language) == 0) dict->load(); } diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index 6b29b3335e..ccf4baf5ee 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -684,7 +684,7 @@ int GetClosestLanguage(TCHAR *lang_name) // Search the language by name for (i = 0; i < languages.getCount(); i++) - if (lstrcmpi(languages[i]->language, lang_name) == 0) + if (mir_tstrcmpi(languages[i]->language, lang_name) == 0) return i; // Try searching by the prefix only @@ -697,7 +697,7 @@ int GetClosestLanguage(TCHAR *lang_name) // First check if there is a language that is only the prefix for (i = 0; i < languages.getCount(); i++) - if (lstrcmpi(languages[i]->language, lang) == 0) + if (mir_tstrcmpi(languages[i]->language, lang) == 0) return i; // Now try any suffix @@ -744,9 +744,9 @@ void GetUserProtoLanguageSetting(Dialog *dlg, MCONTACT hContact, char *group, ch for (int i = 0; i < languages.getCount(); i++) { Dictionary *dict = languages[i]; - if (lstrcmpi(dict->localized_name, lang) == 0 - || lstrcmpi(dict->english_name, lang) == 0 - || lstrcmpi(dict->language, lang) == 0) { + if (mir_tstrcmpi(dict->localized_name, lang) == 0 + || mir_tstrcmpi(dict->english_name, lang) == 0 + || mir_tstrcmpi(dict->language, lang) == 0) { mir_tstrncpy(dlg->lang_name, dict->language, SIZEOF(dlg->lang_name)); break; } diff --git a/plugins/SplashScreen/src/bitmap_funcs.cpp b/plugins/SplashScreen/src/bitmap_funcs.cpp index d7c489669d..18b3e7b108 100644 --- a/plugins/SplashScreen/src/bitmap_funcs.cpp +++ b/plugins/SplashScreen/src/bitmap_funcs.cpp @@ -210,7 +210,7 @@ bool MyBitmap::loadFromFile(TCHAR *fn, TCHAR *fnAlpha) TCHAR *ext; ext = &fn[mir_tstrlen(fn)-4]; - if (!lstrcmpi(ext, _T(".png"))) + if (!mir_tstrcmpi(ext, _T(".png"))) { HANDLE hFile, hMap = NULL; BYTE* ppMap = NULL; diff --git a/plugins/SplashScreen/src/main.cpp b/plugins/SplashScreen/src/main.cpp index 010e8a81fe..495d270d61 100644 --- a/plugins/SplashScreen/src/main.cpp +++ b/plugins/SplashScreen/src/main.cpp @@ -202,7 +202,7 @@ void SplashMain() logMessage(_T("Extention"), ext); #endif - if (lstrcmpi(ext, _T(".png")) & lstrcmpi(ext, _T(".bmp"))) + if (mir_tstrcmpi(ext, _T(".png")) & mir_tstrcmpi(ext, _T(".bmp"))) continue; #ifdef _DEBUG @@ -240,7 +240,7 @@ int PlugDisableHook(WPARAM wParam, LPARAM lParam) TCHAR * tszModule= mir_a2t(cws->szModule), *tszSetting = mir_a2t(cws->szSetting); if(options.inheritGS) { - if (!lstrcmp(tszModule, _T("Skin")) & !lstrcmp(tszSetting, _T("UseSound"))) + if (!mir_tstrcmp(tszModule, _T("Skin")) & !mir_tstrcmp(tszSetting, _T("UseSound"))) { db_set_b(NULL, MODNAME, "PlaySound", cws->value.bVal); #ifdef _DEBUG @@ -250,7 +250,7 @@ int PlugDisableHook(WPARAM wParam, LPARAM lParam) logMessage(_T("Value"), _itot(cws->value.bVal, buf, 10)); #endif } - if (!lstrcmp(tszModule, _T("PluginDisable")) & (!lstrcmp(tszSetting, szDllName))) + if (!mir_tstrcmp(tszModule, _T("PluginDisable")) & (!mir_tstrcmp(tszSetting, szDllName))) { db_set_b(NULL, MODNAME, "Active", cws->value.bVal); #ifdef _DEBUG diff --git a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp index 567feaea6d..33b130e1e7 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp @@ -34,7 +34,7 @@ int CompareSettings(const TAAAProtoSetting *p1, const TAAAProtoSetting *p2) { - return lstrcmpA(p1->szName, p2->szName); + return mir_strcmp(p1->szName, p2->szName); } TAAAProtoSettingList autoAwaySettings(10, CompareSettings); @@ -198,7 +198,7 @@ int OnAccChanged(WPARAM wParam, LPARAM lParam) case PRAC_REMOVED: for (int i = 0; i < autoAwaySettings.getCount(); i++) { - if (!lstrcmpA(autoAwaySettings[i].szName, pa->szModuleName)) { + if (!mir_strcmp(autoAwaySettings[i].szName, pa->szModuleName)) { autoAwaySettings.remove(i); break; } diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp index d1b2192697..163e48f237 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp @@ -42,7 +42,7 @@ static HWND hMessageWindow = NULL; static int CompareConnections( const TConnectionSettings *p1, const TConnectionSettings *p2 ) { - return lstrcmpA( p1->szName, p2->szName ); + return mir_strcmp( p1->szName, p2->szName ); } static OBJLIST connectionSettings( 10, CompareConnections ); @@ -226,7 +226,7 @@ static int AssignStatus(TConnectionSettings* cs, int status, int lastStatus, TCH log_infoA("KeepStatus: assigning status %d to %s", cs->status, cs->szName); - if ( szMsg != NULL && lstrcmp(szMsg, cs->szMsg)) { + if ( szMsg != NULL && mir_tstrcmp(szMsg, cs->szMsg)) { if ( cs->szMsg != NULL ) free(cs->szMsg); @@ -1107,7 +1107,7 @@ INT_PTR AnnounceStatusChangeService(WPARAM wParam, LPARAM lParam) for ( int i=0; i < connectionSettings.getCount(); i++ ) { TConnectionSettings& cs = connectionSettings[i]; - if ( !lstrcmpA( cs.szName, newSituation->szName )) + if ( !mir_strcmp( cs.szName, newSituation->szName )) AssignStatus(&cs, newSituation->status, newSituation->lastStatus, newSituation->szMsg); } @@ -1174,7 +1174,7 @@ int OnAccChanged(WPARAM wParam, LPARAM lParam) case PRAC_REMOVED: for (int i = 0; i < connectionSettings.getCount(); i++) { - if (!lstrcmpA(connectionSettings[i].szName, pa->szModuleName)) { + if (!mir_strcmp(connectionSettings[i].szName, pa->szModuleName)) { connectionSettings.remove(i); break; } diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp index f00a0a49dc..9065e97b43 100644 --- a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp +++ b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp @@ -23,7 +23,7 @@ static UINT_PTR setStatusTimerId = 0; int CompareSettings(const TSSSetting *p1, const TSSSetting *p2) { - return lstrcmpA(p1->szName, p2->szName); + return mir_strcmp(p1->szName, p2->szName); } static TSettingsList startupSettings(10, CompareSettings); @@ -191,7 +191,7 @@ int OnAccChanged(WPARAM wParam, LPARAM lParam) case PRAC_REMOVED: for (int i = 0; i < startupSettings.getCount(); i++) { - if (!lstrcmpA(startupSettings[i].szName, pa->szModuleName)) { + if (!mir_strcmp(startupSettings[i].szName, pa->szModuleName)) { startupSettings.remove(i); break; } diff --git a/plugins/StatusPlugins/confirmdialog.cpp b/plugins/StatusPlugins/confirmdialog.cpp index 04305df0b1..9813826bde 100644 --- a/plugins/StatusPlugins/confirmdialog.cpp +++ b/plugins/StatusPlugins/confirmdialog.cpp @@ -43,7 +43,7 @@ struct TConfirmSetting : public PROTOCOLSETTINGEX }; static int CompareSettings( const TConfirmSetting* p1, const TConfirmSetting* p2 ) -{ return lstrcmpA( p1->szName, p2->szName ); +{ return mir_strcmp( p1->szName, p2->szName ); } static OBJLIST *confirmSettings; diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp index d0779d747b..4d828d5c1c 100644 --- a/plugins/StopSpamPlus/src/events.cpp +++ b/plugins/StopSpamPlus/src/events.cpp @@ -106,7 +106,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) // if answer not empty if (answer.length() > 0) { // if message equal right answer... - if (plSets->AnswNotCaseSens.Get() ? !lstrcmpi(message.c_str(), answer.c_str()) : !lstrcmp(message.c_str(), answer.c_str())) { + if (plSets->AnswNotCaseSens.Get() ? !mir_tstrcmpi(message.c_str(), answer.c_str()) : !mir_tstrcmp(message.c_str(), answer.c_str())) { // unhide contact db_unset(hContact, "CList", "Hidden"); diff --git a/plugins/TabSRMM/src/chat/log.cpp b/plugins/TabSRMM/src/chat/log.cpp index cdc0a8af53..9bc5f5dc47 100644 --- a/plugins/TabSRMM/src/chat/log.cpp +++ b/plugins/TabSRMM/src/chat/log.cpp @@ -885,7 +885,7 @@ static char* Log_CreateRTF(LOGSTREAMDATA *streamData) mir_tstrncpy(szTimeStamp, pci->MakeTimeStamp(g_Settings.pszTimeStamp, lin->time), 30); mir_tstrncpy(szOldTimeStamp, pci->MakeTimeStamp(g_Settings.pszTimeStamp, streamData->si->LastTime), 30); - if (!g_Settings.bShowTimeIfChanged || streamData->si->LastTime == 0 || lstrcmp(szTimeStamp, szOldTimeStamp)) { + if (!g_Settings.bShowTimeIfChanged || streamData->si->LastTime == 0 || mir_tstrcmp(szTimeStamp, szOldTimeStamp)) { streamData->si->LastTime = lin->time; Log_AppendRTF(streamData, TRUE, &buffer, &bufferEnd, &bufferAlloced, _T("%s"), szTimeStamp); } diff --git a/plugins/TabSRMM/src/chat/manager.cpp b/plugins/TabSRMM/src/chat/manager.cpp index 500e5f394d..cd1fdeb004 100644 --- a/plugins/TabSRMM/src/chat/manager.cpp +++ b/plugins/TabSRMM/src/chat/manager.cpp @@ -35,7 +35,7 @@ static int sttCompareNicknames(const TCHAR *s1, const TCHAR *s2) if (*s1 && !*s2) return -1; // compare tails - return lstrcmpi(s1, s2); + return mir_tstrcmpi(s1, s2); } int UM_CompareItem(USERINFO *u1, const TCHAR* pszNick, WORD wStatus) @@ -52,7 +52,7 @@ int UM_CompareItem(USERINFO *u1, const TCHAR* pszNick, WORD wStatus) if (g_Settings.bAlternativeSorting) return sttCompareNicknames(u1->pszNick, pszNick); else - return lstrcmp(u1->pszNick, pszNick); + return mir_tstrcmp(u1->pszNick, pszNick); } dw1 = dw1 >> 1; dw2 = dw2 >> 1; @@ -60,7 +60,7 @@ int UM_CompareItem(USERINFO *u1, const TCHAR* pszNick, WORD wStatus) if (g_Settings.bAlternativeSorting) return sttCompareNicknames(u1->pszNick, pszNick); - return lstrcmp(u1->pszNick, pszNick); + return mir_tstrcmp(u1->pszNick, pszNick); } //--------------------------------------------------- @@ -113,9 +113,9 @@ SESSION_INFO* SM_FindSessionAutoComplete(const char* pszModule, SESSION_INFO* cu SESSION_INFO *pResult = NULL; for (SESSION_INFO *si = pci->wndList; si; si = si->next) - if (si != currSession && !lstrcmpiA(pszModule, si->pszModule)) + if (si != currSession && !mir_strcmpi(pszModule, si->pszModule)) if (my_strstri(si->ptszName, pszOriginal) == si->ptszName) - if (prevSession != si && lstrcmpi(si->ptszName, pszCurrent) > 0 && (!pszName || lstrcmpi(si->ptszName, pszName) < 0)) { + if (prevSession != si && mir_tstrcmpi(si->ptszName, pszCurrent) > 0 && (!pszName || mir_tstrcmpi(si->ptszName, pszName) < 0)) { pResult = si; pszName = si->ptszName; } diff --git a/plugins/TabSRMM/src/chat/muchighlight.cpp b/plugins/TabSRMM/src/chat/muchighlight.cpp index cd25c3d063..5e9059f823 100644 --- a/plugins/TabSRMM/src/chat/muchighlight.cpp +++ b/plugins/TabSRMM/src/chat/muchighlight.cpp @@ -307,7 +307,7 @@ INT_PTR CALLBACK CMUCHighlight::dlgProcAdd(HWND hwndDlg, UINT msg, WPARAM wParam Utils::showDlgControl(hwndDlg, IDC_ADDHIGHLIGHTEDITLIST, SW_HIDE); ::SetDlgItemText(hwndDlg, IDC_ADDHIGHLIGHTTITLE, TranslateT("Add user to highlight list")); ::SendDlgItemMessage(hwndDlg, IDC_ADDHIGHLIGHTNAME, CB_INSERTSTRING, -1, (LPARAM)the->ui->pszNick); - if ( lstrcmp(the->ui->pszNick, the->ui->pszUID)) + if ( mir_tstrcmp(the->ui->pszNick, the->ui->pszUID)) ::SendDlgItemMessage(hwndDlg, IDC_ADDHIGHLIGHTNAME, CB_INSERTSTRING, -1, (LPARAM)the->ui->pszUID); ::SendDlgItemMessage(hwndDlg, IDC_ADDHIGHLIGHTNAME, CB_SETCURSEL, 0, 0); } diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp index dcbb4947e2..7c121e34f1 100644 --- a/plugins/TabSRMM/src/chat/tools.cpp +++ b/plugins/TabSRMM/src/chat/tools.cpp @@ -663,7 +663,7 @@ char GetIndicator(SESSION_INFO *si, LPCTSTR ptszNick, int *iNickIndex) *iNickIndex = 0; for (USERINFO *ui = si->pUsers; ui; ui = ui->next) { - if (!lstrcmp(ui->pszNick, ptszNick)) { + if (!mir_tstrcmp(ui->pszNick, ptszNick)) { STATUSINFO *ti = pci->TM_FindStatus(si->pStatuses, pci->TM_WordToString(si->pStatuses, ui->Status)); if (ti && (int)ti->hIcon < si->iStatusCount) { if (iNickIndex) diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 1fb1a58d68..e867a9083f 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -2814,7 +2814,7 @@ LABEL_SHOWWINDOW: HMENU hMenu = 0; USERINFO uiNew; for (USERINFO *ui = si->pUsers; ui; ui = ui->next) { - if ( lstrcmp(ui->pszNick, tr.lpstrText)) + if ( mir_tstrcmp(ui->pszNick, tr.lpstrText)) continue; pt.x = (short) LOWORD(((ENLINK *) lParam)->lParam); diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 727a1d09ca..07af0eb40b 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -2167,7 +2167,7 @@ void TSAPI DeleteContainer(int iIndex) for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { ptrT tszValue(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY)); - if (!lstrcmp(tszValue, tszContainerName)) + if (!mir_tstrcmp(tszValue, tszContainerName)) db_unset(hContact, SRMSGMOD_T, CONTAINER_SUBKEY); } @@ -2201,7 +2201,7 @@ void TSAPI RenameContainer(int iIndex, const TCHAR *szNew) for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { ptrT tszValue(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY)); - if (!lstrcmp(tszValue, tszContainerName)) + if (!mir_tstrcmp(tszValue, tszContainerName)) db_set_ts(hContact, SRMSGMOD_T, CONTAINER_SUBKEY, szNew); } } diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 03d1ff2daf..01b222736d 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -417,11 +417,11 @@ int CGlobals::DBSettingChanged(WPARAM hContact, LPARAM lParam) } } - if (lstrcmpA(cws->szModule, "CList") && (szProto == NULL || lstrcmpA(cws->szModule, szProto))) + if (mir_strcmp(cws->szModule, "CList") && (szProto == NULL || mir_strcmp(cws->szModule, szProto))) return 0; - if (!lstrcmpA(cws->szModule, META_PROTO)) - if (hContact != 0 && !lstrcmpA(setting, "Nick")) // filter out this setting to avoid infinite loops while trying to obtain the most online contact + if (!mir_strcmp(cws->szModule, META_PROTO)) + if (hContact != 0 && !mir_strcmp(setting, "Nick")) // filter out this setting to avoid infinite loops while trying to obtain the most online contact return 0; if (hwnd) { diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index 511614cd6d..d4f2bf31ce 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -1106,7 +1106,7 @@ void Utils::AddToFileList(TCHAR ***pppFiles, int *totalCount, LPCTSTR szFilename mir_tstrcat(szPath, _T("\\*")); if ((hFind = FindFirstFile(szPath, &fd)) != INVALID_HANDLE_VALUE) { do { - if (!lstrcmp(fd.cFileName, _T(".")) || !lstrcmp(fd.cFileName, _T(".."))) + if (!mir_tstrcmp(fd.cFileName, _T(".")) || !mir_tstrcmp(fd.cFileName, _T(".."))) continue; mir_tstrcpy(szPath, szFilename); mir_tstrcat(szPath, _T("\\")); diff --git a/plugins/TipperYM/src/skin_parser.cpp b/plugins/TipperYM/src/skin_parser.cpp index 3a00979545..92bca196e0 100644 --- a/plugins/TipperYM/src/skin_parser.cpp +++ b/plugins/TipperYM/src/skin_parser.cpp @@ -131,21 +131,21 @@ void ParseImagePart(FILE *fp, TCHAR *buff, int iPart) } else if (_tcsstr(buff, _T("tm"))) { - if (!lstrcmpi(pch, _T("TM_NONE"))) + if (!mir_tstrcmpi(pch, _T("TM_NONE"))) opt.transfMode[iPart] = TM_NONE; - else if (!lstrcmpi(pch, _T("TM_CENTRE"))) + else if (!mir_tstrcmpi(pch, _T("TM_CENTRE"))) opt.transfMode[iPart] = TM_CENTRE; - else if (!lstrcmpi(pch, _T("TM_STRECH_ALL"))) + else if (!mir_tstrcmpi(pch, _T("TM_STRECH_ALL"))) opt.transfMode[iPart] = TM_STRECH_ALL; - else if (!lstrcmpi(pch, _T("TM_STRECH_HORIZONTAL"))) + else if (!mir_tstrcmpi(pch, _T("TM_STRECH_HORIZONTAL"))) opt.transfMode[iPart] = TM_STRECH_HORIZONTAL; - else if (!lstrcmpi(pch, _T("TM_STRECH_VERTICAL"))) + else if (!mir_tstrcmpi(pch, _T("TM_STRECH_VERTICAL"))) opt.transfMode[iPart] = TM_STRECH_VERTICAL; - else if (!lstrcmpi(pch, _T("TM_TILE_ALL"))) + else if (!mir_tstrcmpi(pch, _T("TM_TILE_ALL"))) opt.transfMode[iPart] = TM_TILE_ALL; - else if (!lstrcmpi(pch, _T("TM_TILE_HORIZONTAL"))) + else if (!mir_tstrcmpi(pch, _T("TM_TILE_HORIZONTAL"))) opt.transfMode[iPart] = TM_TILE_HORIZONTAL; - else if (!lstrcmpi(pch, _T("TM_TILE_VERTICAL"))) + else if (!mir_tstrcmpi(pch, _T("TM_TILE_VERTICAL"))) opt.transfMode[iPart] = TM_TILE_VERTICAL; else opt.transfMode[iPart] = TM_NONE; diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index 4a44de9750..70e78edfe0 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -211,9 +211,9 @@ int CTooltipNotify::ContactSettingChanged(WPARAM hContact, LPARAM lParam) return 0; bool idle = false; - if (lstrcmpA(cws->szSetting,"Status")==0) + if (mir_strcmp(cws->szSetting,"Status")==0) idle = false; - else if (lstrcmpA(cws->szSetting,"IdleTS")==0) + else if (mir_strcmp(cws->szSetting,"IdleTS")==0) idle = true; else return 0; diff --git a/plugins/TopToolBar/src/toolbar.cpp b/plugins/TopToolBar/src/toolbar.cpp index 762c533e1f..0a192da59b 100644 --- a/plugins/TopToolBar/src/toolbar.cpp +++ b/plugins/TopToolBar/src/toolbar.cpp @@ -134,7 +134,7 @@ static bool nameexists(const char *name) return false; for (int i = 0; i < Buttons.getCount(); i++) - if (!lstrcmpA(Buttons[i]->pszName, name)) + if (!mir_strcmp(Buttons[i]->pszName, name)) return true; return false; diff --git a/plugins/TrafficCounter/src/opttree.cpp b/plugins/TrafficCounter/src/opttree.cpp index 57e9dfdcaa..6f7c21e503 100644 --- a/plugins/TrafficCounter/src/opttree.cpp +++ b/plugins/TrafficCounter/src/opttree.cpp @@ -93,7 +93,7 @@ HTREEITEM OptTree_FindNamedTreeItemAt(HWND hwndTree, HTREEITEM hItem, const TCHA { TreeView_GetItem(hwndTree, &tvi); - if (!lstrcmp(tvi.pszText, name)) + if (!mir_tstrcmp(tvi.pszText, name)) return tvi.hItem; tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem); @@ -368,7 +368,7 @@ DWORD OptTree_GetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int op for (i = 0; i < optionCount; ++i) { if ((!options[i].szSettingName && !szSettingName) || - (options[i].szSettingName && szSettingName && !lstrcmpA(options[i].szSettingName, szSettingName))) + (options[i].szSettingName && szSettingName && !mir_strcmp(options[i].szSettingName, szSettingName))) { TVITEM tvi; tvi.mask = TVIF_HANDLE|TVIF_IMAGE; @@ -390,7 +390,7 @@ void OptTree_SetOptions(HWND hwnd, int idcTree, OPTTREE_OPTION *options, int opt for (i = 0; i < optionCount; ++i) { if ((!options[i].szSettingName && !szSettingName) || - (options[i].szSettingName && szSettingName && !lstrcmpA(options[i].szSettingName, szSettingName))) + (options[i].szSettingName && szSettingName && !mir_strcmp(options[i].szSettingName, szSettingName))) { TVITEM tvi; tvi.mask = TVIF_HANDLE|TVIF_IMAGE|TVIF_SELECTEDIMAGE; diff --git a/plugins/TranslitSwitcher/src/Layoutproc.cpp b/plugins/TranslitSwitcher/src/Layoutproc.cpp index f0d7764e0e..192010f6e5 100644 --- a/plugins/TranslitSwitcher/src/Layoutproc.cpp +++ b/plugins/TranslitSwitcher/src/Layoutproc.cpp @@ -386,10 +386,10 @@ VOID SwitchLayout(bool lastword) TCHAR szClassName[MAX_PATH]; GetClassName(hwnd2, szClassName, SIZEOF(szClassName)); - if ((lstrcmp(szClassName, _T("THppRichEdit.UnicodeClass")) == 0 || lstrcmp(szClassName, _T("THistoryGrid.UnicodeClass")) == 0 || lstrcmp(szClassName, _T("TExtHistoryGrid.UnicodeClass")) == 0 || lstrcmp(szClassName, _T("Internet Explorer_Server")) == 0) && ServiceExists(MS_POPUP_SHOWMESSAGE)) { // make popup here + if ((mir_tstrcmp(szClassName, _T("THppRichEdit.UnicodeClass")) == 0 || mir_tstrcmp(szClassName, _T("THistoryGrid.UnicodeClass")) == 0 || mir_tstrcmp(szClassName, _T("TExtHistoryGrid.UnicodeClass")) == 0 || mir_tstrcmp(szClassName, _T("Internet Explorer_Server")) == 0) && ServiceExists(MS_POPUP_SHOWMESSAGE)) { // make popup here TCHAR buf[2048]; - if (lstrcmp(szClassName, _T("Internet Explorer_Server")) == 0) { + if (mir_tstrcmp(szClassName, _T("Internet Explorer_Server")) == 0) { TCHAR *selected = 0; IEVIEWEVENT event; HWND hwnd3 = GetParent(GetParent(hwnd2)); @@ -447,7 +447,7 @@ VOID SwitchLayout(bool lastword) PUAddPopupT(&pd); } } - else if (lstrcmpi(szClassName, _T("RichEdit50W")) == 0) { + else if (mir_tstrcmpi(szClassName, _T("RichEdit50W")) == 0) { DWORD dwStart, dwEnd; size_t i, slen, start = 0, end = 0; TCHAR *sel, tchr; @@ -539,7 +539,7 @@ void TranslitLayout(bool lastword) GetClassName(hwnd2, szClassName, SIZEOF(szClassName)); - if (lstrcmpi(szClassName, _T("RichEdit50W")) == 0) { + if (mir_tstrcmpi(szClassName, _T("RichEdit50W")) == 0) { DWORD dwStart, dwEnd; size_t slen, start = 0, end = 0; TCHAR *sel, *boo = NULL; @@ -618,7 +618,7 @@ void InvertCase(bool lastword) GetClassName(hwnd2, szClassName, SIZEOF(szClassName)); - if (lstrcmpi(szClassName, _T("RichEdit50W")) == 0) { + if (mir_tstrcmpi(szClassName, _T("RichEdit50W")) == 0) { DWORD dwStart, dwEnd; size_t slen, start = 0, end = 0; TCHAR *sel, *boo = NULL; @@ -686,7 +686,7 @@ void InvertCase(bool lastword) int OnButtonPressed(WPARAM wParam, LPARAM lParam) { CustomButtonClickData *cbcd = (CustomButtonClickData *)lParam; - if (lstrcmpA(cbcd->pszModule, "Switch Layout and Send") == 0) { + if (mir_strcmp(cbcd->pszModule, "Switch Layout and Send") == 0) { HWND hEdit = GetDlgItem(cbcd->hwndFrom, IDC_MESSAGE); if (!hEdit) hEdit = GetDlgItem(cbcd->hwndFrom, IDC_CHATMESSAGE); @@ -760,7 +760,7 @@ int OnButtonPressed(WPARAM wParam, LPARAM lParam) mir_free(sel); return 1; } - if (lstrcmpA(cbcd->pszModule, "Translit and Send") == 0) { + if (mir_strcmp(cbcd->pszModule, "Translit and Send") == 0) { HWND hEdit = GetDlgItem(cbcd->hwndFrom, IDC_MESSAGE); if (!hEdit) hEdit = GetDlgItem(cbcd->hwndFrom, IDC_CHATMESSAGE); @@ -802,7 +802,7 @@ int OnButtonPressed(WPARAM wParam, LPARAM lParam) mir_free(sel); return 1; } - if (lstrcmpA(cbcd->pszModule, "Invert Case and Send") == 0) { + if (mir_strcmp(cbcd->pszModule, "Invert Case and Send") == 0) { HWND hEdit = GetDlgItem(cbcd->hwndFrom, IDC_MESSAGE); if (!hEdit) hEdit = GetDlgItem(cbcd->hwndFrom, IDC_CHATMESSAGE); diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp index 637c6472a4..31251d0c20 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp @@ -170,9 +170,9 @@ static int OnContactSettingChanged(WPARAM hContact, LPARAM lParam) /* user details update */ DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam; - if (!lstrcmpA(dbcws->szSetting, SET_CONTACT_COUNTRY) || - !lstrcmpA(dbcws->szSetting, SET_CONTACT_ORIGIN_COUNTRY) || - !lstrcmpA(dbcws->szSetting, SET_CONTACT_COMPANY_COUNTRY)) + if (!mir_strcmp(dbcws->szSetting, SET_CONTACT_COUNTRY) || + !mir_strcmp(dbcws->szSetting, SET_CONTACT_ORIGIN_COUNTRY) || + !mir_strcmp(dbcws->szSetting, SET_CONTACT_COMPANY_COUNTRY)) { /* Extra Image */ SetExtraImage(hContact); diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index 326d610276..304dc426ea 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -1336,13 +1336,13 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar break; } - if ( !lstrcmpA(pdbcws->szSetting, SET_CONTACT_MYHANDLE) || !lstrcmpA(pdbcws->szSetting, SET_CONTACT_NICK)) { + if ( !mir_strcmp(pdbcws->szSetting, SET_CONTACT_MYHANDLE) || !mir_strcmp(pdbcws->szSetting, SET_CONTACT_NICK)) { // force the update of all propertysheetpages DlgProc(hDlg, PSM_FORCECHANGED, NULL, NULL); // update the windowtitle DlgProc(hDlg, HM_SETWINDOWTITLE, NULL, lParam); } - else if ( !lstrcmpA(pdbcws->szModule, USERINFO) || !lstrcmpA(pdbcws->szModule, pPs->pszProto) || !lstrcmpA(pdbcws->szModule, MOD_MBIRTHDAY)) { + else if ( !mir_strcmp(pdbcws->szModule, USERINFO) || !mir_strcmp(pdbcws->szModule, pPs->pszProto) || !mir_strcmp(pdbcws->szModule, MOD_MBIRTHDAY)) { // force the update of all propertysheetpages DlgProc(hDlg, PSM_FORCECHANGED, NULL, NULL); } diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp index 2b4fd52fc3..bc44363ab4 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp @@ -489,7 +489,7 @@ BYTE CExImContactBase::isHandle(MCONTACT hContact) // compare protocols pszProto = DB::Contact::Proto(hContact); - if (pszProto == NULL || (INT_PTR)pszProto == CALLSERVICE_NOTFOUND || lstrcmpA(pszProto, _pszProto)) + if (pszProto == NULL || (INT_PTR)pszProto == CALLSERVICE_NOTFOUND || mir_strcmp(pszProto, _pszProto)) return FALSE; // compare uids diff --git a/plugins/UserInfoEx/src/psp_about.cpp b/plugins/UserInfoEx/src/psp_about.cpp index aec494654a..2ee8e1fc78 100644 --- a/plugins/UserInfoEx/src/psp_about.cpp +++ b/plugins/UserInfoEx/src/psp_about.cpp @@ -42,7 +42,7 @@ INT_PTR CALLBACK PSPProcEdit(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam, PSGetBoldFont(hDlg, hBoldFont); SendDlgItemMessage(hDlg, IDC_PAGETITLE, WM_SETFONT, (WPARAM)hBoldFont, 0); - if (!lstrcmpA(pszSetting, SET_CONTACT_MYNOTES)) + if (!mir_strcmp(pszSetting, SET_CONTACT_MYNOTES)) SetDlgItemText(hDlg, IDC_PAGETITLE, LPGENT("My notes:")); else SetDlgItemText(hDlg, IDC_PAGETITLE, LPGENT("About:")); diff --git a/plugins/UserInfoEx/src/svc_constants.cpp b/plugins/UserInfoEx/src/svc_constants.cpp index 8e97677eb6..9cd745643a 100644 --- a/plugins/UserInfoEx/src/svc_constants.cpp +++ b/plugins/UserInfoEx/src/svc_constants.cpp @@ -254,7 +254,7 @@ static UINT MyCountriesCount = 0; static int __cdecl ListSortProc(const LPIDSTRLIST p1, const LPIDSTRLIST p2) { - return lstrcmpi(p1->ptszTranslated, p2->ptszTranslated); + return mir_tstrcmpi(p1->ptszTranslated, p2->ptszTranslated); } /** diff --git a/plugins/UserInfoEx/src/svc_gender.cpp b/plugins/UserInfoEx/src/svc_gender.cpp index 0582c9c82d..c440d15f3a 100644 --- a/plugins/UserInfoEx/src/svc_gender.cpp +++ b/plugins/UserInfoEx/src/svc_gender.cpp @@ -92,7 +92,7 @@ static int OnCListApplyIcons(MCONTACT hContact, LPARAM) static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdbcws) { - if (hContact && pdbcws && (pdbcws->value.type <= DBVT_BYTE) && !lstrcmpA(pdbcws->szSetting, SET_CONTACT_GENDER)) + if (hContact && pdbcws && (pdbcws->value.type <= DBVT_BYTE) && !mir_strcmp(pdbcws->szSetting, SET_CONTACT_GENDER)) OnCListApplyIcons(hContact, 0); return 0; diff --git a/plugins/UserInfoEx/src/svc_timezone_old.cpp b/plugins/UserInfoEx/src/svc_timezone_old.cpp index a5052f2b3d..5ebe29ec83 100644 --- a/plugins/UserInfoEx/src/svc_timezone_old.cpp +++ b/plugins/UserInfoEx/src/svc_timezone_old.cpp @@ -91,8 +91,8 @@ class CTzBias : public LIST { int result = tz2->Bias - tz1->Bias; // DO NOT USE mir_tcsicmp here as it does only return TRUE or FALSE!!! - // lstrcmpi takes care of umlauts e.g. Ä,Ö,.... - return (result || !tz1->ptszDisplay || !tz2->ptszDisplay) ? result : lstrcmpi(tz1->ptszDisplay, tz2->ptszDisplay); + // mir_tstrcmpi takes care of umlauts e.g. Ä,Ö,.... + return (result || !tz1->ptszDisplay || !tz2->ptszDisplay) ? result : mir_tstrcmpi(tz1->ptszDisplay, tz2->ptszDisplay); } public: CTzBias() : LIST(50, (FTSortFunc) CTzBias::sortFunc) diff --git a/plugins/Utils/mir_options.cpp b/plugins/Utils/mir_options.cpp index 59b9ff6748..d8f90efedf 100644 --- a/plugins/Utils/mir_options.cpp +++ b/plugins/Utils/mir_options.cpp @@ -270,7 +270,7 @@ INT_PTR CALLBACK SaveOptsDlgProc(OptPageControl *controls, int controlsSize, cha int i; for (i = 0; i < count; i++) { TCHAR *id = (TCHAR *)SendDlgItemMessage(hwndDlg, ctrl->nID, CB_GETITEMDATA, (WPARAM)i, 0); - if (lstrcmp(id, tmp) == 0) + if (mir_tstrcmp(id, tmp) == 0) break; } if (i < count) diff --git a/plugins/Variables/src/variables.cpp b/plugins/Variables/src/variables.cpp index 7e79114115..fe0899d6ad 100644 --- a/plugins/Variables/src/variables.cpp +++ b/plugins/Variables/src/variables.cpp @@ -237,7 +237,7 @@ static TCHAR* replaceDynVars(TCHAR* szTemplate, FORMATINFO* fi) tr = NULL; if (*cur==FIELD_CHAR) { for(i = 0; i < fi->cbTemporaryVarsSize; i += 2) { - if (lstrcmp(fi->tszaTemporaryVars[i], token) == 0) { + if (mir_tstrcmp(fi->tszaTemporaryVars[i], token) == 0) { tmpVarPos = i; break; } diff --git a/plugins/WebView/src/webview.cpp b/plugins/WebView/src/webview.cpp index 61904d5a9e..51387e5908 100644 --- a/plugins/WebView/src/webview.cpp +++ b/plugins/WebView/src/webview.cpp @@ -178,7 +178,7 @@ int Doubleclick(WPARAM wParam, LPARAM lParam) { MCONTACT hContact = wParam; char *szProto = GetContactProto(hContact); - if ( lstrcmpA(MODULENAME, szProto)) + if ( mir_strcmp(MODULENAME, szProto)) return 0; int action = db_get_b(hContact, MODULENAME, DBLE_WIN_KEY, 1); diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp index 2731f9a263..ea05a9142c 100644 --- a/plugins/WebView/src/webview_datawnd.cpp +++ b/plugins/WebView/src/webview_datawnd.cpp @@ -132,7 +132,7 @@ static MCONTACT FindContactByUrl(HWND hwndDlg) ptrT db1( db_get_tsa(hContact, MODULENAME, URL_KEY)); ptrT db2( db_get_tsa(hContact, MODULENAME, PRESERVE_NAME_KEY)); - if (!lstrcmp(urltext, db1) && !lstrcmp(titlebartxt, db2)) { + if (!mir_tstrcmp(urltext, db1) && !mir_tstrcmp(titlebartxt, db2)) { contactcount++; if (contactcount > 1) { MessageBox(NULL, TranslateT("ERROR: You have two or more Webview contacts with the same URL and contact name."), _T(MODULENAME), MB_OK); diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp index 924b8ab9e6..998ec84c8b 100644 --- a/plugins/WebView/src/webview_services.cpp +++ b/plugins/WebView/src/webview_services.cpp @@ -97,7 +97,7 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam) FILE *pcachefile = _tfopen(newcachepath, _T("r")); if (pcachefile != NULL) { fclose(pcachefile); - if (lstrcmp(newcachepath, renamedcachepath)) { + if (mir_tstrcmp(newcachepath, renamedcachepath)) { MoveFile(newcachepath, renamedcachepath); db_set_ts(hContact, MODULENAME, CACHE_FILE_KEY, renamedcachepath); } @@ -112,7 +112,7 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam) int SiteDeleted(WPARAM wParam, LPARAM lParam) { MCONTACT hContact = wParam; - if (lstrcmpA(GetContactProto(hContact), MODULENAME)) + if (mir_strcmp(GetContactProto(hContact), MODULENAME)) return 0; ptrT contactName( db_get_tsa(hContact, MODULENAME, PRESERVE_NAME_KEY)); @@ -355,7 +355,7 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam) // check ID to see if the contact already exist in the database if (db_get_ts(hContact, MODULENAME, "URL", &dbv)) continue; - if (!lstrcmpi(psr->nick, dbv.ptszVal)) { + if (!mir_tstrcmpi(psr->nick, dbv.ptszVal)) { // remove the flag for not on list and hidden, thus make the // contact visible // and add them on the list @@ -406,7 +406,7 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam) for (MCONTACT hContact2 = db_find_first(MODULENAME); hContact2 != NULL; hContact2 = db_find_next(hContact2, MODULENAME)) { if (!db_get_ts(hContact2, MODULENAME, PRESERVE_NAME_KEY, &dbv)) { - if (!lstrcmpi(Newnick, dbv.ptszVal)) { + if (!mir_tstrcmpi(Newnick, dbv.ptszVal)) { // remove the flag for not on list and hidden, thus make the // contact visible // and add them on the list diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp index f77ce80ac3..2da59d9130 100644 --- a/plugins/XSoundNotify/src/dialog.cpp +++ b/plugins/XSoundNotify/src/dialog.cpp @@ -80,7 +80,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact); if (p != NULL) { - if (lstrcmpi(p->path, _T(""))) { + if (mir_tstrcmpi(p->path, _T(""))) { TCHAR shortpath[MAX_PATH]; PathToRelativeT(p->path, shortpath); db_set_ts(hContact, SETTINGSNAME, SETTINGSKEY, shortpath); diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp index f7df767ace..187a76704a 100644 --- a/plugins/XSoundNotify/src/options.cpp +++ b/plugins/XSoundNotify/src/options.cpp @@ -215,7 +215,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l switch (hdr->code) { case PSN_APPLY: for (int i = 0; i < XSN_Users.getCount(); i++) { - if (lstrcmpi(XSN_Users[i]->path, _T(""))) { + if (mir_tstrcmpi(XSN_Users[i]->path, _T(""))) { TCHAR shortpath[MAX_PATH]; PathToRelativeT(XSN_Users[i]->path, shortpath); db_set_ts(XSN_Users[i]->hContact, SETTINGSNAME, SETTINGSKEY, shortpath); diff --git a/plugins/YAMN/src/mails/mails.cpp b/plugins/YAMN/src/mails/mails.cpp index 70fa4f8321..c3e3a85130 100644 --- a/plugins/YAMN/src/mails/mails.cpp +++ b/plugins/YAMN/src/mails/mails.cpp @@ -362,7 +362,7 @@ HYAMNMAIL WINAPI FindMessageByIDFcn(HYAMNMAIL From,char *ID) HYAMNMAIL Browser; for (Browser=From;Browser != NULL;Browser=Browser->Next) - if (0==lstrcmpA(Browser->ID,ID)) + if (0==mir_strcmp(Browser->ID,ID)) break; return Browser; } diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp index 369940ae67..7f21cc5ffe 100644 --- a/plugins/YAMN/src/main.cpp +++ b/plugins/YAMN/src/main.cpp @@ -224,7 +224,7 @@ static void LoadPlugins() TCHAR* end = fd.cFileName+len; // get a pointer to the NULL int safe = (end-dot)-1; // figure out how many chars after the dot are "safe", not including NULL - if ((safe != 3) || (lstrcmpi(dot+1, _T("dll")) != 0)) //not bound, however the "dll" string should mean only 3 chars are compared + if ((safe != 3) || (mir_tstrcmpi(dot+1, _T("dll")) != 0)) //not bound, however the "dll" string should mean only 3 chars are compared continue; TCHAR szPluginPath[MAX_PATH]; diff --git a/plugins/YAMN/src/services.cpp b/plugins/YAMN/src/services.cpp index cb158fdc9e..84a5915b4f 100644 --- a/plugins/YAMN/src/services.cpp +++ b/plugins/YAMN/src/services.cpp @@ -66,7 +66,7 @@ static int Service_ContactDoubleclicked(WPARAM wParam, LPARAM lParam) static INT_PTR ContactApplication(WPARAM wParam, LPARAM lParam) { char *szProto = GetContactProto(wParam); - if ( lstrcmpA(szProto, YAMN_DBMODULE)) + if ( mir_strcmp(szProto, YAMN_DBMODULE)) return 0; DBVARIANT dbv; @@ -169,7 +169,7 @@ static INT_PTR AccountMailCheck(WPARAM wParam, LPARAM lParam) static INT_PTR ContactMailCheck(WPARAM hContact, LPARAM lParam) { char *szProto = GetContactProto(hContact); - if ( lstrcmpA(szProto, YAMN_DBMODULE)) + if ( mir_strcmp(szProto, YAMN_DBMODULE)) return 0; DBVARIANT dbv; @@ -228,7 +228,7 @@ void MainMenuAccountClicked(WPARAM wParam, LPARAM lParam) /*static*/ void ContactDoubleclicked(WPARAM wParam, LPARAM lParam) { char *szProto = GetContactProto(wParam); - if ( lstrcmpA(szProto, YAMN_DBMODULE)) + if ( mir_strcmp(szProto, YAMN_DBMODULE)) return; DBVARIANT dbv; diff --git a/plugins/YAMN/src/yamn.cpp b/plugins/YAMN/src/yamn.cpp index fa171f0dd4..b9ee9b87aa 100644 --- a/plugins/YAMN/src/yamn.cpp +++ b/plugins/YAMN/src/yamn.cpp @@ -60,31 +60,31 @@ INT_PTR GetFcnPtrSvc(WPARAM wParam, LPARAM lParam) register int i; for (i=0;iszModule, "Skin") || lstrcmpA(cws->szSetting, "UseSound")) + if(mir_strcmp(cws->szModule, "Skin") || mir_strcmp(cws->szSetting, "UseSound")) return 0; UpdateMenuItem(); diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp index 47411f8f92..c985e8adf2 100644 --- a/plugins/wbOSD/src/events.cpp +++ b/plugins/wbOSD/src/events.cpp @@ -77,7 +77,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) logmsg("ContactSettingChanged1"); - if(hContact==NULL || lstrcmpA(cws->szSetting,"Status")) return 0; + if(hContact==NULL || mir_strcmp(cws->szSetting,"Status")) return 0; WORD newStatus = cws->value.wVal; WORD oldStatus = DBGetContactSettingRangedWord(hContact,"UserOnline","OldStatus2",ID_STATUS_OFFLINE, ID_STATUS_MIN, ID_STATUS_MAX); 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] == '=') { diff --git a/src/core/stdclist/src/clcpaint.cpp b/src/core/stdclist/src/clcpaint.cpp index d312d5ce4a..49be0fca84 100644 --- a/src/core/stdclist/src/clcpaint.cpp +++ b/src/core/stdclist/src/clcpaint.cpp @@ -132,7 +132,7 @@ static int GetRealStatus(struct ClcContact *contact, int status) return status; for (int i = 0; i < pcli->hClcProtoCount; i++) - if (!lstrcmpA(pcli->clcProto[i].szProto, szProto)) + if (!mir_strcmp(pcli->clcProto[i].szProto, szProto)) return pcli->clcProto[i].dwStatus; return status; diff --git a/src/core/stdclist/src/clistopts.cpp b/src/core/stdclist/src/clistopts.cpp index 4bff8fb660..68fb593cf6 100644 --- a/src/core/stdclist/src/clistopts.cpp +++ b/src/core/stdclist/src/clistopts.cpp @@ -31,7 +31,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP MCONTACT hContact = wParam; DBCONTACTWRITESETTING *ws = (DBCONTACTWRITESETTING *) lParam; if (hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL && - lstrcmpiA(ws->szModule, "CList") == 0 && lstrcmpiA(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) + mir_strcmpi(ws->szModule, "CList") == 0 && mir_strcmpi(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) { CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, ws->value.bVal == 0); } @@ -133,7 +133,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP continue; item = SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_ADDSTRING, 0, (LPARAM) accs[i]->tszAccountName); SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETITEMDATA, item, (LPARAM) accs[i]); - if (dbv.type == DBVT_ASCIIZ && !lstrcmpA(dbv.pszVal, accs[i]->szModuleName)) + if (dbv.type == DBVT_ASCIIZ && !mir_strcmp(dbv.pszVal, accs[i]->szModuleName)) SendDlgItemMessage(hwndDlg, IDC_PRIMARYSTATUS, CB_SETCURSEL, item, 0); } db_free(&dbv); diff --git a/src/core/stdfile/fileexistsdlg.cpp b/src/core/stdfile/fileexistsdlg.cpp index 4bf7da405a..bf44d2e70b 100644 --- a/src/core/stdfile/fileexistsdlg.cpp +++ b/src/core/stdfile/fileexistsdlg.cpp @@ -161,7 +161,7 @@ void __cdecl LoadIconsAndTypesThread(void* param) SetDlgItemText(info->hwndDlg, IDC_NEWTYPE, fileInfo.szTypeName); SendDlgItemMessage(info->hwndDlg, IDC_EXISTINGICON, STM_SETICON, (WPARAM)fileInfo.hIcon, 0); szIconFile[0] = '\0'; - if (!lstrcmp(szExtension, _T("EXE"))) + if (!mir_tstrcmp(szExtension, _T("EXE"))) SRFile_GetRegValue(HKEY_LOCAL_MACHINE, _T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Icons"), _T("2"), szIconFile, SIZEOF(szIconFile)); else { TCHAR szTypeName[MAX_PATH]; diff --git a/src/core/stdurl/url.cpp b/src/core/stdurl/url.cpp index 40cb58fcda..26775df7af 100644 --- a/src/core/stdurl/url.cpp +++ b/src/core/stdurl/url.cpp @@ -98,7 +98,7 @@ static int ContactSettingChanged(WPARAM wParam, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; char *szProto = GetContactProto(wParam); - if (lstrcmpA(cws->szModule, "CList") && (szProto == NULL || lstrcmpA(cws->szModule, szProto))) + if (mir_strcmp(cws->szModule, "CList") && (szProto == NULL || mir_strcmp(cws->szModule, szProto))) return 0; WindowList_Broadcast(hUrlWindowList, DM_UPDATETITLE, 0, 0); diff --git a/src/core/stdurl/urldialogs.cpp b/src/core/stdurl/urldialogs.cpp index 1e11c7b2c5..779055f238 100644 --- a/src/core/stdurl/urldialogs.cpp +++ b/src/core/stdurl/urldialogs.cpp @@ -73,7 +73,7 @@ static void sttUpdateTitle(HWND hwndDlg, MCONTACT hContact) GetWindowText(hwndDlg, oldtitle, SIZEOF(oldtitle)); - if (lstrcmp(newtitle, oldtitle)) //swt() flickers even if the title hasn't actually changed + if (mir_tstrcmp(newtitle, oldtitle)) //swt() flickers even if the title hasn't actually changed SetWindowText(hwndDlg, newtitle); } @@ -352,7 +352,7 @@ static void AddBrowserPageToCombo(char *url, HWND hwndCombo) if (SendMessage(hwndCombo, CB_GETLBTEXTLEN, i, 0) >= SIZEOF(szExistingUrl)) continue; SendMessageA(hwndCombo, CB_GETLBTEXT, i, (LPARAM)szExistingUrl); - if ( !lstrcmpA(szExistingUrl, url)) return; + if ( !mir_strcmp(szExistingUrl, url)) return; } i = SendMessageA(hwndCombo, CB_ADDSTRING, 0, (LPARAM)url); szItemData = mir_strdup(title); diff --git a/src/core/stduserinfo/contactinfo.cpp b/src/core/stduserinfo/contactinfo.cpp index 1d78f2cc13..06a9a6c2e7 100644 --- a/src/core/stduserinfo/contactinfo.cpp +++ b/src/core/stduserinfo/contactinfo.cpp @@ -68,7 +68,7 @@ static INT_PTR CALLBACK EditUserPhoneDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam); if (szText[0]) SetWindowText(hwndDlg, TranslateT("Edit phone number")); TranslateDialogDefault(hwndDlg); - if (mir_strlen(szText)>4 && !lstrcmpA(szText+mir_strlen(szText)-4, " SMS")) { + if (mir_strlen(szText)>4 && !mir_strcmp(szText+mir_strlen(szText)-4, " SMS")) { CheckDlgButton(hwndDlg, IDC_SMS, BST_CHECKED); szText[mir_strlen(szText)-4] = '\0'; } @@ -328,7 +328,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if ( !db_get_ts(hContact, szProto, "Cellular", &dbv)) { lvi.pszText = TranslateT("Mobile"); ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi); - if (mir_strlen(dbv.pszVal)>4 && !lstrcmpA(dbv.pszVal+mir_strlen(dbv.pszVal)-4, " SMS")) { + if (mir_strlen(dbv.pszVal)>4 && !mir_strcmp(dbv.pszVal+mir_strlen(dbv.pszVal)-4, " SMS")) { ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 2, _T("y")); dbv.ptszVal[mir_tstrlen(dbv.ptszVal)-4] = '\0'; } @@ -359,7 +359,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP lvi.pszText = idstr2; mir_sntprintf(idstr2, SIZEOF(idstr2), TranslateT("Custom %d"), i+1); ListView_InsertItem(GetDlgItem(hwndDlg, IDC_PHONES), &lvi); - if (mir_tstrlen(dbv.ptszVal)>4 && !lstrcmp(dbv.ptszVal+mir_tstrlen(dbv.ptszVal)-4, _T(" SMS"))) { + if (mir_tstrlen(dbv.ptszVal)>4 && !mir_tstrcmp(dbv.ptszVal+mir_tstrlen(dbv.ptszVal)-4, _T(" SMS"))) { ListView_SetItemText(GetDlgItem(hwndDlg, IDC_PHONES), lvi.iItem, 2, _T("y")); dbv.ptszVal[mir_tstrlen(dbv.ptszVal)-4] = '\0'; } diff --git a/src/core/stduserinfo/userinfo.cpp b/src/core/stduserinfo/userinfo.cpp index 4c49f3ab64..e3a48d3837 100644 --- a/src/core/stduserinfo/userinfo.cpp +++ b/src/core/stduserinfo/userinfo.cpp @@ -78,18 +78,18 @@ static int PageSortProc(OPTIONSDIALOGPAGE *item1, OPTIONSDIALOGPAGE *item2) { int res; TCHAR *s1 = getTitle(item1), *s2 = getTitle(item2); - if (!lstrcmp(s1, TranslateT("Summary"))) return -1; - if (!lstrcmp(s2, TranslateT("Summary"))) return 1; - if (res = lstrcmp(s1, s2)) return res; + if (!mir_tstrcmp(s1, TranslateT("Summary"))) return -1; + if (!mir_tstrcmp(s2, TranslateT("Summary"))) return 1; + if (res = mir_tstrcmp(s1, s2)) return res; s1 = getTab(item1), s2 = getTab(item2); if (s1 && !s2) return -1; if (!s1 && s2) return 1; if (!s1 && !s2) return 0; - if (s1 && !lstrcmp(s1, TranslateT("General"))) return -1; - if (s2 && !lstrcmp(s2, TranslateT("General"))) return 1; - return lstrcmp(s1, s2); + if (s1 && !mir_tstrcmp(s1, TranslateT("General"))) return -1; + if (s2 && !mir_tstrcmp(s2, TranslateT("General"))) return 1; + return mir_tstrcmp(s1, s2); } static INT_PTR ShowDetailsDialogCommand(WPARAM wParam, LPARAM) @@ -182,13 +182,13 @@ static void CreateDetailsTabs(HWND hwndDlg, DetailsData *dat, DetailsPageData *p TabCtrl_DeleteAllItems(hwndTab); for (int i = 0; i < dat->pageCount; i++) { DetailsPageData &odp = dat->opd[i]; - if (!odp.ptszTab || lstrcmp(odp.ptszTitle, ppg->ptszTitle)) + if (!odp.ptszTab || mir_tstrcmp(odp.ptszTitle, ppg->ptszTitle)) continue; tie.pszText = TranslateTH(odp.hLangpack, odp.ptszTab); tie.lParam = i; TabCtrl_InsertItem(hwndTab, pages, &tie); - if (!lstrcmp(odp.ptszTab, ppg->ptszTab)) + if (!mir_tstrcmp(odp.ptszTab, ppg->ptszTab)) sel = pages; pages++; } @@ -299,7 +299,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP p.ptszTab = odp[i].ptszTab; p.hLangpack = odp[i].hLangpack; - if (i && p.ptszTab && !lstrcmp(dat->opd[i - 1].ptszTitle, p.ptszTitle)) { + if (i && p.ptszTab && !mir_tstrcmp(dat->opd[i - 1].ptszTitle, p.ptszTitle)) { p.hItem = dat->opd[i - 1].hItem; continue; } @@ -313,7 +313,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP tvis.item.pszText = p.ptszTitle; else tvis.item.pszText = TranslateTH(p.hLangpack, p.ptszTitle); - if (ptszLastTab && !lstrcmp(tvis.item.pszText, ptszLastTab)) + if (ptszLastTab && !mir_tstrcmp(tvis.item.pszText, ptszLastTab)) dat->currentPage = i; p.hItem = TreeView_InsertItem(hwndTree, &tvis); } diff --git a/src/mir_core/langpack.cpp b/src/mir_core/langpack.cpp index 7401c0d991..b5488e7d2f 100644 --- a/src/mir_core/langpack.cpp +++ b/src/mir_core/langpack.cpp @@ -308,7 +308,7 @@ static int LoadLangDescr(LANGPACK_INFO &lpinfo, FILE *fp, char *line, int &start memmove(line, line + 3, lineLen - 2); lrtrim(line); - if (lstrcmpA(line, "Miranda Language Pack Version 1")) + if (mir_strcmp(line, "Miranda Language Pack Version 1")) return 2; // headers @@ -329,24 +329,24 @@ static int LoadLangDescr(LANGPACK_INFO &lpinfo, FILE *fp, char *line, int &start return 3; *pszColon++ = 0; - if (!lstrcmpA(line, "Language")) { + if (!mir_strcmp(line, "Language")) { mir_snprintf(szLanguage, sizeof(szLanguage), "%s", pszColon); lrtrim(szLanguage); } - else if (!lstrcmpA(line, "Last-Modified-Using")) { + else if (!mir_strcmp(line, "Last-Modified-Using")) { lpinfo.szLastModifiedUsing = pszColon; lpinfo.szLastModifiedUsing.Trim(); } - else if (!lstrcmpA(line, "Authors")) { + else if (!mir_strcmp(line, "Authors")) { if (!szAuthors.IsEmpty()) szAuthors.AppendChar(' '); szAuthors.Append(lrtrim(pszColon)); } - else if (!lstrcmpA(line, "Author-email")) { + else if (!mir_strcmp(line, "Author-email")) { lpinfo.szAuthorEmail = pszColon; lpinfo.szAuthorEmail.Trim(); } - else if (!lstrcmpA(line, "Locale")) { + else if (!mir_strcmp(line, "Locale")) { char szBuf[20], *stopped; lrtrim(pszColon + 1); @@ -373,7 +373,7 @@ static int LoadLangDescr(LANGPACK_INFO &lpinfo, FILE *fp, char *line, int &start MIR_CORE_DLL(int) LoadLangPack(const TCHAR *ptszLangPack) { - if (ptszLangPack == NULL || !lstrcmpi(ptszLangPack, _T(""))) + if (ptszLangPack == NULL || !mir_tstrcmpi(ptszLangPack, _T(""))) return 1; // ensure that a lang's name is a full file name @@ -384,7 +384,7 @@ MIR_CORE_DLL(int) LoadLangPack(const TCHAR *ptszLangPack) _tcsncpy_s(tszFullPath, ptszLangPack, _TRUNCATE); // this lang is already loaded? nothing to do then - if (!lstrcmp(tszFullPath, langPack.tszFullPath)) + if (!mir_tstrcmp(tszFullPath, langPack.tszFullPath)) return 0; // ok... loading a new langpack. remove the old one if needed @@ -568,9 +568,9 @@ static BOOL CALLBACK TranslateDialogEnumProc(HWND hwnd, LPARAM lParam) MUUID *uuid = Langpack_LookupUuid(hLangpack); GetClassName(hwnd, szClass, SIZEOF(szClass)); - if (!lstrcmpi(szClass, _T("static")) || !lstrcmpi(szClass, _T("hyperlink")) || !lstrcmpi(szClass, _T("button")) || !lstrcmpi(szClass, _T("MButtonClass")) || !lstrcmpi(szClass, _T("MHeaderbarCtrl"))) + if (!mir_tstrcmpi(szClass, _T("static")) || !mir_tstrcmpi(szClass, _T("hyperlink")) || !mir_tstrcmpi(szClass, _T("button")) || !mir_tstrcmpi(szClass, _T("MButtonClass")) || !mir_tstrcmpi(szClass, _T("MHeaderbarCtrl"))) TranslateWindow(uuid, hwnd); - else if (!lstrcmpi(szClass, _T("edit"))) { + else if (!mir_tstrcmpi(szClass, _T("edit"))) { if (GetWindowLongPtr(hwnd, GWL_STYLE) & ES_READONLY) TranslateWindow(uuid, hwnd); } @@ -648,7 +648,7 @@ void GetDefaultLang() PathToAbsoluteT(_T("\\mirandaboot.ini"), tszPath); GetPrivateProfileString(_T("Language"), _T("DefaultLanguage"), _T(""), tszDefaultLang, SIZEOF(tszDefaultLang), tszPath); - if (!lstrcmpi(tszDefaultLang, _T("default"))) { + if (!mir_tstrcmpi(tszDefaultLang, _T("default"))) { db_set_ts(NULL, "Langpack", "Current", _T("default")); return; } diff --git a/src/mir_core/utils.cpp b/src/mir_core/utils.cpp index 5e9c640c4e..10348a28f1 100644 --- a/src/mir_core/utils.cpp +++ b/src/mir_core/utils.cpp @@ -377,35 +377,35 @@ MIR_CORE_DLL(wchar_t*) mir_wstrncat(wchar_t *dest, const wchar_t *src, size_t le MIR_CORE_DLL(int) mir_strcmp(const char *p1, const char *p2) { if (p1 == NULL) - return (p2 == NULL) ? 0 : 1; + return (p2 == NULL) ? 0 : -1; if (p2 == NULL) - return -1; + return 1; return strcmp(p1, p2); } MIR_CORE_DLL(int) mir_wstrcmp(const wchar_t *p1, const wchar_t *p2) { if (p1 == NULL) - return (p2 == NULL) ? 0 : 1; + return (p2 == NULL) ? 0 : -1; if (p2 == NULL) - return -1; + return 1; return wcscmp(p1, p2); } MIR_CORE_DLL(int) mir_strcmpi(const char *p1, const char *p2) { if (p1 == NULL) - return (p2 == NULL) ? 0 : 1; + return (p2 == NULL) ? 0 : -1; if (p2 == NULL) - return -1; + return 1; return stricmp(p1, p2); } MIR_CORE_DLL(int) mir_wstrcmpi(const wchar_t *p1, const wchar_t *p2) { if (p1 == NULL) - return (p2 == NULL) ? 0 : 1; + return (p2 == NULL) ? 0 : -1; if (p2 == NULL) - return -1; + return 1; return wcsicmp(p1, p2); } diff --git a/src/mir_core/winver.cpp b/src/mir_core/winver.cpp index 7c568a59a4..ad011a8e40 100644 --- a/src/mir_core/winver.cpp +++ b/src/mir_core/winver.cpp @@ -80,7 +80,7 @@ MIR_CORE_DLL(BOOL) IsWorkstationLocked(void) TCHAR tszName[100]; DWORD cbName; - BOOL bLocked = (!GetUserObjectInformation(hDesk, UOI_NAME, tszName, SIZEOF(tszName), &cbName) || lstrcmpi(tszName,_T("default")) != 0); + BOOL bLocked = (!GetUserObjectInformation(hDesk, UOI_NAME, tszName, SIZEOF(tszName), &cbName) || mir_tstrcmpi(tszName,_T("default")) != 0); CloseDesktop(hDesk); return bLocked; } diff --git a/src/modules/chat/chat_svc.cpp b/src/modules/chat/chat_svc.cpp index ff1fe17e42..75a82d6eab 100644 --- a/src/modules/chat/chat_svc.cpp +++ b/src/modules/chat/chat_svc.cpp @@ -498,7 +498,7 @@ static INT_PTR Service_AddEvent(WPARAM wParam, LPARAM lParam) } else if (gcd->iType == GC_EVENT_NOTICE || gcd->iType == GC_EVENT_INFORMATION) { si = ci.GetActiveSession(); - if (si && !lstrcmpA(si->pszModule, gcd->pszModule)) { + if (si && !mir_strcmp(si->pszModule, gcd->pszModule)) { pWnd = si->ptszID; pMod = si->pszModule; } diff --git a/src/modules/chat/clist.cpp b/src/modules/chat/clist.cpp index d4de18e515..2499b79f2d 100644 --- a/src/modules/chat/clist.cpp +++ b/src/modules/chat/clist.cpp @@ -46,7 +46,7 @@ MCONTACT AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDi if (hContact) { //contact exist, make sure it is in the right group if (pszGroup[0]) { ptrT grpName(db_get_tsa(hContact, "CList", "Group")); - if (!lstrcmp(pszGroup, grpName)) + if (!mir_tstrcmp(pszGroup, grpName)) db_set_ts(hContact, "CList", "Group", pszGroup); } @@ -236,7 +236,7 @@ MCONTACT FindRoom(const char *pszModule, const TCHAR *pszRoom) continue; ptrT roomid(db_get_tsa(hContact, pszModule, "ChatRoomID")); - if (roomid != NULL && !lstrcmpi(roomid, pszRoom)) + if (roomid != NULL && !mir_tstrcmpi(roomid, pszRoom)) return hContact; } diff --git a/src/modules/chat/log.cpp b/src/modules/chat/log.cpp index e77d2013d8..e628a7c447 100644 --- a/src/modules/chat/log.cpp +++ b/src/modules/chat/log.cpp @@ -386,7 +386,7 @@ char* Log_CreateRTF(LOGSTREAMDATA *streamData) mir_tstrncpy(szTimeStamp, MakeTimeStamp(g_Settings->pszTimeStamp, lin->time), 30); mir_tstrncpy(szOldTimeStamp, MakeTimeStamp(g_Settings->pszTimeStamp, streamData->si->LastTime), 30); - if (!g_Settings->bShowTimeIfChanged || streamData->si->LastTime == 0 || lstrcmp(szTimeStamp, szOldTimeStamp)) { + if (!g_Settings->bShowTimeIfChanged || streamData->si->LastTime == 0 || mir_tstrcmp(szTimeStamp, szOldTimeStamp)) { streamData->si->LastTime = lin->time; Log_AppendRTF(streamData, TRUE, &buffer, &bufferEnd, &bufferAlloced, _T("%s"), szTimeStamp); } diff --git a/src/modules/chat/manager.cpp b/src/modules/chat/manager.cpp index 4f6666b99e..85899ca1b8 100644 --- a/src/modules/chat/manager.cpp +++ b/src/modules/chat/manager.cpp @@ -125,7 +125,7 @@ static int SM_RemoveSession(const TCHAR *pszID, const char *pszModule, BOOL remo SESSION_INFO *pTemp = ci.wndList, *pLast = NULL; while (pTemp != NULL) { // match - if ((!pszID && pTemp->iType != GCW_SERVER || !lstrcmpi(pTemp->ptszID, pszID)) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if ((!pszID && pTemp->iType != GCW_SERVER || !mir_tstrcmpi(pTemp->ptszID, pszID)) && !mir_strcmpi(pTemp->pszModule, pszModule)) { DWORD dw = pTemp->dwItemData; if (ci.OnRemoveSession) @@ -166,7 +166,7 @@ static SESSION_INFO* SM_FindSession(const TCHAR *pszID, const char *pszModule) SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if (!lstrcmpi(pTemp->ptszID, pszID) && !lstrcmpiA(pTemp->pszModule, pszModule)) + if (!mir_tstrcmpi(pTemp->ptszID, pszID) && !mir_strcmpi(pTemp->pszModule, pszModule)) return pTemp; pTemp = pTemp->next; @@ -181,7 +181,7 @@ static BOOL SM_SetOffline(const TCHAR *pszID, const char *pszModule) SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if ((!pszID || !lstrcmpi(pTemp->ptszID, pszID)) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if ((!pszID || !mir_tstrcmpi(pTemp->ptszID, pszID)) && !mir_strcmpi(pTemp->pszModule, pszModule)) { ci.UM_RemoveAll(&pTemp->pUsers); pTemp->nUsersInNicklist = 0; if (pTemp->iType != GCW_SERVER) @@ -204,7 +204,7 @@ static BOOL SM_SetStatusEx(const TCHAR *pszID, const char *pszModule, const TCHA return FALSE; while (pTemp != NULL) { - if ((!pszID || !lstrcmpi(pTemp->ptszID, pszID)) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if ((!pszID || !mir_tstrcmpi(pTemp->ptszID, pszID)) && !mir_strcmpi(pTemp->pszModule, pszModule)) { ci.UM_SetStatusEx(pTemp->pUsers, pszText, flags); if (pTemp->hWnd) RedrawWindow(GetDlgItem(pTemp->hWnd, IDC_LIST), NULL, NULL, RDW_INVALIDATE); @@ -237,7 +237,7 @@ static BOOL SM_AddEventToAllMatchingUID(GCEVENT *gce) SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if (!lstrcmpiA(pTemp->pszModule, gce->pDest->pszModule)) { + if (!mir_strcmpi(pTemp->pszModule, gce->pDest->pszModule)) { if (ci.UM_FindUser(pTemp->pUsers, gce->ptszUID)) { if (pTemp->bInitDone) { if (ci.OnEventBroadcast) @@ -266,7 +266,7 @@ static BOOL SM_AddEvent(const TCHAR *pszID, const char *pszModule, GCEVENT *gce, SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if (!lstrcmpi(pTemp->ptszID, pszID) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if (!mir_tstrcmpi(pTemp->ptszID, pszID) && !mir_strcmpi(pTemp->pszModule, pszModule)) { LOGINFO *li = ci.LM_AddEvent(&pTemp->pLog, &pTemp->pLogEnd); pTemp->iEventCount += 1; @@ -300,7 +300,7 @@ static USERINFO* SM_AddUser(const TCHAR *pszID, const char *pszModule, const TCH SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if (!lstrcmpi(pTemp->ptszID, pszID) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if (!mir_tstrcmpi(pTemp->ptszID, pszID) && !mir_strcmpi(pTemp->pszModule, pszModule)) { USERINFO *p = ci.UM_AddUser(pTemp->pStatuses, &pTemp->pUsers, pszUID, pszNick, wStatus); pTemp->nUsersInNicklist++; if (ci.OnAddUser) @@ -320,7 +320,7 @@ static BOOL SM_MoveUser(const TCHAR *pszID, const char *pszModule, const TCHAR * SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if (!lstrcmpi(pTemp->ptszID, pszID) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if (!mir_tstrcmpi(pTemp->ptszID, pszID) && !mir_strcmpi(pTemp->pszModule, pszModule)) { ci.UM_SortUser(&pTemp->pUsers, pszUID); return TRUE; } @@ -337,7 +337,7 @@ static BOOL SM_RemoveUser(const TCHAR *pszID, const char *pszModule, const TCHAR SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if ((!pszID || !lstrcmpi(pTemp->ptszID, pszID)) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if ((!pszID || !mir_tstrcmpi(pTemp->ptszID, pszID)) && !mir_strcmpi(pTemp->pszModule, pszModule)) { DWORD dw; USERINFO *ui = ci.UM_FindUser(pTemp->pUsers, pszUID); if (ui) { @@ -368,7 +368,7 @@ static USERINFO* SM_GetUserFromIndex(const TCHAR *pszID, const char *pszModule, SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if (!lstrcmpi(pTemp->ptszID, pszID) && !lstrcmpiA(pTemp->pszModule, pszModule)) + if (!mir_tstrcmpi(pTemp->ptszID, pszID) && !mir_strcmpi(pTemp->pszModule, pszModule)) return ci.UM_FindUserFromIndex(pTemp->pUsers, index); pTemp = pTemp->next; } @@ -383,7 +383,7 @@ STATUSINFO* SM_AddStatus(const TCHAR *pszID, const char *pszModule, const TCHAR SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if (!lstrcmpi(pTemp->ptszID, pszID) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if (!mir_tstrcmpi(pTemp->ptszID, pszID) && !mir_strcmpi(pTemp->pszModule, pszModule)) { STATUSINFO *ti = ci.TM_AddStatus(&pTemp->pStatuses, pszStatus, &pTemp->iStatusCount); if (ti) pTemp->iStatusCount++; @@ -404,7 +404,7 @@ static BOOL SM_GiveStatus(const TCHAR *pszID, const char *pszModule, const TCHAR SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if (!lstrcmpi(pTemp->ptszID, pszID) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if (!mir_tstrcmpi(pTemp->ptszID, pszID) && !mir_strcmpi(pTemp->pszModule, pszModule)) { USERINFO *ui = ci.UM_GiveStatus(pTemp->pUsers, pszUID, ci.TM_StringToWord(pTemp->pStatuses, pszStatus)); if (ui) { SM_MoveUser(pTemp->ptszID, pTemp->pszModule, ui->pszUID); @@ -426,7 +426,7 @@ static BOOL SM_SetContactStatus(const TCHAR *pszID, const char *pszModule, const SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if (!lstrcmpi(pTemp->ptszID, pszID) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if (!mir_tstrcmpi(pTemp->ptszID, pszID) && !mir_strcmpi(pTemp->pszModule, pszModule)) { USERINFO *ui = ci.UM_SetContactStatus(pTemp->pUsers, pszUID, wStatus); if (ui) { SM_MoveUser(pTemp->ptszID, pTemp->pszModule, ui->pszUID); @@ -448,7 +448,7 @@ static BOOL SM_TakeStatus(const TCHAR *pszID, const char *pszModule, const TCHAR SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if (!lstrcmpi(pTemp->ptszID, pszID) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if (!mir_tstrcmpi(pTemp->ptszID, pszID) && !mir_strcmpi(pTemp->pszModule, pszModule)) { USERINFO* ui = ci.UM_TakeStatus(pTemp->pUsers, pszUID, ci.TM_StringToWord(pTemp->pStatuses, pszStatus)); if (ui) { SM_MoveUser(pTemp->ptszID, pTemp->pszModule, ui->pszUID); @@ -468,7 +468,7 @@ static LRESULT SM_SendMessage(const TCHAR *pszID, const char *pszModule, UINT ms SESSION_INFO *pTemp = ci.wndList; while (pTemp && pszModule) { - if ((!pszID || !lstrcmpi(pTemp->ptszID, pszID)) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if ((!pszID || !mir_tstrcmpi(pTemp->ptszID, pszID)) && !mir_strcmpi(pTemp->pszModule, pszModule)) { if (pTemp->hWnd) { LRESULT i = SendMessage(pTemp->hWnd, msg, wParam, lParam); if (pszID) @@ -489,7 +489,7 @@ static BOOL SM_PostMessage(const TCHAR *pszID, const char *pszModule, UINT msg, SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if (!lstrcmpi(pTemp->ptszID, pszID) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if (!mir_tstrcmpi(pTemp->ptszID, pszID) && !mir_strcmpi(pTemp->pszModule, pszModule)) { if (pTemp->hWnd) return PostMessage(pTemp->hWnd, msg, wParam, lParam); @@ -504,7 +504,7 @@ static BOOL SM_BroadcastMessage(const char *pszModule, UINT msg, WPARAM wParam, { SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if (!pszModule || !lstrcmpiA(pTemp->pszModule, pszModule)) { + if (!pszModule || !mir_strcmpi(pTemp->pszModule, pszModule)) { if (pTemp->hWnd) { if (bAsync) PostMessage(pTemp->hWnd, msg, wParam, lParam); @@ -524,7 +524,7 @@ static BOOL SM_SetStatus(const TCHAR *pszID, const char *pszModule, int wStatus) SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if ((!pszID || !lstrcmpi(pTemp->ptszID, pszID)) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if ((!pszID || !mir_tstrcmpi(pTemp->ptszID, pszID)) && !mir_strcmpi(pTemp->pszModule, pszModule)) { pTemp->wStatus = wStatus; if (pTemp->hContact) { if (pTemp->iType != GCW_SERVER && wStatus != ID_STATUS_OFFLINE) @@ -551,7 +551,7 @@ static BOOL SM_SendUserMessage(const TCHAR *pszID, const char *pszModule, const SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if ((!pszID || !lstrcmpi(pTemp->ptszID, pszID)) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if ((!pszID || !mir_tstrcmpi(pTemp->ptszID, pszID)) && !mir_strcmpi(pTemp->pszModule, pszModule)) { if (pTemp->iType == GCW_CHATROOM || pTemp->iType == GCW_PRIVMESS) DoEventHook(pTemp->ptszID, pTemp->pszModule, GC_USER_MESSAGE, NULL, pszText, 0); if (pszID) @@ -569,7 +569,7 @@ static BOOL SM_ChangeUID(const TCHAR *pszID, const char *pszModule, const TCHAR SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if ((!pszID || !lstrcmpi(pTemp->ptszID, pszID)) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if ((!pszID || !mir_tstrcmpi(pTemp->ptszID, pszID)) && !mir_strcmpi(pTemp->pszModule, pszModule)) { USERINFO* ui = ci.UM_FindUser(pTemp->pUsers, pszUID); if (ui) replaceStrT(ui->pszUID, pszNewUID); @@ -589,7 +589,7 @@ static BOOL SM_ChangeNick(const TCHAR *pszID, const char *pszModule, GCEVENT *gc SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if ((!pszID || !lstrcmpi(pTemp->ptszID, pszID)) && !lstrcmpiA(pTemp->pszModule, pszModule)) { + if ((!pszID || !mir_tstrcmpi(pTemp->ptszID, pszID)) && !mir_strcmpi(pTemp->pszModule, pszModule)) { USERINFO* ui = ci.UM_FindUser(pTemp->pUsers, gce->ptszUID); if (ui) { replaceStrT(ui->pszNick, gce->ptszText); @@ -641,7 +641,7 @@ static void SM_AddCommand(const TCHAR *pszID, const char *pszModule, const char* { SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if (lstrcmpi(pTemp->ptszID, pszID) == 0 && lstrcmpiA(pTemp->pszModule, pszModule) == 0) { // match + if (mir_tstrcmpi(pTemp->ptszID, pszID) == 0 && mir_strcmpi(pTemp->pszModule, pszModule) == 0) { // match COMMANDINFO *node = (COMMANDINFO *)mir_alloc(sizeof(COMMANDINFO)); node->lpCommand = mir_strdup(lpNewCommand); node->last = NULL; // always added at beginning! @@ -678,7 +678,7 @@ static char* SM_GetPrevCommand(const TCHAR *pszID, const char *pszModule) // get { SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if (lstrcmpi(pTemp->ptszID, pszID) == 0 && lstrcmpiA(pTemp->pszModule, pszModule) == 0) { // match + if (mir_tstrcmpi(pTemp->ptszID, pszID) == 0 && mir_strcmpi(pTemp->pszModule, pszModule) == 0) { // match COMMANDINFO *pPrevCmd = NULL; if (pTemp->lpCurrentCommand != NULL) { if (pTemp->lpCurrentCommand->next != NULL) // not NULL @@ -700,7 +700,7 @@ static char* SM_GetNextCommand(const TCHAR *pszID, const char *pszModule) // get { SESSION_INFO *pTemp = ci.wndList; while (pTemp != NULL) { - if (lstrcmpi(pTemp->ptszID, pszID) == 0 && lstrcmpiA(pTemp->pszModule, pszModule) == 0) { // match + if (mir_tstrcmpi(pTemp->ptszID, pszID) == 0 && mir_strcmpi(pTemp->pszModule, pszModule) == 0) { // match COMMANDINFO *pNextCmd = NULL; if (pTemp->lpCurrentCommand != NULL) pNextCmd = pTemp->lpCurrentCommand->last; // last command (newest at beginning) @@ -719,7 +719,7 @@ static int SM_GetCount(const char *pszModule) int count = 0; while (pTemp != NULL) { - if (!lstrcmpiA(pszModule, pTemp->pszModule)) + if (!mir_strcmpi(pszModule, pTemp->pszModule)) count++; pTemp = pTemp->next; @@ -732,7 +732,7 @@ static SESSION_INFO* SM_FindSessionByIndex(const char *pszModule, int iItem) SESSION_INFO *pTemp = ci.wndList; int count = 0; while (pTemp != NULL) { - if (!lstrcmpiA(pszModule, pTemp->pszModule)) { + if (!mir_strcmpi(pszModule, pTemp->pszModule)) { if (iItem == count) return pTemp; else @@ -855,7 +855,7 @@ static MODULEINFO* MM_FindModule(const char *pszModule) MODULEINFO *pTemp = m_ModList; while (pTemp != NULL) { - if (lstrcmpiA(pTemp->pszModule, pszModule) == 0) + if (mir_strcmpi(pTemp->pszModule, pszModule) == 0) return pTemp; pTemp = pTemp->next; @@ -938,7 +938,7 @@ static STATUSINFO* TM_FindStatus(STATUSINFO* pStatusList, const TCHAR *pszStatus STATUSINFO *pTemp = pStatusList; while (pTemp != NULL) { - if (lstrcmpi(pTemp->pszGroup, pszStatus) == 0) + if (mir_tstrcmpi(pTemp->pszGroup, pszStatus) == 0) return pTemp; pTemp = pTemp->next; @@ -953,7 +953,7 @@ static WORD TM_StringToWord(STATUSINFO* pStatusList, const TCHAR *pszStatus) STATUSINFO *pTemp = pStatusList; while (pTemp != NULL) { - if (lstrcmpi(pTemp->pszGroup, pszStatus) == 0) + if (mir_tstrcmpi(pTemp->pszGroup, pszStatus) == 0) return pTemp->Status; if (pTemp->next == NULL) @@ -1016,12 +1016,12 @@ static int UM_CompareItem(USERINFO * u1, const TCHAR *pszNick, WORD wStatus) if ((dw2 & 1) && !(dw1 & 1)) return 1; if ((dw1 & 1) && (dw2 & 1)) - return lstrcmp(u1->pszNick, pszNick); + return mir_tstrcmp(u1->pszNick, pszNick); dw1 = dw1 >> 1; dw2 = dw2 >> 1; } - return lstrcmp(u1->pszNick, pszNick); + return mir_tstrcmp(u1->pszNick, pszNick); } static USERINFO* UM_SortUser(USERINFO** ppUserList, const TCHAR *pszUID) @@ -1032,7 +1032,7 @@ static USERINFO* UM_SortUser(USERINFO** ppUserList, const TCHAR *pszUID) if (!pTemp || !pszUID) return NULL; - while (pTemp && lstrcmpi(pTemp->pszUID, pszUID)) { + while (pTemp && mir_tstrcmpi(pTemp->pszUID, pszUID)) { pLast = pTemp; pTemp = pTemp->next; } @@ -1112,7 +1112,7 @@ static USERINFO* UM_FindUser(USERINFO* pUserList, const TCHAR *pszUID) USERINFO *pTemp = pUserList; while (pTemp != NULL) { - if (!lstrcmpi(pTemp->pszUID, pszUID)) + if (!mir_tstrcmpi(pTemp->pszUID, pszUID)) return pTemp; pTemp = pTemp->next; @@ -1144,7 +1144,7 @@ static USERINFO* UM_GiveStatus(USERINFO* pUserList, const TCHAR *pszUID, WORD st USERINFO *pTemp = pUserList; while (pTemp != NULL) { - if (!lstrcmpi(pTemp->pszUID, pszUID)) { + if (!mir_tstrcmpi(pTemp->pszUID, pszUID)) { pTemp->Status |= status; return pTemp; } @@ -1160,7 +1160,7 @@ static USERINFO* UM_SetContactStatus(USERINFO* pUserList, const TCHAR *pszUID, W USERINFO *pTemp = pUserList; while (pTemp != NULL) { - if (!lstrcmpi(pTemp->pszUID, pszUID)) { + if (!mir_tstrcmpi(pTemp->pszUID, pszUID)) { pTemp->ContactStatus = status; return pTemp; } @@ -1203,7 +1203,7 @@ static USERINFO* UM_TakeStatus(USERINFO* pUserList, const TCHAR *pszUID, WORD st USERINFO *pTemp = pUserList; while (pTemp != NULL) { - if (!lstrcmpi(pTemp->pszUID, pszUID)) { + if (!mir_tstrcmpi(pTemp->pszUID, pszUID)) { pTemp->Status &= ~status; return pTemp; } @@ -1221,7 +1221,7 @@ static TCHAR* UM_FindUserAutoComplete(USERINFO* pUserList, const TCHAR* pszOrigi USERINFO *pTemp = pUserList; while (pTemp != NULL) { if (pTemp->pszNick && my_strstri(pTemp->pszNick, pszOriginal) == pTemp->pszNick) - if (lstrcmpi(pTemp->pszNick, pszCurrent) > 0 && (!pszName || lstrcmpi(pTemp->pszNick, pszName) < 0)) + if (mir_tstrcmpi(pTemp->pszNick, pszCurrent) > 0 && (!pszName || mir_tstrcmpi(pTemp->pszNick, pszName) < 0)) pszName = pTemp->pszNick; pTemp = pTemp->next; @@ -1236,7 +1236,7 @@ static BOOL UM_RemoveUser(USERINFO** ppUserList, const TCHAR *pszUID) USERINFO *pTemp = *ppUserList, *pLast = NULL; while (pTemp != NULL) { - if (!lstrcmpi(pTemp->pszUID, pszUID)) { + if (!mir_tstrcmpi(pTemp->pszUID, pszUID)) { if (pLast == NULL) *ppUserList = pTemp->next; else diff --git a/src/modules/clist/clc.cpp b/src/modules/clist/clc.cpp index eba07e1068..788ae8604b 100644 --- a/src/modules/clist/clc.cpp +++ b/src/modules/clist/clc.cpp @@ -162,7 +162,7 @@ static int ClcProtoAck(WPARAM, LPARAM lParam) WindowList_BroadcastAsync(hClcWindowList, INTM_INVALIDATE, 0, 0); if (ack->result == ACKRESULT_SUCCESS) { for (int i=0; i < cli.hClcProtoCount; i++) { - if (!lstrcmpA(cli.clcProto[i].szProto, ack->szModule)) { + if (!mir_strcmp(cli.clcProto[i].szProto, ack->szModule)) { cli.clcProto[i].dwStatus = (WORD) ack->lParam; break; } @@ -432,14 +432,14 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, if (dbcws->value.type == DBVT_ASCIIZ) { WCHAR* wszGrpName = mir_a2u(dbcws->value.pszVal+1); - eq = !lstrcmp(szFullName, wszGrpName); + eq = !mir_tstrcmp(szFullName, wszGrpName); mir_free(wszGrpName); } else { char* szGrpName = NEWSTR_ALLOCA(dbcws->value.pszVal+1); WCHAR* wszGrpName; Utf8Decode(szGrpName, &wszGrpName); - eq = !lstrcmp(szFullName, wszGrpName); + eq = !mir_tstrcmp(szFullName, wszGrpName); mir_free(wszGrpName); } if (eq && (contact->group->hideOffline != 0) == ((dbcws->value.pszVal[0] & GROUPF_HIDEOFFLINE) != 0)) diff --git a/src/modules/clist/clcfiledrop.cpp b/src/modules/clist/clcfiledrop.cpp index c3ee8a0980..c575b81672 100644 --- a/src/modules/clist/clcfiledrop.cpp +++ b/src/modules/clist/clcfiledrop.cpp @@ -148,7 +148,7 @@ HRESULT CDropTarget::DragEnter(IDataObject *pDataObj, DWORD grfKeyState, POINTL shortPt.y = pt.y; hwnd = WindowFromPoint(shortPt); GetClassName(hwnd, szWindowClass, SIZEOF(szWindowClass)); - if (!lstrcmp(szWindowClass, _T(CLISTCONTROL_CLASS))) { + if (!mir_tstrcmp(szWindowClass, _T(CLISTCONTROL_CLASS))) { struct ClcData *dat; hwndCurrentDrag = hwnd; dat = (struct ClcData *) GetWindowLongPtr(hwndCurrentDrag, 0); @@ -188,7 +188,7 @@ static void AddToFileList(TCHAR ***pppFiles, int *totalCount, const TCHAR *szFil mir_tstrcat(szPath, _T("\\*")); if (hFind = FindFirstFile(szPath, &fd)) { do { - if (!lstrcmp(fd.cFileName, _T(".")) || !lstrcmp(fd.cFileName, _T(".."))) + if (!mir_tstrcmp(fd.cFileName, _T(".")) || !mir_tstrcmp(fd.cFileName, _T(".."))) continue; mir_tstrcpy(szPath, szFilename); mir_tstrcat(szPath, _T("\\")); diff --git a/src/modules/clist/clcitems.cpp b/src/modules/clist/clcitems.cpp index ca54079ade..36650d19be 100644 --- a/src/modules/clist/clcitems.cpp +++ b/src/modules/clist/clcitems.cpp @@ -66,7 +66,7 @@ ClcGroup* fnAddGroup(HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD break; if (group->cl.items[i]->type != CLCIT_GROUP) continue; - compareResult = lstrcmp(szThisField, group->cl.items[i]->szText); + compareResult = mir_tstrcmp(szThisField, group->cl.items[i]->szText); if (compareResult == 0) { if (pNextField == NULL && flags != (DWORD) - 1) { group->cl.items[i]->groupId = (WORD) groupId; @@ -110,7 +110,7 @@ ClcGroup* fnAddGroup(HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE); for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { ClcCacheEntry *cache = cli.pfnGetCacheEntry(hContact); - if (!lstrcmp(cache->tszGroup, szName) && (style & CLS_SHOWHIDDEN || !cache->bIsHidden)) + if (!mir_tstrcmp(cache->tszGroup, szName) && (style & CLS_SHOWHIDDEN || !cache->bIsHidden)) group->totalMembers++; } } @@ -248,7 +248,7 @@ void fnAddContactToTree(HWND hwnd, struct ClcData *dat, MCONTACT hContact, int u mir_free(dbv.ptszVal); return; } - if (!lstrcmp(szGroupName, dbv.ptszVal)) + if (!mir_tstrcmp(szGroupName, dbv.ptszVal)) break; } if (groupFlags & GROUPF_HIDEOFFLINE) { @@ -262,7 +262,7 @@ void fnAddContactToTree(HWND hwnd, struct ClcData *dat, MCONTACT hContact, int u mir_free(dbv.ptszVal); return; } - if (!lstrcmp(szGroupName, dbv.ptszVal)) + if (!mir_tstrcmp(szGroupName, dbv.ptszVal)) break; len = mir_tstrlen(szGroupName); if (!_tcsncmp(szGroupName, dbv.ptszVal, len) && dbv.ptszVal[len] == '\\') @@ -455,7 +455,7 @@ static int __cdecl GroupSortProc(const void* p1, const void* p2) { ClcContact **contact1 = (ClcContact**)p1, **contact2 = (ClcContact**)p2; - return lstrcmpi(contact1[0]->szText, contact2[0]->szText); + return mir_tstrcmpi(contact1[0]->szText, contact2[0]->szText); } static int __cdecl ContactSortProc(const void* p1, const void* p2) diff --git a/src/modules/clist/clcutils.cpp b/src/modules/clist/clcutils.cpp index 3e7b82b370..1f6b07e04c 100644 --- a/src/modules/clist/clcutils.cpp +++ b/src/modules/clist/clcutils.cpp @@ -372,7 +372,7 @@ int fnFindRowByText(HWND hwnd, struct ClcData *dat, const TCHAR *text, int prefi TCHAR *lowered_text = CharLowerW(NEWTSTR_ALLOCA(text)); show = _tcsstr(lowered_szText, lowered_text) != NULL; } - else show = ((prefixOk && !_tcsnicmp(text, group->cl.items[group->scanIndex]->szText, testlen)) || (!prefixOk && !lstrcmpi(text, group->cl.items[group->scanIndex]->szText))); + else show = ((prefixOk && !_tcsnicmp(text, group->cl.items[group->scanIndex]->szText, testlen)) || (!prefixOk && !mir_tstrcmpi(text, group->cl.items[group->scanIndex]->szText))); if (show) { ClcGroup *contactGroup = group; @@ -407,7 +407,7 @@ void fnEndRename(HWND, struct ClcData *dat, int save) ClcContact *contact; if (cli.pfnGetRowByIndex(dat, dat->selection, &contact, NULL) != -1) { - if (lstrcmp(contact->szText, text) && !_tcsstr(text, _T("\\"))) { + if (mir_tstrcmp(contact->szText, text) && !_tcsstr(text, _T("\\"))) { if (contact->type == CLCIT_GROUP) { if (contact->group->parent && contact->group->parent->parent) { TCHAR szFullName[256]; @@ -421,7 +421,7 @@ void fnEndRename(HWND, struct ClcData *dat, int save) else if (contact->type == CLCIT_CONTACT) { cli.pfnInvalidateDisplayNameCacheEntry(contact->hContact); TCHAR* otherName = cli.pfnGetContactDisplayName(contact->hContact, GCDNF_NOMYHANDLE); - if (!text[0] || !lstrcmp(otherName, text)) + if (!text[0] || !mir_tstrcmp(otherName, text)) db_unset(contact->hContact, "CList", "MyHandle"); else db_set_ts(contact->hContact, "CList", "MyHandle", text); diff --git a/src/modules/clist/clistevents.cpp b/src/modules/clist/clistevents.cpp index f8bf6d9143..92397503c9 100644 --- a/src/modules/clist/clistevents.cpp +++ b/src/modules/clist/clistevents.cpp @@ -102,7 +102,7 @@ static void ShowEventsInTray() int j; for (j = 0; j < nTrayProtoCnt; j++) - if (iEventProto && pTrayProtos[j] && !lstrcmpA(pTrayProtos[j], iEventProto)) + if (iEventProto && pTrayProtos[j] && !mir_strcmp(pTrayProtos[j], iEventProto)) break; if (j >= nTrayProtoCnt) // event was not found so assume first icon j = 0; @@ -218,7 +218,7 @@ int fnRemoveEvent(MCONTACT hContact, HANDLE dbEvent) szEventProto = (char *)cli.events.items[i]->cle.lpszProtocol; else szEventProto = NULL; - if (szEventProto && szProto && !lstrcmpA(szEventProto, szProto)) + if (szEventProto && szProto && !mir_strcmp(szEventProto, szProto)) nSameProto++; } diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp index 0a522dc9d2..0313c030bb 100644 --- a/src/modules/clist/clistmenus.cpp +++ b/src/modules/clist/clistmenus.cpp @@ -242,7 +242,7 @@ INT_PTR MainMenuExecService(WPARAM wParam, LPARAM lParam) lpMainMenuExecParam mmep = (lpMainMenuExecParam)wParam; if (mmep != NULL) { // bug in help.c, it used wparam as parent window handle without reason. - if (!lstrcmpA(mmep->szServiceName, "Help/AboutCommand")) + if (!mir_strcmp(mmep->szServiceName, "Help/AboutCommand")) mmep->Param1 = 0; CallService(mmep->szServiceName, mmep->Param1, lParam); @@ -796,7 +796,7 @@ int fnGetProtoIndexByPos(PROTOCOLDESCRIPTOR **proto, int protoCnt, int Pos) DBVARIANT dbv; if (!db_get_s(NULL, "Protocols", buf, &dbv)) { for (int p=0; p < protoCnt; p++) { - if (lstrcmpA(proto[p]->szName, dbv.pszVal) == 0) { + if (mir_strcmp(proto[p]->szName, dbv.pszVal) == 0) { db_free(&dbv); return p; } @@ -1078,7 +1078,7 @@ static int MenuProtoAck(WPARAM, LPARAM lParam) } for (int i=0; i < accounts.getCount(); i++) { - if (!lstrcmpA(accounts[i]->szModuleName, ack->szModule)) { + if (!mir_strcmp(accounts[i]->szModuleName, ack->szModule)) { if (((int)ack->hProcess >= ID_STATUS_OFFLINE || (int)ack->hProcess == 0) && (int)ack->hProcess < ID_STATUS_OFFLINE + SIZEOF(statusModeList)) { int pos = statustopos((int)ack->hProcess); if (pos == -1) @@ -1131,11 +1131,11 @@ int fnConvertMenu(CLISTMENUITEM* mi, TMO_MenuItem* pmi) static MenuProto* FindProtocolMenu(const char* proto) { for (int i=0; i < cli.menuProtoCount; i++) - if (cli.menuProtos[i].pMenu && !lstrcmpiA(cli.menuProtos[i].szProto, proto)) + if (cli.menuProtos[i].pMenu && !mir_strcmpi(cli.menuProtos[i].szProto, proto)) return &cli.menuProtos[i]; if (cli.menuProtoCount == 1) - if (!lstrcmpiA(cli.menuProtos[0].szProto, proto)) + if (!mir_strcmpi(cli.menuProtos[0].szProto, proto)) return &cli.menuProtos[0]; return NULL; diff --git a/src/modules/clist/clisttray.cpp b/src/modules/clist/clisttray.cpp index 4edff9c697..2bfbb8906d 100644 --- a/src/modules/clist/clisttray.cpp +++ b/src/modules/clist/clisttray.cpp @@ -200,7 +200,7 @@ void fnTrayIconRemove(HWND hwnd, const char *szProto) mir_cslock lck(trayLockCS); for (int i = 0; i < cli.trayIconCount; i++) { struct trayIconInfo_t* pii = &cli.trayIcon[i]; - if (pii->id != 0 && !lstrcmpA(szProto, pii->szProto)) { + if (pii->id != 0 && !mir_strcmp(szProto, pii->szProto)) { NOTIFYICONDATA nid = { SIZEOFNID }; nid.hWnd = hwnd; nid.uID = pii->id; @@ -334,7 +334,7 @@ int fnTrayIconUpdate(HICON hNewIcon, const TCHAR *szNewTip, const char *szPrefer for (i = 0; i < cli.trayIconCount; i++) { if (cli.trayIcon[i].id == 0) continue; - if (lstrcmpA(cli.trayIcon[i].szProto, szPreferredProto)) + if (mir_strcmp(cli.trayIcon[i].szProto, szPreferredProto)) continue; nid.uID = cli.trayIcon[i].id; @@ -402,7 +402,7 @@ LBL_Error: for (int i = 0; i < cli.trayIconCount; i++) { if (cli.trayIcon[i].id == 0) continue; - if (lstrcmpA(cli.trayIcon[i].szProto, szPreferredProto)) + if (mir_strcmp(cli.trayIcon[i].szProto, szPreferredProto)) continue; DestroyIcon(cli.trayIcon[i].hBaseIcon); @@ -473,7 +473,7 @@ void fnTrayIconUpdateBase(const char *szChangedProto) } for (int i = 0; i < accounts.getCount(); i++) - if (!lstrcmpA(szChangedProto, accounts[i]->szModuleName)) + if (!mir_strcmp(szChangedProto, accounts[i]->szModuleName)) cli.cycleStep = i; int changed = cli.pfnTrayCalcChanged(szChangedProto, averageMode, netProtoCount); @@ -540,7 +540,7 @@ void fnTrayIconSetToBase(char *szPreferredProto) for (i = 0; i < cli.trayIconCount; i++) { if (cli.trayIcon[i].id == 0) continue; - if (lstrcmpA(cli.trayIcon[i].szProto, szPreferredProto)) + if (mir_strcmp(cli.trayIcon[i].szProto, szPreferredProto)) continue; cli.pfnTrayIconUpdate(cli.trayIcon[i].hBaseIcon, NULL, szPreferredProto, 1); return; diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp index b3be884dbc..eacb1ec87b 100644 --- a/src/modules/clist/clui.cpp +++ b/src/modules/clist/clui.cpp @@ -90,7 +90,7 @@ static int MenuItem_PreBuild(WPARAM, LPARAM) TCHAR cls[128]; HWND hwndClist = GetFocus(); GetClassName(hwndClist, cls, SIZEOF(cls)); - hwndClist = (!lstrcmp( _T(CLISTCONTROL_CLASS), cls)) ? hwndClist : cli.hwndContactList; + hwndClist = (!mir_tstrcmp( _T(CLISTCONTROL_CLASS), cls)) ? hwndClist : cli.hwndContactList; HANDLE hItem = (HANDLE)SendMessage(hwndClist, CLM_GETSELECTION, 0, 0); Menu_ShowItem(hRenameMenuItem, hItem != 0); return 0; @@ -102,7 +102,7 @@ static INT_PTR MenuItem_RenameContact(WPARAM, LPARAM) HWND hwndClist = GetFocus(); GetClassName(hwndClist, cls, SIZEOF(cls)); // worst case scenario, the rename is sent to the main contact list - hwndClist = (!lstrcmp( _T(CLISTCONTROL_CLASS), cls)) ? hwndClist : cli.hwndContactList; + hwndClist = (!mir_tstrcmp( _T(CLISTCONTROL_CLASS), cls)) ? hwndClist : cli.hwndContactList; HANDLE hItem = (HANDLE)SendMessage(hwndClist, CLM_GETSELECTION, 0, 0); if (hItem) { SetFocus(hwndClist); @@ -413,7 +413,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM int rc; // wParam = (ATOM)hProfileAtom, lParam = 0 if (GlobalGetAtomName((ATOM) wParam, profile, SIZEOF(profile))) { - rc = lstrcmpi(profile, VARST(_T("%miranda_userdata%\\%miranda_profilename%.dat"))) == 0; + rc = mir_tstrcmpi(profile, VARST(_T("%miranda_userdata%\\%miranda_profilename%.dat"))) == 0; ReplyMessage(rc); if (rc) { ShowWindow(hwnd, SW_RESTORE); diff --git a/src/modules/clist/cluiservices.cpp b/src/modules/clist/cluiservices.cpp index 2579de60bc..8695adcb42 100644 --- a/src/modules/clist/cluiservices.cpp +++ b/src/modules/clist/cluiservices.cpp @@ -44,7 +44,7 @@ static INT_PTR GroupAdded(WPARAM wParam, LPARAM lParam) HWND hwndFocus = GetFocus(); GetClassName(hwndFocus, szFocusClass, SIZEOF(szFocusClass)); - if (!lstrcmp(szFocusClass, _T(CLISTCONTROL_CLASS))) { + if (!mir_tstrcmp(szFocusClass, _T(CLISTCONTROL_CLASS))) { hItem = (HANDLE) SendMessage(hwndFocus, CLM_FINDGROUP, wParam, 0); if (hItem) SendMessage(hwndFocus, CLM_EDITLABEL, (WPARAM) hItem, 0); diff --git a/src/modules/clist/contact.cpp b/src/modules/clist/contact.cpp index c25e997f4a..59426dbbb9 100644 --- a/src/modules/clist/contact.cpp +++ b/src/modules/clist/contact.cpp @@ -105,7 +105,7 @@ int fnCompareContacts(const ClcContact* c1, const ClcContact* c2) } /* both are online, now check protocols */ if (c1->proto != NULL && c2->proto != NULL) { - rc = lstrcmpA(c1->proto, c2->proto); + rc = mir_strcmp(c1->proto, c2->proto); if (rc != 0) return rc; } diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp index bb5e533ff4..f3ac197a5c 100644 --- a/src/modules/clist/genmenu.cpp +++ b/src/modules/clist/genmenu.cpp @@ -51,7 +51,7 @@ static void DumpMenuItem(TMO_IntMenuItem* pParent, int level = 0) static int CompareMenus(const TIntMenuObject* p1, const TIntMenuObject* p2) { - return lstrcmpA(p1->pszName, p2->pszName); + return mir_strcmp(p1->pszName, p2->pszName); } LIST g_menus(10, CompareMenus); @@ -249,7 +249,7 @@ INT_PTR MO_GetProtoRootMenu(WPARAM wParam, LPARAM lParam) TIntMenuObject* pmo = g_menus[objidx]; for (PMO_IntMenuItem p = pmo->m_items.first; p != NULL; p = p->next) - if (!lstrcmpA(p->UniqName, szProto)) + if (!mir_strcmp(p->UniqName, szProto)) return (INT_PTR)p; return NULL; diff --git a/src/modules/clist/genmenuopt.cpp b/src/modules/clist/genmenuopt.cpp index 79e461b6c4..723bc73878 100644 --- a/src/modules/clist/genmenuopt.cpp +++ b/src/modules/clist/genmenuopt.cpp @@ -108,7 +108,7 @@ static int SaveTree(HWND hwndDlg) mir_snprintf(DBString, SIZEOF(DBString), "%s_name", menuItemName); if (iod->name != NULL && iod->defname != NULL && - lstrcmp(iod->name, iod->defname) != 0) + mir_tstrcmp(iod->name, iod->defname) != 0) db_set_ts(NULL, MenuNameItems, DBString, iod->name); else db_unset(NULL, MenuNameItems, DBString); @@ -718,7 +718,7 @@ static INT_PTR CALLBACK GenMenuOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA if (iod->pimi->submenu.first == NULL && iod->uniqname) SetDlgItemTextA(hwndDlg, IDC_GENMENU_SERVICE, iod->uniqname); - EnableWindow( GetDlgItem(hwndDlg, IDC_GENMENU_DEFAULT), lstrcmp(iod->name, iod->defname) != 0); + EnableWindow( GetDlgItem(hwndDlg, IDC_GENMENU_DEFAULT), mir_tstrcmp(iod->name, iod->defname) != 0); EnableWindow( GetDlgItem(hwndDlg, IDC_GENMENU_SET), TRUE); EnableWindow( GetDlgItem(hwndDlg, IDC_GENMENU_CUSTOMNAME), TRUE); break; diff --git a/src/modules/clist/groups.cpp b/src/modules/clist/groups.cpp index e27699662a..716f9418ac 100644 --- a/src/modules/clist/groups.cpp +++ b/src/modules/clist/groups.cpp @@ -294,7 +294,7 @@ static int RenameGroupWithMove(int groupId, const TCHAR *szName, int move) //must rename setting in all child contacts too for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { ClcCacheEntry *cache = cli.pfnGetCacheEntry(hContact); - if (!lstrcmp(cache->tszGroup, oldName)) { + if (!mir_tstrcmp(cache->tszGroup, oldName)) { db_set_ts(hContact, "CList", "Group", szName); mir_free(cache->tszGroup); cache->tszGroup = 0; @@ -335,7 +335,7 @@ static int RenameGroupWithMove(int groupId, const TCHAR *szName, int move) _itoa(i, idstr, 10); if (db_get_ts(NULL, "CListGroups", idstr, &dbv)) break; - if (!lstrcmp(dbv.ptszVal + 1, str)) { + if (!mir_tstrcmp(dbv.ptszVal + 1, str)) { if (i < groupId) break; //is OK MoveGroupBefore(groupId + 1, i + 2); @@ -502,7 +502,7 @@ static INT_PTR BuildGroupMenu(WPARAM, LPARAM) mii.cch = SIZEOF(szThisMenuItem); mii.dwTypeData = szThisMenuItem; GetMenuItemInfo(hThisMenu, menuId, TRUE, &mii); - compareResult = lstrcmp(szThisField, szThisMenuItem); + compareResult = mir_tstrcmp(szThisField, szThisMenuItem); if (compareResult == 0) { if (pNextField == NULL) { mii.fMask = MIIM_DATA; diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp index 41b2b105ae..f4f29460d0 100644 --- a/src/modules/database/database.cpp +++ b/src/modules/database/database.cpp @@ -56,7 +56,7 @@ static void fillProfileName(const TCHAR* ptszFileName) _tcsncpy_s(g_shortProfileName, p, _TRUNCATE); TCHAR *pos = _tcsrchr(g_shortProfileName, '.'); - if (lstrcmpi(pos, _T(".dat")) == 0) + if (mir_tstrcmpi(pos, _T(".dat")) == 0) *pos = 0; } @@ -456,7 +456,7 @@ static BOOL CALLBACK EnumMirandaWindows(HWND hwnd, LPARAM lParam) TCHAR classname[256]; ENUMMIRANDAWINDOW *x = (ENUMMIRANDAWINDOW *)lParam; DWORD_PTR res = 0; - if (GetClassName(hwnd, classname, SIZEOF(classname)) && lstrcmp(_T("Miranda"), classname) == 0) { + if (GetClassName(hwnd, classname, SIZEOF(classname)) && mir_tstrcmp(_T("Miranda"), classname) == 0) { if (SendMessageTimeout(hwnd, x->msg, (WPARAM)x->aPath, 0, SMTO_ABORTIFHUNG, 100, &res) && res) { x->found++; return FALSE; diff --git a/src/modules/database/dbini.cpp b/src/modules/database/dbini.cpp index 76bab7ef88..7f5e59f454 100644 --- a/src/modules/database/dbini.cpp +++ b/src/modules/database/dbini.cpp @@ -39,11 +39,11 @@ static INT_PTR CALLBACK InstallIniDlgProc(HWND hwndDlg, UINT message, WPARAM wPa const TCHAR *pszSecurityInfo; GetPrivateProfileString(_T("AutoExec"), _T("Warn"), _T("notsafe"), szSecurity, SIZEOF(szSecurity), mirandabootini); - if (!lstrcmpi(szSecurity, _T("all"))) + if (!mir_tstrcmpi(szSecurity, _T("all"))) pszSecurityInfo = LPGENT("Security systems to prevent malicious changes are in place and you will be warned before every change that is made."); - else if (!lstrcmpi(szSecurity, _T("onlyunsafe"))) + else if (!mir_tstrcmpi(szSecurity, _T("onlyunsafe"))) pszSecurityInfo = LPGENT("Security systems to prevent malicious changes are in place and you will be warned before changes that are known to be unsafe."); - else if (!lstrcmpi(szSecurity, _T("none"))) + else if (!mir_tstrcmpi(szSecurity, _T("none"))) pszSecurityInfo = LPGENT("Security systems to prevent malicious changes have been disabled. You will receive no further warnings."); else pszSecurityInfo = NULL; if (pszSecurityInfo) SetDlgItemText(hwndDlg, IDC_SECURITYINFO, TranslateTS(pszSecurityInfo)); @@ -79,7 +79,7 @@ static bool IsInSpaceSeparatedList(const char *szWord, const char *szList) for (szItem = szList;;) { szEnd = strchr(szItem, ' '); if (szEnd == NULL) - return !lstrcmpA(szItem, szWord); + return !mir_strcmp(szItem, szWord); if (szEnd - szItem == wordLen) if (!strncmp(szItem, szWord, wordLen)) @@ -410,15 +410,15 @@ static void DoAutoExec(void) int secur; GetPrivateProfileString(_T("AutoExec"), _T("Use"), _T("prompt"), szUse, SIZEOF(szUse), mirandabootini); - if (!lstrcmpi(szUse, _T("no"))) return; + if (!mir_tstrcmpi(szUse, _T("no"))) return; GetPrivateProfileString(_T("AutoExec"), _T("Safe"), _T("CLC Icons CLUI CList SkinSounds"), buf, SIZEOF(buf), mirandabootini); ptrA szSafeSections(mir_t2a(buf)); GetPrivateProfileString(_T("AutoExec"), _T("Unsafe"), _T("AIM Facebook GG ICQ IRC JABBER MRA MSN SKYPE Tlen TWITTER VKontakte XFire"), buf, SIZEOF(buf), mirandabootini); ptrA szUnsafeSections(mir_t2a(buf)); GetPrivateProfileString(_T("AutoExec"), _T("Warn"), _T("notsafe"), szSecurity, SIZEOF(szSecurity), mirandabootini); - if (!lstrcmpi(szSecurity, _T("none"))) secur = 0; - else if (!lstrcmpi(szSecurity, _T("notsafe"))) secur = 1; - else if (!lstrcmpi(szSecurity, _T("onlyunsafe"))) secur = 2; + if (!mir_tstrcmpi(szSecurity, _T("none"))) secur = 0; + else if (!mir_tstrcmpi(szSecurity, _T("notsafe"))) secur = 1; + else if (!mir_tstrcmpi(szSecurity, _T("onlyunsafe"))) secur = 2; GetPrivateProfileString(_T("AutoExec"), _T("OverrideSecurityFilename"), _T(""), szOverrideSecurityFilename, SIZEOF(szOverrideSecurityFilename), mirandabootini); GetPrivateProfileString(_T("AutoExec"), _T("OnCreateFilename"), _T(""), szOnCreateFilename, SIZEOF(szOnCreateFilename), mirandabootini); @@ -443,10 +443,10 @@ static void DoAutoExec(void) str2[1] = 0; do { - bool secFN = lstrcmpi(fd.cFileName, szOverrideSecurityFilename) == 0; + bool secFN = mir_tstrcmpi(fd.cFileName, szOverrideSecurityFilename) == 0; mir_sntprintf(szIniPath, SIZEOF(szIniPath), _T("%s%s"), szFindPath, fd.cFileName); - if (!lstrcmpi(szUse, _T("prompt")) && !secFN) { + if (!mir_tstrcmpi(szUse, _T("prompt")) && !secFN) { int result = DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INSTALLINI), NULL, InstallIniDlgProc, (LPARAM)szIniPath); if (result == IDC_NOTOALL) break; if (result == IDCANCEL) continue; @@ -459,9 +459,9 @@ static void DoAutoExec(void) else { TCHAR szOnCompletion[8]; GetPrivateProfileString(_T("AutoExec"), _T("OnCompletion"), _T("recycle"), szOnCompletion, SIZEOF(szOnCompletion), mirandabootini); - if (!lstrcmpi(szOnCompletion, _T("delete"))) + if (!mir_tstrcmpi(szOnCompletion, _T("delete"))) DeleteFile(szIniPath); - else if (!lstrcmpi(szOnCompletion, _T("recycle"))) { + else if (!mir_tstrcmpi(szOnCompletion, _T("recycle"))) { SHFILEOPSTRUCT shfo = { 0 }; shfo.wFunc = FO_DELETE; shfo.pFrom = szIniPath; @@ -469,7 +469,7 @@ static void DoAutoExec(void) shfo.fFlags = FOF_NOCONFIRMATION | FOF_NOERRORUI | FOF_SILENT | FOF_ALLOWUNDO; SHFileOperation(&shfo); } - else if (!lstrcmpi(szOnCompletion, _T("rename"))) { + else if (!mir_tstrcmpi(szOnCompletion, _T("rename"))) { TCHAR szRenamePrefix[MAX_PATH], szNewPath[MAX_PATH]; GetPrivateProfileString(_T("AutoExec"), _T("RenamePrefix"), _T("done_"), szRenamePrefix, SIZEOF(szRenamePrefix), mirandabootini); mir_tstrcpy(szNewPath, szFindPath); @@ -477,7 +477,7 @@ static void DoAutoExec(void) mir_tstrcat(szNewPath, fd.cFileName); MoveFile(szIniPath, szNewPath); } - else if (!lstrcmpi(szOnCompletion, _T("ask"))) + else if (!mir_tstrcmpi(szOnCompletion, _T("ask"))) DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INIIMPORTDONE), NULL, IniImportDoneDlgProc, (LPARAM)szIniPath); } } diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp index 82b44a090c..c7bd537245 100644 --- a/src/modules/database/profilemanager.cpp +++ b/src/modules/database/profilemanager.cpp @@ -309,7 +309,7 @@ BOOL EnumProfilesForList(TCHAR *tszFullPath, TCHAR *profile, LPARAM lParam) } int iItem = SendMessage(hwndList, LVM_INSERTITEM, 0, (LPARAM)&item); - if (lstrcmpi(ped->szProfile, tszFullPath) == 0) + if (mir_tstrcmpi(ped->szProfile, tszFullPath) == 0) ListView_SetItemState(hwndList, iItem, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); item.iItem = iItem; diff --git a/src/modules/findadd/findadd.cpp b/src/modules/findadd/findadd.cpp index f68c502ea2..44a0748da1 100644 --- a/src/modules/findadd/findadd.cpp +++ b/src/modules/findadd/findadd.cpp @@ -408,7 +408,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP DestroyIcon(hIcon); cbei.lParam = (LPARAM)pa->szModuleName; SendDlgItemMessageA(hwndDlg, IDC_PROTOLIST, CBEM_INSERTITEM, 0, (LPARAM)&cbei); - if (szProto && cbei.pszText && !lstrcmp(szProto, pa->tszAccountName)) + if (szProto && cbei.pszText && !mir_tstrcmp(szProto, pa->tszAccountName)) index = cbei.iItem; cbei.iItem++; } @@ -827,7 +827,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP int i; for (i = 0; i < dat->searchCount; i++) - if (dat->search[i].hProcess == ack->hProcess && dat->search[i].hProcess != NULL && !lstrcmpA(dat->search[i].szProto, ack->szModule)) break; + if (dat->search[i].hProcess == ack->hProcess && dat->search[i].hProcess != NULL && !mir_strcmp(dat->search[i].szProto, ack->szModule)) break; if (i == dat->searchCount) break; @@ -893,7 +893,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP for (int i = SendDlgItemMessage(hwndDlg, IDC_PROTOLIST, CB_GETCOUNT, 0, 0); i--;) { char *szComboProto = (char*)SendDlgItemMessage(hwndDlg, IDC_PROTOLIST, CB_GETITEMDATA, i, 0); if (szComboProto == NULL) continue; - if (!lstrcmpA(szComboProto, ack->szModule)) { + if (!mir_strcmp(szComboProto, ack->szModule)) { COMBOBOXEXITEM cbei = { 0 }; cbei.mask = CBEIF_IMAGE; cbei.iItem = i; @@ -933,7 +933,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP for (int i = SendDlgItemMessage(hwndDlg, IDC_PROTOLIST, CB_GETCOUNT, 0, 0); i--;) { char *szComboProto = (char*)SendDlgItemMessage(hwndDlg, IDC_PROTOLIST, CB_GETITEMDATA, i, 0); if (szComboProto == NULL) continue; - if (!lstrcmpA(szComboProto, ack->szModule)) { + if (!mir_strcmp(szComboProto, ack->szModule)) { COMBOBOXEXITEM cbei = { 0 }; cbei.mask = CBEIF_IMAGE; cbei.iItem = i; diff --git a/src/modules/findadd/searchresults.cpp b/src/modules/findadd/searchresults.cpp index 4386af1143..9af4b9e8b5 100644 --- a/src/modules/findadd/searchresults.cpp +++ b/src/modules/findadd/searchresults.cpp @@ -147,17 +147,17 @@ int CALLBACK SearchResultsCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lPa switch(sortCol) { case COLUMNID_PROTO: - return lstrcmpA(lsr1->szProto, lsr2->szProto)*sortMultiplier; + return mir_strcmp(lsr1->szProto, lsr2->szProto)*sortMultiplier; case COLUMNID_HANDLE: - return lstrcmpi(lsr1->psr.id, lsr2->psr.id)*sortMultiplier; + return mir_tstrcmpi(lsr1->psr.id, lsr2->psr.id)*sortMultiplier; case COLUMNID_NICK: - return lstrcmpi(lsr1->psr.nick, lsr2->psr.nick)*sortMultiplier; + return mir_tstrcmpi(lsr1->psr.nick, lsr2->psr.nick)*sortMultiplier; case COLUMNID_FIRST: - return lstrcmpi(lsr1->psr.firstName, lsr2->psr.firstName)*sortMultiplier; + return mir_tstrcmpi(lsr1->psr.firstName, lsr2->psr.firstName)*sortMultiplier; case COLUMNID_LAST: - return lstrcmpi(lsr1->psr.lastName, lsr2->psr.lastName)*sortMultiplier; + return mir_tstrcmpi(lsr1->psr.lastName, lsr2->psr.lastName)*sortMultiplier; case COLUMNID_EMAIL: - return lstrcmpi(lsr1->psr.email, lsr2->psr.email)*sortMultiplier; + return mir_tstrcmpi(lsr1->psr.email, lsr2->psr.email)*sortMultiplier; } } else diff --git a/src/modules/fonts/FontOptions.cpp b/src/modules/fonts/FontOptions.cpp index aad063d484..ba90edb38a 100644 --- a/src/modules/fonts/FontOptions.cpp +++ b/src/modules/fonts/FontOptions.cpp @@ -332,7 +332,7 @@ static HTREEITEM sttFindNamedTreeItemAt(HWND hwndTree, HTREEITEM hItem, const TC { TreeView_GetItem(hwndTree, &tvi); - if (!lstrcmp(tvi.pszText, name)) + if (!mir_tstrcmp(tvi.pszText, name)) return tvi.hItem; tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem); @@ -1265,7 +1265,7 @@ static FontInternal *sttFindFont(OBJLIST &fonts, char *module, cha for (int i=0; i < fonts.getCount(); i++) { FontInternal& F = fonts[i]; - if (!lstrcmpA(F.dbSettingsGroup, module) && !lstrcmpA(F.prefix, prefix)) + if (!mir_strcmp(F.dbSettingsGroup, module) && !mir_strcmp(F.prefix, prefix)) return &F; } diff --git a/src/modules/fonts/services.cpp b/src/modules/fonts/services.cpp index 9a46c10e37..1c7b0783dd 100644 --- a/src/modules/fonts/services.cpp +++ b/src/modules/fonts/services.cpp @@ -290,7 +290,7 @@ static int sttRegisterFontWorker(FontIDW* font_id, int hLangpack) for (int i=0; i < font_id_list.getCount(); i++) { FontInternal& F = font_id_list[i]; - if (!lstrcmp(F.group, font_id->group) && !lstrcmp(F.name, font_id->name) && !(F.flags & FIDF_ALLOWREREGISTER)) + if (!mir_tstrcmp(F.group, font_id->group) && !mir_tstrcmp(F.name, font_id->name) && !(F.flags & FIDF_ALLOWREREGISTER)) return 1; } @@ -303,7 +303,7 @@ static int sttRegisterFontWorker(FontIDW* font_id, int hLangpack) memcpy(newItem, font_id, font_id->cbSize); newItem->hLangpack = hLangpack; - if (!lstrcmp(newItem->deffontsettings.szFace, _T("MS Shell Dlg"))) { + if (!mir_tstrcmp(newItem->deffontsettings.szFace, _T("MS Shell Dlg"))) { LOGFONT lf; SystemParametersInfo(SPI_GETICONTITLELOGFONT, sizeof(LOGFONT), &lf, FALSE); mir_tstrncpy(newItem->deffontsettings.szFace, lf.lfFaceName, SIZEOF(newItem->deffontsettings.szFace)); diff --git a/src/modules/icolib/skin2opts.cpp b/src/modules/icolib/skin2opts.cpp index f3b538f6b3..e8c5ac9f34 100644 --- a/src/modules/icolib/skin2opts.cpp +++ b/src/modules/icolib/skin2opts.cpp @@ -354,7 +354,7 @@ static HTREEITEM FindNamedTreeItemAt(HWND hwndTree, HTREEITEM hItem, const TCHAR { TreeView_GetItem(hwndTree, &tvi); - if (!lstrcmp(tvi.pszText, name)) + if (!mir_tstrcmp(tvi.pszText, name)) return tvi.hItem; tvi.hItem = TreeView_GetNextSibling(hwndTree, tvi.hItem); @@ -611,7 +611,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM static int CALLBACK DoSortIconsFunc(LPARAM lParam1, LPARAM lParam2, LPARAM) { - return lstrcmpi(iconList[lParam1]->getDescr(), iconList[lParam2]->getDescr()); + return mir_tstrcmpi(iconList[lParam1]->getDescr(), iconList[lParam2]->getDescr()); } static int CALLBACK DoSortIconsFuncByOrder(LPARAM lParam1, LPARAM lParam2, LPARAM) diff --git a/src/modules/langpack/langpack.cpp b/src/modules/langpack/langpack.cpp index f6110cbbdf..25c1f09577 100644 --- a/src/modules/langpack/langpack.cpp +++ b/src/modules/langpack/langpack.cpp @@ -53,7 +53,7 @@ BOOL EnumLangpacks(ENUM_PACKS_CALLBACK callback, WPARAM wParam, LPARAM lParam) if (!LoadLangPackDescr(tszFullPath, &pack)) { pack.ftFileDate = wfd.ftLastWriteTime; /* enabled? */ - if (langpack && !lstrcmpi(langpack, wfd.cFileName)) { + if (langpack && !mir_tstrcmpi(langpack, wfd.cFileName)) { if (!fPackFound) pack.flags |= LPF_ENABLED; fPackFound = TRUE; } diff --git a/src/modules/metacontacts/meta_services.cpp b/src/modules/metacontacts/meta_services.cpp index 9580b13859..5f9b813782 100644 --- a/src/modules/metacontacts/meta_services.cpp +++ b/src/modules/metacontacts/meta_services.cpp @@ -586,7 +586,7 @@ static INT_PTR Meta_SrmmCurrentSub(WPARAM hMeta, LPARAM lParam) static int Meta_SrmmIconClicked(WPARAM hMeta, LPARAM lParam) { StatusIconClickData *sicd = (StatusIconClickData*)lParam; - if (lstrcmpA(sicd->szModule, META_PROTO)) + if (mir_strcmp(sicd->szModule, META_PROTO)) return 0; DBCachedContact *cc = CheckMeta(hMeta); diff --git a/src/modules/netlib/netlibhttp.cpp b/src/modules/netlib/netlibhttp.cpp index b7a529853b..a42e9ea700 100644 --- a/src/modules/netlib/netlibhttp.cpp +++ b/src/modules/netlib/netlibhttp.cpp @@ -53,7 +53,7 @@ struct ProxyAuth mir_free(szMethod); } static int Compare(const ProxyAuth* p1, const ProxyAuth* p2) - { return lstrcmpiA(p1->szServer, p2->szServer); } + { return mir_strcmpi(p1->szServer, p2->szServer); } }; struct ProxyAuthList : OBJLIST @@ -202,7 +202,7 @@ static NetlibConnection* NetlibHttpProcessUrl(NETLIBHTTPREQUEST *nlhr, NetlibUse if (nlc != NULL) { bool httpProxy = !(nloc.flags & NLOCF_SSL) && nlc->proxyType == PROXYTYPE_HTTP; - bool sameHost = lstrcmpA(nlc->nloc.szHost, nloc.szHost) == 0 && nlc->nloc.wPort == nloc.wPort; + bool sameHost = mir_strcmp(nlc->nloc.szHost, nloc.szHost) == 0 && nlc->nloc.wPort == nloc.wPort; if (!httpProxy && !sameHost) { NetlibDoClose(nlc); @@ -503,11 +503,11 @@ INT_PTR NetlibHttpSendRequest(WPARAM wParam, LPARAM lParam) doneHostHeader = doneContentLengthHeader = doneProxyAuthHeader = doneAuthHeader = 0; for (i=0; i < nlhr->headersCount; i++) { NETLIBHTTPHEADER &p = nlhr->headers[i]; - if (!lstrcmpiA(p.szName, "Host")) doneHostHeader = 1; - else if (!lstrcmpiA(p.szName, "Content-Length")) doneContentLengthHeader = 1; - else if (!lstrcmpiA(p.szName, "Proxy-Authorization")) doneProxyAuthHeader = 1; - else if (!lstrcmpiA(p.szName, "Authorization")) doneAuthHeader = 1; - else if (!lstrcmpiA(p.szName, "Connection")) continue; + if (!mir_strcmpi(p.szName, "Host")) doneHostHeader = 1; + else if (!mir_strcmpi(p.szName, "Content-Length")) doneContentLengthHeader = 1; + else if (!mir_strcmpi(p.szName, "Proxy-Authorization")) doneProxyAuthHeader = 1; + else if (!mir_strcmpi(p.szName, "Authorization")) doneAuthHeader = 1; + else if (!mir_strcmpi(p.szName, "Connection")) continue; if (p.szValue == NULL) continue; AppendToCharBuffer(&httpRequest, "%s: %s\r\n", p.szName, p.szValue); } @@ -1029,10 +1029,10 @@ next: for (i=0; iheadersCount; i++) { NETLIBHTTPHEADER &p = nlhrReply->headers[i]; - if (!lstrcmpiA(p.szName, "Content-Length")) + if (!mir_strcmpi(p.szName, "Content-Length")) dataLen = atoi(p.szValue); - if (!lstrcmpiA(p.szName, "Content-Encoding")) { + if (!mir_strcmpi(p.szName, "Content-Encoding")) { cenc = i; if (strstr(p.szValue, "gzip")) cenctype = 1; @@ -1040,11 +1040,11 @@ next: cenctype = 2; } - if (!lstrcmpiA(p.szName, "Connection")) - close = !lstrcmpiA(p.szValue, "close"); + if (!mir_strcmpi(p.szName, "Connection")) + close = !mir_strcmpi(p.szValue, "close"); - if (!lstrcmpiA(p.szName, "Transfer-Encoding") && - !lstrcmpiA(p.szValue, "chunked")) + if (!mir_strcmpi(p.szName, "Transfer-Encoding") && + !mir_strcmpi(p.szValue, "chunked")) { chunked = true; chunkhdr = i; diff --git a/src/modules/netlib/netlibhttpproxy.cpp b/src/modules/netlib/netlibhttpproxy.cpp index 5980a1f5b1..47149e1174 100644 --- a/src/modules/netlib/netlibhttpproxy.cpp +++ b/src/modules/netlib/netlibhttpproxy.cpp @@ -119,7 +119,7 @@ static bool NetlibHttpGatewaySend(NetlibConnection *nlc, RequestType reqType, co NETLIBOPENCONNECTION nloc; NetlibConnFromUrl(nlhrSend.szUrl, false, nloc); - bool sameHost = lstrcmpA(nlc->nloc.szHost, nloc.szHost) == 0 && nlc->nloc.wPort == nloc.wPort; + bool sameHost = mir_strcmp(nlc->nloc.szHost, nloc.szHost) == 0 && nlc->nloc.wPort == nloc.wPort; if (!sameHost) { diff --git a/src/modules/netlib/netlibopts.cpp b/src/modules/netlib/netlibopts.cpp index 332e0f723a..92102b044e 100644 --- a/src/modules/netlib/netlibopts.cpp +++ b/src/modules/netlib/netlibopts.cpp @@ -105,7 +105,7 @@ static void CopySettingsStruct(NETLIBUSERSETTINGS *dest, NETLIBUSERSETTINGS *sou static void CombineSettingsStrings(char **dest, char **source) { - if (*dest != NULL && (*source == NULL || lstrcmpiA(*dest, *source))) { mir_free(*dest); *dest = NULL; } + if (*dest != NULL && (*source == NULL || mir_strcmpi(*dest, *source))) { mir_free(*dest); *dest = NULL; } } static void CombineSettingsStructs(NETLIBUSERSETTINGS *dest, DWORD *destFlags, NETLIBUSERSETTINGS *source, DWORD sourceFlags) diff --git a/src/modules/options/filter.cpp b/src/modules/options/filter.cpp index d9e9f29c33..61f7461e62 100644 --- a/src/modules/options/filter.cpp +++ b/src/modules/options/filter.cpp @@ -85,13 +85,13 @@ void AddDialogString(HWND hWndDlg, const PageHash key) TCHAR szClass[64]; GetClassName(hWndDlg, szClass, SIZEOF(szClass)); - if (lstrcmpi(szClass, _T("SysTreeView32")) == 0) { + if (mir_tstrcmpi(szClass, _T("SysTreeView32")) == 0) { HTREEITEM hItem = TreeView_GetRoot(hWndDlg); AddTreeViewNodes(hWndDlg, key, hItem); return; } - if (lstrcmpi(szClass, _T("listbox")) == 0) { + if (mir_tstrcmpi(szClass, _T("listbox")) == 0) { if (GetWindowStyle(hWndDlg) & LBS_HASSTRINGS) { int count = ListBox_GetCount(hWndDlg); for (int i=0; i < count; i++) { @@ -107,7 +107,7 @@ void AddDialogString(HWND hWndDlg, const PageHash key) return; } - if (lstrcmpi(szClass, _T("SysListView32")) == 0) { + if (mir_tstrcmpi(szClass, _T("SysListView32")) == 0) { int count = ListView_GetItemCount(hWndDlg); for (int i=0; i < count; i++) { title[0] = 0; //safety @@ -119,7 +119,7 @@ void AddDialogString(HWND hWndDlg, const PageHash key) return; } - if (lstrcmpi(szClass, _T("combobox")) == 0) { + if (mir_tstrcmpi(szClass, _T("combobox")) == 0) { if (GetWindowStyle(hWndDlg) & CBS_HASSTRINGS) { int count = ComboBox_GetCount(hWndDlg); for (int i=0; i < count; i++) { diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp index 74464fd333..21818343e7 100644 --- a/src/modules/options/options.cpp +++ b/src/modules/options/options.cpp @@ -154,7 +154,7 @@ static BOOL CALLBACK BoldGroupTitlesEnumChildren(HWND hwnd, LPARAM lParam) TCHAR szClass[64]; GetClassName(hwnd, szClass, SIZEOF(szClass)); - if (!lstrcmp(szClass, _T("Button")) && (GetWindowLongPtr(hwnd, GWL_STYLE) & 0x0F) == BS_GROUPBOX) + if (!mir_tstrcmp(szClass, _T("Button")) && (GetWindowLongPtr(hwnd, GWL_STYLE) & 0x0F) == BS_GROUPBOX) SendMessage(hwnd, WM_SETFONT, lParam, 0); return TRUE; } @@ -198,7 +198,7 @@ static int lstrcmpnull(TCHAR *str1, TCHAR *str2) if (str1 == NULL && str2 != NULL) return -1; - return lstrcmp(str1, str2); + return mir_tstrcmp(str1, str2); } static TCHAR* GetPluginName(HINSTANCE hInstance, TCHAR *buffer, int size) @@ -688,7 +688,7 @@ static BOOL IsInsideTab(HWND hdlg, OptionsDlgData *dat, int i) for (int j = 0; j < dat->arOpd.getCount() && pages < 2; j++) { OptionsPageData* opd2 = dat->arOpd[j]; if (!CheckPageShow(hdlg, dat, j)) continue; - if (lstrcmp(opd2->ptszTitle, opd->ptszTitle) || lstrcmpnull(opd2->ptszGroup, opd->ptszGroup)) + if (mir_tstrcmp(opd2->ptszTitle, opd->ptszTitle) || lstrcmpnull(opd2->ptszGroup, opd->ptszGroup)) continue; pages++; } @@ -873,7 +873,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L } dat->arOpd.insert(opd); - if (!lstrcmp(lastPage, odp->ptszTitle) && !lstrcmpnull(lastGroup, odp->ptszGroup)) + if (!mir_tstrcmp(lastPage, odp->ptszTitle) && !lstrcmpnull(lastGroup, odp->ptszGroup)) if ((ood->pszTab == NULL && dat->currentPage == -1) || !lstrcmpnull(lastTab, odp->ptszTab)) dat->currentPage = (int)i; } @@ -1029,13 +1029,13 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hdlg, UINT message, WPARAM wParam, L continue; OptionsPageData *p = dat->arOpd[i]; - if (lstrcmp(opd->ptszTitle, p->ptszTitle) || lstrcmpnull(opd->ptszGroup, p->ptszGroup)) + if (mir_tstrcmp(opd->ptszTitle, p->ptszTitle) || lstrcmpnull(opd->ptszGroup, p->ptszGroup)) continue; tie.pszText = TranslateTH(p->hLangpack, p->ptszTab); tie.lParam = i; TabCtrl_InsertItem(hwndTab, pages, &tie); - if (!lstrcmp(opd->ptszTab, p->ptszTab)) + if (!mir_tstrcmp(opd->ptszTab, p->ptszTab)) sel = pages; pages++; } diff --git a/src/modules/plugins/dll_sniffer.cpp b/src/modules/plugins/dll_sniffer.cpp index 2b5f2822fd..2e63cfba16 100644 --- a/src/modules/plugins/dll_sniffer.cpp +++ b/src/modules/plugins/dll_sniffer.cpp @@ -115,18 +115,18 @@ MUUID* GetPluginInterfaces(const TCHAR* ptszFileName, bool& bIsPlugin) bool bHasLoad = false, bHasUnload = false, bHasInfo = false, bHasMuuids = false; for (size_t i=0; i < pED->NumberOfNames; i++, ptrRVA++, ptrOrdRVA++) { char *szName = (char*)&pSecStart[*ptrRVA]; - if (!lstrcmpA(szName, "Load")) + if (!mir_strcmp(szName, "Load")) bHasLoad = true; - if (!lstrcmpA(szName, "MirandaPluginInfoEx")) + if (!mir_strcmp(szName, "MirandaPluginInfoEx")) bHasInfo = true; - else if (!lstrcmpA(szName, "Unload")) + else if (!mir_strcmp(szName, "Unload")) bHasUnload = true; - else if (!lstrcmpA(szName, "MirandaInterfaces")) { + else if (!mir_strcmp(szName, "MirandaInterfaces")) { bHasMuuids = true; pIds = (MUUID*)&pSecStart[ ptrFuncList[*ptrOrdRVA]]; } // old plugin, skip it - else if (!lstrcmpA(szName, "MirandaPluginInterfaces")) + else if (!mir_strcmp(szName, "MirandaPluginInterfaces")) __leave; } diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index 07270ffb84..a9264bcca9 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -34,7 +34,7 @@ extern bool bModulesLoadedFired; static int sttComparePluginsByName(const pluginEntry* p1, const pluginEntry* p2) { - return lstrcmp(p1->pluginname, p2->pluginname); + return mir_tstrcmp(p1->pluginname, p2->pluginname); } LIST @@ -63,7 +63,7 @@ static pluginEntry *pluginList_freeimg, *pluginList_crshdmp, *serviceModePlugin int equalUUID(const MUUID& u1, const MUUID& u2) { - return memcmp(&u1, &u2, sizeof(MUUID))?0:1; + return memcmp(&u1, &u2, sizeof(MUUID)) ? 0 : 1; } bool hasMuuid(const MUUID* p, const MUUID& uuid) @@ -71,8 +71,8 @@ bool hasMuuid(const MUUID* p, const MUUID& uuid) if (p == NULL) return false; - for (int i=0; !equalUUID(miid_last, p[i]); i++) - if ( equalUUID(uuid, p[i])) + for (int i = 0; !equalUUID(miid_last, p[i]); i++) + if (equalUUID(uuid, p[i])) return true; return false; @@ -91,22 +91,22 @@ bool hasMuuid(const BASIC_PLUGIN_INFO& bpi, const MUUID& uuid) static const MUUID pluginBannedList[] = { - {0x9d6c3213, 0x02b4, 0x4fe1, { 0x92, 0xe6, 0x52, 0x6d, 0xe2, 0x4f, 0x8d, 0x65 }}, // old chat - {0x240a91dc, 0x9464, 0x457a, { 0x97, 0x87, 0xff, 0x1e, 0xa8, 0x8e, 0x77, 0xe3 }}, // old clist - {0x657fe89b, 0xd121, 0x40c2, { 0x8a, 0xc9, 0xb9, 0xfa, 0x57, 0x55, 0xb3, 0x0c }}, // old srmm - {0x112f7d30, 0xcd19, 0x4c74, { 0xa0, 0x3b, 0xbf, 0xbb, 0x76, 0xb7, 0x5b, 0xc4 }}, // extraicons - {0x72765a6f, 0xb017, 0x42f1, { 0xb3, 0x0f, 0x5e, 0x09, 0x41, 0x27, 0x3a, 0x3f }}, // flashavatars - {0x1394a3ab, 0x2585, 0x4196, { 0x8f, 0x72, 0x0e, 0xae, 0xc2, 0x45, 0x0e, 0x11 }}, // db3x - {0x28ff9b91, 0x3e4d, 0x4f1c, { 0xb4, 0x7c, 0xc6, 0x41, 0xb0, 0x37, 0xff, 0x40 }}, // dbx_mmap_sa - {0x28f45248, 0x8c9c, 0x4bee, { 0x93, 0x07, 0x7b, 0xcf, 0x3e, 0x12, 0xbf, 0x99 }}, // dbx_tree - {0x4c4a27cf, 0x5e64, 0x4242, { 0xa3, 0x32, 0xb9, 0x8b, 0x08, 0x24, 0x3e, 0x89 }}, // metacontacts - {0x9c448c61, 0xfc3f, 0x42f9, { 0xb9, 0xf0, 0x4a, 0x30, 0xe1, 0xcf, 0x86, 0x71 }}, // skypekit based skype - {0x49c2cf54, 0x7898, 0x44de, { 0xbe, 0x3a, 0x6d, 0x2e, 0x4e, 0xf9, 0x00, 0x79 }} // firstrun + { 0x9d6c3213, 0x02b4, 0x4fe1, { 0x92, 0xe6, 0x52, 0x6d, 0xe2, 0x4f, 0x8d, 0x65 } }, // old chat + { 0x240a91dc, 0x9464, 0x457a, { 0x97, 0x87, 0xff, 0x1e, 0xa8, 0x8e, 0x77, 0xe3 } }, // old clist + { 0x657fe89b, 0xd121, 0x40c2, { 0x8a, 0xc9, 0xb9, 0xfa, 0x57, 0x55, 0xb3, 0x0c } }, // old srmm + { 0x112f7d30, 0xcd19, 0x4c74, { 0xa0, 0x3b, 0xbf, 0xbb, 0x76, 0xb7, 0x5b, 0xc4 } }, // extraicons + { 0x72765a6f, 0xb017, 0x42f1, { 0xb3, 0x0f, 0x5e, 0x09, 0x41, 0x27, 0x3a, 0x3f } }, // flashavatars + { 0x1394a3ab, 0x2585, 0x4196, { 0x8f, 0x72, 0x0e, 0xae, 0xc2, 0x45, 0x0e, 0x11 } }, // db3x + { 0x28ff9b91, 0x3e4d, 0x4f1c, { 0xb4, 0x7c, 0xc6, 0x41, 0xb0, 0x37, 0xff, 0x40 } }, // dbx_mmap_sa + { 0x28f45248, 0x8c9c, 0x4bee, { 0x93, 0x07, 0x7b, 0xcf, 0x3e, 0x12, 0xbf, 0x99 } }, // dbx_tree + { 0x4c4a27cf, 0x5e64, 0x4242, { 0xa3, 0x32, 0xb9, 0x8b, 0x08, 0x24, 0x3e, 0x89 } }, // metacontacts + { 0x9c448c61, 0xfc3f, 0x42f9, { 0xb9, 0xf0, 0x4a, 0x30, 0xe1, 0xcf, 0x86, 0x71 } }, // skypekit based skype + { 0x49c2cf54, 0x7898, 0x44de, { 0xbe, 0x3a, 0x6d, 0x2e, 0x4e, 0xf9, 0x00, 0x79 } } // firstrun }; static bool isPluginBanned(const MUUID& u1) { - for (int i=0; i < SIZEOF(pluginBannedList); i++) + for (int i = 0; i < SIZEOF(pluginBannedList); i++) if (equalUUID(pluginBannedList[i], u1)) return true; @@ -118,25 +118,25 @@ static bool isPluginBanned(const MUUID& u1) static MuuidReplacement pluginDefault[] = { - { MIID_UIUSERINFO, _T("stduserinfo"), NULL }, // 0 - { MIID_SRURL, _T("stdurl"), NULL }, // 1 - { MIID_SREMAIL, _T("stdemail"), NULL }, // 2 - { MIID_SRAUTH, _T("stdauth"), NULL }, // 3 - { MIID_SRFILE, _T("stdfile"), NULL }, // 4 - { MIID_UIHELP, _T("stdhelp"), NULL }, // 5 - { MIID_UIHISTORY, _T("stduihist"), NULL }, // 6 - { MIID_IDLE, _T("stdidle"), NULL }, // 7 - { MIID_AUTOAWAY, _T("stdautoaway"), NULL }, // 8 - { MIID_USERONLINE, _T("stduseronline"), NULL }, // 9 - { MIID_SRAWAY, _T("stdaway"), NULL }, // 10 - { MIID_CLIST, _T("stdclist"), NULL }, // 11 - { MIID_CHAT, _T("stdchat"), NULL }, // 12 - { MIID_SRMM, _T("stdmsg"), NULL } // 13 + { MIID_UIUSERINFO, _T("stduserinfo"), NULL }, // 0 + { MIID_SRURL, _T("stdurl"), NULL }, // 1 + { MIID_SREMAIL, _T("stdemail"), NULL }, // 2 + { MIID_SRAUTH, _T("stdauth"), NULL }, // 3 + { MIID_SRFILE, _T("stdfile"), NULL }, // 4 + { MIID_UIHELP, _T("stdhelp"), NULL }, // 5 + { MIID_UIHISTORY, _T("stduihist"), NULL }, // 6 + { MIID_IDLE, _T("stdidle"), NULL }, // 7 + { MIID_AUTOAWAY, _T("stdautoaway"), NULL }, // 8 + { MIID_USERONLINE, _T("stduseronline"), NULL }, // 9 + { MIID_SRAWAY, _T("stdaway"), NULL }, // 10 + { MIID_CLIST, _T("stdclist"), NULL }, // 11 + { MIID_CHAT, _T("stdchat"), NULL }, // 12 + { MIID_SRMM, _T("stdmsg"), NULL } // 13 }; int getDefaultPluginIdx(const MUUID& muuid) { - for (int i=0; i < SIZEOF(pluginDefault); i++) + for (int i = 0; i < SIZEOF(pluginDefault); i++) if (equalUUID(muuid, pluginDefault[i].uuid)) return i; @@ -171,7 +171,7 @@ char* GetPluginNameByInstance(HINSTANCE hInstance) if (pluginList.getCount() == 0) return NULL; - for (int i=0; i < pluginList.getCount(); i++) { + for (int i = 0; i < pluginList.getCount(); i++) { pluginEntry *p = pluginList[i]; if (p->bpi.pluginInfo && p->bpi.hInst == hInstance) return p->bpi.pluginInfo->shortName; @@ -184,7 +184,7 @@ int GetPluginLangByInstance(HINSTANCE hInstance) if (pluginList.getCount() == 0) return NULL; - for (int i=0; i < pluginList.getCount(); i++) { + for (int i = 0; i < pluginList.getCount(); i++) { pluginEntry *p = pluginList[i]; if (p->bpi.pluginInfo && p->bpi.hInst == hInstance) return p->hLangpack; @@ -194,12 +194,12 @@ int GetPluginLangByInstance(HINSTANCE hInstance) int GetPluginFakeId(const MUUID &uuid, int hLangpack) { - for (int i=0; i < pluginList.getCount(); i++) { + for (int i = 0; i < pluginList.getCount(); i++) { pluginEntry *p = pluginList[i]; if (!p->bpi.hInst) continue; - if ( equalUUID(p->bpi.pluginInfo->uuid, uuid)) + if (equalUUID(p->bpi.pluginInfo->uuid, uuid)) return p->hLangpack = (hLangpack) ? hLangpack : --sttFakeID; } @@ -238,7 +238,7 @@ static int checkPI(BASIC_PLUGIN_INFO* bpi, PLUGININFOEX* pi) return FALSE; if (pi->shortName == NULL || pi->description == NULL || pi->author == NULL || - pi->authorEmail == NULL || pi->copyright == NULL || pi->homepage == NULL) + pi->authorEmail == NULL || pi->copyright == NULL || pi->homepage == NULL) return FALSE; return TRUE; @@ -253,9 +253,9 @@ int checkAPI(TCHAR* plugin, BASIC_PLUGIN_INFO* bpi, DWORD mirandaVersion, int ch return 0; // loaded, check for exports - bpi->Load = (Miranda_Plugin_Load) GetProcAddress(h, "Load"); - bpi->Unload = (Miranda_Plugin_Unload) GetProcAddress(h, "Unload"); - bpi->InfoEx = (Miranda_Plugin_InfoEx) GetProcAddress(h, "MirandaPluginInfoEx"); + bpi->Load = (Miranda_Plugin_Load)GetProcAddress(h, "Load"); + bpi->Unload = (Miranda_Plugin_Unload)GetProcAddress(h, "Unload"); + bpi->InfoEx = (Miranda_Plugin_InfoEx)GetProcAddress(h, "MirandaPluginInfoEx"); // if they were present if (!bpi->Load || !bpi->Unload || !bpi->InfoEx) { @@ -264,7 +264,7 @@ LBL_Error: return 0; } - bpi->Interfaces = (MUUID*) GetProcAddress(h, "MirandaInterfaces"); + bpi->Interfaces = (MUUID*)GetProcAddress(h, "MirandaInterfaces"); if (bpi->Interfaces == NULL) { typedef MUUID * (__cdecl * Miranda_Plugin_Interfaces) (void); Miranda_Plugin_Interfaces pFunc = (Miranda_Plugin_Interfaces)GetProcAddress(h, "MirandaPluginInterfaces"); @@ -286,10 +286,10 @@ LBL_Ok: // check clist ? if (checkTypeAPI == CHECKAPI_CLIST) { - bpi->clistlink = (CList_Initialise) GetProcAddress(h, "CListInitialise"); + bpi->clistlink = (CList_Initialise)GetProcAddress(h, "CListInitialise"); if (pi->flags & UNICODE_AWARE) - if (bpi->clistlink) - goto LBL_Ok; + if (bpi->clistlink) + goto LBL_Ok; } goto LBL_Error; @@ -323,7 +323,7 @@ void Plugin_Uninit(pluginEntry *p) int Plugin_UnloadDyn(pluginEntry *p) { if (p->bpi.hInst) { - if ( CallPluginEventHook(p->bpi.hInst, hOkToExitEvent, 0, 0) != 0) + if (CallPluginEventHook(p->bpi.hInst, hOkToExitEvent, 0, 0) != 0) return FALSE; KillModuleSubclassing(p->bpi.hInst); @@ -354,7 +354,7 @@ int Plugin_UnloadDyn(pluginEntry *p) // mark default plugins to be loaded if (!(p->pclass & PCLASS_CORE)) - for (int i=0; i < SIZEOF(pluginDefault); i++) + for (int i = 0; i < SIZEOF(pluginDefault); i++) if (pluginDefault[i].pImpl == p) pluginDefault[i].pImpl = NULL; @@ -365,7 +365,7 @@ int Plugin_UnloadDyn(pluginEntry *p) static int valid_library_name(TCHAR *name) { TCHAR *dot = _tcsrchr(name, '.'); - if (dot != NULL && lstrcmpi(dot + 1, _T("dll")) == 0) + if (dot != NULL && mir_tstrcmpi(dot + 1, _T("dll")) == 0) if (dot[4] == 0) return 1; @@ -390,8 +390,7 @@ void enumPlugins(SCAN_PLUGINS_CALLBACK cb, WPARAM wParam, LPARAM lParam) do { if (!(ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) && valid_library_name(ffd.cFileName)) cb(&ffd, exe, wParam, lParam); - } - while (FindNextFile(hFind, &ffd)); + } while (FindNextFile(hFind, &ffd)); FindClose(hFind); } //if } @@ -410,7 +409,7 @@ pluginEntry* OpenPlugin(TCHAR *tszFileName, TCHAR *dir, TCHAR *path) // map dll into the memory and check its exports bool bIsPlugin = false; - mir_ptr pIds( GetPluginInterfaces(tszFullPath, bIsPlugin)); + mir_ptr pIds(GetPluginInterfaces(tszFullPath, bIsPlugin)); if (!bIsPlugin) { p->pclass |= PCLASS_FAILED; // piece of shit return p; @@ -420,7 +419,7 @@ pluginEntry* OpenPlugin(TCHAR *tszFileName, TCHAR *dir, TCHAR *path) bool bIsDb = hasMuuid(pIds, miid_database); if (bIsDb || hasMuuid(pIds, miid_crypto)) { BASIC_PLUGIN_INFO bpi; - if ( checkAPI(tszFullPath, &bpi, mirandaVersion, CHECKAPI_NONE)) { + if (checkAPI(tszFullPath, &bpi, mirandaVersion, CHECKAPI_NONE)) { // plugin is valid p->pclass |= ((bIsDb ? PCLASS_DB : PCLASS_CRYPT) | PCLASS_BASICAPI); // copy the dblink stuff @@ -435,19 +434,19 @@ pluginEntry* OpenPlugin(TCHAR *tszFileName, TCHAR *dir, TCHAR *path) else p->pclass |= PCLASS_FAILED; } // plugin declared that it's a contact list. mark it for the future load - else if ( hasMuuid(pIds, miid_clist)) { + else if (hasMuuid(pIds, miid_clist)) { // keep a note of this plugin for later clistPlugins.insert(p); p->pclass |= PCLASS_CLIST; } // plugin declared that it's a service mode plugin. // load it for a profile manager's window - else if ( hasMuuid(pIds, miid_servicemode)) { + else if (hasMuuid(pIds, miid_servicemode)) { BASIC_PLUGIN_INFO bpi; if (checkAPI(tszFullPath, &bpi, mirandaVersion, CHECKAPI_NONE)) { p->pclass |= (PCLASS_OK | PCLASS_BASICAPI); p->bpi = bpi; - if ( hasMuuid(bpi, miid_servicemode)) { + if (hasMuuid(bpi, miid_servicemode)) { p->pclass |= (PCLASS_SERVICE); servicePlugins.insert(p); } @@ -461,18 +460,13 @@ pluginEntry* OpenPlugin(TCHAR *tszFileName, TCHAR *dir, TCHAR *path) void SetPluginOnWhiteList(const TCHAR* pluginname, int allow) { - char plugName[MAX_PATH]; - strncpy(plugName, StrConvA(pluginname), SIZEOF(plugName)); - strlwr(plugName); - db_set_b(NULL, PLUGINDISABLELIST, plugName, allow == 0); + db_set_b(NULL, PLUGINDISABLELIST, _strlwr(_T2A(pluginname)), allow == 0); } // returns 1 if the plugin should be enabled within this profile, filename is always lower case int isPluginOnWhiteList(const TCHAR* pluginname) { - char* pluginnameA = _strlwr(mir_t2a(pluginname)); - int rc = db_get_b(NULL, PLUGINDISABLELIST, pluginnameA, 0); - mir_free(pluginnameA); + int rc = db_get_b(NULL, PLUGINDISABLELIST, _strlwr(_T2A(pluginname)), 0); if (rc != 0 && askAboutIgnoredPlugins) { TCHAR buf[256]; mir_sntprintf(buf, SIZEOF(buf), TranslateT("'%s' is disabled, re-enable?"), pluginname); @@ -493,7 +487,6 @@ bool TryLoadPlugin(pluginEntry *p, bool bDynamic) if (slice) *slice = 0; - CharLower(p->pluginname); if (!(p->pclass & (PCLASS_LOADED | PCLASS_DB | PCLASS_CLIST))) { if (!bDynamic && !isPluginOnWhiteList(p->pluginname)) return false; @@ -512,8 +505,8 @@ bool TryLoadPlugin(pluginEntry *p, bool bDynamic) if (p->bpi.Interfaces) { MUUID *piface = p->bpi.Interfaces; - for (int i=0; !equalUUID(miid_last, piface[i]); i++) { - int idx = getDefaultPluginIdx( piface[i] ); + for (int i = 0; !equalUUID(miid_last, piface[i]); i++) { + int idx = getDefaultPluginIdx(piface[i]); if (idx != -1 && pluginDefault[idx].pImpl) { if (!bDynamic) { // this place is already occupied, skip & disable SetPluginOnWhiteList(p->pluginname, 0); @@ -534,7 +527,7 @@ bool TryLoadPlugin(pluginEntry *p, bool bDynamic) p->pclass |= PCLASS_LOADED; if (p->bpi.Interfaces) { MUUID *piface = p->bpi.Interfaces; - for (int i=0; !equalUUID(miid_last, piface[i]); i++) { + for (int i = 0; !equalUUID(miid_last, piface[i]); i++) { int idx = getDefaultPluginIdx(piface[i]); if (idx != -1) pluginDefault[idx].pImpl = p; @@ -603,21 +596,20 @@ static bool loadClistModule(TCHAR* exe, pluginEntry *p) static pluginEntry* getCListModule(TCHAR *exe, TCHAR *slice) { - for (int i=0; i < clistPlugins.getCount(); i++) { + for (int i = 0; i < clistPlugins.getCount(); i++) { pluginEntry *p = clistPlugins[i]; mir_sntprintf(slice, &exe[MAX_PATH] - slice, _T("\\Plugins\\%s"), p->pluginname); - CharLower(p->pluginname); if (!isPluginOnWhiteList(p->pluginname)) continue; - if ( loadClistModule(exe, p)) + if (loadClistModule(exe, p)) return p; } MuuidReplacement& stdClist = pluginDefault[11]; - if ( LoadCorePlugin(stdClist)) { + if (LoadCorePlugin(stdClist)) { mir_sntprintf(slice, &exe[MAX_PATH] - slice, _T("\\Core\\%s.dll"), stdClist.stdplugname); - if ( loadClistModule(exe, stdClist.pImpl)) + if (loadClistModule(exe, stdClist.pImpl)) return stdClist.pImpl; } @@ -626,7 +618,7 @@ static pluginEntry* getCListModule(TCHAR *exe, TCHAR *slice) int UnloadPlugin(TCHAR* buf, int bufLen) { - for (int i = pluginList.getCount()-1; i >= 0; i--) { + for (int i = pluginList.getCount() - 1; i >= 0; i--) { pluginEntry *p = pluginList[i]; if (!_tcsicmp(p->pluginname, buf)) { GetModuleFileName(p->bpi.hInst, buf, bufLen); @@ -668,12 +660,12 @@ static int LaunchServicePlugin(pluginEntry *p) int LoadDefaultServiceModePlugin() { - LPCTSTR param = CmdLine_GetOption( _T("svc")); + LPCTSTR param = CmdLine_GetOption(_T("svc")); if (param == NULL || *param == 0) return SERVICE_CONTINUE; size_t cbLen = _tcslen(param); - for (int i=0; i < servicePlugins.getCount(); i++) { + for (int i = 0; i < servicePlugins.getCount(); i++) { pluginEntry *p = servicePlugins[i]; if (!_tcsnicmp(p->pluginname, param, cbLen)) { int res = LaunchServicePlugin(p); @@ -771,7 +763,7 @@ int LoadNewPluginsModule(void) if (clistPlugins.getCount()) MessageBox(NULL, TranslateT("Unable to start any of the installed contact list plugins, I even ignored your preferences for which contact list couldn't load any."), _T("Miranda NG"), MB_OK | MB_ICONERROR); else - MessageBox(NULL, TranslateT("Can't find a contact list plugin! You need StdClist or any other contact list plugin.") , _T("Miranda NG"), MB_OK | MB_ICONERROR); + MessageBox(NULL, TranslateT("Can't find a contact list plugin! You need StdClist or any other contact list plugin."), _T("Miranda NG"), MB_OK | MB_ICONERROR); return 1; } @@ -800,10 +792,10 @@ static BOOL scanPluginsDir(WIN32_FIND_DATA *fd, TCHAR *path, WPARAM, LPARAM) { pluginEntry *p = OpenPlugin(fd->cFileName, _T("Plugins"), path); if (!(p->pclass & PCLASS_FAILED)) { - if (pluginList_freeimg == NULL && lstrcmpi(fd->cFileName, _T("advaimg.dll")) == 0) + if (pluginList_freeimg == NULL && mir_tstrcmpi(fd->cFileName, _T("advaimg.dll")) == 0) pluginList_freeimg = p; - if (pluginList_crshdmp == NULL && lstrcmpi(fd->cFileName, _T("crashdumper.dll")) == 0) { + if (pluginList_crshdmp == NULL && mir_tstrcmpi(fd->cFileName, _T("crashdumper.dll")) == 0) { pluginList_crshdmp = p; p->pclass |= PCLASS_LAST; } @@ -855,7 +847,7 @@ void UnloadNewPluginsModule(void) UnloadPluginOptions(); // unload everything but the DB - for (int i = pluginList.getCount()-1; i >= 0; i--) { + for (int i = pluginList.getCount() - 1; i >= 0; i--) { pluginEntry *p = pluginList[i]; if (!(p->pclass & (PCLASS_DB | PCLASS_CRYPT)) && p != pluginList_crshdmp) Plugin_Uninit(p); @@ -866,7 +858,7 @@ void UnloadNewPluginsModule(void) UnloadDatabase(); - for (int k = pluginList.getCount()-1; k >= 0; k--) { + for (int k = pluginList.getCount() - 1; k >= 0; k--) { pluginEntry *p = pluginList[k]; Plugin_Uninit(p); } diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp index 7ffec4f215..30fd40f6da 100644 --- a/src/modules/protocols/protoaccs.cpp +++ b/src/modules/protocols/protoaccs.cpp @@ -36,7 +36,7 @@ static HANDLE hHooks[4]; static int CompareAccounts(const PROTOACCOUNT* p1, const PROTOACCOUNT* p2) { - return lstrcmpA(p1->szModuleName, p2->szModuleName); + return mir_strcmp(p1->szModuleName, p2->szModuleName); } LIST accounts(10, CompareAccounts); diff --git a/src/modules/skin/hotkey_opts.cpp b/src/modules/skin/hotkey_opts.cpp index 2b5f8ac7f3..909f02b885 100644 --- a/src/modules/skin/hotkey_opts.cpp +++ b/src/modules/skin/hotkey_opts.cpp @@ -246,23 +246,23 @@ static int CALLBACK sttOptionsSortList(LPARAM lParam1, LPARAM lParam2, LPARAM lP item2 = (THotkeyItem *)lvi.lParam; if (!item1 && !item2) - return lstrcmp(title1, title2); + return mir_tstrcmp(title1, title2); if (!item1 && item2) { - if (res = lstrcmp(title1, item2->getSection())) + if (res = mir_tstrcmp(title1, item2->getSection())) return res; return -1; } if (!item2 && item1) { - if (res = lstrcmp(item1->getSection(), title2)) + if (res = mir_tstrcmp(item1->getSection(), title2)) return res; return 1; } /* item1 != NULL && item2 != NULL */ - if (res = lstrcmp(item1->getSection(), item2->getSection())) return res; - if (res = lstrcmp(item1->getDescr(), item2->getDescr())) return res; + if (res = mir_tstrcmp(item1->getSection(), item2->getSection())) return res; + if (res = mir_tstrcmp(item1->getDescr(), item2->getDescr())) return res; if (!item1->rootHotkey && item2->rootHotkey) return -1; if (item1->rootHotkey && !item2->rootHotkey) return 1; return 0; @@ -357,7 +357,7 @@ static void sttBuildHotkeyList(HWND hwndList) if (item->OptDeleted) continue; - if (!i || lstrcmp(item->ptszSection, hotkeys[i-1]->ptszSection)) { + if (!i || mir_tstrcmp(item->ptszSection, hotkeys[i-1]->ptszSection)) { lvi.mask = LVIF_TEXT|LVIF_PARAM; lvi.iItem = nItems++; lvi.iSubItem = 0; @@ -872,7 +872,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, ListView_GetItem(lpnmhdr->hwndFrom, &lvi); item = (THotkeyItem *)lvi.lParam; if (!item) continue; - if (!lstrcmp( item->getSection(), buf)) { + if (!mir_tstrcmp( item->getSection(), buf)) { ListView_DeleteItem(lpnmhdr->hwndFrom, lvi.iItem); --lvi.iItem; --count; @@ -887,7 +887,7 @@ static INT_PTR CALLBACK sttOptionsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, if (item->OptDeleted) continue; - if ( lstrcmp(buf, item->getSection())) + if ( mir_tstrcmp(buf, item->getSection())) continue; lvi.mask = LVIF_PARAM|LVIF_INDENT; diff --git a/src/modules/skin/hotkeys.cpp b/src/modules/skin/hotkeys.cpp index adab1fda71..95f78a708c 100644 --- a/src/modules/skin/hotkeys.cpp +++ b/src/modules/skin/hotkeys.cpp @@ -29,9 +29,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static int sttCompareHotkeys(const THotkeyItem *p1, const THotkeyItem *p2) { int res; - if (res = lstrcmp(p1->ptszSection, p2->ptszSection)) + if (res = mir_tstrcmp(p1->ptszSection, p2->ptszSection)) return res; - if (res = lstrcmp(p1->ptszDescription, p2->ptszDescription)) + if (res = mir_tstrcmp(p1->ptszDescription, p2->ptszDescription)) return res; if (!p1->rootHotkey && p2->rootHotkey) return -1; @@ -228,7 +228,7 @@ static INT_PTR svcHotkeyUnregister(WPARAM, LPARAM lParam) if (!pszCurrentName) continue; hotkeys[i]->UnregisterHotkey = - !lstrcmpA(pszCurrentName, pszName) || + !mir_strcmp(pszCurrentName, pszName) || !strncmp(pszCurrentName, pszNamePrefix, cbNamePrefix); } @@ -263,7 +263,7 @@ static INT_PTR svcHotkeyCheck(WPARAM wParam, LPARAM lParam) for (i=0; i < hotkeys.getCount(); i++) { THotkeyItem *item = hotkeys[i]; BYTE hkMod, hkVk; - if ((item->type != HKT_MANUAL) || lstrcmp(pszSection, item->ptszSection)) continue; + if ((item->type != HKT_MANUAL) || mir_tstrcmp(pszSection, item->ptszSection)) continue; sttWordToModAndVk(item->Hotkey, &hkMod, &hkVk); if (!hkVk) continue; if (!item->Enabled) continue; diff --git a/src/modules/skin/sounds.cpp b/src/modules/skin/sounds.cpp index e70f0ad2d6..02b09d1127 100644 --- a/src/modules/skin/sounds.cpp +++ b/src/modules/skin/sounds.cpp @@ -45,7 +45,7 @@ struct SoundItem static int CompareSounds(const SoundItem* p1, const SoundItem* p2) { - return lstrcmpA(p1->name, p2->name); + return mir_strcmp(p1->name, p2->name); } static OBJLIST arSounds(10, CompareSounds); diff --git a/src/modules/utils/bmpfilter.cpp b/src/modules/utils/bmpfilter.cpp index 47ef5b7178..f26a708049 100644 --- a/src/modules/utils/bmpfilter.cpp +++ b/src/modules/utils/bmpfilter.cpp @@ -48,12 +48,12 @@ static INT_PTR sttBitmapLoader(const TCHAR* ptszFileName) if (ServiceExists(MS_IMG_LOAD)) return CallService(MS_IMG_LOAD, (WPARAM)szFilename, IMGL_TCHAR); - if (!lstrcmpi(pszExt, _T(".bmp")) || !lstrcmpi(pszExt, _T(".rle"))) { + if (!mir_tstrcmpi(pszExt, _T(".bmp")) || !mir_tstrcmpi(pszExt, _T(".rle"))) { //LoadImage can do this much faster return (INT_PTR)LoadImage(hInst, szFilename, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); } - if (!lstrcmpi(pszExt, _T(".png"))) { + if (!mir_tstrcmpi(pszExt, _T(".png"))) { HANDLE hFile, hMap = NULL; BYTE* ppMap = NULL; INT_PTR cbFileSize = 0; diff --git a/src/modules/utils/timezones.cpp b/src/modules/utils/timezones.cpp index bd37f53ef5..08ec0faa1f 100644 --- a/src/modules/utils/timezones.cpp +++ b/src/modules/utils/timezones.cpp @@ -108,7 +108,7 @@ static LPCTSTR timeapiGetTzDescription(LPCTSTR TZname) for (int i = 0; i < g_timezonesBias.getCount(); i++) { MIM_TIMEZONE *tz = g_timezonesBias[i]; - if (!lstrcmp(tz->tszName, TZname)) + if (!mir_tstrcmp(tz->tszName, TZname)) return tz->szDisplay; } return _T(""); diff --git a/src/modules/utils/utils.cpp b/src/modules/utils/utils.cpp index deb41b3e90..cffb5f6ce1 100644 --- a/src/modules/utils/utils.cpp +++ b/src/modules/utils/utils.cpp @@ -312,7 +312,7 @@ static INT_PTR GetCountryByNumber(WPARAM wParam, LPARAM) static INT_PTR GetCountryByISOCode(WPARAM wParam, LPARAM) { for (int i = 0; i < SIZEOF(countries); i++) - if ( lstrcmpiA((char*)wParam, countries[i].ISOcode) == 0) + if ( mir_strcmpi((char*)wParam, countries[i].ISOcode) == 0) return (INT_PTR)countries[i].szName; return NULL; diff --git a/src/modules/xml/xmlParser.cpp b/src/modules/xml/xmlParser.cpp index 9da791bfdf..04c82c59d3 100644 --- a/src/modules/xml/xmlParser.cpp +++ b/src/modules/xml/xmlParser.cpp @@ -1199,7 +1199,7 @@ XMLAttribute *XMLNode::addAttribute_priv(int memoryIncrease, XMLSTR lpszName, XM TCHAR* p = _tcschr(lpszName, ':'); if (p) - if (!lstrcmp(p+1, d->lpszNS) || (d->pParent && !lstrcmp(p+1, d->pParent->lpszNS))) + if (!mir_tstrcmp(p+1, d->lpszNS) || (d->pParent && !mir_tstrcmp(p+1, d->pParent->lpszNS))) *p = 0; return pAttr; -- cgit v1.2.3