summaryrefslogtreecommitdiff
path: root/src/modules/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-27 13:51:27 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-27 13:51:27 +0000
commit65c6790a7463df68854d14917de26b101d35553f (patch)
tree1eb9ae9242ae3a596da76031c51c680a3febd2fd /src/modules/protocols
parent5f8a607f900a42e27bf166b86185001aadf3e9f2 (diff)
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@8294 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/protocols')
-rw-r--r--src/modules/protocols/protoaccs.cpp24
-rw-r--r--src/modules/protocols/protoopts.cpp12
2 files changed, 18 insertions, 18 deletions
diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp
index 9b4980b651..33c5a83ba2 100644
--- a/src/modules/protocols/protoaccs.cpp
+++ b/src/modules/protocols/protoaccs.cpp
@@ -47,7 +47,7 @@ static int EnumDbModules(const char *szModuleName, DWORD ofsModuleName, LPARAM l
DBVARIANT dbv;
if (!db_get_s(NULL, szModuleName, "AM_BaseProto", &dbv)) {
if (!Proto_GetAccount(szModuleName)) {
- PROTOACCOUNT* pa = (PROTOACCOUNT*)mir_calloc(sizeof(PROTOACCOUNT));
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)mir_calloc(sizeof(PROTOACCOUNT));
pa->cbSize = sizeof(*pa);
pa->szModuleName = mir_strdup(szModuleName);
pa->szProtoName = mir_strdup(dbv.pszVal);
@@ -74,7 +74,7 @@ void LoadDbAccounts(void)
if (db_get_s(NULL, "Protocols", buf, &dbv))
continue;
- PROTOACCOUNT* pa = (PROTOACCOUNT*)mir_calloc(sizeof(PROTOACCOUNT));
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)mir_calloc(sizeof(PROTOACCOUNT));
if (pa == NULL) {
db_free(&dbv);
continue;
@@ -172,7 +172,7 @@ void WriteDbAccounts()
// write new data
for (i=0; i < accounts.getCount(); i++) {
- PROTOACCOUNT* pa = accounts[i];
+ PROTOACCOUNT *pa = accounts[i];
char buf[ 20 ];
_itoa(i, buf, 10);
@@ -210,7 +210,7 @@ static int OnContactDeleted(WPARAM hContact, LPARAM lParam)
static int OnDbSettingsChanged(WPARAM hContact, LPARAM lParam)
{
if (hContact) {
- PROTOACCOUNT* pa = Proto_GetAccount(hContact);
+ PROTOACCOUNT *pa = Proto_GetAccount(hContact);
if (Proto_IsAccountEnabled(pa) && pa->ppro)
pa->ppro->OnEvent(EV_PROTO_DBSETTINGSCHANGED, hContact, lParam);
}
@@ -222,7 +222,7 @@ static int InitializeStaticAccounts(WPARAM, LPARAM)
int count = 0;
for (int i=0; i < accounts.getCount(); i++) {
- PROTOACCOUNT* pa = accounts[i];
+ PROTOACCOUNT *pa = accounts[i];
if (!pa->ppro || !Proto_IsAccountEnabled(pa))
continue;
@@ -244,7 +244,7 @@ static int InitializeStaticAccounts(WPARAM, LPARAM)
static int UninitializeStaticAccounts(WPARAM, LPARAM)
{
for (int i=0; i < accounts.getCount(); i++) {
- PROTOACCOUNT* pa = accounts[i];
+ PROTOACCOUNT *pa = accounts[i];
if (!pa->ppro || !Proto_IsAccountEnabled(pa))
continue;
@@ -261,7 +261,7 @@ int LoadAccountsModule(void)
bModuleInitialized = TRUE;
for (i=0; i < accounts.getCount(); i++) {
- PROTOACCOUNT* pa = accounts[i];
+ PROTOACCOUNT *pa = accounts[i];
pa->bDynDisabled = !Proto_IsProtocolLoaded(pa->szProtoName);
if (pa->ppro)
continue;
@@ -420,7 +420,7 @@ static HANDLE CreateProtoServiceEx(const char* szModule, const char* szService,
return CreateServiceFunctionObj(tmp, pFunc, param);
}
-BOOL ActivateAccount(PROTOACCOUNT* pa)
+BOOL ActivateAccount(PROTOACCOUNT *pa)
{
PROTO_INTERFACE* ppi;
PROTOCOLDESCRIPTOR* ppd = Proto_IsProtocolLoaded(pa->szProtoName);
@@ -510,7 +510,7 @@ static int DeactivationThread(DeactivationThreadParam* param)
return 0;
}
-void DeactivateAccount(PROTOACCOUNT* pa, bool bIsDynamic, bool bErase)
+void DeactivateAccount(PROTOACCOUNT *pa, bool bIsDynamic, bool bErase)
{
if (pa->ppro == NULL) {
if (bErase)
@@ -557,7 +557,7 @@ void EraseAccount(const char* pszModuleName)
/////////////////////////////////////////////////////////////////////////////////////////
-void UnloadAccount(PROTOACCOUNT* pa, bool bIsDynamic, bool bErase)
+void UnloadAccount(PROTOACCOUNT *pa, bool bIsDynamic, bool bErase)
{
DeactivateAccount(pa, bIsDynamic, bErase);
@@ -577,7 +577,7 @@ void UnloadAccountsModule()
if (!bModuleInitialized) return;
for (int i = accounts.getCount()-1; i >= 0; i--) {
- PROTOACCOUNT* pa = accounts[ i ];
+ PROTOACCOUNT *pa = accounts[ i ];
UnloadAccount(pa, false, false);
accounts.remove(i);
}
@@ -588,7 +588,7 @@ void UnloadAccountsModule()
void BuildProtoMenus()
{
for (int i=0; i < accounts.getCount(); i++) {
- PROTOACCOUNT* pa = accounts[ i ];
+ PROTOACCOUNT *pa = accounts[ i ];
if (cli.pfnGetProtocolVisibility(pa->szModuleName) == 0)
continue;
diff --git a/src/modules/protocols/protoopts.cpp b/src/modules/protocols/protoopts.cpp
index 61fdd46177..0b7b18ace9 100644
--- a/src/modules/protocols/protoopts.cpp
+++ b/src/modules/protocols/protoopts.cpp
@@ -66,7 +66,7 @@ int UnloadPlugin(TCHAR* buf, int bufLen);
typedef struct
{
int action;
- PROTOACCOUNT* pa;
+ PROTOACCOUNT *pa;
}
AccFormDlgParam;
@@ -118,7 +118,7 @@ static INT_PTR CALLBACK AccFormDlgProc(HWND hwndDlg, UINT message, WPARAM wParam
case IDOK:
{
AccFormDlgParam* param = (AccFormDlgParam*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- PROTOACCOUNT* pa = param->pa;
+ PROTOACCOUNT *pa = param->pa;
if (param->action == PRAC_ADDED) {
char buf[200];
@@ -709,7 +709,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM
}
if (iItem != LB_ERR) {
- PROTOACCOUNT* pa = (PROTOACCOUNT*)ListBox_GetItemData(hwndList, iItem);
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)ListBox_GetItemData(hwndList, iItem);
HMENU hMenu = CreatePopupMenu();
if (!pa->bOldProto && !pa->bDynDisabled)
AppendMenu(hMenu, MF_STRING, 1, TranslateT("Rename"));
@@ -851,7 +851,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM
HWND hList = GetDlgItem(hwndDlg, IDC_ACCLIST);
int idx = ListBox_GetCurSel(hList);
if (idx != -1) {
- PROTOACCOUNT* pa = (PROTOACCOUNT*)ListBox_GetItemData(hList, idx);
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)ListBox_GetItemData(hList, idx);
TCHAR buf[ 200 ];
mir_sntprintf(buf, SIZEOF(buf), TranslateT("Account %s is being deleted"), pa->tszAccountName);
if (pa->bOldProto) {
@@ -890,7 +890,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM
HWND hList = GetDlgItem(hwndDlg, IDC_ACCLIST);
int idx = ListBox_GetCurSel(hList);
if (idx != -1) {
- PROTOACCOUNT* pa = (PROTOACCOUNT*)ListBox_GetItemData(hList, idx);
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)ListBox_GetItemData(hList, idx);
if (pa->bOldProto) {
OPENOPTIONSDIALOG ood;
ood.cbSize = sizeof(ood);
@@ -1056,7 +1056,7 @@ int OptProtosLoaded(WPARAM, LPARAM)
static int OnAccListChanged(WPARAM eventCode, LPARAM lParam)
{
- PROTOACCOUNT* pa = (PROTOACCOUNT*)lParam;
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)lParam;
switch(eventCode) {
case PRAC_CHANGED: