diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-10 13:27:55 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-10 13:27:55 +0000 |
commit | eb25a0d7ed0da6bd4630c553be933df5bd46b6b9 (patch) | |
tree | 334d457598fbc36a90828b64e8d8beafa55c86d4 /plugins | |
parent | 5d6f21891542442500056f8732625cdbf6a3cb76 (diff) |
MS_CLIST_GETSTATUSMODEDESCRIPTION replaced with the direct call
git-svn-id: http://svn.miranda-ng.org/main/trunk@6427 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/TabSRMM/src/chat/services.cpp | 5 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat/window.cpp | 5 | ||||
-rw-r--r-- | plugins/TabSRMM/src/container.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/eventpopups.cpp | 107 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 24 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgoptions.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/trayicon.cpp | 2 | ||||
-rw-r--r-- | plugins/Variables/src/parse_miranda.cpp | 41 |
10 files changed, 93 insertions, 101 deletions
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index 73b9fcc1bd..5ce0ab9f9e 100644 --- a/plugins/TabSRMM/src/chat/services.cpp +++ b/plugins/TabSRMM/src/chat/services.cpp @@ -440,11 +440,6 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT }
else lstrcpyn(newcontactname, _T("_U_"), SIZEOF(newcontactname));
- char *szProto = GetContactProto(newData.hContact);
- WORD wStatus = (szProto == NULL) ? ID_STATUS_OFFLINE : db_get_w((HANDLE)newData.hContact, szProto, "Status", ID_STATUS_OFFLINE);
- char *szStatus = (char *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION,
- (szProto == NULL) ? ID_STATUS_OFFLINE : db_get_w((HANDLE)newData.hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
-
newData.item.pszText = newcontactname;
newData.item.mask = TCIF_TEXT | TCIF_IMAGE | TCIF_PARAM;
newData.item.iImage = 0;
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 165af30def..f92e15b9a4 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -2062,11 +2062,10 @@ INT_PTR CALLBACK RoomWndProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar dat->hTabIcon = dat->hTabStatusIcon;
if (dat->cache->getStatus() != dat->cache->getOldStatus()) {
+ _tcsncpy_s(dat->szStatus, SIZEOF(dat->szStatus), pcli->pfnGetStatusModeDescription(dat->wStatus, 0), _TRUNCATE);
+
TCITEM item = { 0 };
item.mask = TCIF_TEXT;
-
- lstrcpyn(dat->szStatus, (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)dat->wStatus, GSMDF_TCHAR), 50);
- dat->szStatus[49] = 0;
item.pszText = dat->newtitle;
item.cchTextMax = 120;
TabCtrl_SetItem(hwndTab, dat->iTabID, &item);
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 877b1d3804..ae938972e7 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -2513,7 +2513,7 @@ HMENU TSAPI BuildMCProtocolMenu(HWND hwndDlg) nick = pcli->pfnGetContactDisplayName(hContact, 0);
mir_snprintf(szTemp, sizeof(szTemp), "Status%d", i);
WORD wStatus = (WORD)db_get_w(dat->hContact, PluginConfig.szMetaName, szTemp, 0);
- szStatusText = (TCHAR*) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, wStatus, GSMDF_TCHAR);
+ szStatusText = pcli->pfnGetStatusModeDescription(wStatus, 0);
}
TCHAR szMenuLine[128];
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index 98bff873bf..cf6fb45ae4 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -761,67 +761,64 @@ void TSAPI UpdateTrayMenuState(TWindowData *dat, BOOL bForced) int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szProto, const TCHAR *szStatus, HANDLE hContact, DWORD fromEvent)
{
- if (PluginConfig.g_hMenuTrayUnread != 0 && hContact != 0 && szProto != NULL) {
- if (szProto == NULL)
- return 0; // should never happen...
-
- PROTOACCOUNT *acc = (PROTOACCOUNT *)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)szProto);
- TCHAR *tszFinalProto = (acc && acc->tszAccountName ? acc->tszAccountName : 0);
- if (tszFinalProto == 0)
- return 0; // should also NOT happen
-
- WORD wMyStatus = (wStatus == 0) ? db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE) : wStatus;
- const TCHAR *szMyStatus = (szStatus == NULL) ? (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)wMyStatus, GSMDF_TCHAR) : szStatus;
-
- MENUITEMINFO mii = {0};
- mii.cbSize = sizeof(mii);
- mii.fMask = MIIM_DATA | MIIM_ID | MIIM_BITMAP;
- mii.wID = (UINT)hContact;
- mii.hbmpItem = HBMMENU_CALLBACK;
-
- TCHAR szMenuEntry[80];
- const TCHAR *szNick = NULL;
- if (dat != 0) {
- szNick = dat->cache->getNick();
- GetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, FALSE, &mii);
- mii.dwItemData++;
- if (fromEvent == 2) // from chat...
- mii.dwItemData |= 0x10000000;
- DeleteMenu(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, MF_BYCOMMAND);
- mir_sntprintf(szMenuEntry, SIZEOF(szMenuEntry), _T("%s: %s (%s) [%d]"), tszFinalProto, szNick, szMyStatus, mii.dwItemData & 0x0000ffff);
+ if (!PluginConfig.g_hMenuTrayUnread || hContact == 0 || szProto == NULL)
+ return 0;
+
+ PROTOACCOUNT *acc = (PROTOACCOUNT *)CallService(MS_PROTO_GETACCOUNT, 0, (LPARAM)szProto);
+ TCHAR *tszFinalProto = (acc && acc->tszAccountName ? acc->tszAccountName : 0);
+ if (tszFinalProto == 0)
+ return 0;
+
+ WORD wMyStatus = (wStatus == 0) ? db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE) : wStatus;
+ const TCHAR *szMyStatus = (szStatus == NULL) ? pcli->pfnGetStatusModeDescription(wMyStatus, 0) : szStatus;
+
+ MENUITEMINFO mii = { sizeof(mii) };
+ mii.fMask = MIIM_DATA | MIIM_ID | MIIM_BITMAP;
+ mii.wID = (UINT)hContact;
+ mii.hbmpItem = HBMMENU_CALLBACK;
+
+ TCHAR szMenuEntry[80];
+ const TCHAR *szNick = NULL;
+ if (dat != 0) {
+ szNick = dat->cache->getNick();
+ GetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, FALSE, &mii);
+ mii.dwItemData++;
+ if (fromEvent == 2) // from chat...
+ mii.dwItemData |= 0x10000000;
+ DeleteMenu(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, MF_BYCOMMAND);
+ mir_sntprintf(szMenuEntry, SIZEOF(szMenuEntry), _T("%s: %s (%s) [%d]"), tszFinalProto, szNick, szMyStatus, mii.dwItemData & 0x0000ffff);
+ AppendMenu(PluginConfig.g_hMenuTrayUnread, MF_BYCOMMAND | MF_STRING, (UINT_PTR)hContact, szMenuEntry);
+ PluginConfig.m_UnreadInTray++;
+ if (PluginConfig.m_UnreadInTray)
+ SetEvent(g_hEvent);
+ SetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, FALSE, &mii);
+ }
+ else {
+ szNick = pcli->pfnGetContactDisplayName(hContact, 0);
+ if (CheckMenuItem(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, MF_BYCOMMAND | MF_UNCHECKED) == -1) {
+ mir_sntprintf(szMenuEntry, SIZEOF(szMenuEntry), _T("%s: %s (%s) [%d]"), tszFinalProto, szNick, szMyStatus, fromEvent ? 1 : 0);
AppendMenu(PluginConfig.g_hMenuTrayUnread, MF_BYCOMMAND | MF_STRING, (UINT_PTR)hContact, szMenuEntry);
- PluginConfig.m_UnreadInTray++;
+ mii.dwItemData = fromEvent ? 1 : 0;
+ PluginConfig.m_UnreadInTray += (mii.dwItemData & 0x0000ffff);
if (PluginConfig.m_UnreadInTray)
SetEvent(g_hEvent);
- SetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, FALSE, &mii);
+ if (fromEvent == 2)
+ mii.dwItemData |= 0x10000000;
}
else {
- szNick = pcli->pfnGetContactDisplayName(hContact, 0);
- if (CheckMenuItem(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, MF_BYCOMMAND | MF_UNCHECKED) == -1) {
- mir_sntprintf(szMenuEntry, SIZEOF(szMenuEntry), _T("%s: %s (%s) [%d]"), tszFinalProto, szNick, szMyStatus, fromEvent ? 1 : 0);
- AppendMenu(PluginConfig.g_hMenuTrayUnread, MF_BYCOMMAND | MF_STRING, (UINT_PTR)hContact, szMenuEntry);
- mii.dwItemData = fromEvent ? 1 : 0;
- PluginConfig.m_UnreadInTray += (mii.dwItemData & 0x0000ffff);
- if (PluginConfig.m_UnreadInTray)
- SetEvent(g_hEvent);
- if (fromEvent == 2)
- mii.dwItemData |= 0x10000000;
- }
- else {
- GetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, FALSE, &mii);
- mii.dwItemData += (fromEvent ? 1 : 0);
- PluginConfig.m_UnreadInTray += (fromEvent ? 1 : 0);
- if (PluginConfig.m_UnreadInTray)
- SetEvent(g_hEvent);
- mii.fMask |= MIIM_STRING;
- if (fromEvent == 2)
- mii.dwItemData |= 0x10000000;
- mir_sntprintf(szMenuEntry, SIZEOF(szMenuEntry), _T("%s: %s (%s) [%d]"), tszFinalProto, szNick, szMyStatus, mii.dwItemData & 0x0000ffff);
- mii.cch = lstrlen(szMenuEntry) + 1;
- mii.dwTypeData = (LPTSTR)szMenuEntry;
- }
- SetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, FALSE, &mii);
+ GetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, FALSE, &mii);
+ mii.dwItemData += (fromEvent ? 1 : 0);
+ PluginConfig.m_UnreadInTray += (fromEvent ? 1 : 0);
+ if (PluginConfig.m_UnreadInTray)
+ SetEvent(g_hEvent);
+ mii.fMask |= MIIM_STRING;
+ if (fromEvent == 2)
+ mii.dwItemData |= 0x10000000;
+ mir_sntprintf(szMenuEntry, SIZEOF(szMenuEntry), _T("%s: %s (%s) [%d]"), tszFinalProto, szNick, szMyStatus, mii.dwItemData & 0x0000ffff);
+ mii.cch = lstrlen(szMenuEntry) + 1;
+ mii.dwTypeData = (LPTSTR)szMenuEntry;
}
+ SetMenuItemInfo(PluginConfig.g_hMenuTrayUnread, (UINT_PTR)hContact, FALSE, &mii);
}
return 0;
}
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index dd136f9eb7..c874422d08 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -1766,7 +1766,6 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM wParam, LPARAM lParam) TCHAR newtitle[128];
TCHAR* pszNewTitleEnd;
TCHAR newcontactname[128];
- TCITEM item;
DWORD dwOldIdle = dat->idle;
const char* szActProto = 0;
HANDLE hActContact = 0;
@@ -1784,10 +1783,10 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM wParam, LPARAM lParam) if (dat->iTabID == -1)
return;
- ZeroMemory((void*)&item, sizeof(item));
+ TCITEM item = { 0 };
+
if (dat->hContact) {
- TCHAR fulluin[256];
- const TCHAR* szNick = dat->cache->getNick();
+ const TCHAR *szNick = dat->cache->getNick();
if (dat->szProto) {
szActProto = dat->cache->getActiveProto();
@@ -1798,7 +1797,7 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM wParam, LPARAM lParam) dat->dwFlagsEx = dat->idle ? dat->dwFlagsEx | MWF_SHOW_ISIDLE : dat->dwFlagsEx & ~MWF_SHOW_ISIDLE;
dat->wStatus = dat->cache->getStatus();
- mir_sntprintf(dat->szStatus, SIZEOF(dat->szStatus), _T("%s"), (char *) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, dat->szProto == NULL ? ID_STATUS_OFFLINE : dat->wStatus, GSMDF_TCHAR));
+ _tcsncpy_s(dat->szStatus, SIZEOF(dat->szStatus), pcli->pfnGetStatusModeDescription(dat->szProto == NULL ? ID_STATUS_OFFLINE : dat->wStatus, 0), _TRUNCATE);
if (lParam != 0) {
if (PluginConfig.m_CutContactNameOnTabs)
@@ -1819,14 +1818,16 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM wParam, LPARAM lParam) item.mask |= TCIF_TEXT;
}
SendMessage(hwndDlg, DM_UPDATEWINICON, 0, 0);
+
+ TCHAR fulluin[256];
if (dat->bIsMeta)
mir_sntprintf(fulluin, SIZEOF(fulluin),
- TranslateT("UID: %s (SHIFT click -> copy to clipboard)\nClick for User's Details\nRight click for MetaContact control\nClick dropdown to add or remove user from your favorites."),
- bHasName ? dat->cache->getUIN() : TranslateT("No UID"));
+ TranslateT("UID: %s (SHIFT click -> copy to clipboard)\nClick for User's Details\nRight click for MetaContact control\nClick dropdown to add or remove user from your favorites."),
+ bHasName ? dat->cache->getUIN() : TranslateT("No UID"));
else
mir_sntprintf(fulluin, SIZEOF(fulluin),
- TranslateT("UID: %s (SHIFT click -> copy to clipboard)\nClick for User's Details\nClick dropdown to change this contact's favorite status."),
- bHasName ? dat->cache->getUIN() : TranslateT("No UID"));
+ TranslateT("UID: %s (SHIFT click -> copy to clipboard)\nClick for User's Details\nClick dropdown to change this contact's favorite status."),
+ bHasName ? dat->cache->getUIN() : TranslateT("No UID"));
SendMessage(GetDlgItem(hwndDlg, IDC_NAME), BUTTONADDTOOLTIP, (WPARAM)fulluin, BATF_TCHAR);
}
@@ -1853,10 +1854,11 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM wParam, LPARAM lParam) UpdateTrayMenuState(dat, TRUE);
if (dat->cache->isFavorite())
AddContactToFavorites(dat->hContact, dat->cache->getNick(), szActProto, dat->szStatus, dat->wStatus,
- LoadSkinnedProtoIcon(dat->cache->getActiveProto(), dat->cache->getActiveStatus()), 0, PluginConfig.g_hMenuFavorites);
+ LoadSkinnedProtoIcon(dat->cache->getActiveProto(), dat->cache->getActiveStatus()), 0, PluginConfig.g_hMenuFavorites);
+
if (dat->cache->isRecent())
AddContactToFavorites(dat->hContact, dat->cache->getNick(), szActProto, dat->szStatus, dat->wStatus,
- LoadSkinnedProtoIcon(dat->cache->getActiveProto(), dat->cache->getActiveStatus()), 0, PluginConfig.g_hMenuRecent);
+ LoadSkinnedProtoIcon(dat->cache->getActiveProto(), dat->cache->getActiveStatus()), 0, PluginConfig.g_hMenuRecent);
dat->Panel->Invalidate();
if (dat->pWnd)
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 58493834fb..3d28031054 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -661,8 +661,8 @@ void CGlobals::logStatusChange(WPARAM wParam, const CContactCache *c) TCHAR buffer[450];
- TCHAR *szOldStatus = (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)wOldStatus, GSMDF_TCHAR);
- TCHAR *szNewStatus = (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)wStatus, GSMDF_TCHAR);
+ TCHAR *szOldStatus = pcli->pfnGetStatusModeDescription(wOldStatus, 0);
+ TCHAR *szNewStatus = pcli->pfnGetStatusModeDescription(wStatus, 0);
if (szOldStatus == 0 || szNewStatus == 0)
return;
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 7a5e3bdb72..6a4a2b5441 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -1659,7 +1659,7 @@ INT_PTR CALLBACK DlgProcSetupStatusModes(HWND hwndDlg, UINT msg, WPARAM wParam, SetWindowText(hwndDlg, TranslateT("Choose status modes"));
{
for (int i = ID_STATUS_ONLINE; i <= ID_STATUS_OUTTOLUNCH; i++) {
- SetWindowText(GetDlgItem(hwndDlg, i), (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, (WPARAM)i, GSMDF_TCHAR));
+ SetWindowText(GetDlgItem(hwndDlg, i), pcli->pfnGetStatusModeDescription(i, GSMDF_TCHAR));
if (dwStatusMask != -1 && (dwStatusMask & (1 << (i - ID_STATUS_ONLINE))))
CheckDlgButton(hwndDlg, i, TRUE);
Utils::enableDlgControl(hwndDlg, i, dwStatusMask != -1);
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 08a1407159..fa57f20786 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -713,7 +713,7 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, HANDLE hContact, i lstrcpyn(newcontactname, _T("_U_"), SIZEOF(newcontactname));
WORD wStatus = (szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(newData.hContact, szProto, "Status", ID_STATUS_OFFLINE));
- TCHAR *szStatus = (TCHAR*) CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(newData.hContact, szProto, "Status", ID_STATUS_OFFLINE), GSMDF_TCHAR);
+ TCHAR *szStatus = pcli->pfnGetStatusModeDescription(szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(newData.hContact, szProto, "Status", ID_STATUS_OFFLINE), 0);
if (M.GetByte("tabstatus", 1))
mir_sntprintf(tabtitle, SIZEOF(tabtitle), _T("%s (%s) "), newcontactname, szStatus);
diff --git a/plugins/TabSRMM/src/trayicon.cpp b/plugins/TabSRMM/src/trayicon.cpp index 277c8fb887..6d38355acf 100644 --- a/plugins/TabSRMM/src/trayicon.cpp +++ b/plugins/TabSRMM/src/trayicon.cpp @@ -250,7 +250,7 @@ void TSAPI AddContactToFavorites(HANDLE hContact, const TCHAR *szNickname, const if (wStatus == 0)
wStatus = db_get_w((HANDLE)hContact, szProto, "Status", ID_STATUS_OFFLINE);
if (szStatus == NULL)
- szStatus = (TCHAR*)CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, wStatus, GSMDF_TCHAR);
+ szStatus = pcli->pfnGetStatusModeDescription(wStatus, 0);
}
else
return;
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index de196803bc..dd1cc7a662 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -19,7 +19,7 @@ #include "variables.h"
-static TCHAR *parseCodeToStatus(ARGUMENTSINFO *ai)
+static TCHAR* parseCodeToStatus(ARGUMENTSINFO *ai)
{
if (ai->argc != 2)
return NULL;
@@ -34,9 +34,8 @@ static TCHAR *parseCodeToStatus(ARGUMENTSINFO *ai) static int getContactInfoFlags(TCHAR *tszDesc)
{
- TCHAR *cur;
int flags = 0;
- for (cur=tszDesc;(cur < (tszDesc+_tcslen(tszDesc)));cur++) {
+ for (TCHAR *cur=tszDesc;(cur < (tszDesc+_tcslen(tszDesc))); cur++) {
if (!_tcsnicmp(cur, _T(STR_PROTOID), _tcslen(_T(STR_PROTOID)))) {
flags|=CI_PROTOID;
cur += _tcslen(_T(STR_PROTOID)) - 1;
@@ -76,7 +75,7 @@ static int getContactInfoFlags(TCHAR *tszDesc) return flags;
}
-static TCHAR *parseContact(ARGUMENTSINFO *ai)
+static TCHAR* parseContact(ARGUMENTSINFO *ai)
{
if (ai->argc < 3 || ai->argc > 4 )
return NULL;
@@ -107,7 +106,7 @@ static TCHAR *parseContact(ARGUMENTSINFO *ai) return encodeContactToString(hContact);
}
-static TCHAR *parseContactCount(ARGUMENTSINFO *ai)
+static TCHAR* parseContactCount(ARGUMENTSINFO *ai)
{
if (ai->argc != 3)
return NULL;
@@ -123,7 +122,7 @@ static TCHAR *parseContactCount(ARGUMENTSINFO *ai) return itot(count);
}
-static TCHAR *parseContactInfo(ARGUMENTSINFO *ai)
+static TCHAR* parseContactInfo(ARGUMENTSINFO *ai)
{
if (ai->argc != 3)
return NULL;
@@ -149,7 +148,7 @@ static TCHAR *parseContactInfo(ARGUMENTSINFO *ai) return getContactInfoT(type, hContact);
}
-static TCHAR *parseDBProfileName(ARGUMENTSINFO *ai)
+static TCHAR* parseDBProfileName(ARGUMENTSINFO *ai)
{
if (ai->argc != 1)
return NULL;
@@ -161,7 +160,7 @@ static TCHAR *parseDBProfileName(ARGUMENTSINFO *ai) return mir_tstrdup(name);
}
-static TCHAR *parseDBProfilePath(ARGUMENTSINFO *ai)
+static TCHAR* parseDBProfilePath(ARGUMENTSINFO *ai)
{
if (ai->argc != 1)
return NULL;
@@ -205,7 +204,7 @@ static TCHAR* getDBSetting(HANDLE hContact, char* module, char* setting, TCHAR* return var;
}
-static TCHAR *parseDBSetting(ARGUMENTSINFO *ai)
+static TCHAR* parseDBSetting(ARGUMENTSINFO *ai)
{
if (ai->argc < 4)
return NULL;
@@ -243,7 +242,7 @@ static TCHAR *parseDBSetting(ARGUMENTSINFO *ai) return res;
}
-static TCHAR *parseLastSeenDate(ARGUMENTSINFO *ai)
+static TCHAR* parseLastSeenDate(ARGUMENTSINFO *ai)
{
if (ai->argc <= 1)
return NULL;
@@ -301,7 +300,7 @@ static TCHAR *parseLastSeenDate(ARGUMENTSINFO *ai) return res;
}
-static TCHAR *parseLastSeenTime(ARGUMENTSINFO *ai)
+static TCHAR* parseLastSeenTime(ARGUMENTSINFO *ai)
{
if (ai->argc <= 1)
return NULL;
@@ -360,7 +359,7 @@ static TCHAR *parseLastSeenTime(ARGUMENTSINFO *ai) return res;
}
-static TCHAR *parseLastSeenStatus(ARGUMENTSINFO *ai)
+static TCHAR* parseLastSeenStatus(ARGUMENTSINFO *ai)
{
if (ai->argc != 2)
return NULL;
@@ -395,7 +394,7 @@ static TCHAR *parseLastSeenStatus(ARGUMENTSINFO *ai) return NULL;
}
-static TCHAR *parseMirandaPath(ARGUMENTSINFO *ai)
+static TCHAR* parseMirandaPath(ARGUMENTSINFO *ai)
{
if (ai->argc != 1)
return NULL;
@@ -408,13 +407,13 @@ static TCHAR *parseMirandaPath(ARGUMENTSINFO *ai) return mir_tstrdup(path);
}
-static TCHAR *parseMyStatus(ARGUMENTSINFO *ai)
+static TCHAR* parseMyStatus(ARGUMENTSINFO *ai)
{
if (ai->argc > 2)
return NULL;
int status;
- if (ai->argc == 1 || _tcslen(ai->targv[1]) == 0 )
+ if (ai->argc == 1 || _tcslen(ai->targv[1]) == 0)
status = CallService(MS_CLIST_GETSTATUSMODE, 0, 0);
else
status = CallProtoService( _T2A(ai->targv[1]), PS_GETSTATUS, 0, 0);
@@ -426,7 +425,7 @@ static TCHAR *parseMyStatus(ARGUMENTSINFO *ai) return NULL;
}
-static TCHAR *parseProtoInfo(ARGUMENTSINFO *ai)
+static TCHAR* parseProtoInfo(ARGUMENTSINFO *ai)
{
if (ai->argc != 3)
return NULL;
@@ -467,7 +466,7 @@ static TCHAR *parseProtoInfo(ARGUMENTSINFO *ai) return tszRes;
}
-static TCHAR *parseSpecialContact(ARGUMENTSINFO *ai)
+static TCHAR* parseSpecialContact(ARGUMENTSINFO *ai)
{
if (ai->argc != 1 || ai->fi->hContact == NULL)
return NULL;
@@ -629,7 +628,7 @@ static HANDLE findDbEvent(HANDLE hContact, HANDLE hDbEvent, int flags) }
// ?message(%subject%,last|first,sent|recv,read|unread)
-static TCHAR *parseDbEvent(ARGUMENTSINFO *ai)
+static TCHAR* parseDbEvent(ARGUMENTSINFO *ai)
{
if (ai->argc != 5)
return NULL;
@@ -697,16 +696,16 @@ static TCHAR *parseDbEvent(ARGUMENTSINFO *ai) return res;
}
-static TCHAR *parseTranslate(ARGUMENTSINFO *ai)
+static TCHAR* parseTranslate(ARGUMENTSINFO *ai)
{
if (ai->argc != 2)
return NULL;
- TCHAR* res = TranslateTS(ai->targv[1]);
+ TCHAR *res = TranslateTS(ai->targv[1]);
return (res == NULL) ? NULL : mir_tstrdup(res);
}
-static TCHAR *parseVersionString(ARGUMENTSINFO *ai)
+static TCHAR* parseVersionString(ARGUMENTSINFO *ai)
{
if (ai->argc != 1)
return NULL;
|