summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2015-05-22 18:37:53 +0000
committerKirill Volinsky <mataes2007@gmail.com>2015-05-22 18:37:53 +0000
commite2d7ebd6315a810bd4ea54f1088b84d09c3ca5d2 (patch)
tree736bb8768f17b26904cdf8e0fe6fb47e1dcb892e /protocols
parenta882eddcba5fd22adab1454c8d2ff9c224bc7aa7 (diff)
replace stricmp to mir_strcmpi
git-svn-id: http://svn.miranda-ng.org/main/trunk@13760 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/IcqOscarJ/src/utilities.cpp2
-rw-r--r--protocols/JabberG/src/jabber_thread.cpp4
-rw-r--r--protocols/MSN/src/msn_chat.cpp4
-rw-r--r--protocols/MSN/src/msn_commands.cpp16
-rw-r--r--protocols/Omegle/src/chat.cpp14
-rw-r--r--protocols/SkypeClassic/src/skypeproxy/skypeproxy.c8
-rw-r--r--protocols/SkypeWeb/src/skype_chatrooms.cpp2
-rw-r--r--protocols/SkypeWeb/src/skype_utils.cpp2
-rw-r--r--protocols/Tlen/src/tlen_misc.cpp2
-rw-r--r--protocols/Tox/src/tox_chatrooms.cpp2
10 files changed, 28 insertions, 28 deletions
diff --git a/protocols/IcqOscarJ/src/utilities.cpp b/protocols/IcqOscarJ/src/utilities.cpp
index 37c4e6e12f..9e2298aa90 100644
--- a/protocols/IcqOscarJ/src/utilities.cpp
+++ b/protocols/IcqOscarJ/src/utilities.cpp
@@ -593,7 +593,7 @@ int __fastcall strcmpnull(const char *str1, const char *str2)
return 1;
}
-/* a stricmp() that likes NULL */
+/* a mir_strcmpi() that likes NULL */
int __fastcall stricmpnull(const char *str1, const char *str2)
{
if (str1 && str2)
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index c5c18a6453..594c24eff2 100644
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -899,8 +899,8 @@ void CJabberProto::OnProcessProceed(HXML node, ThreadData *info)
debugLogA("Starting TLS...");
char* gtlk = strstr(info->conn.manualHost, "google.com");
- bool isHosted = gtlk && !gtlk[10] && stricmp(info->conn.server, "gmail.com") &&
- stricmp(info->conn.server, "googlemail.com");
+ bool isHosted = gtlk && !gtlk[10] && mir_strcmpi(info->conn.server, "gmail.com") &&
+ mir_strcmpi(info->conn.server, "googlemail.com");
NETLIBSSL ssl = { 0 };
ssl.cbSize = sizeof(ssl);
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp
index b7d5bf52ab..bc84f3ad64 100644
--- a/protocols/MSN/src/msn_chat.cpp
+++ b/protocols/MSN/src/msn_chat.cpp
@@ -130,7 +130,7 @@ void CMsnProto::MSN_ChatStart(ezxml_t xmli)
if (pszCreator && !mir_strcmp(mri, pszCreator)) info->mCreator = gcu;
char* szEmail, *szNet;
parseWLID(NEWSTR_ALLOCA(mri), &szNet, &szEmail, NULL);
- if (!stricmp(szEmail, GetMyUsername(atoi(szNet))))
+ if (!mir_strcmpi(szEmail, GetMyUsername(atoi(szNet))))
info->mMe = gcu;
gcu->btag = 1;
}
@@ -248,7 +248,7 @@ void CMsnProto::MSN_GCProcessThreadActivity(ezxml_t xmli, const TCHAR *mChatID)
}
char* szEmail, *szNet;
parseWLID(NEWSTR_ALLOCA(pszTarget), &szNet, &szEmail, NULL);
- gce.bIsMe = !stricmp(szEmail, GetMyUsername(atoi(szNet)));
+ gce.bIsMe = !mir_strcmpi(szEmail, GetMyUsername(atoi(szNet)));
gce.ptszUID = mir_a2t(pszTarget);
MCONTACT hContTarget = MSN_HContactFromEmail(pszTarget);
gce.ptszNick =GetContactNameT(hContTarget);
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp
index 33903878c2..e460d2942d 100644
--- a/protocols/MSN/src/msn_commands.cpp
+++ b/protocols/MSN/src/msn_commands.cpp
@@ -100,12 +100,12 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para
if (sdgMsg) {
msgBytes = atol(datas.strMsgBytes);
- if (stricmp(datas.typeId, "MSGR"))
+ if (mir_strcmpi(datas.typeId, "MSGR"))
return;
}
else if (nfyMsg) {
msgBytes = atol(datas.strMsgBytes);
- if (stricmp(datas.typeId, "MSGR\\HOTMAIL"))
+ if (mir_strcmpi(datas.typeId, "MSGR\\HOTMAIL"))
return;
}
else {
@@ -400,13 +400,13 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para
char *szEmail, *szInst;
parseWLID(NEWSTR_ALLOCA(dest), NULL, &szEmail, &szInst);
- if (stricmp(szEmail, MyOptions.szEmail) == 0) {
+ if (mir_strcmpi(szEmail, MyOptions.szEmail) == 0) {
const char* src = tHeader["P2P-Src"];
if (src == NULL) src = email;
if (szInst == NULL)
p2p_processMsg(info, msgBody, src);
- else if (stricmp(szInst, MyOptions.szMachineGuidP2P) == 0)
+ else if (mir_strcmpi(szInst, MyOptions.szMachineGuidP2P) == 0)
p2p_processMsgV2(info, msgBody, src);
}
}
@@ -488,7 +488,7 @@ void CMsnProto::MSN_ProcessNLN(const char *userStatus, const char *wlid, char *u
bool isMe = false;
char* szEmail, *szNet;
parseWLID(NEWSTR_ALLOCA(wlid), &szNet, &szEmail, NULL);
- if (!stricmp(szEmail, GetMyUsername(atoi(szNet)))) {
+ if (!mir_strcmpi(szEmail, GetMyUsername(atoi(szNet)))) {
if (!*userStatus) return;
isMe = true;
int newStatus = MSNStatusToMiranda(userStatus);
@@ -549,7 +549,7 @@ void CMsnProto::MSN_ProcessNLN(const char *userStatus, const char *wlid, char *u
if (hContact != NULL) {
char szSavedHash[64] = "";
db_get_static(hContact, m_szModuleName, "AvatarSavedHash", szSavedHash, sizeof(szSavedHash));
- if (stricmp(szSavedHash, pszAvatarHash))
+ if (mir_strcmpi(szSavedHash, pszAvatarHash))
pushAvatarRequest(hContact, pszUrl);
else {
char szSavedContext[64];
@@ -1000,7 +1000,7 @@ LBL_InvalidCommand:
if ((id=ezxml_child(xmli, "id")))
{
bool bIsChat = strncmp(id->txt, "19:", 3)==0;
- bool bHasMore = stricmp(ezxml_txt(ezxml_child(xmli, "hasmore")), "true") == 0;
+ bool bHasMore = mir_strcmpi(ezxml_txt(ezxml_child(xmli, "hasmore")), "true") == 0;
ezxml_t syncstate;
hContact = MSN_HContactFromEmail(id->txt, NULL, false, false);
if (!bHasMore && hContact) db_unset(hContact, m_szModuleName, "syncTS");
@@ -1020,7 +1020,7 @@ LBL_InvalidCommand:
ts=IsoToUnixTime(arrtime->txt);
parseWLID(NEWSTR_ALLOCA(from->txt), &netId, &email, NULL);
message=content->txt;
- sentMsg = stricmp(email, GetMyUsername(atoi(netId)))==0;
+ sentMsg = mir_strcmpi(email, GetMyUsername(atoi(netId)))==0;
if (msgtype) {
if (!mir_strcmp(msgtype->txt, "RichText")) {
message = NEWSTR_ALLOCA(message);
diff --git a/protocols/Omegle/src/chat.cpp b/protocols/Omegle/src/chat.cpp
index cacc111d59..2bd16d8d14 100644
--- a/protocols/Omegle/src/chat.cpp
+++ b/protocols/Omegle/src/chat.cpp
@@ -80,7 +80,7 @@ int OmegleProto::OnChatEvent(WPARAM, LPARAM lParam)
command = text.substr(1);
}
- if (!stricmp(command.c_str(), "new"))
+ if (!mir_strcmpi(command.c_str(), "new"))
{
facy.spy_mode_ = false;
facy.question_.clear();
@@ -88,12 +88,12 @@ int OmegleProto::OnChatEvent(WPARAM, LPARAM lParam)
ForkThread(&OmegleProto::NewChatWorker, NULL);
break;
}
- else if (!stricmp(command.c_str(), "quit"))
+ else if (!mir_strcmpi(command.c_str(), "quit"))
{
ForkThread(&OmegleProto::StopChatWorker, NULL);
break;
}
- else if (!stricmp(command.c_str(), "spy"))
+ else if (!mir_strcmpi(command.c_str(), "spy"))
{
facy.spy_mode_ = true;
facy.question_.clear();
@@ -101,7 +101,7 @@ int OmegleProto::OnChatEvent(WPARAM, LPARAM lParam)
ForkThread(&OmegleProto::NewChatWorker, NULL);
break;
}
- else if (!stricmp(command.c_str(), "ask"))
+ else if (!mir_strcmpi(command.c_str(), "ask"))
{
if (params.empty()) {
// Load last question
@@ -134,7 +134,7 @@ int OmegleProto::OnChatEvent(WPARAM, LPARAM lParam)
ForkThread(&OmegleProto::NewChatWorker, NULL);
break;
}
- else if (!stricmp(command.c_str(), "asl"))
+ else if (!mir_strcmpi(command.c_str(), "asl"))
{
DBVARIANT dbv;
if ( !getU8String( OMEGLE_KEY_ASL,&dbv )) {
@@ -147,7 +147,7 @@ int OmegleProto::OnChatEvent(WPARAM, LPARAM lParam)
break;
}
}
- else if (!stricmp(command.c_str(), "help"))
+ else if (!mir_strcmpi(command.c_str(), "help"))
{
UpdateChat(NULL, TranslateT("There are three different modes of chatting:\
\n1) Standard mode\t - You chat with random stranger privately\
@@ -155,7 +155,7 @@ int OmegleProto::OnChatEvent(WPARAM, LPARAM lParam)
\n3) Spy mode\t - You and stranger got a question to discuss from third stranger (he can't join your conversation, only watch)\
\n\nSend '/commands' for available commands."), false);
}
- else if (!stricmp(command.c_str(), "commands"))
+ else if (!mir_strcmpi(command.c_str(), "commands"))
{
UpdateChat(NULL, TranslateT("You can use different commands:\
\n/help\t - show info about chat modes\
diff --git a/protocols/SkypeClassic/src/skypeproxy/skypeproxy.c b/protocols/SkypeClassic/src/skypeproxy/skypeproxy.c
index 65ba2e0ccc..200b79632a 100644
--- a/protocols/SkypeClassic/src/skypeproxy/skypeproxy.c
+++ b/protocols/SkypeClassic/src/skypeproxy/skypeproxy.c
@@ -510,7 +510,7 @@ int main(int argc, char *argv[]) {
if (argc>1) {
int i;
- if (!stricmp(argv[1], "-h") || !stricmp(argv[1], "--help") || !stricmp(argv[1], "/?")) {
+ if (!mir_strcmpi(argv[1], "-h") || !mir_strcmpi(argv[1], "--help") || !mir_strcmpi(argv[1], "/?")) {
printf("Usage: %s [-i BindIP] [-p BindPort]", argv[0]);
#ifdef USE_AUTHENTICATION
printf(" [-k Password]");
@@ -519,15 +519,15 @@ int main(int argc, char *argv[]) {
return EXIT_SUCCESS;
}
for (i=0;i<argc;i++) {
- if (!stricmp(argv[i], "-i") && argc>i+1)
+ if (!mir_strcmpi(argv[i], "-i") && argc>i+1)
strncpy(BindIP, argv[i+1], sizeof(BindIP));
- if (!stricmp(argv[i], "-p") && argc>i+1)
+ if (!mir_strcmpi(argv[i], "-p") && argc>i+1)
if (!(BindPort=atoi(argv[i+1]))) {
OUTPUT("ERROR: Cannot convert port to int. bye..");
return EXIT_FAILURE;
}
#ifdef USE_AUTHENTICATION
- if (!stricmp(argv[i], "-k") && argc>i+1)
+ if (!mir_strcmpi(argv[i], "-k") && argc>i+1)
password=strdup(argv[i+1]);
#endif
}
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp
index 3db8101cf8..9b4fb075cd 100644
--- a/protocols/SkypeWeb/src/skype_chatrooms.cpp
+++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp
@@ -566,7 +566,7 @@ INT_PTR CSkypeProto::SvcCreateChat(WPARAM, LPARAM)
int CSkypeProto::OnGroupChatMenuHook(WPARAM, LPARAM lParam)
{
GCMENUITEMS *gcmi = (GCMENUITEMS*)lParam;
- if (stricmp(gcmi->pszModule, m_szModuleName)) return 0;
+ if (mir_strcmpi(gcmi->pszModule, m_szModuleName)) return 0;
if (gcmi->Type == MENU_ON_LOG)
{
diff --git a/protocols/SkypeWeb/src/skype_utils.cpp b/protocols/SkypeWeb/src/skype_utils.cpp
index 305e94e03e..28413f61b4 100644
--- a/protocols/SkypeWeb/src/skype_utils.cpp
+++ b/protocols/SkypeWeb/src/skype_utils.cpp
@@ -394,7 +394,7 @@ char *CSkypeProto::RemoveHtml(const char *text)
bool found = false;
for (int j = 0; j < SIZEOF(htmlEntities); j++)
{
- if (!stricmp(entity.c_str(), htmlEntities[j].entity))
+ if (!mir_strcmpi(entity.c_str(), htmlEntities[j].entity))
{
new_string += htmlEntities[j].symbol;
found = true;
diff --git a/protocols/Tlen/src/tlen_misc.cpp b/protocols/Tlen/src/tlen_misc.cpp
index e3b4fe6c1e..f55d025959 100644
--- a/protocols/Tlen/src/tlen_misc.cpp
+++ b/protocols/Tlen/src/tlen_misc.cpp
@@ -95,7 +95,7 @@ MCONTACT TlenHContactFromJID(TlenProtocol *proto, const char *jid)
continue;
if ((p=dbv.pszVal) != NULL) {
- if (!stricmp(p, jid)) { // exact match (node@domain/resource)
+ if (!mir_strcmpi(p, jid)) { // exact match (node@domain/resource)
db_free(&dbv);
return hContact;
}
diff --git a/protocols/Tox/src/tox_chatrooms.cpp b/protocols/Tox/src/tox_chatrooms.cpp
index 12600ec239..27aa4c7444 100644
--- a/protocols/Tox/src/tox_chatrooms.cpp
+++ b/protocols/Tox/src/tox_chatrooms.cpp
@@ -90,7 +90,7 @@ int CToxProto::OnGroupChatEventHook(WPARAM, LPARAM lParam)
int CToxProto::OnGroupChatMenuHook(WPARAM, LPARAM lParam)
{
GCMENUITEMS *gcmi = (GCMENUITEMS*)lParam;
- if (stricmp(gcmi->pszModule, this->m_szModuleName) != 0)
+ if (mir_strcmpi(gcmi->pszModule, this->m_szModuleName) != 0)
{
return 0;
}