diff options
author | George Hazan <george.hazan@gmail.com> | 2012-07-05 22:41:06 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-07-05 22:41:06 +0000 |
commit | e3cefc7b6ca803e3f87dbadae54a110332778490 (patch) | |
tree | 0ee41f14f962f946c9e64fae4a11fbcb197af853 /src/modules/protocols | |
parent | f0fb070eab8f276e66c0154363656045bc0dadb3 (diff) |
- first of the /Core standard plugins;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@778 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/protocols')
-rw-r--r-- | src/modules/protocols/protoaccs.cpp | 10 | ||||
-rw-r--r-- | src/modules/protocols/protochains.cpp | 8 | ||||
-rw-r--r-- | src/modules/protocols/protocols.cpp | 22 | ||||
-rw-r--r-- | src/modules/protocols/protoopts.cpp | 16 |
4 files changed, 28 insertions, 28 deletions
diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp index 4846d84b87..3fd5aeee6b 100644 --- a/src/modules/protocols/protoaccs.cpp +++ b/src/modules/protocols/protoaccs.cpp @@ -225,7 +225,7 @@ static int InitializeStaticAccounts(WPARAM, LPARAM) {
int count = 0;
- for (int i = 0; i < accounts.getCount(); i++) {
+ for (int i=0; i < accounts.getCount(); i++) {
PROTOACCOUNT* pa = accounts[i];
if ( !pa->ppro || !Proto_IsAccountEnabled(pa))
continue;
@@ -247,7 +247,7 @@ static int InitializeStaticAccounts(WPARAM, LPARAM) static int UninitializeStaticAccounts(WPARAM, LPARAM)
{
- for (int i = 0; i < accounts.getCount(); i++) {
+ for (int i=0; i < accounts.getCount(); i++) {
PROTOACCOUNT* pa = accounts[i];
if ( !pa->ppro || !Proto_IsAccountEnabled(pa))
continue;
@@ -264,7 +264,7 @@ int LoadAccountsModule(void) bModuleInitialized = TRUE;
- for (i = 0; i < accounts.getCount(); i++) {
+ for (i=0; i < accounts.getCount(); i++) {
PROTOACCOUNT* pa = accounts[i];
pa->bDynDisabled = !Proto_IsProtocolLoaded(pa->szProtoName);
if (pa->ppro)
@@ -604,7 +604,7 @@ void UnloadAccountsModule() if ( !bModuleInitialized) return;
- for (i=accounts.getCount()-1; i >= 0; i--) {
+ for (i = accounts.getCount()-1; i >= 0; i--) {
PROTOACCOUNT* pa = accounts[ i ];
UnloadAccount(pa, false, false);
accounts.remove(i);
@@ -617,7 +617,7 @@ void UnloadAccountsModule() void BuildProtoMenus()
{
- for (int i = 0; i < accounts.getCount(); i++) {
+ for (int i=0; i < accounts.getCount(); i++) {
PROTOACCOUNT* pa = accounts[ i ];
if (cli.pfnGetProtocolVisibility(pa->szModuleName) == 0)
continue;
diff --git a/src/modules/protocols/protochains.cpp b/src/modules/protocols/protochains.cpp index 05d39b07e4..74145d3970 100644 --- a/src/modules/protocols/protochains.cpp +++ b/src/modules/protocols/protochains.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. INT_PTR Proto_CallContactService(WPARAM wParam, LPARAM lParam)
//note that this is ChainSend() too, due to a quirk of function definitions
{
- CCSDATA *ccs=(CCSDATA*)lParam;
+ CCSDATA *ccs = (CCSDATA*)lParam;
int i;
char str[10];
DBVARIANT dbv;
@@ -70,7 +70,7 @@ INT_PTR Proto_CallContactService(WPARAM wParam, LPARAM lParam) static INT_PTR CallRecvChain(WPARAM wParam, LPARAM lParam)
{
- CCSDATA *ccs=(CCSDATA*)lParam;
+ CCSDATA *ccs = (CCSDATA*)lParam;
int i;
INT_PTR ret;
char str[10];
@@ -217,7 +217,7 @@ static INT_PTR Proto_AddToContact(WPARAM wParam, LPARAM lParam) if (pd->type > pdCompare->type) break;
}
//put the new module at position i
- lastProto=mir_strdup((char*)lParam);
+ lastProto = mir_strdup((char*)lParam);
for (;;i++) {
_itoa(i, str, 10);
if (DBGetContactSettingString((HANDLE)wParam, "_Filter", str, &dbv)) {
@@ -227,7 +227,7 @@ static INT_PTR Proto_AddToContact(WPARAM wParam, LPARAM lParam) }
DBWriteContactSettingString((HANDLE)wParam, "_Filter", str, lastProto);
mir_free(lastProto);
- lastProto=dbv.pszVal;
+ lastProto = dbv.pszVal;
}
}
return 0;
diff --git a/src/modules/protocols/protocols.cpp b/src/modules/protocols/protocols.cpp index 991ebdfe08..8a12239c48 100644 --- a/src/modules/protocols/protocols.cpp +++ b/src/modules/protocols/protocols.cpp @@ -329,7 +329,7 @@ char** __fastcall Proto_FilesMatrixA(wchar_t **files) while (files[ count++ ]);
char** filesA = (char**)mir_alloc(count * sizeof(char*));
- for (int i = 0; i < count; ++i)
+ for (int i=0; i < count; ++i)
filesA[ i ] = mir_u2a(files[ i ]);
return filesA;
@@ -343,7 +343,7 @@ static wchar_t** __fastcall Proto_FilesMatrixU(char **files) while (files[ count++ ]);
wchar_t** filesU = (wchar_t**)mir_alloc(count * sizeof(wchar_t*));
- for (int i = 0; i < count; ++i)
+ for (int i=0; i < count; ++i)
filesU[ i ] = mir_a2u(files[ i ]);
return filesU;
@@ -419,12 +419,12 @@ INT_PTR CallProtoServiceInt(HANDLE hContact, const char *szModule, const char *s return (INT_PTR)ppi->AddToList(wParam, (PROTOSEARCHRESULT*)lParam);
else {
PROTOSEARCHRESULT *psr = (PROTOSEARCHRESULT*)lParam;
- PROTOSEARCHRESULT *psra =(PROTOSEARCHRESULT*)mir_alloc(psr->cbSize);
+ PROTOSEARCHRESULT *psra = (PROTOSEARCHRESULT*)mir_alloc(psr->cbSize);
memcpy(psra, psr, psr->cbSize);
- psra->nick = (PROTOCHAR*)mir_u2a(psr->nick);
+ psra->nick = (PROTOCHAR*)mir_u2a(psr->nick);
psra->firstName = (PROTOCHAR*)mir_u2a(psr->firstName);
- psra->lastName = (PROTOCHAR*)mir_u2a(psr->lastName);
- psra->email = (PROTOCHAR*)mir_u2a(psr->email);
+ psra->lastName = (PROTOCHAR*)mir_u2a(psr->lastName);
+ psra->email = (PROTOCHAR*)mir_u2a(psr->email);
INT_PTR res = (INT_PTR)ppi->AddToList(wParam, psra);
@@ -595,12 +595,12 @@ INT_PTR CallProtoServiceInt(HANDLE hContact, const char *szModule, const char *s if ( !strcmp(szService, PS_ADDTOLIST)) {
PROTOSEARCHRESULT *psr = (PROTOSEARCHRESULT*)lParam;
if ( !(psr->flags & PSR_UNICODE)) {
- PROTOSEARCHRESULT *psra =(PROTOSEARCHRESULT*)mir_alloc(psr->cbSize);
+ PROTOSEARCHRESULT *psra = (PROTOSEARCHRESULT*)mir_alloc(psr->cbSize);
memcpy(psra, psr, psr->cbSize);
- psra->nick = (PROTOCHAR*)mir_u2a(psr->nick);
+ psra->nick = (PROTOCHAR*)mir_u2a(psr->nick);
psra->firstName = (PROTOCHAR*)mir_u2a(psr->firstName);
- psra->lastName = (PROTOCHAR*)mir_u2a(psr->lastName);
- psra->email = (PROTOCHAR*)mir_u2a(psr->email);
+ psra->lastName = (PROTOCHAR*)mir_u2a(psr->lastName);
+ psra->email = (PROTOCHAR*)mir_u2a(psr->email);
INT_PTR res = MyCallProtoService(szModule, szService, wParam, (LPARAM)psra);
@@ -668,7 +668,7 @@ INT_PTR CallContactService(HANDLE hContact, const char *szProtoService, WPARAM w PROTOACCOUNT* pa;
CCSDATA ccs = { hContact, szProtoService, wParam, lParam };
- for (i = 0;; i++) {
+ for (i=0;; i++) {
char str[10];
_itoa(i, str, 10);
if (DBGetContactSettingString(hContact, "_Filter", str, &dbv))
diff --git a/src/modules/protocols/protoopts.cpp b/src/modules/protocols/protoopts.cpp index 007e827388..2de8275453 100644 --- a/src/modules/protocols/protoopts.cpp +++ b/src/modules/protocols/protoopts.cpp @@ -124,7 +124,7 @@ static INT_PTR CALLBACK AccFormDlgProc(HWND hwndDlg, UINT message, WPARAM wParam GetDlgItemTextA(hwndDlg, IDC_ACCINTERNALNAME, buf, SIZEOF(buf));
rtrim(buf);
if (buf[0]) {
- for (int i = 0; i < accounts.getCount(); ++i)
+ for (int i=0; i < accounts.getCount(); ++i)
if (_stricmp(buf, accounts[i]->szModuleName) == 0)
return FALSE;
} }
@@ -587,7 +587,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM hIcon = LoadSkinnedIcon(tmp);
DrawIconEx(lps->hDC, lps->rcItem.left, lps->rcItem.top, hIcon, cxIcon, cyIcon, 0, hbrBack, DI_NORMAL);
- IconLib_ReleaseIcon(hIcon, 0);
+ IcoLib_ReleaseIcon(hIcon, 0);
lps->rcItem.left += cxIcon + 2;
@@ -662,7 +662,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM dat->iSelected = -1;
SendMessage(hList, LB_RESETCONTENT, 0, 0);
- for (i = 0; i < accounts.getCount(); ++i) {
+ for (i=0; i < accounts.getCount(); ++i) {
int iItem = SendMessage(hList, LB_ADDSTRING, 0, (LPARAM)accounts[i]->tszAccountName);
SendMessage(hList, LB_SETITEMDATA, iItem, (LPARAM)accounts[i]);
@@ -670,7 +670,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM ListBox_SetCurSel(hList, iItem);
}
- dat->iSelected = ListBox_GetCurSel(hList); // -1 if error => nothing selected in our case
+ dat->iSelected = ListBox_GetCurSel(hList); // -1 if error = > nothing selected in our case
if (dat->iSelected >= 0)
sttSelectItem(dat, hList, dat->iSelected);
else if (acc && acc->hwndAccMgrUI)
@@ -696,7 +696,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM }
}
else {
- // menu was activated with mouse => find item under cursor & set focus to our control.
+ // menu was activated with mouse = > find item under cursor & set focus to our control.
POINT ptItem = pt;
ScreenToClient(hwndList, &ptItem);
iItem = (short)LOWORD(SendMessage(hwndList, LB_ITEMFROMPOINT, 0, MAKELPARAM(ptItem.x, ptItem.y)));
@@ -969,7 +969,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM int i;
PSHNOTIFY pshn = {0};
pshn.hdr.code = PSN_APPLY;
- for (i = 0; i < accounts.getCount(); ++i) {
+ for (i=0; i < accounts.getCount(); ++i) {
if (accounts[i]->hwndAccMgrUI && accounts[i]->bAccMgrUIChanged) {
pshn.hdr.hwndFrom = accounts[i]->hwndAccMgrUI;
SendMessage(accounts[i]->hwndAccMgrUI, WM_NOTIFY, 0, (LPARAM)&pshn);
@@ -982,7 +982,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM int i;
PSHNOTIFY pshn = {0};
pshn.hdr.code = PSN_RESET;
- for (i = 0; i < accounts.getCount(); ++i) {
+ for (i=0; i < accounts.getCount(); ++i) {
if (accounts[i]->hwndAccMgrUI && accounts[i]->bAccMgrUIChanged) {
pshn.hdr.hwndFrom = accounts[i]->hwndAccMgrUI;
SendMessage(accounts[i]->hwndAccMgrUI, WM_NOTIFY, 0, (LPARAM)&pshn);
@@ -996,7 +996,7 @@ INT_PTR CALLBACK AccMgrDlgProc(HWND hwndDlg, UINT message, WPARAM wParam, LPARAM break;
case WM_DESTROY:
{
- for (int i = 0; i < accounts.getCount(); ++i) {
+ for (int i=0; i < accounts.getCount(); ++i) {
accounts[i]->bAccMgrUIChanged = FALSE;
if (accounts[i]->hwndAccMgrUI) {
DestroyWindow(accounts[i]->hwndAccMgrUI);
|