diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 12:33:13 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2015-05-22 12:33:13 +0000 |
commit | 159b565b390687258ee65a3b66596e118752063c (patch) | |
tree | 91105378fcb9e030ba4a7f6572c4ea307cb8c8d6 | |
parent | 7f4d529b59698d7eb2403bd1f9088a5aa7fa9080 (diff) |
replace strcmp to mir_strcmp
git-svn-id: http://svn.miranda-ng.org/main/trunk@13752 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
295 files changed, 1085 insertions, 1085 deletions
diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp index 256f92936d..b58e9922f0 100644 --- a/plugins/AVS/src/acc.cpp +++ b/plugins/AVS/src/acc.cpp @@ -432,7 +432,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP case AVATAR_SETPROTOCOL:
szProto = (lParam == NULL) ? "" : (char*)lParam;
- if (data->hContact != 0 || strcmp(szProto, data->proto)) {
+ if (data->hContact != 0 || mir_strcmp(szProto, data->proto)) {
DestroyAnimation(data);
data->hContact = NULL;
@@ -540,7 +540,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP break;
case DM_MYAVATARCHANGED:
- if (data->hContact == NULL && strcmp(data->proto, (char*)wParam) == 0) {
+ if (data->hContact == NULL && mir_strcmp(data->proto, (char*)wParam) == 0) {
DestroyAnimation(data);
StartAnimation(data);
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index 1c33df43ae..247872ac8c 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -202,7 +202,7 @@ static int ContactSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
if (hContact == 0)
- if (!strcmp(cws->szSetting, "AvatarFile") || !strcmp(cws->szSetting, "PictObject") || !strcmp(cws->szSetting, "AvatarHash") || !strcmp(cws->szSetting, "AvatarSaved"))
+ if (!mir_strcmp(cws->szSetting, "AvatarFile") || !mir_strcmp(cws->szSetting, "PictObject") || !mir_strcmp(cws->szSetting, "AvatarHash") || !mir_strcmp(cws->szSetting, "AvatarSaved"))
ReportMyAvatarChanged((WPARAM)cws->szModule, 0);
return 0;
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index 19f2068aaa..a0c3d1a6b3 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -164,7 +164,7 @@ static void SetProtoPic(char *szProto) if (mir_strlen(p.szProtoname) == 0) break; - if (!strcmp(p.szProtoname, szProto) && mir_strlen(p.szProtoname) == mir_strlen(szProto)) { + if (!mir_strcmp(p.szProtoname, szProto) && mir_strlen(p.szProtoname) == mir_strlen(szProto)) { if (p.hbmPic != 0) DeleteObject(p.hbmPic); memset(&p, 0, sizeof(avatarCacheEntry)); diff --git a/plugins/AVS/src/poll.cpp b/plugins/AVS/src/poll.cpp index 4b4c5511e3..4911fb0e41 100644 --- a/plugins/AVS/src/poll.cpp +++ b/plugins/AVS/src/poll.cpp @@ -81,7 +81,7 @@ static BOOL PollProtocolCanHaveAvatar(const char *szProto) {
int pCaps = CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0);
int status = CallProtoService(szProto, PS_GETSTATUS, 0, 0);
- return (pCaps & PF4_AVATARS) && strcmp(META_PROTO, szProto) &&
+ return (pCaps & PF4_AVATARS) && mir_strcmp(META_PROTO, szProto) &&
((status > ID_STATUS_OFFLINE && status != ID_STATUS_INVISIBLE) || Proto_IsFetchingWhenProtoNotVisibleAllowed(szProto));
}
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp index 7e79830a37..97a255cd99 100644 --- a/plugins/AddContactPlus/src/addcontact.cpp +++ b/plugins/AddContactPlus/src/addcontact.cpp @@ -133,7 +133,7 @@ bool AddContactDlgAccounts(HWND hdlg, AddDialogParam *acs) DestroyIcon(hIcon);
cbei.lParam = (LPARAM)pAccounts[i]->szModuleName;
SendDlgItemMessage(hdlg, IDC_PROTO, CBEM_INSERTITEM, 0, (LPARAM)&cbei);
- if (cbei.lParam && !strcmp(acs->proto, pAccounts[i]->szModuleName))
+ if (cbei.lParam && !mir_strcmp(acs->proto, pAccounts[i]->szModuleName))
iIndex = cbei.iItem;
cbei.iItem++;
}
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index 50df90a8dd..1cb5702829 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -111,7 +111,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) if (proto == NULL)
return 0;
- if (strcmp(META_PROTO, proto) == 0)
+ if (mir_strcmp(META_PROTO, proto) == 0)
return 0;
DBVARIANT dbvOldHash = {0};
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp index 702ca65e73..05cb137467 100644 --- a/plugins/BASS_interface/src/Main.cpp +++ b/plugins/BASS_interface/src/Main.cpp @@ -572,8 +572,8 @@ int OnSettingChanged(WPARAM wParam, LPARAM lParam) return 0;
DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam;
- if (!strcmp(dbcws->szModule, "Skin")) {
- if (!strcmp(dbcws->szSetting, "UseSound")) {
+ if (!mir_strcmp(dbcws->szModule, "Skin")) {
+ if (!mir_strcmp(dbcws->szSetting, "UseSound")) {
EnableFrameIcon(dbcws->value.bVal != 0);
return 0;
}
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index 20f798a081..97e20e9dc8 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -589,7 +589,7 @@ static int TabsrmmButtonPressed(WPARAM, LPARAM lParam) {
CustomButtonClickData *cbcd = (CustomButtonClickData *)lParam;
- if (!strcmp(cbcd->pszModule, MOD_NAME))
+ if (!mir_strcmp(cbcd->pszModule, MOD_NAME))
BossKeyHideMiranda(0, 0);
return 0;
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index 1e5af0dac8..f9f9a45d0a 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -467,7 +467,7 @@ int onExtraImageApplying(WPARAM hContact, LPARAM) int SettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *inf = (DBCONTACTWRITESETTING*)lParam;
- if (hContact == NULL || inf->value.type == DBVT_DELETED || strcmp(inf->szSetting, "Status") != 0)
+ if (hContact == NULL || inf->value.type == DBVT_DELETED || mir_strcmp(inf->szSetting, "Status") != 0)
return 0;
if (db_get_b(hContact, "CList", "NotOnList", 0) == 1)
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 7f6d1a9c9a..b7fe00b559 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -155,7 +155,7 @@ int UserOnlineSettingChanged(WPARAM hContact, LPARAM lParam) DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
char *szProto = GetContactProto(hContact);
- if(hContact == NULL || strcmp(cws->szSetting,"Status")) return 0;
+ if(hContact == NULL || mir_strcmp(cws->szSetting,"Status")) return 0;
if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) {
int newStatus = cws->value.wVal;
int oldStatus = db_get_w(hContact,"UserOnline","OldStatus",ID_STATUS_OFFLINE);
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index d82121c760..0b49d38101 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -212,7 +212,7 @@ INT_PTR showList(WPARAM, LPARAM, LPARAM param) char* szProto = (char*)param; for (int i = 0; i < arWindows.getCount(); i++) { CSWindow *p = arWindows[i]; - if (!strcmp(szProto, p->m_protoName)) { + if (!mir_strcmp(szProto, p->m_protoName)) { ShowWindow(p->m_handle, SW_SHOW); SetForegroundWindow(p->m_handle); return 1; diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index 46111ef053..4e2a5c4648 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -194,7 +194,7 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
_ASSERT(szProto);
- if (!strcmp(szProto, META_PROTO)) // workaround for metacontacts
+ if (!mir_strcmp(szProto, META_PROTO)) // workaround for metacontacts
return 0;
sd.MirVer = db_get_s(hContact, szProto, DB_MIRVER, _T(""));
diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp index d30498139e..5634ab1cc1 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp @@ -151,7 +151,7 @@ INT_PTR GroupMenuExecService(WPARAM wParam, LPARAM lParam) {
if (wParam != 0) {
lpGroupMenuExecParam mmep = (lpGroupMenuExecParam)wParam;
- if (!strcmp(mmep->szServiceName, "Help/AboutCommand")) {
+ if (!mir_strcmp(mmep->szServiceName, "Help/AboutCommand")) {
//bug in help.c,it used wparam as parent window handle without reason.
mmep->Param1 = 0;
CallService(mmep->szServiceName, mmep->Param1, lParam);
@@ -474,7 +474,7 @@ INT_PTR SubGroupMenuonAddService(WPARAM wParam, LPARAM) INT_PTR SubGroupMenuExecService(WPARAM wParam, LPARAM lParam) {
if (wParam!=0) {
lpSubGroupMenuExecParam mmep = (lpSubGroupMenuExecParam)wParam;
- if (!strcmp(mmep->szServiceName, "Help/AboutCommand")) {
+ if (!mir_strcmp(mmep->szServiceName, "Help/AboutCommand")) {
//bug in help.c,it used wparam as parent window handle without reason.
mmep->Param1 = 0;
CallService(mmep->szServiceName, mmep->Param1, lParam);
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index 834ac2422a..d85939a0a0 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -111,7 +111,7 @@ int AddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact) p->xStatus = cfg::getByte(hContact, p->proto, "XStatusId", 0);
if (p->proto)
- p->bIsMeta = !strcmp(p->proto, META_PROTO);
+ p->bIsMeta = !mir_strcmp(p->proto, META_PROTO);
else
p->bIsMeta = FALSE;
if (p->bIsMeta && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
diff --git a/plugins/Clist_nicer/src/clistmod.cpp b/plugins/Clist_nicer/src/clistmod.cpp index 4c840314b5..2b7036978b 100644 --- a/plugins/Clist_nicer/src/clistmod.cpp +++ b/plugins/Clist_nicer/src/clistmod.cpp @@ -52,7 +52,7 @@ int IconFromStatusMode(const char *szProto, int status, MCONTACT hContact, HICON char *szFinalProto;
int finalStatus;
- if (szProto != NULL && !strcmp(szProto, META_PROTO) && hContact != 0 && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
+ if (szProto != NULL && !mir_strcmp(szProto, META_PROTO) && hContact != 0 && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
MCONTACT hSubContact = db_mc_getMostOnline(hContact);
szFinalProto = GetContactProto(hSubContact);
finalStatus = (status == 0) ? (WORD) cfg::getWord(hSubContact, szFinalProto, "Status", ID_STATUS_OFFLINE) : status;
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index dab1bcb663..c066d54371 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -418,7 +418,7 @@ void SetDBButtonStates(MCONTACT hPassedContact) DBVARIANT dbv = {0}; if (!cfg::getString(hFinalContact, szModule, szSetting, &dbv)) { - result = !strcmp((char *)buttonItem->bValuePush, dbv.pszVal); + result = !mir_strcmp((char *)buttonItem->bValuePush, dbv.pszVal); db_free(&dbv); } } diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp index 0703e5dd8d..88aa33eb3e 100644 --- a/plugins/Clist_nicer/src/extBackg.cpp +++ b/plugins/Clist_nicer/src/extBackg.cpp @@ -262,7 +262,7 @@ StatusItems_t *GetProtocolStatusItem(const char *szProto) for (int i = SIZEOF(_StatusItems); i < arStatusItems.getCount(); i++) {
StatusItems_t *p = arStatusItems[i];
- if (!strcmp(p->szName[0] == '{' ? p->szName+3 : p->szName, szProto))
+ if (!mir_strcmp(p->szName[0] == '{' ? p->szName+3 : p->szName, szProto))
return p;
}
return NULL;
@@ -686,7 +686,7 @@ static void ReadItem(StatusItems_t *this_item, char *szItem, char *file) GetPrivateProfileStringA(szItem, "BasedOn", "None", buffer, 400, file);
- if (strcmp(buffer, "None")) {
+ if (mir_strcmp(buffer, "None")) {
for (int i = 0; i < arStatusItems.getCount(); i++) {
StatusItems_t *p = arStatusItems[i];
if (!_stricmp(p->szName[0] == '{' ? p->szName+3 : p->szName, buffer)) {
@@ -759,7 +759,7 @@ void IMG_ReadItem(const char *itemname, const char *szFileName) memset(&tmpItem, 0, sizeof(ImageItem));
GetPrivateProfileStringA(itemname, "Glyph", "None", buffer, 500, szFileName);
- if (strcmp(buffer, "None")) {
+ if (mir_strcmp(buffer, "None")) {
sscanf(buffer, "%d,%d,%d,%d", &tmpItem.glyphMetrics[0], &tmpItem.glyphMetrics[1],
&tmpItem.glyphMetrics[2], &tmpItem.glyphMetrics[3]);
if (tmpItem.glyphMetrics[2] > tmpItem.glyphMetrics[0] && tmpItem.glyphMetrics[3] > tmpItem.glyphMetrics[1]) {
@@ -770,7 +770,7 @@ void IMG_ReadItem(const char *itemname, const char *szFileName) }
}
GetPrivateProfileStringA(itemname, "Image", "None", buffer, 500, szFileName);
- if (strcmp(buffer, "None")) {
+ if (mir_strcmp(buffer, "None")) {
done_with_glyph:
@@ -805,7 +805,7 @@ done_with_glyph: }
}
GetPrivateProfileStringA(itemname, "Fillcolor", "None", buffer, 500, szFileName);
- if (strcmp(buffer, "None")) {
+ if (mir_strcmp(buffer, "None")) {
COLORREF fillColor = HexStringToLong(buffer);
tmpItem.fillBrush = CreateSolidBrush(fillColor);
tmpItem.dwFlags |= IMAGE_FILLSOLID;
@@ -855,9 +855,9 @@ done_with_glyph: for (n = 0; ; n++) {
mir_snprintf(szItemNr, SIZEOF(szItemNr), "Item%d", n);
GetPrivateProfileStringA(itemname, szItemNr, "None", buffer, 500, szFileName);
- if (!strcmp(buffer, "None"))
+ if (!mir_strcmp(buffer, "None"))
break;
- if (!strcmp(buffer, "CLUI")) {
+ if (!mir_strcmp(buffer, "CLUI")) {
if (!(tmpItem.dwFlags & IMAGE_GLYPH))
IMG_CreateItem(&tmpItem, szFinalName, hdc);
if (tmpItem.hbm || tmpItem.dwFlags & IMAGE_GLYPH) {
@@ -1128,7 +1128,7 @@ static void BTN_ReadItem(char *itemName, char *file) }
GetPrivateProfileStringA(itemName, "Tip", "None", szBuffer, 1000, file);
- if (strcmp(szBuffer, "None")) {
+ if (mir_strcmp(szBuffer, "None")) {
MultiByteToWideChar(cfg::dat.langPackCP, 0, szBuffer, -1, tmpItem.szTip, 256);
tmpItem.szTip[255] = 0;
}
@@ -1287,7 +1287,7 @@ void LoadPerContactSkins(TCHAR *tszFileName) int j;
for (j = 0; j < i - 1; j++) {
- if (!strcmp(szProto, items[j].szName) && !strcmp(UIN, items[j].szDBname) &&
+ if (!mir_strcmp(szProto, items[j].szName) && !mir_strcmp(UIN, items[j].szDBname) &&
mir_strlen(szProto) == mir_strlen(items[j].szName) && mir_strlen(UIN) == mir_strlen(items[j].szDBname)) {
cfg::writeDword(hContact, "EXTBK", "TEXT", items[j].TEXTCOLOR);
cfg::writeDword(hContact, "EXTBK", "COLOR1", items[j].COLOR);
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index 451be1aacb..5694204f0d 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -663,7 +663,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP mir_snprintf(szSetting, SIZEOF(szSetting), "%c%s_SSM", 246, szBuf);
db_unset(NULL, CLVM_MODULE, szSetting);
db_unset(NULL, CLVM_MODULE, szBuf);
- if (!strcmp(cfg::dat.current_viewmode, szBuf) && mir_strlen(szBuf) == mir_strlen(cfg::dat.current_viewmode)) {
+ if (!mir_strcmp(cfg::dat.current_viewmode, szBuf) && mir_strlen(szBuf) == mir_strlen(cfg::dat.current_viewmode)) {
cfg::dat.bFilterEffective = 0;
pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
SetWindowTextA(hwndSelector, Translate("No view mode"));
diff --git a/plugins/CmdLine/MimCmd/src/MimCmd.cpp b/plugins/CmdLine/MimCmd/src/MimCmd.cpp index 90a66d5c36..688205e6f8 100644 --- a/plugins/CmdLine/MimCmd/src/MimCmd.cpp +++ b/plugins/CmdLine/MimCmd/src/MimCmd.cpp @@ -77,7 +77,7 @@ void ShowVersion() int main(int argc, char *argv[])
{
int error = 0;
- if ((argc == 2) && (strcmp(argv[1], "-v") == 0))
+ if ((argc == 2) && (mir_strcmp(argv[1], "-v") == 0))
{
ShowVersion();
diff --git a/plugins/CmdLine/MimCmd/src/commands.cpp b/plugins/CmdLine/MimCmd/src/commands.cpp index 6dddcffc43..44033eef7c 100644 --- a/plugins/CmdLine/MimCmd/src/commands.cpp +++ b/plugins/CmdLine/MimCmd/src/commands.cpp @@ -96,14 +96,14 @@ PCommand GetCommand(char *command) for (i = 0; i < cKnownCommands; i++)
{
- if (strcmp(knownCommands[i].command, lower) == 0)
+ if (mir_strcmp(knownCommands[i].command, lower) == 0)
{
return &knownCommands[i];
}
}
//allow more parameters to trigger the help command - /h -h /? --help
- if ((strcmp(lower, "/h") == 0) || (strcmp(lower, "-h") == 0) || (strcmp(lower, "/?") == 0) || (strcmp(lower, "--help") == 0))
+ if ((mir_strcmp(lower, "/h") == 0) || (mir_strcmp(lower, "-h") == 0) || (mir_strcmp(lower, "/?") == 0) || (mir_strcmp(lower, "--help") == 0))
{
for (i = 0; i < cKnownCommands; i++)
{
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index acf6932fbf..cb3d27d15b 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. __inline static int matches(char *command, char *lower)
{
- return ((strcmp(lower, command) == 0) || (strcmp(lower, Translate(command)) == 0));
+ return ((mir_strcmp(lower, command) == 0) || (mir_strcmp(lower, Translate(command)) == 0));
}
int Get2StateValue(char *state)
@@ -49,19 +49,19 @@ int Get2StateValue(char *state) STRNCPY(lower, state, sizeof(lower));
_strlwr(lower);
- //if ((strcmp(lower, "enable") == 0) || (strcmp(lower, "show") == 0) || (strcmp(lower, "on") == 0))
+ //if ((mir_strcmp(lower, "enable") == 0) || (mir_strcmp(lower, "show") == 0) || (mir_strcmp(lower, "on") == 0))
if ((matches("enable", lower)) || (matches("show", lower)) || (matches("on", lower)))
{
return STATE_ON;
}
- //if ((strcmp(lower, "disable") == 0) || (strcmp(lower, "hide") == 0) || (strcmp(lower, "off") == 0))
+ //if ((mir_strcmp(lower, "disable") == 0) || (mir_strcmp(lower, "hide") == 0) || (mir_strcmp(lower, "off") == 0))
if ((matches("disable", lower)) || (matches("hide", lower)) || (matches("off", lower)))
{
return STATE_OFF;
}
- //if (strcmp(lower, "toggle") == 0)
+ //if (mir_strcmp(lower, "toggle") == 0)
if (matches("toggle", lower))
{
return STATE_TOGGLE;
@@ -190,25 +190,25 @@ int ParseStatusParam(char *status) char *lower = NEWSTR_ALLOCA(status);
_strlwr(lower);
- if ( !strcmp(lower, "offline"))
+ if ( !mir_strcmp(lower, "offline"))
return ID_STATUS_OFFLINE;
- else if ( !strcmp(lower, "online"))
+ else if ( !mir_strcmp(lower, "online"))
return ID_STATUS_ONLINE;
- else if ( !strcmp(lower, "away"))
+ else if ( !mir_strcmp(lower, "away"))
return ID_STATUS_AWAY;
- else if ( !strcmp(lower, "dnd"))
+ else if ( !mir_strcmp(lower, "dnd"))
return ID_STATUS_DND;
- else if ( !strcmp(lower, "na"))
+ else if ( !mir_strcmp(lower, "na"))
return ID_STATUS_NA;
- else if ( !strcmp(lower, "occupied"))
+ else if ( !mir_strcmp(lower, "occupied"))
return ID_STATUS_OCCUPIED;
- else if ( !strcmp(lower, "freechat"))
+ else if ( !mir_strcmp(lower, "freechat"))
return ID_STATUS_FREECHAT;
- else if ( !strcmp(lower, "invisible"))
+ else if ( !mir_strcmp(lower, "invisible"))
return ID_STATUS_INVISIBLE;
- else if ( !strcmp(lower, "onthephone"))
+ else if ( !mir_strcmp(lower, "onthephone"))
return ID_STATUS_ONTHEPHONE;
- else if ( !strcmp(lower, "outtolunch"))
+ else if ( !mir_strcmp(lower, "outtolunch"))
return ID_STATUS_OUTTOLUNCH;
else
return 0;
@@ -673,7 +673,7 @@ void HandleQuitCommand(PCommand command, TArgument *argv, int argc, PReply reply STRNCPY(lower, argv[2], sizeof(lower));
_strlwr(lower);
- if (strcmp(lower, "wait") == 0)
+ if (mir_strcmp(lower, "wait") == 0)
{
CallService("CloseAction", 0, 0);
@@ -714,7 +714,7 @@ void HandleExchangeCommand(PCommand command, TArgument *argv, int argc, PReply r char lower[128];
STRNCPY(lower, argv[2], sizeof(lower));
_strlwr(lower);
- if (strcmp(lower, "check") == 0)
+ if (mir_strcmp(lower, "check") == 0)
{
INT_PTR ret = CallService(MS_EXCHANGE_CHECKEMAIL, 0, 0);
if (ret != CALLSERVICE_NOTFOUND)
@@ -748,7 +748,7 @@ void HandleYAMNCommand(PCommand command, TArgument *argv, int argc, PReply reply char lower[128];
STRNCPY(lower, argv[2], sizeof(lower));
_strlwr(lower);
- if (strcmp(lower, "check") == 0)
+ if (mir_strcmp(lower, "check") == 0)
{
if (ServiceExists(MS_YAMN_FORCECHECK))
{
@@ -987,7 +987,7 @@ void HandleDatabaseCommand(PCommand command, TArgument *argv, int argc, PReply r STRNCPY(dbcmd, argv[2], sizeof(dbcmd));
dbcmd[sizeof(dbcmd) - 1] = 0;
_strlwr(dbcmd);
- if (strcmp(dbcmd, "delete") == 0)
+ if (mir_strcmp(dbcmd, "delete") == 0)
{
if (argc == 5)
{
@@ -1003,7 +1003,7 @@ void HandleDatabaseCommand(PCommand command, TArgument *argv, int argc, PReply r HandleWrongParametersCount(command, reply);
}
}
- else if (strcmp(dbcmd, "set") == 0)
+ else if (mir_strcmp(dbcmd, "set") == 0)
{
if (argc == 6)
{
@@ -1058,7 +1058,7 @@ void HandleDatabaseCommand(PCommand command, TArgument *argv, int argc, PReply r HandleWrongParametersCount(command, reply);
}
}
- else if (strcmp(dbcmd, "get") == 0)
+ else if (mir_strcmp(dbcmd, "get") == 0)
{
if (argc == 5)
{
@@ -1108,19 +1108,19 @@ int ParseProxyType(char *type) lower[sizeof(lower) - 1] = 0;
_strlwr(lower);
- if (strcmp(lower, "socks4") == 0)
+ if (mir_strcmp(lower, "socks4") == 0)
{
return PROXY_SOCKS4;
}
- else if (strcmp(lower, "socks5") == 0)
+ else if (mir_strcmp(lower, "socks5") == 0)
{
return PROXY_SOCKS5;
}
- else if (strcmp(lower, "http") == 0)
+ else if (mir_strcmp(lower, "http") == 0)
{
return PROXY_HTTP;
}
- else if (strcmp(lower, "https") == 0)
+ else if (mir_strcmp(lower, "https") == 0)
{
return PROXY_HTTPS;
}
@@ -1168,7 +1168,7 @@ void HandleProtocolProxyCommand(PCommand command, TArgument *argv, int argc, PRe char buffer[1024];
- if (strcmp(proxycmd, "status") == 0)
+ if (mir_strcmp(proxycmd, "status") == 0)
{//status command
switch (argc)
{
@@ -1232,7 +1232,7 @@ void HandleProtocolProxyCommand(PCommand command, TArgument *argv, int argc, PRe return;
}
}
- else if (strcmp(proxycmd, "server") == 0)
+ else if (mir_strcmp(proxycmd, "server") == 0)
{
switch (argc)
{
@@ -1312,7 +1312,7 @@ void HandleProxyCommand(PCommand command, TArgument *argv, int argc, PReply repl ProtoEnumAccounts(&count, &accounts);
int i;
- int global = (strcmp(protocol, "GLOBAL") == 0);
+ int global = (mir_strcmp(protocol, "GLOBAL") == 0);
reply->message[0] = 0;
@@ -1330,7 +1330,7 @@ void HandleProxyCommand(PCommand command, TArgument *argv, int argc, PReply repl if (accounts[i]->bIsEnabled)
{
match = accounts[i]->szModuleName;
- if ((global) || (strcmp(protocol, match) == 0))
+ if ((global) || (mir_strcmp(protocol, match) == 0))
{
HandleProtocolProxyCommand(command, argv, argc, reply, match, match);
found = 1;
diff --git a/plugins/ContactsPlus/src/utils.cpp b/plugins/ContactsPlus/src/utils.cpp index 1b3c436a2d..3326da9404 100644 --- a/plugins/ContactsPlus/src/utils.cpp +++ b/plugins/ContactsPlus/src/utils.cpp @@ -36,7 +36,7 @@ int __fastcall strcmpnull(const char *str1, const char *str2) {
if (!str1 || !str2) return 1;
- return strcmp(str1, str2);
+ return mir_strcmp(str1, str2);
}
void __fastcall strcpynull(char *str1, const char *str2)
diff --git a/plugins/CrashDumper/src/dumper.cpp b/plugins/CrashDumper/src/dumper.cpp index 5b7a879e02..6891a41e62 100644 --- a/plugins/CrashDumper/src/dumper.cpp +++ b/plugins/CrashDumper/src/dumper.cpp @@ -139,8 +139,8 @@ void GetLinkedModulesInfo(TCHAR *moduleName, CMString &buffer) ULONG* funcAddr = (ULONG*)ImageRvaToVa(nthdrs, dllAddr, exportData->AddressOfNames, NULL);
for (unsigned i = 0; i < exportData->NumberOfNames && !found; ++i) {
char* funcName = (char*)ImageRvaToVa(nthdrs, dllAddr, funcAddr[i], NULL);
- found = strcmp(funcName, "MirandaPluginInfoEx") == 0 || strcmp(funcName, "MirandaPluginInfo") == 0;
- if (strcmp(funcName, "DatabasePluginInfo") == 0) {
+ found = mir_strcmp(funcName, "MirandaPluginInfoEx") == 0 || mir_strcmp(funcName, "MirandaPluginInfo") == 0;
+ if (mir_strcmp(funcName, "DatabasePluginInfo") == 0) {
buffer.Append(TEXT(" This dll is a Miranda database plugin, another database is active right now\r\n"));
found = true;
}
@@ -319,7 +319,7 @@ static void GetProtocolStrings(CMString& buffer) for (j = 0; j < accCount; j++) {
for (i = 0; i < protoCountMy; i++)
- if (!strcmp(protoListMy[i], accList[j]->szProtoName))
+ if (!mir_strcmp(protoListMy[i], accList[j]->szProtoName))
break;
if (i == protoCountMy)
@@ -331,7 +331,7 @@ static void GetProtocolStrings(CMString& buffer) for (j = 0; j < accCount; j++)
for (i = 0; i < protoCountMy; i++)
- if (!strcmp(protoListMy[i], accList[j]->szProtoName)) {
+ if (!mir_strcmp(protoListMy[i], accList[j]->szProtoName)) {
protos[i].nloaded = accList[j]->bDynDisabled != 0;
if (IsAccountEnabled(accList[j]))
++protos[i].countse;
diff --git a/plugins/CrashDumper/src/upload.cpp b/plugins/CrashDumper/src/upload.cpp index 2413b92367..f375447bab 100644 --- a/plugins/CrashDumper/src/upload.cpp +++ b/plugins/CrashDumper/src/upload.cpp @@ -157,7 +157,7 @@ bool InternetDownloadFile(const char *szUrl, VerTrnsfr* szReq) // get the url for the new location and save it to szInfo
// look for the reply header "Location"
for (i = 0; i < nlhrReply->headersCount; i++) {
- if (!strcmp(nlhrReply->headers[i].szName, "Location")) {
+ if (!mir_strcmp(nlhrReply->headers[i].szName, "Location")) {
size_t rlen = 0;
if (nlhrReply->headers[i].szValue[0] == '/') {
const char* szPath;
@@ -250,5 +250,5 @@ bool ProcessVIHash(bool store) if (VIHash == NULL)
return false;
- return strcmp(hashstr, VIHash) == 0;
+ return mir_strcmp(hashstr, VIHash) == 0;
}
diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp index 7b93cd2c4a..d201b2cedd 100644 --- a/plugins/Db3x_mmap/src/dbcontacts.cpp +++ b/plugins/Db3x_mmap/src/dbcontacts.cpp @@ -37,7 +37,7 @@ int CDb3Mmap::CheckProto(DBCachedContact *cc, const char *proto) cc->szProto = m_cache->GetCachedSetting(NULL, protobuf, 0, (int)mir_strlen(protobuf));
}
- return !strcmp(cc->szProto, proto);
+ return !mir_strcmp(cc->szProto, proto);
}
STDMETHODIMP_(LONG) CDb3Mmap::GetContactCount(void)
diff --git a/plugins/Db3x_mmap/src/dbintf.cpp b/plugins/Db3x_mmap/src/dbintf.cpp index 72b5c7b9a7..db90cd1db1 100644 --- a/plugins/Db3x_mmap/src/dbintf.cpp +++ b/plugins/Db3x_mmap/src/dbintf.cpp @@ -31,7 +31,7 @@ DBSignature dbSignatureSD = { "Miranda ICQ SD", 0x1A }; static int ModCompare(const ModuleName *mn1, const ModuleName *mn2)
{
- return strcmp(mn1->name, mn2->name);
+ return mir_strcmp(mn1->name, mn2->name);
}
static int OfsCompare(const ModuleName *mn1, const ModuleName *mn2)
@@ -41,7 +41,7 @@ static int OfsCompare(const ModuleName *mn1, const ModuleName *mn2) static int stringCompare2(const char *p1, const char *p2)
{
- return strcmp(p1, p2);
+ return mir_strcmp(p1, p2);
}
CDb3Mmap::CDb3Mmap(const TCHAR *tszFileName, int iMode) :
diff --git a/plugins/Db3x_mmap/src/dbmodulechain.cpp b/plugins/Db3x_mmap/src/dbmodulechain.cpp index db5e15ebed..6b2731747b 100644 --- a/plugins/Db3x_mmap/src/dbmodulechain.cpp +++ b/plugins/Db3x_mmap/src/dbmodulechain.cpp @@ -63,7 +63,7 @@ int CDb3Mmap::InitModuleNames(void) DWORD CDb3Mmap::FindExistingModuleNameOfs(const char *szName)
{
ModuleName mn = { (char*)szName, 0 };
- if (m_lastmn && !strcmp(mn.name, m_lastmn->name))
+ if (m_lastmn && !mir_strcmp(mn.name, m_lastmn->name))
return m_lastmn->ofs;
int index = m_lMods.getIndex(&mn);
diff --git a/plugins/Db3x_mmap/src/dbsettings.cpp b/plugins/Db3x_mmap/src/dbsettings.cpp index bf8c494c60..4abaf4d7aa 100644 --- a/plugins/Db3x_mmap/src/dbsettings.cpp +++ b/plugins/Db3x_mmap/src/dbsettings.cpp @@ -31,14 +31,14 @@ DBCachedContact* AddToCachedContactList(MCONTACT contactID, int index); BOOL CDb3Mmap::IsSettingEncrypted(LPCSTR szModule, LPCSTR szSetting)
{
if (!_strnicmp(szSetting, "password", 8)) return true;
- if (!strcmp(szSetting, "NLProxyAuthPassword")) return true;
- if (!strcmp(szSetting, "LNPassword")) return true;
- if (!strcmp(szSetting, "FileProxyPassword")) return true;
- if (!strcmp(szSetting, "TokenSecret")) return true;
-
- if (!strcmp(szModule, "SecureIM")) {
- if (!strcmp(szSetting, "pgp")) return true;
- if (!strcmp(szSetting, "pgpPrivKey")) return true;
+ if (!mir_strcmp(szSetting, "NLProxyAuthPassword")) return true;
+ if (!mir_strcmp(szSetting, "LNPassword")) return true;
+ if (!mir_strcmp(szSetting, "FileProxyPassword")) return true;
+ if (!mir_strcmp(szSetting, "TokenSecret")) return true;
+
+ if (!mir_strcmp(szModule, "SecureIM")) {
+ if (!mir_strcmp(szSetting, "pgp")) return true;
+ if (!mir_strcmp(szSetting, "pgpPrivKey")) return true;
}
return false;
}
@@ -47,10 +47,10 @@ BOOL CDb3Mmap::IsSettingEncrypted(LPCSTR szModule, LPCSTR szSetting) static bool ValidLookupName(LPCSTR szModule, LPCSTR szSetting)
{
- if (!strcmp(szModule, META_PROTO))
- return strcmp(szSetting, "IsSubcontact") && strcmp(szSetting, "ParentMetaID");
+ if (!mir_strcmp(szModule, META_PROTO))
+ return mir_strcmp(szSetting, "IsSubcontact") && mir_strcmp(szSetting, "ParentMetaID");
- if (!strcmp(szModule, "Ignore"))
+ if (!mir_strcmp(szModule, "Ignore"))
return false;
return true;
@@ -478,7 +478,7 @@ STDMETHODIMP_(BOOL) CDb3Mmap::WriteContactSetting(MCONTACT contactID, DBCONTACTW case DBVT_WORD: bIsIdentical = pCachedValue->wVal == dbcwWork.value.wVal; break;
case DBVT_DWORD: bIsIdentical = pCachedValue->dVal == dbcwWork.value.dVal; break;
case DBVT_UTF8:
- case DBVT_ASCIIZ: bIsIdentical = strcmp(pCachedValue->pszVal, dbcwWork.value.pszVal) == 0; break;
+ case DBVT_ASCIIZ: bIsIdentical = mir_strcmp(pCachedValue->pszVal, dbcwWork.value.pszVal) == 0; break;
}
if (bIsIdentical)
return 0;
diff --git a/plugins/Db3x_mmap/src/dbtool/modulechain.cpp b/plugins/Db3x_mmap/src/dbtool/modulechain.cpp index 522532d8f4..c96d0b010e 100644 --- a/plugins/Db3x_mmap/src/dbtool/modulechain.cpp +++ b/plugins/Db3x_mmap/src/dbtool/modulechain.cpp @@ -91,7 +91,7 @@ int CDb3Mmap::WorkModuleChain(int firstTime) // check duplicated modulenames
int i, n = 0;
for (i = iCurrentModName + 1; i < modChainCount; i++)
- if (!strcmp(modChain[i].name, modChain[iCurrentModName].name)) {
+ if (!mir_strcmp(modChain[i].name, modChain[iCurrentModName].name)) {
modChain[i].ofsNew = modChain[iCurrentModName].ofsNew;
n++;
}
diff --git a/plugins/DbChecker/src/wizard.cpp b/plugins/DbChecker/src/wizard.cpp index e0d49c507d..58448a4e0f 100644 --- a/plugins/DbChecker/src/wizard.cpp +++ b/plugins/DbChecker/src/wizard.cpp @@ -32,11 +32,11 @@ static BOOL CALLBACK MyControlsEnumChildren(HWND hwnd, LPARAM) int makeBold = 0;
GetClassNameA(hwnd, szClass, sizeof(szClass));
- if (!strcmp(szClass, "Static")) {
+ if (!mir_strcmp(szClass, "Static")) {
if (((style & SS_TYPEMASK) == SS_LEFT || (style & SS_TYPEMASK) == SS_CENTER || (style & SS_TYPEMASK) == SS_RIGHT) && exstyle & WS_EX_CLIENTEDGE)
makeBold = 1;
}
- else if (!strcmp(szClass, "Button")) {
+ else if (!mir_strcmp(szClass, "Button")) {
if (exstyle&WS_EX_CLIENTEDGE)
makeBold = 1;
}
@@ -72,7 +72,7 @@ int DoMyControlProcessing(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam, if ((GetWindowLongPtr((HWND)lParam, GWL_STYLE) & 0xFFFF) == 0) {
char szText[256];
GetWindowTextA((HWND)lParam, szText, SIZEOF(szText));
- if (!strcmp(szText, "whiterect")) {
+ if (!mir_strcmp(szText, "whiterect")) {
SetTextColor((HDC)wParam, RGB(255, 255, 255));
SetBkColor((HDC)wParam, RGB(255, 255, 255));
SetBkMode((HDC)wParam, OPAQUE);
diff --git a/plugins/DbEditorPP/src/findwindow.cpp b/plugins/DbEditorPP/src/findwindow.cpp index 0762aeec5b..29962130c5 100644 --- a/plugins/DbEditorPP/src/findwindow.cpp +++ b/plugins/DbEditorPP/src/findwindow.cpp @@ -531,7 +531,7 @@ void __cdecl FindSettings(LPVOID di) switch (dbv.type) {
case DBVT_UTF8: // no conversion atm
case DBVT_ASCIIZ:
- if ((exactMatch && !(caseSensitive ? strcmp(dbv.pszVal, text) : strcmpi(dbv.pszVal, text))) || (!exactMatch && (caseSensitive ? strstr(dbv.pszVal, text) : StrStrI(dbv.pszVal, text)))) {
+ if ((exactMatch && !(caseSensitive ? mir_strcmp(dbv.pszVal, text) : strcmpi(dbv.pszVal, text))) || (!exactMatch && (caseSensitive ? strstr(dbv.pszVal, text) : StrStrI(dbv.pszVal, text)))) {
if ((mode & RW_FOUND) || (mode & RW_SETVAL))
replaceCount += replaceValue(hwnd, hContact, module->name, setting->name, &dbv, text, replace, mode);
else
@@ -578,7 +578,7 @@ void __cdecl FindSettings(LPVOID di) // check in setting name
if (inSettingName) {
- if ((exactMatch && !(caseSensitive ? strcmp(setting->name, text) : strcmpi(setting->name, text))) || (!exactMatch && (caseSensitive ? StrStrI(setting->name, text) : StrStrI(setting->name, text)))) {
+ if ((exactMatch && !(caseSensitive ? mir_strcmp(setting->name, text) : strcmpi(setting->name, text))) || (!exactMatch && (caseSensitive ? StrStrI(setting->name, text) : StrStrI(setting->name, text)))) {
if ((mode & RW_FOUND) || (mode & RW_SETNAME)) {
if (!GetSetting(hContact, module->name, setting->name, &dbv)) {
replaceCount += replaceSetting(hwnd, hContact, module->name, setting->name, &dbv, text, replace, mode);
@@ -596,7 +596,7 @@ void __cdecl FindSettings(LPVOID di) // check in module name
if (inModuleName) {
- if ((exactMatch && !(caseSensitive ? strcmp(module->name, text) : strcmpi(module->name, text))) || (!exactMatch && (caseSensitive ? strstr(module->name, text) : StrStrI(module->name, text)))) {
+ if ((exactMatch && !(caseSensitive ? mir_strcmp(module->name, text) : strcmpi(module->name, text))) || (!exactMatch && (caseSensitive ? strstr(module->name, text) : StrStrI(module->name, text)))) {
if ((mode & RW_FOUND) || (mode & RW_MODULE))
replaceCount += replaceModule(hwnd, hContact, module->name, text, replace, mode);
else
diff --git a/plugins/DbEditorPP/src/headers.h b/plugins/DbEditorPP/src/headers.h index 6501ff5165..425f14ec61 100644 --- a/plugins/DbEditorPP/src/headers.h +++ b/plugins/DbEditorPP/src/headers.h @@ -77,7 +77,7 @@ extern MCONTACT hRestore; #define mir_strlen(ptr) ((ptr == NULL) ? 0 : (int)mir_strlen(ptr))
#define mir_strncpy(dst, src, len) strncpy(dst, src, len)[len - 1] = 0;
-#define mir_strcmp(ptr1, ptr2) ((ptr1 && ptr2) ? strcmp(ptr1, ptr2) : 1) // (ptr1||ptr2)
+#define mir_strcmp(ptr1, ptr2) ((ptr1 && ptr2) ? mir_strcmp(ptr1, ptr2) : 1) // (ptr1||ptr2)
#define ListView_SetItemTextW(hwndLV, i, iSubItem_, pszText_) \
{ LV_ITEMW _ms_lvi;\
diff --git a/plugins/Dropbox/src/dropbox_events.cpp b/plugins/Dropbox/src/dropbox_events.cpp index be1e5a72be..b2d83e23ea 100644 --- a/plugins/Dropbox/src/dropbox_events.cpp +++ b/plugins/Dropbox/src/dropbox_events.cpp @@ -92,7 +92,7 @@ int CDropbox::OnSrmmWindowOpened(WPARAM, LPARAM lParam) int CDropbox::OnTabSrmmButtonPressed(WPARAM, LPARAM lParam)
{
CustomButtonClickData *cbc = (CustomButtonClickData *)lParam;
- if (!strcmp(cbc->pszModule, MODULE) && cbc->dwButtonId == BBB_ID_FILE_SEND && cbc->hContact)
+ if (!mir_strcmp(cbc->pszModule, MODULE) && cbc->dwButtonId == BBB_ID_FILE_SEND && cbc->hContact)
{
hTransferContact = cbc->hContact;
hTransferWindow = (HWND)CallService(MS_FILE_SENDFILE, GetDefaultContact(), 0);
@@ -150,7 +150,7 @@ int CDropbox::OnProtoAck(WPARAM, LPARAM lParam) {
ACKDATA *ack = (ACKDATA*)lParam;
- if (!strcmp(ack->szModule, MODULE))
+ if (!mir_strcmp(ack->szModule, MODULE))
return 0; // don't rebroadcast our own acks
if (ack->type == ACKTYPE_STATUS)
diff --git a/plugins/Dropbox/src/dropbox_services.cpp b/plugins/Dropbox/src/dropbox_services.cpp index cdce53b1fd..77baf2f5cc 100644 --- a/plugins/Dropbox/src/dropbox_services.cpp +++ b/plugins/Dropbox/src/dropbox_services.cpp @@ -181,7 +181,7 @@ INT_PTR CDropbox::ProtoSendMessage(WPARAM, LPARAM lParam) for (int i = 0; i < SIZEOF(commands); i++)
{
- if (!strcmp(szMessage+1, commands[i].szCommand))
+ if (!mir_strcmp(szMessage+1, commands[i].szCommand))
{
ULONG messageId = InterlockedIncrement(&hMessageProcess);
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp index 6505b3313a..b7883c1238 100644 --- a/plugins/FingerprintNG/src/fingerprint.cpp +++ b/plugins/FingerprintNG/src/fingerprint.cpp @@ -322,7 +322,7 @@ static void MatchMasks(TCHAR* szMirVer, short *base, short *overlay, short *over void __fastcall GetIconsIndexesA(LPSTR szMirVer, short *base, short *overlay, short *overlay2, short *overlay3, short *overlay4) { - if (strcmp(szMirVer, "?") == 0) { + if (mir_strcmp(szMirVer, "?") == 0) { *base = UNKNOWN_MASK_NUMBER; *overlay = -1; *overlay2 = -1; @@ -887,7 +887,7 @@ static int OnContactSettingChanged(WPARAM hContact, LPARAM lParam) return 0; DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if (cws && cws->szSetting && !strcmp(cws->szSetting, "MirVer")) { + if (cws && cws->szSetting && !mir_strcmp(cws->szSetting, "MirVer")) { switch (cws->value.type) { case DBVT_UTF8: ApplyFingerprintImage(hContact, ptrT(mir_utf8decodeT(cws->value.pszVal))); diff --git a/plugins/FloatingContacts/src/filedrop.cpp b/plugins/FloatingContacts/src/filedrop.cpp index ff1cb937e9..7a0f40adfc 100644 --- a/plugins/FloatingContacts/src/filedrop.cpp +++ b/plugins/FloatingContacts/src/filedrop.cpp @@ -217,8 +217,8 @@ static int CountFiles( char *szItem ) if ( fd.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY )
{
// Skip parent directories
- if (( 0 != strcmp( fd.cFileName, "." )) &&
- ( 0 != strcmp( fd.cFileName, ".." )) )
+ if (( 0 != mir_strcmp( fd.cFileName, "." )) &&
+ ( 0 != mir_strcmp( fd.cFileName, ".." )) )
{
char szDirName[MAX_PATH];
strncpy( szDirName, szItem, MAX_PATH - 1);
@@ -259,8 +259,8 @@ static void SaveFiles( char *szItem, char **ppFiles, int *pnCount ) if ( fd.dwFileAttributes == FILE_ATTRIBUTE_DIRECTORY )
{
// Skip parent directories
- if (( 0 != strcmp( fd.cFileName, "." )) &&
- ( 0 != strcmp( fd.cFileName, ".." )) )
+ if (( 0 != mir_strcmp( fd.cFileName, "." )) &&
+ ( 0 != mir_strcmp( fd.cFileName, ".." )) )
{
char szDirName[MAX_PATH];
strncpy( szDirName, szItem, MAX_PATH - 1);
diff --git a/plugins/Folders/src/dlg_handlers.cpp b/plugins/Folders/src/dlg_handlers.cpp index 23e1fc2a4a..02c75a13cb 100644 --- a/plugins/Folders/src/dlg_handlers.cpp +++ b/plugins/Folders/src/dlg_handlers.cpp @@ -60,7 +60,7 @@ static void LoadRegisteredFolderItems(HWND hWnd) for (int i = 0; i < lstRegisteredFolders.getCount(); i++) {
CFolderItem &item = lstRegisteredFolders[i];
- if (!strcmp(szSection, item.GetSection())) {
+ if (!mir_strcmp(szSection, item.GetSection())) {
idx = SendMessage(hwndItems, LB_ADDSTRING, 0, (LPARAM)TranslateTS(item.GetUserName()));
SendMessage(hwndItems, LB_SETITEMDATA, idx, (LPARAM)&item);
}
diff --git a/plugins/Folders/src/folderItem.cpp b/plugins/Folders/src/folderItem.cpp index c00ef0cef6..d28872742e 100644 --- a/plugins/Folders/src/folderItem.cpp +++ b/plugins/Folders/src/folderItem.cpp @@ -57,12 +57,12 @@ int CFolderItem::IsEqual(const CFolderItem *other) int CFolderItem::IsEqual(const char *section, const TCHAR *name)
{
- return !_tcscmp(m_tszUserName, name) && !strcmp(m_szSection, section);
+ return !_tcscmp(m_tszUserName, name) && !mir_strcmp(m_szSection, section);
}
int CFolderItem::IsEqualTranslated(const char *trSection, const TCHAR *trName)
{
- return !_tcscmp(TranslateTS(m_tszUserName), trName) && !strcmp(Translate(m_szSection), trSection);
+ return !_tcscmp(TranslateTS(m_tszUserName), trName) && !mir_strcmp(Translate(m_szSection), trSection);
}
int CFolderItem::operator ==(const CFolderItem *other)
diff --git a/plugins/HTTPServer/src/FileShareNode.cpp b/plugins/HTTPServer/src/FileShareNode.cpp index 3f344a35cf..a9675f49cf 100644 --- a/plugins/HTTPServer/src/FileShareNode.cpp +++ b/plugins/HTTPServer/src/FileShareNode.cpp @@ -299,7 +299,7 @@ bool CLFileShareNode::bAddUser(CLShareUser * pclUser) { // iterate through its users
CLShareUser * pclCur = pclShare->pclCurrentUsers;
while (pclCur) {
- //strcmp(pclCur->szCurrentDLSrvPath, pclUser->szCurrentDLSrvPath) == 0) // same file
+ //mir_strcmp(pclCur->szCurrentDLSrvPath, pclUser->szCurrentDLSrvPath) == 0) // same file
if (memcmp(&pclCur->stAddr, &pclUser->stAddr, sizeof(in_addr)) == 0) // same IP
nUserConnectionCount++;
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp index f4ccb99546..0af77ce591 100644 --- a/plugins/HTTPServer/src/GuiElements.cpp +++ b/plugins/HTTPServer/src/GuiElements.cpp @@ -286,8 +286,8 @@ UINT_PTR CALLBACK ShareNewFileDialogHook( char pszFileName[MAX_PATH];
GetWindowText(hFileName, pszFileName, SIZEOF(pszFileName));
- if (strcmp(pstShare->pszSrvPath, szSelection) &&
- strcmp(pszFileName, pszShareDirStr)) {
+ if (mir_strcmp(pstShare->pszSrvPath, szSelection) &&
+ mir_strcmp(pszFileName, pszShareDirStr)) {
// a file was selected
// only reenable windows / set default values when a folder was selected before
@@ -325,7 +325,7 @@ UINT_PTR CALLBACK ShareNewFileDialogHook( strcat(szSelection, "/");
// only write to IDC_SHARE_NAME when a file / other folder was selected before
- if (!strcmp(szSelection, pstShare->pszSrvPath))
+ if (!mir_strcmp(szSelection, pstShare->pszSrvPath))
return false;
}
diff --git a/plugins/HTTPServer/src/HttpUser.cpp b/plugins/HTTPServer/src/HttpUser.cpp index 03e6b50c53..c8f111d5c2 100644 --- a/plugins/HTTPServer/src/HttpUser.cpp +++ b/plugins/HTTPServer/src/HttpUser.cpp @@ -521,7 +521,7 @@ bool CLHttpUser::bProcessGetRequest(char * pszRequest, bool bIsGetCommand) { FileTimeToUnixTime(&stFileTime, <ime);
strftime(szFileTime, sizeof(szFileTime), "%a, %d %b %Y %H:%M:%S GMT", gmtime(<ime));
- if (apszParam[eIfModifiedSince] && strcmp(apszParam[eIfModifiedSince], szFileTime) == 0) {
+ if (apszParam[eIfModifiedSince] && mir_strcmp(apszParam[eIfModifiedSince], szFileTime) == 0) {
SendError(304, "Not Modified" );
return true;
}
diff --git a/plugins/HTTPServer/src/IndexHTML.cpp b/plugins/HTTPServer/src/IndexHTML.cpp index 222e24b332..a37ef808db 100644 --- a/plugins/HTTPServer/src/IndexHTML.cpp +++ b/plugins/HTTPServer/src/IndexHTML.cpp @@ -93,19 +93,19 @@ bool LoadIndexHTMLTemplate() { *pszDestBuf = '#';
// signs below 32 are not used anyway
- if (!strcmp(pszKeywordBegin, "End")) *pszDestBuf = SY_END;
- else if (!strcmp(pszKeywordBegin, "ForDirectoriesDo")) *pszDestBuf = SY_FOR_DIRS;
- else if (!strcmp(pszKeywordBegin, "DirectoryUrl")) *pszDestBuf = SY_DIR_URL;
- else if (!strcmp(pszKeywordBegin, "DirectoryName")) *pszDestBuf = SY_DIR_NAME;
- else if (!strcmp(pszKeywordBegin, "ForFilesDo")) *pszDestBuf = SY_FOR_FILES;
- else if (!strcmp(pszKeywordBegin, "FileUrl")) *pszDestBuf = SY_FILE_URL;
- else if (!strcmp(pszKeywordBegin, "FileName")) *pszDestBuf = SY_FILE_NAME;
- else if (!strcmp(pszKeywordBegin, "FileSize")) *pszDestBuf = SY_FILE_SIZE;
- else if (!strcmp(pszKeywordBegin, "FileCreated")) *pszDestBuf = SY_FILE_CREATE_TIME;
- else if (!strcmp(pszKeywordBegin, "FileModified")) *pszDestBuf = SY_FILE_MODIFY_TIME;
- else if (!strcmp(pszKeywordBegin, "IsEven")) *pszDestBuf = SY_IS_EVEN;
- else if (!strcmp(pszKeywordBegin, "IsOdd")) *pszDestBuf = SY_IS_ODD;
- else if (!strcmp(pszKeywordBegin, "IsFileType")) *pszDestBuf = SY_IS_FILE_TYPE;
+ if (!mir_strcmp(pszKeywordBegin, "End")) *pszDestBuf = SY_END;
+ else if (!mir_strcmp(pszKeywordBegin, "ForDirectoriesDo")) *pszDestBuf = SY_FOR_DIRS;
+ else if (!mir_strcmp(pszKeywordBegin, "DirectoryUrl")) *pszDestBuf = SY_DIR_URL;
+ else if (!mir_strcmp(pszKeywordBegin, "DirectoryName")) *pszDestBuf = SY_DIR_NAME;
+ else if (!mir_strcmp(pszKeywordBegin, "ForFilesDo")) *pszDestBuf = SY_FOR_FILES;
+ else if (!mir_strcmp(pszKeywordBegin, "FileUrl")) *pszDestBuf = SY_FILE_URL;
+ else if (!mir_strcmp(pszKeywordBegin, "FileName")) *pszDestBuf = SY_FILE_NAME;
+ else if (!mir_strcmp(pszKeywordBegin, "FileSize")) *pszDestBuf = SY_FILE_SIZE;
+ else if (!mir_strcmp(pszKeywordBegin, "FileCreated")) *pszDestBuf = SY_FILE_CREATE_TIME;
+ else if (!mir_strcmp(pszKeywordBegin, "FileModified")) *pszDestBuf = SY_FILE_MODIFY_TIME;
+ else if (!mir_strcmp(pszKeywordBegin, "IsEven")) *pszDestBuf = SY_IS_EVEN;
+ else if (!mir_strcmp(pszKeywordBegin, "IsOdd")) *pszDestBuf = SY_IS_ODD;
+ else if (!mir_strcmp(pszKeywordBegin, "IsFileType")) *pszDestBuf = SY_IS_FILE_TYPE;
else {
LogEvent("Error in index template", "Unknown Tag");
// unknown tag
@@ -355,9 +355,9 @@ bool bCreateIndexHTML(const char * pszRealPath, const char * pszIndexPath, }
}
- while (!strcmp(fdFindFileData.cFileName, ".") ||
+ while (!mir_strcmp(fdFindFileData.cFileName, ".") ||
!strncmp(fdFindFileData.cFileName, "@", 1) ||
- (!strcmp(fdFindFileData.cFileName, "..") && !strcmp(pszSrvPath, "/")) || // hide .. in root
+ (!mir_strcmp(fdFindFileData.cFileName, "..") && !mir_strcmp(pszSrvPath, "/")) || // hide .. in root
((*pszPos == 19) == ((fdFindFileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0))) {
if (!FindNextFile(hFind, &fdFindFileData)) {
FindClose(hFind);
diff --git a/plugins/HTTPServer/src/IndexXML.cpp b/plugins/HTTPServer/src/IndexXML.cpp index 99526c5d79..11ee766135 100644 --- a/plugins/HTTPServer/src/IndexXML.cpp +++ b/plugins/HTTPServer/src/IndexXML.cpp @@ -128,9 +128,9 @@ bool bCreateIndexXML(const char * pszRealPath, const char * pszIndexPath, // Find files and directories
do {
- if (strcmp(fdFindFileData.cFileName, ".") &&
+ if (mir_strcmp(fdFindFileData.cFileName, ".") &&
strncmp(fdFindFileData.cFileName, "@", 1) &&
- (strcmp(fdFindFileData.cFileName, "..") || strcmp(pszSrvPath, "/"))) { // hide .. in root
+ (mir_strcmp(fdFindFileData.cFileName, "..") || mir_strcmp(pszSrvPath, "/"))) { // hide .. in root
pszBuffer = szBuffer;
strcpy(szFileName, fdFindFileData.cFileName);
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp index 029bc234ba..d63307f5f4 100644 --- a/plugins/HTTPServer/src/main.cpp +++ b/plugins/HTTPServer/src/main.cpp @@ -486,7 +486,7 @@ static INT_PTR nGetShare(WPARAM /*wParam*/, LPARAM lParam) { STFileShareInfo * pclShare = (STFileShareInfo*)lParam;
CLFileShareNode * pclCur = pclFirstNode;
while (pclCur) {
- if (strcmp(pclCur->st.pszSrvPath, pclShare->pszSrvPath) == 0) {
+ if (mir_strcmp(pclCur->st.pszSrvPath, pclShare->pszSrvPath) == 0) {
if (pclShare->dwMaxRealPath <= mir_strlen(pclCur->st.pszRealPath) + 1)
return 1003;
strcpy(pclShare->pszRealPath, pclCur->st.pszRealPath);
diff --git a/plugins/HistoryStats/src/_strfunc.h b/plugins/HistoryStats/src/_strfunc.h index 0726c50698..dfaf172c79 100644 --- a/plugins/HistoryStats/src/_strfunc.h +++ b/plugins/HistoryStats/src/_strfunc.h @@ -13,7 +13,7 @@ namespace ext {
public:
static const char* chr(const char* string, char c) { return strchr(string, c); }
- static int cmp(const char* string1, const char* string2) { return strcmp(string1, string2); }
+ static int cmp(const char* string1, const char* string2) { return mir_strcmp(string1, string2); }
static int icmp(const char* string1, const char* string2) { return _stricmp(string1, string2); }
static int coll(const char* string1, const char* string2) { return strcoll(string1, string2); }
static int icoll(const char* string1, const char* string2) { return _stricoll(string1, string2); }
diff --git a/plugins/HistoryStats/src/mirandacontact.cpp b/plugins/HistoryStats/src/mirandacontact.cpp index f9e9a2d02e..35bce22df6 100644 --- a/plugins/HistoryStats/src/mirandacontact.cpp +++ b/plugins/HistoryStats/src/mirandacontact.cpp @@ -41,7 +41,7 @@ void MirandaContact::fetchSlot(int i) void MirandaContact::stripMetaID(DBEVENTINFO& dbe)
{
- if (strcmp(dbe.szModule,META_PROTO)==0) {
+ if (mir_strcmp(dbe.szModule,META_PROTO)==0) {
char* pTextBegin = reinterpret_cast<char*>(dbe.pBlob);
if (dbe.cbBlob >= 6 && !pTextBegin[dbe.cbBlob - 1]) {
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp index de2e5e7b61..3a4031f2ec 100644 --- a/plugins/IEView/src/HTMLBuilder.cpp +++ b/plugins/IEView/src/HTMLBuilder.cpp @@ -127,7 +127,7 @@ char* HTMLBuilder::getRealProto(MCONTACT hContact) return NULL;
char *szProto = mir_strdup(GetContactProto(hContact));
- if (szProto != NULL && !strcmp(szProto, META_PROTO)) {
+ if (szProto != NULL && !mir_strcmp(szProto, META_PROTO)) {
hContact = db_mc_getMostOnline(hContact);
if (hContact != NULL)
replaceStr(szProto, GetContactProto(hContact));
@@ -137,7 +137,7 @@ char* HTMLBuilder::getRealProto(MCONTACT hContact) char* HTMLBuilder::getRealProto(MCONTACT hContact, const char *szProto)
{
- if (szProto != NULL && !strcmp(szProto, META_PROTO)) {
+ if (szProto != NULL && !mir_strcmp(szProto, META_PROTO)) {
hContact = db_mc_getMostOnline(hContact);
if (hContact != NULL)
return mir_strdup(GetContactProto(hContact));
@@ -148,7 +148,7 @@ char* HTMLBuilder::getRealProto(MCONTACT hContact, const char *szProto) MCONTACT HTMLBuilder::getRealContact(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
- if (szProto != NULL && !strcmp(szProto, META_PROTO))
+ if (szProto != NULL && !mir_strcmp(szProto, META_PROTO))
hContact = db_mc_getMostOnline(hContact);
return hContact;
}
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp index 7d5528eb9d..bd63b8a9aa 100644 --- a/plugins/IEView/src/Options.cpp +++ b/plugins/IEView/src/Options.cpp @@ -1489,7 +1489,7 @@ void Options::init() proto = new ProtocolSettings("_default_");
proto->setSRMMEnable(true);
}
- else if (strcmp(pProtos[i - 1]->szModuleName, META_PROTO)) {
+ else if (mir_strcmp(pProtos[i - 1]->szModuleName, META_PROTO)) {
if ((CallProtoService(pProtos[i - 1]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM) == 0)
continue;
diff --git a/plugins/IEView/src/Template.cpp b/plugins/IEView/src/Template.cpp index d405277f28..e9a6271fde 100644 --- a/plugins/IEView/src/Template.cpp +++ b/plugins/IEView/src/Template.cpp @@ -113,7 +113,7 @@ Template* Template::getNext() bool Template::equals(const char *name)
{
- if (!strcmp(name, this->name))
+ if (!mir_strcmp(name, this->name))
return true;
return false;
@@ -252,7 +252,7 @@ TemplateMap* TemplateMap::add(const char *id, const char *filename) {
TemplateMap *map;
for (map = mapList; map != NULL; map = map->next) {
- if (!strcmp(map->name, id)) {
+ if (!mir_strcmp(map->name, id)) {
map->clear();
map->setFilename(filename);
return map;
@@ -425,7 +425,7 @@ Template* TemplateMap::getTemplate(const char *text) Template* TemplateMap::getTemplate(const char *proto, const char *text)
{
for (TemplateMap *ptr = mapList; ptr != NULL; ptr = ptr->next)
- if (!strcmp(ptr->name, proto))
+ if (!mir_strcmp(ptr->name, proto))
return ptr->getTemplate(text);
return NULL;
@@ -434,7 +434,7 @@ Template* TemplateMap::getTemplate(const char *proto, const char *text) TemplateMap* TemplateMap::getTemplateMap(const char *proto)
{
for (TemplateMap *ptr = mapList; ptr != NULL; ptr = ptr->next)
- if (!strcmp(ptr->name, proto))
+ if (!mir_strcmp(ptr->name, proto))
return ptr;
return NULL;
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index b761b3ae90..8a016603e6 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -93,7 +93,7 @@ static bool CompareDb(DBVARIANT &dbv1, DBVARIANT &dbv2) case DBVT_ASCIIZ:
case DBVT_UTF8:
- return 0 == strcmp(dbv1.pszVal, dbv2.pszVal);
+ return 0 == mir_strcmp(dbv1.pszVal, dbv2.pszVal);
}
}
return false;
@@ -383,7 +383,7 @@ static bool FindDestAccount(const char *szProto) if (pam.pa == NULL)
continue;
- if (!strcmp(pam.pa->szModuleName, szProto))
+ if (!mir_strcmp(pam.pa->szModuleName, szProto))
return true;
}
@@ -929,7 +929,7 @@ static void ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int protoC if (hDst == NULL) {
bSkipAll = true;
for (int i = 0; i < protoCount; i++) {
- if (!strcmp(dbei.szModule, protocol[i]->szModuleName)) {
+ if (!mir_strcmp(dbei.szModule, protocol[i]->szModuleName)) {
bSkipAll = false;
break;
}
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index eb6b3f68ff..85932785a4 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -223,7 +223,7 @@ BOOL checkProtocol(char *szProto) return FALSE; for (int i=0; i < ProtoList.protoCount; i++) - if (ProtoList.protoInfo[i].szProto && !strcmp(ProtoList.protoInfo[i].szProto, szProto)) + if (ProtoList.protoInfo[i].szProto && !mir_strcmp(ProtoList.protoInfo[i].szProto, szProto)) return ProtoList.protoInfo[i].enabled; return FALSE; @@ -233,7 +233,7 @@ BOOL metaCheckProtocol(char *szProto, MCONTACT hContact, WORD eventType) { MCONTACT hSubContact=NULL; - if (bMetaProtoEnabled && szProto && !strcmp(META_PROTO, szProto)) + if (bMetaProtoEnabled && szProto && !mir_strcmp(META_PROTO, szProto)) if (hSubContact = db_mc_getMostOnline(hContact)) szProto = GetContactProto(hSubContact); @@ -378,7 +378,7 @@ BOOL checkXstatus(char *szProto) return checkGlobalXstatus(); for (int i=0; i < ProtoList.protoCount; i++) - if (ProtoList.protoInfo[i].szProto && !strcmp(ProtoList.protoInfo[i].szProto, szProto)) { + if (ProtoList.protoInfo[i].szProto && !mir_strcmp(ProtoList.protoInfo[i].szProto, szProto)) { if (!ProtoList.protoInfo[i].xstatus.count) return TRUE; // Retrieve xstatus for protocol @@ -670,7 +670,7 @@ void createProtocolList(void) else { strcpy(ProtoList.protoInfo[i].szProto, proto[i]->szModuleName); ProtoList.protoInfo[i].enabled = FALSE; - if (!strcmp(proto[i]->szModuleName, META_PROTO)) + if (!mir_strcmp(proto[i]->szModuleName, META_PROTO)) ProtoList.protoInfo[i].visible = FALSE; else { ProtoList.protoInfo[i].visible = TRUE; diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index 8b21e14214..6b1c50d224 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -520,7 +520,7 @@ INT_PTR ListeningToEnabled(WPARAM wParam, LPARAM lParam) ProtocolInfo *GetProtoInfo(char *proto)
{
for (unsigned int i = 1; i < proto_items.size(); i++)
- if (strcmp(proto, proto_items[i].proto) == 0)
+ if (mir_strcmp(proto, proto_items[i].proto) == 0)
return &proto_items[i];
return NULL;
@@ -947,11 +947,11 @@ int SettingChanged(WPARAM hContact,LPARAM lParam) return 0;
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if (strcmp(cws->szSetting, "ListeningTo") != 0)
+ if (mir_strcmp(cws->szSetting, "ListeningTo") != 0)
return 0;
char *proto = GetContactProto(hContact);
- if (proto == NULL || strcmp(cws->szModule, proto) != 0)
+ if (proto == NULL || mir_strcmp(cws->szModule, proto) != 0)
return 0;
if (cws->value.type == DBVT_DELETED || cws->value.ptszVal == NULL || cws->value.ptszVal[0] == 0)
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp index 9a46adf9c5..c8683feba1 100644 --- a/plugins/LotusNotify/src/LotusNotify.cpp +++ b/plugins/LotusNotify/src/LotusNotify.cpp @@ -621,7 +621,7 @@ void checkthread(void*) log_p(L"checkthread: OSPathNetConstruct: %S", fullpath);
if (error = (NSFDbOpen1) (fullpath, &db_handle)) {
- if(strcmp(settingServerSec, "") != 0) {
+ if(mir_strcmp(settingServerSec, "") != 0) {
if (error = (OSPathNetConstruct1)(NULL, settingServerSec, settingDatabase, fullpath)) {
goto errorblock;
} else {
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 0d30f8bf24..1a379b065a 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -694,7 +694,7 @@ INT_PTR onChangeProto(WPARAM wparam, LPARAM lparam) {
MCONTACT hContact = (MCONTACT)wparam, hContactNew;
char* szProto = GetContactProto(hContact);
- if (!strcmp(szProto, (char*)lparam))
+ if (!mir_strcmp(szProto, (char*)lparam))
return 0;
if (CTRL_IS_PRESSED) {
@@ -815,7 +815,7 @@ int BuildMenu(WPARAM wparam, LPARAM) if (pa && (bShowAll || (flags & VF_PROTO))) {
for (int i = 0; i < protoCount; i++) {
- if ((!accs[i]->bIsEnabled) || (strcmp(pa->szProtoName, accs[i]->szProtoName)))
+ if ((!accs[i]->bIsEnabled) || (mir_strcmp(pa->szProtoName, accs[i]->szProtoName)))
hide = 1;
else {
hide = 0;
@@ -900,7 +900,7 @@ static int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam) {
CustomButtonClickData *cbcd = (CustomButtonClickData *)lParam;
- if (!strcmp(cbcd->pszModule, MODULENAME) && cbcd->dwButtonId == 0)
+ if (!mir_strcmp(cbcd->pszModule, MODULENAME) && cbcd->dwButtonId == 0)
onRecvFiles(wParam, 0);
return 0;
diff --git a/plugins/MirOTR/src/dbfilter.cpp b/plugins/MirOTR/src/dbfilter.cpp index 676de8c404..fa65dd8ddc 100644 --- a/plugins/MirOTR/src/dbfilter.cpp +++ b/plugins/MirOTR/src/dbfilter.cpp @@ -60,7 +60,7 @@ int OnDatabaseEventPreAdd(WPARAM hContact, LPARAM lParam) if (db_get_b(hContact, proto, "ChatRoom", 0) == 1) return 0; - if(strcmp(proto, META_PROTO) == 0) { + if(mir_strcmp(proto, META_PROTO) == 0) { hContact = db_mc_getMostOnline(hContact); if (!hContact) return 0; proto = GetContactProto(hContact); @@ -278,7 +278,7 @@ int StatusModeChange(WPARAM wParam, LPARAM lParam) { ConnContext *context = otr_user_state->context_root; while(context) { - if(context->msgstate == OTRL_MSGSTATE_ENCRYPTED && (proto == 0 || strcmp(proto, context->protocol) == 0)) { + if(context->msgstate == OTRL_MSGSTATE_ENCRYPTED && (proto == 0 || mir_strcmp(proto, context->protocol) == 0)) { hContact = (MCONTACT)context->app_data; if(hContact) { @@ -298,7 +298,7 @@ int OnContactSettingChanged(WPARAM hContact, LPARAM lParam) if (!options.end_offline) return 0; DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lParam; - if (!lParam || strcmp(cws->szSetting, "Status") != 0) return 0; + if (!lParam || mir_strcmp(cws->szSetting, "Status") != 0) return 0; int status=0; switch (cws->value.type){ case DBVT_WORD: diff --git a/plugins/MirOTR/src/options.cpp b/plugins/MirOTR/src/options.cpp index 6345502f7c..72b5d0d023 100644 --- a/plugins/MirOTR/src/options.cpp +++ b/plugins/MirOTR/src/options.cpp @@ -322,7 +322,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsProto(HWND hwndDlg, UINT msg, WPARAM wP PROTOACCOUNT **pppDesc; ProtoEnumAccounts(&num_protocols, &pppDesc); for (int i = 0; i < num_protocols; i++) { - if (!strcmp(pppDesc[i]->szModuleName, META_PROTO)) + if (!mir_strcmp(pppDesc[i]->szModuleName, META_PROTO)) continue; if ((CallProtoService(pppDesc[i]->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM) == 0) continue; @@ -504,7 +504,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsContacts(HWND hwndDlg, UINT msg, WPARAM for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { const char *proto = GetContactProto(hContact); if (proto && db_get_b(hContact, proto, "ChatRoom", 0) == 0 && CallService(MS_PROTO_ISPROTOONCONTACT, hContact, (LPARAM)MODULENAME) // ignore chatrooms - && strcmp(proto, META_PROTO) != 0) // and MetaContacts + && mir_strcmp(proto, META_PROTO) != 0) // and MetaContacts { lvI.iItem = 0; lvI.iSubItem = 0; diff --git a/plugins/MirOTR/src/otr.cpp b/plugins/MirOTR/src/otr.cpp index 8c185d99af..2bccd99338 100644 --- a/plugins/MirOTR/src/otr.cpp +++ b/plugins/MirOTR/src/otr.cpp @@ -249,7 +249,7 @@ extern "C" { proto = GetContactProto((MCONTACT)opdata); // ugly wokaround for ICQ. ICQ protocol reports more than 7k, but in SMP this is too long. // possibly ICQ doesn't allow single words without spaces to become longer than ~2340? - if (strcmp("ICQ", proto) == 0 || strncmp("ICQ_", proto, 4) == 0) + if (mir_strcmp("ICQ", proto) == 0 || strncmp("ICQ_", proto, 4) == 0) return 2340; return CallProtoService(proto, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, (LPARAM)opdata); } diff --git a/plugins/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/src/svcs_menu.cpp index ff963c9dd1..17a3b589ae 100644 --- a/plugins/MirOTR/src/svcs_menu.cpp +++ b/plugins/MirOTR/src/svcs_menu.cpp @@ -192,7 +192,7 @@ hide_all: return 0; } - if(proto && strcmp(proto, META_PROTO) == 0) { + if(proto && mir_strcmp(proto, META_PROTO) == 0) { // make menu act as per most online subcontact hContact = db_mc_getMostOnline(hContact); if (!hContact) diff --git a/plugins/MirOTR/src/svcs_proto.cpp b/plugins/MirOTR/src/svcs_proto.cpp index dcce57fc22..b3dc9f4269 100644 --- a/plugins/MirOTR/src/svcs_proto.cpp +++ b/plugins/MirOTR/src/svcs_proto.cpp @@ -14,7 +14,7 @@ INT_PTR SVC_OTRSendMessage(WPARAM wParam,LPARAM lParam){ return CallService(MS_PROTO_CHAINSEND, wParam, lParam); char *proto = GetContactProto(ccs->hContact); - if(proto && strcmp(proto, META_PROTO) == 0) // bypass for metacontacts + if(proto && mir_strcmp(proto, META_PROTO) == 0) // bypass for metacontacts return CallService(MS_PROTO_CHAINSEND, wParam, lParam); if (!proto || !ccs->hContact) @@ -89,7 +89,7 @@ INT_PTR SVC_OTRRecvMessage(WPARAM wParam,LPARAM lParam) char *proto = GetContactProto(ccs->hContact); if (!proto || !ccs->hContact) return 1; //error - else if(proto && strcmp(proto, META_PROTO) == 0) // bypass for metacontacts + else if(proto && mir_strcmp(proto, META_PROTO) == 0) // bypass for metacontacts return CallService(MS_PROTO_CHAINRECV, wParam, lParam); char *oldmessage = pre->szMessage; diff --git a/plugins/MirOTR/src/svcs_srmm.cpp b/plugins/MirOTR/src/svcs_srmm.cpp index 27eb741700..62f37c9daa 100644 --- a/plugins/MirOTR/src/svcs_srmm.cpp +++ b/plugins/MirOTR/src/svcs_srmm.cpp @@ -9,7 +9,7 @@ int SVC_IconPressed(WPARAM hContact, LPARAM lParam) if(sicd->cbSize < sizeof(StatusIconClickData)) return 0; - if(strcmp(sicd->szModule, MODULENAME) == 0) { + if(mir_strcmp(sicd->szModule, MODULENAME) == 0) { char *proto = GetContactProto(hContact); if(proto && db_get_b(hContact, proto, "ChatRoom", 0)) return 0; @@ -95,7 +95,7 @@ int SVC_ButtonsBarLoaded(WPARAM, LPARAM) int SVC_ButtonsBarPressed(WPARAM w, LPARAM l) { CustomButtonClickData* cbcd = (CustomButtonClickData *)l; - if (cbcd->cbSize == sizeof(CustomButtonClickData) && cbcd->dwButtonId == 0 && strcmp(cbcd->pszModule, MODULENAME)==0) { + if (cbcd->cbSize == sizeof(CustomButtonClickData) && cbcd->dwButtonId == 0 && mir_strcmp(cbcd->pszModule, MODULENAME)==0) { MCONTACT hContact = (MCONTACT)w; char *proto = GetContactProto(hContact); diff --git a/plugins/MirOTR/src/utils.cpp b/plugins/MirOTR/src/utils.cpp index 9755c3fc18..31f629d350 100644 --- a/plugins/MirOTR/src/utils.cpp +++ b/plugins/MirOTR/src/utils.cpp @@ -11,9 +11,9 @@ MCONTACT find_contact(const char* userid, const char* protocol) { for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { const char *proto = GetContactProto(hContact); - if(proto && strcmp(proto, protocol) == 0) { + if(proto && mir_strcmp(proto, protocol) == 0) { char *name = contact_get_id(hContact); - if(name && strcmp(name, userid) == 0) { + if(name && mir_strcmp(name, userid) == 0) { mir_free(name); return hContact; } diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index c42196e8fa..435ebd3db8 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -1505,7 +1505,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam) { DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam; - if ((wParam == 0) || (strcmp(cws->szSetting,"Status") != NULL)) + if ((wParam == 0) || (mir_strcmp(cws->szSetting,"Status") != NULL)) return 0; diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp index 0844fad72d..d8286b8d08 100644 --- a/plugins/NewAwaySysMod/src/AwaySys.cpp +++ b/plugins/NewAwaySysMod/src/AwaySys.cpp @@ -122,7 +122,7 @@ int StatusMsgReq(WPARAM wParam, LPARAM lParam, CString &szProto) if (db_get_dw(hContact, szCurProto, "UIN", 0) == lParam) {
szFoundProto = szCurProto;
hFoundContact = hContact;
- if (!strcmp(szCurProto, szProto))
+ if (!mir_strcmp(szCurProto, szProto))
break;
}
}
@@ -353,7 +353,7 @@ int PreBuildContactMenu(WPARAM hContact, LPARAM) static int DBSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if (hContact != NULL && !strcmp(cws->szSetting, "Status"))
+ if (hContact != NULL && !mir_strcmp(cws->szSetting, "Status"))
db_set_w(hContact, "UserOnline", "OldStatus", cws->value.wVal);
return 0;
diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp index 7625b0cc9a..b3f1478f5e 100644 --- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp +++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp @@ -879,7 +879,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA if (CallProtoService(p->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) {
PROTOACCOUNT * acc = ProtoGetAccount(p->szModuleName);
hItem = CList->AddInfo(TCString(_T("* ")) + acc->tszAccountName + _T(" *"), CLC_ROOT, hItem, (LPARAM)p->szModuleName, LoadSkinnedProtoIcon(p->szModuleName, g_ProtoStates[p->szModuleName].Status));
- if (dat->szProtocol && !strcmp(p->szModuleName, dat->szProtocol))
+ if (dat->szProtocol && !mir_strcmp(p->szModuleName, dat->szProtocol))
hSelItem = hItem;
}
}
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index c06d1bd639..7127d00345 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -379,7 +379,7 @@ int ContactStatusChanged(MCONTACT hContact, WORD oldStatus, WORD newStatus) char *szProto = GetContactProto(hContact);
WORD myStatus = (WORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
- if (!strcmp(szProto, META_PROTO)) { //this contact is Meta
+ if (!mir_strcmp(szProto, META_PROTO)) { //this contact is Meta
MCONTACT hSubContact = db_mc_getMostOnline(hContact);
char *szSubProto = GetContactProto(hSubContact);
if (szSubProto == NULL)
@@ -479,7 +479,7 @@ int ProcessStatus(DBCONTACTWRITESETTING *cws, MCONTACT hContact) return 0;
char *szProto = GetContactProto(hContact);
- if (strcmp(cws->szModule, szProto))
+ if (mir_strcmp(cws->szModule, szProto))
return 0;
// we don't want to be notified if new chatroom comes online
@@ -576,10 +576,10 @@ int ProcessExtraStatus(DBCONTACTWRITESETTING *cws, MCONTACT hContact) }
if (strstr(cws->szSetting, "XStatus")) {
- if (strcmp(cws->szModule, szProto))
+ if (mir_strcmp(cws->szModule, szProto))
return 0;
- if (strcmp(cws->szSetting, "XStatusName") == 0) {
+ if (mir_strcmp(cws->szSetting, "XStatusName") == 0) {
smi.compare = CompareStatusMsg(&smi, cws, "LastXStatusName");
if (smi.compare == COMPARE_SAME) {
replaceStrT(smi.newstatusmsg, 0);
@@ -594,7 +594,7 @@ int ProcessExtraStatus(DBCONTACTWRITESETTING *cws, MCONTACT hContact) xsc = NewXSC(hContact, szProto, TYPE_ICQ_XSTATUS, smi.compare, smi.newstatusmsg, NULL);
ExtraStatusChanged(xsc);
}
- else if (!strcmp(cws->szSetting, "XStatusMsg")) {
+ else if (!mir_strcmp(cws->szSetting, "XStatusMsg")) {
smi.compare = CompareStatusMsg(&smi, cws, "LastXStatusMsg");
if (smi.compare == COMPARE_SAME) {
replaceStrT(smi.newstatusmsg, 0);
@@ -790,11 +790,11 @@ int ContactSettingChanged(WPARAM hContact, LPARAM lParam) if (ProcessExtraStatus(cws, hContact))
return 0;
- if (!strcmp(cws->szSetting, "Status"))
+ if (!mir_strcmp(cws->szSetting, "Status"))
if (ProcessStatus(cws, hContact))
return 0;
- if (!strcmp(cws->szModule, "CList") && !strcmp(cws->szSetting, "StatusMsg"))
+ if (!mir_strcmp(cws->szModule, "CList") && !mir_strcmp(cws->szSetting, "StatusMsg"))
if (ProcessStatusMessage(cws, hContact))
return 0;
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp index 42ec34c325..07bfbf22be 100644 --- a/plugins/NewXstatusNotify/src/xstatus.cpp +++ b/plugins/NewXstatusNotify/src/xstatus.cpp @@ -433,7 +433,7 @@ TCHAR* GetIcqXStatus(MCONTACT hContact, char *szProto, char *szValue, TCHAR *buf int statusID = db_get_b(hContact, szProto, "XStatusId", -1);
if (statusID != -1) {
if (!db_get_ts(hContact, szProto, szValue, &dbv)) {
- if ((strcmp(szValue, "XStatusName") == 0) && dbv.ptszVal[0] == 0)
+ if ((mir_strcmp(szValue, "XStatusName") == 0) && dbv.ptszVal[0] == 0)
GetDefaultXstatusName(statusID, szProto, buff, bufflen);
else
_tcsncpy(buff, dbv.ptszVal, bufflen);
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp index 7ca182d3d6..451bd8af1c 100755 --- a/plugins/New_GPG/src/main.cpp +++ b/plugins/New_GPG/src/main.cpp @@ -322,7 +322,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR { char buf[64]; GetDlgItemTextA(hwndDlg, IDC_ACCOUNT, buf, SIZEOF(buf)); - if(!strcmp(buf, Translate("Default"))) + if(!mir_strcmp(buf, Translate("Default"))) { db_set_s(NULL, szGPGModuleName, "GPGPubKey", out.c_str()); db_set_ts(NULL, szGPGModuleName, "KeyMainName", name); @@ -340,7 +340,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR acc_str += "_KeyID"; db_set_ts(NULL, szGPGModuleName, acc_str.c_str(), fp); } - if(!strcmp(buf, Translate("Default"))) + if(!mir_strcmp(buf, Translate("Default"))) { wstring keyinfo = TranslateT("Default private key ID"); keyinfo += _T(": "); @@ -497,7 +497,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR { char buf[64]; GetDlgItemTextA(hwndDlg, IDC_ACCOUNT, buf, SIZEOF(buf)); - if(!strcmp(buf, Translate("Default"))) + if(!mir_strcmp(buf, Translate("Default"))) { db_unset(NULL, szGPGModuleName, "GPGPubKey"); db_unset(NULL, szGPGModuleName, "KeyID"); @@ -625,7 +625,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR { char buf[64]; GetDlgItemTextA(hwndDlg, IDC_ACCOUNT, buf, SIZEOF(buf)); - if(!strcmp(buf, Translate("Default"))) + if(!mir_strcmp(buf, Translate("Default"))) { db_set_s(NULL, szGPGModuleName, "GPGPubKey", out.c_str()); db_set_ts(NULL, szGPGModuleName, "KeyID", fp); @@ -650,7 +650,7 @@ static INT_PTR CALLBACK DlgProcFirstRun(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR { char buf[64]; GetDlgItemTextA(hwndDlg, IDC_ACCOUNT, buf, SIZEOF(buf)); - if(!strcmp(buf, Translate("Default"))) + if(!mir_strcmp(buf, Translate("Default"))) { string keyinfo = Translate("key ID"); keyinfo += ": "; diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp index 045623b8b0..1e0951af35 100755 --- a/plugins/New_GPG/src/options.cpp +++ b/plugins/New_GPG/src/options.cpp @@ -217,7 +217,7 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP for(MCONTACT hcnttmp = db_find_first(); hcnttmp != NULL; hcnttmp = db_find_next(hcnttmp)) {
if(hcnttmp != hContact) {
char *tmp2 = UniGetContactSettingUtf(hcnttmp, szGPGModuleName, "KeyID", "");
- if(!strcmp(tmp, tmp2)) {
+ if(!mir_strcmp(tmp, tmp2)) {
mir_free(tmp2);
keep = true;
break;
diff --git a/plugins/New_GPG/src/srmm.cpp b/plugins/New_GPG/src/srmm.cpp index 1cca711d67..f1b646ff06 100644 --- a/plugins/New_GPG/src/srmm.cpp +++ b/plugins/New_GPG/src/srmm.cpp @@ -44,7 +44,7 @@ int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam) else if(db_mc_isSub(hContact))
hMeta = db_mc_getMeta(hContact);
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
- if(strcmp(sicd->szModule, szGPGModuleName))
+ if(mir_strcmp(sicd->szModule, szGPGModuleName))
return 0; // not our event
BYTE enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0);
diff --git a/plugins/NewsAggregator/Src/ExportImport.cpp b/plugins/NewsAggregator/Src/ExportImport.cpp index 78e58a8ffe..a7da89e57d 100644 --- a/plugins/NewsAggregator/Src/ExportImport.cpp +++ b/plugins/NewsAggregator/Src/ExportImport.cpp @@ -165,7 +165,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM BYTE GroupExist = 0;
do {
group_name = (char *)CallService(MS_CLIST_GROUPGETNAME, (WPARAM)hGroup, 0);
- if (group_name != NULL && !strcmp(group_name, _T2A(utfgroup))) {
+ if (group_name != NULL && !mir_strcmp(group_name, _T2A(utfgroup))) {
GroupExist = 1;
break;
}
diff --git a/plugins/NewsAggregator/Src/Icons.cpp b/plugins/NewsAggregator/Src/Icons.cpp index 011fe57c58..93c2ad1f5d 100644 --- a/plugins/NewsAggregator/Src/Icons.cpp +++ b/plugins/NewsAggregator/Src/Icons.cpp @@ -46,7 +46,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/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index 8750bde3df..01cf2ae15d 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -25,7 +25,7 @@ bool UpdateListFlag = FALSE; bool IsMyContact(MCONTACT hContact)
{
const char *szProto = GetContactProto(hContact);
- return szProto != NULL && strcmp(MODULE, szProto) == 0;
+ return szProto != NULL && mir_strcmp(MODULE, szProto) == 0;
}
void NetlibInit()
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp index a8d0f00abe..1cf1a3233a 100644 --- a/plugins/NoHistory/src/dllmain.cpp +++ b/plugins/NoHistory/src/dllmain.cpp @@ -211,7 +211,7 @@ int IconPressed(WPARAM hContact, LPARAM lParam) return 0;
if (sicd->flags & MBCF_RIGHTBUTTON) return 0; // ignore right-clicks
- if (strcmp(sicd->szModule, MODULE) != 0) return 0; // not our event
+ if (mir_strcmp(sicd->szModule, MODULE) != 0) return 0; // not our event
char *proto = GetContactProto(hContact);
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0);
diff --git a/plugins/Non-IM Contact/src/contactinfo.cpp b/plugins/Non-IM Contact/src/contactinfo.cpp index f6d23ee084..24703b4c93 100644 --- a/plugins/Non-IM Contact/src/contactinfo.cpp +++ b/plugins/Non-IM Contact/src/contactinfo.cpp @@ -494,9 +494,9 @@ INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam) return 1;
while (fgets(line, 2000, file)) {
- if (!strcmp(line, "\r\n\0"))
+ if (!mir_strcmp(line, "\r\n\0"))
continue;
- if (!strcmp(line, "[Non-IM Contact]\r\n"))
+ if (!mir_strcmp(line, "[Non-IM Contact]\r\n"))
contactDone = 0;
else if (!strncmp(line, "Name=", mir_strlen("Name="))) {
i = (int)mir_strlen("Name="); j = 0;
@@ -554,7 +554,7 @@ INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam) i = (int)mir_strlen("Minutes=");
sscanf(&line[i], "%d", &minutes);
}
- else if (contactDone && !strcmp(line, "[/Non-IM Contact]\r\n")) {
+ else if (contactDone && !mir_strcmp(line, "[/Non-IM Contact]\r\n")) {
if (!name) continue;
size_t size = mir_strlen(name) + mir_strlen("Do you want to import this Non-IM Contact?\r\n\r\nName: \r\n") + 1;
char *msg = (char*)malloc(size);
diff --git a/plugins/Non-IM Contact/src/dialog.cpp b/plugins/Non-IM Contact/src/dialog.cpp index d41cb61fed..9e6fb07c4d 100644 --- a/plugins/Non-IM Contact/src/dialog.cpp +++ b/plugins/Non-IM Contact/src/dialog.cpp @@ -139,7 +139,7 @@ INT_PTR CALLBACK TestWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP GetDlgItemTextA(hwnd, IDC_STRING, tmp, SIZEOF(tmp));
if (tmp[mir_strlen(tmp) - 1] == '(') {
for (i = 0; i < VARS; i++) {
- if (!strcmp(braceList[i].var, &tmp[mir_strlen(tmp) - mir_strlen(braceList[i].var)])) {
+ if (!mir_strcmp(braceList[i].var, &tmp[mir_strlen(tmp) - mir_strlen(braceList[i].var)])) {
for (j = 0; j < MAX_BRACES; j++) {
if (!braceOrder[j]) {
braceOrder[j] = i;
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp index 6c8df00ec8..3956f03fe1 100644 --- a/plugins/Non-IM Contact/src/main.cpp +++ b/plugins/Non-IM Contact/src/main.cpp @@ -29,10 +29,10 @@ INT_PTR doubleClick(WPARAM wParam, LPARAM lParam) char program[MAX_PATH], params[MAX_PATH];
int shellEXEerror = 0;
char* proto = GetContactProto(wParam);
- if (proto && !strcmp(proto, MODNAME)) {
+ if (proto && !mir_strcmp(proto, MODNAME)) {
if (GetKeyState(VK_CONTROL) & 0x8000) // ctrl is pressed
editContact(wParam, 0); // for later when i add a second double click setting
- else if (db_get_static(wParam, MODNAME, "Program", program, SIZEOF(program)) && strcmp(program, "")) {
+ else if (db_get_static(wParam, MODNAME, "Program", program, SIZEOF(program)) && mir_strcmp(program, "")) {
if (!db_get_static(wParam, MODNAME, "ProgramParams", params, SIZEOF(params)))
strcpy(params, "");
if (strstr(program, "http://") || strstr(program, "https://"))
diff --git a/plugins/Non-IM Contact/src/namereplacing.cpp b/plugins/Non-IM Contact/src/namereplacing.cpp index edfa7dd539..091b9e3718 100644 --- a/plugins/Non-IM Contact/src/namereplacing.cpp +++ b/plugins/Non-IM Contact/src/namereplacing.cpp @@ -219,7 +219,7 @@ void checkStringForcompare(char *str) Y = strtok(NULL, ",\")");
j = Y - ©OfStr[i] + (int)mir_strlen(Y) + 1;
if (A && B && X && Y) {
- if (!strcmp(A, B))
+ if (!mir_strcmp(A, B))
strcat(newStr, X);
else strcat(newStr, Y);
}
@@ -613,7 +613,7 @@ void WriteSetting(MCONTACT hContact, char* module1, char* setting1, char* module break;
}
// strip the tab and new lines from all except the tooltip
- if (!error && strcmp(setting1, "ToolTip")) stripWhiteSpace(newString);
+ if (!error && mir_strcmp(setting1, "ToolTip")) stripWhiteSpace(newString);
db_set_s(hContact, module2, setting2, newString);
}
else db_set_s(hContact, module2, setting2, "");
diff --git a/plugins/NotesAndReminders/src/reminders.cpp b/plugins/NotesAndReminders/src/reminders.cpp index ae631dba26..49a8530db7 100644 --- a/plugins/NotesAndReminders/src/reminders.cpp +++ b/plugins/NotesAndReminders/src/reminders.cpp @@ -193,7 +193,7 @@ static void RemoveReminderSystemEvent(REMINDERDATA *p) break;
if ((ULONG)pev->lParam == p->uid && !pev->hContact
- && pev->pszService && !strcmp(pev->pszService, MODULENAME"/OpenTriggeredReminder"))
+ && pev->pszService && !mir_strcmp(pev->pszService, MODULENAME"/OpenTriggeredReminder"))
{
if ( !CallService(MS_CLIST_REMOVEEVENT,(WPARAM)pev->hContact,(LPARAM)pev->hDbEvent) )
{
diff --git a/plugins/NotifyAnything/SendLog/SLImp.cpp b/plugins/NotifyAnything/SendLog/SLImp.cpp index 0a4b69e81c..3b9982c460 100644 --- a/plugins/NotifyAnything/SendLog/SLImp.cpp +++ b/plugins/NotifyAnything/SendLog/SLImp.cpp @@ -16,19 +16,19 @@ void implementation(int argc, char **argv, bool console) bool tcp = false;
const char *target = "127.0.0.1";
- if (argc >= 2 && !strcmp("-T", argv[1])) {
+ if (argc >= 2 && !mir_strcmp("-T", argv[1])) {
tcp = true;
argc -= 1;
argv += 1;
}
- if (argc >= 3 && !strcmp("-H", argv[1])) {
+ if (argc >= 3 && !mir_strcmp("-H", argv[1])) {
target = argv[2];
argc -= 2;
argv += 2;
}
- if (argc >= 3 && !strcmp("-P", argv[1])) {
+ if (argc >= 3 && !mir_strcmp("-P", argv[1])) {
port = atoi(argv[2]);
argc -= 2;
argv += 2;
@@ -69,7 +69,7 @@ void implementation(int argc, char **argv, bool console) if (connect(sock, (const SOCKADDR *) &to, sizeof to))
throw (DWORD) WSAGetLastError();
- if (console && (argc == 1 || argc == 3 && !strcmp("-p", argv[1]))) {
+ if (console && (argc == 1 || argc == 3 && !mir_strcmp("-p", argv[1]))) {
std::string prefix;
if (argc == 3)
prefix = argv[2];
diff --git a/plugins/NotifyAnything/SendLog/SendLog.cpp b/plugins/NotifyAnything/SendLog/SendLog.cpp index 5cb46932da..eab3ec3452 100644 --- a/plugins/NotifyAnything/SendLog/SendLog.cpp +++ b/plugins/NotifyAnything/SendLog/SendLog.cpp @@ -9,7 +9,7 @@ void implementation(int argc, char **argv, bool console); int main(int argc, char **argv)
try
{
- if (argc == 2 && !strcmp("/?", argv[1])) {
+ if (argc == 2 && !mir_strcmp("/?", argv[1])) {
std::cout << "\n"
"Syntax: sendlog [-T] [-H host] [-P port] [-p prefix]\n"
"\tSends each input line as a separate message, with optional prefix.\n"
diff --git a/plugins/NotifyAnything/SendLog/SendLogWin.cpp b/plugins/NotifyAnything/SendLog/SendLogWin.cpp index 37f112efb8..72f50e3d44 100644 --- a/plugins/NotifyAnything/SendLog/SendLogWin.cpp +++ b/plugins/NotifyAnything/SendLog/SendLogWin.cpp @@ -9,7 +9,7 @@ void implementation(int argc, char **argv, bool console); int main(int argc, char **argv)
try
{
- if (argc == 1 || argc == 2 && !strcmp("/?", argv[1])) {
+ if (argc == 1 || argc == 2 && !mir_strcmp("/?", argv[1])) {
MessageBox(NULL, "Syntax: sendlog32 [-T] [-H host] [-P port] text\n"
"\tSends single text message.", "Sendlog32", MB_OK);
return 0;
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index c982d21336..7859e28be8 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -34,7 +34,7 @@ INT_PTR NudgeShowMenu(WPARAM wParam, LPARAM lParam) bool bEnabled = false;
for (int i = 0; i < arNudges.getCount(); i++) {
CNudgeElement &p = arNudges[i];
- if (!strcmp((char*)wParam, p.ProtocolName)) {
+ if (!mir_strcmp((char*)wParam, p.ProtocolName)) {
bEnabled = (GlobalNudge.useByProtocol) ? p.enabled : DefaultNudge.enabled;
break;
}
@@ -54,7 +54,7 @@ INT_PTR NudgeSend(WPARAM hContact, LPARAM lParam) if (GlobalNudge.useByProtocol) {
for (int i = 0; i < arNudges.getCount(); i++) {
CNudgeElement &p = arNudges[i];
- if (!strcmp(protoName, p.ProtocolName))
+ if (!mir_strcmp(protoName, p.ProtocolName))
Nudge_ShowPopup(&p, hContact, msg);
}
}
@@ -68,7 +68,7 @@ INT_PTR NudgeSend(WPARAM hContact, LPARAM lParam) if (GlobalNudge.useByProtocol) {
for (int i = 0; i < arNudges.getCount(); i++) {
CNudgeElement &p = arNudges[i];
- if (!strcmp(protoName, p.ProtocolName))
+ if (!mir_strcmp(protoName, p.ProtocolName))
if (p.showStatus)
Nudge_SentStatus(&p, hContact);
}
@@ -105,7 +105,7 @@ int NudgeReceived(WPARAM hContact, LPARAM lParam) if (GlobalNudge.useByProtocol) {
for (int i = 0; i < arNudges.getCount(); i++) {
CNudgeElement &p = arNudges[i];
- if (!strcmp(protoName, p.ProtocolName)) {
+ if (!mir_strcmp(protoName, p.ProtocolName)) {
if (p.enabled) {
if (p.useIgnoreSettings && CallService(MS_IGNORE_ISIGNORED, hContact, IGNOREEVENT_USERONLINE))
@@ -240,7 +240,7 @@ static int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam) {
CustomButtonClickData *cbcd = (CustomButtonClickData *)lParam;
- if (!strcmp(cbcd->pszModule, "Nudge"))
+ if (!mir_strcmp(cbcd->pszModule, "Nudge"))
NudgeSend(wParam, 0);
return 0;
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp index fc5f7b9bc7..b4b49f4ab9 100644 --- a/plugins/QuickContacts/src/quickcontacts.cpp +++ b/plugins/QuickContacts/src/quickcontacts.cpp @@ -351,7 +351,7 @@ void LoadContacts(HWND hwndDlg, BOOL show_all) if ((!show_all && opts.hide_subcontacts) || opts.group_append)
hMeta = db_mc_getMeta(hContact);
}
- else if (!strcmp(META_PROTO, pszProto))
+ else if (!mir_strcmp(META_PROTO, pszProto))
continue;
if (!show_all)
diff --git a/plugins/QuickMessages/src/main.cpp b/plugins/QuickMessages/src/main.cpp index c3ee162400..e68d39aff2 100644 --- a/plugins/QuickMessages/src/main.cpp +++ b/plugins/QuickMessages/src/main.cpp @@ -156,7 +156,7 @@ static int CustomButtonPressed(WPARAM wParam,LPARAM lParam) SortedList* sl=NULL;
int state=0;
- if(strcmp(cbcd->pszModule,PLGNAME)) return 0;
+ if(mir_strcmp(cbcd->pszModule,PLGNAME)) return 0;
if (!ButtonsList[cbcd->dwButtonId]) return 1;
diff --git a/plugins/QuickReplies/src/events.cpp b/plugins/QuickReplies/src/events.cpp index 493ade4f56..67476f6f6a 100644 --- a/plugins/QuickReplies/src/events.cpp +++ b/plugins/QuickReplies/src/events.cpp @@ -82,7 +82,7 @@ int OnButtonPressed(WPARAM wParam, LPARAM lParam) CustomButtonClickData *cbcd = (CustomButtonClickData *)lParam;
mir_snprintf(buttonName, SIZEOF(buttonName), MODULE" %x", iNumber + 1);
- if (strcmp(cbcd->pszModule, buttonName))
+ if (mir_strcmp(cbcd->pszModule, buttonName))
return 0;
if (cbcd->dwButtonId != iNumber)
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp index cc646f791c..aa654a90c3 100644 --- a/plugins/RemovePersonalSettings/src/rps.cpp +++ b/plugins/RemovePersonalSettings/src/rps.cpp @@ -566,7 +566,7 @@ void DeleteFileOrFolder(const char *name) }
do {
- if (strcmp(findData.cFileName, ".") && strcmp(findData.cFileName, "..")) {
+ if (mir_strcmp(findData.cFileName, ".") && mir_strcmp(findData.cFileName, "..")) {
strcpy(strTmp, findData.cFileName);
DeleteFileOrFolder(tmp);
}
@@ -586,7 +586,7 @@ void DeleteFileOrFolder(const char *name) HANDLE hwnd = FindFirstFileA(tmp, &findData);
if (hwnd != INVALID_HANDLE_VALUE) {
do {
- if (strcmp(findData.cFileName, ".") && strcmp(findData.cFileName, "..")) {
+ if (mir_strcmp(findData.cFileName, ".") && mir_strcmp(findData.cFileName, "..")) {
mir_snprintf(tmp, SIZEOF(tmp), "%s\\%s", name, findData.cFileName);
DeleteFileOrFolder(tmp);
}
@@ -629,7 +629,7 @@ int EnumProc(const char *szName, LPARAM lParam) if (dms->filter != NULL && dms->lenFilterMinusOne > 0) {
if (len >= dms->lenFilterMinusOne) {
if (dms->filter[0] == '*') {
- if (strcmp(&dms->filter[1], &szName[len - dms->lenFilterMinusOne]) != 0)
+ if (mir_strcmp(&dms->filter[1], &szName[len - dms->lenFilterMinusOne]) != 0)
return 0;
}
else { // if (dms->filter[dms->lenFilterMinusOne] == '*')
diff --git a/plugins/Scriver/src/globals.cpp b/plugins/Scriver/src/globals.cpp index db0ba35a56..aa3d58ea1f 100644 --- a/plugins/Scriver/src/globals.cpp +++ b/plugins/Scriver/src/globals.cpp @@ -215,7 +215,7 @@ void ReleaseIcons() HICON GetCachedIcon(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 Skin_GetIconByHandle(iconList[i].hIcolib);
return NULL;
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 586f449cea..52840bd307 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -1053,7 +1053,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP mir_snprintf(buf, SIZEOF(buf), Translate("User menu - %s"), idbuf);
SendDlgItemMessage(hwndDlg, IDC_USERMENU, BUTTONADDTOOLTIP, (WPARAM)buf, 0);
- if (cws && !strcmp(cws->szModule, dat->szProto) && !strcmp(cws->szSetting, "Status"))
+ if (cws && !mir_strcmp(cws->szModule, dat->szProto) && !mir_strcmp(cws->szSetting, "Status"))
dat->wStatus = cws->value.wVal;
SetStatusIcon(dat);
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index 9d6724ed1e..c557fc6776 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -415,7 +415,7 @@ int StatusIconPressed(WPARAM wParam, LPARAM lParam) hwnd = SM_FindWindowByContact(wParam);
if (hwnd != NULL) {
- if (!strcmp(SRMMMOD, sicd->szModule)) {
+ if (!mir_strcmp(SRMMMOD, sicd->szModule)) {
if (sicd->dwId == 0 && g_dat.hMenuANSIEncoding) {
if (sicd->flags & MBCF_RIGHTBUTTON) {
int codePage = (int) SendMessage(hwnd, DM_GETCODEPAGE, 0, 0);
diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp index 9db60844c2..61e09f5ff2 100644 --- a/plugins/SecureIM/src/options.cpp +++ b/plugins/SecureIM/src/options.cpp @@ -1495,7 +1495,7 @@ int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) s = (dbv1.type == DBVT_ASCIIZ);
d = (dbv2.type == DBVT_ASCIIZ);
if (s && d) {
- s = strcmp(dbv1.pszVal, dbv2.pszVal);
+ s = mir_strcmp(dbv1.pszVal, dbv2.pszVal);
d = 0;
}
db_free(&dbv1);
@@ -1512,7 +1512,7 @@ int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort) if(!db_get_s(p2->hContact, MODULENAME, "gpg", &dbv2)) {
d = (dbv2.type == DBVT_ASCIIZ);
if (s && d) {
- s = strcmp(dbv1.pszVal, dbv2.pszVal);
+ s = mir_strcmp(dbv1.pszVal, dbv2.pszVal);
d = 0;
}
db_free(&dbv1);
diff --git a/plugins/SecureIM/src/svcs_clist.cpp b/plugins/SecureIM/src/svcs_clist.cpp index 0b677659c0..0d5dd38d57 100644 --- a/plugins/SecureIM/src/svcs_clist.cpp +++ b/plugins/SecureIM/src/svcs_clist.cpp @@ -3,7 +3,7 @@ int __cdecl onContactSettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if (!hContact || strcmp(cws->szSetting, "Status")) return 0;
+ if (!hContact || mir_strcmp(cws->szSetting, "Status")) return 0;
pUinKey ptr = getUinKey(hContact);
int stat = getContactStatus(hContact);
diff --git a/plugins/SecureIM/src/svcs_srmm.cpp b/plugins/SecureIM/src/svcs_srmm.cpp index 9d021aae42..e2583947d2 100644 --- a/plugins/SecureIM/src/svcs_srmm.cpp +++ b/plugins/SecureIM/src/svcs_srmm.cpp @@ -15,7 +15,7 @@ int __cdecl onIconPressed(WPARAM hContact, LPARAM lParam) hContact = db_mc_getMostOnline(hContact); // âîçüìåì òîò, ÷åðåç êîòîðûé ïîéäåò ñîîáùåíèå
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
- if (strcmp(sicd->szModule, MODULENAME) != 0 || !isSecureProtocol(hContact))
+ if (mir_strcmp(sicd->szModule, MODULENAME) != 0 || !isSecureProtocol(hContact))
return 0; // not our event
if (!isContactPGP(hContact) && !isContactGPG(hContact) && !isChatRoom(hContact)) {
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index c8de06f57b..a38aeba407 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -63,7 +63,7 @@ BOOL isYahoo(char *protoname) if (protoname) {
char *pszUniqueSetting = (char*)CallProtoService(protoname, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if (pszUniqueSetting)
- return !strcmp(pszUniqueSetting, "yahoo_id");
+ return !mir_strcmp(pszUniqueSetting, "yahoo_id");
}
return FALSE;
}
@@ -73,7 +73,7 @@ BOOL isJabber(char *protoname) if (protoname) {
char *pszUniqueSetting = (char*)CallProtoService(protoname, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if (pszUniqueSetting)
- return !strcmp(pszUniqueSetting, "jid");
+ return !mir_strcmp(pszUniqueSetting, "jid");
}
return FALSE;
}
@@ -83,7 +83,7 @@ BOOL isICQ(char *protoname) if (protoname) {
char *pszUniqueSetting = (char*)CallProtoService(protoname, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if (pszUniqueSetting)
- return !strcmp(pszUniqueSetting, "UIN");
+ return !mir_strcmp(pszUniqueSetting, "UIN");
}
return FALSE;
}
@@ -93,7 +93,7 @@ BOOL isMSN(char *protoname) if (protoname) {
char *pszUniqueSetting = (char*)CallProtoService(protoname, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if (pszUniqueSetting)
- return !strcmp(pszUniqueSetting, "e-mail");
+ return !mir_strcmp(pszUniqueSetting, "e-mail");
}
return FALSE;
}
@@ -560,7 +560,7 @@ int UpdateValues(WPARAM hContact, LPARAM lparam) DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lparam;
char *szProto = GetContactProto(hContact);
- if (cws->value.type == DBVT_DWORD && !strcmp(cws->szSetting, "LastSeen") && !mir_strcmp(cws->szModule, szProto)) {
+ if (cws->value.type == DBVT_DWORD && !mir_strcmp(cws->szSetting, "LastSeen") && !mir_strcmp(cws->szModule, szProto)) {
DBWriteTimeTS(cws->value.dVal, hContact);
HWND hwnd = WindowList_Find(g_pUserInfo, hContact);
@@ -569,11 +569,11 @@ int UpdateValues(WPARAM hContact, LPARAM lparam) return 0;
}
- BOOL isIdleEvent = includeIdle ? (strcmp(cws->szSetting, "IdleTS") == 0) : 0;
- if (strcmp(cws->szSetting, "Status") && strcmp(cws->szSetting, "StatusTriger") && (isIdleEvent == 0))
+ BOOL isIdleEvent = includeIdle ? (mir_strcmp(cws->szSetting, "IdleTS") == 0) : 0;
+ if (mir_strcmp(cws->szSetting, "Status") && mir_strcmp(cws->szSetting, "StatusTriger") && (isIdleEvent == 0))
return 0;
- if (!strcmp(cws->szModule, S_MOD)) {
+ if (!mir_strcmp(cws->szModule, S_MOD)) {
// here we will come when Settings/SeenModule/StatusTriger is changed
WORD prevStatus = db_get_w(hContact, S_MOD, "OldStatus", ID_STATUS_OFFLINE);
if (includeIdle) {
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp index e86b3ebd4d..b2adfc3878 100644 --- a/plugins/SendScreenshotPlus/src/CSend.cpp +++ b/plugins/SendScreenshotPlus/src/CSend.cpp @@ -527,7 +527,7 @@ int JSON_Get_(const char* json, size_t jsonlen, const char* variable, const char if(c+2>=jsonend || *++c!=':') break; /// read data ++c; - if(!strcmp(var,needle)){ + if(!mir_strcmp(var,needle)){ int datalen=JSON_ParseData_(&c,jsonend-c,value); if(!datalen) return 0; @@ -691,15 +691,15 @@ int CSend::HTTPFormCreate(NETLIBHTTPREQUEST* nlhr,int requestType,char* url,HTTP const char* mime="application/octet-stream"; const char* fileext=strrchr(filename,'.'); if(fileext){ - if(!strcmp(fileext,".jpg") || !strcmp(fileext,".jpeg") || !strcmp(fileext,".jpe")) + if(!mir_strcmp(fileext,".jpg") || !mir_strcmp(fileext,".jpeg") || !mir_strcmp(fileext,".jpe")) mime="image/jpeg"; - else if(!strcmp(fileext,".bmp")) + else if(!mir_strcmp(fileext,".bmp")) mime="image/bmp"; - else if(!strcmp(fileext,".png")) + else if(!mir_strcmp(fileext,".png")) mime="image/png"; - else if(!strcmp(fileext,".gif")) + else if(!mir_strcmp(fileext,".gif")) mime="image/gif"; - else if(!strcmp(fileext,".tif") || !strcmp(fileext,".tiff")) + else if(!mir_strcmp(fileext,".tif") || !mir_strcmp(fileext,".tiff")) mime="image/tiff"; } HTTPFormAppendData(nlhr,&dataMax,&dataPos,mime,mir_strlen(mime)); diff --git a/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp b/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp index 46b320c020..79f255541e 100644 --- a/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp +++ b/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp @@ -124,8 +124,8 @@ INT_PTR CSendHTTPServer::MyCallService(const char *name, WPARAM wParam, LPARAM l / * CContactMapping::iterator Contact(_CContactMapping.end()); if ( wParam == m_hContact && ( - (strcmp(name, MS_MSG_SENDMESSAGE)== 0) || - (strcmp(name, "SRMsg/LaunchMessageWindow")== 0) )) + (mir_strcmp(name, MS_MSG_SENDMESSAGE)== 0) || + (mir_strcmp(name, "SRMsg/LaunchMessageWindow")== 0) )) { m_URL= mir_strdup((char*)lParam); return 0; diff --git a/plugins/SimpleStatusMsg/res/resource.rc b/plugins/SimpleStatusMsg/res/resource.rc index 69aac27c27..784edb72ac 100644 --- a/plugins/SimpleStatusMsg/res/resource.rc +++ b/plugins/SimpleStatusMsg/res/resource.rc @@ -313,7 +313,7 @@ BEGIN MENUITEM "?dbsetting(contact,module,setting)", ID__VARIABLES_DBSETTINGCONTACTMODULESETTING
MENUITEM "?txtfile(file,line)", ID__VARIABLES_TXTFILEFILELINE
MENUITEM "?if(condition,true,false)", ID__VARIABLES_IFCONDITIONTRUEFALSE
- MENUITEM "?strcmp(string1,string2)", ID__VARIABLES_STRCMPSTRING1STRING2
+ MENUITEM "?mir_strcmp(string1,string2)", ID__VARIABLES_STRCMPSTRING1STRING2
MENUITEM "?stricmp(string1,string2)", ID__VARIABLES_STRICMPSTRING1STRING2
MENUITEM "?cdate(format)", ID__VARIABLES_CDATEFORMAT
MENUITEM "?ctime(format)", ID__VARIABLES_CTIMEFORMAT
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index 3aa567406b..9162be6f97 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -974,7 +974,7 @@ INT_PTR ShowStatusMessageDialog(WPARAM wParam, LPARAM lParam) if (!accounts->pa[i]->bIsVisible)
continue;
- if (!strcmp(accounts->pa[i]->szModuleName, (char *)lParam))
+ if (!mir_strcmp(accounts->pa[i]->szModuleName, (char *)lParam))
{
box_data->m_szProto = accounts->pa[i]->szModuleName;
box_data->m_iStatusModes = CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0)&~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0);
@@ -1011,7 +1011,7 @@ static int ChangeStatusMessage(WPARAM wParam, LPARAM lParam) // TODO this could be done better
BOOL bOnStartup = FALSE, bGlobalStartupStatus = TRUE;
- if (szProto && !strcmp(szProto, "SimpleStatusMsgGlobalStartupStatus")) {
+ if (szProto && !mir_strcmp(szProto, "SimpleStatusMsgGlobalStartupStatus")) {
szProto = NULL;
bOnStartup = TRUE;
}
@@ -1743,7 +1743,7 @@ static int OnAccListChanged(WPARAM wParam, LPARAM lParam) if (!IsAccountEnabled(accounts->pa[i]))
continue;
- if (!strcmp(accounts->pa[i]->szProtoName, "ICQ"))
+ if (!mir_strcmp(accounts->pa[i]->szProtoName, "ICQ"))
HookProtoEvent(accounts->pa[i]->szModuleName, ME_ICQ_STATUSMSGREQ, OnICQStatusMsgRequest);
accounts->statusFlags |= (CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_2, 0) & ~CallProtoService(accounts->pa[i]->szModuleName, PS_GETCAPS, PFLAGNUM_5, 0));
diff --git a/plugins/SkypeStatusChange/src/stdafx.h b/plugins/SkypeStatusChange/src/stdafx.h index 8acc6f684e..5a2c296f1e 100644 --- a/plugins/SkypeStatusChange/src/stdafx.h +++ b/plugins/SkypeStatusChange/src/stdafx.h @@ -70,7 +70,7 @@ class COptions OBJLIST<PrevStatus> m_aProtocol2Status;
static int CompareStatuses(const PrevStatus *p1, const PrevStatus *p2)
- { return strcmp(p1->szProto, p2->szProto);
+ { return mir_strcmp(p1->szProto, p2->szProto);
}
public:
diff --git a/plugins/SmileyAdd/src/download.cpp b/plugins/SmileyAdd/src/download.cpp index 0d39bbac4b..e2df1aed45 100644 --- a/plugins/SmileyAdd/src/download.cpp +++ b/plugins/SmileyAdd/src/download.cpp @@ -86,7 +86,7 @@ bool InternetDownloadFile(const char *szUrl, char* szDest, HANDLE &hHttpDwnl) // get the url for the new location and save it to szInfo
// look for the reply header "Location"
for (int i=0; i<nlhrReply->headersCount; i++) {
- if (!strcmp(nlhrReply->headers[i].szName, "Location")) {
+ if (!mir_strcmp(nlhrReply->headers[i].szName, "Location")) {
size_t rlen = 0;
if (nlhrReply->headers[i].szValue[0] == '/') {
const char* szPath;
diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp index 535eb37d5f..e06fd40f1d 100644 --- a/plugins/SmileyAdd/src/general.cpp +++ b/plugins/SmileyAdd/src/general.cpp @@ -225,7 +225,7 @@ MCONTACT DecodeMetaContact(MCONTACT hContact) bool IsSmileyProto(char* proto)
{
- return proto && strcmp(proto, META_PROTO) && (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & (PF1_IM | PF1_CHAT));
+ return proto && mir_strcmp(proto, META_PROTO) && (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & (PF1_IM | PF1_CHAT));
}
void ReportError(const TCHAR* errmsg)
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index 1ab16d58b6..f0e6b79e0d 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -441,7 +441,7 @@ int DbSettingChanged(WPARAM hContact, LPARAM lParam) if (cws->value.type == DBVT_DELETED)
return 0;
- if (strcmp(cws->szSetting, "Transport") == 0) {
+ if (mir_strcmp(cws->szSetting, "Transport") == 0) {
CMString catname(_T("Standard"));
SmileyCategoryType *smc = g_SmileyCategories.GetSmileyCategory(catname);
if (smc != NULL)
diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index c4afe2e8d3..41a3be4d18 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -849,7 +849,7 @@ void SmileyCategoryListType::AddAccountAsCategory(PROTOACCOUNT *acc, const CMStr if (paths.IsEmpty()){
const char* packnam = acc->szProtoName;
- if (strcmp(packnam, "JABBER") == 0)
+ if (mir_strcmp(packnam, "JABBER") == 0)
packnam = "JGMail";
else if (strstr(packnam, "SIP") != NULL)
packnam = "MSN";
@@ -876,7 +876,7 @@ void SmileyCategoryListType::AddProtoAsCategory(char *acc, const CMString& defau return;
const char* packnam = acc;
- if (strcmp(packnam, "JABBER") == 0)
+ if (mir_strcmp(packnam, "JABBER") == 0)
packnam = "JGMail";
else if (strstr(packnam, "SIP") != NULL)
packnam = "MSN";
diff --git a/plugins/Spamotron/src/bayes.cpp b/plugins/Spamotron/src/bayes.cpp index b1d8720b02..546227a31b 100644 --- a/plugins/Spamotron/src/bayes.cpp +++ b/plugins/Spamotron/src/bayes.cpp @@ -150,8 +150,8 @@ BOOL is_token_valid(char *token) return FALSE;
// skip "www", "com", "org", etc.
- if (!strcmp(token, "www") || !strcmp(token, "com") || !strcmp(token, "org") || !strcmp(token, "edu") ||
- !strcmp(token, "net") || !strcmp(token, "biz") || !strcmp(token, "http") || !strcmp(token, "ftp"))
+ if (!mir_strcmp(token, "www") || !mir_strcmp(token, "com") || !mir_strcmp(token, "org") || !mir_strcmp(token, "edu") ||
+ !mir_strcmp(token, "net") || !mir_strcmp(token, "biz") || !mir_strcmp(token, "http") || !mir_strcmp(token, "ftp"))
return FALSE;
return TRUE;
diff --git a/plugins/SpellChecker/src/dictionary.cpp b/plugins/SpellChecker/src/dictionary.cpp index 64adc2f33a..18689e9756 100644 --- a/plugins/SpellChecker/src/dictionary.cpp +++ b/plugins/SpellChecker/src/dictionary.cpp @@ -533,7 +533,7 @@ public: const char *dic_enc = hunspell->get_dic_encoding(); TCHAR *hwordchars; - if (strcmp(dic_enc, "UTF-8") == 0) { + if (mir_strcmp(dic_enc, "UTF-8") == 0) { codePage = CP_UTF8; diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index c784e56b44..557423bd0d 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -1385,7 +1385,7 @@ int MsgWindowEvent(WPARAM, LPARAM lParam) int IconPressed(WPARAM hContact, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
- if (sicd == NULL || strcmp(sicd->szModule, MODULE_NAME) != 0)
+ if (sicd == NULL || mir_strcmp(sicd->szModule, MODULE_NAME) != 0)
return 0;
if (hContact == NULL)
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp index 155ff045ea..4bf0a94d33 100644 --- a/plugins/StartupSilence/src/main.cpp +++ b/plugins/StartupSilence/src/main.cpp @@ -140,7 +140,7 @@ int DisablePopup(WPARAM wParam, LPARAM lParam) if (hContact != NULL)
{
char* cp = GetContactProto(hContact);
- if ( !strcmp(cp, "Weather") || !strcmp(cp, "mRadio") )
+ if ( !mir_strcmp(cp, "Weather") || !mir_strcmp(cp, "mRadio") )
return 0;
return 1;
}
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp index 5e08e14a20..761c3913f3 100644 --- a/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp +++ b/plugins/StatusPlugins/AdvancedAutoAway/advancedautoaway.cpp @@ -173,7 +173,7 @@ static int ProcessProtoAck(WPARAM wParam, LPARAM lParam) for (int i = 0; i < autoAwaySettings.getCount(); i++) {
TAAAProtoSetting &p = autoAwaySettings[i];
log_debugA("chk: %s", p.szName);
- if (!strcmp(p.szName, ack->szModule)) {
+ if (!mir_strcmp(p.szName, ack->szModule)) {
log_debugA("ack->szModule: %s p.statusChanged: %d", ack->szModule, p.statusChanged);
if (!p.statusChanged)
p.mStatus = TRUE;
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp index a65e36e22a..80f8ce95fd 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp @@ -282,7 +282,7 @@ static int StatusChange(WPARAM wParam, LPARAM lParam) else { for (int i = 0; i < connectionSettings.getCount(); i++) { TConnectionSettings& cs = connectionSettings[i]; - if (GetStatus(cs) != ID_STATUS_DISABLED && !strcmp(cs.szName, szProto)) + if (GetStatus(cs) != ID_STATUS_DISABLED && !mir_strcmp(cs.szName, szProto)) AssignStatus(&cs, wParam, 0, cs.szMsg); } } @@ -304,7 +304,7 @@ static int CSStatusChange(WPARAM wParam, LPARAM) if ((protoSettings[i]->szName == NULL) || (connectionSettings[j].szName == NULL)) continue; - if (!strcmp(protoSettings[i]->szName, connectionSettings[j].szName)) + if (!mir_strcmp(protoSettings[i]->szName, connectionSettings[j].szName)) if (GetStatus(connectionSettings[j]) != ID_STATUS_DISABLED) AssignStatus(&connectionSettings[j], protoSettings[i]->status, protoSettings[i]->lastStatus, connectionSettings[j].szMsg); } @@ -327,7 +327,7 @@ static int CSStatusChangeEx(WPARAM wParam, LPARAM) for (int j = 0; j < connectionSettings.getCount(); j++) { if ((protoSettings[i]->szName == NULL) || (connectionSettings[j].szName == NULL)) continue; - if (!strcmp(protoSettings[i]->szName, connectionSettings[j].szName)) { + if (!mir_strcmp(protoSettings[i]->szName, connectionSettings[j].szName)) { if (GetStatus(connectionSettings[j]) != ID_STATUS_DISABLED) AssignStatus(&connectionSettings[j], protoSettings[i]->status, protoSettings[i]->lastStatus, protoSettings[i]->szMsg); } @@ -527,7 +527,7 @@ static int ProcessProtoAck(WPARAM, LPARAM lParam) if (ack->type == ACKTYPE_STATUS && ack->result == ACKRESULT_SUCCESS) { for (int i = 0; i < connectionSettings.getCount(); i++) { TConnectionSettings& cs = connectionSettings[i]; - if (!strcmp(cs.szName, ack->szModule)) + if (!mir_strcmp(cs.szName, ack->szModule)) cs.lastStatusAckTime = GetTickCount(); } StartTimer(IDT_PROCESSACK, 0, FALSE); @@ -538,7 +538,7 @@ static int ProcessProtoAck(WPARAM, LPARAM lParam) if (ack->lParam == LOGINERR_OTHERLOCATION) { for (int i = 0; i < connectionSettings.getCount(); i++) { TConnectionSettings& cs = connectionSettings[i]; - if (!strcmp(ack->szModule, cs.szName)) { + if (!mir_strcmp(ack->szModule, cs.szName)) { AssignStatus(&cs, ID_STATUS_OFFLINE, 0, NULL); if (db_get_b(NULL, MODULENAME, SETTING_CNCOTHERLOC, 0)) { StopTimer(IDT_PROCESSACK); @@ -561,7 +561,7 @@ static int ProcessProtoAck(WPARAM, LPARAM lParam) log_infoA("KeepStatus: cancel on login error (%s)", ack->szModule); for (int i = 0; i < connectionSettings.getCount(); i++) { TConnectionSettings& cs = connectionSettings[i]; - if (!strcmp(ack->szModule, cs.szName)) + if (!mir_strcmp(ack->szModule, cs.szName)) AssignStatus(&cs, ID_STATUS_OFFLINE, 0, NULL); } ProcessPopup(KS_CONN_STATE_LOGINERROR, (LPARAM)ack->szModule); @@ -1058,7 +1058,7 @@ INT_PTR EnableProtocolService(WPARAM wParam, LPARAM lParam) int ret = -2; for (int i = 0; i < connectionSettings.getCount(); i++) { TConnectionSettings& cs = connectionSettings[i]; - if (!strcmp(szProto, cs.szName)) { + if (!mir_strcmp(szProto, cs.szName)) { if (wParam) { if (GetStatus(cs) == ID_STATUS_DISABLED) AssignStatus(&cs, CallProtoService(cs.szName, PS_GETSTATUS, 0, 0), 0, NULL); @@ -1083,7 +1083,7 @@ INT_PTR IsProtocolEnabledService(WPARAM, LPARAM lParam) for (int i = 0; i < connectionSettings.getCount(); i++) { TConnectionSettings& cs = connectionSettings[i]; - if (!strcmp(szProto, cs.szName)) + if (!mir_strcmp(szProto, cs.szName)) return GetStatus(cs) != ID_STATUS_DISABLED; } diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp index 7814703f23..4bbe88a28d 100644 --- a/plugins/StatusPlugins/StartupStatus/profiles.cpp +++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp @@ -189,7 +189,7 @@ TCHAR *GetStatusMessage(int profile, char *szProto) DBVARIANT dbv; for ( int i=0; i < pceCount; i++ ) { - if ( (pce[i].profile == profile) && (!strcmp(pce[i].szProto, szProto))) { + if ( (pce[i].profile == profile) && (!mir_strcmp(pce[i].szProto, szProto))) { mir_snprintf(dbSetting, SIZEOF(dbSetting), "%d_%s_%s", profile, szProto, SETTING_PROFILE_STSMSG); if (!db_get_ts(NULL, MODULENAME, dbSetting, &dbv)) { // reload from db pce[i].msg = ( TCHAR* )realloc(pce[i].msg, sizeof(TCHAR)*(mir_tstrlen(dbv.ptszVal)+1)); diff --git a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp index 845c8c30b2..aa2bba706e 100644 --- a/plugins/StatusPlugins/StartupStatus/startupstatus.cpp +++ b/plugins/StatusPlugins/StartupStatus/startupstatus.cpp @@ -214,7 +214,7 @@ static int ProcessProtoAck(WPARAM wParam, LPARAM lParam) return 0;
for (int i = 0; i < startupSettings.getCount(); i++) {
- if (!strcmp(ack->szModule, startupSettings[i].szName)) {
+ if (!mir_strcmp(ack->szModule, startupSettings[i].szName)) {
startupSettings[i].szName = "";
log_debugA("StartupStatus: %s overridden by ME_PROTO_ACK, status will not be set", ack->szModule);
}
@@ -238,7 +238,7 @@ static int StatusChange(WPARAM wParam, LPARAM lParam) }
else {
for (int i = 0; i < startupSettings.getCount(); i++) {
- if (!strcmp(startupSettings[i].szName, szProto)) {
+ if (!mir_strcmp(startupSettings[i].szName, szProto)) {
startupSettings[i].szName = "";
log_debugA("StartupStatus: %s overridden by ME_CLIST_STATUSMODECHANGE, status will not be set", szProto);
}
@@ -264,7 +264,7 @@ static int CSStatusChangeEx(WPARAM wParam, LPARAM lParam) if (ps[i]->szName == NULL || startupSettings[j].szName == NULL)
continue;
- if (!strcmp(ps[i]->szName, startupSettings[j].szName)) {
+ if (!mir_strcmp(ps[i]->szName, startupSettings[j].szName)) {
log_debugA("StartupStatus: %s overridden by MS_CS_SETSTATUSEX, status will not be set", ps[i]->szName);
// use a hack to disable this proto
startupSettings[j].szName = "";
diff --git a/plugins/StatusPlugins/commonstatus.cpp b/plugins/StatusPlugins/commonstatus.cpp index 1ff0f978de..2f4786f33b 100644 --- a/plugins/StatusPlugins/commonstatus.cpp +++ b/plugins/StatusPlugins/commonstatus.cpp @@ -143,7 +143,7 @@ static int equalsGlobalStatus(PROTOCOLSETTINGEX **ps) pstatus = 0;
for (j = 0; j < protoList->getCount(); j++)
- if (!strcmp(protos[i]->szModuleName, ps[j]->szName))
+ if (!mir_strcmp(protos[i]->szModuleName, ps[j]->szName))
pstatus = GetActualStatus(ps[j]);
if (pstatus == 0)
diff --git a/plugins/StopSpamMod/src/stopspam.cpp b/plugins/StopSpamMod/src/stopspam.cpp index 1e6da982db..e83bcd6ea1 100755 --- a/plugins/StopSpamMod/src/stopspam.cpp +++ b/plugins/StopSpamMod/src/stopspam.cpp @@ -342,9 +342,9 @@ MIRANDA_HOOK_EVENT(ME_DB_CONTACT_SETTINGCHANGED, w, l) DBCONTACTWRITESETTING * cws = (DBCONTACTWRITESETTING*)l; // if CList/NotOnList is being deleted then remove answeredSetting - if(strcmp(cws->szModule, "CList")) + if(mir_strcmp(cws->szModule, "CList")) return 0; - if(strcmp(cws->szSetting, "NotOnList")) + if(mir_strcmp(cws->szSetting, "NotOnList")) return 0; if(!cws->value.type) { diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp index 5e51915364..a70e70d0aa 100644 --- a/plugins/StopSpamPlus/src/events.cpp +++ b/plugins/StopSpamPlus/src/events.cpp @@ -191,9 +191,9 @@ MIRANDA_HOOK_EVENT(ME_DB_CONTACT_SETTINGCHANGED, hContact, l) DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)l;
// if CList/NotOnList is being deleted then remove answeredSetting
- if (strcmp(cws->szModule, "CList"))
+ if (mir_strcmp(cws->szModule, "CList"))
return 0;
- if (strcmp(cws->szSetting, "NotOnList"))
+ if (mir_strcmp(cws->szSetting, "NotOnList"))
return 0;
if (!cws->value.type) {
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp index 885692778c..e6c34b4eb1 100644 --- a/plugins/TabSRMM/src/buttonsbar.cpp +++ b/plugins/TabSRMM/src/buttonsbar.cpp @@ -178,7 +178,7 @@ static INT_PTR CB_GetButtonState(WPARAM wParam, LPARAM lParam) bbdi->bbbFlags = 0; for (int i = 0; i < LButtonsList.getCount(); i++) { CustomButtonData *cbd = LButtonsList[i]; - if (!strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && (cbd->m_dwButtonOrigID == bbdi->dwButtonID)) { + if (!mir_strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && (cbd->m_dwButtonOrigID == bbdi->dwButtonID)) { realbutton = true; tempCID = cbd->m_dwButtonCID; } @@ -186,7 +186,7 @@ static INT_PTR CB_GetButtonState(WPARAM wParam, LPARAM lParam) if (!realbutton) for (int i = 0; i < RButtonsList.getCount(); i++) { CustomButtonData* cbd = RButtonsList[i]; - if (!strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && (cbd->m_dwButtonOrigID == bbdi->dwButtonID)) { + if (!mir_strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && (cbd->m_dwButtonOrigID == bbdi->dwButtonID)) { realbutton = true; tempCID = cbd->m_dwButtonCID; } @@ -214,7 +214,7 @@ static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam) BBButton *bbdi = (BBButton *)lParam; for (int i = 0; i < LButtonsList.getCount(); i++) { CustomButtonData *cbd = LButtonsList[i]; - if (!strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && (cbd->m_dwButtonOrigID == bbdi->dwButtonID)) { + if (!mir_strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && (cbd->m_dwButtonOrigID == bbdi->dwButtonID)) { realbutton = true; tempCID = cbd->m_dwButtonCID; } @@ -222,7 +222,7 @@ static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam) if (!realbutton) for (int i = 0; i < RButtonsList.getCount(); i++) { CustomButtonData* cbd = RButtonsList[i]; - if (!strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && (cbd->m_dwButtonOrigID == bbdi->dwButtonID)) { + if (!mir_strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && (cbd->m_dwButtonOrigID == bbdi->dwButtonID)) { realbutton = true; tempCID = cbd->m_dwButtonCID; } @@ -262,7 +262,7 @@ static INT_PTR CB_RemoveButton(WPARAM, LPARAM lParam) for (int i = LButtonsList.getCount() - 1; i >= 0; i--) { CustomButtonData *cbd = LButtonsList[i]; - if (!strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && cbd->m_dwButtonOrigID == bbdi->dwButtonID) { + if (!mir_strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && cbd->m_dwButtonOrigID == bbdi->dwButtonID) { tempCID = cbd->m_dwButtonCID; dwFlags = cbd->m_bLSided ? BBBF_ISLSIDEBUTTON : BBBF_ISRSIDEBUTTON; LButtonsList.remove(i); @@ -272,7 +272,7 @@ static INT_PTR CB_RemoveButton(WPARAM, LPARAM lParam) if (!tempCID) { for (int i = RButtonsList.getCount() - 1; i >= 0; i--) { CustomButtonData *cbd = RButtonsList[i]; - if (!strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && cbd->m_dwButtonOrigID == bbdi->dwButtonID) { + if (!mir_strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && cbd->m_dwButtonOrigID == bbdi->dwButtonID) { tempCID = cbd->m_dwButtonCID; dwFlags = cbd->m_bLSided ? BBBF_ISLSIDEBUTTON : BBBF_ISRSIDEBUTTON; RButtonsList.remove(i); @@ -299,7 +299,7 @@ static INT_PTR CB_ModifyButton(WPARAM, LPARAM lParam) for (int i = 0; i < LButtonsList.getCount(); i++) { cbd = LButtonsList[i]; - if (!strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && (cbd->m_dwButtonOrigID == bbdi->dwButtonID)) { + if (!mir_strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && (cbd->m_dwButtonOrigID == bbdi->dwButtonID)) { bFound = true; break; } @@ -308,7 +308,7 @@ static INT_PTR CB_ModifyButton(WPARAM, LPARAM lParam) if (!bFound) { for (int i = 0; i < RButtonsList.getCount(); i++) { cbd = RButtonsList[i]; - if (!strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && (cbd->m_dwButtonOrigID == bbdi->dwButtonID)) { + if (!mir_strcmp(cbd->m_pszModuleName, bbdi->pszModuleName) && (cbd->m_dwButtonOrigID == bbdi->dwButtonID)) { bFound = true; break; } @@ -403,13 +403,13 @@ static int SaveTree(HWND hToolBarTree) cbd->m_bIMButton = false; cbd->m_bChatButton = false; - if (cbd->m_bSeparator && !strcmp(cbd->m_pszModuleName, "Tabsrmm_sep")) + if (cbd->m_bSeparator && !mir_strcmp(cbd->m_pszModuleName, "Tabsrmm_sep")) cbd->m_opFlags = BBSF_NTBDESTRUCT; } else { if (!cbd->m_bIMButton && !cbd->m_bChatButton) cbd->m_bIMButton = true; - if (cbd->m_bSeparator && !strcmp(cbd->m_pszModuleName, "Tabsrmm_sep")) { + if (cbd->m_bSeparator && !mir_strcmp(cbd->m_pszModuleName, "Tabsrmm_sep")) { cbd->m_bHidden = 0; cbd->m_opFlags &= ~BBSF_NTBDESTRUCT; ++loc_sepcout; diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp index 7c77f7da97..5becbc5910 100644 --- a/plugins/TabSRMM/src/chat/options.cpp +++ b/plugins/TabSRMM/src/chat/options.cpp @@ -218,7 +218,7 @@ void LoadMsgDlgFont(int section, int i, LOGFONT *lf, COLORREF* colour, char *szM lf->lfQuality = DEFAULT_QUALITY;
lf->lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;
mir_snprintf(str, SIZEOF(str), "Font%d", i);
- if ((i == 17 && !strcmp(szMod, CHATFONT_MODULE)) || ((i == 20 || i == 21) && !strcmp(szMod, FONTMODULE))) {
+ if ((i == 17 && !mir_strcmp(szMod, CHATFONT_MODULE)) || ((i == 20 || i == 21) && !mir_strcmp(szMod, FONTMODULE))) {
lf->lfCharSet = SYMBOL_CHARSET;
_tcsncpy_s(lf->lfFaceName, _T("Webdings"), _TRUNCATE);
}
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index 12c2b064dd..de67b789b8 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -457,7 +457,7 @@ void CContactCache::updateStatusMsg(const char *szKey) MCONTACT hContact = getActiveContact(); - if (szKey == 0 || (szKey && !strcmp("StatusMsg", szKey))) { + if (szKey == 0 || (szKey && !mir_strcmp("StatusMsg", szKey))) { if (m_szStatusMsg) mir_free(m_szStatusMsg); m_szStatusMsg = 0; @@ -465,7 +465,7 @@ void CContactCache::updateStatusMsg(const char *szKey) if (szStatus != 0) m_szStatusMsg = (mir_tstrlen(szStatus) > 0 ? getNormalizedStatusMsg(szStatus) : 0); } - if (szKey == 0 || (szKey && !strcmp("ListeningTo", szKey))) { + if (szKey == 0 || (szKey && !mir_strcmp("ListeningTo", szKey))) { if (m_ListeningInfo) mir_free(m_ListeningInfo); m_ListeningInfo = 0; @@ -473,7 +473,7 @@ void CContactCache::updateStatusMsg(const char *szKey) if (szListeningTo != 0 && *szListeningTo) m_ListeningInfo = szListeningTo.detouch(); } - if (szKey == 0 || (szKey && !strcmp("XStatusMsg", szKey))) { + if (szKey == 0 || (szKey && !mir_strcmp("XStatusMsg", szKey))) { if (m_xStatusMsg) mir_free(m_xStatusMsg); m_xStatusMsg = 0; diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp index 56f4da5747..94fe049ccc 100644 --- a/plugins/TabSRMM/src/controls.cpp +++ b/plugins/TabSRMM/src/controls.cpp @@ -965,7 +965,7 @@ LONG_PTR CALLBACK StatusBarSubclassProc(HWND hWnd, UINT msg, WPARAM wParam, LPAR if (sid == NULL)
break;
- if (!strcmp(sid->szModule, MSG_ICON_MODULE)) {
+ if (!mir_strcmp(sid->szModule, MSG_ICON_MODULE)) {
if (sid->dwId == MSG_ICON_SOUND)
mir_sntprintf(wBuf, SIZEOF(wBuf), TranslateT("Sounds are %s. Click to toggle status, hold SHIFT and click to set for all open containers"),
pContainer->dwFlags & CNT_NOSOUND ? TranslateT("disabled") : TranslateT("enabled"));
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index dc427efe51..16cf2b8b38 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -934,7 +934,7 @@ void TSAPI DM_SetDBButtonStates(HWND hwndChild, TWindowData *dat) case DBVT_ASCIIZ: ptrA szValue(db_get_sa(hFinalContact, szModule, szSetting)); if (szValue) - result = !strcmp((char*)buttonItem->bValuePush, szValue); + result = !mir_strcmp((char*)buttonItem->bValuePush, szValue); break; } SendMessage(hWnd, BM_SETCHECK, result, 0); @@ -1846,7 +1846,7 @@ void DrawStatusIcons(TWindowData *dat, HDC hDC, const RECT &rc, int gap) int nIcon = 0; while (StatusIconData *si = Srmm_GetNthIcon(dat->hContact, nIcon++)) { - if (!strcmp(si->szModule, MSG_ICON_MODULE)) { + if (!mir_strcmp(si->szModule, MSG_ICON_MODULE)) { if (si->dwId == MSG_ICON_SOUND) { DrawIconEx(hDC, x, y, PluginConfig.g_buttonBarIcons[ICON_DEFAULT_SOUNDS], cx_icon, cy_icon, 0, NULL, DI_NORMAL); @@ -1900,7 +1900,7 @@ void CheckStatusIconClick(TWindowData *dat, POINT pt, const RECT &rc, int gap, i if (si == NULL) return; - if (!strcmp(si->szModule, MSG_ICON_MODULE)) { + if (!mir_strcmp(si->szModule, MSG_ICON_MODULE)) { if (si->dwId == MSG_ICON_SOUND && code != NM_RCLICK) { if (GetKeyState(VK_SHIFT) & 0x8000) { for (TContainerData *p = pFirstContainer; p; p = p->pNext) { diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 387ae9b138..074835e644 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -378,20 +378,20 @@ int CGlobals::DBSettingChanged(WPARAM hContact, LPARAM lParam) HWND hwnd = M.FindWindow(hContact);
if (hwnd == 0 && hContact != 0) { // we are not interested in this event if there is no open message window/tab
- if (!strcmp(setting, "Status") || !strcmp(setting, "MyHandle") || !strcmp(setting, "Nick") || !strcmp(cws->szModule, SRMSGMOD_T)) {
+ if (!mir_strcmp(setting, "Status") || !mir_strcmp(setting, "MyHandle") || !mir_strcmp(setting, "Nick") || !mir_strcmp(cws->szModule, SRMSGMOD_T)) {
c = CContactCache::getContactCache(hContact);
if (c) {
fChanged = c->updateStatus();
- if (strcmp(setting, "Status"))
+ if (mir_strcmp(setting, "Status"))
c->updateNick();
- if (!strcmp(setting, "isFavorite") || !strcmp(setting, "isRecent"))
+ if (!mir_strcmp(setting, "isFavorite") || !mir_strcmp(setting, "isRecent"))
c->updateFavorite();
}
}
return 0;
}
- if (hContact == 0 && !strcmp("Nick", setting)) {
+ if (hContact == 0 && !mir_strcmp("Nick", setting)) {
M.BroadcastMessage(DM_OWNNICKCHANGED, 0, (LPARAM)cws->szModule);
return 0;
}
@@ -400,8 +400,8 @@ int CGlobals::DBSettingChanged(WPARAM hContact, LPARAM lParam) c = CContactCache::getContactCache(hContact);
if (c) {
szProto = c->getProto();
- if (!strcmp(cws->szModule, SRMSGMOD_T)) { // catch own relevant settings
- if (!strcmp(setting, "isFavorite") || !strcmp(setting, "isRecent"))
+ if (!mir_strcmp(cws->szModule, SRMSGMOD_T)) { // catch own relevant settings
+ if (!mir_strcmp(setting, "isFavorite") || !mir_strcmp(setting, "isRecent"))
c->updateFavorite();
}
}
@@ -426,9 +426,9 @@ int CGlobals::DBSettingChanged(WPARAM hContact, LPARAM lParam) c->updateUIN();
}
}
- else if (!strcmp(setting, "MirVer"))
+ else if (!mir_strcmp(setting, "MirVer"))
PostMessage(hwnd, DM_CLIENTCHANGED, 0, 0);
- else if (!strcmp(setting, "display_uid")) {
+ else if (!mir_strcmp(setting, "display_uid")) {
if (c)
c->updateUIN();
PostMessage(hwnd, DM_UPDATEUIN, 0, 0);
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index 9f487ad79d..f78fdf9b98 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -492,7 +492,7 @@ int CMimAPI::MessageEventAdded(WPARAM hContact, LPARAM hDbEvent) bAllowAutoCreate = true; else { char *szProto = GetContactProto(hContact); - if (szProto && !strcmp(szProto, META_PROTO)) + if (szProto && !mir_strcmp(szProto, META_PROTO)) szProto = GetContactProto(db_mc_getSrmmSub(hContact)); if (szProto) { diff --git a/plugins/TabSRMM/src/modplus.cpp b/plugins/TabSRMM/src/modplus.cpp index b106517789..17913d17c0 100644 --- a/plugins/TabSRMM/src/modplus.cpp +++ b/plugins/TabSRMM/src/modplus.cpp @@ -66,7 +66,7 @@ static int RegisterCustomButton(WPARAM, LPARAM) static int CustomButtonPressed(WPARAM wParam, LPARAM lParam)
{
CustomButtonClickData *cbcd = (CustomButtonClickData *)lParam;
- if (strcmp(cbcd->pszModule, "Tabmodplus") || cbcd->dwButtonId != 1)
+ if (mir_strcmp(cbcd->pszModule, "Tabmodplus") || cbcd->dwButtonId != 1)
return 0;
BBButton bbd = { sizeof(bbd) };
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index d4c9949748..5db596c1c1 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -2982,7 +2982,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case DM_MYAVATARCHANGED:
{
const char *szProto = dat->cache->getActiveProto();
- if (!strcmp((char *)wParam, szProto) && mir_strlen(szProto) == mir_strlen((char *)wParam))
+ if (!mir_strcmp((char *)wParam, szProto) && mir_strlen(szProto) == mir_strlen((char *)wParam))
LoadOwnAvatar(dat);
}
break;
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index aa9965f604..5d68fc5ef5 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -1783,7 +1783,7 @@ void TSAPI GetMyNick(TWindowData *dat) HICON TSAPI MY_GetContactIcon(const TWindowData *dat, LPCSTR szSetting)
{
- int bUseMeta = (szSetting == NULL) ? false : M.GetByte(szSetting, strcmp(szSetting, "MetaiconTab") == 0);
+ int bUseMeta = (szSetting == NULL) ? false : M.GetByte(szSetting, mir_strcmp(szSetting, "MetaiconTab") == 0);
if (bUseMeta)
return LoadSkinnedProtoIcon(dat->cache->getProto(), dat->cache->getStatus());
return LoadSkinnedProtoIcon(dat->cache->getActiveProto(), dat->cache->getActiveStatus());
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 4e2248f185..5e83a533bc 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -762,15 +762,15 @@ static int GetIconPackVersion(HMODULE hDLL) if (LoadStringA(hDLL, IDS_IDENTIFY, szIDString, sizeof(szIDString)) == 0)
version = 0;
- else if (!strcmp(szIDString, "__tabSRMM_ICONPACK 1.0__"))
+ else if (!mir_strcmp(szIDString, "__tabSRMM_ICONPACK 1.0__"))
version = 1;
- else if (!strcmp(szIDString, "__tabSRMM_ICONPACK 2.0__"))
+ else if (!mir_strcmp(szIDString, "__tabSRMM_ICONPACK 2.0__"))
version = 2;
- else if (!strcmp(szIDString, "__tabSRMM_ICONPACK 3.0__"))
+ else if (!mir_strcmp(szIDString, "__tabSRMM_ICONPACK 3.0__"))
version = 3;
- else if (!strcmp(szIDString, "__tabSRMM_ICONPACK 3.5__"))
+ else if (!mir_strcmp(szIDString, "__tabSRMM_ICONPACK 3.5__"))
version = 4;
- else if (!strcmp(szIDString, "__tabSRMM_ICONPACK 5.0__"))
+ else if (!mir_strcmp(szIDString, "__tabSRMM_ICONPACK 5.0__"))
version = 5;
if (version < 5)
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp index f373ca98fa..bcc649242e 100644 --- a/plugins/TabSRMM/src/sendlater.cpp +++ b/plugins/TabSRMM/src/sendlater.cpp @@ -295,7 +295,7 @@ int CSendLater::addJob(const char *szSetting, LPARAM lParam) DBVARIANT dbv = { 0 };
char *szOrig_Utf = 0;
- if (!m_fAvail || !szSetting || !strcmp(szSetting, "count") || mir_strlen(szSetting) < 8)
+ if (!m_fAvail || !szSetting || !mir_strcmp(szSetting, "count") || mir_strlen(szSetting) < 8)
return 0;
if (szSetting[0] != 'S' && szSetting[0] != 'M')
@@ -304,7 +304,7 @@ int CSendLater::addJob(const char *szSetting, LPARAM lParam) // check for possible dupes
for (int i = 0; i < m_sendLaterJobList.getCount(); i++) {
CSendLaterJob *p = m_sendLaterJobList[i];
- if (p->hContact == hContact && !strcmp(p->szId, szSetting))
+ if (p->hContact == hContact && !mir_strcmp(p->szId, szSetting))
return 0;
}
diff --git a/plugins/TabSRMM/src/themeio.cpp b/plugins/TabSRMM/src/themeio.cpp index 84739b881a..fe1f0d3f1a 100644 --- a/plugins/TabSRMM/src/themeio.cpp +++ b/plugins/TabSRMM/src/themeio.cpp @@ -144,7 +144,7 @@ static void TSAPI LoadLogfontFromINI(int i, char *szKey, LOGFONTA *lf, COLORREF * filter out font attributes from the message input area font
* (can be disabled by db tweak)
*/
- if (!strcmp(szKey, "Font16") && M.GetByte("inputFontFix", 1) == 1) {
+ if (!mir_strcmp(szKey, "Font16") && M.GetByte("inputFontFix", 1) == 1) {
lf->lfWeight = FW_NORMAL;
lf->lfItalic = 0;
lf->lfUnderline = 0;
@@ -391,7 +391,7 @@ void TSAPI ReadThemeFromINI(const TCHAR *szIniFilenameT, TContainerData *dat, in GetPrivateProfileStringA("Templates", TemplateNames[i], "[undef]", szTemplateBuffer, TEMPLATE_LENGTH * 3, szIniFilename);
- if (strcmp(szTemplateBuffer, "[undef]")) {
+ if (mir_strcmp(szTemplateBuffer, "[undef]")) {
if (dat == 0)
db_set_utf(NULL, TEMPLATES_MODULE, TemplateNames[i], szTemplateBuffer);
decoded = mir_utf8decodeW(szTemplateBuffer);
@@ -404,7 +404,7 @@ void TSAPI ReadThemeFromINI(const TCHAR *szIniFilenameT, TContainerData *dat, in GetPrivateProfileStringA("RTLTemplates", TemplateNames[i], "[undef]", szTemplateBuffer, TEMPLATE_LENGTH * 3, szIniFilename);
- if (strcmp(szTemplateBuffer, "[undef]")) {
+ if (mir_strcmp(szTemplateBuffer, "[undef]")) {
if (dat == 0)
db_set_utf(NULL, RTLTEMPLATES_MODULE, TemplateNames[i], szTemplateBuffer);
decoded = mir_utf8decodeW(szTemplateBuffer);
diff --git a/plugins/TipperYM/src/mir_smileys.cpp b/plugins/TipperYM/src/mir_smileys.cpp index 53cc09fe46..a6ac7e8cd9 100644 --- a/plugins/TipperYM/src/mir_smileys.cpp +++ b/plugins/TipperYM/src/mir_smileys.cpp @@ -315,7 +315,7 @@ SortedList *ReplaceSmileys(const TCHAR *text, int text_size, const char *protoco char smileyProto[64];
if (protocol == NULL)
strncpy(smileyProto, "tipper", sizeof(smileyProto) - 1);
- else if (strcmp(protocol, META_PROTO) == 0)
+ else if (mir_strcmp(protocol, META_PROTO) == 0)
strncpy(smileyProto, "tipper", sizeof(smileyProto) - 1);
else
strncpy(smileyProto, protocol, sizeof(smileyProto) - 1);
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 495957a6ae..f20efb465b 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -337,7 +337,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa int iXstatus = db_get_b(pwd->hContact, szProto, "XStatusId", 0); if (iXstatus) { char szIconProto[64]; - if (strcmp(szProto, META_PROTO) != 0) + if (mir_strcmp(szProto, META_PROTO) != 0) strncpy(szIconProto, szProto, sizeof(szIconProto) - 1); else if (!db_get_s(pwd->hContact, szProto, "XStatusProto", &dbv)) { strncpy(szIconProto, dbv.pszVal, sizeof(szIconProto) - 1); diff --git a/plugins/TipperYM/src/preset_items.cpp b/plugins/TipperYM/src/preset_items.cpp index ba5f179f4d..d6b14e8f38 100644 --- a/plugins/TipperYM/src/preset_items.cpp +++ b/plugins/TipperYM/src/preset_items.cpp @@ -105,7 +105,7 @@ PRESETITEM *GetPresetItemByName(char *szName) {
for (int i = 0; presetItems[i].szID; i++)
{
- if (strcmp(presetItems[i].szID, szName) == 0)
+ if (mir_strcmp(presetItems[i].szID, szName) == 0)
return &presetItems[i];
}
@@ -117,7 +117,7 @@ PRESETSUBST *GetPresetSubstByName(char *szName) if (!szName) return NULL;
for (int i = 0; presetSubsts[i].szID; i++)
{
- if (strcmp(presetSubsts[i].szID, szName) == 0)
+ if (mir_strcmp(presetSubsts[i].szID, szName) == 0)
return &presetSubsts[i];
}
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index 31fa26a4a3..7758845d27 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -217,7 +217,7 @@ TCHAR* GetStatusMessageText(MCONTACT hContact) char *szProto = GetContactProto(hContact); if (szProto) { - if (!strcmp(szProto, META_PROTO)) + if (!mir_strcmp(szProto, META_PROTO)) hContact = db_mc_getMostOnline(hContact); else { WORD wStatus = (int)CallProtoService(szProto, PS_GETSTATUS, 0, 0); @@ -360,7 +360,7 @@ bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff MCONTACT hTmpContact = hContact; char *szProto = GetContactProto(hContact); - if (szProto && !strcmp(szProto, META_PROTO)) { + if (szProto && !mir_strcmp(szProto, META_PROTO)) { iNumber = db_mc_getSubCount(hContact); hTmpContact = db_mc_getSub(hContact, 0); } diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp index ca273e1f13..8ae1171ed2 100644 --- a/plugins/TipperYM/src/tipper.cpp +++ b/plugins/TipperYM/src/tipper.cpp @@ -95,7 +95,7 @@ int ReloadFont(WPARAM wParam, LPARAM lParam) int SettingChanged(WPARAM hContact, LPARAM lParam)
{
DBCONTACTWRITESETTING *dcws = (DBCONTACTWRITESETTING *)lParam;
- if (strcmp(dcws->szModule, "CList") != 0 || strcmp(dcws->szSetting, "State") != 0)
+ if (mir_strcmp(dcws->szModule, "CList") != 0 || mir_strcmp(dcws->szSetting, "State") != 0)
return 0;
// clist hiding
diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp index 85a0473c92..87397c2678 100644 --- a/plugins/TipperYM/src/translations.cpp +++ b/plugins/TipperYM/src/translations.cpp @@ -206,7 +206,7 @@ TCHAR *WordToCountry(MCONTACT hContact, const char *szModuleName, const char *sz WORD cid = (WORD)db_get_w(hContact, szModuleName, szSettingName, (WORD)-1);
if (cid != (WORD)-1 && ServiceExists(MS_UTILS_GETCOUNTRYBYNUMBER) && (szCountryName = (char *)CallService(MS_UTILS_GETCOUNTRYBYNUMBER, cid, 0)) != 0)
{
- if (strcmp(szCountryName, "Unknown") == 0)
+ if (mir_strcmp(szCountryName, "Unknown") == 0)
return 0;
a2t(szCountryName, buff, bufflen);
buff[bufflen - 1] = 0;
diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp index 2ba32960d6..943950fe3d 100644 --- a/plugins/TopToolBar/src/InternalButtons.cpp +++ b/plugins/TopToolBar/src/InternalButtons.cpp @@ -43,18 +43,18 @@ int OnSettingChanging(WPARAM hContact, LPARAM lParam) if (hContact != 0 || dbcws == NULL)
return 0;
- if (!strcmp(dbcws->szModule, "CList")) {
- if (!strcmp(dbcws->szSetting, "HideOffline"))
+ if (!mir_strcmp(dbcws->szModule, "CList")) {
+ if (!mir_strcmp(dbcws->szSetting, "HideOffline"))
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_OFFLINE].hButton, dbcws->value.bVal ? 0 : TTBST_PUSHED);
- else if (!strcmp(dbcws->szSetting, "UseGroups"))
+ else if (!mir_strcmp(dbcws->szSetting, "UseGroups"))
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_GROUPS].hButton, dbcws->value.bVal ? TTBST_PUSHED : 0);
}
- else if (!strcmp(dbcws->szModule, "Skin")) {
- if (!strcmp(dbcws->szSetting, "UseSound"))
+ else if (!mir_strcmp(dbcws->szModule, "Skin")) {
+ if (!mir_strcmp(dbcws->szSetting, "UseSound"))
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_SOUNDS].hButton, dbcws->value.bVal ? TTBST_PUSHED : 0);
}
- else if (!strcmp(dbcws->szModule, "MetaContacts")) {
- if (!strcmp(dbcws->szSetting, "Enabled"))
+ else if (!mir_strcmp(dbcws->szModule, "MetaContacts")) {
+ if (!mir_strcmp(dbcws->szSetting, "Enabled"))
CallService(MS_TTB_SETBUTTONSTATE, (WPARAM)stdButtons[INDEX_META].hButton, dbcws->value.bVal ? TTBST_PUSHED : 0);
}
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index 724dba4b04..ab630faea8 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -357,7 +357,7 @@ int TrafficRecv(WPARAM wParam,LPARAM lParam) if (nln->result > 0)
for (i = 0; i < NumberOfAccounts; i++)
- if (!strcmp(ProtoList[i].name, nlu->szSettingsModule))
+ if (!mir_strcmp(ProtoList[i].name, nlu->szSettingsModule))
InterlockedExchangeAdd(&ProtoList[i].AllStatistics[ProtoList[i].NumberOfRecords-1].Incoming, nln->result);
return 0;
}
@@ -370,7 +370,7 @@ int TrafficSend(WPARAM wParam,LPARAM lParam) if (nln->result > 0)
for (i = 0; i < NumberOfAccounts; i++)
- if (!strcmp(ProtoList[i].name, nlu->szSettingsModule))
+ if (!mir_strcmp(ProtoList[i].name, nlu->szSettingsModule))
InterlockedExchangeAdd(&ProtoList[i].AllStatistics[ProtoList[i].NumberOfRecords-1].Outgoing, nln->result);
return 0;
}
@@ -1225,7 +1225,7 @@ int ProtocolAckHook(WPARAM wParam,LPARAM lParam) for (i = 0; i < NumberOfAccounts; i++)
{
if (!ProtoList[i].name) continue;
- if (!strcmp(ProtoList[i].name, pAck->szModule))
+ if (!mir_strcmp(ProtoList[i].name, pAck->szModule))
{
ProtocolIsOffLine(i);
break;
@@ -1237,7 +1237,7 @@ int ProtocolAckHook(WPARAM wParam,LPARAM lParam) if ((pAck->lParam >= ID_STATUS_ONLINE) && (pAck->lParam <= ID_STATUS_OUTTOLUNCH))
{
for (i = 0; i < NumberOfAccounts; i++)
- if (!strcmp(ProtoList[i].name, pAck->szModule))
+ if (!mir_strcmp(ProtoList[i].name, pAck->szModule))
{
ProtocolIsOnLine(i);
break;
@@ -1313,7 +1313,7 @@ int OnAccountsListChange(WPARAM wParam, LPARAM lParam) case PRAC_CHANGED:
case PRAC_CHECKED:
for (i = 0; i < NumberOfAccounts; i++)
- if (!strcmp(acc->szModuleName, ProtoList[i].name))
+ if (!mir_strcmp(acc->szModuleName, ProtoList[i].name))
ProtoList[i].Enabled = acc->bIsEnabled;
break;
}
diff --git a/plugins/UserInfoEx/src/commonheaders.h b/plugins/UserInfoEx/src/commonheaders.h index 940553dac9..2348a06b5d 100644 --- a/plugins/UserInfoEx/src/commonheaders.h +++ b/plugins/UserInfoEx/src/commonheaders.h @@ -89,7 +89,7 @@ using namespace std; * UserInfoEx plugin includes and macros
***********************************************************************************************************/
-#pragma intrinsic(memcmp, memcpy, memset, strcmp, mir_strlen)
+#pragma intrinsic(memcmp, memcpy, memset, mir_strcmp, mir_strlen)
#ifndef MIR_OK
#define MIR_OK 0 // success value of a miranda service function
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp index 0e409bc24a..d73bcd334a 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp @@ -498,7 +498,7 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) MIR_FREE(_pszUIDKey);
// is contact a metacontact
- if (_pszAMPro && !strcmp(_pszAMPro, META_PROTO)) {
+ if (_pszAMPro && !mir_strcmp(_pszAMPro, META_PROTO)) {
TiXmlElement *xSub;
proto(META_PROTO);
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp index 39ffd48918..8dff63f5d4 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp @@ -1160,13 +1160,13 @@ BYTE CVCardFileVCF::Import() }
switch (*szEnt) {
case 'A':
- if (!strcmp(szEnt, "ABOUT")) {
+ if (!mir_strcmp(szEnt, "ABOUT")) {
_clVal.DBWriteSettingString(_hContact, USERINFO, SET_CONTACT_ABOUT);
continue;
}
- if (!strcmp(szEnt, "ADR")) {
+ if (!mir_strcmp(szEnt, "ADR")) {
if (!pszParam) continue;
- if (!strcmp(pszParam, "HOME")) {
+ if (!mir_strcmp(pszParam, "HOME")) {
_clVal.GetTokenFirst(';', NULL);
_clVal.GetTokenNext(';', NULL);
_clVal.DBWriteTokenNext(_hContact, USERINFO, SET_CONTACT_STREET, ';');
@@ -1176,7 +1176,7 @@ BYTE CVCardFileVCF::Import() _clVal.DBWriteTokenNext(_hContact, USERINFO, SET_CONTACT_COUNTRY, ';');
continue;
}
- if (!strcmp(pszParam, "WORK")) {
+ if (!mir_strcmp(pszParam, "WORK")) {
_clVal.GetTokenFirst(';', NULL);
_clVal.DBWriteTokenNext(_hContact, USERINFO, SET_CONTACT_COMPANY_OFFICE, ';');
_clVal.DBWriteTokenNext(_hContact, USERINFO, SET_CONTACT_COMPANY_STREET, ';');
@@ -1186,7 +1186,7 @@ BYTE CVCardFileVCF::Import() _clVal.DBWriteTokenNext(_hContact, USERINFO, SET_CONTACT_COMPANY_COUNTRY, ';');
continue;
}
- if (!strcmp(pszParam, "POSTAL")) {
+ if (!mir_strcmp(pszParam, "POSTAL")) {
_clVal.GetTokenFirst(';', NULL);
_clVal.GetTokenNext(';', NULL);
_clVal.DBWriteTokenNext(_hContact, USERINFO, SET_CONTACT_ORIGIN_STREET, ';');
@@ -1199,7 +1199,7 @@ BYTE CVCardFileVCF::Import() continue;
case 'B':
- if (!strcmp(szEnt, "BDAY")) {
+ if (!mir_strcmp(szEnt, "BDAY")) {
if (_clVal.GetLength() == 8) {
CHAR buf[5];
@@ -1217,7 +1217,7 @@ BYTE CVCardFileVCF::Import() continue;
case 'E':
- if (!strcmp(szEnt, "EMAIL")) {
+ if (!mir_strcmp(szEnt, "EMAIL")) {
if (!pszParam || !strstr(pszParam, "intERNET"))
continue;
if (strstr(pszParam, "PREF")) {
@@ -1236,7 +1236,7 @@ BYTE CVCardFileVCF::Import() continue;
/*
case 'I':
- if (!strcmp(szEnt, "IM")) {
+ if (!mir_strcmp(szEnt, "IM")) {
LPSTR pszModule, pszSetting;
if (pszParam && (pszModule = strtok(pszParam, DELIM)) && (pszSetting = strtok(NULL, DELIM)))
@@ -1245,7 +1245,7 @@ BYTE CVCardFileVCF::Import() continue;
*/
case 'N':
- if (!strcmp(szEnt, "N")) {
+ if (!mir_strcmp(szEnt, "N")) {
_clVal.DBWriteTokenFirst(_hContact, USERINFO, SET_CONTACT_LASTNAME, ';');
_clVal.DBWriteTokenNext(_hContact, USERINFO, SET_CONTACT_FIRSTNAME, ';');
_clVal.DBWriteTokenNext(_hContact, USERINFO, SET_CONTACT_SECONDNAME, ';');
@@ -1253,58 +1253,58 @@ BYTE CVCardFileVCF::Import() _clVal.DBWriteTokenNext(_hContact, USERINFO, SET_CONTACT_PREFIX, ';');
continue;
}
- if (!strcmp(szEnt, "NICKNAME")) {
+ if (!mir_strcmp(szEnt, "NICKNAME")) {
_clVal.DBWriteSettingString(_hContact, USERINFO, SET_CONTACT_NICK);
continue;
}
- if (!strcmp(szEnt, "NOTE")) {
+ if (!mir_strcmp(szEnt, "NOTE")) {
_clVal.DBWriteSettingString(_hContact, USERINFO, SET_CONTACT_MYNOTES);
}
continue;
case 'O':
- if (!strcmp(szEnt, "ORG")) {
+ if (!mir_strcmp(szEnt, "ORG")) {
_clVal.DBWriteTokenFirst(_hContact, USERINFO, SET_CONTACT_COMPANY, ';');
_clVal.DBWriteTokenNext(_hContact, USERINFO, SET_CONTACT_COMPANY_DEPARTMENT, ';');
}
continue;
case 'R':
- if (!strcmp(szEnt, "ROLE")) {
+ if (!mir_strcmp(szEnt, "ROLE")) {
_clVal.DBWriteSettingString(_hContact, USERINFO, SET_CONTACT_COMPANY_OCCUPATION);
}
continue;
case 'T':
- if (!strcmp(szEnt, "TITLE")) {
+ if (!mir_strcmp(szEnt, "TITLE")) {
_clVal.DBWriteSettingString(_hContact, USERINFO, SET_CONTACT_COMPANY_POSITION);
continue;
}
- if (!strcmp(szEnt, "TEL")) {
+ if (!mir_strcmp(szEnt, "TEL")) {
if (!pszParam) continue;
- if (!strcmp(pszParam, "HOME;VOICE")) {
+ if (!mir_strcmp(pszParam, "HOME;VOICE")) {
_clVal.DBWriteSettingString(_hContact, USERINFO, SET_CONTACT_PHONE);
continue;
}
- if (!strcmp(pszParam, "HOME;FAX")) {
+ if (!mir_strcmp(pszParam, "HOME;FAX")) {
_clVal.DBWriteSettingString(_hContact, USERINFO, SET_CONTACT_FAX);
continue;
}
- if (!strcmp(pszParam, "CELL;VOICE")) {
+ if (!mir_strcmp(pszParam, "CELL;VOICE")) {
_clVal.DBWriteSettingString(_hContact, USERINFO, SET_CONTACT_CELLULAR);
continue;
}
- if (!strcmp(pszParam, "WORK;VOICE")) {
+ if (!mir_strcmp(pszParam, "WORK;VOICE")) {
_clVal.DBWriteSettingString(_hContact, USERINFO, SET_CONTACT_COMPANY_PHONE);
continue;
}
- if (!strcmp(pszParam, "WORK;FAX")) {
+ if (!mir_strcmp(pszParam, "WORK;FAX")) {
_clVal.DBWriteSettingString(_hContact, USERINFO, SET_CONTACT_COMPANY_FAX);
continue;
}
- if (!strcmp(pszParam, "PAGER;VOICE")) {
+ if (!mir_strcmp(pszParam, "PAGER;VOICE")) {
_clVal.DBWriteSettingString(_hContact, USERINFO, SET_CONTACT_COMPANY_CELLULAR);
continue;
}
@@ -1312,25 +1312,25 @@ BYTE CVCardFileVCF::Import() continue;
case 'U':
- if (!strcmp(szEnt, "URL")) {
+ if (!mir_strcmp(szEnt, "URL")) {
if (!pszParam) continue;
- if (!strcmp(pszParam, "HOME")) {
+ if (!mir_strcmp(pszParam, "HOME")) {
_clVal.DBWriteSettingString(_hContact, USERINFO, SET_CONTACT_HOMEPAGE);
continue;
}
- if (!strcmp(pszParam, "WORK")) {
+ if (!mir_strcmp(pszParam, "WORK")) {
_clVal.DBWriteSettingString(_hContact, USERINFO, SET_CONTACT_COMPANY_HOMEPAGE);
}
}
continue;
case 'X':
- if (!strcmp(szEnt, "X-WAB-GENDER")) {
- if (!strcmp(_clVal.GetBuffer(), "1"))
+ if (!mir_strcmp(szEnt, "X-WAB-GENDER")) {
+ if (!mir_strcmp(_clVal.GetBuffer(), "1"))
db_set_b(_hContact, USERINFO, SET_CONTACT_GENDER, 'F');
- else if (!strcmp(_clVal.GetBuffer(), "2"))
+ else if (!mir_strcmp(_clVal.GetBuffer(), "2"))
db_set_b(_hContact, USERINFO, SET_CONTACT_GENDER, 'M');
}
continue;
diff --git a/plugins/UserInfoEx/src/ex_import/tinystr.h b/plugins/UserInfoEx/src/ex_import/tinystr.h index 9c66f2b7e9..2658a4f639 100644 --- a/plugins/UserInfoEx/src/ex_import/tinystr.h +++ b/plugins/UserInfoEx/src/ex_import/tinystr.h @@ -262,11 +262,11 @@ class TiXmlString inline bool operator == (const TiXmlString & a, const TiXmlString & b) { return (a.length() == b.length()) // optimization on some platforms - && (strcmp(a.c_str(), b.c_str()) == 0); // actual compare + && (mir_strcmp(a.c_str(), b.c_str()) == 0); // actual compare } inline bool operator < (const TiXmlString & a, const TiXmlString & b) { - return strcmp(a.c_str(), b.c_str()) < 0; + return mir_strcmp(a.c_str(), b.c_str()) < 0; } inline bool operator != (const TiXmlString & a, const TiXmlString & b) { return !(a == b); } @@ -274,7 +274,7 @@ inline bool operator > (const TiXmlString & a, const TiXmlString & b) { return b inline bool operator <= (const TiXmlString & a, const TiXmlString & b) { return !(b < a); } inline bool operator >= (const TiXmlString & a, const TiXmlString & b) { return !(a < b); } -inline bool operator == (const TiXmlString & a, const char* b) { return strcmp(a.c_str(), b) == 0; } +inline bool operator == (const TiXmlString & a, const char* b) { return mir_strcmp(a.c_str(), b) == 0; } inline bool operator == (const char* a, const TiXmlString & b) { return b == a; } inline bool operator != (const TiXmlString & a, const char* b) { return !(a == b); } inline bool operator != (const char* a, const TiXmlString & b) { return !(b == a); } diff --git a/plugins/UserInfoEx/src/ex_import/tinyxml.cpp b/plugins/UserInfoEx/src/ex_import/tinyxml.cpp index 2c815d536c..2692a3196f 100644 --- a/plugins/UserInfoEx/src/ex_import/tinyxml.cpp +++ b/plugins/UserInfoEx/src/ex_import/tinyxml.cpp @@ -357,7 +357,7 @@ const TiXmlNode* TiXmlNode::FirstChild(const char * _value) const const TiXmlNode* node;
for (node = firstChild; node; node = node->next)
{
- if (strcmp(node->Value(), _value) == 0)
+ if (mir_strcmp(node->Value(), _value) == 0)
return node;
}
return 0;
@@ -369,7 +369,7 @@ TiXmlNode* TiXmlNode::FirstChild(const char * _value) TiXmlNode* node;
for (node = firstChild; node; node = node->next)
{
- if (strcmp(node->Value(), _value) == 0)
+ if (mir_strcmp(node->Value(), _value) == 0)
return node;
}
return 0;
@@ -381,7 +381,7 @@ const TiXmlNode* TiXmlNode::LastChild(const char * _value) const const TiXmlNode* node;
for (node = lastChild; node; node = node->prev)
{
- if (strcmp(node->Value(), _value) == 0)
+ if (mir_strcmp(node->Value(), _value) == 0)
return node;
}
return 0;
@@ -392,7 +392,7 @@ TiXmlNode* TiXmlNode::LastChild(const char * _value) TiXmlNode* node;
for (node = lastChild; node; node = node->prev)
{
- if (strcmp(node->Value(), _value) == 0)
+ if (mir_strcmp(node->Value(), _value) == 0)
return node;
}
return 0;
@@ -455,7 +455,7 @@ const TiXmlNode* TiXmlNode::NextSibling(const char * _value) const const TiXmlNode* node;
for (node = next; node; node = node->next)
{
- if (strcmp(node->Value(), _value) == 0)
+ if (mir_strcmp(node->Value(), _value) == 0)
return node;
}
return 0;
@@ -466,7 +466,7 @@ TiXmlNode* TiXmlNode::NextSibling(const char * _value) TiXmlNode* node;
for (node = next; node; node = node->next)
{
- if (strcmp(node->Value(), _value) == 0)
+ if (mir_strcmp(node->Value(), _value) == 0)
return node;
}
return 0;
@@ -477,7 +477,7 @@ const TiXmlNode* TiXmlNode::PreviousSibling(const char * _value) const const TiXmlNode* node;
for (node = prev; node; node = node->prev)
{
- if (strcmp(node->Value(), _value) == 0)
+ if (mir_strcmp(node->Value(), _value) == 0)
return node;
}
return 0;
@@ -488,7 +488,7 @@ TiXmlNode* TiXmlNode::PreviousSibling(const char * _value) TiXmlNode* node;
for (node = prev; node; node = node->prev)
{
- if (strcmp(node->Value(), _value) == 0)
+ if (mir_strcmp(node->Value(), _value) == 0)
return node;
}
return 0;
diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp index 972e9790ba..59e8db3473 100644 --- a/plugins/UserInfoEx/src/mir_db.cpp +++ b/plugins/UserInfoEx/src/mir_db.cpp @@ -732,7 +732,7 @@ int CEnumList::CompareProc(LPCSTR p1, LPCSTR p2) {
if (p1) {
if (p2)
- return strcmp(p1, p2);
+ return mir_strcmp(p1, p2);
return 1;
}
diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp index edeb7e472c..741ceb6fd7 100644 --- a/plugins/UserInfoEx/src/psp_profile.cpp +++ b/plugins/UserInfoEx/src/psp_profile.cpp @@ -527,7 +527,7 @@ static int ProfileList_AddItemlistFromDB( continue;
break;
case DBVT_ASCIIZ:
- if (strcmp(dbvCat.pszVal, idList[j].pszText))
+ if (mir_strcmp(dbvCat.pszVal, idList[j].pszText))
continue;
break;
}
diff --git a/plugins/UserInfoEx/src/svc_constants.cpp b/plugins/UserInfoEx/src/svc_constants.cpp index 9cd745643a..240d6ae1b8 100644 --- a/plugins/UserInfoEx/src/svc_constants.cpp +++ b/plugins/UserInfoEx/src/svc_constants.cpp @@ -277,7 +277,7 @@ static void SvcConstantsTranslateList(LPIDSTRLIST pList, UINT nListCount/*, Sort pList[i].ptszTranslated = (LPTSTR)CallService(MS_LANGPACK_PCHARTOTCHAR, 0, (LPARAM)pList[i].pszText);
}
// Ignore last item, if it is a "Other" item.
- if (!strcmp(pList[nListCount-1].pszText, LPGEN("Other"))) nListCount--;
+ if (!mir_strcmp(pList[nListCount-1].pszText, LPGEN("Other"))) nListCount--;
// Sort list according translated text and ignore first item.
qsort(pList+1, nListCount-1, sizeof(pList[0]),
diff --git a/plugins/UserInfoEx/src/svc_phone.cpp b/plugins/UserInfoEx/src/svc_phone.cpp index f43e0a48c4..130976526b 100644 --- a/plugins/UserInfoEx/src/svc_phone.cpp +++ b/plugins/UserInfoEx/src/svc_phone.cpp @@ -109,10 +109,10 @@ static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdb {
if (hContact && pdbcws && pdbcws->szSetting &&
((pdbcws->value.type & DBVTF_VARIABLELENGTH) || (pdbcws->value.type == DBVT_DELETED)) &&
- (!strcmp(pdbcws->szSetting, SET_CONTACT_PHONE) ||
- !strcmp(pdbcws->szSetting, SET_CONTACT_CELLULAR) ||
- !strcmp(pdbcws->szSetting, SET_CONTACT_COMPANY_PHONE) ||
- !strcmp(pdbcws->szSetting, SET_CONTACT_COMPANY_CELLULAR) ||
+ (!mir_strcmp(pdbcws->szSetting, SET_CONTACT_PHONE) ||
+ !mir_strcmp(pdbcws->szSetting, SET_CONTACT_CELLULAR) ||
+ !mir_strcmp(pdbcws->szSetting, SET_CONTACT_COMPANY_PHONE) ||
+ !mir_strcmp(pdbcws->szSetting, SET_CONTACT_COMPANY_CELLULAR) ||
!strncmp(pdbcws->szSetting, "MyPhone0", 8)))
OnCListApplyIcons(hContact, 0);
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp index 04f54a39b7..4c0f839e5a 100644 --- a/plugins/UserInfoEx/src/svc_reminder.cpp +++ b/plugins/UserInfoEx/src/svc_reminder.cpp @@ -657,7 +657,7 @@ static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdb CEvent evt;
MTime now;
now.GetLocalTime();
- if (!strcmp(pdbcws->szModule, SvcReminderGetMyBirthdayModule())) {
+ if (!mir_strcmp(pdbcws->szModule, SvcReminderGetMyBirthdayModule())) {
WORD LastAnswer = IDNONE;
CheckContact(hContact, now, evt, FALSE, &LastAnswer);
}
diff --git a/plugins/Variables/docs/Variables.txt b/plugins/Variables/docs/Variables.txt index af25cbf0fa..2e067ee1e7 100644 --- a/plugins/Variables/docs/Variables.txt +++ b/plugins/Variables/docs/Variables.txt @@ -305,7 +305,7 @@ Generates a for-loop; w will be initialized, x specifies the condition on which y will be executed and z will be shown.
Example:
-!for(!puts(i,0),!not(!strcmp(!get(i),3)),!puts(i,!add(!get(i),1)),i=!get(i)!crlf())
+!for(!puts(i,0),!not(!mir_strcmp(!get(i),3)),!puts(i,!add(!get(i),1)),i=!get(i)!crlf())
--- Notes ---
@@ -343,7 +343,7 @@ Example: # get the number of contacts with the display name "Marley"
!puts(count,!ccount(`Marley`,display))
# loop through these contacts, for each of them, show the e-mail address
-!for(!puts(n,0),!not(!strcmp(!get(n),!get(count))),!puts(n,!add(!get(n),1)),!cinfo(!contact(`Marley`,`display`,!add(!get(n),1)),email))
+!for(!puts(n,0),!not(!mir_strcmp(!get(n),!get(count))),!puts(n,!add(!get(n),1)),!cinfo(!contact(`Marley`,`display`,!add(!get(n),1)),email))
In case the z argument is used, y can be any property of the cinfo
function. Z can be 'r' to get a random contact.
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp index cbb70481bc..40b0bf6f3c 100644 --- a/plugins/Variables/src/contact.cpp +++ b/plugins/Variables/src/contact.cpp @@ -369,13 +369,13 @@ static int contactSettingChanged(WPARAM hContact, LPARAM lParam) continue;
char *uid = (char*)CallProtoService(szProto,PS_GETCAPS,PFLAG_UNIQUEIDSETTING,0);
- if (((!strcmp(dbw->szSetting, "Nick")) && (cce[i].flags & CI_NICK)) ||
- ((!strcmp(dbw->szSetting, "FirstName")) && (cce[i].flags & CI_FIRSTNAME)) ||
- ((!strcmp(dbw->szSetting, "LastName")) && (cce[i].flags & CI_LASTNAME)) ||
- ((!strcmp(dbw->szSetting, "e-mail")) && (cce[i].flags & CI_EMAIL)) ||
- ((!strcmp(dbw->szSetting, "MyHandle")) && (cce[i].flags & CI_LISTNAME)) ||
+ if (((!mir_strcmp(dbw->szSetting, "Nick")) && (cce[i].flags & CI_NICK)) ||
+ ((!mir_strcmp(dbw->szSetting, "FirstName")) && (cce[i].flags & CI_FIRSTNAME)) ||
+ ((!mir_strcmp(dbw->szSetting, "LastName")) && (cce[i].flags & CI_LASTNAME)) ||
+ ((!mir_strcmp(dbw->szSetting, "e-mail")) && (cce[i].flags & CI_EMAIL)) ||
+ ((!mir_strcmp(dbw->szSetting, "MyHandle")) && (cce[i].flags & CI_LISTNAME)) ||
(cce[i].flags & CI_CNFINFO) != 0 || // lazy; always invalidate CNF info cache entries
- (( ((INT_PTR)uid != CALLSERVICE_NOTFOUND) && (uid != NULL)) && (!strcmp(dbw->szSetting, uid)) && (cce[i].flags & CI_UNIQUEID)))
+ (( ((INT_PTR)uid != CALLSERVICE_NOTFOUND) && (uid != NULL)) && (!mir_strcmp(dbw->szSetting, uid)) && (cce[i].flags & CI_UNIQUEID)))
{
/* remove from cache */
mir_free(cce[i].tszContact);
diff --git a/plugins/Variables/src/parse_str.h b/plugins/Variables/src/parse_str.h index cab3c017bc..05f14d81c2 100644 --- a/plugins/Variables/src/parse_str.h +++ b/plugins/Variables/src/parse_str.h @@ -43,7 +43,7 @@ #define MIR_STRCHR _T("strchr")
#define MIR_STRRCHR _T("strrchr")
#define MIR_STRSTR _T("strstr")
-#define MIR_STRCMP _T("strcmp")
+#define MIR_STRCMP _T("mir_strcmp")
#define MIR_STRNCMP _T("strncmp")
#define MIR_STRMCMP _T("strmcmp")
#define MIR_STRICMP _T("stricmp")
diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp index 1949517426..abe63173db 100644 --- a/plugins/Weather/src/weather_contacts.cpp +++ b/plugins/Weather/src/weather_contacts.cpp @@ -477,5 +477,5 @@ int ContactDeleted(WPARAM wParam, LPARAM lParam) BOOL IsMyContact(MCONTACT hContact)
{
const char* szProto = GetContactProto(hContact);
- return szProto != NULL && strcmp(WEATHERPROTONAME, szProto) == 0;
+ return szProto != NULL && mir_strcmp(WEATHERPROTONAME, szProto) == 0;
}
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp index deb04358ec..1908fe3115 100644 --- a/plugins/Weather/src/weather_data.cpp +++ b/plugins/Weather/src/weather_data.cpp @@ -448,7 +448,7 @@ void DBDataManage(MCONTACT hContact, WORD Mode, WPARAM wParam, LPARAM lParam) case WDBM_DETAILDISPLAY:
// skip the "WeatherInfo" variable
- if (!strcmp(szSetting, "WeatherInfo") || !strcmp(szSetting, "Ignore") || szSetting[0] == '#')
+ if (!mir_strcmp(szSetting, "WeatherInfo") || !mir_strcmp(szSetting, "Ignore") || szSetting[0] == '#')
continue;
HWND hList = GetDlgItem((HWND)wParam, IDC_DATALIST);
diff --git a/plugins/Weather/src/weather_icons.cpp b/plugins/Weather/src/weather_icons.cpp index 5cc7f5b907..85884aa983 100644 --- a/plugins/Weather/src/weather_icons.cpp +++ b/plugins/Weather/src/weather_icons.cpp @@ -52,7 +52,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) == 0)
+ if (mir_strcmp(iconList[i].szName, name) == 0)
return iconList[i].hIcolib;
return NULL;
diff --git a/plugins/Weather/src/weather_ini.cpp b/plugins/Weather/src/weather_ini.cpp index 7c69dc38f4..0d0678fd15 100644 --- a/plugins/Weather/src/weather_ini.cpp +++ b/plugins/Weather/src/weather_ini.cpp @@ -257,19 +257,19 @@ void LoadStationData(TCHAR *pszFile, TCHAR *pszShortFile, WIDATA *Data) TrimString(Line);
// make sure it is a valid weather protocol ini file
- if ( !strcmp(Line, "[Weather 0.3.x Update Data]"))
+ if ( !mir_strcmp(Line, "[Weather 0.3.x Update Data]"))
Data->InternalVer = 1;
- else if ( !strcmp(Line, "[Weather 0.3.x Update Data 1.1]"))
+ else if ( !mir_strcmp(Line, "[Weather 0.3.x Update Data 1.1]"))
Data->InternalVer = 2;
- else if ( !strcmp(Line, "[Weather 0.3.x Update Data 1.1a]"))
+ else if ( !mir_strcmp(Line, "[Weather 0.3.x Update Data 1.1a]"))
Data->InternalVer = 3;
- else if ( !strcmp(Line, "[Weather 0.3.x Update Data 1.2]"))
+ else if ( !mir_strcmp(Line, "[Weather 0.3.x Update Data 1.2]"))
Data->InternalVer = 4;
- else if ( !strcmp(Line, "[Weather 0.3.x Update Data 1.3]"))
+ else if ( !mir_strcmp(Line, "[Weather 0.3.x Update Data 1.3]"))
Data->InternalVer = 5;
- else if ( !strcmp(Line, "[Weather 0.3.x Update Data 1.4]"))
+ else if ( !mir_strcmp(Line, "[Weather 0.3.x Update Data 1.4]"))
Data->InternalVer = 6;
- else if ( !strcmp(Line, "[Weather 0.3.x Update Data 1.5]"))
+ else if ( !mir_strcmp(Line, "[Weather 0.3.x Update Data 1.5]"))
Data->InternalVer = 7;
else
{
diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp index 998ec84c8b..2dae6b0c4e 100644 --- a/plugins/WebView/src/webview_services.cpp +++ b/plugins/WebView/src/webview_services.cpp @@ -37,15 +37,15 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam) return 0; DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam; - if (!strcmp(cws->szModule, "CList")) { + if (!mir_strcmp(cws->szModule, "CList")) { int invalidpresent = 0; char *szProto = GetContactProto(hContact); - if (szProto == NULL || strcmp(szProto, MODULENAME)) + if (szProto == NULL || mir_strcmp(szProto, MODULENAME)) return 0; // A contact is renamed - if (!strcmp(cws->szSetting, "MyHandle")) { + if (!mir_strcmp(cws->szSetting, "MyHandle")) { ptrT oldName( db_get_tsa(hContact, MODULENAME, PRESERVE_NAME_KEY)); if (oldName == NULL) return 0; diff --git a/plugins/WhenWasIt/src/hooked_events.cpp b/plugins/WhenWasIt/src/hooked_events.cpp index 84519887e3..7ad4b7a7c8 100644 --- a/plugins/WhenWasIt/src/hooked_events.cpp +++ b/plugins/WhenWasIt/src/hooked_events.cpp @@ -59,7 +59,7 @@ static int OnContactSettingChanged(WPARAM hContact, LPARAM lParam) {
DBCONTACTWRITESETTING *dw = (DBCONTACTWRITESETTING *)lParam;
DBVARIANT dv = dw->value;
- if ((strcmp(dw->szModule, DUMMY_MODULE) == 0) && (strcmp(dw->szSetting, DUMMY_SETTING) == 0))
+ if ((mir_strcmp(dw->szModule, DUMMY_MODULE) == 0) && (mir_strcmp(dw->szSetting, DUMMY_SETTING) == 0))
RefreshContactListIcons(hContact);
return 0;
diff --git a/plugins/YAMN/src/account.cpp b/plugins/YAMN/src/account.cpp index 590c812355..db7ce8166b 100644 --- a/plugins/YAMN/src/account.cpp +++ b/plugins/YAMN/src/account.cpp @@ -1006,7 +1006,7 @@ INT_PTR FindAccountByNameSvc(WPARAM wParam, LPARAM lParam) DebugLog(SynchroFile,"FindAccountByName:AccountBrowserSO-read enter\n"); #endif for (Finder = Plugin->FirstAccount; Finder != NULL; Finder = Finder->Next) - if ((Finder->Name != NULL) && (0 == strcmp(SearchedAccount, Finder->Name))) + if ((Finder->Name != NULL) && (0 == mir_strcmp(SearchedAccount, Finder->Name))) break; #ifdef DEBUG_SYNCHRO DebugLog(SynchroFile,"FindAccountByName:AccountBrowserSO-read done\n"); diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp index e15d71731d..ece3465f5f 100644 --- a/plugins/YAMN/src/browser/mailbrowser.cpp +++ b/plugins/YAMN/src/browser/mailbrowser.cpp @@ -1214,7 +1214,7 @@ int CALLBACK ListViewCompareProc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSo str2 = Header2.From; else str2 = Header2.FromNick; - nResult = strcmp(str1, str2); + nResult = mir_strcmp(str1, str2); if (bFrom) nResult = -nResult; break; @@ -1227,7 +1227,7 @@ int CALLBACK ListViewCompareProc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSo str2 = " "; else str2 = Header2.Subject; - nResult = strcmp(str1, str2); + nResult = mir_strcmp(str1, str2); if (bSub) nResult = -nResult; break; @@ -1258,7 +1258,7 @@ int CALLBACK ListViewCompareProc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSo if (Header2.Subject == NULL) str2 = " "; else str2 = Header2.Subject; - nResult = strcmp(str1, str2); + nResult = mir_strcmp(str1, str2); break; } //MessageBox(NULL,str1,str2,0); @@ -1390,7 +1390,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg, UINT msg, WPARAM wParam, LPAR Subj = new WCHAR[wcslen(str2) + 1]; wcscpy(Subj, str2); } - //if (!hasBody) if (!strcmp(Header->name,"Body")) hasBody = true; + //if (!hasBody) if (!mir_strcmp(Header->name,"Body")) hasBody = true; int count = 0; WCHAR **split = 0; int ofs = 0; while (str2[ofs]) { diff --git a/plugins/YAMN/src/mails/decode.cpp b/plugins/YAMN/src/mails/decode.cpp index f2a0837e7b..6ca2a0238b 100644 --- a/plugins/YAMN/src/mails/decode.cpp +++ b/plugins/YAMN/src/mails/decode.cpp @@ -229,7 +229,7 @@ int GetCharsetFromString(char *input,size_t size) for (int i=0;i<CPLENALL;i++) {
size_t len = mir_strlen(CodePageNamesAll[i].NameBase);
if (0==strncmp(pout,CodePageNamesAll[i].NameBase,len)) {
- if (0==strcmp(pout+len,CodePageNamesAll[i].NameSub)) {
+ if (0==mir_strcmp(pout+len,CodePageNamesAll[i].NameSub)) {
delete[] pout;
return CodePageNamesAll[i].CP;
}
diff --git a/plugins/YAMN/src/mails/mails.cpp b/plugins/YAMN/src/mails/mails.cpp index 53d7d54535..9114c061e1 100644 --- a/plugins/YAMN/src/mails/mails.cpp +++ b/plugins/YAMN/src/mails/mails.cpp @@ -252,7 +252,7 @@ void WINAPI SynchroMessagesFcn(HACCOUNT Account,HYAMNMAIL *OldQueue,HYAMNMAIL *R if (Parser->ID==NULL) //simply ignore the message, that has not filled its ID
continue;
- if (0==strcmp(Parser->ID,Finder->ID)) //search for equal message in new queue
+ if (0==mir_strcmp(Parser->ID,Finder->ID)) //search for equal message in new queue
break;
}
if (Parser != NULL) //found equal message in new queue
diff --git a/plugins/YAMN/src/proto/pop3/pop3comm.cpp b/plugins/YAMN/src/proto/pop3/pop3comm.cpp index 4bebbbbd91..d67712eb0a 100644 --- a/plugins/YAMN/src/proto/pop3/pop3comm.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3comm.cpp @@ -286,7 +286,7 @@ int RegisterPOP3Plugin(WPARAM, LPARAM) Finder->hContact = NULL;
for (MCONTACT hContact = db_find_first(YAMN_DBMODULE); hContact; hContact = db_find_next(hContact, YAMN_DBMODULE)) {
if (!db_get_s(hContact, YAMN_DBMODULE, "Id", &dbv)) {
- if (strcmp(dbv.pszVal, Finder->Name) == 0) {
+ if (mir_strcmp(dbv.pszVal, Finder->Name) == 0) {
Finder->hContact = hContact;
db_set_w(Finder->hContact, YAMN_DBMODULE, "Status", ID_STATUS_ONLINE);
db_set_s(Finder->hContact, "CList", "StatusMsg", Translate("No new mail message"));
@@ -711,7 +711,7 @@ DWORD WINAPI SynchroPOP3(struct CheckParam * WhichTemp) if (MsgQueuePtr->Flags&YAMN_MSG_BODYREQUESTED) {
HYAMNMAIL NewMsgsPtr = NULL;
for (NewMsgsPtr = (HYAMNMAIL)NewMails; NewMsgsPtr != NULL; NewMsgsPtr = NewMsgsPtr->Next) {
- if (!strcmp(MsgQueuePtr->ID, NewMsgsPtr->ID)) {
+ if (!mir_strcmp(MsgQueuePtr->ID, NewMsgsPtr->ID)) {
TCHAR accstatus[512];
mir_sntprintf(accstatus, SIZEOF(accstatus), TranslateT("Reading body %s"), NewMsgsPtr->ID);
SetAccountStatus(ActualAccount, accstatus);
diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp index fd9454bb82..7bda806525 100644 --- a/plugins/YAPP/src/services.cpp +++ b/plugins/YAPP/src/services.cpp @@ -383,7 +383,7 @@ static INT_PTR CreateClassPopup(WPARAM wParam, LPARAM lParam) pc = (POPUPCLASS *)wParam;
else {
for (int i = 0; i < arClasses.getCount(); i++) {
- if (strcmp(arClasses[i]->pszName, pdc->pszClassName) == 0) {
+ if (mir_strcmp(arClasses[i]->pszName, pdc->pszClassName) == 0) {
pc = arClasses[i];
break;
}
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; i<chat_rooms.getCount(); ++i)
{
- if (strcmp(chat_rooms[i].id, id) == 0)
+ if (mir_strcmp(chat_rooms[i].id, id) == 0)
{
item = &chat_rooms[i];
break;
diff --git a/protocols/AimOscar/src/server.cpp b/protocols/AimOscar/src/server.cpp index 3ae332dc39..1f3a2403d9 100644 --- a/protocols/AimOscar/src/server.cpp +++ b/protocols/AimOscar/src/server.cpp @@ -659,13 +659,13 @@ void CAimProto::process_ssi_list(SNAC &snac, int &offset) bool ok = false;
DBVARIANT dbv;
if (!db_get_utf(hContact, MOD_KEY_CL, OTH_KEY_GP, &dbv) && dbv.pszVal[0]) {
- ok = strcmp(group, dbv.pszVal) == 0;
+ ok = mir_strcmp(group, dbv.pszVal) == 0;
db_free(&dbv);
}
- else ok = strcmp(group, AIM_DEFAULT_GROUP) == 0;
+ else ok = mir_strcmp(group, AIM_DEFAULT_GROUP) == 0;
if (!ok) {
- if (strcmp(group, AIM_DEFAULT_GROUP))
+ if (mir_strcmp(group, AIM_DEFAULT_GROUP))
db_set_utf(hContact, MOD_KEY_CL, OTH_KEY_GP, group);
else
db_unset(hContact, MOD_KEY_CL, OTH_KEY_GP);
@@ -1181,7 +1181,7 @@ void CAimProto::snac_received_message(SNAC &snac,HANDLE hServerConn,unsigned sho }
else if (tlv.cmp(0x2712)) {
char* enc = tlv.dup();
- utf_fname = strcmp(enc, "utf-8") == 0;
+ utf_fname = mir_strcmp(enc, "utf-8") == 0;
mir_free(enc);
}
else if (tlv.cmp(0x2713)) {
@@ -1204,7 +1204,7 @@ void CAimProto::snac_received_message(SNAC &snac,HANDLE hServerConn,unsigned sho }
else if (tlv.cmp(0x000d)) {
char* enc = tlv.dup();
- unicode_descr = strcmp(enc, "unicode-2-0") == 0;
+ unicode_descr = mir_strcmp(enc, "unicode-2-0") == 0;
mir_free(enc);
}
i += TLV_HEADER_SIZE + tlv.len();
diff --git a/protocols/AimOscar/src/services.cpp b/protocols/AimOscar/src/services.cpp index 886e001ef3..5097b0d080 100644 --- a/protocols/AimOscar/src/services.cpp +++ b/protocols/AimOscar/src/services.cpp @@ -117,9 +117,9 @@ int CAimProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) {
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if (strcmp(cws->szModule, 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);
diff --git a/protocols/EmLanProto/src/mlan.cpp b/protocols/EmLanProto/src/mlan.cpp index fe13fa4aaf..c66d128c05 100644 --- a/protocols/EmLanProto/src/mlan.cpp +++ b/protocols/EmLanProto/src/mlan.cpp @@ -289,7 +289,7 @@ void CMLan::OnRecvPacket(u_char* mes, int len, in_addr from) } else { - if (pak.strName && strcmp(pak.strName, cont->m_nick) != 0) + if (pak.strName && mir_strcmp(pak.strName, cont->m_nick) != 0) { delete[] cont->m_nick; int nlen = (int)mir_strlen(pak.strName); @@ -520,7 +520,7 @@ void CMLan::SearchExt(TDataHolder* hold) TContact* cont = m_pRootContact; while (cont) { - if (strcmp(hold->msg, cont->m_nick) == 0 || strcmp(hold->msg, "*") == 0) + if (mir_strcmp(hold->msg, cont->m_nick) == 0 || mir_strcmp(hold->msg, "*") == 0) { char buf[MAX_HOSTNAME_LEN]; mir_tstrcpy(buf, cont->m_nick); diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp index 6db84be8b9..f19990da10 100644 --- a/protocols/FacebookRM/src/chat.cpp +++ b/protocols/FacebookRM/src/chat.cpp @@ -39,7 +39,7 @@ void FacebookProto::UpdateChat(const TCHAR *tchat_id, const char *id, const char gce.ptszText = ttext; gce.time = timestamp ? timestamp : ::time(NULL); if (id != NULL) - gce.bIsMe = !strcmp(id, facy.self_.user_id.c_str()); + gce.bIsMe = !mir_strcmp(id, facy.self_.user_id.c_str()); gce.dwFlags |= GCEF_ADDTOLOG; if (is_old) { gce.dwFlags |= GCEF_NOTNOTIFY; @@ -67,7 +67,7 @@ int FacebookProto::OnGCEvent(WPARAM, LPARAM lParam) { GCHOOK *hook = reinterpret_cast<GCHOOK*>(lParam); - if (strcmp(hook->pDest->pszModule, m_szModuleName)) + if (mir_strcmp(hook->pDest->pszModule, m_szModuleName)) return 0; // Ignore for special chatrooms @@ -177,7 +177,7 @@ void FacebookProto::AddChatContact(const TCHAR *tchat_id, const char *id, const gce.ptszNick = tnick; gce.ptszUID = tid; gce.time = ::time(NULL); - gce.bIsMe = !strcmp(id, facy.self_.user_id.c_str()); + gce.bIsMe = !mir_strcmp(id, facy.self_.user_id.c_str()); if (gce.bIsMe) { gce.ptszStatus = TranslateT("Myself"); @@ -197,7 +197,7 @@ void FacebookProto::AddChatContact(const TCHAR *tchat_id, const char *id, const void FacebookProto::RemoveChatContact(const TCHAR *tchat_id, const char *id, const char *name) { // We dont want to remove our self-contact from chat. Ever. - if (!strcmp(id, facy.self_.user_id.c_str())) + if (!mir_strcmp(id, facy.self_.user_id.c_str())) return; ptrT tnick(mir_a2t_cp(name, CP_UTF8)); diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp index b0bd083ad6..e4cd53e091 100644 --- a/protocols/FacebookRM/src/contacts.cpp +++ b/protocols/FacebookRM/src/contacts.cpp @@ -27,7 +27,7 @@ void updateStringUtf(FacebookProto *proto, MCONTACT hContact, const char *key, c DBVARIANT dbv; if (!proto->getStringUtf(hContact, key, &dbv)) { - update_required = strcmp(dbv.pszVal, value.c_str()) != 0; + update_required = mir_strcmp(dbv.pszVal, value.c_str()) != 0; db_free(&dbv); } @@ -67,7 +67,7 @@ void FacebookProto::SaveName(MCONTACT hContact, const facebook_user *fbu) bool FacebookProto::IsMyContact(MCONTACT hContact, bool include_chat) { const char *proto = GetContactProto(hContact); - if (proto && !strcmp(m_szModuleName, proto)) { + if (proto && !mir_strcmp(m_szModuleName, proto)) { if (include_chat) return true; return !isChatRoom(hContact); @@ -130,7 +130,7 @@ MCONTACT FacebookProto::ContactIDToHContact(const std::string &user_id) continue; ptrA id(getStringA(hContact, FACEBOOK_KEY_ID)); - if (id && !strcmp(id, user_id.c_str())) { + if (id && !mir_strcmp(id, user_id.c_str())) { facy.user_id_to_hcontact.insert(std::make_pair(user_id, hContact)); return hContact; } @@ -158,7 +158,7 @@ std::string FacebookProto::ThreadIDToContactID(const std::string &thread_id) continue; ptrA tid(getStringA(hContact, FACEBOOK_KEY_TID)); - if (tid && !strcmp(tid, thread_id.c_str())) { + if (tid && !mir_strcmp(tid, thread_id.c_str())) { ptrA id(getStringA(hContact, FACEBOOK_KEY_ID)); std::string user_id = (id ? id : ""); if (!user_id.empty()) { @@ -235,7 +235,7 @@ void FacebookProto::LoadParticipantsNames(facebook_chatroom *fbc) { for (std::map<std::string, std::string>::iterator it = fbc->participants.begin(); it != fbc->participants.end(); ++it) { if (it->second.empty()) { - if (!strcmp(it->first.c_str(), facy.self_.user_id.c_str())) + if (!mir_strcmp(it->first.c_str(), facy.self_.user_id.c_str())) it->second = facy.self_.real_name; else { MCONTACT hContact = ContactIDToHContact(it->first.c_str()); diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index c36953563a..c5687cc899 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -217,7 +217,7 @@ void FacebookProto::ProcessFriendList(void*) // Update username ptrA username(getStringA(hContact, FACEBOOK_KEY_USERNAME)); - if (!username || strcmp(username, fbu->username.c_str())) { + if (!username || mir_strcmp(username, fbu->username.c_str())) { if (!fbu->username.empty()) setString(hContact, FACEBOOK_KEY_USERNAME, fbu->username.c_str()); else @@ -725,7 +725,7 @@ void FacebookProto::ReceiveMessages(std::vector<facebook_message*> messages, boo // Save TID if not exists already ptrA tid(getStringA(hChatContact, FACEBOOK_KEY_TID)); - if (!tid || strcmp(tid, messages[i]->thread_id.c_str())) + if (!tid || mir_strcmp(tid, messages[i]->thread_id.c_str())) setString(hChatContact, FACEBOOK_KEY_TID, messages[i]->thread_id.c_str()); // Try to map name of this chat participant to his id @@ -775,7 +775,7 @@ void FacebookProto::ReceiveMessages(std::vector<facebook_message*> messages, boo // Save TID if not exists already ptrA tid(getStringA(hContact, FACEBOOK_KEY_TID)); - if (!tid || strcmp(tid, messages[i]->thread_id.c_str())) + if (!tid || mir_strcmp(tid, messages[i]->thread_id.c_str())) setString(hContact, FACEBOOK_KEY_TID, messages[i]->thread_id.c_str()); if (messages[i]->isIncoming && messages[i]->isUnread && messages[i]->type == MESSAGE) { @@ -961,7 +961,7 @@ void FacebookProto::ProcessFriendRequests(void*) bool isNew = false; ptrA oldTime(getStringA(hContact, "RequestTime")); - if (oldTime == NULL || strcmp(oldTime, time.c_str())) { + if (oldTime == NULL || mir_strcmp(oldTime, time.c_str())) { // This is new request isNew = true; setString(hContact, "RequestTime", time.c_str()); diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index a8a65bc88a..afa5303574 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -616,7 +616,7 @@ int FacebookProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam) int FacebookProto::OnPreCreateEvent(WPARAM, LPARAM lParam) { MessageWindowEvent *evt = (MessageWindowEvent *)lParam; - if (strcmp(GetContactProto(evt->hContact), m_szModuleName)) + if (mir_strcmp(GetContactProto(evt->hContact), m_szModuleName)) return 0; std::map<int, time_t>::iterator it = facy.messages_timestamp.find(evt->seq); @@ -854,7 +854,7 @@ MCONTACT FacebookProto::HContactFromAuthEvent(MEVENT hEvent) if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return INVALID_CONTACT_ID; - if (strcmp(dbei.szModule, m_szModuleName)) + if (mir_strcmp(dbei.szModule, m_szModuleName)) return INVALID_CONTACT_ID; return DbGetAuthEventContact(&dbei); diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index bf3e953cc3..50ff063a14 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -57,7 +57,7 @@ void InitIcons(void) HANDLE GetIconHandle(const char* name)
{
for (size_t i = 0; i < SIZEOF(icons); i++)
- if (strcmp(icons[i].szName, name) == 0)
+ if (mir_strcmp(icons[i].szName, name) == 0)
return icons[i].hIcolib;
return 0;
@@ -71,7 +71,7 @@ static FacebookProto * GetInstanceByHContact(MCONTACT hContact) return 0;
for (int i = 0; i < g_Instances.getCount(); i++)
- if (!strcmp(proto, g_Instances[i].m_szModuleName))
+ if (!mir_strcmp(proto, g_Instances[i].m_szModuleName))
return &g_Instances[i];
return 0;
diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp index 259f32aca4..1c8ff22dbd 100644 --- a/protocols/GTalkExt/src/handlers.cpp +++ b/protocols/GTalkExt/src/handlers.cpp @@ -441,7 +441,7 @@ static void sttCreateInstance(LPCSTR szModuleName) return;
ptrA host(db_get_sa(NULL, szModuleName, "ManualHost"));
- if (host == NULL || strcmp(host, "talk.google.com"))
+ if (host == NULL || mir_strcmp(host, "talk.google.com"))
return;
GoogleTalkAcc *gta = new GoogleTalkAcc();
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index c026f4afc6..b9020142e1 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -724,12 +724,12 @@ retry: {
if (res->seq == GG_SEQ_CHINFO)
setByte(hContact, GG_KEY_PD_GANDER,
- (BYTE)(!strcmp(__gender, GG_PUBDIR50_GENDER_SET_MALE) ? 'M' :
- (!strcmp(__gender, GG_PUBDIR50_GENDER_SET_FEMALE) ? 'F' : '?')));
+ (BYTE)(!mir_strcmp(__gender, GG_PUBDIR50_GENDER_SET_MALE) ? 'M' :
+ (!mir_strcmp(__gender, GG_PUBDIR50_GENDER_SET_FEMALE) ? 'F' : '?')));
else
setByte(hContact, GG_KEY_PD_GANDER,
- (BYTE)(!strcmp(__gender, GG_PUBDIR50_GENDER_MALE) ? 'M' :
- (!strcmp(__gender, GG_PUBDIR50_GENDER_FEMALE) ? 'F' : '?')));
+ (BYTE)(!mir_strcmp(__gender, GG_PUBDIR50_GENDER_MALE) ? 'M' :
+ (!mir_strcmp(__gender, GG_PUBDIR50_GENDER_FEMALE) ? 'F' : '?')));
}
else if (res->seq == GG_SEQ_CHINFO)
{
@@ -843,7 +843,7 @@ retry: }
}
// Check if not empty message ( who needs it? )
- else if (!e->event.msg.recipients_count && e->event.msg.message && *e->event.msg.message && strcmp(e->event.msg.message, "\xA0\0"))
+ else if (!e->event.msg.recipients_count && e->event.msg.message && *e->event.msg.message && mir_strcmp(e->event.msg.message, "\xA0\0"))
{
PROTORECVEVENT pre = {0};
time_t t = time(NULL);
@@ -915,7 +915,7 @@ retry: }
}
else if (!e->event.multilogon_msg.recipients_count && e->event.multilogon_msg.message && *e->event.multilogon_msg.message
- && strcmp(e->event.multilogon_msg.message, "\xA0\0"))
+ && mir_strcmp(e->event.multilogon_msg.message, "\xA0\0"))
{
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.szModule = m_szModuleName;
@@ -1170,7 +1170,7 @@ retry: sender = node != NULL ? mir_t2a(xi.getText(node)) : NULL;
debugLogA("mainthread() (%x): XML Action type: %s.", this, type != NULL ? type : "unknown");
// Avatar change notify
- if (type != NULL && !strcmp(type, "28")) {
+ if (type != NULL && !mir_strcmp(type, "28")) {
debugLogA("mainthread() (%x): Client %s changed his avatar.", this, sender);
requestAvatarInfo(getcontact(atoi(sender), 0, 0, NULL), 0);
}
@@ -1334,14 +1334,14 @@ int GGPROTO::dbsettingchanged(WPARAM hContact, LPARAM lParam) return 0;
// If contact has been blocked
- if (!strcmp(cws->szModule, m_szModuleName) && !strcmp(cws->szSetting, GG_KEY_BLOCK))
+ if (!mir_strcmp(cws->szModule, m_szModuleName) && !mir_strcmp(cws->szSetting, GG_KEY_BLOCK))
{
notifyuser(hContact, 1);
return 0;
}
// Contact is being renamed
- if (gc_enabled && !strcmp(cws->szModule, m_szModuleName) && !strcmp(cws->szSetting, GG_KEY_NICK)){
+ if (gc_enabled && !mir_strcmp(cws->szModule, m_szModuleName) && !mir_strcmp(cws->szSetting, GG_KEY_NICK)){
TCHAR* ptszVal = sttSettingToTchar(&(cws->value));
if(ptszVal==NULL) return 0;
@@ -1372,10 +1372,10 @@ int GGPROTO::dbsettingchanged(WPARAM hContact, LPARAM lParam) }
// Contact list changes
- if (!strcmp(cws->szModule, "CList"))
+ if (!mir_strcmp(cws->szModule, "CList"))
{
// If name changed... change nick
- if (!strcmp(cws->szSetting, "MyHandle")){
+ if (!mir_strcmp(cws->szSetting, "MyHandle")){
TCHAR* ptszVal = sttSettingToTchar(&(cws->value));
if(ptszVal==NULL) return 0;
setTString(hContact, GG_KEY_NICK, ptszVal);
@@ -1383,7 +1383,7 @@ int GGPROTO::dbsettingchanged(WPARAM hContact, LPARAM lParam) }
// If not on list changed
- if (!strcmp(cws->szSetting, "NotOnList"))
+ if (!mir_strcmp(cws->szSetting, "NotOnList"))
{
if (db_get_b(hContact, "CList", "Hidden", 0))
return 0;
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp index 50616a407b..a75e6ef516 100644 --- a/protocols/Gadu-Gadu/src/dialogs.cpp +++ b/protocols/Gadu-Gadu/src/dialogs.cpp @@ -194,7 +194,7 @@ void GGPROTO::checknewuser(uin_t uin, const char* passwd) db_free(&dbv); } - if (uin > 0 && mir_strlen(passwd) > 0 && (uin != olduin || strcmp(oldpasswd, passwd))) + if (uin > 0 && mir_strlen(passwd) > 0 && (uin != olduin || mir_strcmp(oldpasswd, passwd))) check_first_conn = 1; } @@ -928,7 +928,7 @@ int GGPROTO::details_init(WPARAM wParam, LPARAM lParam) char* szProto = GetContactProto(hContact); if (szProto == NULL) return 0; - if (strcmp(szProto, m_szModuleName) || isChatRoom(hContact)) + if (mir_strcmp(szProto, m_szModuleName) || isChatRoom(hContact)) return 0; pszTemplate = MAKEINTRESOURCEA(IDD_INFO_GG); } diff --git a/protocols/Gadu-Gadu/src/dynstuff.cpp b/protocols/Gadu-Gadu/src/dynstuff.cpp index 17ce53a534..4d21ed7eb0 100644 --- a/protocols/Gadu-Gadu/src/dynstuff.cpp +++ b/protocols/Gadu-Gadu/src/dynstuff.cpp @@ -584,7 +584,7 @@ int array_contains(char **array, const char *string, int casesensitive) return 0;
for (i = 0; array[i]; i++) {
- if (casesensitive && !strcmp(array[i], string))
+ if (casesensitive && !mir_strcmp(array[i], string))
return 1;
if (!casesensitive && !strcasecmp(array[i], string))
return 1;
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index 9a79056216..45fd51745f 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -203,7 +203,7 @@ static GGPROTO* gg_getprotoinstance(MCONTACT hContact) return NULL;
for (int i=0; i < g_Instances.getCount(); i++)
- if (strcmp(szProto, g_Instances[i]->m_szModuleName) == 0)
+ if (mir_strcmp(szProto, g_Instances[i]->m_szModuleName) == 0)
return g_Instances[i];
return NULL;
diff --git a/protocols/Gadu-Gadu/src/oauth.cpp b/protocols/Gadu-Gadu/src/oauth.cpp index 5a8455422b..4f394aae89 100644 --- a/protocols/Gadu-Gadu/src/oauth.cpp +++ b/protocols/Gadu-Gadu/src/oauth.cpp @@ -46,8 +46,8 @@ typedef enum static int paramsortFunc(const OAUTHPARAMETER *p1, const OAUTHPARAMETER *p2)
{
- int res = strcmp(p1->name, p2->name);
- return res != 0 ? res : strcmp(p1->value, p2->value);
+ int res = mir_strcmp(p1->name, p2->name);
+ return res != 0 ? res : mir_strcmp(p1->value, p2->value);
}
// see RFC 3986 for details
@@ -106,7 +106,7 @@ char *oauth_generate_signature(LIST<OAUTHPARAMETER> ¶ms, const char *httpmet for (i = 0; i < params.getCount(); i++) {
p = params[i];
- if (!strcmp(p->name, "oauth_signature")) continue;
+ if (!mir_strcmp(p->name, "oauth_signature")) continue;
if (i > 0) size += 3;
size += (int)mir_strlen(p->name) + (int)mir_strlen(p->value) + 3;
}
@@ -120,7 +120,7 @@ char *oauth_generate_signature(LIST<OAUTHPARAMETER> ¶ms, const char *httpmet for (i = 0; i < params.getCount(); i++) {
p = params[i];
- if (!strcmp(p->name, "oauth_signature")) continue;
+ if (!mir_strcmp(p->name, "oauth_signature")) continue;
if (i > 0) strcat(res, "%26");
strcat(res, p->name);
strcat(res, "%3D");
@@ -139,7 +139,7 @@ char *oauth_getparam(LIST<OAUTHPARAMETER> ¶ms, const char *name) for (i = 0; i < params.getCount(); i++) {
p = params[i];
- if (!strcmp(p->name, name))
+ if (!mir_strcmp(p->name, name))
return p->value;
}
@@ -155,7 +155,7 @@ void oauth_setparam(LIST<OAUTHPARAMETER> ¶ms, const char *name, const char * for (i = 0; i < params.getCount(); i++) {
p = params[i];
- if (!strcmp(p->name, name)) {
+ if (!mir_strcmp(p->name, name)) {
mir_free(p->value);
p->value = oauth_uri_escape(value);
return;
@@ -190,7 +190,7 @@ int oauth_sign_request(LIST<OAUTHPARAMETER> ¶ms, const char *httpmethod, con signmethod = oauth_getparam(params, "oauth_signature_method");
if (signmethod == NULL) return -1;
- if (!strcmp(signmethod, "HMAC-SHA1")) {
+ if (!mir_strcmp(signmethod, "HMAC-SHA1")) {
ptrA text( oauth_generate_signature(params, httpmethod, url));
ptrA csenc( oauth_uri_escape(consumer_secret));
ptrA tsenc( oauth_uri_escape(token_secret));
diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp index 1d8994cc44..d9f06b06aa 100644 --- a/protocols/Gadu-Gadu/src/services.cpp +++ b/protocols/Gadu-Gadu/src/services.cpp @@ -230,7 +230,7 @@ INT_PTR GGPROTO::getavatarinfo(WPARAM wParam, LPARAM lParam) ptrA AvatarSavedHash( getStringA(pai->hContact, GG_KEY_AVATARHASH));
if (AvatarHash != NULL && AvatarSavedHash != NULL) {
getAvatarFilename(pai->hContact, pai->filename, SIZEOF(pai->filename));
- if (!strcmp(AvatarHash, AvatarSavedHash)) {
+ if (!mir_strcmp(AvatarHash, AvatarSavedHash)) {
if (_taccess(pai->filename, 0) == 0){
debugLogA("getavatarinfo(): Incoming request for avatar information. uin=%d. Avatar hash unchanged. return GAIR_SUCCESS", uin);
return GAIR_SUCCESS;
diff --git a/protocols/Gadu-Gadu/src/sessions.cpp b/protocols/Gadu-Gadu/src/sessions.cpp index 8218acdf79..b1625f4471 100644 --- a/protocols/Gadu-Gadu/src/sessions.cpp +++ b/protocols/Gadu-Gadu/src/sessions.cpp @@ -185,7 +185,7 @@ static INT_PTR CALLBACK gg_sessions_viewdlg(HWND hwndDlg, UINT message, WPARAM w case HM_PROTOACK:
{
ACKDATA* ack = (ACKDATA*)lParam;
- if (!strcmp(ack->szModule, gg->m_szModuleName) && !ack->hContact && ack->type == ACKTYPE_STATUS
+ if (!mir_strcmp(ack->szModule, gg->m_szModuleName) && !ack->hContact && ack->type == ACKTYPE_STATUS
&& ack->result == ACKRESULT_SUCCESS && (ack->lParam == ID_STATUS_OFFLINE
|| (ack->hProcess == (HANDLE)ID_STATUS_CONNECTING && ack->lParam != ID_STATUS_OFFLINE
&& !ListView_GetItemCount(GetDlgItem(hwndDlg, IDC_SESSIONS)))))
diff --git a/protocols/Gadu-Gadu/src/userutils.cpp b/protocols/Gadu-Gadu/src/userutils.cpp index 8c47ebe3a6..a5fcae5ee3 100644 --- a/protocols/Gadu-Gadu/src/userutils.cpp +++ b/protocols/Gadu-Gadu/src/userutils.cpp @@ -226,7 +226,7 @@ INT_PTR CALLBACK gg_userutildlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA BOOL enable;
GetDlgItemTextA(hwndDlg, IDC_PASSWORD, pass, SIZEOF(pass));
GetDlgItemTextA(hwndDlg, IDC_CPASSWORD, cpass, SIZEOF(cpass));
- enable = mir_strlen(pass) && mir_strlen(cpass) && !strcmp(cpass, pass);
+ enable = mir_strlen(pass) && mir_strlen(cpass) && !mir_strcmp(cpass, pass);
if (dat && dat->mode == GG_USERUTIL_REMOVE)
EnableWindow(GetDlgItem(hwndDlg, IDOK), IsDlgButtonChecked(hwndDlg, IDC_CONFIRM) ? enable : FALSE);
else
diff --git a/protocols/ICQCorp/src/protocol.cpp b/protocols/ICQCorp/src/protocol.cpp index 29fcebed90..65fbaf3bed 100644 --- a/protocols/ICQCorp/src/protocol.cpp +++ b/protocols/ICQCorp/src/protocol.cpp @@ -1163,7 +1163,7 @@ void ICQ::updateContactList() for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
proto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
- if (proto && !strcmp(proto, protoName))
+ if (proto && !mir_strcmp(proto, protoName))
{
if ((u = getUserByContact(hContact)) == NULL)
{
diff --git a/protocols/ICQCorp/src/services.cpp b/protocols/ICQCorp/src/services.cpp index fcc37c8dbd..939fc619fc 100644 --- a/protocols/ICQCorp/src/services.cpp +++ b/protocols/ICQCorp/src/services.cpp @@ -111,7 +111,7 @@ static INT_PTR icqAuthAllow(WPARAM wParam, LPARAM lParam) dbei.pBlob = (PBYTE)&uin;
if (CallService(MS_DB_EVENT_GET, wParam, (LPARAM)&dbei)) return 1;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return 1;
- if (strcmp(dbei.szModule, ICQOSCPROTONAME)) return 1;
+ if (mir_strcmp(dbei.szModule, ICQOSCPROTONAME)) return 1;
if (uin <= 1) return 1;
icq_sendAuthGrantedServ(uin);
*/
diff --git a/protocols/ICQCorp/src/user.cpp b/protocols/ICQCorp/src/user.cpp index ac37dfdb05..c70054e095 100644 --- a/protocols/ICQCorp/src/user.cpp +++ b/protocols/ICQCorp/src/user.cpp @@ -144,7 +144,7 @@ int icqUserInfoInitialise(WPARAM wParam, LPARAM lParam) char *proto;
proto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, lParam, 0);
- if ((proto == NULL || strcmp(proto, protoName)) && lParam) return 0;
+ if ((proto == NULL || mir_strcmp(proto, protoName)) && lParam) return 0;
odp.position = -1900000000;
odp.pszTitle = Translate(protoName);
diff --git a/protocols/IRCG/src/main.cpp b/protocols/IRCG/src/main.cpp index 0da567113c..743dbe1741 100644 --- a/protocols/IRCG/src/main.cpp +++ b/protocols/IRCG/src/main.cpp @@ -35,7 +35,7 @@ OBJLIST<SERVER_INFO> g_servers( 20, CompareServers ); static int sttCompareProtocols(const CIrcProto *p1, const CIrcProto *p2)
{
- return strcmp(p1->m_szModuleName, p2->m_szModuleName);
+ return mir_strcmp(p1->m_szModuleName, p2->m_szModuleName);
}
LIST<CIrcProto> g_Instances(1, sttCompareProtocols);
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index 0376a9d6a2..c1a816cb9f 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -93,7 +93,7 @@ static CIrcProto* IrcGetInstanceByHContact(MCONTACT hContact) return NULL;
for (int i = 0; i < g_Instances.getCount(); i++)
- if (!strcmp(szProto, g_Instances[i]->m_szModuleName))
+ if (!mir_strcmp(szProto, g_Instances[i]->m_szModuleName))
return g_Instances[i];
return NULL;
@@ -975,13 +975,13 @@ int __cdecl CIrcProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam;
- if (strcmp(cws->szModule, "CList"))
+ if (mir_strcmp(cws->szModule, "CList"))
return 0;
if (cws->value.type != DBVT_DELETED && !(cws->value.type == DBVT_BYTE && cws->value.bVal == 0))
return 0;
- if (!strcmp(cws->szSetting, "NotOnList")) {
+ if (!mir_strcmp(cws->szSetting, "NotOnList")) {
DBVARIANT dbv;
if (!getTString(hContact, "Nick", &dbv)) {
if (getByte("MirVerAutoRequest", 1))
diff --git a/protocols/IRCG/src/windows.cpp b/protocols/IRCG/src/windows.cpp index ddac73b1c4..51accea275 100644 --- a/protocols/IRCG/src/windows.cpp +++ b/protocols/IRCG/src/windows.cpp @@ -677,7 +677,7 @@ void CQuickDlg::OnServerCombo(CCtrlData*) CheckDlgButton(m_hwnd, IDC_SSL_AUTO, BST_UNCHECKED);
}
- if (!strcmp(pData->m_name, Translate("---- Not listed server ----"))) {
+ if (!mir_strcmp(pData->m_name, Translate("---- Not listed server ----"))) {
SendDlgItemMessage(m_hwnd, IDC_SERVER, EM_SETREADONLY, false, 0);
SendDlgItemMessage(m_hwnd, IDC_PORT, EM_SETREADONLY, false, 0);
SendDlgItemMessage(m_hwnd, IDC_PORT2, EM_SETREADONLY, false, 0);
diff --git a/protocols/IcqOscarJ/src/icq_db.cpp b/protocols/IcqOscarJ/src/icq_db.cpp index a9aa778cb1..3ba378541f 100644 --- a/protocols/IcqOscarJ/src/icq_db.cpp +++ b/protocols/IcqOscarJ/src/icq_db.cpp @@ -174,7 +174,7 @@ void CIcqProto::setStatusMsgVar(MCONTACT hContact, char* szStatusMsg, bool isAns db_free(&dbv);
}
- if (!oldStatusMsg || strcmp(oldStatusMsg, szStatusMsg))
+ if (!oldStatusMsg || mir_strcmp(oldStatusMsg, szStatusMsg))
db_set_utf(hContact, "CList", "StatusMsg", szStatusMsg);
SAFE_FREE(&oldStatusMsg);
if (isAnsi) SAFE_FREE(&szStatusMsg);
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp index 4b93e445fc..e0a276de55 100644 --- a/protocols/IcqOscarJ/src/icq_menu.cpp +++ b/protocols/IcqOscarJ/src/icq_menu.cpp @@ -32,7 +32,7 @@ HANDLE g_hContactMenuSvc[6]; static int sttCompareProtocols(const CIcqProto *p1, const CIcqProto *p2)
{
- return strcmp(p1->m_szModuleName, p2->m_szModuleName);
+ return mir_strcmp(p1->m_szModuleName, p2->m_szModuleName);
}
LIST<CIcqProto> g_Instances(1, sttCompareProtocols);
@@ -44,7 +44,7 @@ static CIcqProto* IcqGetInstanceByHContact(MCONTACT hContact) return NULL;
for (int i = 0; i < g_Instances.getCount(); i++)
- if (!strcmp(szProto, g_Instances[i]->m_szModuleName))
+ if (!mir_strcmp(szProto, g_Instances[i]->m_szModuleName))
return g_Instances[i];
return NULL;
diff --git a/protocols/IcqOscarJ/src/utilities.cpp b/protocols/IcqOscarJ/src/utilities.cpp index 8799ea7c79..37c4e6e12f 100644 --- a/protocols/IcqOscarJ/src/utilities.cpp +++ b/protocols/IcqOscarJ/src/utilities.cpp @@ -581,11 +581,11 @@ char* strUID(DWORD dwUIN, char *pszUID) }
-/* a strcmp() that likes NULL */
+/* a mir_strcmp() that likes NULL */
int __fastcall strcmpnull(const char *str1, const char *str2)
{
if (str1 && str2)
- return strcmp(str1, str2);
+ return mir_strcmp(str1, str2);
if (!str1 && !str2)
return 0;
diff --git a/protocols/JabberG/src/jabber_byte.cpp b/protocols/JabberG/src/jabber_byte.cpp index 40545f9203..b271da6373 100644 --- a/protocols/JabberG/src/jabber_byte.cpp +++ b/protocols/JabberG/src/jabber_byte.cpp @@ -218,7 +218,7 @@ void CJabberProto::ByteSendThread(JABBER_BYTE_TRANSFER *jbt) NETLIBIPLIST* ihaddr = (NETLIBIPLIST*)CallService(MS_NETLIB_GETMYIP, 1, 0);
for (unsigned i=0; i < ihaddr->cbNum; i++)
- if (strcmp(localAddr, ihaddr->szIp[i]))
+ if (mir_strcmp(localAddr, ihaddr->szIp[i]))
query << XCHILD(_T("streamhost")) << XATTR(_T("jid"), m_ThreadInfo->fullJID) << XATTR(_T("host"), _A2T(ihaddr->szIp[i])) << XATTRI(_T("port"), nlb.wPort);
mir_free(ihaddr);
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index 927fb6c405..ab33180bd2 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -162,14 +162,14 @@ int __cdecl CJabberProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam;
- if (strcmp(cws->szModule, "CList"))
+ if (mir_strcmp(cws->szModule, "CList"))
return 0;
- if (!strcmp(cws->szSetting, "Group"))
+ if (!mir_strcmp(cws->szSetting, "Group"))
OnRenameGroup(cws, hContact);
- else if (!strcmp(cws->szSetting, "MyHandle"))
+ else if (!mir_strcmp(cws->szSetting, "MyHandle"))
OnRenameContact(cws, hContact);
- else if (!strcmp(cws->szSetting, "NotOnList"))
+ else if (!mir_strcmp(cws->szSetting, "NotOnList"))
OnAddContactForever(cws, hContact);
return 0;
diff --git a/protocols/JabberG/src/jabber_file.cpp b/protocols/JabberG/src/jabber_file.cpp index 0a45ead7b0..1c51a3b87e 100644 --- a/protocols/JabberG/src/jabber_file.cpp +++ b/protocols/JabberG/src/jabber_file.cpp @@ -129,7 +129,7 @@ int CJabberProto::FileReceiveParse(filetransfer *ft, char* buffer, int datalen) }
else if ((s = strchr(str, ':')) != NULL) {
*s = '\0';
- if (!strcmp(str, "Content-Length"))
+ if (!mir_strcmp(str, "Content-Length"))
ft->std.totalBytes = ft->std.currentFileSize = _atoi64(s + 1);
}
}
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index a85f2fdaa7..0b582f3548 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -185,7 +185,7 @@ HICON CJabberProto::LoadIconEx(const char* name, bool big) if (HICON result = g_LoadIconEx(name, big))
return result;
- if (!strcmp(name, "main"))
+ if (!mir_strcmp(name, "main"))
return Skin_GetIconByHandle(m_hProtoIcon, big);
return NULL;
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 3567c46592..041f665e58 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -193,7 +193,7 @@ void CJabberProto::OnLoggedIn() QueryPrivacyLists(m_ThreadInfo);
ptrA szServerName(getStringA("LastLoggedServer"));
- if (szServerName == NULL || strcmp(m_ThreadInfo->conn.server, szServerName))
+ if (szServerName == NULL || mir_strcmp(m_ThreadInfo->conn.server, szServerName))
SendGetVcard(m_szJabberJID);
setString("LastLoggedServer", m_ThreadInfo->conn.server);
diff --git a/protocols/JabberG/src/jabber_list.h b/protocols/JabberG/src/jabber_list.h index 69b8ee1f61..39080cca86 100644 --- a/protocols/JabberG/src/jabber_list.h +++ b/protocols/JabberG/src/jabber_list.h @@ -220,7 +220,7 @@ struct JABBER_HTTP_AVATARS ~JABBER_HTTP_AVATARS() { mir_free(Url); }
static int compare(const JABBER_HTTP_AVATARS *p1, const JABBER_HTTP_AVATARS *p2)
- { return strcmp(p1->Url, p2->Url); }
+ { return mir_strcmp(p1->Url, p2->Url); }
};
#endif
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 5c2715f7bf..2c1b351fe6 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -80,7 +80,7 @@ static CJabberProto* JabberGetInstanceByHContact(MCONTACT hContact) return NULL;
for (int i=0; i < g_Instances.getCount(); i++)
- if (!strcmp(szProto, g_Instances[i]->m_szModuleName))
+ if (!mir_strcmp(szProto, g_Instances[i]->m_szModuleName))
return g_Instances[i];
return NULL;
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index a471b49703..79ce43efeb 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -351,7 +351,7 @@ MCONTACT __cdecl CJabberProto::AddToListByEvent(int flags, int /*iContact*/, MEV return NULL;
if (db_event_get(hDbEvent, &dbei))
return NULL;
- if (strcmp(dbei.szModule, m_szModuleName))
+ if (mir_strcmp(dbei.szModule, m_szModuleName))
return NULL;
/*
@@ -392,7 +392,7 @@ int CJabberProto::Authorize(MEVENT hDbEvent) return 1;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return 1;
- if (strcmp(dbei.szModule, m_szModuleName))
+ if (mir_strcmp(dbei.szModule, m_szModuleName))
return 1;
char *nick = (char*)(dbei.pBlob + sizeof(DWORD)*2);
@@ -446,7 +446,7 @@ int CJabberProto::AuthDeny(MEVENT hDbEvent, const TCHAR*) if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return 1;
- if (strcmp(dbei.szModule, m_szModuleName))
+ if (mir_strcmp(dbei.szModule, m_szModuleName))
return 1;
char *nick = (char*)(dbei.pBlob + sizeof(DWORD)*2);
diff --git a/protocols/JabberG/src/jabber_secur.cpp b/protocols/JabberG/src/jabber_secur.cpp index 3d380eb32a..ce2cafb2fc 100644 --- a/protocols/JabberG/src/jabber_secur.cpp +++ b/protocols/JabberG/src/jabber_secur.cpp @@ -35,11 +35,11 @@ TNtlmAuth::TNtlmAuth(ThreadData *info, const char* mechanism, const TCHAR *hostn szHostName = hostname;
const TCHAR *szProvider;
- if (!strcmp(mechanism, "GSS-SPNEGO"))
+ if (!mir_strcmp(mechanism, "GSS-SPNEGO"))
szProvider = _T("Negotiate");
- else if (!strcmp(mechanism, "GSSAPI"))
+ else if (!mir_strcmp(mechanism, "GSSAPI"))
szProvider = _T("GSSAPI");
- else if (!strcmp(mechanism, "NTLM"))
+ else if (!mir_strcmp(mechanism, "NTLM"))
szProvider = _T("NTLM");
else {
LBL_Invalid:
@@ -49,8 +49,8 @@ LBL_Invalid: }
TCHAR szSpn[1024] = _T("");
- if (strcmp(mechanism, "NTLM"))
- if (!getSpn(szSpn, SIZEOF(szSpn)) && !strcmp(mechanism, "GSSAPI"))
+ if (mir_strcmp(mechanism, "NTLM"))
+ if (!getSpn(szSpn, SIZEOF(szSpn)) && !mir_strcmp(mechanism, "GSSAPI"))
goto LBL_Invalid;
if ((hProvider = Netlib_InitSecurityProvider2(szProvider, szSpn)) == NULL)
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index 968ec55fab..f43f712e83 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -137,7 +137,7 @@ INT_PTR __cdecl CJabberProto::JabberGetAvatarInfo(WPARAM wParam, LPARAM lParam) if (::_taccess(AI->filename, 0) == 0) {
ptrA szSavedHash( getStringA(AI->hContact, "AvatarSaved"));
- if (szSavedHash != NULL && !strcmp(szSavedHash, szHashValue)) {
+ if (szSavedHash != NULL && !mir_strcmp(szSavedHash, szHashValue)) {
debugLogA("Avatar is Ok: %s == %s", szSavedHash, szHashValue);
return GAIR_SUCCESS;
}
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index 91cbcd76b9..3b5af188c2 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -811,7 +811,7 @@ int CJabberProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) } char *szProto = GetContactProto(hContact); - if (szProto != NULL && !strcmp(szProto, m_szModuleName)) { + if (szProto != NULL && !mir_strcmp(szProto, m_szModuleName)) { OPTIONSDIALOGPAGE odp = { 0 }; odp.hInstance = hInst; odp.dwInitParam = (LPARAM)this; diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index e82202ade2..73bc6a6cc8 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -679,7 +679,7 @@ TStringPairs::~TStringPairs() const char* TStringPairs::operator[](const char* key) const
{
for (int i = 0; i < numElems; i++)
- if (!strcmp(elems[i].name, key))
+ if (!mir_strcmp(elems[i].name, key))
return elems[i].value;
return "";
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index f110240a91..9aded8f3e3 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -876,7 +876,7 @@ static int ActivityCheck(LPCTSTR szFirstNode, LPCTSTR szSecondNode) int i = 0, nFirst = -1, nSecond = -1;
while (g_arrActivities[i].szFirst || g_arrActivities[i].szSecond) {
// check first node
- if (g_arrActivities[i].szFirst && !strcmp(s1, g_arrActivities[i].szFirst)) {
+ if (g_arrActivities[i].szFirst && !mir_strcmp(s1, g_arrActivities[i].szFirst)) {
// first part found
nFirst = i;
if (!s2) {
@@ -885,7 +885,7 @@ static int ActivityCheck(LPCTSTR szFirstNode, LPCTSTR szSecondNode) }
i++; // move to next
while (g_arrActivities[i].szSecond) {
- if (!strcmp(g_arrActivities[i].szSecond, s2)) {
+ if (!mir_strcmp(g_arrActivities[i].szSecond, s2)) {
nSecond = i;
break;
}
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index 427638fc65..ec6f7f229f 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -166,7 +166,7 @@ MCONTACT CMraProto::AddToListByEvent(int, int, MEVENT hDbEvent) if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) != -1) {
dbei.pBlob = (PBYTE)alloca(dbei.cbBlob);
if (db_event_get(hDbEvent, &dbei) == 0 &&
- !strcmp(dbei.szModule, m_szModuleName) &&
+ !mir_strcmp(dbei.szModule, m_szModuleName) &&
(dbei.eventType == EVENTTYPE_AUTHREQUEST || dbei.eventType == EVENTTYPE_CONTACTS))
{
char *nick = (char*)(dbei.pBlob + sizeof(DWORD) * 2);
@@ -192,7 +192,7 @@ int CMraProto::Authorize(MEVENT hDBEvent) dbei.pBlob = (PBYTE)alloca(dbei.cbBlob);
if (db_event_get(hDBEvent, &dbei)) return 1;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return 1;
- if (strcmp(dbei.szModule, m_szModuleName)) return 1;
+ if (mir_strcmp(dbei.szModule, m_szModuleName)) return 1;
LPSTR lpszNick = (LPSTR)(dbei.pBlob + sizeof(DWORD) * 2);
LPSTR lpszFirstName = lpszNick + mir_strlen(lpszNick) + 1;
@@ -212,7 +212,7 @@ int CMraProto::AuthDeny(MEVENT hDBEvent, const TCHAR* szReason) dbei.pBlob = (PBYTE)alloca(dbei.cbBlob);
if (db_event_get(hDBEvent, &dbei)) return 1;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return 1;
- if (strcmp(dbei.szModule, m_szModuleName)) return 1;
+ if (mir_strcmp(dbei.szModule, m_szModuleName)) return 1;
LPSTR lpszNick = (LPSTR)(dbei.pBlob + sizeof(DWORD) * 2);
LPSTR lpszFirstName = lpszNick + mir_strlen(lpszNick) + 1;
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp index efeb16445a..044df17ff4 100644 --- a/protocols/MRA/src/Mra_svcs.cpp +++ b/protocols/MRA/src/Mra_svcs.cpp @@ -196,9 +196,9 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) // ýòî íàø êîíòàêò, îí íå âðåìåííûé (åñòü â ñïèñêå íà ñåðâåðå) è åãî îáíîâëåíèå ðàçðåøåíî
if (IsContactMra(hContact) && !db_get_b(hContact, "CList", "NotOnList", 0) && getDword(hContact, "HooksLocked", FALSE) == FALSE) {
- if (!strcmp(cws->szModule, "CList")) {
+ if (!mir_strcmp(cws->szModule, "CList")) {
// MyHandle setting
- if (!strcmp(cws->szSetting, "MyHandle")) {
+ if (!mir_strcmp(cws->szSetting, "MyHandle")) {
// always store custom nick
CMStringW wszNick;
if (cws->value.type == DBVT_DELETED) {
@@ -222,7 +222,7 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
// Group setting
- else if (!strcmp(cws->szSetting, "Group")) {
+ else if (!mir_strcmp(cws->szSetting, "Group")) {
CMStringW wszGroup;
// manage group on server
switch (cws->value.type) {
@@ -243,7 +243,7 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
// NotOnList setting. Has a temporary contact just been added permanently?
- else if (!strcmp(cws->szSetting, "NotOnList")) {
+ else if (!mir_strcmp(cws->szSetting, "NotOnList")) {
if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_BYTE && cws->value.bVal == 0)) {
CMStringW wszAuthMessage;
if (!mraGetStringW(NULL, "AuthMessage", wszAuthMessage))
@@ -259,7 +259,7 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
// Hidden setting
- else if (!strcmp(cws->szSetting, "Hidden")) {
+ else if (!mir_strcmp(cws->szSetting, "Hidden")) {
DWORD dwContactFlag = GetContactFlags(hContact);
if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_BYTE && cws->value.bVal == 0))
dwContactFlag &= ~CONTACT_FLAG_SHADOW;
@@ -270,8 +270,8 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
// Ignore section
- else if (!strcmp(cws->szModule, "Ignore")) {
- if (!strcmp(cws->szSetting, "Mask1")) {
+ else if (!mir_strcmp(cws->szModule, "Ignore")) {
+ if (!mir_strcmp(cws->szSetting, "Mask1")) {
DWORD dwContactFlag = GetContactFlags(hContact);
if (cws->value.type == DBVT_DELETED || (cws->value.type == DBVT_DWORD && cws->value.dVal&IGNOREEVENT_MESSAGE) == 0)
dwContactFlag &= ~CONTACT_FLAG_IGNORE;
@@ -282,8 +282,8 @@ int CMraProto::MraDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
// User info section
- else if (!strcmp(cws->szModule, "UserInfo")) {
- if (!strcmp(cws->szSetting, "MyPhone0") || !strcmp(cws->szSetting, "MyPhone1") || !strcmp(cws->szSetting, "MyPhone2"))
+ else if (!mir_strcmp(cws->szModule, "UserInfo")) {
+ if (!mir_strcmp(cws->szSetting, "MyPhone0") || !mir_strcmp(cws->szSetting, "MyPhone1") || !mir_strcmp(cws->szSetting, "MyPhone2"))
MraModifyContact(hContact);
}
}
diff --git a/protocols/MSN/src/msn_auth.cpp b/protocols/MSN/src/msn_auth.cpp index b54ef2c1ba..a0e221132f 100644 --- a/protocols/MSN/src/msn_auth.cpp +++ b/protocols/MSN/src/msn_auth.cpp @@ -162,7 +162,7 @@ int CMsnProto::MSN_GetPassportAuth(void) if (db_get_static(NULL, m_szModuleName, "MsnPassportHost", szPassportHost, 256))
strcpy(szPassportHost, defaultPassportUrl);
- bool defaultUrlAllow = strcmp(szPassportHost, defaultPassportUrl) != 0;
+ bool defaultUrlAllow = mir_strcmp(szPassportHost, defaultPassportUrl) != 0;
char *tResult = NULL;
while (retVal == -1) {
@@ -199,7 +199,7 @@ int CMsnProto::MSN_GetPassportAuth(void) const char* addr = ezxml_txt(ezxml_get(tokr, "wsp:AppliesTo", 0,
"wsa:EndpointReference", 0, "wsa:Address", -1));
- if (strcmp(addr, "http://Passport.NET/tb") == 0) {
+ if (mir_strcmp(addr, "http://Passport.NET/tb") == 0) {
ezxml_t node = ezxml_get(tokr, "wst:RequestedSecurityToken", 0, "EncryptedData", -1);
free(hotAuthToken);
hotAuthToken = ezxml_toxml(node, 0);
@@ -209,7 +209,7 @@ int CMsnProto::MSN_GetPassportAuth(void) replaceStr(hotSecretToken, ezxml_txt(node));
setString("hotSecretToken", hotSecretToken);
}
- else if (strcmp(addr, "chatservice.live.com") == 0) {
+ else if (mir_strcmp(addr, "chatservice.live.com") == 0) {
ezxml_t node = ezxml_get(tokr, "wst:RequestedProofToken", 0,
"wst:BinarySecret", -1);
if (toks) {
@@ -221,7 +221,7 @@ int CMsnProto::MSN_GetPassportAuth(void) errurl = ezxml_txt(ezxml_get(tokr, "S:Fault", 0, "psf:pp", 0, "psf:flowurl", -1));
}
}
- else if (strcmp(addr, "messenger.msn.com") == 0 && toks) {
+ else if (mir_strcmp(addr, "messenger.msn.com") == 0 && toks) {
const char* tok = ezxml_txt(toks);
char* ch = (char*)strchr(tok, '&');
*ch = 0;
@@ -229,14 +229,14 @@ int CMsnProto::MSN_GetPassportAuth(void) replaceStr(pAuthToken, ch + 3);
*ch = '&';
}
- else if (strcmp(addr, "contacts.msn.com") == 0 && toks) {
+ else if (mir_strcmp(addr, "contacts.msn.com") == 0 && toks) {
replaceStr(authContactToken, ezxml_txt(toks));
setString("authContactToken", authContactToken);
}
- else if (strcmp(addr, "messengersecure.live.com") == 0 && toks) {
+ else if (mir_strcmp(addr, "messengersecure.live.com") == 0 && toks) {
replaceStr(oimSendToken, ezxml_txt(toks));
}
- else if (strcmp(addr, "storage.msn.com") == 0 && toks) {
+ else if (mir_strcmp(addr, "storage.msn.com") == 0 && toks) {
replaceStr(authStorageToken, ezxml_txt(toks));
setString("authStorageToken", authStorageToken);
}
@@ -258,7 +258,7 @@ int CMsnProto::MSN_GetPassportAuth(void) }
else {
const char* szFault = ezxml_txt(ezxml_get(tokf, "psf:error", 0, "psf:value", -1));
- retVal = strcmp(szFault, "0x80048821") == 0 ? 3 : (tokf ? 5 : 7);
+ retVal = mir_strcmp(szFault, "0x80048821") == 0 ? 3 : (tokf ? 5 : 7);
if (retVal != 3 && defaultUrlAllow) {
strcpy(szPassportHost, defaultPassportUrl);
defaultUrlAllow = false;
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp index afdc41d3a9..0e8926f27d 100644 --- a/protocols/MSN/src/msn_chat.cpp +++ b/protocols/MSN/src/msn_chat.cpp @@ -87,7 +87,7 @@ void CMsnProto::MSN_ChatStart(ezxml_t xmli) int j;
- if (!strcmp(xmli->txt, "thread")) return;
+ if (!mir_strcmp(xmli->txt, "thread")) return;
// If Chat ID already exists, don'T create a new one
const char *pszID = ezxml_txt(ezxml_child(xmli, "id"));
@@ -115,7 +115,7 @@ void CMsnProto::MSN_ChatStart(ezxml_t xmli) GCUserItem *gcu = NULL;
for (j = 0; j < info->mJoinedContacts.getCount(); j++) {
- if (!strcmp(info->mJoinedContacts[j]->WLID, mri)) {
+ if (!mir_strcmp(info->mJoinedContacts[j]->WLID, mri)) {
gcu = info->mJoinedContacts[j];
break;
}
@@ -127,7 +127,7 @@ void CMsnProto::MSN_ChatStart(ezxml_t xmli) }
_tcscpy(gcu->role, _A2T(role));
- if (pszCreator && !strcmp(mri, pszCreator)) info->mCreator = gcu;
+ 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))))
@@ -174,7 +174,7 @@ const TCHAR *CMsnProto::MSN_GCGetRole(GCThreadData* thread, const char *pszWLID) {
if (thread) {
for (int j = 0; j < thread->mJoinedContacts.getCount(); j++) {
- if (!strcmp(thread->mJoinedContacts[j]->WLID, pszWLID)) {
+ if (!mir_strcmp(thread->mJoinedContacts[j]->WLID, pszWLID)) {
return thread->mJoinedContacts[j]->role;
}
}
@@ -184,7 +184,7 @@ const TCHAR *CMsnProto::MSN_GCGetRole(GCThreadData* thread, const char *pszWLID) void CMsnProto::MSN_GCProcessThreadActivity(ezxml_t xmli, const TCHAR *mChatID)
{
- if (!strcmp(xmli->name, "topicupdate")) {
+ if (!mir_strcmp(xmli->name, "topicupdate")) {
ezxml_t initiator = ezxml_child(xmli, "initiator");
GCDEST gcd = { m_szModuleName, mChatID, GC_EVENT_TOPIC};
GCEVENT gce = { sizeof(gce), &gcd };
@@ -204,20 +204,20 @@ void CMsnProto::MSN_GCProcessThreadActivity(ezxml_t xmli, const TCHAR *mChatID) GCEVENT gce = { sizeof(gce), &gcd };
gce.dwFlags = GCEF_ADDTOLOG;
- if (!strcmp(xmli->name, "deletemember")) {
+ if (!mir_strcmp(xmli->name, "deletemember")) {
gcd.iType = GC_EVENT_PART;
if (ezxml_t initiator = ezxml_child(xmli, "initiator")) {
- if (strcmp(initiator->txt, target->txt)) {
+ if (mir_strcmp(initiator->txt, target->txt)) {
hContInitiator = MSN_HContactFromEmail(initiator->txt);
gce.ptszStatus = GetContactNameT(hContInitiator);
gcd.iType = GC_EVENT_KICK;
}
}
}
- else if (!strcmp(xmli->name, "addmember")) {
+ else if (!mir_strcmp(xmli->name, "addmember")) {
gcd.iType = GC_EVENT_JOIN;
}
- else if (!strcmp(xmli->name, "roleupdate")) {
+ else if (!mir_strcmp(xmli->name, "roleupdate")) {
gcd.iType = GC_EVENT_ADDSTATUS;
if (ezxml_t initiator = ezxml_child(xmli, "initiator")) {
hContInitiator = MSN_HContactFromEmail(initiator->txt);
@@ -242,7 +242,7 @@ void CMsnProto::MSN_GCProcessThreadActivity(ezxml_t xmli, const TCHAR *mChatID) break;
case GC_EVENT_ADDSTATUS:
case GC_EVENT_REMOVESTATUS:
- gcd.iType = strcmp(ezxml_txt(ezxml_child(target, "role")), "admin")==0?GC_EVENT_ADDSTATUS:GC_EVENT_REMOVESTATUS;
+ gcd.iType = mir_strcmp(ezxml_txt(ezxml_child(target, "role")), "admin")==0?GC_EVENT_ADDSTATUS:GC_EVENT_REMOVESTATUS;
pszTarget = ezxml_txt(ezxml_child(target, "id"));
break;
}
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp index e4fc9428e1..33903878c2 100644 --- a/protocols/MSN/src/msn_commands.cpp +++ b/protocols/MSN/src/msn_commands.cpp @@ -154,7 +154,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para msgBody = tHeader.readFromBuffer(msgBody);
msgBody = tHeader.readFromBuffer(msgBody);
nick = NEWSTR_ALLOCA(tHeader["IM-Display-Name"]);
- if (!strcmp(tHeader["Message-Type"], "RichText")) {
+ if (!mir_strcmp(tHeader["Message-Type"], "RichText")) {
msgBody = NEWSTR_ALLOCA(msgBody);
stripHTML(msgBody);
HtmlDecode(msgBody);
@@ -216,7 +216,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para if (!_stricmp(tHeader["Message-Type"], "RichText/Contacts")) {
ezxml_t xmli = ezxml_parse_str(msgBody, mir_strlen(msgBody));
if (xmli) {
- if (!strcmp(xmli->name, "contacts")) {
+ if (!mir_strcmp(xmli->name, "contacts")) {
ezxml_t c;
int cnt;
PROTOSEARCHRESULT **isr;
@@ -357,7 +357,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para tContact = gci.hContact;
}
else tContact = MSN_HContactFromEmail(email, nick, true, true);
- if (!strcmp(tHeader["Message-Type"], "Nudge"))
+ if (!mir_strcmp(tHeader["Message-Type"], "Nudge"))
NotifyEventHooks(hMSNNudge, (WPARAM)tContact, 0);
#ifdef OBSOLETE
@@ -536,7 +536,7 @@ void CMsnProto::MSN_ProcessNLN(const char *userStatus, const char *wlid, char *u }
char *pszUrl, *pszAvatarHash;
- if (cmdstring && *cmdstring && strcmp(cmdstring, "0") &&
+ if (cmdstring && *cmdstring && mir_strcmp(cmdstring, "0") &&
(pszAvatarHash = MSN_GetAvatarHash(cmdstring, &pszUrl)))
{
setString(hContact, "PictContext", cmdstring);
@@ -554,7 +554,7 @@ void CMsnProto::MSN_ProcessNLN(const char *userStatus, const char *wlid, char *u else {
char szSavedContext[64];
int result = db_get_static(hContact, m_szModuleName, "PictSavedContext", szSavedContext, sizeof(szSavedContext));
- if (result || strcmp(szSavedContext, cmdstring))
+ if (result || mir_strcmp(szSavedContext, cmdstring))
pushAvatarRequest(hContact, pszUrl);
}
}
@@ -588,11 +588,11 @@ void CMsnProto::MSN_ProcessStatusMessage(ezxml_t xmli, const char* wlid) for (ezxml_t s = ezxml_child(xmli, "s"); s; s = s->next) {
const char *n = ezxml_attr(s, "n");
- if (!strcmp(n, "SKP")) {
+ if (!mir_strcmp(n, "SKP")) {
szStatMsg = ezxml_txt(ezxml_child(s, "Mood"));
if (*szStatMsg) db_set_utf(hContact, "CList", "StatusMsg", szStatMsg);
else if (!bHasPSM) db_unset(hContact, "CList", "StatusMsg");
- } else if (!strcmp(n, "PE")) {
+ } else if (!mir_strcmp(n, "PE")) {
szStatMsg = ezxml_txt(ezxml_child(s, "PSM"));
if (*szStatMsg) {
stripBBCode((char*)szStatMsg);
@@ -607,7 +607,7 @@ void CMsnProto::MSN_ProcessStatusMessage(ezxml_t xmli, const char* wlid) // Add endpoints
for (ezxml_t endp = ezxml_child(xmli, "sep"); endp; endp = ezxml_next(endp)) {
const char *n = ezxml_attr(endp, "n");
- if (!strcmp(n, "IM")) {
+ if (!mir_strcmp(n, "IM")) {
const char *id = ezxml_attr(endp, "epid");
const char *caps = ezxml_txt(ezxml_child(endp, "Capabilities"));
char* end = NULL;
@@ -736,7 +736,7 @@ void CMsnProto::MSN_ProcessNotificationMessage(char* buf, size_t len) if (buf == NULL) return;
ezxml_t xmlnot = ezxml_parse_str(buf, len);
- if (strcmp(ezxml_attr(xmlnot, "siteid"), "0") == 0) {
+ if (mir_strcmp(ezxml_attr(xmlnot, "siteid"), "0") == 0) {
ezxml_free(xmlnot);
return;
}
@@ -858,7 +858,7 @@ LBL_InvalidCommand: char* msgBody = tHeader.readFromBuffer((char*)buf.surelyRead(atol(data.strMsgBytes)));
replaceStr(msnRegistration,tHeader["Set-Registration"]);
- if (!strcmp(data.typeId, "CON")) {
+ if (!mir_strcmp(data.typeId, "CON")) {
ezxml_t xmlbnd = ezxml_parse_str(msgBody, mir_strlen(msgBody));
ezxml_t xmlbdy = ezxml_child(xmlbnd, "nonce");
if (xmlbdy)
@@ -886,7 +886,7 @@ LBL_InvalidCommand: HReadBuffer buf(info, 0);
char* msgBody = (char*)buf.surelyRead(atol(data.strMsgBytes));
- if (strcmp(data.typeId, "CON")) break;
+ if (mir_strcmp(data.typeId, "CON")) break;
if (MyOptions.netId!=NETID_SKYPE) {
/* MSN account login */
@@ -960,7 +960,7 @@ LBL_InvalidCommand: if (tHeader["Set-Registration"]) replaceStr(msnRegistration,tHeader["Set-Registration"]);
if (xmli = ezxml_parse_str(msgBody, mir_strlen(msgBody)))
{
- if (!strcmp(xmli->name, "recentconversations-response"))
+ if (!mir_strcmp(xmli->name, "recentconversations-response"))
{
for (ezxml_t conv = ezxml_get(xmli, "conversations", 0, "conversation", -1); conv != NULL; conv = ezxml_next(conv)) {
ezxml_t id;
@@ -993,7 +993,7 @@ LBL_InvalidCommand: }
}
}
- else if (!strcmp(xmli->name, "messagesbyconversation-response")) {
+ else if (!mir_strcmp(xmli->name, "messagesbyconversation-response")) {
ezxml_t id;
MCONTACT hContact;
@@ -1022,7 +1022,7 @@ LBL_InvalidCommand: message=content->txt;
sentMsg = stricmp(email, GetMyUsername(atoi(netId)))==0;
if (msgtype) {
- if (!strcmp(msgtype->txt, "RichText")) {
+ if (!mir_strcmp(msgtype->txt, "RichText")) {
message = NEWSTR_ALLOCA(message);
stripHTML(message);
HtmlDecode(message);
@@ -1032,7 +1032,7 @@ LBL_InvalidCommand: ezxml_free(xmlact);
}
continue;
- } else if (strcmp(msgtype->txt, "Text")) continue;
+ } else if (mir_strcmp(msgtype->txt, "Text")) continue;
/* TODO: Implement i.e. RichText/Files for announcement of file transfers */
}
@@ -1091,7 +1091,7 @@ LBL_InvalidCommand: msgs.destroy();
}
}
- else if (!strcmp(xmli->name, "threads-response")) {
+ else if (!mir_strcmp(xmli->name, "threads-response")) {
for (ezxml_t thread = ezxml_get(xmli, "threads", 0, "thread", -1); thread != NULL; thread = ezxml_next(thread))
MSN_ChatStart(thread);
}
@@ -1114,19 +1114,19 @@ LBL_InvalidCommand: HReadBuffer buf(info, 0);
char* msgBody = (char*)buf.surelyRead(atol(data.strMsgBytes));
if (msgBody == NULL) break;
- if (!strcmp(data.typeId, "MSGR\\HOTMAIL")) {
+ if (!mir_strcmp(data.typeId, "MSGR\\HOTMAIL")) {
char szParam[128];
mir_snprintf(szParam, sizeof(szParam), "%s %s", data.typeId, data.strMsgBytes);
MSN_ReceiveMessage(info, cmdString, szParam);
break;
- } else if (!strcmp(data.typeId, "MSGR\\ABCH")) {
+ } else if (!mir_strcmp(data.typeId, "MSGR\\ABCH")) {
MimeHeaders tHeader;
msgBody = tHeader.readFromBuffer(msgBody);
MSN_ProcessNotificationMessage(msgBody, mir_strlen(msgBody));
break;
}
- if (!strcmp(data.typeId, "MSGR\\PUT") || !strcmp(data.typeId, "MSGR\\DEL")) {
+ if (!mir_strcmp(data.typeId, "MSGR\\PUT") || !mir_strcmp(data.typeId, "MSGR\\DEL")) {
MimeHeaders tHeader;
int i;
@@ -1141,12 +1141,12 @@ LBL_InvalidCommand: ezxml_t xmli;
if (xmli = ezxml_parse_str(msgBody, mir_strlen(msgBody)))
{
- if (!strcmp(xmli->name, "user"))
+ if (!mir_strcmp(xmli->name, "user"))
{
ezxml_t xmlstatus = ezxml_get(xmli, "s", 0, "Status", -1);
/* FIXME: MSGR\DEL: Instance of user with given EPID disconnected, not
* sure if this implies that contact is offline now... */
- if (xmlstatus || !strcmp(data.typeId, "MSGR\\DEL"))
+ if (xmlstatus || !mir_strcmp(data.typeId, "MSGR\\DEL"))
{
// These capabilities seem to be something different than in previous MSNP versions?
//ezxml_t xmlcaps = ezxml_get(xmli, "sep", 0, "Capabilities", -1);
@@ -1159,7 +1159,7 @@ LBL_InvalidCommand: }
}
}
- else if (!strcmp(data.typeId, "MSGR\\THREAD")) {
+ else if (!mir_strcmp(data.typeId, "MSGR\\THREAD")) {
MimeHeaders tHeader;
char *msgBody = tHeader.readFromBuffer(info->mData);
ezxml_t xmli;
@@ -1201,7 +1201,7 @@ LBL_InvalidCommand: } else { // PUT
ezxml_t xmli;
if (*msgBody && (xmli = ezxml_parse_str(msgBody, mir_strlen(msgBody)))) {
- if (!strcmp(xmli->name, "presence-response")) {
+ if (!mir_strcmp(xmli->name, "presence-response")) {
ezxml_t user, from;
if ((user = ezxml_child(xmli, "user")) && (from = ezxml_child(xmli, "from"))) {
if (ezxml_t xmlstatus = ezxml_get(user, "s", 0, "Status", -1)) {
@@ -1238,7 +1238,7 @@ LBL_InvalidCommand: MimeHeaders tHeader;
HReadBuffer buf(info, 0);
char* msgBody = tHeader.readFromBuffer((char*)buf.surelyRead(atol(data.strMsgBytes)));
- if (!strcmp(data.typeId, "CON")) {
+ if (!mir_strcmp(data.typeId, "CON")) {
ezxml_t xmlxfr = ezxml_parse_str(msgBody, mir_strlen(msgBody));
ezxml_t xmltgt = ezxml_child(xmlxfr, "target");
if (xmltgt)
@@ -1319,14 +1319,14 @@ void CMsnProto::MSN_InviteMessage(ThreadData* info, char* msgBody, char* email, // const char* Connectivity = tFileInfo["Connectivity"];
if (AppGUID != NULL) {
- if (!strcmp(AppGUID, "{02D3C01F-BF30-4825-A83A-DE7AF41648AA}")) {
+ if (!mir_strcmp(AppGUID, "{02D3C01F-BF30-4825-A83A-DE7AF41648AA}")) {
MSN_ShowPopup(info->getContactHandle(),
TranslateT("Contact tried to open an audio conference (not currently supported)"), MSN_ALLOW_MSGBOX);
return;
}
}
- if (Invcommand && (strcmp(Invcommand, "CANCEL") == 0)) {
+ if (Invcommand && (mir_strcmp(Invcommand, "CANCEL") == 0)) {
delete info->mMsnFtp;
info->mMsnFtp = NULL;
}
@@ -1709,7 +1709,7 @@ LBL_InvalidCommand: break;
}
- if (strcmp(tWords[0], "OK") != 0) {
+ if (mir_strcmp(tWords[0], "OK") != 0) {
size_t len = atol(tWords[0]);
MSN_ProcessAdd((char*)HReadBuffer(info, 0).surelyRead(len), len);
}
@@ -1773,7 +1773,7 @@ LBL_InvalidCommand: // see if the session is quit due to idleness
if (info->mChatID[0] && personleft == 1) {
- if (!strcmp(data.isIdle, "1")) {
+ if (!mir_strcmp(data.isIdle, "1")) {
GCDEST gcd = { m_szModuleName, info->mChatID, GC_EVENT_INFORMATION };
GCEVENT gce = { sizeof(gce), &gcd };
gce.dwFlags = GCEF_ADDTOLOG;
@@ -1899,7 +1899,7 @@ LBL_InvalidCommand: UrlDecode(data.userNick);
MCONTACT hContact = MSN_HContactFromEmail(data.userEmail, data.userNick, true, true);
- if (tNumTokens == 5 && strcmp(data.flags, "0:0")) {
+ if (tNumTokens == 5 && mir_strcmp(data.flags, "0:0")) {
MsnContact *cont = Lists_Get(data.userEmail);
if (cont) {
char* end = NULL;
@@ -1913,7 +1913,7 @@ LBL_InvalidCommand: setWord(hContact, "Status", ID_STATUS_INVISIBLE);
// only start the chat session after all the IRO messages has been recieved
- if (info->mJoinedContactsWLID.getCount() > 1 && !strcmp(data.strThisContact, data.totalContacts))
+ if (info->mJoinedContactsWLID.getCount() > 1 && !mir_strcmp(data.strThisContact, data.totalContacts))
MSN_ChatStart(info);
}
}
@@ -1963,7 +1963,7 @@ LBL_InvalidCommand: return 1;
}
- if (strcmp(wlid, "chat") == 0) {
+ if (mir_strcmp(wlid, "chat") == 0) {
MsgQueueEntry E;
MsgQueue_GetNext(wlid, E);
@@ -2080,7 +2080,7 @@ LBL_InvalidCommand: if (sttDivideWords(params, 1, tWords) != 1)
goto LBL_InvalidCommand;
- if (strcmp(tWords[0], "OK") != 0) {
+ if (mir_strcmp(tWords[0], "OK") != 0) {
size_t len = atol(tWords[0]);
MSN_ProcessRemove((char*)HReadBuffer(info, 0).surelyRead(len), len);
}
@@ -2104,7 +2104,7 @@ LBL_InvalidCommand: stripBBCode(data.callerNick);
stripColorCode(data.callerNick);
- if (strcmp(data.security, "CKI")) {
+ if (mir_strcmp(data.security, "CKI")) {
debugLogA("Unknown security package in RNG command: %s", data.security);
break;
}
@@ -2212,7 +2212,7 @@ LBL_InvalidCommand: UrlDecode(data.userHandle); UrlDecode(data.friendlyName);
- if (strcmp(data.status, "OK")) {
+ if (mir_strcmp(data.status, "OK")) {
debugLogA("Unknown status to USR command (SB): '%s'", data.status);
break;
}
@@ -2228,7 +2228,7 @@ LBL_InvalidCommand: if (sttDivideWords(params, 4, tWords) != 4)
goto LBL_InvalidCommand;
- if (!strcmp(data.security, "SSO")) {
+ if (!mir_strcmp(data.security, "SSO")) {
if (MSN_GetPassportAuth()) {
m_iDesiredStatus = ID_STATUS_OFFLINE;
return 1;
@@ -2241,7 +2241,7 @@ LBL_InvalidCommand: ForkThread(&CMsnProto::msn_keepAliveThread, NULL);
ForkThread(&CMsnProto::MSNConnDetectThread, NULL);
}
- else if (!strcmp(data.security, "OK")) {
+ else if (!mir_strcmp(data.security, "OK")) {
}
else {
debugLogA("Unknown security package '%s'", data.security);
@@ -2309,7 +2309,7 @@ LBL_InvalidCommand: if (numWords < 3)
goto LBL_InvalidCommand;
- if (!strcmp(data.type, "NS")) { //notification server
+ if (!mir_strcmp(data.type, "NS")) { //notification server
UrlDecode(data.newServer);
ThreadData* newThread = new ThreadData;
strcpy(newThread->mServer, data.newServer);
@@ -2324,13 +2324,13 @@ LBL_InvalidCommand: return 1; //kill the old thread
}
- if (!strcmp(data.type, "SB")) { //switchboard server
+ if (!mir_strcmp(data.type, "SB")) { //switchboard server
UrlDecode(data.newServer);
if (numWords < 4)
goto LBL_InvalidCommand;
- if (strcmp(data.security, "CKI")) {
+ if (mir_strcmp(data.security, "CKI")) {
debugLogA("Unknown XFR SB security package '%s'", data.security);
break;
}
diff --git a/protocols/MSN/src/msn_contact.cpp b/protocols/MSN/src/msn_contact.cpp index 6087c99a8b..ea27761a17 100644 --- a/protocols/MSN/src/msn_contact.cpp +++ b/protocols/MSN/src/msn_contact.cpp @@ -61,7 +61,7 @@ MCONTACT CMsnProto::MSN_HContactFromChatID(const char* wlid) if (isChatRoom(hContact) != 0) {
DBVARIANT dbv;
if (getString(hContact, "ChatRoomID", &dbv) == 0) {
- if (strcmp(dbv.pszVal, wlid) == 0) {
+ if (mir_strcmp(dbv.pszVal, wlid) == 0) {
db_free(&dbv);
return hContact;
}
@@ -172,7 +172,7 @@ bool CMsnProto::MSN_AddUser(MCONTACT hContact, const char* email, int netId, int }
else {
DBVARIANT dbv = { 0 };
- if (!strcmp(email, MyOptions.szEmail))
+ if (!mir_strcmp(email, MyOptions.szEmail))
getStringUtf("Nick", &dbv);
unsigned res1 = MSN_ABContactAdd(email, dbv.pszVal, netId, msg, false);
diff --git a/protocols/MSN/src/msn_ftold.cpp b/protocols/MSN/src/msn_ftold.cpp index f30b06bb66..df6a63679e 100644 --- a/protocols/MSN/src/msn_ftold.cpp +++ b/protocols/MSN/src/msn_ftold.cpp @@ -164,10 +164,10 @@ LBL_InvalidCommand: break;
}
- if (strcmp(protocol1, "MSNFTP") != 0) {
+ if (mir_strcmp(protocol1, "MSNFTP") != 0) {
int tempInt;
int tFieldCount = sscanf(params, "%d %6s", &tempInt, protocol1);
- if (tFieldCount != 2 || strcmp(protocol1, "MSNFTP") != 0) {
+ if (tFieldCount != 2 || mir_strcmp(protocol1, "MSNFTP") != 0) {
debugLogA("Another side requested the unknown protocol (%s), closing thread", params);
return 1;
}
diff --git a/protocols/MSN/src/msn_mail.cpp b/protocols/MSN/src/msn_mail.cpp index 984e8fe8b2..eb4242b1d7 100644 --- a/protocols/MSN/src/msn_mail.cpp +++ b/protocols/MSN/src/msn_mail.cpp @@ -182,7 +182,7 @@ void CMsnProto::getMetaData(void) void CMsnProto::processMailData(char* mailData)
{
- if (strcmp(mailData, "too-large") == 0) {
+ if (mir_strcmp(mailData, "too-large") == 0) {
getMetaData();
}
else {
@@ -232,13 +232,13 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial) if (MsgDelta != NULL) {
int iDelta = atol(MsgDelta);
- if (SrcFolder && strcmp(SrcFolder, "ACTIVE") == 0)
+ if (SrcFolder && mir_strcmp(SrcFolder, "ACTIVE") == 0)
mUnreadMessages -= iDelta;
- else if (DestFolder && strcmp(DestFolder, "ACTIVE") == 0)
+ else if (DestFolder && mir_strcmp(DestFolder, "ACTIVE") == 0)
mUnreadMessages += iDelta;
- if (SrcFolder && strcmp(SrcFolder, "HM_BuLkMail_") == 0)
+ if (SrcFolder && mir_strcmp(SrcFolder, "HM_BuLkMail_") == 0)
mUnreadJunkEmails -= iDelta;
- else if (DestFolder && strcmp(DestFolder, "HM_BuLkMail_") == 0)
+ else if (DestFolder && mir_strcmp(DestFolder, "HM_BuLkMail_") == 0)
mUnreadJunkEmails += iDelta;
if (mUnreadJunkEmails < 0) mUnreadJunkEmails = 0;
@@ -247,8 +247,8 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial) if (From != NULL && Subject != NULL && Fromaddr != NULL) {
if (DestFolder != NULL && SrcFolder == NULL) {
- mUnreadMessages += strcmp(DestFolder, "ACTIVE") == 0;
- mUnreadJunkEmails += strcmp(DestFolder, "HM_BuLkMail_") == 0;
+ mUnreadMessages += mir_strcmp(DestFolder, "ACTIVE") == 0;
+ mUnreadJunkEmails += mir_strcmp(DestFolder, "HM_BuLkMail_") == 0;
}
wchar_t* mimeFromW = tFileInfo.decode(From);
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index c596f06b87..82cbbc7a8e 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -364,7 +364,7 @@ static CMsnProto* GetProtoInstanceByHContact(MCONTACT hContact) return NULL;
for (int i = 0; i < g_Instances.getCount(); i++)
- if (!strcmp(szProto, g_Instances[i].m_szModuleName))
+ if (!mir_strcmp(szProto, g_Instances[i].m_szModuleName))
return &g_Instances[i];
return NULL;
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index b6e3f3456e..8776bfd310 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -304,7 +304,7 @@ int CMsnProto::MSN_SetMyAvatar(const TCHAR* sztFname, void* pData, size_t cbLen) char szAvatarHashdOld[41] = "";
db_get_static(NULL, m_szModuleName, "AvatarHash", szAvatarHashdOld, sizeof(szAvatarHashdOld));
char *szAvatarHash = arrayToHex(sha1d, sizeof(sha1d));
- if (strcmp(szAvatarHashdOld, szAvatarHash)) {
+ if (mir_strcmp(szAvatarHashdOld, szAvatarHash)) {
setString("PictObject", szEncodedBuffer);
setString("AvatarHash", szAvatarHash);
}
@@ -690,7 +690,7 @@ void CMsnProto::MSN_SendStatusMessage(const char* msg) }
mir_free(msgEnc);
- if (msnPreviousUUX == NULL || strcmp(msnPreviousUUX, szMsg)) {
+ if (msnPreviousUUX == NULL || mir_strcmp(msnPreviousUUX, szMsg)) {
replaceStr(msnPreviousUUX, szMsg);
msnNsThread->sendPacket("UUX", "%d\r\n%s", sz, szMsg);
mStatusMsgTS = clock();
@@ -1336,7 +1336,7 @@ char* TWinErrorCode::getText() bool CMsnProto::MSN_IsMyContact(MCONTACT hContact)
{
const char* szProto = GetContactProto(hContact);
- return szProto != NULL && strcmp(m_szModuleName, szProto) == 0;
+ return szProto != NULL && mir_strcmp(m_szModuleName, szProto) == 0;
}
bool CMsnProto::MSN_IsMeByContact(MCONTACT hContact, char* szEmail)
diff --git a/protocols/MSN/src/msn_natdetect.cpp b/protocols/MSN/src/msn_natdetect.cpp index 00709b25bd..3920feeaf9 100644 --- a/protocols/MSN/src/msn_natdetect.cpp +++ b/protocols/MSN/src/msn_natdetect.cpp @@ -371,7 +371,7 @@ void CMsnProto::MSNConnDetectThread(void*) // if it does, move to connection type autodetection,
// if it does not, guess connection type from available info
db_get_static(NULL, m_szModuleName, "YourHost", parBuf, sizeof(parBuf));
- if (msnExternalIP == NULL || strcmp(msnExternalIP, parBuf) != 0) {
+ if (msnExternalIP == NULL || mir_strcmp(msnExternalIP, parBuf) != 0) {
MyConnection.extIP = inet_addr(parBuf);
if (MyConnection.extIP == INADDR_NONE) {
PHOSTENT myhost = gethostbyname(parBuf);
@@ -449,7 +449,7 @@ void CMsnProto::MSNConnDetectThread(void*) void MyConnectionType::SetUdpCon(const char* str)
{
for (unsigned i = 0; i < sizeof(conStr) / sizeof(char*); ++i) {
- if (strcmp(conStr[i], str) == 0) {
+ if (mir_strcmp(conStr[i], str) == 0) {
udpConType = (ConEnum)i;
break;
}
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp index 08565ce654..b073dadd40 100644 --- a/protocols/MSN/src/msn_opts.cpp +++ b/protocols/MSN/src/msn_opts.cpp @@ -226,7 +226,7 @@ LBL_Continue: CMsnProto* proto = (CMsnProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
GetDlgItemTextA(hwndDlg, IDC_HANDLE, szEmail, SIZEOF(szEmail));
- if (strcmp(_strlwr(szEmail), proto->MyOptions.szEmail)) {
+ if (mir_strcmp(_strlwr(szEmail), proto->MyOptions.szEmail)) {
reconnectRequired = true;
strcpy(proto->MyOptions.szEmail, szEmail);
proto->setString("e-mail", szEmail);
@@ -236,7 +236,7 @@ LBL_Continue: GetDlgItemTextA(hwndDlg, IDC_PASSWORD, password, SIZEOF(password));
if (!proto->getString("Password", &dbv)) {
- if (strcmp(password, dbv.pszVal)) {
+ if (mir_strcmp(password, dbv.pszVal)) {
reconnectRequired = true;
proto->setString("Password", password);
}
@@ -382,13 +382,13 @@ static INT_PTR CALLBACK DlgProcMsnConnOpts(HWND hwndDlg, UINT msg, WPARAM wParam CMsnProto* proto = (CMsnProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
GetDlgItemTextA(hwndDlg, IDC_DIRECTSERVER, str, SIZEOF(str));
- if (strcmp(str, MSN_DEFAULT_LOGIN_SERVER))
+ if (mir_strcmp(str, MSN_DEFAULT_LOGIN_SERVER))
proto->setString("DirectServer", str);
else
proto->delSetting("DirectServer");
GetDlgItemTextA(hwndDlg, IDC_GATEWAYSERVER, str, SIZEOF(str));
- if (strcmp(str, MSN_DEFAULT_GATEWAY))
+ if (mir_strcmp(str, MSN_DEFAULT_GATEWAY))
proto->setString("GatewayServer", str);
else
proto->delSetting("GatewayServer");
@@ -552,7 +552,7 @@ static INT_PTR CALLBACK DlgProcAccMgrUI(HWND hwndDlg, UINT msg, WPARAM wParam, L CMsnProto* proto = (CMsnProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
GetDlgItemTextA(hwndDlg, IDC_HANDLE, szEmail, SIZEOF(szEmail));
- if (strcmp(szEmail, proto->MyOptions.szEmail)) {
+ if (mir_strcmp(szEmail, proto->MyOptions.szEmail)) {
strcpy(proto->MyOptions.szEmail, szEmail);
proto->setString("e-mail", szEmail);
proto->setString("wlid", szEmail);
@@ -561,7 +561,7 @@ static INT_PTR CALLBACK DlgProcAccMgrUI(HWND hwndDlg, UINT msg, WPARAM wParam, L GetDlgItemTextA(hwndDlg, IDC_PASSWORD, password, SIZEOF(password));
if (!proto->getString("Password", &dbv)) {
- if (strcmp(password, dbv.pszVal))
+ if (mir_strcmp(password, dbv.pszVal))
proto->setString("Password", password);
db_free(&dbv);
}
diff --git a/protocols/MSN/src/msn_p2p.cpp b/protocols/MSN/src/msn_p2p.cpp index fcba3a8e3f..2a515a0e8c 100644 --- a/protocols/MSN/src/msn_p2p.cpp +++ b/protocols/MSN/src/msn_p2p.cpp @@ -120,7 +120,7 @@ bool CMsnProto::p2p_createListener(filetransfer* ft, directconnection *dc, MimeH }
else {
if (i4++ != 0) strcat(szIpv4, " ");
- ipInt |= (strcmp(ihaddr->szIp[i], szExtIp) == 0);
+ ipInt |= (mir_strcmp(ihaddr->szIp[i], szExtIp) == 0);
strcat(szIpv4, ihaddr->szIp[i]);
}
}
@@ -731,7 +731,7 @@ bool CMsnProto::p2p_connectTo(ThreadData* info, directconnection *dc) if (dc->useHashedNonce) {
char* hnonce = dc->calcHashedNonce((UUID*)&cookie.mAckSessionID);
- cookieMatch = strcmp(hnonce, dc->xNonce) == 0;
+ cookieMatch = mir_strcmp(hnonce, dc->xNonce) == 0;
mir_free(hnonce);
}
else
@@ -739,7 +739,7 @@ bool CMsnProto::p2p_connectTo(ThreadData* info, directconnection *dc) }
else {
char* hnonce = dc->calcHashedNonce((UUID*)p);
- cookieMatch = strcmp(hnonce, dc->xNonce) == 0;
+ cookieMatch = mir_strcmp(hnonce, dc->xNonce) == 0;
mir_free(hnonce);
}
@@ -794,7 +794,7 @@ LBL_Error: if (dc->useHashedNonce) {
char* hnonce = dc->calcHashedNonce((UUID*)&cookie.mAckSessionID);
- cookieMatch = strcmp(hnonce, dc->xNonce) == 0;
+ cookieMatch = mir_strcmp(hnonce, dc->xNonce) == 0;
mir_free(hnonce);
memcpy(&cookie.mAckSessionID, dc->mNonce, sizeof(UUID));
}
@@ -812,7 +812,7 @@ LBL_Error: }
else {
char* hnonce = dc->calcHashedNonce((UUID*)p);
- cookieMatch = strcmp(hnonce, dc->xNonce) == 0;
+ cookieMatch = mir_strcmp(hnonce, dc->xNonce) == 0;
mir_free(hnonce);
if (!cookieMatch) {
@@ -1164,12 +1164,12 @@ void CMsnProto::p2p_InitFileTransfer( const char *szCtBuf = ezxml_attr(xmlcon, "SHA1C");
if (szCtBuf) {
const char *szPtBuf = ezxml_attr(xmldb, "SHA1C");
- pictmatch = szPtBuf && strcmp(szCtBuf, szPtBuf) == 0;
+ pictmatch = szPtBuf && mir_strcmp(szCtBuf, szPtBuf) == 0;
}
else {
const char *szCtBuf = ezxml_attr(xmlcon, "SHA1D");
const char *szPtBuf = ezxml_attr(xmldb, "SHA1D");
- pictmatch = szCtBuf && szPtBuf && strcmp(szCtBuf, szPtBuf) == 0;
+ pictmatch = szCtBuf && szPtBuf && mir_strcmp(szCtBuf, szPtBuf) == 0;
}
ezxml_free(xmlcon);
@@ -1349,8 +1349,8 @@ void CMsnProto::p2p_InitDirectTransfer(MimeHeaders& tFileInfo, MimeHeaders& tFil conType.extIP = atol(szNetID);
conType.SetUdpCon(szConnType);
- conType.upnpNAT = strcmp(szUPnPNat, "true") == 0;
- conType.icf = strcmp(szICF, "true") == 0;
+ conType.upnpNAT = mir_strcmp(szUPnPNat, "true") == 0;
+ conType.icf = mir_strcmp(szICF, "true") == 0;
conType.CalculateWeight();
MimeHeaders chdrs(12);
@@ -1445,7 +1445,7 @@ void CMsnProto::p2p_InitDirectTransfer2(MimeHeaders& tFileInfo, MimeHeaders& tFi dc->useHashedNonce = szHashedNonce != NULL;
replaceStr(dc->xNonce, szHashedNonce ? szHashedNonce : szNonce);
- if (!strcmp(szListening, "true") && strcmp(dc->xNonce, sttVoidUid)) {
+ if (!mir_strcmp(szListening, "true") && mir_strcmp(dc->xNonce, sttVoidUid)) {
p2p_startConnect(wlid, szCallID, szV6Address, szV6Port, true);
p2p_startConnect(wlid, szCallID, szInternalAddress, szInternalPort, false);
p2p_startConnect(wlid, szCallID, szExternalAddress, szExternalPort, false);
@@ -1495,7 +1495,7 @@ LBL_Close: MimeHeaders chdrs(12);
- if (!strcmp(szOldContentType, "application/x-msnmsgr-sessionreqbody")) {
+ if (!mir_strcmp(szOldContentType, "application/x-msnmsgr-sessionreqbody")) {
if (ft == &ftl) {
p2p_sendCancel(ft);
return;
@@ -1537,7 +1537,7 @@ LBL_Close: chdrs.addString("IPv6-global", GetGlobalIp(), 2);
chdrs.addString("Hashed-Nonce", dc->mNonceToHash(), 2);
}
- else if (!strcmp(szOldContentType, "application/x-msnmsgr-transrespbody")) {
+ else if (!mir_strcmp(szOldContentType, "application/x-msnmsgr-transrespbody")) {
const char *szListening = tFileInfo2["Listening"],
*szNonce = tFileInfo2["Nonce"],
*szHashedNonce = tFileInfo2["Hashed-Nonce"],
@@ -1565,7 +1565,7 @@ LBL_Close: replaceStr(dc->xNonce, szHashedNonce ? szHashedNonce : szNonce);
// another side reported that it will be a server.
- if (!strcmp(szListening, "true") && (szNonce == NULL || strcmp(szNonce, sttVoidUid))) {
+ if (!mir_strcmp(szListening, "true") && (szNonce == NULL || mir_strcmp(szNonce, sttVoidUid))) {
p2p_startConnect(ft->p2p_dest, szCallID, szV6Address, szV6Port, true);
p2p_startConnect(ft->p2p_dest, szCallID, szInternalAddress, szInternalPort, false);
p2p_startConnect(ft->p2p_dest, szCallID, szExternalAddress, szExternalPort, false);
@@ -1584,7 +1584,7 @@ LBL_Close: tResult.addString("Content-Type", "application/x-msnmsgr-transrespbody");
}
- else if (!strcmp(szOldContentType, "application/x-msnmsgr-transreqbody")) {
+ else if (!mir_strcmp(szOldContentType, "application/x-msnmsgr-transreqbody")) {
const char *szHashedNonce = tFileInfo2["Hashed-Nonce"];
const char *szNonce = tFileInfo2["Nonce"];
@@ -1650,17 +1650,17 @@ void CMsnProto::p2p_processSIP(ThreadData* info, char* msgbody, P2PB_Header* hdr }
if (hdrdata && !hdrdata->isV2Hdr()) {
- if (iMsgType == 2 || (iMsgType == 1 && !strcmp(szContentType, "application/x-msnmsgr-transreqbody")))
+ if (iMsgType == 2 || (iMsgType == 1 && !mir_strcmp(szContentType, "application/x-msnmsgr-transreqbody")))
p2p_getMsgId(wlid, 1);
}
switch (iMsgType) {
case 1:
- if (!strcmp(szContentType, "application/x-msnmsgr-sessionreqbody"))
+ if (!mir_strcmp(szContentType, "application/x-msnmsgr-sessionreqbody"))
p2p_InitFileTransfer(info, tFileInfo, tFileInfo2, wlid);
- else if (!strcmp(szContentType, "application/x-msnmsgr-transreqbody"))
+ else if (!mir_strcmp(szContentType, "application/x-msnmsgr-transreqbody"))
p2p_InitDirectTransfer(tFileInfo, tFileInfo2, wlid);
- else if (!strcmp(szContentType, "application/x-msnmsgr-transrespbody"))
+ else if (!mir_strcmp(szContentType, "application/x-msnmsgr-transrespbody"))
p2p_InitDirectTransfer2(tFileInfo, tFileInfo2, wlid);
break;
@@ -1669,7 +1669,7 @@ void CMsnProto::p2p_processSIP(ThreadData* info, char* msgbody, P2PB_Header* hdr break;
case 3:
- if (!strcmp(szContentType, "application/x-msnmsgr-sessionclosebody")) {
+ if (!mir_strcmp(szContentType, "application/x-msnmsgr-sessionclosebody")) {
filetransfer* ft = p2p_getSessionByCallID(tFileInfo["Call-ID"], wlid);
if (ft != NULL) {
if (ft->std.currentFileProgress < ft->std.currentFileSize) {
@@ -1710,12 +1710,12 @@ void CMsnProto::p2p_processSIP(ThreadData* info, char* msgbody, P2PB_Header* hdr break;
case 5:
- if (!strcmp(szContentType, "application/x-msnmsgr-turnsetup")) {
+ if (!mir_strcmp(szContentType, "application/x-msnmsgr-turnsetup")) {
// tFileInfo2["ServerAddress"];
// tFileInfo2["SessionUsername"];
// tFileInfo2["SessionPassword"];
}
- else if (!strcmp(szContentType, "application/x-msnmsgr-transudpswitch")) {
+ else if (!mir_strcmp(szContentType, "application/x-msnmsgr-transudpswitch")) {
// tFileInfo2["IPv6AddrsAndPorts"];
// tFileInfo2["IPv4ExternalAddrsAndPorts"];
// tFileInfo2["IPv4InternalAddrsAndPorts"];
@@ -2099,7 +2099,7 @@ void CMsnProto::p2p_invite(unsigned iAppID, filetransfer* ft, const char *wlid) if (cont->places.getCount() && cont->places[0].cap1 & cap_SupportsP2PBootstrap) {
char wlid[128];
mir_snprintf(wlid, SIZEOF(wlid),
- strcmp(cont->places[0].id, sttVoidUid) ? "%s;%s" : "%s",
+ mir_strcmp(cont->places[0].id, sttVoidUid) ? "%s;%s" : "%s",
cont->email, cont->places[0].id);
if (!MSN_GetThreadByContact(wlid, SERVER_P2P_DIRECT))
@@ -2150,7 +2150,7 @@ void CMsnProto::p2p_invite(unsigned iAppID, filetransfer* ft, const char *wlid) for (int i = 0; i < cont->places.getCount(); ++i) {
char wlid[128];
mir_snprintf(wlid, SIZEOF(wlid),
- strcmp(cont->places[i].id, sttVoidUid) ? "%s;%s" : "%s",
+ mir_strcmp(cont->places[i].id, sttVoidUid) ? "%s;%s" : "%s",
cont->email, cont->places[i].id);
p2p_sendSlp(-2, ft, tResult, chdrs, wlid);
diff --git a/protocols/MSN/src/msn_p2ps.cpp b/protocols/MSN/src/msn_p2ps.cpp index 4b0ded416d..7d288f9e2f 100644 --- a/protocols/MSN/src/msn_p2ps.cpp +++ b/protocols/MSN/src/msn_p2ps.cpp @@ -256,7 +256,7 @@ directconnection* CMsnProto::p2p_getDCByCallID(const char* CallID, const char* w for (int i = 0; i < m_arDirect.getCount(); i++) {
directconnection* DC = &m_arDirect[i];
- if (DC->callId != NULL && !strcmp(DC->callId, CallID) && !strcmp(DC->wlid, wlid))
+ if (DC->callId != NULL && !mir_strcmp(DC->callId, CallID) && !mir_strcmp(DC->wlid, wlid))
return DC;
}
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index c8e01b99c3..5a2036a115 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -98,8 +98,8 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) : char path[MAX_PATH];
if (db_get_static(NULL, m_szModuleName, "LoginServer", path, sizeof(path)) == 0 &&
- (strcmp(path, MSN_DEFAULT_LOGIN_SERVER) == 0 ||
- strcmp(path, MSN_DEFAULT_GATEWAY) == 0))
+ (mir_strcmp(path, MSN_DEFAULT_LOGIN_SERVER) == 0 ||
+ mir_strcmp(path, MSN_DEFAULT_GATEWAY) == 0))
delSetting("LoginServer");
if (MyOptions.SlowSend) {
@@ -267,7 +267,7 @@ MCONTACT __cdecl CMsnProto::AddToListByEvent(int flags, int, MEVENT hDbEvent) dbei.pBlob = (PBYTE)alloca(dbei.cbBlob);
if (db_event_get(hDbEvent, &dbei)) return NULL;
- if (strcmp(dbei.szModule, m_szModuleName)) return NULL;
+ if (mir_strcmp(dbei.szModule, m_szModuleName)) return NULL;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return NULL;
char* nick = (char *)(dbei.pBlob + sizeof(DWORD) * 2);
@@ -331,7 +331,7 @@ int CMsnProto::Authorize(MEVENT hDbEvent) if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return 1;
- if (strcmp(dbei.szModule, m_szModuleName))
+ if (mir_strcmp(dbei.szModule, m_szModuleName))
return 1;
char *nick = (char*)(dbei.pBlob + sizeof(DWORD) * 2);
@@ -369,7 +369,7 @@ int CMsnProto::AuthDeny(MEVENT hDbEvent, const TCHAR*) if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return 1;
- if (strcmp(dbei.szModule, m_szModuleName))
+ if (mir_strcmp(dbei.szModule, m_szModuleName))
return 1;
char* nick = (char*)(dbei.pBlob + sizeof(DWORD) * 2);
diff --git a/protocols/MSN/src/msn_soapab.cpp b/protocols/MSN/src/msn_soapab.cpp index ec01f9a0ee..e33a5d3ae8 100644 --- a/protocols/MSN/src/msn_soapab.cpp +++ b/protocols/MSN/src/msn_soapab.cpp @@ -59,7 +59,7 @@ ezxml_t CMsnProto::abSoapHdr(const char* service, const char* scenario, ezxml_t& tbdy = ezxml_add_child(bdy, service, 0);
ezxml_set_attr(tbdy, "xmlns", "http://www.msn.com/webservices/AddressBook");
- if (strstr(service, "Member") == NULL && strcmp(service, "ABAdd") != 0 && strcmp(service, "ABFindContactsPaged")) {
+ if (strstr(service, "Member") == NULL && mir_strcmp(service, "ABAdd") != 0 && mir_strcmp(service, "ABFindContactsPaged")) {
ezxml_t node = ezxml_add_child(tbdy, "abId", 0);
ezxml_set_txt(node, "00000000-0000-0000-0000-000000000000");
}
@@ -106,7 +106,7 @@ void CMsnProto::UpdateABHost(const char* service, const char* url) void CMsnProto::UpdateABCacheKey(ezxml_t bdy, bool isSharing)
{
ezxml_t hdr = ezxml_get(bdy, "soap:Header", 0, "ServiceHeader", -1);
- bool changed = strcmp(ezxml_txt(ezxml_child(hdr, "CacheKeyChanged")), "true") == 0;
+ bool changed = mir_strcmp(ezxml_txt(ezxml_child(hdr, "CacheKeyChanged")), "true") == 0;
if (changed)
replaceStr(isSharing ? sharingCacheKey : abCacheKey, ezxml_txt(ezxml_child(hdr, "CacheKey")));
}
@@ -164,7 +164,7 @@ bool CMsnProto::MSN_ABAdd(bool allowRecurse) ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_ABAdd(false) ? 200 : 500;
}
@@ -260,42 +260,42 @@ bool CMsnProto::MSN_SharingFindMembership(bool deltas, bool allowRecurse) for (ezxml_t mems = ezxml_get(svcs, "Memberships", 0, "Membership", -1); mems != NULL; mems = ezxml_next(mems)) {
const char* szRole = ezxml_txt(ezxml_child(mems, "MemberRole"));
- int lstId = ((strcmp(szRole, "Allow") == 0) ? LIST_AL : ((strcmp(szRole, "Block") == 0) ? LIST_BL :
- ((strcmp(szRole, "Reverse") == 0) ? LIST_RL : ((strcmp(szRole, "Pending") == 0) ? LIST_PL : 0))));
+ int lstId = ((mir_strcmp(szRole, "Allow") == 0) ? LIST_AL : ((mir_strcmp(szRole, "Block") == 0) ? LIST_BL :
+ ((mir_strcmp(szRole, "Reverse") == 0) ? LIST_RL : ((mir_strcmp(szRole, "Pending") == 0) ? LIST_PL : 0))));
for (ezxml_t memb = ezxml_get(mems, "Members", 0, "Member", -1); memb != NULL; memb = ezxml_next(memb)) {
- bool deleted = strcmp(ezxml_txt(ezxml_child(memb, "Deleted")), "true") == 0;
+ bool deleted = mir_strcmp(ezxml_txt(ezxml_child(memb, "Deleted")), "true") == 0;
const char *szType = ezxml_txt(ezxml_child(memb, "Type"));
const char *szInvite = NULL, *szEmail = NULL, *szNick = NULL;
char email[128];
int netId;
- if (strcmp(szType, "Passport") == 0) {
+ if (mir_strcmp(szType, "Passport") == 0) {
netId = NETID_MSN;
szEmail = ezxml_txt(ezxml_child(memb, "PassportName"));
szNick = ezxml_txt(ezxml_child(memb, "DisplayName")); if (!szNick[0]) szNick = NULL;
ezxml_t anot = ezxml_get(memb, "Annotations", 0, "Annotation", -1);
while (anot != NULL) {
- if (strcmp(ezxml_txt(ezxml_child(anot, "Name")), "MSN.IM.InviteMessage") == 0)
+ if (mir_strcmp(ezxml_txt(ezxml_child(anot, "Name")), "MSN.IM.InviteMessage") == 0)
szInvite = ezxml_txt(ezxml_child(anot, "Value"));
anot = ezxml_next(anot);
}
}
- else if (strcmp(szType, "Phone") == 0) {
+ else if (mir_strcmp(szType, "Phone") == 0) {
netId = NETID_MOB;
mir_snprintf(email, SIZEOF(email), "tel:%s", ezxml_txt(ezxml_child(memb, "PhoneNumber")));
szEmail = email;
}
- else if (strcmp(szType, "Email") == 0) {
+ else if (mir_strcmp(szType, "Email") == 0) {
szEmail = ezxml_txt(ezxml_child(memb, "Email"));
szNick = ezxml_txt(ezxml_child(memb, "DisplayName")); if (!szNick[0]) szNick = NULL;
netId = strstr(szEmail, "@yahoo.com") ? NETID_YAHOO : NETID_LCS;
ezxml_t anot = ezxml_get(memb, "Annotations", 0, "Annotation", -1);
while (anot != NULL) {
- if (strcmp(ezxml_txt(ezxml_child(anot, "Name")), "MSN.IM.BuddyType") == 0)
+ if (mir_strcmp(ezxml_txt(ezxml_child(anot, "Name")), "MSN.IM.BuddyType") == 0)
netId = atol(ezxml_txt(ezxml_child(anot, "Value")));
- else if (strcmp(ezxml_txt(ezxml_child(anot, "Name")), "MSN.IM.InviteMessage") == 0)
+ else if (mir_strcmp(ezxml_txt(ezxml_child(anot, "Name")), "MSN.IM.InviteMessage") == 0)
szInvite = ezxml_txt(ezxml_child(anot, "Value"));
anot = ezxml_next(anot);
@@ -312,11 +312,11 @@ bool CMsnProto::MSN_SharingFindMembership(bool deltas, bool allowRecurse) }
else if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "ABDoesNotExist") == 0) {
+ if (mir_strcmp(szErr, "ABDoesNotExist") == 0) {
MSN_ABAdd();
status = 200;
}
- else if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ else if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_SharingFindMembership(deltas, false) ? 200 : 500;
}
@@ -394,7 +394,7 @@ bool CMsnProto::MSN_SharingAddDelMember(const char* szEmail, const int listId, c ezxml_set_txt(node, szEmail);
char buf[64];
- if ((netId == NETID_LCS || netId == NETID_YAHOO) && strcmp(szMethod, "DeleteMember") != 0) {
+ if ((netId == NETID_LCS || netId == NETID_YAHOO) && mir_strcmp(szMethod, "DeleteMember") != 0) {
node = ezxml_add_child(memb, "Annotations", 0);
ezxml_t anot = ezxml_add_child(node, "Annotation", 0);
node = ezxml_add_child(anot, "Name", 0);
@@ -429,7 +429,7 @@ bool CMsnProto::MSN_SharingAddDelMember(const char* szEmail, const int listId, c UpdateABCacheKey(xmlm, true);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_SharingAddDelMember(szEmail, listId, netId, szMethod, false) ? 200 : 500;
}
@@ -506,7 +506,7 @@ bool CMsnProto::MSN_SharingMyProfile(bool allowRecurse) ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
MSN_SharingMyProfile(false);
}
@@ -554,7 +554,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas }
const char *szGroups, *szContacts, *szLastChangeStr;
- if (strcmp(szMethod, "ABFindContactsPaged")) {
+ if (mir_strcmp(szMethod, "ABFindContactsPaged")) {
ezxml_t node = ezxml_add_child(tbdy, "abView", 0);
ezxml_set_txt(node, "Full");
node = ezxml_add_child(tbdy, "deltasOnly", 0);
@@ -625,7 +625,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas UpdateABHost(szMethod, body ? abUrl : NULL);
ezxml_t ab = ezxml_child(body, "Ab");
- if (strcmp(szMethod, "ABFindByContacts")) {
+ if (mir_strcmp(szMethod, "ABFindByContacts")) {
const char* szLastChange = ezxml_txt(ezxml_child(ab, szLastChangeStr));
if (szLastChange[0])
setString("ABFullLastChange", szLastChange);
@@ -655,25 +655,25 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas ezxml_t contInf = ezxml_child(cont, "contactInfo");
const char* szType = ezxml_txt(ezxml_child(contInf, "contactType"));
- if (strcmp(szType, "Me") != 0) {
+ if (mir_strcmp(szType, "Me") != 0) {
char email[128];
const char* szEmail = ezxml_txt(ezxml_child(contInf, "passportName"));
const char* szMsgUsr = ezxml_txt(ezxml_child(contInf, "isMessengerUser"));
int netId = NETID_UNKNOWN;
- if (strcmp(szMsgUsr, "true") == 0) netId = NETID_MSN;
+ if (mir_strcmp(szMsgUsr, "true") == 0) netId = NETID_MSN;
if (szEmail[0] == '\0') {
ezxml_t eml = ezxml_get(contInf, "emails", 0, "ContactEmail", -1);
while (eml != NULL) {
szMsgUsr = ezxml_txt(ezxml_child(eml, "isMessengerEnabled"));
- if (strcmp(szMsgUsr, "true") == 0) {
+ if (mir_strcmp(szMsgUsr, "true") == 0) {
szEmail = ezxml_txt(ezxml_child(eml, "email"));
const char* szCntType = ezxml_txt(ezxml_child(eml, "contactEmailType"));
- if (strcmp(szCntType, "Messenger2") == 0)
+ if (mir_strcmp(szCntType, "Messenger2") == 0)
netId = NETID_YAHOO;
- else if (strcmp(szCntType, "Messenger3") == 0)
+ else if (mir_strcmp(szCntType, "Messenger3") == 0)
netId = NETID_LCS;
break;
}
@@ -684,7 +684,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas ezxml_t phn = ezxml_get(contInf, "phones", 0, "ContactPhone", -1);
while (phn != NULL) {
szMsgUsr = ezxml_txt(ezxml_child(phn, "isMessengerEnabled"));
- if (strcmp(szMsgUsr, "true") == 0) {
+ if (mir_strcmp(szMsgUsr, "true") == 0) {
szEmail = ezxml_txt(ezxml_child(phn, "number"));
mir_snprintf(email, SIZEOF(email), "tel:%s", szEmail);
szEmail = email;
@@ -714,11 +714,11 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas const char* szNick = NULL;
ezxml_t anot = ezxml_get(contInf, "annotations", 0, "Annotation", -1);
while (anot != NULL) {
- if (strcmp(ezxml_txt(ezxml_child(anot, "Name")), "AB.NickName") == 0) {
+ if (mir_strcmp(ezxml_txt(ezxml_child(anot, "Name")), "AB.NickName") == 0) {
szNick = ezxml_txt(ezxml_child(anot, "Value"));
db_set_utf(hContact, "CList", "MyHandle", szNick);
}
- if (strcmp(ezxml_txt(ezxml_child(anot, "Name")), "AB.JobTitle") == 0) {
+ if (mir_strcmp(ezxml_txt(ezxml_child(anot, "Name")), "AB.JobTitle") == 0) {
const char *szTmp = ezxml_txt(ezxml_child(anot, "Value"));
SetAbParam(hContact, "CompanyPosition", szTmp);
}
@@ -746,10 +746,10 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas SetAbParam(hContact, "CID", szTmp);
szTmp = ezxml_txt(ezxml_child(contInf, "IsNotMobileVisible"));
- setByte(hContact, "MobileAllowed", strcmp(szTmp, "true") != 0);
+ setByte(hContact, "MobileAllowed", mir_strcmp(szTmp, "true") != 0);
szTmp = ezxml_txt(ezxml_child(contInf, "isMobileIMEnabled"));
- setByte(hContact, "MobileEnabled", strcmp(szTmp, "true") == 0);
+ setByte(hContact, "MobileEnabled", mir_strcmp(szTmp, "true") == 0);
szTmp = ezxml_txt(ezxml_child(contInf, "firstName"));
SetAbParam(hContact, "FirstName", szTmp);
@@ -774,9 +774,9 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas const char* szCntType = ezxml_txt(ezxml_child(loc, "contactLocationType"));
int locid = -1;
- if (strcmp(szCntType, "ContactLocationPersonal") == 0)
+ if (mir_strcmp(szCntType, "ContactLocationPersonal") == 0)
locid = 0;
- else if (strcmp(szCntType, "ContactLocationBusiness") == 0)
+ else if (mir_strcmp(szCntType, "ContactLocationBusiness") == 0)
locid = 1;
if (locid >= 0) {
@@ -799,7 +799,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas ezxml_t web = ezxml_get(contInf, "webSites", 0, "ContactWebSite", -1);
while (web != NULL) {
const char* szCntType = ezxml_txt(ezxml_child(web, "contactWebSiteType"));
- if (strcmp(szCntType, "ContactWebSiteBusiness") == 0) {
+ if (mir_strcmp(szCntType, "ContactWebSiteBusiness") == 0) {
szTmp = ezxml_txt(ezxml_child(web, "webURL"));
SetAbParam(hContact, "CompanyHomepage", szTmp);
}
@@ -810,10 +810,10 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas const char *szTmp;
szTmp = ezxml_txt(ezxml_child(contInf, "isMobileIMEnabled"));
- setByte("MobileEnabled", strcmp(szTmp, "true") == 0);
+ setByte("MobileEnabled", mir_strcmp(szTmp, "true") == 0);
szTmp = ezxml_txt(ezxml_child(contInf, "IsNotMobileVisible"));
- setByte("MobileAllowed", strcmp(szTmp, "true") != 0);
+ setByte("MobileAllowed", mir_strcmp(szTmp, "true") != 0);
szTmp = ezxml_txt(ezxml_child(contInf, "firstName"));
setStringUtf(NULL, "FirstName", szTmp);
@@ -823,7 +823,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas ezxml_t anot = ezxml_get(contInf, "annotations", 0, "Annotation", -1);
while (anot != NULL) {
- if (strcmp(ezxml_txt(ezxml_child(anot, "Name")), "MSN.IM.BLP") == 0)
+ if (mir_strcmp(ezxml_txt(ezxml_child(anot, "Name")), "MSN.IM.BLP") == 0)
msnOtherContactsBlocked = !atol(ezxml_txt(ezxml_child(anot, "Value")));
anot = ezxml_next(anot);
@@ -831,7 +831,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas ezxml_t nil = ezxml_get(contInf, "NetworkInfoList", 0, "NetworkInfo", -1);
while (nil != NULL) {
- if (strcmp(ezxml_txt(ezxml_child(nil, "SourceId")), "SKYPE") == 0) {
+ if (mir_strcmp(ezxml_txt(ezxml_child(nil, "SourceId")), "SKYPE") == 0) {
const char *pszPartner = ezxml_txt(ezxml_child(nil, "DomainTag"));
if (*pszPartner) setString("SkypePartner", pszPartner);
}
@@ -850,11 +850,11 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas }
else if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_ABFind(szMethod, szGuid, deltas, false) ? 200 : 500;
}
- else if (strcmp(szErr, "FullSyncRequired") == 0 && deltas) {
+ else if (mir_strcmp(szErr, "FullSyncRequired") == 0 && deltas) {
status = MSN_ABFind(szMethod, szGuid, false, false) ? 200 : 500;
}
}
@@ -906,18 +906,18 @@ bool CMsnProto::MSN_ABRefreshClist(void) for (ezxml_t pers = ezxml_get(abinf, "persons", 0, "Person", -1); pers != NULL; pers = ezxml_next(pers)) {
const char *cid = ezxml_txt(ezxml_child(pers, "cid"));
- if (mycid && !strcmp(cid, mycid)) continue;
+ if (mycid && !mir_strcmp(cid, mycid)) continue;
for (ezxml_t cont = ezxml_get(pers, "contacts", 0, "Contact", -1); cont != NULL; cont = ezxml_next(cont)) {
int netId;
const char* szEmail;
const char *src = ezxml_txt(ezxml_child(cont, "sourceId"));
- if (!strcmp(src, "WL")) {
+ if (!mir_strcmp(src, "WL")) {
netId = NETID_MSN;
szEmail = ezxml_txt(ezxml_child(cont, "domainTag"));
}
- else if (!strcmp(src, "SKYPE")) {
+ else if (!mir_strcmp(src, "SKYPE")) {
netId = NETID_SKYPE;
szEmail = ezxml_txt(ezxml_child(cont, "objectId"));
}
@@ -1025,7 +1025,7 @@ bool CMsnProto::MSN_ABAddDelContactGroup(const char* szCntId, const char* szGrpI UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_ABAddDelContactGroup(szCntId, szGrpId, szMethod, false) ? 200 : 500;
}
@@ -1091,7 +1091,7 @@ void CMsnProto::MSN_ABAddGroup(const char* szGrpName, bool allowRecurse) }
else if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
MSN_ABAddGroup(szGrpName, false);
}
@@ -1143,7 +1143,7 @@ void CMsnProto::MSN_ABRenameGroup(const char* szGrpName, const char* szGrpId, bo UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
MSN_ABRenameGroup(szGrpName, szGrpId, false);
}
@@ -1228,7 +1228,7 @@ bool CMsnProto::MSN_ABAddRemoveContact(const char* szCntId, int netId, bool add, UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
if (MSN_ABAddRemoveContact(szCntId, netId, add, false))
status = 200;
@@ -1294,7 +1294,7 @@ bool CMsnProto::MSN_ABUpdateProperty(const char* szCntId, const char* propName, UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
if (MSN_ABUpdateProperty(szCntId, propName, propValue, false))
status = 200;
@@ -1359,7 +1359,7 @@ void CMsnProto::MSN_ABUpdateAttr(const char* szCntId, const char* szAttr, const UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
MSN_ABUpdateAttr(szCntId, szAttr, szValue, false);
}
@@ -1497,15 +1497,15 @@ unsigned CMsnProto::MSN_ABContactAdd(const char* szEmail, const char* szNick, in else if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "InvalidPassportUser") == 0)
+ if (mir_strcmp(szErr, "InvalidPassportUser") == 0)
status = 1;
- else if (strcmp(szErr, "FederatedQueryFailure") == 0)
+ else if (mir_strcmp(szErr, "FederatedQueryFailure") == 0)
status = 4;
- else if (strcmp(szErr, "EmailDomainIsFederated") == 0)
+ else if (mir_strcmp(szErr, "EmailDomainIsFederated") == 0)
status = 2;
- else if (strcmp(szErr, "BadEmailArgument") == 0)
+ else if (mir_strcmp(szErr, "BadEmailArgument") == 0)
status = 4;
- else if (strcmp(szErr, "ContactAlreadyExists") == 0) {
+ else if (mir_strcmp(szErr, "ContactAlreadyExists") == 0) {
status = 3;
ezxml_t node = getSoapFault(xmlm, false);
@@ -1523,7 +1523,7 @@ unsigned CMsnProto::MSN_ABContactAdd(const char* szEmail, const char* szNick, in setString(hContact, "ID", szContId);
}
}
- else if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ else if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_ABContactAdd(szEmail, szNick, netId, NULL, search, retry, false);
}
@@ -1621,7 +1621,7 @@ void CMsnProto::MSN_ABUpdateDynamicItem(bool allowRecurse) UpdateABCacheKey(xmlm, false);
if (status == 500) {
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
MSN_ABUpdateDynamicItem(false);
}
diff --git a/protocols/MSN/src/msn_soapstore.cpp b/protocols/MSN/src/msn_soapstore.cpp index 9bbe50fb89..42a6d9ae8f 100644 --- a/protocols/MSN/src/msn_soapstore.cpp +++ b/protocols/MSN/src/msn_soapstore.cpp @@ -135,7 +135,7 @@ bool CMsnProto::MSN_StoreCreateProfile(bool allowRecurse) else if (status == 500) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_StoreCreateProfile(false) ? 200 : 500;
}
@@ -176,7 +176,7 @@ bool CMsnProto::MSN_StoreShareItem(const char* id, bool allowRecurse) if (tResult != NULL && status == 500) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_StoreCreateProfile(false) ? 200 : 500;
}
@@ -280,7 +280,7 @@ bool CMsnProto::MSN_StoreGetProfile(bool allowRecurse) ezxml_t docstr = ezxml_get(photo, "DocumentStreams", 0, "DocumentStream", -1);
while (docstr) {
const char *docname = ezxml_txt(ezxml_child(docstr, "DocumentStreamName"));
- if (!strcmp(docname, "UserTileStatic")) {
+ if (!mir_strcmp(docname, "UserTileStatic")) {
getMyAvatarFile(ezxml_txt(ezxml_child(docstr, "PreAuthURL")), _T("miranda_avatar.tmp"));
break;
}
@@ -292,7 +292,7 @@ bool CMsnProto::MSN_StoreGetProfile(bool allowRecurse) else if (status == 500 && allowRecurse) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0) {
MSN_GetPassportAuth();
MSN_StoreGetProfile(false);
}
@@ -363,7 +363,7 @@ bool CMsnProto::MSN_StoreUpdateProfile(const char* szNick, const char* szStatus, else if (status == 500 && allowRecurse) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0) {
MSN_GetPassportAuth();
status = MSN_StoreUpdateProfile(szNick, szStatus, lock, false) ? 200 : 500;
}
@@ -421,7 +421,7 @@ bool CMsnProto::MSN_StoreCreateRelationships(bool allowRecurse) if (status == 500) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_StoreCreateRelationships(false) ? 200 : 500;
}
@@ -488,7 +488,7 @@ bool CMsnProto::MSN_StoreDeleteRelationships(bool tile, bool allowRecurse) if (status == 500) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_StoreDeleteRelationships(tile, false) ? 200 : 500;
}
@@ -571,7 +571,7 @@ bool CMsnProto::MSN_StoreCreateDocument(const TCHAR *sztName, const char *szMime else if (status == 500) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_StoreCreateDocument(sztName, szMimeType, szPicData, false) ? 200 : 500;
}
@@ -637,7 +637,7 @@ bool CMsnProto::MSN_StoreUpdateDocument(const TCHAR *sztName, const char *szMime if (status == 500 && allowRecurse) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0) {
MSN_GetPassportAuth();
status = MSN_StoreUpdateDocument(sztName, szMimeType, szPicData, false) ? 200 : 500;
}
@@ -717,7 +717,7 @@ bool CMsnProto::MSN_StoreFindDocuments(bool allowRecurse) if (status == 500) {
ezxml_t xmlm = ezxml_parse_str(tResult, mir_strlen(tResult));
const char* szErr = ezxml_txt(getSoapFault(xmlm, true));
- if (strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
+ if (mir_strcmp(szErr, "PassportAuthFail") == 0 && allowRecurse) {
MSN_GetPassportAuth();
status = MSN_StoreFindDocuments(false) ? 200 : 500;
}
diff --git a/protocols/MSN/src/msn_srv.cpp b/protocols/MSN/src/msn_srv.cpp index 940b8e2496..8906faa8e8 100644 --- a/protocols/MSN/src/msn_srv.cpp +++ b/protocols/MSN/src/msn_srv.cpp @@ -72,7 +72,7 @@ void CMsnProto::MSN_DeleteServerGroup(LPCSTR szId) char szGroupID[100];
if (!db_get_static(msc->hContact, m_szModuleName, "GroupID", szGroupID, sizeof(szGroupID))) {
- if (strcmp(szGroupID, szId) == 0)
+ if (mir_strcmp(szGroupID, szId) == 0)
delSetting(msc->hContact, "GroupID");
}
}
@@ -109,7 +109,7 @@ LPCSTR CMsnProto::MSN_GetGroupByName(const char* pName) {
for (int i = 0; i < m_arGroups.getCount(); i++) {
const ServerGroupItem* p = m_arGroups[i];
- if (strcmp(p->name, pName) == 0)
+ if (mir_strcmp(p->name, pName) == 0)
return p->id;
}
@@ -221,7 +221,7 @@ void CMsnProto::MSN_UploadServerGroups(char* group) DBVARIANT dbv;
if (!db_get_utf(msc->hContact, "CList", "Group", &dbv)) {
char szGroupID[100];
- if (group == NULL || (strcmp(group, dbv.pszVal) == 0 &&
+ if (group == NULL || (mir_strcmp(group, dbv.pszVal) == 0 &&
db_get_static(msc->hContact, m_szModuleName, "GroupID", szGroupID, sizeof(szGroupID)) != 0)) {
MSN_MoveContactToGroup(msc->hContact, dbv.pszVal);
}
@@ -254,7 +254,7 @@ void CMsnProto::MSN_SyncContactToServerGroup(MCONTACT hContact, const char* szCo const char* szGrpNameById = MSN_GetGroupById(szGrpId);
- if (szGrpNameById && (strcmp(szGrpNameById, szGrpName) == 0 ||
+ if (szGrpNameById && (mir_strcmp(szGrpNameById, szGrpName) == 0 ||
(cgrp == NULL && szGrpIdF == NULL)))
szGrpIdF = szGrpId;
else
@@ -264,7 +264,7 @@ void CMsnProto::MSN_SyncContactToServerGroup(MCONTACT hContact, const char* szCo if (szGrpIdF != NULL) {
setString(hContact, "GroupID", szGrpIdF);
const char* szGrpNameById = MSN_GetGroupById(szGrpIdF);
- if (strcmp(szGrpNameById, szGrpName))
+ if (mir_strcmp(szGrpNameById, szGrpName))
db_set_utf(hContact, "CList", "Group", szGrpNameById);
}
else {
@@ -349,7 +349,7 @@ void CMsnProto::msn_storeProfileThread(void* param) char** msgptr = GetStatusMsgLoc(m_iStatus);
char *szStatus = msgptr ? *msgptr : NULL;
- if (param || (msnLastStatusMsg != szStatus && (msnLastStatusMsg && szStatus && strcmp(msnLastStatusMsg, szStatus))))
+ if (param || (msnLastStatusMsg != szStatus && (msnLastStatusMsg && szStatus && mir_strcmp(msnLastStatusMsg, szStatus))))
if (MSN_StoreUpdateProfile(szNick, szStatus, false))
MSN_ABUpdateDynamicItem();
diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index 1238f17b3f..32de674020 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -99,7 +99,7 @@ INT_PTR CMsnProto::GetAvatarInfo(WPARAM wParam, LPARAM lParam) if (AI->format != PA_FORMAT_UNKNOWN) {
bool needupdate = true;
if (getString(AI->hContact, "PictSavedContext", &dbv) == 0) {
- needupdate = strcmp(dbv.pszVal, szContext) != 0;
+ needupdate = mir_strcmp(dbv.pszVal, szContext) != 0;
db_free(&dbv);
}
@@ -453,8 +453,8 @@ int CMsnProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
if (hContact == NULL) {
- if (MyOptions.SlowSend && strcmp(cws->szSetting, "MessageTimeout") == 0 &&
- (strcmp(cws->szModule, "SRMM") == 0 || strcmp(cws->szModule, "SRMsg") == 0)) {
+ if (MyOptions.SlowSend && mir_strcmp(cws->szSetting, "MessageTimeout") == 0 &&
+ (mir_strcmp(cws->szModule, "SRMM") == 0 || mir_strcmp(cws->szModule, "SRMsg") == 0)) {
if (cws->value.dVal < 60000)
MessageBox(NULL, TranslateT("MSN requires message send timeout in your Message window plugin to be not less then 60 sec. Please correct the timeout value."),
TranslateT("MSN Protocol"), MB_OK | MB_ICONINFORMATION);
@@ -462,7 +462,7 @@ int CMsnProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
}
- if (!strcmp(cws->szSetting, "ApparentMode")) {
+ if (!mir_strcmp(cws->szSetting, "ApparentMode")) {
char tEmail[MSN_MAX_EMAIL_LEN];
if (!db_get_static(hContact, m_szModuleName, "wlid", tEmail, sizeof(tEmail)) ||
!db_get_static(hContact, m_szModuleName, "e-mail", tEmail, sizeof(tEmail))) {
@@ -479,7 +479,7 @@ int CMsnProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) }
}
- if (!strcmp(cws->szSetting, "MyHandle") && !strcmp(cws->szModule, "CList")) {
+ if (!mir_strcmp(cws->szSetting, "MyHandle") && !mir_strcmp(cws->szModule, "CList")) {
bool isMe = MSN_IsMeByContact(hContact);
if (!isMe || !nickChg) {
char szContactID[100];
diff --git a/protocols/Omegle/src/chat.cpp b/protocols/Omegle/src/chat.cpp index f51104b1d9..cacc111d59 100644 --- a/protocols/Omegle/src/chat.cpp +++ b/protocols/Omegle/src/chat.cpp @@ -51,7 +51,7 @@ int OmegleProto::OnChatEvent(WPARAM, LPARAM lParam) {
GCHOOK *hook = reinterpret_cast<GCHOOK*>(lParam);
- if(strcmp(hook->pDest->pszModule,m_szModuleName))
+ if(mir_strcmp(hook->pDest->pszModule,m_szModuleName))
return 0;
switch(hook->pDest->iType)
@@ -364,7 +364,7 @@ MCONTACT OmegleProto::GetChatHandle() for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) > 0) {
ptrA id = db_get_sa(hContact, m_szModuleName, "ChatRoomId");
- if (id != NULL && !strcmp(id, m_szModuleName))
+ if (id != NULL && !mir_strcmp(id, m_szModuleName))
return hContact;
}
}
diff --git a/protocols/Omegle/src/theme.cpp b/protocols/Omegle/src/theme.cpp index 145baf716c..843eb50ddc 100644 --- a/protocols/Omegle/src/theme.cpp +++ b/protocols/Omegle/src/theme.cpp @@ -40,7 +40,7 @@ HANDLE GetIconHandle(const char* name) {
for(size_t i=0; i<SIZEOF(icons); i++)
{
- if(strcmp(icons[i].szName, name) == 0)
+ if(mir_strcmp(icons[i].szName, name) == 0)
return hIconLibItem[i];
}
return 0;
diff --git a/protocols/Sametime/src/sametime_proto.cpp b/protocols/Sametime/src/sametime_proto.cpp index 1b97b982a0..e0a01850ac 100644 --- a/protocols/Sametime/src/sametime_proto.cpp +++ b/protocols/Sametime/src/sametime_proto.cpp @@ -238,7 +238,7 @@ int CSametimeProto::SendMsg(MCONTACT hContact, int, const char* msg) char *proto = GetContactProto(hContact);
int ret;
- if (!proto || strcmp(proto, m_szModuleName) != 0 || db_get_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE) {
+ if (!proto || mir_strcmp(proto, m_szModuleName) != 0 || db_get_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE) {
TFakeAckParams* tfap = (TFakeAckParams*)mir_alloc(sizeof(TFakeAckParams));
tfap->proto = this;
tfap->hContact = hContact;
diff --git a/protocols/Sametime/src/userlist.cpp b/protocols/Sametime/src/userlist.cpp index 223cecfdce..debe054ec3 100644 --- a/protocols/Sametime/src/userlist.cpp +++ b/protocols/Sametime/src/userlist.cpp @@ -6,7 +6,7 @@ MCONTACT CSametimeProto::FindContactByUserId(const char* id) DBVARIANT dbv;
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (!db_get_utf(hContact, m_szModuleName, "stid", &dbv)) {
- if (dbv.pszVal && strcmp(id, dbv.pszVal) == 0) {
+ if (dbv.pszVal && mir_strcmp(id, dbv.pszVal) == 0) {
db_free(&dbv);
return hContact;
}
@@ -20,7 +20,7 @@ bool CSametimeProto::GetAwareIdFromContact(MCONTACT hContact, mwAwareIdBlock* id {
char *proto = GetContactProto(hContact);
DBVARIANT dbv;
- if (proto && !strcmp(m_szModuleName, proto)) {
+ if (proto && !mir_strcmp(m_szModuleName, proto)) {
if (!db_get_utf(hContact, m_szModuleName, "stid", &dbv)) {
if (dbv.pszVal) {
id_block->type = mwAware_USER;
@@ -42,10 +42,10 @@ void CSametimeProto::SetContactGroup(MCONTACT hContact, const char* name) void CSametimeProto::AddGroup(const char* name, bool expanded)
{
- if (name && strcmp(name, "MetaContacts Hidden Group") == 0)
+ if (name && mir_strcmp(name, "MetaContacts Hidden Group") == 0)
return;
- if (name && strcmp(name, Translate("None")) == 0)
+ if (name && mir_strcmp(name, Translate("None")) == 0)
return;
ptrT ptszGroup(mir_utf8decodeT(name));
@@ -182,7 +182,7 @@ void CSametimeProto::ImportContactsFromList(mwSametimeList* user_list, bool temp for (; ul; ul = ul->next) {
stuser = (mwSametimeUser*)ul->data;
MCONTACT hContact = AddContact(stuser, temporary);
- if (hContact && group_alias && strcmp(group_alias, Translate("None")) != 0 && strcmp(group_alias, "MetaContacts Hidden Group") != 0) {
+ if (hContact && group_alias && mir_strcmp(group_alias, Translate("None")) != 0 && mir_strcmp(group_alias, "MetaContacts Hidden Group") != 0) {
SetContactGroup(hContact, group_alias);
// mark contact as belonging to dynamic group
}
@@ -439,7 +439,7 @@ void mwResolve_handler_dyngroup_callback(mwServiceResolve* srvc, guint32 id, gui const char* group_name = mwSametimeGroup_getName(stgroup);
const char* group_alias = mwSametimeGroup_getAlias(stgroup);
if (!group_alias) group_alias = group_name;
- if (hContact && group_alias && strcmp(group_alias, Translate("None")) && strcmp(group_alias, "MetaContacts Hidden Group")) {
+ if (hContact && group_alias && mir_strcmp(group_alias, Translate("None")) && mir_strcmp(group_alias, "MetaContacts Hidden Group")) {
proto->SetContactGroup(hContact, group_alias);
}
}
@@ -468,7 +468,7 @@ void mwAwareList_on_aware(mwAwareList* list, mwAwareSnapshot* aware) DBVARIANT dbv;
// update self - necessary for some servers
- if (aware->online && !db_get_utf(0, proto->m_szModuleName, "stid", &dbv) && strcmp(aware->id.user, dbv.pszVal) == 0) {
+ if (aware->online && !db_get_utf(0, proto->m_szModuleName, "stid", &dbv) && mir_strcmp(aware->id.user, dbv.pszVal) == 0) {
int new_status = ID_STATUS_OFFLINE;
switch (aware->status.status) {
@@ -499,7 +499,7 @@ void mwAwareList_on_aware(mwAwareList* list, mwAwareSnapshot* aware) db_free(&dbv);
}
- if (aware->group && (!group || strcmp(aware->group, group) || !hContact)) {
+ if (aware->group && (!group || mir_strcmp(aware->group, group) || !hContact)) {
// dynamic group member we're not already aware of
// resolve server alias to user id via resolver
mwSametimeList* user_list = mwSametimeList_new();
@@ -603,7 +603,7 @@ void CSametimeProto::UserListCreate() GList *gl = 0;
for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
- if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 0 /*&& proto && !strcmp( PROTO, proto)*/) {
+ if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) == 0 /*&& proto && !mir_strcmp( PROTO, proto)*/) {
if (!db_get_utf(hContact, m_szModuleName, "stid", &dbv)) {
if (dbv.pszVal) {
if (GetAwareIdFromContact(hContact, &id_block)) {
diff --git a/protocols/SkypeClassic/src/contacts.cpp b/protocols/SkypeClassic/src/contacts.cpp index f07139775d..ed10c5d43a 100644 --- a/protocols/SkypeClassic/src/contacts.cpp +++ b/protocols/SkypeClassic/src/contacts.cpp @@ -223,7 +223,7 @@ int __cdecl PrebuildContactMenu(WPARAM wParam, LPARAM) { DBVARIANT dbv;
BOOL callAvailable = FALSE;
BOOL hangupAvailable = FALSE;
- if (!strcmp(szProto, SKYPE_PROTONAME)) {
+ if (!mir_strcmp(szProto, SKYPE_PROTONAME)) {
if (!db_get(hContact, SKYPE_PROTONAME, "CallId", &dbv)) {
if (db_get_b(hContact, SKYPE_PROTONAME, "OnHold", 0))
mi = ResumeCallItem(); else mi = HoldCallItem();
@@ -306,7 +306,7 @@ int ClistDblClick(WPARAM wParam, LPARAM lParam) { char *szProto;
szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, wParam, 0 );
-if (szProto!=NULL && !strcmp(szProto, SKYPE_PROTONAME) &&
+if (szProto!=NULL && !mir_strcmp(szProto, SKYPE_PROTONAME) &&
db_get_w((HANDLE)wParam, SKYPE_PROTONAME, "Status", ID_STATUS_OFFLINE)==ID_STATUS_ONTHEPHONE) {
SkypeCall(wParam, 0);
}
@@ -326,7 +326,7 @@ MCONTACT find_contact(char *name) if (db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0) == 0)
{
if (db_get_s(hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) continue;
- tCompareResult = strcmp(dbv.pszVal, name);
+ tCompareResult = mir_strcmp(dbv.pszVal, name);
db_free(&dbv);
if (tCompareResult) continue;
return hContact; // already there, return handle
@@ -402,7 +402,7 @@ void logoff_contacts(BOOL bCleanup) { LOG(("logoff_contacts: Logging off contacts."));
for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0);
- if (szProto != NULL && !strcmp(szProto, SKYPE_PROTONAME))
+ if (szProto != NULL && !mir_strcmp(szProto, SKYPE_PROTONAME))
{
if (db_get_w(hContact, SKYPE_PROTONAME, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
db_set_w(hContact, SKYPE_PROTONAME, "Status", ID_STATUS_OFFLINE);
diff --git a/protocols/SkypeClassic/src/filexfer.cpp b/protocols/SkypeClassic/src/filexfer.cpp index af8af1c1cc..f24e7273a7 100644 --- a/protocols/SkypeClassic/src/filexfer.cpp +++ b/protocols/SkypeClassic/src/filexfer.cpp @@ -215,10 +215,10 @@ BOOL FXHandleRecv(PROTORECVEVENT *pre, MCONTACT hContact) for (char *pszMsgNum = strtok(pszXferIDs, ", "); pszMsgNum; pszMsgNum = strtok(NULL, ", ")) {
char *pszStatus = SkypeGetErrID("FILETRANSFER", pszMsgNum, "STATUS");
if (pszStatus) {
- if (!strcmp(pszStatus, "NEW") || !strcmp(pszStatus, "PLACEHOLDER")) {
+ if (!mir_strcmp(pszStatus, "NEW") || !mir_strcmp(pszStatus, "PLACEHOLDER")) {
char *pszType = SkypeGetErr("FILETRANSFER", pszMsgNum, "TYPE");
if (pszType) {
- if (!strcmp(pszType, "INCOMING")) {
+ if (!mir_strcmp(pszType, "INCOMING")) {
char *pszFN = SkypeGetErr("FILETRANSFER", pszMsgNum, "FILENAME");
if (pszFN) {
cbNewSize = cbMsg + mir_strlen(pszFN) + 2;
@@ -284,15 +284,15 @@ void FXHandleMessageThread(ft_args *pargs) }
if (pargs->bStatus) {
- if (!strcmp(pargs->szArg, "CONNECTING"))
+ if (!mir_strcmp(pargs->szArg, "CONNECTING"))
ProtoBroadcastAck(SKYPE_PROTONAME, hContact, ACKTYPE_FILE, ACKRESULT_CONNECTING, (HANDLE)dwChat, 0);
else if (!strncmp(pargs->szArg, "TRANSFERRING", 12))
ProtoBroadcastAck(SKYPE_PROTONAME, hContact, ACKTYPE_FILE, ACKRESULT_CONNECTED, (HANDLE)dwChat, 0);
- else if (!strcmp(pargs->szArg, "FAILED"))
+ else if (!mir_strcmp(pargs->szArg, "FAILED"))
ProtoBroadcastAck(SKYPE_PROTONAME, hContact, ACKTYPE_FILE, ACKRESULT_FAILED, (HANDLE)dwChat, 0);
- else if (!strcmp(pargs->szArg, "CANCELLED"))
+ else if (!mir_strcmp(pargs->szArg, "CANCELLED"))
ProtoBroadcastAck(SKYPE_PROTONAME, hContact, ACKTYPE_FILE, ACKRESULT_DENIED, (HANDLE)dwChat, 0);
- else if (!strcmp(pargs->szArg, "COMPLETED")) {
+ else if (!mir_strcmp(pargs->szArg, "COMPLETED")) {
// Check if all transfers from this message are completed.
char *pszMsgNum, *pszStatus;
BOOL bAllComplete = TRUE;
@@ -300,7 +300,7 @@ void FXHandleMessageThread(ft_args *pargs) if (pszXferIDs) {
for (pszMsgNum = strtok(pszXferIDs, ", "); pszMsgNum; pszMsgNum = strtok(NULL, ", ")) {
if (pszStatus = SkypeGetErrID("FILETRANSFER", pszMsgNum, "STATUS")) {
- if (strcmp(pszStatus, "COMPLETED")) bAllComplete = FALSE;
+ if (mir_strcmp(pszStatus, "COMPLETED")) bAllComplete = FALSE;
free(pszStatus);
if (!bAllComplete) break;
}
@@ -324,7 +324,7 @@ void FXHandleMessageThread(ft_args *pargs) if (pszXferIDs) {
for (pszMsgNum = strtok(pszXferIDs, ", "), i = 0; pszMsgNum; pszMsgNum = strtok(NULL, ", "), i++) {
DWORD dwTransferred;
- BOOL bIsCurFil = strcmp(pargs->szNum, pszMsgNum) == 0;
+ BOOL bIsCurFil = mir_strcmp(pargs->szNum, pszMsgNum) == 0;
if (bIsCurFil)
pfts.currentFileNumber = i;
diff --git a/protocols/SkypeClassic/src/gchat.cpp b/protocols/SkypeClassic/src/gchat.cpp index 55865b0c2a..e59785a5e3 100644 --- a/protocols/SkypeClassic/src/gchat.cpp +++ b/protocols/SkypeClassic/src/gchat.cpp @@ -184,7 +184,7 @@ MCONTACT find_chatA(char *chatname) { { DBVARIANT dbv; if (!db_get_s(hContact, SKYPE_PROTONAME, "ChatRoomID", &dbv)) { - int tCompareResult = strcmp(dbv.pszVal, chatname); + int tCompareResult = mir_strcmp(dbv.pszVal, chatname); db_free(&dbv); if (!tCompareResult) return hContact; // already there, return handle @@ -225,7 +225,7 @@ int __cdecl AddMembers(char *szSkypeMsg) { break; } if (!(who = SkypeGet ("CHATMEMBER", token, "IDENTITY"))) continue; - if (strcmp(who, dbv2.pszVal)) { + if (mir_strcmp(who, dbv2.pszVal)) { TCHAR *ptszRole = NULL; char *pszRole = SkypeGet("CHATMEMBER", token, "ROLE"); @@ -256,7 +256,7 @@ int __cdecl AddMembers(char *szSkypeMsg) { iRet = -1; break; } - if (strcmp(who, dbv2.pszVal)) { + if (mir_strcmp(who, dbv2.pszVal)) { i=AddChatContact(gc, who, NULL); BYTE *pcontactmask; if (i<0 || !(pcontactmask= (BYTE *) realloc(contactmask, gc->mJoinedCount))) { diff --git a/protocols/SkypeClassic/src/skype.cpp b/protocols/SkypeClassic/src/skype.cpp index 7a28811213..4204b25ece 100644 --- a/protocols/SkypeClassic/src/skype.cpp +++ b/protocols/SkypeClassic/src/skype.cpp @@ -255,7 +255,7 @@ int ShowMessageA(int iconID, char *lpzText, int mustShow) { int HookContactAdded(WPARAM wParam, LPARAM) {
MCONTACT hContact = (MCONTACT) wParam;
char *szProto = GetContactProto(hContact);
- if (szProto != NULL && !strcmp(szProto, SKYPE_PROTONAME))
+ if (szProto != NULL && !mir_strcmp(szProto, SKYPE_PROTONAME))
add_contextmenu(hContact);
return 0;
}
@@ -263,7 +263,7 @@ int HookContactAdded(WPARAM wParam, LPARAM) { int HookContactDeleted(WPARAM wParam, LPARAM) {
MCONTACT hContact = (MCONTACT) wParam;
char *szProto = GetContactProto(hContact);
- if (szProto != NULL && !strcmp(szProto, SKYPE_PROTONAME)) {
+ if (szProto != NULL && !mir_strcmp(szProto, SKYPE_PROTONAME)) {
DBVARIANT dbv;
if (db_get_s(hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return 1;
int retval = SkypeSend("SET USER %s BUDDYSTATUS 1", dbv.pszVal);
@@ -582,7 +582,7 @@ void __cdecl SearchRecentChats(void *) { char *pszStatus = SkypeGet("CHAT", token, "STATUS");
if (pszStatus) {
- if (!strcmp(pszStatus, "MULTI_SUBSCRIBED")) {
+ if (!mir_strcmp(pszStatus, "MULTI_SUBSCRIBED")) {
// Add chatrooms for active multisubscribed chats
/*if (!find_chatA(token)) */
EnterCriticalSection(&QueryThreadMutex);
@@ -914,26 +914,26 @@ void FetchMessageThread(fetchmsg_arg *pargs) { // Get chat status
if ((status = SkypeGetErr("CHAT", chat, "STATUS")) &&
- !strcmp(status, "MULTI_SUBSCRIBED")) isGroupChat = TRUE;
+ !mir_strcmp(status, "MULTI_SUBSCRIBED")) isGroupChat = TRUE;
// Get chat type
if (!(type = SkypeGetErr(cmdMessage, args.msgnum, "TYPE"))) __leave;
- bEmoted = strcmp(type, "EMOTED") == 0;
- if (strcmp(type, "MULTI_SUBSCRIBED") == 0) isGroupChat = TRUE;
+ bEmoted = mir_strcmp(type, "EMOTED") == 0;
+ if (mir_strcmp(type, "MULTI_SUBSCRIBED") == 0) isGroupChat = TRUE;
// Group chat handling
- if (isGroupChat && strcmp(type, "TEXT") && strcmp(type, "SAID") && strcmp(type, "UNKNOWN") && !bEmoted) {
+ if (isGroupChat && mir_strcmp(type, "TEXT") && mir_strcmp(type, "SAID") && mir_strcmp(type, "UNKNOWN") && !bEmoted) {
if (bUseGroupChat) {
BOOL bAddedMembers = FALSE;
- if (!strcmp(type, "SAWMEMBERS") || !strcmp(type, "CREATEDCHATWITH"))
+ if (!mir_strcmp(type, "SAWMEMBERS") || !mir_strcmp(type, "CREATEDCHATWITH"))
{
// We have a new Groupchat
LOG(("FetchMessageThread CHAT SAWMEMBERS"));
if (!hChat) ChatStart(chat, FALSE);
__leave;
}
- if (!strcmp(type, "KICKED"))
+ if (!mir_strcmp(type, "KICKED"))
{
if (!hChat) __leave;
GCDEST gcd = { SKYPE_PROTONAME, make_nonutf_tchar_string((const unsigned char*)chat), GC_EVENT_KICK };
@@ -963,7 +963,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { free_nonutf_tchar_string((void*)gcd.ptszID);
__leave;
}
- if (!strcmp(type, "SETROLE"))
+ if (!mir_strcmp(type, "SETROLE"))
{
gchat_contact *gcContact;
char *pszRole;
@@ -1016,7 +1016,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { free_nonutf_tchar_string((void*)gcd.ptszID);
__leave;
}
- if (!strcmp(type, "SETTOPIC"))
+ if (!mir_strcmp(type, "SETTOPIC"))
{
LOG(("FetchMessageThread CHAT SETTOPIC"));
GCDEST gcd = { SKYPE_PROTONAME, make_nonutf_tchar_string((const unsigned char*)chat), GC_EVENT_TOPIC };
@@ -1050,7 +1050,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { }
__leave;
}
- if (!strcmp(type, "LEFT") || (bAddedMembers = strcmp(type, "ADDEDMEMBERS") == 0))
+ if (!mir_strcmp(type, "LEFT") || (bAddedMembers = mir_strcmp(type, "ADDEDMEMBERS") == 0))
{
LOG(("FetchMessageThread CHAT LEFT or ADDEDMEMBERS"));
if (bAddedMembers) {
@@ -1064,7 +1064,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { if (who = SkypeGetErr(cmdMessage, args.msgnum, szPartnerHandle)) {
DBVARIANT dbv;
if (db_get_s(NULL, SKYPE_PROTONAME, SKYPE_NAME, &dbv) == 0) {
- gce.bIsMe = strcmp(who, dbv.pszVal) == 0;
+ gce.bIsMe = mir_strcmp(who, dbv.pszVal) == 0;
db_free(&dbv);
}
gce.ptszUID = make_nonutf_tchar_string((const unsigned char*)who);
@@ -1103,7 +1103,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { status = SkypeGetID(cmdMessage, args.msgnum, "STATUS");
if (protocol < 4) InterlockedDecrement(&rcvwatchers);
if (!status) __leave;
- if (!strcmp(status, "SENT")) direction = DBEF_SENT;
+ if (!mir_strcmp(status, "SENT")) direction = DBEF_SENT;
free(status);
}
@@ -1113,7 +1113,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { // Get contact handle
LOG(("FetchMessageThread Finding contact handle"));
db_get_s(NULL, SKYPE_PROTONAME, SKYPE_NAME, &dbv);
- if (dbv.pszVal && !strcmp(who, dbv.pszVal))
+ if (dbv.pszVal && !mir_strcmp(who, dbv.pszVal))
{
// It's from me.. But to whom?
// CHATMESSAGE .. USERS doesn't return anything, so we have to query the CHAT-Object
@@ -1124,7 +1124,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { char *pTok, *nextoken = 0;
for (pTok = strtok_r(ptr, " ", &nextoken); pTok; pTok = strtok_r(NULL, " ", &nextoken)) {
- if (strcmp(pTok, dbv.pszVal)) break; // Take the first dude in the list who is not me
+ if (mir_strcmp(pTok, dbv.pszVal)) break; // Take the first dude in the list who is not me
}
if (!pTok) {
@@ -1150,7 +1150,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { }
}
- if (strcmp(type, "FILETRANSFER") == 0)
+ if (mir_strcmp(type, "FILETRANSFER") == 0)
{
// Our custom Skypekit FILETRANSFER extension
bHasFileXfer = TRUE;
@@ -1376,7 +1376,7 @@ void FetchMessageThreadSync(fetchmsg_arg *pargs) { static int MsglCmpProc(const void *pstPElement, const void *pstPToFind)
{
- return strcmp((char*)((fetchmsg_arg*)pstPElement)->pMsgEntry, (char*)((fetchmsg_arg*)pstPToFind)->pMsgEntry);
+ return mir_strcmp((char*)((fetchmsg_arg*)pstPElement)->pMsgEntry, (char*)((fetchmsg_arg*)pstPToFind)->pMsgEntry);
}
void MessageListProcessingThread(char *str) {
@@ -1432,7 +1432,7 @@ MCONTACT GetCallerContact(char *szSkypeMsg) for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
if (db_get_s(hContact, SKYPE_PROTONAME, "SkypeOutNr", &dbv)) continue;
- tCompareResult = strcmp(dbv.pszVal, szHandle);
+ tCompareResult = mir_strcmp(dbv.pszVal, szHandle);
db_free(&dbv);
if (tCompareResult) continue; else break;
}
@@ -1446,7 +1446,7 @@ MCONTACT GetMetaHandle(DWORD dwId) {
for (MCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
char *szProto = GetContactProto(hContact);
- if (szProto != NULL && !strcmp(szProto, "MetaContacts") &&
+ if (szProto != NULL && !mir_strcmp(szProto, "MetaContacts") &&
db_get_dw(hContact, "MetaContacts", "MetaID", MAXDWORD) == dwId)
return hContact;
}
@@ -1621,7 +1621,7 @@ void EndCallThread(char *szSkypeMsg) { if (szSkypeMsg) {
for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
if (db_get_s(hContact, SKYPE_PROTONAME, "CallId", &dbv)) continue;
- int tCompareResult = strcmp(dbv.pszVal, szSkypeMsg);
+ int tCompareResult = mir_strcmp(dbv.pszVal, szSkypeMsg);
db_free(&dbv);
if (!tCompareResult)
break;
@@ -1646,7 +1646,7 @@ void EndCallThread(char *szSkypeMsg) { if (!db_get_s(hContact, SKYPE_PROTONAME, "SkypeOutNr", &dbv)) {
db_free(&dbv);
- if (!strcmp((char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0), SKYPE_PROTONAME) &&
+ if (!mir_strcmp((char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0), SKYPE_PROTONAME) &&
db_get_b(hContact, "CList", "NotOnList", 0)
)
CallService(MS_DB_CONTACT_DELETE, hContact, 0);
@@ -1797,7 +1797,7 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) if (p = strtok_r(szSkypeMsg + 29, " ", &nextoken))
{
- if (!strcmp(p, "STREAMS")) {
+ if (!mir_strcmp(p, "STREAMS")) {
char *pStr;
while (p = strtok_r(NULL, " ", &nextoken)) {
@@ -1810,7 +1810,7 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) }
}
}
- else if (!strcmp(p, "DATAGRAM")) {
+ else if (!mir_strcmp(p, "DATAGRAM")) {
if (p = strtok_r(NULL, " ", &nextoken)) {
char *pStr;
@@ -1823,7 +1823,7 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) if (p = strtok_r(NULL, " ", &nextoken)) {
LPARAM lTyping = PROTOTYPE_CONTACTTYPING_OFF;
- if (!strcmp(p, "PURPLE_TYPING")) lTyping = PROTOTYPE_CONTACTTYPING_INFINITE;
+ if (!mir_strcmp(p, "PURPLE_TYPING")) lTyping = PROTOTYPE_CONTACTTYPING_INFINITE;
CallService(MS_PROTO_CONTACTISTYPING, hContact, lTyping);
break;
}
@@ -1839,20 +1839,20 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) buf = _strdup(szSkypeMsg + 5);
if ((nick = strtok_r(buf, " ", &nextoken)) && (ptr = strtok_r(NULL, " ", &nextoken)))
{
- if (strcmp(ptr, "BUDDYSTATUS")) {
- if (!strcmp(ptr, "RECEIVEDAUTHREQUEST")) {
+ if (mir_strcmp(ptr, "BUDDYSTATUS")) {
+ if (!mir_strcmp(ptr, "RECEIVEDAUTHREQUEST")) {
pthread_create((pThreadFunc)ProcessAuthRq, strdup(szSkypeMsg));
free(buf);
break;
}
- if (!(hContact = find_contact(nick)) && strcmp(ptr, "FULLNAME")) {
+ if (!(hContact = find_contact(nick)) && mir_strcmp(ptr, "FULLNAME")) {
SkypeSend("GET USER %s BUDDYSTATUS", nick);
free(buf);
break;
}
- if (!strcmp(ptr, "ONLINESTATUS")) {
+ if (!mir_strcmp(ptr, "ONLINESTATUS")) {
if (SkypeStatus != ID_STATUS_OFFLINE)
{
db_set_w(hContact, SKYPE_PROTONAME, "Status", (WORD)SkypeStatusToMiranda(ptr + 13));
@@ -1882,7 +1882,7 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) * This may not be the most efficient way, but ensures that we finally do proper
* error handling.
*/
- if (!strcmp(ptr, "FULLNAME")) {
+ if (!mir_strcmp(ptr, "FULLNAME")) {
char *nm = strtok_r(NULL, " ", &nextoken);
if (nm)
@@ -1894,7 +1894,7 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) db_set_utf(hContact, SKYPE_PROTONAME, "LastName", nm);
}
}
- else if (!strcmp(ptr, "BIRTHDAY")) {
+ else if (!mir_strcmp(ptr, "BIRTHDAY")) {
int y, m, d;
if (sscanf(ptr + 9, "%04d%02d%02d", &y, &m, &d) == 3) {
db_set_w(hContact, SKYPE_PROTONAME, "BirthYear", (WORD)y);
@@ -1907,7 +1907,7 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) db_unset(hContact, SKYPE_PROTONAME, "BirthDay");
}
}
- else if (!strcmp(ptr, "COUNTRY")) {
+ else if (!mir_strcmp(ptr, "COUNTRY")) {
if (ptr[8]) {
struct CountryListEntry *countries;
int countryCount;
@@ -1923,7 +1923,7 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) }
else db_unset(hContact, SKYPE_PROTONAME, "Country");
}
- else if (!strcmp(ptr, "SEX")) {
+ else if (!mir_strcmp(ptr, "SEX")) {
if (ptr[4]) {
BYTE sex = 0;
if (!_stricmp(ptr + 4, "MALE")) sex = 0x4D;
@@ -1932,11 +1932,11 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) }
else db_unset(hContact, SKYPE_PROTONAME, "Gender");
}
- else if (!strcmp(ptr, "MOOD_TEXT")) {
+ else if (!mir_strcmp(ptr, "MOOD_TEXT")) {
LOG(("WndProc MOOD_TEXT"));
db_set_utf(hContact, "CList", "StatusMsg", ptr + 10);
}
- else if (!strcmp(ptr, "TIMEZONE")){
+ else if (!mir_strcmp(ptr, "TIMEZONE")){
time_t temp;
struct tm tms;
int value = atoi(ptr + 9), tz;
@@ -1965,22 +1965,22 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) db_unset(hContact, "UserInfo", "Timezone");
}
}
- else if (!strcmp(ptr, "IS_VIDEO_CAPABLE")){
+ else if (!mir_strcmp(ptr, "IS_VIDEO_CAPABLE")){
if (!_stricmp(ptr + 17, "True"))
db_set_s(hContact, SKYPE_PROTONAME, "MirVer", "Skype 2.0");
else
db_set_s(hContact, SKYPE_PROTONAME, "MirVer", "Skype");
}
- else if (!strcmp(ptr, "ISBLOCKED")){
+ else if (!mir_strcmp(ptr, "ISBLOCKED")){
if (!_stricmp(ptr + 10, "True"))
db_set_b(hContact, SKYPE_PROTONAME, "IsBlocked", 1);
else
db_unset(hContact, SKYPE_PROTONAME, "IsBlocked");
}
- else if (!strcmp(ptr, "RICH_MOOD_TEXT")) {
+ else if (!mir_strcmp(ptr, "RICH_MOOD_TEXT")) {
db_set_s(hContact, SKYPE_PROTONAME, "MirVer", "Skype 3.0");
}
- else if (!strcmp(ptr, "DISPLAYNAME")) {
+ else if (!mir_strcmp(ptr, "DISPLAYNAME")) {
// Skype Bug? -> If nickname isn't customised in the Skype-App, this won't return anything :-(
if (ptr[12])
db_set_utf(hContact, SKYPE_PROTONAME, "Nick", ptr + 12);
@@ -1989,7 +1989,7 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) {
// Other proerties that can be directly assigned to a DB-Value
for (int i = 0; i < sizeof(m_settings) / sizeof(m_settings[0]); i++) {
- if (!strcmp(ptr, m_settings[i].SkypeSetting)) {
+ if (!mir_strcmp(ptr, m_settings[i].SkypeSetting)) {
char *pszProp = ptr + mir_strlen(m_settings[i].SkypeSetting) + 1;
if (*pszProp)
db_set_utf(hContact, SKYPE_PROTONAME, m_settings[i].MirandaSetting, pszProp);
@@ -2086,14 +2086,14 @@ LRESULT APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) // context menu
if (ptr = strstr(szSkypeMsg, " STATUS ")) {
ptr[0] = 0; ptr += 8;
- if (!strcmp(ptr, "RINGING") || !strcmp(ptr, "ROUTING")) pthread_create((pThreadFunc)RingThread, _strdup(szSkypeMsg));
- if (!strcmp(ptr, "FAILED") || !strcmp(ptr, "FINISHED") ||
- !strcmp(ptr, "MISSED") || !strcmp(ptr, "REFUSED") ||
- !strcmp(ptr, "BUSY") || !strcmp(ptr, "CANCELLED"))
+ if (!mir_strcmp(ptr, "RINGING") || !mir_strcmp(ptr, "ROUTING")) pthread_create((pThreadFunc)RingThread, _strdup(szSkypeMsg));
+ if (!mir_strcmp(ptr, "FAILED") || !mir_strcmp(ptr, "FINISHED") ||
+ !mir_strcmp(ptr, "MISSED") || !mir_strcmp(ptr, "REFUSED") ||
+ !mir_strcmp(ptr, "BUSY") || !mir_strcmp(ptr, "CANCELLED"))
pthread_create((pThreadFunc)EndCallThread, _strdup(szSkypeMsg));
- if (!strcmp(ptr, "ONHOLD") || !strcmp(ptr, "LOCALHOLD") ||
- !strcmp(ptr, "REMOTEHOLD")) pthread_create((pThreadFunc)HoldCallThread, _strdup(szSkypeMsg));
- if (!strcmp(ptr, "INPROGRESS")) pthread_create((pThreadFunc)ResumeCallThread, _strdup(szSkypeMsg));
+ if (!mir_strcmp(ptr, "ONHOLD") || !mir_strcmp(ptr, "LOCALHOLD") ||
+ !mir_strcmp(ptr, "REMOTEHOLD")) pthread_create((pThreadFunc)HoldCallThread, _strdup(szSkypeMsg));
+ if (!mir_strcmp(ptr, "INPROGRESS")) pthread_create((pThreadFunc)ResumeCallThread, _strdup(szSkypeMsg));
break;
}
else if ((!strstr(szSkypeMsg, "PARTNER_HANDLE") && !strstr(szSkypeMsg, "FROM_HANDLE"))
@@ -2625,7 +2625,7 @@ static INT_PTR EventAddHook(WPARAM wParam, LPARAM lParam) MCONTACT hContact = (MCONTACT)wParam;
DBEVENTINFO *dbei=(DBEVENTINFO*)lParam;
if (dbei && hContact == m_AddEventArg.hContact && dbei->eventType==EVENTTYPE_MESSAGE && (dbei->flags & DBEF_SENT) &&
- strcmp(dbei->szModule, SKYPE_PROTONAME) == 0) {
+ mir_strcmp(dbei->szModule, SKYPE_PROTONAME) == 0) {
dbei->timestamp = m_AddEventArg.timestamp;
}
return 0;
@@ -2830,7 +2830,7 @@ char *__skypeauth(WPARAM wParam) { return NULL;
}
- if (db_event_get(wParam, &dbei) || dbei.eventType != EVENTTYPE_AUTHREQUEST || strcmp(dbei.szModule, SKYPE_PROTONAME))
+ if (db_event_get(wParam, &dbei) || dbei.eventType != EVENTTYPE_AUTHREQUEST || mir_strcmp(dbei.szModule, SKYPE_PROTONAME))
{
free(dbei.pBlob);
return NULL;
@@ -2983,7 +2983,7 @@ int AnySkypeusers(void) // GETCONTACTBASEPROTO doesn't work on not loaded protocol, therefore get
// protocol from DB
if (db_get_s(hContact, "Protocol", "p", &dbv)) continue;
- tCompareResult = !strcmp(dbv.pszVal, SKYPE_PROTONAME);
+ tCompareResult = !mir_strcmp(dbv.pszVal, SKYPE_PROTONAME);
db_free(&dbv);
if (tCompareResult) return 1;
}
@@ -3030,7 +3030,7 @@ free(pdi.szSettings); }
// Upgrade Protocol assignment, if we are not main contact
if (hContact && !db_get_s(hContact, "Protocol", "p", &dbv)) {
-if (!strcmp(dbv.pszVal, OldName))
+if (!mir_strcmp(dbv.pszVal, OldName))
db_set_s(hContact, "Protocol", "p", SKYPE_PROTONAME);
db_free(&dbv);
}
diff --git a/protocols/SkypeClassic/src/skypeapi.cpp b/protocols/SkypeClassic/src/skypeapi.cpp index 35b4117560..5c464bae39 100644 --- a/protocols/SkypeClassic/src/skypeapi.cpp +++ b/protocols/SkypeClassic/src/skypeapi.cpp @@ -353,7 +353,7 @@ static int __sendMsg(char *szMsg) { LOG(("> %s", szMsg));
// Fake PING-PONG, as PING-PONG is not supported by Skype2Socket
- if ((UseSockets || bIsImoproxy) && !strcmp(szMsg, "PING")) {
+ if ((UseSockets || bIsImoproxy) && !mir_strcmp(szMsg, "PING")) {
CopyData.dwData=0;
CopyData.lpData="PONG";
CopyData.cbData=5;
@@ -536,7 +536,7 @@ char *SkypeRcvMsg(char *what, time_t st, MCONTACT hContact, DWORD maxwait) pMsg++;
if (strncmp (pMsg, "STATUS ", 7) == 0) {
pMsg+=7;
- if (strcmp (pMsg, "SENDING") == 0) {
+ if (mir_strcmp (pMsg, "SENDING") == 0) {
// Remove dat shit
struct MsgQueue *ptr_=ptr->l.tqe_next;
@@ -544,9 +544,9 @@ char *SkypeRcvMsg(char *what, time_t st, MCONTACT hContact, DWORD maxwait) ptr=ptr_;
continue;
}
- bProcess = (strcmp (pMsg, "SENT") == 0 || strcmp (pMsg, "QUEUED") == 0 ||
- strcmp (pMsg, "FAILED") == 0 || strcmp (pMsg, "IGNORED") == 0 ||
- strcmp (pMsg, "SENDING") == 0);
+ bProcess = (mir_strcmp (pMsg, "SENT") == 0 || mir_strcmp (pMsg, "QUEUED") == 0 ||
+ mir_strcmp (pMsg, "FAILED") == 0 || mir_strcmp (pMsg, "IGNORED") == 0 ||
+ mir_strcmp (pMsg, "SENDING") == 0);
}
}
}
@@ -907,7 +907,7 @@ static INT_PTR CALLBACK CallstatDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, // Check, if another call is in progress
for (hContact=db_find_first();hContact != NULL;hContact=db_find_next(hContact)) {
char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, hContact, 0 );
- if (szProto != NULL && !strcmp(szProto, SKYPE_PROTONAME) && hContact != (MCONTACT)lParam &&
+ if (szProto != NULL && !mir_strcmp(szProto, SKYPE_PROTONAME) && hContact != (MCONTACT)lParam &&
db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0) == 0 &&
!db_get_s(hContact, SKYPE_PROTONAME, "CallId", &dbv2))
{
@@ -1319,10 +1319,10 @@ void SkypeFlush(void) { * 0 - Nothing found
*/
int SkypeStatusToMiranda(char *s) {
- if (!strcmp("SKYPEOUT", s))
+ if (!mir_strcmp("SKYPEOUT", s))
return db_get_dw(NULL, SKYPE_PROTONAME, "SkypeOutStatusMode", ID_STATUS_ONTHEPHONE);
for(int i=0; status_codes[i].szStat; i++)
- if (!strcmp(status_codes[i].szStat, s))
+ if (!mir_strcmp(status_codes[i].szStat, s))
return status_codes[i].id;
return 0;
}
@@ -1583,7 +1583,7 @@ static int _ConnectToSkypeAPI(char *path, int iStart) { return -1;
}
- if (strcmp (ptr+11, "CONNECTING"))
+ if (mir_strcmp (ptr+11, "CONNECTING"))
{
free (ptr);
break;
diff --git a/protocols/SkypeClassic/src/skypeproxy/skypeproxy.c b/protocols/SkypeClassic/src/skypeproxy/skypeproxy.c index fe3b88e363..65ba2e0ccc 100644 --- a/protocols/SkypeClassic/src/skypeproxy/skypeproxy.c +++ b/protocols/SkypeClassic/src/skypeproxy/skypeproxy.c @@ -299,7 +299,7 @@ void SkypeSend(char *szMsg) { LOG(("SkypeSend: DAMN! No Skype window handle! :("));
return;
}
- if (strcmp(szMsg, "PING")) {LOG(("> %s", szMsg));}
+ if (mir_strcmp(szMsg, "PING")) {LOG(("> %s", szMsg));}
CopyData.dwData=0;
CopyData.lpData=szMsg;
CopyData.cbData=strlen(szMsg)+1;
@@ -379,7 +379,7 @@ void ServerThread(char *dummy) { switch (command) {
#ifdef USE_AUTHENTICATION
case 0x01: // Compare hash
- if (password && !strcmp(password, buf)) Authenticated=TRUE;
+ if (password && !mir_strcmp(password, buf)) Authenticated=TRUE;
else Authenticated=FALSE;
if (Authenticated) {
OUTPUT("User authenticated succesfully.");
@@ -439,12 +439,12 @@ LONG APIENTRY WndProc(HWND hWnd, UINT message, UINT wParam, LONG lParam) CopyData=(PCOPYDATASTRUCT)lParam;
szSkypeMsg=strdup(CopyData->lpData);
ReplyMessage(1);
- if (!strcmp(szSkypeMsg, "PONG")) {
+ if (!mir_strcmp(szSkypeMsg, "PONG")) {
WatchDog=1;
break;
} // Hide PING-PONG
LOG(("< %s", szSkypeMsg));
- if (!strcmp(szSkypeMsg, "USERSTATUS LOGGEDOUT")) {
+ if (!mir_strcmp(szSkypeMsg, "USERSTATUS LOGGEDOUT")) {
OUTPUT("Skype shut down gracefully. I'll leave too, bye.. :)");
bail_out(1);
}
diff --git a/protocols/SkypeWeb/src/skype_chatrooms.cpp b/protocols/SkypeWeb/src/skype_chatrooms.cpp index 4dc1047e83..3db8101cf8 100644 --- a/protocols/SkypeWeb/src/skype_chatrooms.cpp +++ b/protocols/SkypeWeb/src/skype_chatrooms.cpp @@ -148,7 +148,7 @@ int CSkypeProto::OnGroupChatEventHook(WPARAM, LPARAM lParam) {
return 1;
}
- else if (strcmp(gch->pDest->pszModule, m_szModuleName) != 0)
+ else if (mir_strcmp(gch->pDest->pszModule, m_szModuleName) != 0)
{
return 0;
}
diff --git a/protocols/SkypeWeb/src/skype_contacts.cpp b/protocols/SkypeWeb/src/skype_contacts.cpp index 0a33ee44e8..42366808d4 100644 --- a/protocols/SkypeWeb/src/skype_contacts.cpp +++ b/protocols/SkypeWeb/src/skype_contacts.cpp @@ -67,7 +67,7 @@ MCONTACT CSkypeProto::GetContactFromAuthEvent(MEVENT hEvent) if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return INVALID_CONTACT_ID;
- if (strcmp(dbei.szModule, m_szModuleName) != 0)
+ if (mir_strcmp(dbei.szModule, m_szModuleName) != 0)
return INVALID_CONTACT_ID;
return DbGetAuthEventContact(&dbei);
}
diff --git a/protocols/SkypeWeb/src/skype_proto.cpp b/protocols/SkypeWeb/src/skype_proto.cpp index 266e522395..fde3788e65 100644 --- a/protocols/SkypeWeb/src/skype_proto.cpp +++ b/protocols/SkypeWeb/src/skype_proto.cpp @@ -116,7 +116,7 @@ MCONTACT CSkypeProto::AddToListByEvent(int, int, MEVENT hDbEvent) return NULL;
if (db_event_get(hDbEvent, &dbei))
return NULL;
- if (strcmp(dbei.szModule, m_szModuleName))
+ if (mir_strcmp(dbei.szModule, m_szModuleName))
return NULL;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return NULL;
diff --git a/protocols/Steam/src/steam_contacts.cpp b/protocols/Steam/src/steam_contacts.cpp index 313e765b41..5749916f27 100644 --- a/protocols/Steam/src/steam_contacts.cpp +++ b/protocols/Steam/src/steam_contacts.cpp @@ -72,7 +72,7 @@ MCONTACT CSteamProto::GetContactFromAuthEvent(MEVENT hEvent) if (dbei.eventType != EVENTTYPE_AUTHREQUEST) return INVALID_CONTACT_ID; - if (strcmp(dbei.szModule, m_szModuleName) != 0) + if (mir_strcmp(dbei.szModule, m_szModuleName) != 0) return INVALID_CONTACT_ID; return DbGetAuthEventContact(&dbei); diff --git a/protocols/Steam/src/steam_instances.cpp b/protocols/Steam/src/steam_instances.cpp index c2113d3c6c..edd1eaef7f 100644 --- a/protocols/Steam/src/steam_instances.cpp +++ b/protocols/Steam/src/steam_instances.cpp @@ -38,7 +38,7 @@ CSteamProto* CSteamProto::GetContactProtoInstance(MCONTACT hContact) return NULL;
for (int i = 0; i < InstanceList.getCount(); i++)
- if (!strcmp(proto, InstanceList[i]->m_szModuleName))
+ if (!mir_strcmp(proto, InstanceList[i]->m_szModuleName))
return InstanceList[i];
return NULL;
diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp index bfa27646e0..2137bf8c58 100644 --- a/protocols/Tlen/src/tlen_avatar.cpp +++ b/protocols/Tlen/src/tlen_avatar.cpp @@ -141,7 +141,7 @@ int TlenProcessAvatarNode(TlenProtocol *proto, XmlNode *avatarNode, TLEN_LIST_IT } if (md5 != NULL) { /* check contact's avatar hash - md5 */ - if (oldHash == NULL || strcmp(oldHash, md5)) { + if (oldHash == NULL || mir_strcmp(oldHash, md5)) { if (item != NULL) { item->newAvatarDownloading = TRUE; } diff --git a/protocols/Tlen/src/tlen_file.cpp b/protocols/Tlen/src/tlen_file.cpp index 9d05fef08f..105f3785f1 100644 --- a/protocols/Tlen/src/tlen_file.cpp +++ b/protocols/Tlen/src/tlen_file.cpp @@ -552,7 +552,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info) int numFiles;
TLEN_LIST_ITEM *item;
-// if (!node->name || strcmp(node->name, "f")) return;
+// if (!node->name || mir_strcmp(node->name, "f")) return;
if (info == NULL) return;
char *from=TlenXmlGetAttrValue(node, "f");
@@ -564,7 +564,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info) }
char *e=TlenXmlGetAttrValue(node, "e");
if (e != NULL) {
- if (!strcmp(e, "1")) {
+ if (!mir_strcmp(e, "1")) {
// FILE_RECV : e='1' : File transfer request
TLEN_FILE_TRANSFER *ft = TlenFileCreateFT(info->proto, jid);
ft->hContact = TlenHContactFromJID(info->proto, jid);
@@ -610,7 +610,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info) TlenP2PFreeFileTransfer(ft);
}
}
- else if (!strcmp(e, "3")) {
+ else if (!mir_strcmp(e, "3")) {
// FILE_RECV : e='3' : invalid transfer error
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_FILE, p)) != NULL) {
@@ -622,27 +622,27 @@ void TlenProcessF(XmlNode *node, ThreadData *info) }
}
}
- else if (!strcmp(e, "4")) {
+ else if (!mir_strcmp(e, "4")) {
// FILE_SEND : e='4' : File sending request was denied by the remote client
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_FILE, p)) != NULL) {
- if (!strcmp(item->ft->jid, jid)) {
+ if (!mir_strcmp(item->ft->jid, jid)) {
ProtoBroadcastAck(info->proto->m_szModuleName, item->ft->hContact, ACKTYPE_FILE, ACKRESULT_DENIED, item->ft, 0);
TlenListRemove(info->proto, LIST_FILE, p);
}
}
}
}
- else if (!strcmp(e, "5")) {
+ else if (!mir_strcmp(e, "5")) {
// FILE_SEND : e='5' : File sending request was accepted
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_FILE, p)) != NULL) {
- if (!strcmp(item->ft->jid, jid))
+ if (!mir_strcmp(item->ft->jid, jid))
forkthread((void (__cdecl *)(void*))TlenFileSendingThread, 0, item->ft);
}
}
}
- else if (!strcmp(e, "6")) {
+ else if (!mir_strcmp(e, "6")) {
// FILE_RECV : e='6' : IP and port information to connect to get file
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_FILE, p)) != NULL) {
@@ -656,7 +656,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info) }
}
}
- else if (!strcmp(e, "7")) {
+ else if (!mir_strcmp(e, "7")) {
// FILE_RECV : e='7' : IP and port information to connect to send file
// in case the conection to the given server was not successful
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
@@ -673,7 +673,7 @@ void TlenProcessF(XmlNode *node, ThreadData *info) }
}
}
- else if (!strcmp(e, "8")) {
+ else if (!mir_strcmp(e, "8")) {
// FILE_RECV : e='8' : transfer error
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_FILE, p)) != NULL) {
diff --git a/protocols/Tlen/src/tlen_iqid.cpp b/protocols/Tlen/src/tlen_iqid.cpp index 837a24d81b..e0b831b98e 100644 --- a/protocols/Tlen/src/tlen_iqid.cpp +++ b/protocols/Tlen/src/tlen_iqid.cpp @@ -35,7 +35,7 @@ void TlenIqResultAuth(TlenProtocol *proto, XmlNode *iqNode) if (type == NULL)
return;
- if (!strcmp(type, "result")) {
+ if (!mir_strcmp(type, "result")) {
DBVARIANT dbv;
if (db_get(NULL, proto->m_szModuleName, "Nick", &dbv))
@@ -50,7 +50,7 @@ void TlenIqResultAuth(TlenProtocol *proto, XmlNode *iqNode) TlenSend(proto, "<iq to='tcfg' type='get' id='TcfgGetAfterLoggedIn'></iq>");
}
// What to do if password error? etc...
- else if (!strcmp(type, "error")) {
+ else if (!mir_strcmp(type, "error")) {
char text[128];
TlenSend(proto, "</s>");
@@ -69,13 +69,13 @@ void TlenResultSetRoster(TlenProtocol *proto, XmlNode *queryNode) { for (int i=0; i<queryNode->numChild; i++) {
XmlNode *itemNode = queryNode->child[i];
- if (!strcmp(itemNode->name, "item")) {
+ if (!mir_strcmp(itemNode->name, "item")) {
char *jid=TlenXmlGetAttrValue(itemNode, "jid");
if (jid != NULL) {
char *str = TlenXmlGetAttrValue(itemNode, "subscription");
if (str == NULL)
continue;
- else if (!strcmp(str, "remove")) {
+ else if (!mir_strcmp(str, "remove")) {
if ((hContact = TlenHContactFromJID(proto, jid)) != NULL) {
if (db_get_w(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
db_set_w(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE);
@@ -84,11 +84,11 @@ void TlenResultSetRoster(TlenProtocol *proto, XmlNode *queryNode) { } else {
TLEN_LIST_ITEM *item = TlenListAdd(proto, LIST_ROSTER, jid);
if (item != NULL) {
- if (!strcmp(str, "both"))
+ if (!mir_strcmp(str, "both"))
item->subscription = SUB_BOTH;
- else if (!strcmp(str, "to"))
+ else if (!mir_strcmp(str, "to"))
item->subscription = SUB_TO;
- else if (!strcmp(str, "from"))
+ else if (!mir_strcmp(str, "from"))
item->subscription = SUB_FROM;
else
item->subscription = SUB_NONE;
@@ -113,7 +113,7 @@ void TlenResultSetRoster(TlenProtocol *proto, XmlNode *queryNode) { Clist_CreateGroup(0, _A2T(item->group));
// Don't set group again if already correct, or Miranda may show wrong group count in some case
if (!db_get(hContact, "CList", "Group", &dbv)) {
- if (strcmp(dbv.pszVal, item->group))
+ if (mir_strcmp(dbv.pszVal, item->group))
db_set_s(hContact, "CList", "Group", item->group);
db_free(&dbv);
} else
@@ -139,9 +139,9 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) XmlNode *queryNode=TlenXmlGetChild(iqNode, "query");
if (queryNode == NULL) return;
- if (!strcmp(type, "result")) {
+ if (!mir_strcmp(type, "result")) {
char *str = TlenXmlGetAttrValue(queryNode, "xmlns");
- if (str != NULL && !strcmp(str, "jabber:iq:roster")) {
+ if (str != NULL && !mir_strcmp(str, "jabber:iq:roster")) {
DBVARIANT dbv;
XmlNode *itemNode, *groupNode;
TLEN_SUBSCRIPTION sub;
@@ -151,14 +151,14 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) for (i=0; i<queryNode->numChild; i++) {
itemNode = queryNode->child[i];
- if (!strcmp(itemNode->name, "item")) {
+ if (!mir_strcmp(itemNode->name, "item")) {
str = TlenXmlGetAttrValue(itemNode, "subscription");
if (str == NULL) sub = SUB_NONE;
- else if (!strcmp(str, "both")) sub = SUB_BOTH;
- else if (!strcmp(str, "to")) sub = SUB_TO;
- else if (!strcmp(str, "from")) sub = SUB_FROM;
+ else if (!mir_strcmp(str, "both")) sub = SUB_BOTH;
+ else if (!mir_strcmp(str, "to")) sub = SUB_TO;
+ else if (!mir_strcmp(str, "from")) sub = SUB_FROM;
else sub = SUB_NONE;
- //if (str != NULL && (!strcmp(str, "to") || !strcmp(str, "both"))) {
+ //if (str != NULL && (!mir_strcmp(str, "to") || !mir_strcmp(str, "both"))) {
if ((jid=TlenXmlGetAttrValue(itemNode, "jid")) != NULL) {
if ((name=TlenXmlGetAttrValue(itemNode, "name")) != NULL)
nick = TlenTextDecode(name);
@@ -183,7 +183,7 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) Clist_CreateGroup(0, _A2T(item->group));
// Don't set group again if already correct, or Miranda may show wrong group count in some case
if (!db_get(hContact, "CList", "Group", &dbv)) {
- if (strcmp(dbv.pszVal, item->group))
+ if (mir_strcmp(dbv.pszVal, item->group))
db_set_s(hContact, "CList", "Group", item->group);
db_free(&dbv);
}
@@ -247,7 +247,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) char *type=TlenXmlGetAttrValue(iqNode, "type");
if (type == NULL) return;
- if (!strcmp(type, "result")) {
+ if (!mir_strcmp(type, "result")) {
DBVARIANT dbv;
XmlNode *queryNode=TlenXmlGetChild(iqNode, "query");
@@ -265,7 +265,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) db_free(&dbv);
if ((hContact=TlenHContactFromJID(proto, text)) == NULL) {
if (db_get(NULL, proto->m_szModuleName, "LoginName", &dbv)) return;
- if (strcmp(dbv.pszVal, jid)) {
+ if (mir_strcmp(dbv.pszVal, jid)) {
db_free(&dbv);
return;
}
@@ -279,7 +279,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) for (int i=0; i<itemNode->numChild; i++) {
XmlNode *n = itemNode->child[i];
if (n == NULL || n->name == NULL) continue;
- if (!strcmp(n->name, "first")) {
+ if (!mir_strcmp(n->name, "first")) {
if (n->text != NULL) {
hasFirst = true;
nText = TlenTextDecode(n->text);
@@ -287,7 +287,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) mir_free(nText);
}
}
- else if (!strcmp(n->name, "last")) {
+ else if (!mir_strcmp(n->name, "last")) {
if (n->text != NULL) {
hasLast = true;
nText = TlenTextDecode(n->text);
@@ -295,7 +295,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) mir_free(nText);
}
}
- else if (!strcmp(n->name, "nick")) {
+ else if (!mir_strcmp(n->name, "nick")) {
if (n->text != NULL) {
hasNick = true;
nText = TlenTextDecode(n->text);
@@ -303,7 +303,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) mir_free(nText);
}
}
- else if (!strcmp(n->name, "email")) {
+ else if (!mir_strcmp(n->name, "email")) {
if (n->text != NULL) {
hasEmail = true;
nText = TlenTextDecode(n->text);
@@ -311,7 +311,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) mir_free(nText);
}
}
- else if (!strcmp(n->name, "c")) {
+ else if (!mir_strcmp(n->name, "c")) {
if (n->text != NULL) {
hasCity = true;
nText = TlenTextDecode(n->text);
@@ -319,20 +319,20 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) mir_free(nText);
}
}
- else if (!strcmp(n->name, "b")) {
+ else if (!mir_strcmp(n->name, "b")) {
if (n->text != NULL) {
WORD nAge = atoi(n->text);
hasAge = true;
db_set_w(hContact, proto->m_szModuleName, "Age", nAge);
}
}
- else if (!strcmp(n->name, "s")) {
+ else if (!mir_strcmp(n->name, "s")) {
if (n->text != NULL && n->text[1] == '\0' && (n->text[0] == '1' || n->text[0] == '2')) {
hasGender = true;
db_set_b(hContact, proto->m_szModuleName, "Gender", (BYTE) (n->text[0] == '1'?'M':'F'));
}
}
- else if (!strcmp(n->name, "e")) {
+ else if (!mir_strcmp(n->name, "e")) {
if (n->text != NULL) {
hasSchool = true;
nText = TlenTextDecode(n->text);
@@ -340,27 +340,27 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) mir_free(nText);
}
}
- else if (!strcmp(n->name, "j")) {
+ else if (!mir_strcmp(n->name, "j")) {
if (n->text != NULL) {
hasOccupation = true;
WORD nOccupation = atoi(n->text);
db_set_w(hContact, proto->m_szModuleName, "Occupation", nOccupation);
}
}
- else if (!strcmp(n->name, "r")) {
+ else if (!mir_strcmp(n->name, "r")) {
if (n->text != NULL) {
WORD nLookFor = atoi(n->text);
hasLookFor = true;
db_set_w(hContact, proto->m_szModuleName, "LookingFor", nLookFor);
}
}
- else if (!strcmp(n->name, "g")) { // voice chat enabled
+ else if (!mir_strcmp(n->name, "g")) { // voice chat enabled
if (n->text != NULL) {
BYTE bVoice = atoi(n->text);
db_set_w(hContact, proto->m_szModuleName, "VoiceChat", bVoice);
}
}
- else if (!strcmp(n->name, "v")) { // status visibility
+ else if (!mir_strcmp(n->name, "v")) { // status visibility
if (n->text != NULL) {
BYTE bPublic = atoi(n->text);
db_set_w(hContact, proto->m_szModuleName, "PublicStatus", bPublic);
@@ -409,14 +409,14 @@ void TlenIqResultSearch(TlenProtocol *proto, XmlNode *iqNode) return;
int id = atoi(str+mir_strlen(TLEN_IQID));
- if (!strcmp(type, "result")) {
+ if (!mir_strcmp(type, "result")) {
if ((queryNode=TlenXmlGetChild(iqNode, "query")) == NULL) return;
if (!db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
jsr.hdr.cbSize = sizeof(TLEN_SEARCH_RESULT);
jsr.hdr.flags = PSR_TCHAR;
for (i=0; i<queryNode->numChild; i++) {
itemNode = queryNode->child[i];
- if (!strcmp(itemNode->name, "item")) {
+ if (!mir_strcmp(itemNode->name, "item")) {
if ((jid=TlenXmlGetAttrValue(itemNode, "jid")) != NULL) {
if (strchr(jid, '@') != NULL) {
strncpy_s(jsr.jid, jid, _TRUNCATE);
@@ -495,7 +495,7 @@ void TlenIqResultSearch(TlenProtocol *proto, XmlNode *iqNode) if (!found) {
ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_SUCCESS, (HANDLE) id, 0);
}
- } else if (!strcmp(type, "error")) {
+ } else if (!mir_strcmp(type, "error")) {
// ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_SEARCH, ACKRESULT_FAILED, (HANDLE) id, 0);
// There is no ACKRESULT_FAILED for ACKTYPE_SEARCH :) look at findadd.c
// So we will just send a SUCCESS
@@ -523,7 +523,7 @@ void TlenIqResultTcfg(TlenProtocol *proto, XmlNode *iqNode) char *type=TlenXmlGetAttrValue(iqNode, "type");
if (type == NULL) return;
- if (!strcmp(type, "result")) {
+ if (!mir_strcmp(type, "result")) {
if ((queryNode=TlenXmlGetChild(iqNode, "query")) == NULL) return;
if ((miniMailNode=TlenXmlGetChild(queryNode, "mini-mail")) == NULL) return;
if ((node=TlenXmlGetChild(miniMailNode, "base")) != NULL) {
diff --git a/protocols/Tlen/src/tlen_muc.cpp b/protocols/Tlen/src/tlen_muc.cpp index 9712af7339..07b59d5f47 100644 --- a/protocols/Tlen/src/tlen_muc.cpp +++ b/protocols/Tlen/src/tlen_muc.cpp @@ -39,9 +39,9 @@ static int isSelf(TlenProtocol *proto, const char *roomID, const char *nick) item = TlenListGetItemPtr(proto, LIST_CHATROOM, roomID);
if (item != NULL) {
if (item->nick == NULL) {
- if (!strcmp(nick, proto->threadData->username)) result = 1;
+ if (!mir_strcmp(nick, proto->threadData->username)) result = 1;
} else if (nick[0] == '~') {
- if (!strcmp(nick+1, item->nick)) {
+ if (!mir_strcmp(nick+1, item->nick)) {
result = 1;
}
}
@@ -72,7 +72,7 @@ static char *getDisplayName(TlenProtocol *proto, const char *id) if (!db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
mir_snprintf(jid, SIZEOF(jid), "%s@%s", id, dbv.pszVal);
db_free(&dbv);
- if (((hContact=TlenHContactFromJID(proto, jid)) != NULL) || !strcmp(id, proto->threadData->username)) {
+ if (((hContact=TlenHContactFromJID(proto, jid)) != NULL) || !mir_strcmp(id, proto->threadData->username)) {
CONTACTINFO ci = { sizeof(ci) };
ci.hContact = hContact;
ci.szProto = (char *)proto->m_szModuleName;
diff --git a/protocols/Tlen/src/tlen_p2p_new.cpp b/protocols/Tlen/src/tlen_p2p_new.cpp index 868b877313..5401396e96 100644 --- a/protocols/Tlen/src/tlen_p2p_new.cpp +++ b/protocols/Tlen/src/tlen_p2p_new.cpp @@ -243,7 +243,7 @@ void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) { e = TlenXmlGetAttrValue(fs, "e");
id = TlenXmlGetAttrValue(fs, "i");
if (e != NULL) {
- if (!strcmp(e, "1")) {
+ if (!mir_strcmp(e, "1")) {
TLEN_FILE_TRANSFER * ft = (TLEN_FILE_TRANSFER *) mir_alloc(sizeof(TLEN_FILE_TRANSFER));
memset(ft, 0, sizeof(TLEN_FILE_TRANSFER));
char *c = TlenXmlGetAttrValue(fs, "c");
@@ -270,11 +270,11 @@ void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) { ProtoChainRecvFile(ft->hContact, &pre);
mir_free(filenameT);
}
- } else if (!strcmp(e, "3")) {
+ } else if (!mir_strcmp(e, "3")) {
/* transfer error */
- } else if (!strcmp(e, "4")) {
+ } else if (!mir_strcmp(e, "4")) {
/* transfer denied */
- } else if (!strcmp(e, "5")) {
+ } else if (!mir_strcmp(e, "5")) {
/* transfer accepted */
if ((item=TlenListGetItemPtr(info->proto, LIST_FILE, id)) != NULL) {
item->id2 = mir_strdup("84273372");
@@ -290,7 +290,7 @@ void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) { char *s = TlenXmlGetAttrValue(dcng, "s");
char *id2 = TlenXmlGetAttrValue(dcng, "i");
char *id = TlenXmlGetAttrValue(dcng, "mi");
- if (!strcmp(s, "1")) {
+ if (!mir_strcmp(s, "1")) {
/* Keys */
/* s - step */
/* i - id of the file */
@@ -301,7 +301,7 @@ void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) { char *v = TlenXmlGetAttrValue(dcng, "v"); // v - ???
char *ck = TlenXmlGetAttrValue(dcng, "ck"); // ck - aes key
char *iv = TlenXmlGetAttrValue(dcng, "iv"); // iv - aes initial vector
- if (!strcmp(n, "file_send")) {
+ if (!mir_strcmp(n, "file_send")) {
if ((item=TlenListGetItemPtr(info->proto, LIST_FILE, id)) != NULL) {
item->id2 = mir_strdup(id2);
item->ft->id2 = mir_strdup(id2);
@@ -310,7 +310,7 @@ void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) { item->ft->jid, item->ft->localName, item->ft->wLocalPort, item->ft->localName, item->ft->wLocalPort, item->ft->id2);
}
}
- } else if (!strcmp(s, "2")) {
+ } else if (!mir_strcmp(s, "2")) {
info->proto->debugLogA("step = 2");
info->proto->debugLogA("%s",from);
info->proto->debugLogA("%s",id2);
@@ -324,7 +324,7 @@ void __cdecl TlenProcessP2P(XmlNode *node, ThreadData *info) { forkthread((void (__cdecl *)(void*))TlenNewFileReceiveThread, 0, item->ft);
forkthread((void (__cdecl *)(void*))TlenNewFileSendThread, 0, item->ft);
}
- } else if (!strcmp(s, "4")) {
+ } else if (!mir_strcmp(s, "4")) {
/* IP and port */
if ((item=TlenListFindItemPtrById2(info->proto, LIST_FILE, id2)) != NULL) {
info->proto->debugLogA("step = 4");
diff --git a/protocols/Tlen/src/tlen_p2p_old.cpp b/protocols/Tlen/src/tlen_p2p_old.cpp index dee4b8831a..64edd27d0e 100644 --- a/protocols/Tlen/src/tlen_p2p_old.cpp +++ b/protocols/Tlen/src/tlen_p2p_old.cpp @@ -203,7 +203,7 @@ TLEN_FILE_TRANSFER* TlenP2PEstablishIncomingConnection(TlenProtocol *proto, HAND item = TlenListGetItemPtrFromIndex(proto, i);
if (item != NULL) {
mir_snprintf(str, SIZEOF(str), "%d", iqId);
- if (!strcmp(item->ft->iqId, str)) {
+ if (!mir_strcmp(item->ft->iqId, str)) {
char *hash, *nick;
int j;
nick = TlenNickFromJID(item->ft->jid);
diff --git a/protocols/Tlen/src/tlen_picture.cpp b/protocols/Tlen/src/tlen_picture.cpp index cfda82403b..cc7163c13f 100644 --- a/protocols/Tlen/src/tlen_picture.cpp +++ b/protocols/Tlen/src/tlen_picture.cpp @@ -188,7 +188,7 @@ void TlenProcessPic(XmlNode *node, TlenProtocol *proto) { item = TlenListGetItemPtr(proto, LIST_PICTURE, idt);
}
if (item != NULL) {
- if (!strcmp(from, "ps")) {
+ if (!mir_strcmp(from, "ps")) {
char *st = TlenXmlGetAttrValue(node, "st");
if (st != NULL) {
item->ft->iqId = mir_strdup(st);
@@ -198,12 +198,12 @@ void TlenProcessPic(XmlNode *node, TlenProtocol *proto) { item->ft->hFileEvent = NULL;
}
}
- } else if (!strcmp(item->ft->jid, fromRaw)) {
+ } else if (!mir_strcmp(item->ft->jid, fromRaw)) {
if (crc_c != NULL) {
- if (!strcmp(crc_c, "n")) {
+ if (!mir_strcmp(crc_c, "n")) {
/* crc_c = n, picture transfer accepted */
TlenPsPost(proto, item);
- } else if (!strcmp(crc_c, "f")) {
+ } else if (!mir_strcmp(crc_c, "f")) {
/* crc_c = f, picture cached, no need to transfer again */
LogPictureMessage(proto, item->ft->jid, item->ft->files[0], TRUE);
TlenP2PFreeFileTransfer(item->ft);
diff --git a/protocols/Tlen/src/tlen_presence.cpp b/protocols/Tlen/src/tlen_presence.cpp index a3920281b7..c68af8606c 100644 --- a/protocols/Tlen/src/tlen_presence.cpp +++ b/protocols/Tlen/src/tlen_presence.cpp @@ -44,7 +44,7 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) TlenProcessPresenceAvatar(proto, node, item); } } - if (type == NULL || (!strcmp(type, "available"))) { + if (type == NULL || (!mir_strcmp(type, "available"))) { if ((nick=TlenLocalNickFromJID(from)) != NULL) { if ((hContact=TlenHContactFromJID(proto, from)) == NULL) hContact = TlenDBCreateContact(proto, from, nick, FALSE); @@ -55,11 +55,11 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) status = ID_STATUS_ONLINE; if ((showNode=TlenXmlGetChild(node, "show")) != NULL) { if ((show=showNode->text) != NULL) { - if (!strcmp(show, "away")) status = ID_STATUS_AWAY; - else if (!strcmp(show, "xa")) status = ID_STATUS_NA; - else if (!strcmp(show, "dnd")) status = ID_STATUS_DND; - else if (!strcmp(show, "chat")) status = ID_STATUS_FREECHAT; - else if (!strcmp(show, "unavailable")) { + if (!mir_strcmp(show, "away")) status = ID_STATUS_AWAY; + else if (!mir_strcmp(show, "xa")) status = ID_STATUS_NA; + else if (!mir_strcmp(show, "dnd")) status = ID_STATUS_DND; + else if (!mir_strcmp(show, "chat")) status = ID_STATUS_FREECHAT; + else if (!mir_strcmp(show, "unavailable")) { // Always show invisible (on old Tlen client) as invisible (not offline) status = ID_STATUS_OFFLINE; } @@ -106,7 +106,7 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) mir_free(nick); } } - else if (!strcmp(type, "unavailable")) { + else if (!mir_strcmp(type, "unavailable")) { if (!TlenListExist(proto, LIST_ROSTER, from)) { proto->debugLogA("Receive presence offline from %s (who is not in my roster)", from); TlenListAdd(proto, LIST_ROSTER, from); @@ -153,7 +153,7 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) proto->debugLogA("%s offline, set contact status to %d", from, status); } } - else if (!strcmp(type, "subscribe")) { + else if (!mir_strcmp(type, "subscribe")) { if (strchr(from, '@') == NULL) { // automatically send authorization allowed to agent/transport TlenSend(proto, "<presence to='%s' type='subscribed'/>", from); @@ -164,7 +164,7 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) mir_free(nick); } } - else if (!strcmp(type, "subscribed")) { + else if (!mir_strcmp(type, "subscribed")) { if ((item=TlenListGetItemPtr(proto, LIST_ROSTER, from)) != NULL) { if (item->subscription == SUB_FROM) item->subscription = SUB_BOTH; else if (item->subscription == SUB_NONE) { diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp index b578bf6e6b..5572212bbb 100644 --- a/protocols/Tlen/src/tlen_svc.cpp +++ b/protocols/Tlen/src/tlen_svc.cpp @@ -233,7 +233,7 @@ MCONTACT TlenProtocol::AddToListByEvent(int flags, int iContact, MEVENT hDbEvent mir_free(dbei.pBlob);
return NULL;
}
- if (strcmp(dbei.szModule, m_szModuleName)) {
+ if (mir_strcmp(dbei.szModule, m_szModuleName)) {
mir_free(dbei.pBlob);
return NULL;
}
@@ -278,7 +278,7 @@ int TlenProtocol::Authorize(MEVENT hDbEvent) mir_free(dbei.pBlob);
return 1;
}
- if (strcmp(dbei.szModule, m_szModuleName)) {
+ if (mir_strcmp(dbei.szModule, m_szModuleName)) {
mir_free(dbei.pBlob);
return 1;
}
@@ -327,7 +327,7 @@ int TlenProtocol::AuthDeny(MEVENT hDbEvent, const PROTOCHAR* szReason) mir_free(dbei.pBlob);
return 1;
}
- if (strcmp(dbei.szModule, m_szModuleName)) {
+ if (mir_strcmp(dbei.szModule, m_szModuleName)) {
mir_free(dbei.pBlob);
return 1;
}
@@ -449,7 +449,7 @@ int TlenProtocol::SetAwayMsg(int iStatus, const PROTOCHAR* msg) }
if ((*szMsg == NULL && newModeMsg == NULL) ||
- (*szMsg != NULL && newModeMsg != NULL && !strcmp(*szMsg, newModeMsg))) {
+ (*szMsg != NULL && newModeMsg != NULL && !mir_strcmp(*szMsg, newModeMsg))) {
// Message is the same, no update needed
if (newModeMsg != NULL) mir_free(newModeMsg);
}
@@ -572,7 +572,7 @@ static void __cdecl TlenGetAwayMsgThread(void *ptr) item->statusMessage==NULL ? (LPARAM)NULL : (LPARAM)(TCHAR*)_A2T(item->statusMessage));
} else {
ptrA ownJid(db_get_sa(NULL, data->proto->m_szModuleName, "jid"));
- if (!strcmp(ownJid, dbv.pszVal)){
+ if (!mir_strcmp(ownJid, dbv.pszVal)){
DBVARIANT dbv2;
if (!db_get_s(data->hContact, "CList", "StatusMsg", &dbv2, DBVT_TCHAR)){
data->proto->ProtoBroadcastAck(data->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv2.ptszVal);
@@ -614,11 +614,11 @@ int TlenProtocol::SendMsg(MCONTACT hContact, int, const char* msgRAW) int id = TlenSerialNext(this);
- if (!strcmp(msgRAW, "<alert>")) {
+ if (!mir_strcmp(msgRAW, "<alert>")) {
TlenSend(this, "<m tp='a' to='%s'/>", dbv.pszVal);
forkthread(TlenSendMessageAckThread, 0, new SENDACKTHREADDATA(this, hContact, id));
}
- else if (!strcmp(msgRAW, "<image>")) {
+ else if (!mir_strcmp(msgRAW, "<image>")) {
TlenSend(this, "<message to='%s' type='%s' crc='%x' idt='%d'/>", dbv.pszVal, "pic", 0x757f044, id);
forkthread(TlenSendMessageAckThread, 0, new SENDACKTHREADDATA(this, hContact, id));
}
@@ -632,10 +632,10 @@ int TlenProtocol::SendMsg(MCONTACT hContact, int, const char* msgRAW) else
strcpy(msgType, "chat");
- if (!strcmp(msgType, "groupchat") || db_get_b(NULL, m_szModuleName, "MsgAck", FALSE) == FALSE) {
- if (!strcmp(msgType, "groupchat"))
+ if (!mir_strcmp(msgType, "groupchat") || db_get_b(NULL, m_szModuleName, "MsgAck", FALSE) == FALSE) {
+ if (!mir_strcmp(msgType, "groupchat"))
TlenSend(this, "<message to='%s' type='%s'><body>%s</body></message>", dbv.pszVal, msgType, msgEnc);
- else if (!strcmp(msgType, "privchat"))
+ else if (!mir_strcmp(msgType, "privchat"))
TlenSend(this, "<m to='%s'><b n='6' s='10' f='0' c='000000'>%s</b></m>", dbv.pszVal, msgEnc);
else
TlenSend(this, "<message to='%s' type='%s' id='"TLEN_IQID"%d'><body>%s</body><x xmlns='jabber:x:event'><composing/></x></message>", dbv.pszVal, msgType, id, msgEnc);
@@ -875,15 +875,15 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) if (hContact == NULL) return 0;
if (!isConnected) return 0;
- if (!strcmp(cws->szModule, "CList")) {
+ if (!mir_strcmp(cws->szModule, "CList")) {
DBVARIANT dbv;
TLEN_LIST_ITEM *item;
char *nick, *jid, *group;
char *szProto = GetContactProto(hContact);
- if (szProto == NULL || strcmp(szProto, m_szModuleName)) return 0;
+ if (szProto == NULL || mir_strcmp(szProto, m_szModuleName)) return 0;
// A contact's group is changed
- if (!strcmp(cws->szSetting, "Group")) {
+ if (!mir_strcmp(cws->szSetting, "Group")) {
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
if ((item=TlenListGetItemPtr(this, LIST_ROSTER, dbv.pszVal)) != NULL) {
db_free(&dbv);
@@ -905,7 +905,7 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) }
else if (cws->value.pszVal != NULL) {
char *newGroup = settingToChar(cws);
- if (item->group == NULL || strcmp(newGroup, item->group)) {
+ if (item->group == NULL || mir_strcmp(newGroup, item->group)) {
debugLogA("Group set to %s", newGroup);
if ((group=TlenGroupEncode(newGroup)) != NULL) {
TlenSend(this, "<iq type='set'><query xmlns='jabber:iq:roster'><item name='%s' jid='%s'><group>%s</group></item></query></iq>", nick, item->jid, group);
@@ -923,12 +923,12 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) }
}
// A contact is renamed
- else if (!strcmp(cws->szSetting, "MyHandle")) {
+ else if (!mir_strcmp(cws->szSetting, "MyHandle")) {
char *newNick;
// hContact = (MCONTACT) wParam;
// szProto = GetContactProto(hContact);
-// if (szProto == NULL || strcmp(szProto, proto->m_szModuleName)) return 0;
+// if (szProto == NULL || mir_strcmp(szProto, proto->m_szModuleName)) return 0;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
jid = dbv.pszVal;
@@ -941,7 +941,7 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) newNick = NULL;
}
// Note: we need to compare with item->nick to prevent infinite loop
- if (newNick != NULL && (item->nick == NULL || (item->nick != NULL && strcmp(item->nick, newNick)))) {
+ if (newNick != NULL && (item->nick == NULL || (item->nick != NULL && mir_strcmp(item->nick, newNick)))) {
if ((nick=TlenTextEncode(newNick)) != NULL) {
debugLogA("Nick set to %s", newNick);
if (item->group != NULL && (group=TlenGroupEncode(item->group)) != NULL) {
@@ -959,7 +959,7 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) }
}
// A temporary contact has been added permanently
- else if (!strcmp(cws->szSetting, "NotOnList")) {
+ else if (!mir_strcmp(cws->szSetting, "NotOnList")) {
char *jid, *nick, *pGroup;
if (cws->value.type==DBVT_DELETED || (cws->value.type==DBVT_BYTE && cws->value.bVal==0)) {
@@ -1006,7 +1006,7 @@ int TlenProtocol::TlenContactDeleted(WPARAM wParam, LPARAM lParam) return 0;
char *szProto = GetContactProto(wParam);
- if (szProto == NULL || strcmp(szProto, m_szModuleName))
+ if (szProto == NULL || mir_strcmp(szProto, m_szModuleName))
return 0;
DBVARIANT dbv;
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp index 2b6af296c1..4984a7f6a5 100644 --- a/protocols/Tlen/src/tlen_thread.cpp +++ b/protocols/Tlen/src/tlen_thread.cpp @@ -418,7 +418,7 @@ static void TlenSendAuth(TlenProtocol *proto) { /* processing <s ... > tag sent from server on session opening */
static void TlenProcessStreamOpening(XmlNode *node, ThreadData *info)
{
- if (node->name == NULL || strcmp(node->name, "s"))
+ if (node->name == NULL || mir_strcmp(node->name, "s"))
return;
char *sid=TlenXmlGetAttrValue(node, "i");
@@ -427,7 +427,7 @@ static void TlenProcessStreamOpening(XmlNode *node, ThreadData *info) info->streamId = mir_strdup(sid);
}
char *s=TlenXmlGetAttrValue(node, "s");
- if (s != NULL && !strcmp(s, "1")) {
+ if (s != NULL && !mir_strcmp(s, "1")) {
int i;
unsigned char aes_key[32];
char aes_key_str[140], aes_iv_str[40];
@@ -474,11 +474,11 @@ static void TlenProcessStreamOpening(XmlNode *node, ThreadData *info) static void TlenProcessStreamClosing(XmlNode *node, ThreadData *info)
{
Netlib_CloseHandle(info->proto);
- if (node->name && !strcmp(node->name, "stream:error") && node->text){
+ if (node->name && !mir_strcmp(node->name, "stream:error") && node->text){
char buffer[1024];
mir_snprintf(buffer, SIZEOF(buffer), "%s\n%s", Translate("Tlen Connection Error"), Translate(node->text));
PUShowMessage(buffer, SM_WARNING);
- } else if (!strcmp(node->name, "s")){
+ } else if (!mir_strcmp(node->name, "s")){
info->proto->debugLogA("Disconnected server message");
}
}
@@ -486,27 +486,27 @@ static void TlenProcessStreamClosing(XmlNode *node, ThreadData *info) /* processing session tags sent from server */
static void TlenProcessProtocol(XmlNode *node, ThreadData *info)
{
- if (!strcmp(node->name, "message"))
+ if (!mir_strcmp(node->name, "message"))
TlenProcessMessage(node, info);
- else if (!strcmp(node->name, "presence"))
+ else if (!mir_strcmp(node->name, "presence"))
TlenProcessPresence(node, info->proto);
- else if (!strcmp(node->name, "iq"))
+ else if (!mir_strcmp(node->name, "iq"))
TlenProcessIq(node, info);
- else if (!strcmp(node->name, "f"))
+ else if (!mir_strcmp(node->name, "f"))
TlenProcessF(node, info);
- else if (!strcmp(node->name, "w"))
+ else if (!mir_strcmp(node->name, "w"))
TlenProcessW(node, info);
- else if (!strcmp(node->name, "m"))
+ else if (!mir_strcmp(node->name, "m"))
TlenProcessM(node, info);
- else if (!strcmp(node->name, "n"))
+ else if (!mir_strcmp(node->name, "n"))
TlenProcessN(node, info);
- else if (!strcmp(node->name, "p"))
+ else if (!mir_strcmp(node->name, "p"))
TlenProcessP(node, info);
- else if (!strcmp(node->name, "v"))
+ else if (!mir_strcmp(node->name, "v"))
TlenProcessV(node, info);
- else if (!strcmp(node->name, "avatar"))
+ else if (!mir_strcmp(node->name, "avatar"))
TlenProcessAvatar(node, info);
- else if (!strcmp(node->name, "cipher"))
+ else if (!mir_strcmp(node->name, "cipher"))
TlenProcessCipher(node, info);
else
info->proto->debugLogA("Invalid top-level tag (only <message/> <presence/> <iq/> <f/> <w/> <m/> <n/> <p/> <v/> <cipher/> and <avatar/> allowed)");
@@ -604,10 +604,10 @@ static void TlenProcessMessage(XmlNode *node, ThreadData *info) BOOL delivered, composing;
int i;
- if (!node->name || strcmp(node->name, "message")) return;
+ if (!node->name || mir_strcmp(node->name, "message")) return;
char *type=TlenXmlGetAttrValue(node, "type");
- if (type != NULL && !strcmp(type, "error")) {
+ if (type != NULL && !mir_strcmp(type, "error")) {
}
else {
char *from=TlenXmlGetAttrValue(node, "from");
@@ -620,11 +620,11 @@ static void TlenProcessMessage(XmlNode *node, ThreadData *info) TLEN_LIST_ITEM *item = TlenListGetItemPtr(info->proto, LIST_ROSTER, fromJid);
BOOL isChatRoomJid = TlenListExist(info->proto, LIST_CHATROOM, from);
- if (isChatRoomJid && type != NULL && !strcmp(type, "groupchat")) {
+ if (isChatRoomJid && type != NULL && !mir_strcmp(type, "groupchat")) {
//TlenGroupchatProcessMessage(node, userdata);
- } else if (type != NULL && !strcmp(type, "pic")) {
+ } else if (type != NULL && !mir_strcmp(type, "pic")) {
TlenProcessPic(node, info->proto);
- } else if (type != NULL && !strcmp(type, "iq")) {
+ } else if (type != NULL && !mir_strcmp(type, "iq")) {
XmlNode *iqNode;
// Tlen-compatible iq
if ((iqNode=TlenXmlGetChild(node, "iq")) != NULL) {
@@ -649,12 +649,12 @@ static void TlenProcessMessage(XmlNode *node, ThreadData *info) i = 1;
while ((xNode=TlenXmlGetNthChild(node, "x", i)) != NULL) {
if ((p=TlenXmlGetAttrValue(xNode, "xmlns")) != NULL) {
- if (!strcmp(p, "jabber:x:delay") && msgTime==0) {
+ if (!mir_strcmp(p, "jabber:x:delay") && msgTime==0) {
if ((p=TlenXmlGetAttrValue(xNode, "stamp")) != NULL) {
msgTime = TlenIsoToUnixTime(p);
}
}
- else if (!strcmp(p, "jabber:x:event")) {
+ else if (!mir_strcmp(p, "jabber:x:event")) {
// Check whether any event is requested
if (!delivered && (n=TlenXmlGetChild(xNode, "delivered")) != NULL) {
delivered = TRUE;
@@ -738,7 +738,7 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) int id;
int i;
- if (!node->name || strcmp(node->name, "iq")) return;
+ if (!node->name || mir_strcmp(node->name, "iq")) return;
char *type=TlenXmlGetAttrValue(node, "type");
// if ((type=TlenXmlGetAttrValue(node, "type")) == NULL) return;
@@ -765,17 +765,17 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) // MORE GENERAL ROUTINES, WHEN ID DOES NOT MATCH
/////////////////////////////////////////////////////////////////////////
// new p2p connections
- } else if (xmlns != NULL && !strcmp(xmlns, "p2p")) {
+ } else if (xmlns != NULL && !mir_strcmp(xmlns, "p2p")) {
if (info->proto->tlenOptions.useNewP2P) {
TlenProcessP2P(node, info);
}
}
// RECVED: <iq type='set'><query ...
- else if (!strcmp(type, "set") && queryNode != NULL && xmlns != NULL) {
+ else if (!mir_strcmp(type, "set") && queryNode != NULL && xmlns != NULL) {
// RECVED: roster push
// ACTION: similar to iqIdGetRoster above
- if (!strcmp(xmlns, "jabber:iq:roster")) {
+ if (!mir_strcmp(xmlns, "jabber:iq:roster")) {
XmlNode *itemNode, *groupNode;
TLEN_LIST_ITEM *item;
char *name;
@@ -783,11 +783,11 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) info->proto->debugLogA("<iq/> Got roster push, query has %d children", queryNode->numChild);
for (i=0; i<queryNode->numChild; i++) {
itemNode = queryNode->child[i];
- if (!strcmp(itemNode->name, "item")) {
+ if (!mir_strcmp(itemNode->name, "item")) {
if ((jid=TlenXmlGetAttrValue(itemNode, "jid")) != NULL) {
if ((str=TlenXmlGetAttrValue(itemNode, "subscription")) != NULL) {
// we will not add new account when subscription=remove
- if (!strcmp(str, "to") || !strcmp(str, "both") || !strcmp(str, "from") || !strcmp(str, "none")) {
+ if (!mir_strcmp(str, "to") || !mir_strcmp(str, "both") || !mir_strcmp(str, "from") || !mir_strcmp(str, "none")) {
if ((name=TlenXmlGetAttrValue(itemNode, "name")) != NULL) {
nick = TlenTextDecode(name);
} else {
@@ -813,7 +813,7 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) item->group = NULL;
db_unset(hContact, "CList", "Group");
}
- if (!strcmp(str, "none") || (!strcmp(str, "from") && strchr(jid, '@') != NULL)) {
+ if (!mir_strcmp(str, "none") || (!mir_strcmp(str, "from") && strchr(jid, '@') != NULL)) {
if (db_get_w(hContact, info->proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
db_set_w(hContact, info->proto->m_szModuleName, "Status", ID_STATUS_OFFLINE);
}
@@ -824,11 +824,11 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) }
}
if ((item=TlenListGetItemPtr(info->proto, LIST_ROSTER, jid)) != NULL) {
- if (!strcmp(str, "both"))
+ if (!mir_strcmp(str, "both"))
item->subscription = SUB_BOTH;
- else if (!strcmp(str, "to"))
+ else if (!mir_strcmp(str, "to"))
item->subscription = SUB_TO;
- else if (!strcmp(str, "from"))
+ else if (!mir_strcmp(str, "from"))
item->subscription = SUB_FROM;
else
item->subscription = SUB_NONE;
@@ -836,7 +836,7 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) // subscription = remove is to remove from roster list
// but we will just set the contact to offline and not actually
// remove, so that history will be retained.
- if (!strcmp(str, "remove")) {
+ if (!mir_strcmp(str, "remove")) {
if ((hContact=TlenHContactFromJID(info->proto, jid)) != NULL) {
if (db_get_w(hContact, info->proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
db_set_w(hContact, info->proto->m_szModuleName, "Status", ID_STATUS_OFFLINE);
@@ -852,38 +852,38 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) }
// RECVED: <iq type='get'><query ...
- else if ( !strcmp( type, "get" ) && queryNode != NULL && xmlns != NULL ) {
+ else if ( !mir_strcmp( type, "get" ) && queryNode != NULL && xmlns != NULL ) {
// RECVED: software version query
// ACTION: return my software version
- if ( !strcmp( xmlns, "jabber:iq:version" )) TlenProcessIqGetVersion(info->proto, node);
+ if ( !mir_strcmp( xmlns, "jabber:iq:version" )) TlenProcessIqGetVersion(info->proto, node);
}
// RECVED: <iq type='result'><query ...
- else if ( !strcmp( type, "result") && queryNode != NULL) {
+ else if ( !mir_strcmp( type, "result") && queryNode != NULL) {
if (xmlns != NULL ) {
- if ( !strcmp(xmlns, "jabber:iq:roster" )) {
+ if ( !mir_strcmp(xmlns, "jabber:iq:roster" )) {
TlenIqResultRoster(info->proto, node);
- } else if ( !strcmp( xmlns, "jabber:iq:version" )) {
+ } else if ( !mir_strcmp( xmlns, "jabber:iq:version" )) {
TlenIqResultVersion(info->proto, node);
- } else if ( !strcmp( xmlns, "jabber:iq:info" )) {
+ } else if ( !mir_strcmp( xmlns, "jabber:iq:info" )) {
TlenIqResultInfo(info->proto, node);
}
} else {
char *from;
if (( from=TlenXmlGetAttrValue( node, "from" )) != NULL ) {
- if ( !strcmp(from, "tcfg" )) {
+ if ( !mir_strcmp(from, "tcfg" )) {
TlenIqResultTcfg(info->proto, node);
}
}
}
}
// RECVED: <iq type='error'> ...
- else if (!strcmp(type, "error")) {
+ else if (!mir_strcmp(type, "error")) {
TLEN_LIST_ITEM *item;
// Check for file transfer deny by comparing idStr with ft->iqId
i = 0;
while ((i=TlenListFindNext(info->proto, LIST_FILE, i)) >= 0) {
item = TlenListGetItemPtrFromIndex(info->proto,i);
- if (item->ft->state==FT_CONNECTING && !strcmp(idStr, item->ft->iqId)) {
+ if (item->ft->state==FT_CONNECTING && !mir_strcmp(idStr, item->ft->iqId)) {
item->ft->state = FT_DENIED;
if (item->ft->hFileEvent != NULL)
SetEvent(item->ft->hFileEvent); // Simulate the termination of file server connection
@@ -902,7 +902,7 @@ static void TlenProcessW(XmlNode *node, ThreadData *info) char *str, *localMessage;
int strSize;
- if (!node->name || strcmp(node->name, "w"))
+ if (!node->name || mir_strcmp(node->name, "w"))
return;
char *body=node->text;
@@ -953,7 +953,7 @@ static void TlenProcessM(XmlNode *node, ThreadData *info) int i;
XmlNode *xNode, *invNode, *bNode;
- if (!node->name || strcmp(node->name, "m")) return;
+ if (!node->name || mir_strcmp(node->name, "m")) return;
char *f = TlenXmlGetAttrValue(node, "f"); //, *from;//username
if (f != NULL) {
@@ -963,19 +963,19 @@ static void TlenProcessM(XmlNode *node, ThreadData *info) char *tp=TlenXmlGetAttrValue(node, "tp");//typing start/stop
if (tp != NULL) {
TLEN_LIST_ITEM *item = TlenListGetItemPtr(info->proto, LIST_ROSTER, fLogin);
- if (!strcmp(tp, "t")) { //contact is writing
+ if (!mir_strcmp(tp, "t")) { //contact is writing
if (item != NULL ) {
item->isTyping = TRUE;
CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_INFINITE);
}
}
- else if (!strcmp(tp, "u")) {//contact stopped writing
+ else if (!mir_strcmp(tp, "u")) {//contact stopped writing
if (item != NULL) {
item->isTyping = FALSE;
CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
}
}
- else if (!strcmp(tp, "a")) {//alert was received
+ else if (!mir_strcmp(tp, "a")) {//alert was received
int bAlert = TRUE;
if (info->proto->tlenOptions.alertPolicy == TLEN_ALERTS_IGNORE_ALL) {
bAlert = FALSE;
@@ -1011,7 +1011,7 @@ static void TlenProcessM(XmlNode *node, ThreadData *info) bNode = TlenXmlGetChild(node, "b");
f = TlenTextDecode(f);
if (bNode != NULL && bNode->text != NULL) {
- if (tp != NULL && !strcmp(tp, "p")) {
+ if (tp != NULL && !mir_strcmp(tp, "p")) {
/* MUC private message */
str = TlenResourceFromJID(f);
hContact = TlenDBCreateContact(info->proto, f, str, TRUE);
@@ -1082,7 +1082,7 @@ static void TlenProcessN(XmlNode *node, ThreadData *info) char *str, *popupTitle, *popupText;
int strSize;
- if (!node->name || strcmp(node->name, "n")) return;
+ if (!node->name || mir_strcmp(node->name, "n")) return;
char *s = TlenXmlGetAttrValue(node, "s");
char *f = TlenXmlGetAttrValue(node, "f");
@@ -1118,7 +1118,7 @@ static void TlenProcessP(XmlNode *node, ThreadData *info) XmlNode *sNode, *xNode, *iNode, *kNode;
int status, flags;
- if (!node->name || strcmp(node->name, "p")) return;
+ if (!node->name || mir_strcmp(node->name, "p")) return;
// presence from users in chat room
flags = 0;
@@ -1167,7 +1167,7 @@ static void TlenProcessP(XmlNode *node, ThreadData *info) }
sNode = TlenXmlGetChild(node, "s");
if (sNode != NULL) {
- if (!strcmp(sNode->text, "unavailable")) {
+ if (!mir_strcmp(sNode->text, "unavailable")) {
status = ID_STATUS_OFFLINE;
}
}
@@ -1193,7 +1193,7 @@ static void TlenProcessV(XmlNode *node, ThreadData *info) char jid[128];
TLEN_LIST_ITEM *item;
char *id, *e, *p;
-// if (!node->name || strcmp(node->name, "v")) return;
+// if (!node->name || mir_strcmp(node->name, "v")) return;
char *from=TlenXmlGetAttrValue(node, "f");
if (from != NULL) {
@@ -1203,12 +1203,12 @@ static void TlenProcessV(XmlNode *node, ThreadData *info) strncpy_s(jid, from, _TRUNCATE);
}
if ((e=TlenXmlGetAttrValue(node, "e")) != NULL) {
- if (!strcmp(e, "1")) {
+ if (!mir_strcmp(e, "1")) {
if ((id=TlenXmlGetAttrValue(node, "i")) != NULL) {
SkinPlaySound("TlenVoiceNotify");
TlenVoiceAccept(info->proto, id, from);
}
- } else if (!strcmp(e, "3")) {
+ } else if (!mir_strcmp(e, "3")) {
// FILE_RECV : e='3' : invalid transfer error
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_VOICE, p)) != NULL) {
@@ -1230,28 +1230,28 @@ static void TlenProcessV(XmlNode *node, ThreadData *info) }
}
}
- } else if (!strcmp(e, "4")) {
+ } else if (!mir_strcmp(e, "4")) {
// FILE_SEND : e='4' : File sending request was denied by the remote client
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_VOICE, p)) != NULL) {
- if (!strcmp(item->ft->jid, jid)) {
+ if (!mir_strcmp(item->ft->jid, jid)) {
TlenVoiceCancelAll(info->proto);
//TlenListRemove(info->proto, LIST_VOICE, p);
}
}
}
- } else if (!strcmp(e, "5")) {
+ } else if (!mir_strcmp(e, "5")) {
// FILE_SEND : e='5' : Voice request was accepted
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_VOICE, p)) != NULL) {
info->proto->debugLogA("should start voice 1 ? %s ?? %s", jid, item->ft->jid);
- if (!strcmp(item->ft->jid, jid)) {
+ if (!mir_strcmp(item->ft->jid, jid)) {
info->proto->debugLogA("starting voice 1");
TlenVoiceStart(item->ft, 1);
}
}
}
- } else if (!strcmp(e, "6")) {
+ } else if (!mir_strcmp(e, "6")) {
// FILE_RECV : e='6' : IP and port information to connect to get file
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_VOICE, p)) != NULL) {
@@ -1266,7 +1266,7 @@ static void TlenProcessV(XmlNode *node, ThreadData *info) }
}
}
- else if (!strcmp(e, "7")) {
+ else if (!mir_strcmp(e, "7")) {
// FILE_RECV : e='7' : IP and port information to connect to send file
// in case the conection to the given server was not successful
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
@@ -1283,7 +1283,7 @@ static void TlenProcessV(XmlNode *node, ThreadData *info) }
}
}
- else if (!strcmp(e, "8")) {
+ else if (!mir_strcmp(e, "8")) {
// FILE_RECV : e='8' : transfer error
if ((p=TlenXmlGetAttrValue(node, "i")) != NULL) {
if ((item=TlenListGetItemPtr(info->proto, LIST_VOICE, p)) != NULL) {
diff --git a/protocols/Tlen/src/tlen_userinfo.cpp b/protocols/Tlen/src/tlen_userinfo.cpp index dc1414196d..453b0120c8 100644 --- a/protocols/Tlen/src/tlen_userinfo.cpp +++ b/protocols/Tlen/src/tlen_userinfo.cpp @@ -132,7 +132,7 @@ int TlenProtocol::UserInfoInit(WPARAM wParam, LPARAM lParam) MCONTACT hContact = (MCONTACT) lParam;
char *szProto = GetContactProto(hContact);
- if ((szProto != NULL && !strcmp(szProto, m_szModuleName)) || !lParam) {
+ if ((szProto != NULL && !mir_strcmp(szProto, m_szModuleName)) || !lParam) {
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = hInst;
odp.flags = ODPF_TCHAR;
diff --git a/protocols/Tlen/src/tlen_xml.cpp b/protocols/Tlen/src/tlen_xml.cpp index 04e6aa79a3..408df2ab3a 100644 --- a/protocols/Tlen/src/tlen_xml.cpp +++ b/protocols/Tlen/src/tlen_xml.cpp @@ -279,7 +279,7 @@ static BOOL TlenXmlProcessElem(XmlState *xmlState, XmlElemType elemType, char *e if (elemText == NULL) return FALSE; - if (elemType == ELEM_OPEN && !strcmp(elemText, "?xml")) { + if (elemType == ELEM_OPEN && !mir_strcmp(elemText, "?xml")) { // TlenLog("XML: skip <?xml> tag"); return TRUE; } @@ -349,7 +349,7 @@ static BOOL TlenXmlProcessElem(XmlState *xmlState, XmlElemType elemType, char *e } break; case ELEM_CLOSE: - if (node->name != NULL && !strcmp(node->name, text)) { + if (node->name != NULL && !mir_strcmp(node->name, text)) { node->state = NODE_CLOSE; int nodeDepth = node->depth; if (nodeDepth == 1 && xmlState->callback1_close != NULL) { @@ -390,7 +390,7 @@ char *TlenXmlGetAttrValue(XmlNode *node, char *key) if (node == NULL || node->numAttr <= 0 || key == NULL || mir_strlen(key) <= 0) return NULL; for (i=0; i<node->numAttr; i++) { - if (node->attr[i]->name && !strcmp(key, node->attr[i]->name)) + if (node->attr[i]->name && !mir_strcmp(key, node->attr[i]->name)) return node->attr[i]->value; } return NULL; @@ -409,7 +409,7 @@ XmlNode *TlenXmlGetNthChild(XmlNode *node, char *tag, int nth) return NULL; num = 1; for (i=0; i<node->numChild; i++) { - if (node->child[i]->name && !strcmp(tag, node->child[i]->name)) { + if (node->child[i]->name && !mir_strcmp(tag, node->child[i]->name)) { if (num == nth) { return node->child[i]; } @@ -427,9 +427,9 @@ XmlNode *TlenXmlGetChildWithGivenAttrValue(XmlNode *node, char *tag, char *attrK if (node == NULL || node->numChild <= 0 || tag == NULL || mir_strlen(tag) <= 0 || attrKey == NULL || mir_strlen(attrKey) <= 0 || attrValue == NULL || mir_strlen(attrValue) <= 0) return NULL; for (i=0; i<node->numChild; i++) { - if (node->child[i]->name && !strcmp(tag, node->child[i]->name)) { + if (node->child[i]->name && !mir_strcmp(tag, node->child[i]->name)) { if ((str=TlenXmlGetAttrValue(node->child[i], attrKey)) != NULL) - if (!strcmp(str, attrValue)) + if (!mir_strcmp(str, attrValue)) return node->child[i]; } } diff --git a/protocols/Tox/src/tox_chatrooms.cpp b/protocols/Tox/src/tox_chatrooms.cpp index 62af4e6816..12600ec239 100644 --- a/protocols/Tox/src/tox_chatrooms.cpp +++ b/protocols/Tox/src/tox_chatrooms.cpp @@ -80,7 +80,7 @@ int CToxProto::OnGroupChatEventHook(WPARAM, LPARAM lParam) {
return 1;
}
- else if (strcmp(gch->pDest->pszModule, this->m_szModuleName) != 0)
+ else if (mir_strcmp(gch->pDest->pszModule, this->m_szModuleName) != 0)
{
return 0;
}
diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index 2611f185a1..dfd9159fcc 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -31,7 +31,7 @@ MCONTACT CToxProto::GetContactFromAuthEvent(MEVENT hEvent) if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return INVALID_CONTACT_ID;
- if (strcmp(dbei.szModule, m_szModuleName) != 0)
+ if (mir_strcmp(dbei.szModule, m_szModuleName) != 0)
return INVALID_CONTACT_ID;
return DbGetAuthEventContact(&dbei);
@@ -402,7 +402,7 @@ int CToxProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) MCONTACT hContact = lParam;
char *szProto = GetContactProto(hContact);
- if (szProto != NULL && !strcmp(szProto, m_szModuleName))
+ if (szProto != NULL && !mir_strcmp(szProto, m_szModuleName))
{
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
odp.flags = ODPF_TCHAR | ODPF_DONTTRANSLATE;
diff --git a/protocols/Twitter/src/chat.cpp b/protocols/Twitter/src/chat.cpp index 17ded4336d..5990cb63a1 100644 --- a/protocols/Twitter/src/chat.cpp +++ b/protocols/Twitter/src/chat.cpp @@ -59,7 +59,7 @@ void TwitterProto::UpdateChat(const twitter_user &update) int TwitterProto::OnChatOutgoing(WPARAM, LPARAM lParam)
{
GCHOOK *hook = reinterpret_cast<GCHOOK*>(lParam);
- if (strcmp(hook->pDest->pszModule, m_szModuleName))
+ if (mir_strcmp(hook->pDest->pszModule, m_szModuleName))
return 0;
switch (hook->pDest->iType) {
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp index 674516a5b3..cea1ce17ef 100644 --- a/protocols/Twitter/src/contacts.cpp +++ b/protocols/Twitter/src/contacts.cpp @@ -197,7 +197,7 @@ int TwitterProto::OnContactDeleted(WPARAM hContact, LPARAM) bool TwitterProto::IsMyContact(MCONTACT hContact, bool include_chat)
{
char *proto = GetContactProto(hContact);
- if (proto && strcmp(m_szModuleName, proto) == 0) {
+ if (proto && mir_strcmp(m_szModuleName, proto) == 0) {
if (include_chat)
return true;
return !isChatRoom(hContact);
@@ -213,7 +213,7 @@ MCONTACT TwitterProto::UsernameToHContact(const char *name) DBVARIANT dbv;
if (!db_get_s(hContact, m_szModuleName, TWITTER_KEY_UN, &dbv)) {
- if (strcmp(name, dbv.pszVal) == 0) {
+ if (mir_strcmp(name, dbv.pszVal) == 0) {
db_free(&dbv);
return hContact;
}
diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp index 8a0d3960cc..50237a2ce6 100644 --- a/protocols/Twitter/src/theme.cpp +++ b/protocols/Twitter/src/theme.cpp @@ -43,7 +43,7 @@ void InitIcons(void) HANDLE GetIconHandle(const char* name)
{
for (size_t i = 0; i < SIZEOF(icons); i++)
- if (strcmp(icons[i].szName, name) == 0)
+ if (mir_strcmp(icons[i].szName, name) == 0)
return hIconLibItem[i];
return 0;
@@ -61,7 +61,7 @@ static TwitterProto * GetInstanceByHContact(MCONTACT hContact) return 0;
for (int i = 0; i < g_Instances.getCount(); i++)
- if (!strcmp(proto, g_Instances[i].m_szModuleName))
+ if (!mir_strcmp(proto, g_Instances[i].m_szModuleName))
return &g_Instances[i];
return 0;
diff --git a/protocols/Twitter/src/twitter.cpp b/protocols/Twitter/src/twitter.cpp index 4a321675e0..98da36c8d5 100644 --- a/protocols/Twitter/src/twitter.cpp +++ b/protocols/Twitter/src/twitter.cpp @@ -381,7 +381,7 @@ static char *month_names[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", int parse_month(const char *m)
{
for (int i = 0; i < 12; i++)
- if (strcmp(month_names[i], m) == 0)
+ if (mir_strcmp(month_names[i], m) == 0)
return i;
return -1;
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 071212cfdd..e90b7b84fd 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -631,7 +631,7 @@ MCONTACT CVkProto::MContactFromDbEvent(MEVENT hDbEvent) if (db_event_get(hDbEvent, &dbei))
return INVALID_CONTACT_ID;
- if (dbei.eventType != EVENTTYPE_AUTHREQUEST || strcmp(dbei.szModule, m_szModuleName))
+ if (dbei.eventType != EVENTTYPE_AUTHREQUEST || mir_strcmp(dbei.szModule, m_szModuleName))
return INVALID_CONTACT_ID;
MCONTACT hContact = DbGetAuthEventContact(&dbei);
@@ -775,12 +775,12 @@ int CVkProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam) if (hContact != NULL)
return 0;
- if (strcmp(cws->szModule, "ListeningTo"))
+ if (mir_strcmp(cws->szModule, "ListeningTo"))
return 0;
CMStringA szListeningTo(m_szModuleName);
szListeningTo += "Enabled";
- if (!strcmp(cws->szSetting, szListeningTo.GetBuffer())) {
+ if (!mir_strcmp(cws->szSetting, szListeningTo.GetBuffer())) {
MusicSendMetod iOldMusicSendMetod = (MusicSendMetod)getByte("OldMusicSendMetod", sendBroadcastAndStatus);
if (cws->value.bVal == 0)
diff --git a/protocols/WhatsApp/src/theme.cpp b/protocols/WhatsApp/src/theme.cpp index 768ad6cccf..e5c5b6c9f5 100644 --- a/protocols/WhatsApp/src/theme.cpp +++ b/protocols/WhatsApp/src/theme.cpp @@ -16,7 +16,7 @@ void InitIcons(void) HANDLE GetIconHandle(const char* name)
{
for (size_t i = 0; i < SIZEOF(icons); i++)
- if (strcmp(icons[i].szName, name) == 0)
+ if (mir_strcmp(icons[i].szName, name) == 0)
return icons[i].hIcolib;
return 0;
@@ -25,7 +25,7 @@ HANDLE GetIconHandle(const char* name) char* GetIconDescription(const char* name)
{
for (size_t i = 0; i < SIZEOF(icons); i++)
- if (strcmp(icons[i].szName, name) == 0)
+ if (mir_strcmp(icons[i].szName, name) == 0)
return icons[i].szDescr;
return "";
@@ -39,7 +39,7 @@ static WhatsAppProto* GetInstanceByHContact(MCONTACT hContact) return 0;
for (int i = 0; i < g_Instances.getCount(); i++)
- if (!strcmp(proto, g_Instances[i].m_szModuleName))
+ if (!mir_strcmp(proto, g_Instances[i].m_szModuleName))
return &g_Instances[i];
return 0;
diff --git a/protocols/Xfire/src/Xfire_game.cpp b/protocols/Xfire/src/Xfire_game.cpp index 167495b2d6..c792d791a8 100644 --- a/protocols/Xfire/src/Xfire_game.cpp +++ b/protocols/Xfire/src/Xfire_game.cpp @@ -202,7 +202,7 @@ BOOL Xfire_game::checkpath(PROCESSENTRY32* processInfo) this->strtolowerT(fpath);
if (this->wildcmp(_A2T(this->path), fpath))
- //if (strcmp(this->path,fpath)==0)
+ //if (mir_strcmp(this->path,fpath)==0)
{
//pfad stimmt überein, commandline prüfen
if (checkCommandLine(op, this->mustcontain, this->notcontain))
diff --git a/protocols/Xfire/src/Xfire_gamelist.cpp b/protocols/Xfire/src/Xfire_gamelist.cpp index 4e98b8e381..643f97f037 100644 --- a/protocols/Xfire/src/Xfire_gamelist.cpp +++ b/protocols/Xfire/src/Xfire_gamelist.cpp @@ -154,7 +154,7 @@ void Xfire_gamelist::createStartmenu() Xfire_game* game = (Xfire_game*)gamelist.at(sorttemp[i - 1]);
Xfire_game* game2 = (Xfire_game*)gamelist.at(sorttemp[i]);
//sortieren
- if (strcmp(game->name, game2->name) > 0)
+ if (mir_strcmp(game->name, game2->name) > 0)
{
int tempi = sorttemp[i - 1];
sorttemp[i - 1] = sorttemp[i];
diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index f2aac56cde..a94599b1f3 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -829,7 +829,7 @@ INT_PTR UrlCall(WPARAM wparam, LPARAM lparam) { //abschneiden
*q = 0;
//ein addfriend url request?
- if (strcmp("add_friend", type) == 0)
+ if (mir_strcmp("add_friend", type) == 0)
{
q++;
//nach = suchen
@@ -840,7 +840,7 @@ INT_PTR UrlCall(WPARAM wparam, LPARAM lparam) { *g = 0;
g++;
//user parameter?
- if (strcmp("user", q) == 0)
+ if (mir_strcmp("user", q) == 0)
{
//tempbuffer für die frage and en user
char temp[100];
@@ -2800,7 +2800,7 @@ MCONTACT handlingBuddys(BuddyListEntry *entry, int clan, char*group, BOOL dontsc }
else
{
- if (strcmp(entry->lastpopup, temp) != 0)
+ if (mir_strcmp(entry->lastpopup, temp) != 0)
{
delete[] entry->lastpopup;
entry->lastpopup = NULL;
diff --git a/protocols/Xfire/src/searching4games.cpp b/protocols/Xfire/src/searching4games.cpp index a73e624d56..e9d70c319e 100644 --- a/protocols/Xfire/src/searching4games.cpp +++ b/protocols/Xfire/src/searching4games.cpp @@ -269,7 +269,7 @@ void Scan4Games(LPVOID lparam) if (gpps != NULL) xfire_GetPrivateProfileString(temp, "SoftwareType", "", entrytype, 100, inipath);
//kein eintrag? voicechat? musiapplicationen? schon in der gameliste?
- if (gpps != NULL && strcmp(entrytype, "Music") != 0 && strcmp(entrytype, "VoiceChat") != 0 && !xgamelist.Gameinlist(i)) //was gefunden und noch nicht eintragen?
+ if (gpps != NULL && mir_strcmp(entrytype, "Music") != 0 && mir_strcmp(entrytype, "VoiceChat") != 0 && !xgamelist.Gameinlist(i)) //was gefunden und noch nicht eintragen?
{
BOOL MatchExe = FALSE;
//MatchExe Games in der automatischen Suche skippen
diff --git a/protocols/Xfire/src/variables.cpp b/protocols/Xfire/src/variables.cpp index 45873fd9a4..1cf26c35be 100644 --- a/protocols/Xfire/src/variables.cpp +++ b/protocols/Xfire/src/variables.cpp @@ -165,13 +165,13 @@ char* XFireGetFoldersPath(char * pathtype) {// Get XFire folder path
static char path[1024]; path[0] = 0;
if (ServiceExists(MS_FOLDERS_REGISTER_PATH)){
- if (!strcmp(pathtype, "Avatar")){
+ if (!mir_strcmp(pathtype, "Avatar")){
FoldersGetCustomPath(XFireAvatarFolder, path, 1024, "");
}
- if (!strcmp(pathtype, "IniFile")){
+ if (!mir_strcmp(pathtype, "IniFile")){
FoldersGetCustomPath(XFireWorkingFolder, path, 1024, "");
}
- if (!strcmp(pathtype, "IconsFile")){
+ if (!mir_strcmp(pathtype, "IconsFile")){
FoldersGetCustomPath(XFireIconFolder, path, 1024, "");
}
strcat(path, "\\");
@@ -198,7 +198,7 @@ char* XFireGetFoldersPath(char * pathtype) strcat(BaseFolder, "XFire");
strcat(BaseFolder, "\\");
/*******BASE********/
- if (!strcmp(pathtype, "Avatar")){
+ if (!mir_strcmp(pathtype, "Avatar")){
strcat(BaseFolder, "Avatars");
strcat(BaseFolder, "\\");
}
diff --git a/protocols/Yahoo/src/chat.cpp b/protocols/Yahoo/src/chat.cpp index b99cd41887..39e584b655 100644 --- a/protocols/Yahoo/src/chat.cpp +++ b/protocols/Yahoo/src/chat.cpp @@ -63,7 +63,7 @@ void ext_yahoo_got_conf_invite(int id, const char *me, const char *who, const ch CYahooProto::ChatRoom *cm = ppro->m_chatrooms.find((CYahooProto::ChatRoom*)&room);
if (!cm)
{
- if (strcmp(who, me))
+ if (mir_strcmp(who, me))
{
cm = new CYahooProto::ChatRoom(room, members);
ppro->m_chatrooms.insert(cm);
@@ -109,7 +109,7 @@ void ext_yahoo_conf_userjoin(int id, const char *me, const char *who, const char if (!cm) return;
for (YList *l = cm->members; l; l = l->next)
{
- if (!strcmp(who, (char*)l->data))
+ if (!mir_strcmp(who, (char*)l->data))
return;
}
@@ -127,7 +127,7 @@ void ext_yahoo_conf_userleave(int id, const char *me, const char *who, const cha for (YList *l = cm->members; l; l = l->next)
{
- if (strcmp((char*)l->data, who) == 0)
+ if (mir_strcmp((char*)l->data, who) == 0)
{
free(l->data);
y_list_remove_link(cm->members, l);
@@ -268,7 +268,7 @@ int __cdecl CYahooProto::OnGCEventHook(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* room = mir_t2a(gch->pDest->ptszID);
char* who = mir_t2a(gch->ptszUID);
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index 6183eda35d..50fa071785 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -161,7 +161,7 @@ MCONTACT __cdecl CYahooProto::AddToListByEvent( int flags, int /*iContact*/, MEV return 0;
}
- if ( strcmp(dbei.szModule, m_szModuleName)) {
+ if ( mir_strcmp(dbei.szModule, m_szModuleName)) {
debugLogA("[YahooAddToListByEvent] ERROR: Not Yahoo protocol.");
return 0;
}
@@ -197,7 +197,7 @@ int CYahooProto::Authorize(MEVENT hdbe) if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
return 1;
- if ( strcmp(dbei.szModule, m_szModuleName))
+ if ( mir_strcmp(dbei.szModule, m_szModuleName))
return 1;
/* Need to remove the buddy from our Miranda Lists */
@@ -240,7 +240,7 @@ int CYahooProto::AuthDeny(MEVENT hdbe, const TCHAR *reason) return 1;
}
- if (strcmp( dbei.szModule, m_szModuleName)) {
+ if (mir_strcmp( dbei.szModule, m_szModuleName)) {
debugLogA("YahooAuthDeny - wrong module?");
return 1;
}
@@ -610,7 +610,7 @@ int __cdecl CYahooProto::UserIsTyping(MCONTACT hContact, int type) return 0;
char *szProto = GetContactProto(hContact);
- if (szProto == NULL || strcmp(szProto, m_szModuleName))
+ if (szProto == NULL || mir_strcmp(szProto, m_szModuleName))
return 0;
DBVARIANT dbv;
diff --git a/protocols/Yahoo/src/proto.h b/protocols/Yahoo/src/proto.h index f1fa073687..f1bb3ee42f 100644 --- a/protocols/Yahoo/src/proto.h +++ b/protocols/Yahoo/src/proto.h @@ -111,7 +111,7 @@ struct CYahooProto : public PROTO<CYahooProto> free(name); y_list_free(members); }
static int compare(const ChatRoom* c1, const ChatRoom* c2)
- { return strcmp(c1->name, c2->name); }
+ { return mir_strcmp(c1->name, c2->name); }
};
OBJLIST <ChatRoom> m_chatrooms;
diff --git a/protocols/Yahoo/src/util.cpp b/protocols/Yahoo/src/util.cpp index 7a3da1782f..e80e27feb2 100644 --- a/protocols/Yahoo/src/util.cpp +++ b/protocols/Yahoo/src/util.cpp @@ -158,7 +158,7 @@ int __cdecl CYahooProto::OnSettingChanged(WPARAM hContact, LPARAM lParam) return 0;
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- if ( !strcmp(cws->szSetting, "ApparentMode")) {
+ if ( !mir_strcmp(cws->szSetting, "ApparentMode")) {
debugLogA("DB Setting changed. YAHOO user's visible setting changed.");
DBVARIANT dbv;
@@ -177,7 +177,7 @@ bool CYahooProto::IsMyContact(MCONTACT hContact) return false;
char* szProto = GetContactProto(hContact);
- return szProto && !strcmp(szProto, m_szModuleName);
+ return szProto && !mir_strcmp(szProto, m_szModuleName);
}
extern PLUGININFOEX pluginInfo;
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp index b0fb7b6aa5..3f70ae957a 100644 --- a/protocols/Yahoo/src/yahoo.cpp +++ b/protocols/Yahoo/src/yahoo.cpp @@ -771,10 +771,10 @@ void CYahooProto::ext_contact_added(const char *myid, const char *who, const cha hContact = add_buddy(who, nick, protocol, PALF_TEMPORARY);
- if (strcmp(nick, who) != 0)
+ if (mir_strcmp(nick, who) != 0)
SetStringUtf(hContact, "Nick", nick);
- if (strcmp(myid, m_yahoo_id))
+ if (mir_strcmp(myid, m_yahoo_id))
setString(hContact, "MyIdentity", myid);
else
delSetting(hContact, "MyIdentity");
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
|