From 65c6790a7463df68854d14917de26b101d35553f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 27 Feb 2014 13:51:27 +0000 Subject: minor code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@8294 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/clist/clistmenus.cpp | 6 +++--- src/modules/clist/clistmod.cpp | 4 ++-- src/modules/clist/clisttray.cpp | 2 +- src/modules/clist/clui.cpp | 2 +- src/modules/clist/cluiservices.cpp | 2 +- src/modules/clist/protocolorder.cpp | 2 +- src/modules/findadd/findadd.cpp | 6 +++--- src/modules/findadd/searchresults.cpp | 8 ++++---- src/modules/protocols/protoaccs.cpp | 24 ++++++++++++------------ src/modules/protocols/protoopts.cpp | 12 ++++++------ src/modules/skin/skinicons.cpp | 2 +- 11 files changed, 35 insertions(+), 35 deletions(-) (limited to 'src/modules') diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp index 6f96ae6d2e..ac0c408287 100644 --- a/src/modules/clist/clistmenus.cpp +++ b/src/modules/clist/clistmenus.cpp @@ -606,7 +606,7 @@ INT_PTR StatusMenuExecService(WPARAM wParam, LPARAM) cli.currentDesiredStatusMode = smep->status; for (int j=0; j < accounts.getCount(); j++) { - PROTOACCOUNT* pa = accounts[j]; + PROTOACCOUNT *pa = accounts[j]; if (!Proto_IsAccountEnabled(pa)) continue; if (MenusProtoCount > 1 && Proto_IsAccountLocked(pa)) @@ -866,7 +866,7 @@ void RebuildMenuOrder(void) if (i == -1) continue; - PROTOACCOUNT* pa = accounts[i]; + PROTOACCOUNT *pa = accounts[i]; int pos = 0; if (!bHideStatusMenu && !cli.pfnGetProtocolVisibility(pa->szModuleName)) continue; @@ -975,7 +975,7 @@ void RebuildMenuOrder(void) //add to root menu for (j = 0; j < SIZEOF(statusModeList); j++) { for (i=0; i < accounts.getCount(); i++) { - PROTOACCOUNT* pa = accounts[i]; + PROTOACCOUNT *pa = accounts[i]; if (!bHideStatusMenu && !cli.pfnGetProtocolVisibility(pa->szModuleName)) continue; diff --git a/src/modules/clist/clistmod.cpp b/src/modules/clist/clistmod.cpp index cd5059ceca..72a9c21847 100644 --- a/src/modules/clist/clistmod.cpp +++ b/src/modules/clist/clistmod.cpp @@ -188,7 +188,7 @@ static INT_PTR GetContactIcon(WPARAM wParam, LPARAM) return cli.pfnGetContactIcon(wParam); } -static void AddProtoIconIndex(PROTOACCOUNT* pa) +static void AddProtoIconIndex(PROTOACCOUNT *pa) { ProtoIconIndex *pii = new ProtoIconIndex; pii->szProto = pa->szModuleName; @@ -200,7 +200,7 @@ static void AddProtoIconIndex(PROTOACCOUNT* pa) protoIconIndex.insert(pii); } -static void RemoveProtoIconIndex(PROTOACCOUNT* pa) +static void RemoveProtoIconIndex(PROTOACCOUNT *pa) { for (int i=0; i < protoIconIndex.getCount(); i++) if (strcmp(protoIconIndex[i].szProto, pa->szModuleName) == 0) { diff --git a/src/modules/clist/clisttray.cpp b/src/modules/clist/clisttray.cpp index 17b017244f..052a1c9637 100644 --- a/src/modules/clist/clisttray.cpp +++ b/src/modules/clist/clisttray.cpp @@ -266,7 +266,7 @@ int fnTrayIconInit(HWND hwnd) for (int i=0; i < accounts.getCount(); i++) { int j = cli.pfnGetAccountIndexByPos(i); if (j >= 0) { - PROTOACCOUNT* pa = accounts[j]; + PROTOACCOUNT *pa = accounts[j]; if (cli.pfnGetProtocolVisibility(pa->szModuleName)) cli.pfnTrayIconAdd(hwnd, pa->szModuleName, NULL, CallProtoServiceInt(NULL,pa->szModuleName, PS_GETSTATUS, 0, 0)); } diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp index 3c332f7042..7522afabf3 100644 --- a/src/modules/clist/clui.cpp +++ b/src/modules/clist/clui.cpp @@ -1002,7 +1002,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM else x += 2; if (showOpts & 2) { - PROTOACCOUNT* pa; + PROTOACCOUNT *pa; TCHAR tszName[64]; if ((pa = Proto_GetAccount(szProto)) != NULL) mir_sntprintf(tszName, SIZEOF(tszName), _T("%s "), pa->tszAccountName); diff --git a/src/modules/clist/cluiservices.cpp b/src/modules/clist/cluiservices.cpp index e3702d61cc..02f1a0485c 100644 --- a/src/modules/clist/cluiservices.cpp +++ b/src/modules/clist/cluiservices.cpp @@ -176,7 +176,7 @@ void fnCluiProtocolStatusChanged(int, const char*) x += g_IconWidth; if (showOpts & 2) { TCHAR tszName[64]; - PROTOACCOUNT* pa = Proto_GetAccount(cli.menuProtos[i].szProto); + PROTOACCOUNT *pa = Proto_GetAccount(cli.menuProtos[i].szProto); if (pa) mir_sntprintf(tszName, SIZEOF(tszName), _T("%s "), pa->tszAccountName); else diff --git a/src/modules/clist/protocolorder.cpp b/src/modules/clist/protocolorder.cpp index 747f81ddf4..a6d45fdc94 100644 --- a/src/modules/clist/protocolorder.cpp +++ b/src/modules/clist/protocolorder.cpp @@ -196,7 +196,7 @@ INT_PTR CALLBACK ProtocolOrderOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (tvi.lParam != 0) { ProtocolData* ppd = (ProtocolData*)tvi.lParam; - PROTOACCOUNT* pa = Proto_GetAccount(ppd->RealName); + PROTOACCOUNT *pa = Proto_GetAccount(ppd->RealName); if (pa != NULL) { while (idx < accounts.getCount() && !ProtoToInclude(accounts[idx])) idx++; pa->iOrder = idx++; diff --git a/src/modules/findadd/findadd.cpp b/src/modules/findadd/findadd.cpp index bf91362ce0..4109c5f1f2 100644 --- a/src/modules/findadd/findadd.cpp +++ b/src/modules/findadd/findadd.cpp @@ -392,7 +392,7 @@ static INT_PTR CALLBACK DlgProcFindAdd(HWND hwndDlg, UINT msg, WPARAM wParam, LP } for (i=0; i < accounts.getCount(); i++) { - PROTOACCOUNT* pa = accounts[i]; + PROTOACCOUNT *pa = accounts[i]; if (!Proto_IsAccountEnabled(pa)) continue; @@ -1005,7 +1005,7 @@ static INT_PTR FindAddCommand(WPARAM, LPARAM) // protocols loaded but that would delay the creation until MODULE_LOADED and // that is not good either... for (int i=0; i < accounts.getCount(); i++) { - PROTOACCOUNT* pa = accounts[i]; + PROTOACCOUNT *pa = accounts[i]; if (!Proto_IsAccountEnabled(pa)) continue; @@ -1049,7 +1049,7 @@ static int OnSystemModulesLoaded(WPARAM, LPARAM) // Make sure we have some networks to search on. for (int i=0; i < accounts.getCount(); i++) { - PROTOACCOUNT* pa = accounts[i]; + PROTOACCOUNT *pa = accounts[i]; int protoCaps = CallProtoServiceInt(NULL, pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0); if (protoCaps & (PF1_BASICSEARCH | PF1_SEARCHBYEMAIL | PF1_SEARCHBYNAME | PF1_EXTSEARCHUI)) netProtoCount++; diff --git a/src/modules/findadd/searchresults.cpp b/src/modules/findadd/searchresults.cpp index 6f2b78ce8d..19f8eae9cb 100644 --- a/src/modules/findadd/searchresults.cpp +++ b/src/modules/findadd/searchresults.cpp @@ -213,7 +213,7 @@ int BeginSearch(HWND, struct FindAddDlgData *dat, const char *szProto, const cha dat->searchCount = 0; dat->search = (struct ProtoSearchInfo*)mir_calloc(sizeof(struct ProtoSearchInfo) * accounts.getCount()); for (int i=0; i < accounts.getCount();i++) { - PROTOACCOUNT* pa = accounts[i]; + PROTOACCOUNT *pa = accounts[i]; if (!Proto_IsAccountEnabled(pa)) continue; DWORD caps = (DWORD)CallProtoServiceInt(NULL,pa->szModuleName, PS_GETCAPS, PFLAGNUM_1, 0); if (!(caps&requiredCapability)) continue; @@ -239,7 +239,7 @@ int BeginSearch(HWND, struct FindAddDlgData *dat, const char *szProto, const cha dat->search[0].szProto = szProto; if (dat->search[0].hProcess == NULL) { //infuriatingly vague error message. fixme. - PROTOACCOUNT* pa = Proto_GetAccount(szProto); + PROTOACCOUNT *pa = Proto_GetAccount(szProto); forkthread(BeginSearchFailed, 0, mir_tstrdup(pa->tszAccountName)); mir_free(dat->search); dat->search = NULL; @@ -260,7 +260,7 @@ void SetStatusBarSearchInfo(HWND hwndStatus, struct FindAddDlgData *dat) lstrcpy(str, TranslateT("Searching")); for (i=0; i < dat->searchCount; i++) { - PROTOACCOUNT* pa = Proto_GetAccount(dat->search[i].szProto); + PROTOACCOUNT *pa = Proto_GetAccount(dat->search[i].szProto); if (!pa) continue; @@ -308,7 +308,7 @@ void SetStatusBarResultInfo(HWND hwndDlg) } if (total != 0) { TCHAR substr[64]; - PROTOACCOUNT* pa = Proto_GetAccount(subtotal[0].szProto); + PROTOACCOUNT *pa = Proto_GetAccount(subtotal[0].szProto); if (pa == NULL) return; 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: diff --git a/src/modules/skin/skinicons.cpp b/src/modules/skin/skinicons.cpp index 2e6e071f02..0cc55cc0bb 100644 --- a/src/modules/skin/skinicons.cpp +++ b/src/modules/skin/skinicons.cpp @@ -264,7 +264,7 @@ HICON LoadSkinProtoIcon(const char *szProto, int status, bool big) mir_snprintf(iconName, SIZEOF(iconName), "%s%s%d", statusIconsFmt, szProto, statusIndx); HICON hIcon = IcoLib_GetIcon(iconName, big); if (hIcon == NULL && (caps2 == 0 || (caps2 & statusIcons[statusIndx].pf2))) { - PROTOACCOUNT* pa = Proto_GetAccount(szProto); + PROTOACCOUNT *pa = Proto_GetAccount(szProto); if (pa) { TCHAR szPath[MAX_PATH], szFullPath[MAX_PATH], *str; GetModuleFileName(hInst, szPath, MAX_PATH); -- cgit v1.2.3