summaryrefslogtreecommitdiff
path: root/plugins/NewAwaySysMod
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-11-30 21:20:14 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-11-30 21:20:14 +0000
commitd9c98bcdfca6da51a1a82dc6c0dc5996b3b6cd6d (patch)
treea6f925c63bc31e4b4dba301183cc3b429d52d816 /plugins/NewAwaySysMod
parentce2d4f19e3f810b282eb7d47d470d426ff459e1f (diff)
new sorting functions applied
git-svn-id: http://svn.miranda-ng.org/main/trunk@11180 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/NewAwaySysMod')
-rw-r--r--plugins/NewAwaySysMod/src/AwaySys.cpp18
-rw-r--r--plugins/NewAwaySysMod/src/CString.h4
-rw-r--r--plugins/NewAwaySysMod/src/ContactList.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/MsgEventAdded.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/Properties.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/SetAwayMsg.cpp2
6 files changed, 15 insertions, 15 deletions
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp
index 595df755f0..f5a43e8753 100644
--- a/plugins/NewAwaySysMod/src/AwaySys.cpp
+++ b/plugins/NewAwaySysMod/src/AwaySys.cpp
@@ -473,18 +473,18 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam)
ARGUMENTSINFO *ai = (ARGUMENTSINFO*)lParam;
ai->flags = AIF_DONTPARSE;
TCString Result;
- if (!lstrcmp(ai->targv[0], VAR_AWAYSINCE_TIME)) {
+ if (!mir_tstrcmp(ai->targv[0], VAR_AWAYSINCE_TIME)) {
GetTimeFormat(LOCALE_USER_DEFAULT, 0, g_ProtoStates[VarParseData.szProto].AwaySince, (ai->argc > 1 && *ai->targv[1]) ? ai->targv[1] : _T("H:mm"), Result.GetBuffer(256), 256);
Result.ReleaseBuffer();
}
- else if (!lstrcmp(ai->targv[0], VAR_AWAYSINCE_DATE)) {
+ else if (!mir_tstrcmp(ai->targv[0], VAR_AWAYSINCE_DATE)) {
GetDateFormat(LOCALE_USER_DEFAULT, 0, g_ProtoStates[VarParseData.szProto].AwaySince, (ai->argc > 1 && *ai->targv[1]) ? ai->targv[1] : NULL, Result.GetBuffer(256), 256);
Result.ReleaseBuffer();
}
- else if (!lstrcmp(ai->targv[0], VAR_STATDESC)) {
+ else if (!mir_tstrcmp(ai->targv[0], VAR_STATDESC)) {
Result = (VarParseData.Flags & VPF_XSTATUS) ? STR_XSTATUSDESC : pcli->pfnGetStatusModeDescription(g_ProtoStates[VarParseData.szProto].Status, 0);
}
- else if (!lstrcmp(ai->targv[0], VAR_MYNICK)) {
+ else if (!mir_tstrcmp(ai->targv[0], VAR_MYNICK)) {
if (g_MoreOptPage.GetDBValueCopy(IDC_MOREOPTDLG_MYNICKPERPROTO) && VarParseData.szProto)
Result = db_get_s(NULL, VarParseData.szProto, "Nick", (TCHAR*)NULL);
@@ -494,15 +494,15 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam)
if (Result == NULL)
Result = TranslateT("Stranger");
}
- else if (!lstrcmp(ai->targv[0], VAR_REQUESTCOUNT)) {
+ else if (!mir_tstrcmp(ai->targv[0], VAR_REQUESTCOUNT)) {
mir_sntprintf(Result.GetBuffer(16), 16, _T("%d"), db_get_w(ai->fi->hContact, MOD_NAME, DB_REQUESTCOUNT, 0));
Result.ReleaseBuffer();
}
- else if (!lstrcmp(ai->targv[0], VAR_MESSAGENUM)) {
+ else if (!mir_tstrcmp(ai->targv[0], VAR_MESSAGENUM)) {
mir_sntprintf(Result.GetBuffer(16), 16, _T("%d"), db_get_w(ai->fi->hContact, MOD_NAME, DB_MESSAGECOUNT, 0));
Result.ReleaseBuffer();
}
- else if (!lstrcmp(ai->targv[0], VAR_TIMEPASSED)) {
+ else if (!mir_tstrcmp(ai->targv[0], VAR_TIMEPASSED)) {
ULARGE_INTEGER ul_AwaySince, ul_Now;
SYSTEMTIME st;
GetLocalTime(&st);
@@ -519,7 +519,7 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam)
mir_sntprintf(Result, 256, TranslateT("%d seconds"), ul_Now.LowPart);
Result.ReleaseBuffer();
}
- else if (!lstrcmp(ai->targv[0], VAR_PREDEFINEDMESSAGE)) {
+ else if (!mir_tstrcmp(ai->targv[0], VAR_PREDEFINEDMESSAGE)) {
ai->flags = 0; // reset AIF_DONTPARSE flag
if (ai->argc != 2)
return NULL;
@@ -537,7 +537,7 @@ INT_PTR srvVariablesHandler(WPARAM, LPARAM lParam)
if (Result == NULL) // if we didn't find a message with specified title
return NULL; // return it now, as later we change NULL to ""
}
- else if (!lstrcmp(ai->targv[0], VAR_PROTOCOL)) {
+ else if (!mir_tstrcmp(ai->targv[0], VAR_PROTOCOL)) {
if (VarParseData.szProto) {
CString AnsiResult;
CallProtoService(VarParseData.szProto, PS_GETNAME, 256, (LPARAM)AnsiResult.GetBuffer(256));
diff --git a/plugins/NewAwaySysMod/src/CString.h b/plugins/NewAwaySysMod/src/CString.h
index 161977cf28..b2a1c4accf 100644
--- a/plugins/NewAwaySysMod/src/CString.h
+++ b/plugins/NewAwaySysMod/src/CString.h
@@ -31,8 +31,8 @@
__inline int My_lstrlen(LPCSTR lpString) {return mir_strlen(lpString);}
__inline int My_lstrlen(LPCWSTR lpString) {return mir_wstrlen(lpString);}
-__inline int My_lstrcmp(LPCSTR lpString1, LPCSTR lpString2) {return lstrcmpA(lpString1, lpString2);}
-__inline int My_lstrcmp(LPCWSTR lpString1, LPCWSTR lpString2) {return lstrcmpW(lpString1, lpString2);}
+__inline int My_lstrcmp(LPCSTR lpString1, LPCSTR lpString2) {return mir_strcmp(lpString1, lpString2);}
+__inline int My_lstrcmp(LPCWSTR lpString1, LPCWSTR lpString2) {return mir_wstrcmp(lpString1, lpString2);}
__inline LPCSTR My_strstr(LPCSTR lpString1, LPCSTR lpString2) {return strstr(lpString1, lpString2);}
__inline LPWSTR My_strstr(LPCWSTR lpString1, LPCWSTR lpString2) {return (LPWSTR)wcsstr(lpString1, lpString2);}
__inline LPSTR My_lstrcpy(LPSTR lpString1, LPCSTR lpString2) {return mir_strcpy(lpString1, lpString2);}
diff --git a/plugins/NewAwaySysMod/src/ContactList.cpp b/plugins/NewAwaySysMod/src/ContactList.cpp
index 48248a6764..bc1fabe341 100644
--- a/plugins/NewAwaySysMod/src/ContactList.cpp
+++ b/plugins/NewAwaySysMod/src/ContactList.cpp
@@ -390,7 +390,7 @@ int GroupEnum(const char *szSetting, LPARAM lParam)
{
sGroupEnumData *GroupEnumData = (sGroupEnumData*)lParam;
TCString GroupName = db_get_s(NULL, "CListGroups", szSetting, _T(" "));
- if (!lstrcmp(GroupEnumData->GroupName, &GroupName[1]))
+ if (!mir_tstrcmp(GroupEnumData->GroupName, &GroupName[1]))
GroupEnumData->hGroup = (HANDLE)(atol(szSetting) | HCONTACT_ISGROUP);
return 0;
}
diff --git a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
index 420e0df05f..c62d050c75 100644
--- a/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
+++ b/plugins/NewAwaySysMod/src/MsgEventAdded.cpp
@@ -164,7 +164,7 @@ int MsgEventAdded(WPARAM hContact, LPARAM lParam)
}
// ugly workaround for metacontacts, part i; store all metacontacts' events to a temporary array, so we'll be able to get the 'source' protocol when subcontact event happens later. we need the protocol to get its status and per-status settings properly
- if (!lstrcmpA(szProto, META_PROTO)) {
+ if (!mir_strcmp(szProto, META_PROTO)) {
// remove outdated events first
DWORD CurTime = time(NULL);
for (int i = MetacontactEvents.GetSize() - 1; i >= 0; i--)
diff --git a/plugins/NewAwaySysMod/src/Properties.cpp b/plugins/NewAwaySysMod/src/Properties.cpp
index ce7adf0ebd..74b21baf71 100644
--- a/plugins/NewAwaySysMod/src/Properties.cpp
+++ b/plugins/NewAwaySysMod/src/Properties.cpp
@@ -37,7 +37,7 @@ void ResetSettingsOnStatusChange(const char *szProto = NULL, int bResetPersonalM
MCONTACT hContact = db_find_first();
while (hContact) {
const char *szCurProto;
- if (!szProto || ((szCurProto = GetContactProto(hContact)) && !lstrcmpA(szProto, szCurProto))) {
+ if (!szProto || ((szCurProto = GetContactProto(hContact)) && !mir_strcmp(szProto, szCurProto))) {
ResetContactSettingsOnStatusChange(hContact);
if (bResetPersonalMsgs) {
CContactSettings(Status, hContact).SetMsgFormat(SMF_PERSONAL, NULL); // TODO: delete only when SAM dialog opens?
diff --git a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
index 8c6e7c8e43..c774f5480c 100644
--- a/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
+++ b/plugins/NewAwaySysMod/src/SetAwayMsg.cpp
@@ -996,7 +996,7 @@ INT_PTR CALLBACK SetAwayMsgDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
while (hItem = CList->GetNextItem(MCLGN_NEXT | MCLGN_CONTACT | MCLGN_INFO | MCLGN_MULTILEVEL, hItem)) {
if (CList->GetItemType(hItem) == MCLCIT_INFO) {
char *szProto = (char*)CList->GetItemParam(hItem);
- if (!wParam || !lstrcmpA(szProto, (char*)wParam)) {
+ if (!wParam || !mir_strcmp(szProto, (char*)wParam)) {
CList->SetInfoIcon(hItem, LoadSkinnedProtoIcon(szProto, g_ProtoStates[szProto].Status));
}
}