From 159b565b390687258ee65a3b66596e118752063c Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Fri, 22 May 2015 12:33:13 +0000 Subject: replace strcmp to mir_strcmp git-svn-id: http://svn.miranda-ng.org/main/trunk@13752 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/AimOscar/src/chat.cpp | 6 +++--- protocols/AimOscar/src/server.cpp | 10 +++++----- protocols/AimOscar/src/services.cpp | 6 +++--- protocols/AimOscar/src/theme.cpp | 2 +- protocols/AimOscar/src/ui.cpp | 8 ++++---- protocols/AimOscar/src/utility.cpp | 12 ++++++------ 6 files changed, 22 insertions(+), 22 deletions(-) (limited to 'protocols/AimOscar/src') diff --git a/protocols/AimOscar/src/chat.cpp b/protocols/AimOscar/src/chat.cpp index 73b8a61b91..a861dccb84 100644 --- a/protocols/AimOscar/src/chat.cpp +++ b/protocols/AimOscar/src/chat.cpp @@ -107,7 +107,7 @@ int CAimProto::OnGCEvent(WPARAM, LPARAM lParam) GCHOOK *gch = (GCHOOK*) lParam; if (!gch) return 1; - if (strcmp(gch->pDest->pszModule, m_szModuleName)) return 0; + if (mir_strcmp(gch->pDest->pszModule, m_szModuleName)) return 0; char* id = mir_t2a(gch->pDest->ptszID); chat_list_item* item = find_chat_by_id(id); @@ -206,7 +206,7 @@ int CAimProto::OnGCMenuHook(WPARAM, LPARAM lParam) else if ( gcmi->Type == MENU_ON_NICKLIST ) { char* sn = mir_t2a(gcmi->pszUID); - if ( !strcmp(username, sn)) + if ( !mir_strcmp(username, sn)) { static const struct gc_item Items[] = { { TranslateT("User &details"), 10, MENU_ITEM, FALSE }, @@ -265,7 +265,7 @@ chat_list_item* CAimProto::find_chat_by_id(char* id) chat_list_item* item = NULL; for(int i=0; iszModule, MOD_KEY_CL) == 0 && state == 1 && hContact) + if (mir_strcmp(cws->szModule, MOD_KEY_CL) == 0 && state == 1 && hContact) { - if (strcmp(cws->szSetting, AIM_KEY_NL) == 0) + if (mir_strcmp(cws->szSetting, AIM_KEY_NL) == 0) { if (cws->value.type == DBVT_DELETED) { @@ -133,7 +133,7 @@ int CAimProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) add_contact_to_group(hContact, AIM_DEFAULT_GROUP); } } - else if (strcmp(cws->szSetting, "MyHandle") == 0) + else if (mir_strcmp(cws->szSetting, "MyHandle") == 0) { char* name; switch (cws->value.type) diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index 36acbcef17..b9449f78fb 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -70,7 +70,7 @@ HICON LoadIconEx(const char* name, bool big) HANDLE GetIconHandle(const char* name) { for (int i=0; i < SIZEOF(iconList); i++) - if ( !strcmp(iconList[i].szName, name)) + if ( !mir_strcmp(iconList[i].szName, name)) return iconList[i].hIcolib; return NULL; diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp index a01c6e54d7..2d2ba33223 100644 --- a/protocols/AimOscar/src/ui.cpp +++ b/protocols/AimOscar/src/ui.cpp @@ -694,7 +694,7 @@ INT_PTR CALLBACK admin_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar GetDlgItemTextA(hwndDlg, IDC_FNAME, name, SIZEOF(name)); if (mir_strlen(trim_str(name)) > 0 && !ppro->getString(AIM_KEY_SN, &dbv)) { - if (strcmp(name, dbv.pszVal)) + if (mir_strcmp(name, dbv.pszVal)) ppro->aim_admin_format_name(ppro->hAdminConn,ppro->admin_seqno,name); db_free(&dbv); } @@ -703,7 +703,7 @@ INT_PTR CALLBACK admin_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar GetDlgItemTextA(hwndDlg, IDC_CEMAIL, email, SIZEOF(email)); if (mir_strlen(trim_str(email)) > 1 && !ppro->getString(AIM_KEY_EM, &dbv)) // Must be greater than 1 or a SNAC error is thrown. { - if (strcmp(email, dbv.pszVal)) + if (mir_strcmp(email, dbv.pszVal)) ppro->aim_admin_change_email(ppro->hAdminConn,ppro->admin_seqno,email); db_free(&dbv); } @@ -719,7 +719,7 @@ INT_PTR CALLBACK admin_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar // AOL only requires that you send the current password and a (single) new password. // Let's allow the client to type (two) new passwords incase they make a mistake so we // can handle any input error locally. - if (strcmp(npw1,npw2) == 0) + if (mir_strcmp(npw1,npw2) == 0) { ppro->aim_admin_change_password(ppro->hAdminConn,ppro->admin_seqno,cpw,npw1); } @@ -891,7 +891,7 @@ static INT_PTR CALLBACK options_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP //HN GetDlgItemTextA(hwndDlg, IDC_HN, str, SIZEOF(str)); - if (str[0] != 0 && strcmp(str, AIM_DEFAULT_SERVER)) + if (str[0] != 0 && mir_strcmp(str, AIM_DEFAULT_SERVER)) ppro->setString(AIM_KEY_HN, str); else ppro->delSetting(AIM_KEY_HN); diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp index ea7dafe878..ce2fac297a 100644 --- a/protocols/AimOscar/src/utility.cpp +++ b/protocols/AimOscar/src/utility.cpp @@ -160,7 +160,7 @@ unsigned short CAimProto::get_default_port(void) bool CAimProto::is_my_contact(MCONTACT hContact) { const char* szProto = GetContactProto(hContact); - return szProto != NULL && strcmp(m_szModuleName, szProto) == 0; + return szProto != NULL && mir_strcmp(m_szModuleName, szProto) == 0; } MCONTACT CAimProto::find_chat_contact(const char* room) @@ -168,7 +168,7 @@ MCONTACT CAimProto::find_chat_contact(const char* room) for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) { DBVARIANT dbv; if (!getString(hContact, "ChatRoomID", &dbv)) { - bool found = !strcmp(room, dbv.pszVal); + bool found = !mir_strcmp(room, dbv.pszVal); db_free(&dbv); if (found) return hContact; @@ -184,7 +184,7 @@ MCONTACT CAimProto::contact_from_sn(const char* sn, bool addIfNeeded, bool tempo for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) { DBVARIANT dbv; if (!getString(hContact, AIM_KEY_SN, &dbv)) { - bool found = !strcmp(norm_sn, dbv.pszVal); + bool found = !mir_strcmp(norm_sn, dbv.pszVal); db_free(&dbv); if (found) return hContact; @@ -239,7 +239,7 @@ void CAimProto::add_contact_to_group(MCONTACT hContact, const char* new_group) unsigned short old_group_id = getGroupId(hContact, 1); char* old_group = group_list.find_name(old_group_id); - if (old_group && strcmp(new_group, old_group) == 0) + if (old_group && mir_strcmp(new_group, old_group) == 0) return; DBVARIANT dbv; @@ -260,7 +260,7 @@ void CAimProto::add_contact_to_group(MCONTACT hContact, const char* new_group) debugLogA("Contact %u not on list.", hContact); setGroupId(hContact, 1, new_group_id); - if (new_group && strcmp(new_group, AIM_DEFAULT_GROUP)) + if (new_group && mir_strcmp(new_group, AIM_DEFAULT_GROUP)) db_set_utf(hContact, MOD_KEY_CL, OTH_KEY_GP, new_group); else db_unset(hContact, MOD_KEY_CL, OTH_KEY_GP); @@ -364,7 +364,7 @@ char* trim_str(char* s) void create_group(const char *group) { - if (strcmp(group, AIM_DEFAULT_GROUP) == 0) return; + if (mir_strcmp(group, AIM_DEFAULT_GROUP) == 0) return; TCHAR* szGroupName = mir_utf8decodeT(group); Clist_CreateGroup(0, szGroupName); -- cgit v1.2.3