summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-22 12:33:13 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-22 12:33:13 +0000
commit159b565b390687258ee65a3b66596e118752063c (patch)
tree91105378fcb9e030ba4a7f6572c4ea307cb8c8d6 /src
parent7f4d529b59698d7eb2403bd1f9088a5aa7fa9080 (diff)
replace strcmp to mir_strcmp
git-svn-id: http://svn.miranda-ng.org/main/trunk@13752 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/core/stdmsg/src/msgdialog.cpp4
-rw-r--r--src/core/stdmsg/src/msgs.cpp6
-rw-r--r--src/core/stduseronline/src/useronline.cpp2
-rw-r--r--src/modules/chat/clist.cpp2
-rw-r--r--src/modules/clist/clc.cpp32
-rw-r--r--src/modules/clist/clistevents.cpp6
-rw-r--r--src/modules/clist/clistmenus.cpp2
-rw-r--r--src/modules/clist/clistmod.cpp6
-rw-r--r--src/modules/clist/clistsettings.cpp18
-rw-r--r--src/modules/clist/clisttray.cpp4
-rw-r--r--src/modules/clist/contacts.cpp2
-rw-r--r--src/modules/crypt/encrypt.cpp2
-rw-r--r--src/modules/database/dbutils.cpp2
-rw-r--r--src/modules/database/mdatabasecache.cpp6
-rw-r--r--src/modules/extraicons/DefaultExtraIcons.cpp12
-rw-r--r--src/modules/extraicons/extraicons.cpp2
-rw-r--r--src/modules/extraicons/usedIcons.cpp2
-rw-r--r--src/modules/fonts/FontOptions.cpp6
-rw-r--r--src/modules/icolib/skin2icons.cpp2
-rw-r--r--src/modules/metacontacts/meta_services.cpp18
-rw-r--r--src/modules/netlib/netlib.cpp2
-rw-r--r--src/modules/netlib/netlibautoproxy.cpp2
-rw-r--r--src/modules/netlib/netlibupnp.cpp6
-rw-r--r--src/modules/protocols/protochains.cpp2
-rw-r--r--src/modules/protocols/protocols.cpp6
-rw-r--r--src/modules/protocols/protodir.cpp6
-rw-r--r--src/modules/srmm/statusicon.cpp2
-rw-r--r--src/modules/utils/path.cpp2
-rw-r--r--src/modules/xml/xmlParser.h4
29 files changed, 84 insertions, 84 deletions
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp
index 64a8ec7625..755b805275 100644
--- a/src/core/stdmsg/src/msgdialog.cpp
+++ b/src/core/stdmsg/src/msgdialog.cpp
@@ -1052,7 +1052,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
TCHAR *contactName = pcli->pfnGetContactDisplayName(dat->hContact, 0);
TCHAR buf[128] = _T("");
- if (strcmp(dat->szProto, META_PROTO)) {
+ if (mir_strcmp(dat->szProto, META_PROTO)) {
CONTACTINFO ci = { 0 };
ci.cbSize = sizeof(ci);
ci.hContact = dat->hContact;
@@ -1082,7 +1082,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP
mir_sntprintf(newtitle, SIZEOF(newtitle), _T("%s (%s): %s"), contactName, szStatus, TranslateT("Message session"));
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)wParam;
- if (!cws || (!strcmp(cws->szModule, dat->szProto) && !strcmp(cws->szSetting, "Status"))) {
+ if (!cws || (!mir_strcmp(cws->szModule, dat->szProto) && !mir_strcmp(cws->szSetting, "Status"))) {
InvalidateRect(GetDlgItem(hwndDlg, IDC_PROTOCOL), NULL, TRUE);
if (statusIcon)
SendMessage(hwndDlg, DM_UPDATEWINICON, 0, 0);
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp
index 6125fbe902..80c55f5a4f 100644
--- a/src/core/stdmsg/src/msgs.cpp
+++ b/src/core/stdmsg/src/msgs.cpp
@@ -198,14 +198,14 @@ static int MessageSettingChanged(WPARAM hContact, LPARAM lParam)
if (cws->szModule == NULL)
return 0;
- if (!strcmp(cws->szModule, "CList"))
+ if (!mir_strcmp(cws->szModule, "CList"))
WindowList_Broadcast(g_dat.hMessageWindowList, DM_UPDATETITLE, (WPARAM)cws, 0);
else if (hContact) {
- if (cws->szSetting && !strcmp(cws->szSetting, "Timezone"))
+ if (cws->szSetting && !mir_strcmp(cws->szSetting, "Timezone"))
WindowList_Broadcast(g_dat.hMessageWindowList, DM_NEWTIMEZONE, (WPARAM)cws, 0);
else {
char *szProto = GetContactProto(hContact);
- if (szProto && !strcmp(cws->szModule, szProto))
+ if (szProto && !mir_strcmp(cws->szModule, szProto))
WindowList_Broadcast(g_dat.hMessageWindowList, DM_UPDATETITLE, (WPARAM)cws, 0);
}
}
diff --git a/src/core/stduseronline/src/useronline.cpp b/src/core/stduseronline/src/useronline.cpp
index e0a8801e81..ece6fa3028 100644
--- a/src/core/stduseronline/src/useronline.cpp
+++ b/src/core/stduseronline/src/useronline.cpp
@@ -34,7 +34,7 @@ static bool Proto_IsAccountEnabled(PROTOACCOUNT *pa)
static int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if (hContact == NULL || strcmp(cws->szSetting, "Status"))
+ if (hContact == NULL || mir_strcmp(cws->szSetting, "Status"))
return 0;
int newStatus = cws->value.wVal;
diff --git a/src/modules/chat/clist.cpp b/src/modules/chat/clist.cpp
index 7d90bfe084..6a2ca27a09 100644
--- a/src/modules/chat/clist.cpp
+++ b/src/modules/chat/clist.cpp
@@ -89,7 +89,7 @@ BOOL SetAllOffline(BOOL bHide, const char *pszModule)
char *szProto = GetContactProto(hContact);
if (!ci.MM_FindModule(szProto))
continue;
- if (pszModule && strcmp(pszModule, szProto))
+ if (pszModule && mir_strcmp(pszModule, szProto))
continue;
int i = db_get_b(hContact, szProto, "ChatRoom", 0);
if (i != 0) {
diff --git a/src/modules/clist/clc.cpp b/src/modules/clist/clc.cpp
index 6e10794f1e..4f516367c4 100644
--- a/src/modules/clist/clc.cpp
+++ b/src/modules/clist/clc.cpp
@@ -80,49 +80,49 @@ static int ClcSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
if (hContact == NULL) {
- if (!strcmp(cws->szModule, "CListGroups"))
+ if (!mir_strcmp(cws->szModule, "CListGroups"))
cli.pfnClcBroadcast(INTM_GROUPSCHANGED, hContact, lParam);
return 0;
}
- if (!strcmp(cws->szModule, "CList")) {
- if (!strcmp(cws->szSetting, "MyHandle")) {
+ if (!mir_strcmp(cws->szModule, "CList")) {
+ if (!mir_strcmp(cws->szSetting, "MyHandle")) {
cli.pfnInvalidateDisplayNameCacheEntry(hContact);
cli.pfnClcBroadcast(INTM_NAMECHANGED, hContact, lParam);
}
- else if (!strcmp(cws->szSetting, "Group"))
+ else if (!mir_strcmp(cws->szSetting, "Group"))
cli.pfnClcBroadcast(INTM_GROUPCHANGED, hContact, lParam);
- else if (!strcmp(cws->szSetting, "Hidden"))
+ else if (!mir_strcmp(cws->szSetting, "Hidden"))
cli.pfnClcBroadcast(INTM_HIDDENCHANGED, hContact, lParam);
- else if (!strcmp(cws->szSetting, "NotOnList"))
+ else if (!mir_strcmp(cws->szSetting, "NotOnList"))
cli.pfnClcBroadcast(INTM_NOTONLISTCHANGED, hContact, lParam);
- else if (!strcmp(cws->szSetting, "Status"))
+ else if (!mir_strcmp(cws->szSetting, "Status"))
cli.pfnClcBroadcast(INTM_INVALIDATE, 0, 0);
- else if (!strcmp(cws->szSetting, "NameOrder"))
+ else if (!mir_strcmp(cws->szSetting, "NameOrder"))
cli.pfnClcBroadcast(INTM_NAMEORDERCHANGED, 0, 0);
}
else {
char *szProto = GetContactProto(hContact);
if (szProto != NULL) {
- if (!strcmp(cws->szModule, "Protocol") && !strcmp(cws->szSetting, "p"))
+ if (!mir_strcmp(cws->szModule, "Protocol") && !mir_strcmp(cws->szSetting, "p"))
cli.pfnClcBroadcast(INTM_PROTOCHANGED, hContact, lParam);
// something is being written to a protocol module
- if (!strcmp(szProto, cws->szModule)) {
+ if (!mir_strcmp(szProto, cws->szModule)) {
// was a unique setting key written?
char *id = (char *) CallProtoServiceInt(NULL,szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
- if ((INT_PTR)id != CALLSERVICE_NOTFOUND && id != NULL && !strcmp(id, cws->szSetting))
+ if ((INT_PTR)id != CALLSERVICE_NOTFOUND && id != NULL && !mir_strcmp(id, cws->szSetting))
cli.pfnClcBroadcast(INTM_PROTOCHANGED, hContact, lParam);
}
}
- if (szProto == NULL || strcmp(szProto, cws->szModule))
+ if (szProto == NULL || mir_strcmp(szProto, cws->szModule))
return 0;
- if (!strcmp(cws->szSetting, "Nick") || !strcmp(cws->szSetting, "FirstName") || !strcmp(cws->szSetting, "e-mail")
- || !strcmp(cws->szSetting, "LastName") || !strcmp(cws->szSetting, "UIN"))
+ if (!mir_strcmp(cws->szSetting, "Nick") || !mir_strcmp(cws->szSetting, "FirstName") || !mir_strcmp(cws->szSetting, "e-mail")
+ || !mir_strcmp(cws->szSetting, "LastName") || !mir_strcmp(cws->szSetting, "UIN"))
cli.pfnClcBroadcast(INTM_NAMECHANGED, hContact, lParam);
- else if (!strcmp(cws->szSetting, "ApparentMode"))
+ else if (!mir_strcmp(cws->szSetting, "ApparentMode"))
cli.pfnClcBroadcast(INTM_APPARENTMODECHANGED, hContact, lParam);
- else if (!strcmp(cws->szSetting, "IdleTS"))
+ else if (!mir_strcmp(cws->szSetting, "IdleTS"))
cli.pfnClcBroadcast(INTM_IDLECHANGED, hContact, lParam);
}
return 0;
diff --git a/src/modules/clist/clistevents.cpp b/src/modules/clist/clistevents.cpp
index fae471f9b9..defb917c23 100644
--- a/src/modules/clist/clistevents.cpp
+++ b/src/modules/clist/clistevents.cpp
@@ -365,10 +365,10 @@ static int RemoveEventsForContact(WPARAM wParam, LPARAM)
static int CListEventSettingsChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if (hContact == NULL && cws && cws->szModule && cws->szSetting && strcmp(cws->szModule, "CList") == 0) {
- if (strcmp(cws->szSetting, "DisableTrayFlash") == 0)
+ if (hContact == NULL && cws && cws->szModule && cws->szSetting && mir_strcmp(cws->szModule, "CList") == 0) {
+ if (mir_strcmp(cws->szSetting, "DisableTrayFlash") == 0)
disableTrayFlash = (int)cws->value.bVal;
- else if (strcmp(cws->szSetting, "NoIconBlink") == 0)
+ else if (mir_strcmp(cws->szSetting, "NoIconBlink") == 0)
disableIconFlash = (int)cws->value.bVal;
}
return 0;
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp
index a50588813d..f63a86d5c0 100644
--- a/src/modules/clist/clistmenus.cpp
+++ b/src/modules/clist/clistmenus.cpp
@@ -346,7 +346,7 @@ INT_PTR ContactMenuCheckService(WPARAM wParam, LPARAM)
if (cmep->pszContactOwner != NULL) {
if (bcp->szProto == NULL) return FALSE;
- if (strcmp(cmep->pszContactOwner, bcp->szProto)) return FALSE;
+ if (mir_strcmp(cmep->pszContactOwner, bcp->szProto)) return FALSE;
}
TMO_MenuItem mi;
diff --git a/src/modules/clist/clistmod.cpp b/src/modules/clist/clistmod.cpp
index 75d5014d63..1ab5fd2c8f 100644
--- a/src/modules/clist/clistmod.cpp
+++ b/src/modules/clist/clistmod.cpp
@@ -166,7 +166,7 @@ int fnIconFromStatusMode(const char *szProto, int status, MCONTACT)
if (szProto == NULL)
return index + 1;
for (i=0; i < protoIconIndex.getCount(); i++) {
- if (strcmp(szProto, protoIconIndex[i].szProto) == 0)
+ if (mir_strcmp(szProto, protoIconIndex[i].szProto) == 0)
return protoIconIndex[i].iIconBase + index;
}
return 1;
@@ -199,7 +199,7 @@ static void AddProtoIconIndex(PROTOACCOUNT *pa)
static void RemoveProtoIconIndex(PROTOACCOUNT *pa)
{
for (int i=0; i < protoIconIndex.getCount(); i++)
- if (strcmp(protoIconIndex[i].szProto, pa->szModuleName) == 0) {
+ if (mir_strcmp(protoIconIndex[i].szProto, pa->szModuleName) == 0) {
protoIconIndex.remove(i);
break;
}
@@ -438,7 +438,7 @@ static INT_PTR CompareContacts(WPARAM wParam, LPARAM lParam)
return 2 * (statusa == ID_STATUS_OFFLINE) - 1;
}
/* both are online, now check protocols */
- rc = strcmp(SAFESTRING(szProto1), SAFESTRING(szProto2)); /* strcmp() doesn't like NULL so feed in "" as needed */
+ rc = mir_strcmp(SAFESTRING(szProto1), SAFESTRING(szProto2)); /* mir_strcmp() doesn't like NULL so feed in "" as needed */
if (rc != 0 && (szProto1 != NULL && szProto2 != NULL))
return rc;
/* protocols are the same, order by display name */
diff --git a/src/modules/clist/clistsettings.cpp b/src/modules/clist/clistsettings.cpp
index 5d748b175f..fee76ff9eb 100644
--- a/src/modules/clist/clistsettings.cpp
+++ b/src/modules/clist/clistsettings.cpp
@@ -220,14 +220,14 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
DBVARIANT dbv;
dbv.pszVal = NULL;
if (!db_get(hContact, "Protocol", "p", &dbv)) {
- if (!strcmp(cws->szModule, dbv.pszVal)) {
+ if (!mir_strcmp(cws->szModule, dbv.pszVal)) {
cli.pfnInvalidateDisplayNameCacheEntry(hContact);
- if (!strcmp(cws->szSetting, "UIN") || !strcmp(cws->szSetting, "Nick") || !strcmp(cws->szSetting, "FirstName")
- || !strcmp(cws->szSetting, "LastName") || !strcmp(cws->szSetting, "e-mail"))
+ if (!mir_strcmp(cws->szSetting, "UIN") || !mir_strcmp(cws->szSetting, "Nick") || !mir_strcmp(cws->szSetting, "FirstName")
+ || !mir_strcmp(cws->szSetting, "LastName") || !mir_strcmp(cws->szSetting, "e-mail"))
{
CallService(MS_CLUI_CONTACTRENAMED, hContact, 0);
}
- else if (!strcmp(cws->szSetting, "Status")) {
+ else if (!mir_strcmp(cws->szSetting, "Status")) {
if (!db_get_b(hContact, "CList", "Hidden", 0)) {
if (db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT)) {
// User's state is changing, and we are hideOffline-ing
@@ -250,8 +250,8 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
}
}
- if (!strcmp(cws->szModule, "CList")) {
- if (!strcmp(cws->szSetting, "Hidden")) {
+ if (!mir_strcmp(cws->szModule, "CList")) {
+ if (!mir_strcmp(cws->szSetting, "Hidden")) {
if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) {
char *szProto = GetContactProto(hContact);
cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact), 1);
@@ -259,12 +259,12 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam)
else
CallService(MS_CLUI_CONTACTDELETED, hContact, 0);
}
- if (!strcmp(cws->szSetting, "MyHandle"))
+ if (!mir_strcmp(cws->szSetting, "MyHandle"))
cli.pfnInvalidateDisplayNameCacheEntry(hContact);
}
- if (!strcmp(cws->szModule, "Protocol")) {
- if (!strcmp(cws->szSetting, "p")) {
+ if (!mir_strcmp(cws->szModule, "Protocol")) {
+ if (!mir_strcmp(cws->szSetting, "p")) {
char *szProto;
if (cws->value.type == DBVT_DELETED)
szProto = NULL;
diff --git a/src/modules/clist/clisttray.cpp b/src/modules/clist/clisttray.cpp
index ffd8e0ae26..f6983cb912 100644
--- a/src/modules/clist/clisttray.cpp
+++ b/src/modules/clist/clisttray.cpp
@@ -695,7 +695,7 @@ INT_PTR fnTrayIconProcessMessage(WPARAM wParam, LPARAM lParam)
for (int j = 0; j < accounts.getCount(); j++) {
int k = cli.pfnGetAccountIndexByPos(j);
if (k >= 0) {
- if (!strcmp(cli.trayIcon[i].szProto, accounts[k]->szModuleName)) {
+ if (!mir_strcmp(cli.trayIcon[i].szProto, accounts[k]->szModuleName)) {
HMENU hm = GetSubMenu(hMenu, ind);
if (hm) hMenu = hm;
break;
@@ -799,7 +799,7 @@ int fnCListTrayNotify(MIRANDASYSTRAYNOTIFY* msn)
if (msn->szProto) {
for (int j = 0; j < cli.trayIconCount; j++) {
if (cli.trayIcon[j].szProto != NULL) {
- if (!strcmp(msn->szProto, cli.trayIcon[j].szProto)) {
+ if (!mir_strcmp(msn->szProto, cli.trayIcon[j].szProto)) {
iconId = cli.trayIcon[j].id;
break;
}
diff --git a/src/modules/clist/contacts.cpp b/src/modules/clist/contacts.cpp
index 7bb91e1cd7..2f04fe4c1e 100644
--- a/src/modules/clist/contacts.cpp
+++ b/src/modules/clist/contacts.cpp
@@ -42,7 +42,7 @@ BYTE nameOrder[NAMEORDERCOUNT];
static int GetDatabaseString(CONTACTINFO *ci, const char* setting, DBVARIANT* dbv)
{
- if (strcmp(ci->szProto, "CList") && CallProtoService(ci->szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_INFOSETTINGSVC) {
+ if (mir_strcmp(ci->szProto, "CList") && CallProtoService(ci->szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_INFOSETTINGSVC) {
DBCONTACTGETSETTING cgs = { ci->szProto, setting, dbv };
dbv->type = (ci->dwFlag & CNF_UNICODE) ? DBVT_WCHAR : DBVT_ASCIIZ;
diff --git a/src/modules/crypt/encrypt.cpp b/src/modules/crypt/encrypt.cpp
index dd3d6b6a50..4bdc393358 100644
--- a/src/modules/crypt/encrypt.cpp
+++ b/src/modules/crypt/encrypt.cpp
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
static int CompareFunc(const CRYPTO_PROVIDER *p1, const CRYPTO_PROVIDER *p2)
{
- return strcmp(p1->pszName, p2->pszName);
+ return mir_strcmp(p1->pszName, p2->pszName);
}
static LIST<CRYPTO_PROVIDER> arProviders(5, CompareFunc);
diff --git a/src/modules/database/dbutils.cpp b/src/modules/database/dbutils.cpp
index 425cc5d7b4..2e7ef5de9e 100644
--- a/src/modules/database/dbutils.cpp
+++ b/src/modules/database/dbutils.cpp
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
static int CompareEventTypes(const DBEVENTTYPEDESCR *p1, const DBEVENTTYPEDESCR *p2)
{
- int result = strcmp(p1->module, p2->module);
+ int result = mir_strcmp(p1->module, p2->module);
if (result)
return result;
diff --git a/src/modules/database/mdatabasecache.cpp b/src/modules/database/mdatabasecache.cpp
index f0638b147d..14eecc97ec 100644
--- a/src/modules/database/mdatabasecache.cpp
+++ b/src/modules/database/mdatabasecache.cpp
@@ -26,12 +26,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
static int stringCompare(const char *p1, const char *p2)
{
- return strcmp(p1, p2);
+ return mir_strcmp(p1, p2);
}
static int compareGlobals(const DBCachedGlobalValue *p1, const DBCachedGlobalValue *p2)
{
- return strcmp(p1->name, p2->name);
+ return mir_strcmp(p1->name, p2->name);
}
MDatabaseCache::MDatabaseCache(size_t _size) :
@@ -138,7 +138,7 @@ char* MDatabaseCache::GetCachedSetting(const char *szModuleName, const char *szS
}
else szKey = szSettingName;
- if (m_lastSetting && !strcmp(szKey, m_lastSetting))
+ if (m_lastSetting && !mir_strcmp(szKey, m_lastSetting))
return m_lastSetting;
int index = m_lSettings.getIndex((char*)szKey);
diff --git a/src/modules/extraicons/DefaultExtraIcons.cpp b/src/modules/extraicons/DefaultExtraIcons.cpp
index 72f835b85a..dc1833d00f 100644
--- a/src/modules/extraicons/DefaultExtraIcons.cpp
+++ b/src/modules/extraicons/DefaultExtraIcons.cpp
@@ -169,13 +169,13 @@ static int SettingChanged(WPARAM hContact, LPARAM lParam)
return 0;
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- bool isProto = (strcmp(cws->szModule, proto) == 0);
- if (isProto && strcmp(cws->szSetting, "ApparentMode") == 0) {
+ bool isProto = (mir_strcmp(cws->szModule, proto) == 0);
+ if (isProto && mir_strcmp(cws->szSetting, "ApparentMode") == 0) {
SetVisibility(hContact, cws->value.type == DBVT_DELETED ? 0 : cws->value.wVal, true);
return 0;
}
- if (strcmp(cws->szSetting, "Gender") == 0 && (isProto || strcmp(cws->szModule, "UserInfo") == 0)) {
+ if (mir_strcmp(cws->szSetting, "Gender") == 0 && (isProto || mir_strcmp(cws->szModule, "UserInfo") == 0)) {
SetGender(hContact, cws->value.type == DBVT_DELETED ? 0 : cws->value.bVal, true);
return 0;
}
@@ -188,9 +188,9 @@ static int SettingChanged(WPARAM hContact, LPARAM lParam)
break;
if (p.db[j] == NULL && !isProto)
continue;
- if (p.db[j] != NULL && strcmp(cws->szModule, p.db[j]))
+ if (p.db[j] != NULL && mir_strcmp(cws->szModule, p.db[j]))
continue;
- if (strcmp(cws->szSetting, p.db[j + 1]))
+ if (mir_strcmp(cws->szSetting, p.db[j + 1]))
continue;
bool show = (cws->value.type != DBVT_DELETED && !IsEmpty(cws->value.pszVal));
@@ -245,7 +245,7 @@ struct ProtoInfo
};
static int CompareProtos(const ProtoInfo *p1, const ProtoInfo *p2)
-{ return strcmp(p1->proto, p2->proto);
+{ return mir_strcmp(p1->proto, p2->proto);
}
OBJLIST<ProtoInfo> arProtos(10, CompareProtos);
diff --git a/src/modules/extraicons/extraicons.cpp b/src/modules/extraicons/extraicons.cpp
index 77be5eae80..b2ca2b9c95 100644
--- a/src/modules/extraicons/extraicons.cpp
+++ b/src/modules/extraicons/extraicons.cpp
@@ -122,7 +122,7 @@ BaseExtraIcon* GetExtraIconByName(const char *name)
{
for (int i=0; i < registeredExtraIcons.getCount(); i++) {
BaseExtraIcon *extra = registeredExtraIcons[i];
- if (strcmp(name, extra->getName()) == 0)
+ if (mir_strcmp(name, extra->getName()) == 0)
return extra;
}
return NULL;
diff --git a/src/modules/extraicons/usedIcons.cpp b/src/modules/extraicons/usedIcons.cpp
index 37fe581ff1..db967687dd 100644
--- a/src/modules/extraicons/usedIcons.cpp
+++ b/src/modules/extraicons/usedIcons.cpp
@@ -41,7 +41,7 @@ struct Icon
static int SortFunc(const Icon *p1, const Icon *p2)
{
- return strcmp(p1->name, p2->name);
+ return mir_strcmp(p1->name, p2->name);
}
static OBJLIST<Icon> usedIcons(50, SortFunc);
diff --git a/src/modules/fonts/FontOptions.cpp b/src/modules/fonts/FontOptions.cpp
index 78a1b54776..1029abade3 100644
--- a/src/modules/fonts/FontOptions.cpp
+++ b/src/modules/fonts/FontOptions.cpp
@@ -148,7 +148,7 @@ static BOOL ExportSettings(HWND hwndDlg, const TCHAR *filename, OBJLIST<FontInte
FontInternal& F = flist[i];
mir_snprintf(buff, SIZEOF(buff), "\n[%s]", F.dbSettingsGroup);
- if (strcmp(buff, header) != 0) {
+ if (mir_strcmp(buff, header) != 0) {
strncpy(header, buff, SIZEOF(header));
WriteLine(out, buff);
}
@@ -194,7 +194,7 @@ static BOOL ExportSettings(HWND hwndDlg, const TCHAR *filename, OBJLIST<FontInte
ColourInternal& C = clist[i];
mir_snprintf(buff, SIZEOF(buff), "\n[%s]", C.dbSettingsGroup);
- if (strcmp(buff, header) != 0) {
+ if (mir_strcmp(buff, header) != 0) {
strncpy_s(header, buff, _TRUNCATE);
WriteLine(out, buff);
}
@@ -206,7 +206,7 @@ static BOOL ExportSettings(HWND hwndDlg, const TCHAR *filename, OBJLIST<FontInte
EffectInternal& E = elist[i];
mir_snprintf(buff, SIZEOF(buff), "\n[%s]", E.dbSettingsGroup);
- if (strcmp(buff, header) != 0) {
+ if (mir_strcmp(buff, header) != 0) {
strncpy_s(header, buff, _TRUNCATE);
WriteLine(out, buff);
}
diff --git a/src/modules/icolib/skin2icons.cpp b/src/modules/icolib/skin2icons.cpp
index 7739b14085..02f0de025a 100644
--- a/src/modules/icolib/skin2icons.cpp
+++ b/src/modules/icolib/skin2icons.cpp
@@ -85,7 +85,7 @@ static LIST<IconSourceItem> iconSourceList(20, sttCompareIconSourceItems);
static int sttCompareIcons(const IcolibItem* p1, const IcolibItem* p2)
{
- return strcmp(p1->name, p2->name);
+ return mir_strcmp(p1->name, p2->name);
}
LIST<IcolibItem> iconList(20, sttCompareIcons);
diff --git a/src/modules/metacontacts/meta_services.cpp b/src/modules/metacontacts/meta_services.cpp
index d3fec41eb0..f550d4edbd 100644
--- a/src/modules/metacontacts/meta_services.cpp
+++ b/src/modules/metacontacts/meta_services.cpp
@@ -278,7 +278,7 @@ int Meta_HandleACK(WPARAM, LPARAM lParam)
if (cc == NULL)
return 0;
- if (!strcmp(ack->szModule, META_PROTO))
+ if (!mir_strcmp(ack->szModule, META_PROTO))
return 0; // don't rebroadcast our own acks
// if it's for something we don't support, ignore
@@ -346,19 +346,19 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam)
if (contact_number == -1)
return 0; // exit - db corruption
- if (!strcmp(dcws->szSetting, "IP")) {
+ if (!mir_strcmp(dcws->szSetting, "IP")) {
if (dcws->value.type == DBVT_DWORD)
db_set_dw(ccMeta->contactID, META_PROTO, "IP", dcws->value.dVal);
else
db_unset(ccMeta->contactID, META_PROTO, "IP");
}
- else if (!strcmp(dcws->szSetting, "RealIP")) {
+ else if (!mir_strcmp(dcws->szSetting, "RealIP")) {
if (dcws->value.type == DBVT_DWORD)
db_set_dw(ccMeta->contactID, META_PROTO, "RealIP", dcws->value.dVal);
else
db_unset(ccMeta->contactID, META_PROTO, "RealIP");
}
- else if (!strcmp(dcws->szSetting, "ListeningTo")) {
+ else if (!mir_strcmp(dcws->szSetting, "ListeningTo")) {
switch (dcws->value.type) {
case DBVT_ASCIIZ:
db_set_s(ccMeta->contactID, META_PROTO, "ListeningTo", dcws->value.pszVal);
@@ -374,7 +374,7 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam)
break;
}
}
- else if (!strcmp(dcws->szSetting, "Nick") && dcws->value.type != DBVT_DELETED) {
+ else if (!mir_strcmp(dcws->szSetting, "Nick") && dcws->value.type != DBVT_DELETED) {
// subcontact nick has changed - update metacontact
mir_snprintf(buffer, SIZEOF(buffer), "Nick%d", contact_number);
db_set(ccMeta->contactID, META_PROTO, buffer, &dcws->value);
@@ -389,19 +389,19 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam)
MCONTACT hMostOnline = Meta_GetMostOnline(ccMeta);
Meta_CopyContactNick(ccMeta, hMostOnline);
}
- else if (!strcmp(dcws->szSetting, "IdleTS")) {
+ else if (!mir_strcmp(dcws->szSetting, "IdleTS")) {
if (dcws->value.type == DBVT_DWORD)
db_set_dw(ccMeta->contactID, META_PROTO, "IdleTS", dcws->value.dVal);
else if (dcws->value.type == DBVT_DELETED)
db_set_dw(ccMeta->contactID, META_PROTO, "IdleTS", 0);
}
- else if (!strcmp(dcws->szSetting, "LogonTS")) {
+ else if (!mir_strcmp(dcws->szSetting, "LogonTS")) {
if (dcws->value.type == DBVT_DWORD)
db_set_dw(ccMeta->contactID, META_PROTO, "LogonTS", dcws->value.dVal);
else if (dcws->value.type == DBVT_DELETED)
db_set_dw(ccMeta->contactID, META_PROTO, "LogonTS", 0);
}
- else if (!strcmp(dcws->szModule, "CList") && !strcmp(dcws->szSetting, "MyHandle")) {
+ else if (!mir_strcmp(dcws->szModule, "CList") && !mir_strcmp(dcws->szSetting, "MyHandle")) {
if (dcws->value.type == DBVT_DELETED) {
char *proto = GetContactProto(hContact);
mir_snprintf(buffer, SIZEOF(buffer), "CListName%d", contact_number);
@@ -423,7 +423,7 @@ int Meta_SettingChanged(WPARAM hContact, LPARAM lParam)
Meta_CopyContactNick(ccMeta, Meta_GetMostOnline(ccMeta));
}
// subcontact changing status
- else if (!strcmp(dcws->szSetting, "Status") && dcws->value.type != DBVT_DELETED) {
+ else if (!mir_strcmp(dcws->szSetting, "Status") && dcws->value.type != DBVT_DELETED) {
// update subcontact status setting
mir_snprintf(buffer, SIZEOF(buffer), "Status%d", contact_number);
db_set_w(ccMeta->contactID, META_PROTO, buffer, dcws->value.wVal);
diff --git a/src/modules/netlib/netlib.cpp b/src/modules/netlib/netlib.cpp
index bb33c73604..bc833c9195 100644
--- a/src/modules/netlib/netlib.cpp
+++ b/src/modules/netlib/netlib.cpp
@@ -36,7 +36,7 @@ typedef BOOL (WINAPI *tGetProductInfo)(DWORD, DWORD, DWORD, DWORD, PDWORD);
static int CompareNetlibUser(const NetlibUser* p1, const NetlibUser* p2)
{
- return strcmp(p1->user.szSettingsModule, p2->user.szSettingsModule);
+ return mir_strcmp(p1->user.szSettingsModule, p2->user.szSettingsModule);
}
LIST<NetlibUser> netlibUser(5, CompareNetlibUser);
diff --git a/src/modules/netlib/netlibautoproxy.cpp b/src/modules/netlib/netlibautoproxy.cpp
index df46abd73b..ddc74b7a6b 100644
--- a/src/modules/netlib/netlibautoproxy.cpp
+++ b/src/modules/netlib/netlibautoproxy.cpp
@@ -324,7 +324,7 @@ char* NetlibGetIeProxy(char *szUrl)
{
for (int i=0; i < proxyBypass.getCount(); i++)
{
- if (strcmp(proxyBypass[i], "<local>") == 0)
+ if (mir_strcmp(proxyBypass[i], "<local>") == 0)
{
if (strchr(szHost, '.') == NULL) return NULL;
}
diff --git a/src/modules/netlib/netlibupnp.cpp b/src/modules/netlib/netlibupnp.cpp
index c97a24050f..2e3445126f 100644
--- a/src/modules/netlib/netlibupnp.cpp
+++ b/src/modules/netlib/netlibupnp.cpp
@@ -628,7 +628,7 @@ static void discoverUPnP(void)
parseURL(szUrl, szHostNew, NULL, NULL);
parseURL(szCtlUrl, szHostExist, NULL, NULL);
- if (strcmp(szHostNew, szHostExist) == 0) {
+ if (mir_strcmp(szHostNew, szHostExist) == 0) {
gatewayFound = true;
break;
}
@@ -782,10 +782,10 @@ void NetlibUPnPCleanup(void*)
if (httpTransact(szCtlUrl, szData, 4096, "GetGenericPortMappingEntry", ControlAction) != 200)
break;
- if (!txtParseParam(szData, "<NewPortMappingDescription", ">", "<", buf, sizeof(buf)) || strcmp(buf, "Miranda") != 0)
+ if (!txtParseParam(szData, "<NewPortMappingDescription", ">", "<", buf, sizeof(buf)) || mir_strcmp(buf, "Miranda") != 0)
continue;
- if (!txtParseParam(szData, "<NewInternalClient", ">", "<", buf, sizeof(buf)) || strcmp(buf, lip) != 0)
+ if (!txtParseParam(szData, "<NewInternalClient", ">", "<", buf, sizeof(buf)) || mir_strcmp(buf, lip) != 0)
continue;
if (txtParseParam(szData, "<NewExternalPort", ">", "<", buf, sizeof(buf))) {
diff --git a/src/modules/protocols/protochains.cpp b/src/modules/protocols/protochains.cpp
index bc94b9cc25..be760d9877 100644
--- a/src/modules/protocols/protochains.cpp
+++ b/src/modules/protocols/protochains.cpp
@@ -197,7 +197,7 @@ static INT_PTR Proto_IsProtoOnContact(WPARAM wParam, LPARAM lParam)
return -1;
for (int i = 0; i < filters.getCount(); i++)
- if (!strcmp(szProto, filters[i]->szName))
+ if (!mir_strcmp(szProto, filters[i]->szName))
return i + 1;
return 0;
diff --git a/src/modules/protocols/protocols.cpp b/src/modules/protocols/protocols.cpp
index 526b767328..a3108365bf 100644
--- a/src/modules/protocols/protocols.cpp
+++ b/src/modules/protocols/protocols.cpp
@@ -40,7 +40,7 @@ TServiceListItem;
static int CompareServiceItems(const TServiceListItem* p1, const TServiceListItem* p2)
{
- return strcmp(p1->name, p2->name);
+ return mir_strcmp(p1->name, p2->name);
}
static LIST<TServiceListItem> serviceItems(10, CompareServiceItems);
@@ -52,7 +52,7 @@ static int CompareProtos(const PROTOCOLDESCRIPTOR *p1, const PROTOCOLDESCRIPTOR
if (p1->type != p2->type)
return p1->type - p2->type;
- return strcmp(p1->szName, p2->szName);
+ return mir_strcmp(p1->szName, p2->szName);
}
LIST<PROTOCOLDESCRIPTOR> filters(10, CompareProtos);
@@ -513,7 +513,7 @@ INT_PTR CallProtoServiceInt(MCONTACT hContact, const char *szModule, const char
}
}
- if (!strcmp(szService, PS_ADDTOLIST)) {
+ if (!mir_strcmp(szService, PS_ADDTOLIST)) {
PROTOSEARCHRESULT *psr = (PROTOSEARCHRESULT*)lParam;
if (!(psr->flags & PSR_UNICODE)) {
PROTOSEARCHRESULT *psra = (PROTOSEARCHRESULT*)mir_alloc(psr->cbSize);
diff --git a/src/modules/protocols/protodir.cpp b/src/modules/protocols/protodir.cpp
index 96f442dfc8..0ce11742ed 100644
--- a/src/modules/protocols/protodir.cpp
+++ b/src/modules/protocols/protodir.cpp
@@ -75,10 +75,10 @@ int contactCacheCompare(void * a, void * b)
contactEntry * y = (contactEntry *) b;
int rc=0;
// same protocol?
- rc = strcmp(x->proto, y->proto);
+ rc = mir_strcmp(x->proto, y->proto);
if ( rc == 0 ) {
// same id? id's might be missing
- if ( x->id && y->id ) rc = strcmp(x->id, y->id);
+ if ( x->id && y->id ) rc = mir_strcmp(x->id, y->id);
}
return rc;
}
@@ -96,7 +96,7 @@ int protoCacheCompare(void * a, void * b)
// keeps a list of protocol names
int protoNameCacheCompare(void * a, void * b)
{
- return strcmp( (char *)a, (char*)b );
+ return mir_strcmp( (char *)a, (char*)b );
}
// cache the protocol string so that its not allocated per contact but shared
diff --git a/src/modules/srmm/statusicon.cpp b/src/modules/srmm/statusicon.cpp
index 1722dac64a..01e604ff12 100644
--- a/src/modules/srmm/statusicon.cpp
+++ b/src/modules/srmm/statusicon.cpp
@@ -67,7 +67,7 @@ struct StatusIconMain : public MZeroedObject
static int CompareIcons(const StatusIconMain *p1, const StatusIconMain *p2)
{
- int res = strcmp(p1->sid.szModule, p2->sid.szModule);
+ int res = mir_strcmp(p1->sid.szModule, p2->sid.szModule);
if (res)
return res;
diff --git a/src/modules/utils/path.cpp b/src/modules/utils/path.cpp
index 0a2bccb038..54e75810e5 100644
--- a/src/modules/utils/path.cpp
+++ b/src/modules/utils/path.cpp
@@ -105,7 +105,7 @@ TCHAR *GetContactID(MCONTACT hContact)
#define XSTR(target, s) _xstrselect(target, s, _T(s))
-static __forceinline int _xcscmp(const char *s1, const char *s2) { return strcmp(s1, s2); }
+static __forceinline int _xcscmp(const char *s1, const char *s2) { return mir_strcmp(s1, s2); }
static __forceinline int _xcsncmp(const char *s1, const char *s2, size_t n) { return strncmp(s1, s2, n); }
static __forceinline size_t _xcslen(const char *s1) { return mir_strlen(s1); }
static __forceinline char *_xcscpy(char *s1, const char *s2) { return strcpy(s1, s2); }
diff --git a/src/modules/xml/xmlParser.h b/src/modules/xml/xmlParser.h
index 731c3a128e..aa9bf91a88 100644
--- a/src/modules/xml/xmlParser.h
+++ b/src/modules/xml/xmlParser.h
@@ -384,8 +384,8 @@ public:
void deleteNodeContent();
/**< \note The XMLNode instances that are referring to the part of the subtree that has been deleted CANNOT be used anymore!!. Unexpected results will occur if you continue using them. */
void deleteAttribute(int i=0); ///< Delete the ith attribute of the current XMLNode
- void deleteAttribute(XMLCSTR lpszName); ///< Delete the attribute with the given name (the "strcmp" function is used to find the right attribute)
- void deleteAttribute(XMLAttribute *anAttribute); ///< Delete the attribute with the name "anAttribute->lpszName" (the "strcmp" function is used to find the right attribute)
+ void deleteAttribute(XMLCSTR lpszName); ///< Delete the attribute with the given name (the "mir_strcmp" function is used to find the right attribute)
+ void deleteAttribute(XMLAttribute *anAttribute); ///< Delete the attribute with the name "anAttribute->lpszName" (the "mir_strcmp" function is used to find the right attribute)
void deleteText(int i=0); ///< Delete the Ith text content of the current XMLNode
void deleteText(XMLCSTR lpszValue); ///< Delete the text content "lpszValue" inside the current XMLNode (direct "pointer-to-pointer" comparison is used to find the right text)
void deleteClear(int i=0); ///< Delete the Ith clear tag inside the current XMLNode