From 78c0815c4118fe24ab78cce2dc48a6232dcd824a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 2 Jun 2012 20:55:18 +0000 Subject: - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/YAMN/account.cpp | 2 +- plugins/YAMN/browser/mailbrowser.cpp | 54 +++++++++++++++++----------------- plugins/YAMN/filter/Base/maindll.cpp | 14 ++++----- plugins/YAMN/filter/Simple/maindll.cpp | 12 ++++---- plugins/YAMN/mails/decode.cpp | 10 +++---- plugins/YAMN/mails/mime.cpp | 14 ++++----- plugins/YAMN/main.cpp | 4 +-- plugins/YAMN/proto/pop3/pop3.cpp | 2 +- plugins/YAMN/proto/pop3/pop3comm.cpp | 6 ++-- plugins/YAMN/services.cpp | 8 ++--- 10 files changed, 63 insertions(+), 63 deletions(-) (limited to 'plugins/YAMN') diff --git a/plugins/YAMN/account.cpp b/plugins/YAMN/account.cpp index 983bab21f7..d1de8b8e4c 100644 --- a/plugins/YAMN/account.cpp +++ b/plugins/YAMN/account.cpp @@ -411,7 +411,7 @@ DWORD ReadMessagesFromMemory(HACCOUNT Which,char **Parser,char *End) } else { - if (NULL==(ActualMail->Next=CreateAccountMail(Which))){ + if (NULL==(ActualMail->Next=CreateAccountMail(Which))) { return EACC_ALLOC; } ActualMail=ActualMail->Next; diff --git a/plugins/YAMN/browser/mailbrowser.cpp b/plugins/YAMN/browser/mailbrowser.cpp index 7af83115b4..82f4d7eac0 100644 --- a/plugins/YAMN/browser/mailbrowser.cpp +++ b/plugins/YAMN/browser/mailbrowser.cpp @@ -603,7 +603,7 @@ int AddNewMailsToListView(HWND hListView,HACCOUNT ActualAccount,struct CMailNumb item.pszText=L""; { CMimeItem *heads; for (heads=msgq->MailData->TranslatedHeader;heads!=NULL;heads=heads->Next) { - if (!_stricmp(heads->name,"Date")){ + if (!_stricmp(heads->name,"Date")) { MimeDateToLocalizedDateTime(heads->value,LocalDateStr,128); item.pszText=LocalDateStr; break; @@ -667,7 +667,7 @@ void DoMailActions(HWND hDlg,HACCOUNT ActualAccount,struct CMailNumbers *MN,DWOR { char sMsg[250]; _snprintf(sMsg,249,Translate("%s : %d new mail message(s), %d total"),ActualAccount->Name,MN->Real.PopUpNC+MN->Virtual.PopUpNC,MN->Real.PopUpTC+MN->Virtual.PopUpTC); - if (!(nflags & YAMN_ACC_CONTNOEVENT)){ + if (!(nflags & YAMN_ACC_CONTNOEVENT)) { CLISTEVENT cEvent; cEvent.cbSize = sizeof(CLISTEVENT); cEvent.hContact = ActualAccount->hContact; @@ -852,7 +852,7 @@ LRESULT CALLBACK NewMailPopUpProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam memcpy(MailParam,(PINT_PTR)PluginParam,sizeof(YAMN_MAILSHOWPARAM)); hContact = MailParam->account->hContact; Account = MailParam->account; - if (NULL!=(MailParam->ThreadRunningEV=CreateEvent(NULL,FALSE,FALSE,NULL))){ + if (NULL!=(MailParam->ThreadRunningEV=CreateEvent(NULL,FALSE,FALSE,NULL))) { HANDLE NewThread; if (NULL!=(NewThread=CreateThread(NULL,0,ShowEmailThread,(LPVOID)MailParam,0,NULL))) { @@ -905,7 +905,7 @@ LRESULT CALLBACK NewMailPopUpProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam DebugLog(SynchroFile,"PopUpProc:LEFTCLICK:ActualAccountSO-read enter failed\n"); #endif } - if ((Account->NewMailN.Flags & YAMN_ACC_CONT) && !(Account->NewMailN.Flags & YAMN_ACC_CONTNOEVENT)){ + if ((Account->NewMailN.Flags & YAMN_ACC_CONT) && !(Account->NewMailN.Flags & YAMN_ACC_CONTNOEVENT)) { CallService(MS_CLIST_REMOVEEVENT,(WPARAM)hContact,(LPARAM)hContact); } } @@ -1095,8 +1095,8 @@ ULONGLONG MimeDateToFileTime(char *datein) while (tmp[i]==' ')i++; if (day = strchr(&tmp[i],' ')){day[0]=0; day++;} } if (day) {while ( day[0]==' ') day++;if (month= strchr(day, ' ')){month[0]=0; month++;}} - if (month) {while (month[0]==' ')month++;if (year = strchr(month,' ')){ year[0]=0; year++;}} - if (year) {while ( year[0]==' ') year++;if (time = strchr(year, ' ')){ time[0]=0; time++;}} + if (month) {while (month[0]==' ')month++;if (year = strchr(month,' ')) { year[0]=0; year++;}} + if (year) {while ( year[0]==' ') year++;if (time = strchr(year, ' ')) { time[0]=0; time++;}} if (time) {while ( time[0]==' ') time++;if (shift= strchr(time, ' ')){shift[0]=0; shift++;shift[5]=0;}} if (year){ @@ -1108,7 +1108,7 @@ ULONGLONG MimeDateToFileTime(char *datein) if (time) { char *h, *m, *s; h = time; - if (m = strchr(h,':')){ + if (m = strchr(h,':')) { m[0]=0; m++; if (s = strchr(m,':')){s[0] = 0; s++;} } else s=0; @@ -1131,7 +1131,7 @@ ULONGLONG MimeDateToFileTime(char *datein) } } // if (datein) FILETIME ft; - if (SystemTimeToFileTime(&st,&ft)){ + if (SystemTimeToFileTime(&st,&ft)) { res = ((ULONGLONG)ft.dwHighDateTime<<32)|((ULONGLONG)ft.dwLowDateTime); LONGLONG w100nano = Int32x32To64((DWORD)wShiftSeconds,10000000); res -= w100nano; @@ -1163,11 +1163,11 @@ void FileTimeToLocalizedDateTime(LONGLONG filetime, WCHAR *dateout, int lendateo ft.dwLowDateTime = (DWORD)filetime; ft.dwHighDateTime = (DWORD)(filetime >> 32); FILETIME localft; - if (!FileTimeToLocalFileTime(&ft,&localft)){ + if (!FileTimeToLocalFileTime(&ft,&localft)) { // this should never happen wcsncpy(dateout,L"Incorrect FileTime",lendateout); } else { - if (!FileTimeToSystemTime(&localft,&st)){ + if (!FileTimeToSystemTime(&localft,&st)) { // this should never happen wcsncpy(dateout,L"Incorrect LocalFileTime",lendateout); } else { @@ -1178,7 +1178,7 @@ void FileTimeToLocalizedDateTime(LONGLONG filetime, WCHAR *dateout, int lendateo templen = GetDateFormatW(localeID,(optDateTime&SHOWDATELONG)?DATE_LONGDATE:DATE_SHORTDATE,&st,NULL,dateout,lendateout-2); dateout[templen-1] = ' '; } - if (templen<(lendateout-1)){ + if (templen<(lendateout-1)) { GetTimeFormatW(localeID,(optDateTime&SHOWDATENOSECONDS)?TIME_NOSECONDS:0,&st,NULL,&dateout[templen],lendateout-templen-1); } } @@ -1406,10 +1406,10 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM split=new WCHAR*[count+1]; count=0; ofs=0; split[0]=str2; - while (str2[ofs]){ + while (str2[ofs]) { if ((str2[ofs]==0x266A)||(str2[ofs]==0x25D9)||(str2[ofs]==0x25CB)|| (str2[ofs]==0x09)||(str2[ofs]==0x0A)||(str2[ofs]==0x0D)) { - if (str2[ofs-1]){ + if (str2[ofs-1]) { count++; } split[count]=(WCHAR *)(str2+ofs+1); @@ -1422,7 +1422,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM item.iItem = 0; else item.iItem = 999; - for (int i=0;i<=count;i++){ + for (int i=0;i<=count;i++) { item.iSubItem=0; if (i==0) item.pszText=str1; @@ -1446,11 +1446,11 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM if (contentType) { if (!_strnicmp(contentType,"text",4)) { if (transEncoding){ - if (!_stricmp(transEncoding,"base64")){ + if (!_stricmp(transEncoding,"base64")) { int size = (int)strlen(body)*3/4+5; localBody = new char[size+1]; DecodeBase64(body,localBody,size); - } else if (!_stricmp(transEncoding,"quoted-printable")){ + } else if (!_stricmp(transEncoding,"quoted-printable")) { int size = (int)strlen(body)+2; localBody = new char[size+1]; DecodeQuotedPrintable(body,localBody,size,FALSE); @@ -1478,7 +1478,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM if (MailParam->mail->Flags & YAMN_MSG_UNSEEN){ MailParam->mail->Flags&=~YAMN_MSG_UNSEEN; //mark the message as seen HWND hMailBrowser; - if (hMailBrowser=WindowList_Find(YAMNVar.NewMailAccountWnd,MailParam->account)){ + if (hMailBrowser=WindowList_Find(YAMNVar.NewMailAccountWnd,MailParam->account)) { struct CChangeContent Params={MailParam->account->NewMailN.Flags|YAMN_ACC_MSGP,MailParam->account->NoNewMailN.Flags|YAMN_ACC_MSGP}; SendMessageW(hMailBrowser,WM_YAMN_CHANGECONTENT,(WPARAM)MailParam->account,(LPARAM)&Params); } else { @@ -1581,7 +1581,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM MoveWindow(hEdit,5,localSplitPos+6,HeadSizeX-10,HeadSizeY-localSplitPos-11,TRUE); //where to put text window while resizing MoveWindow(hList, 5 ,5 ,HeadSizeX-10 ,(isBodyShown?localSplitPos:HeadSizeY)-10,TRUE); //where to put headers list window while resizing //if (changeX){ - if (GetClientRect(hList,&coord)){ + if (GetClientRect(hList,&coord)) { localSizeX=coord.right-coord.left; } else localSizeX=HeadSizeX; LONG iNameWidth = ListView_GetColumnWidth(hList,0); @@ -1599,7 +1599,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM HTREEITEM hItem = 0; if (pt.x==-1) pt.x = 0; if (pt.y==-1) pt.y = 0; - if (int numRows = ListView_GetItemCount(hList)){ + if (int numRows = ListView_GetItemCount(hList)) { HMENU hMenu = CreatePopupMenu(); AppendMenu(hMenu, MF_STRING, (UINT_PTR)1, TranslateT("Copy Selected")); AppendMenu(hMenu, MF_STRING, (UINT_PTR)2, TranslateT("Copy All")); @@ -1624,7 +1624,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM HGLOBAL hData = GlobalAlloc(GMEM_MOVEABLE,(sizeNeeded+1)*sizeof(TCHAR)); TCHAR *buff = ( TCHAR* )GlobalLock(hData); int courPos = 0; - for (courRow=0;courRowMsgWindow = 0; goto CREADTEVIEWMESSAGEWINDOW; }else{ - if (IsIconic(MyParam.mail->MsgWindow)){ + if (IsIconic(MyParam.mail->MsgWindow)) { OpenIcon(MyParam.mail->MsgWindow); } } @@ -1672,8 +1672,8 @@ CREADTEVIEWMESSAGEWINDOW: MyParam.mail->MsgWindow = CreateDialogParamW(YAMNVar.hInst,MAKEINTRESOURCEW(IDD_DLGSHOWMESSAGE),NULL,(DLGPROC)DlgProcYAMNShowMessage,(LPARAM)&MyParam); WindowList_Add(YAMNVar.MessageWnds,MyParam.mail->MsgWindow,NULL); MSG msg; - while(GetMessage(&msg,NULL,0,0)){ - if (!IsDialogMessage(MyParam.mail->MsgWindow, &msg)){ + while(GetMessage(&msg,NULL,0,0)) { + if (!IsDialogMessage(MyParam.mail->MsgWindow, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } } @@ -2013,7 +2013,7 @@ BOOL CALLBACK DlgProcYAMNMailBrowser(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPa PYAMN_MAILSHOWPARAM MailParam = new YAMN_MAILSHOWPARAM; MailParam->account = GetWindowAccount(hDlg); MailParam->mail = ActualMail; - if (NULL!=(MailParam->ThreadRunningEV=CreateEvent(NULL,FALSE,FALSE,NULL))){ + if (NULL!=(MailParam->ThreadRunningEV=CreateEvent(NULL,FALSE,FALSE,NULL))) { HANDLE NewThread; if (NULL!=(NewThread=CreateThread(NULL,0,ShowEmailThread,MailParam,0,NULL))) { @@ -2267,7 +2267,7 @@ BOOL CALLBACK DlgProcYAMNMailBrowser(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPa break; case LVN_COLUMNCLICK: HACCOUNT ActualAccount; - if (NULL!=(ActualAccount=GetWindowAccount(hDlg))){ + if (NULL!=(ActualAccount=GetWindowAccount(hDlg))) { NM_LISTVIEW* pNMListView = (NM_LISTVIEW*)lParam; if (WAIT_OBJECT_0==WaitToReadFcn(ActualAccount->AccountAccessSO)) { @@ -2393,7 +2393,7 @@ BOOL CALLBACK DlgProcYAMNMailBrowser(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPa HTREEITEM hItem = 0; if (pt.x==-1) pt.x = 0; if (pt.y==-1) pt.y = 0; - if (int numRows = ListView_GetItemCount(hList)){ + if (int numRows = ListView_GetItemCount(hList)) { HMENU hMenu = CreatePopupMenu(); AppendMenu(hMenu, MF_STRING, (UINT_PTR)1, TranslateT("Copy Selected")); AppendMenu(hMenu, MF_STRING, (UINT_PTR)2, TranslateT("Copy All")); @@ -2405,7 +2405,7 @@ BOOL CALLBACK DlgProcYAMNMailBrowser(HWND hDlg,UINT msg,WPARAM wParam,LPARAM lPa int courRow=0; size_t sizeNeeded = 0; TCHAR from[128]={0}, subject[256]={0}, size[16]={0}, date[64]={0}; - for (courRow=0;courRowRegisterFilterPlugin=(MIRANDASERVICE)GetYAMNFcnPtr((WPARAM)MS_YAMN_REGISTERFILTERPLUGIN,(LPARAM)0); @@ -96,7 +96,7 @@ extern "C" int __declspec(dllexport) LoadFilter(MIRANDASERVICE GetYAMNFcnPtr) if(NULL==(POPFilePlugin=(HYAMNFILTERPLUGIN)pYAMNFcn->RegisterFilterPlugin((WPARAM)&FilterRegistration,(LPARAM)YAMN_FILTERREGISTRATIONVERSION))) return 0; //And add our imported functions for YAMN - if(!pYAMNFcn->SetFilterPluginFcnImportFcn(POPFilePlugin,0xb0000000,&FilterFunctions,YAMN_FILTERIMPORTFCNVERSION)) + if (!pYAMNFcn->SetFilterPluginFcnImportFcn(POPFilePlugin,0xb0000000,&FilterFunctions,YAMN_FILTERIMPORTFCNVERSION)) return 0; return 1; //Load luccess } @@ -136,28 +136,28 @@ DWORD WINAPI FilterMail(HACCOUNT Account,DWORD AccountVer,HYAMNMAIL Mail,DWORD M #ifdef DEBUG_FILTER DebugLog(FilterFile,"\n"); #endif - if(!(Mail->Flags & YAMN_MSG_VIRTUAL)) + if (!(Mail->Flags & YAMN_MSG_VIRTUAL)) for(Browser=Mail->MailData->TranslatedHeader;Browser!=NULL;Browser=Browser->Next) //we browse all header stored in Mail->TranslatedHeader { #ifdef DEBUG_FILTER DebugLog(FilterFile,"\n",Browser->name,Browser->value); #endif for(int i=0;iname,ft[i].name)) + if (!lstrcmpi(Browser->name,ft[i].name)) { #ifdef DEBUG_FILTER DebugLog(FilterFile,"\t\t\n",Browser->name); #endif if(findsubstr(Browser->value,ft[i].value)) //and if we find { - if((ft[i].sl==0) && ((Mail->Flags & YAMN_MSG_SPAMMASK)==0)) + if ((ft[i].sl==0) && ((Mail->Flags & YAMN_MSG_SPAMMASK)==0)) { Mail->Flags&=~(YAMN_MSG_POPUP | YAMN_MSG_SYSTRAY | YAMN_MSG_BROWSER | YAMN_MSG_SOUND | YAMN_MSG_APP | YAMN_MSG_NEVENT); #ifdef DEBUG_FILTER DebugLog(FilterFile,"\t\tSetting individual flags not to notify mail, but does not consider as spam."); #endif } - else if((Mail->Flags & YAMN_MSG_SPAMMASK) < ft[i].sl) //if some filter plugin set higher level of spam, we do nothing + else if ((Mail->Flags & YAMN_MSG_SPAMMASK) < ft[i].sl) //if some filter plugin set higher level of spam, we do nothing { Mail->Flags=(Mail->Flags & ~YAMN_MSG_SPAMMASK)+ft[i].sl; //else we set spam level 2 (clearing spam bits and then settting them to level 2 #ifdef DEBUG_FILTER @@ -232,7 +232,7 @@ int findsubstr(char *original,char *pattern) int pl=lstrlen(pattern); for(int i=0;(i+pl)<=ol;i++) - if(!_strnicmp(original+i,pattern,pl)) + if (!_strnicmp(original+i,pattern,pl)) return 1; return 0; } \ No newline at end of file diff --git a/plugins/YAMN/filter/Simple/maindll.cpp b/plugins/YAMN/filter/Simple/maindll.cpp index 77488352b9..62aa87b28d 100644 --- a/plugins/YAMN/filter/Simple/maindll.cpp +++ b/plugins/YAMN/filter/Simple/maindll.cpp @@ -67,7 +67,7 @@ extern "C" int __declspec(dllexport) LoadFilter(MIRANDASERVICE GetYAMNFcnPtr) if(NULL==(POPFilePlugin=(HYAMNFILTERPLUGIN)pYAMNFcn->RegisterFilterPlugin((WPARAM)&FilterRegistration,(LPARAM)YAMN_FILTERREGISTRATIONVERSION))) return 0; //And add our imported functions for YAMN - if(!pYAMNFcn->SetFilterPluginFcnImportFcn(POPFilePlugin,0xb0000000,&FilterFunctions,YAMN_FILTERIMPORTFCNVERSION)) + if (!pYAMNFcn->SetFilterPluginFcnImportFcn(POPFilePlugin,0xb0000000,&FilterFunctions,YAMN_FILTERIMPORTFCNVERSION)) return 0; return 1; //Load luccess } @@ -105,21 +105,21 @@ DWORD WINAPI FilterMail(HACCOUNT Account,DWORD AccountVer,HYAMNMAIL Mail,DWORD M return 0; fp=fopen(FilterPath,"rt"); if(fp != NULL) { - if(!(Mail->Flags & YAMN_MSG_VIRTUAL)) + if (!(Mail->Flags & YAMN_MSG_VIRTUAL)) for(Browser=Mail->MailData->TranslatedHeader;Browser!=NULL;Browser=Browser->Next) { //we browse all header stored in Mail->TranslatedHeader - if((!lstrcmp(Browser->name,"Return-Path")) || (!lstrcmp(Browser->name,"From"))) { //and if we find + if ((!lstrcmp(Browser->name,"Return-Path")) || (!lstrcmp(Browser->name,"From"))) { //and if we find fseek(fp, 0L, SEEK_SET); while(!feof(fp)) { if(fscanf(fp, "%255s", EmailSpam) != 0) { - if(!feof(fp)) + if (!feof(fp)) if(fscanf(fp, "%d", &spamLevel)==0) spamLevel=2; if(spamLevel>4) spamLevel=2; if(strstr(Browser->value,EmailSpam)!=NULL) { - if((Mail->Flags & (YAMN_MSG_SPAMMASK==0)) && (spamLevel==0)) + if ((Mail->Flags & (YAMN_MSG_SPAMMASK==0)) && (spamLevel==0)) Mail->Flags&=~(YAMN_MSG_SOUND | YAMN_MSG_APP | YAMN_MSG_POPUP | YAMN_MSG_SYSTRAY | YAMN_MSG_BROWSER); - else if((Mail->Flags & YAMN_MSG_SPAMMASK) < spamLevel) //if some filter plugin set higher level of spam, we do nothing + else if ((Mail->Flags & YAMN_MSG_SPAMMASK) < spamLevel) //if some filter plugin set higher level of spam, we do nothing Mail->Flags=(Mail->Flags & ~YAMN_MSG_SPAMMASK)+spamLevel; //else we set spam level 2 (clearing spam bits and then settting them to level 2 } } diff --git a/plugins/YAMN/mails/decode.cpp b/plugins/YAMN/mails/decode.cpp index 4eeb5b6b76..867ed7ff25 100644 --- a/plugins/YAMN/mails/decode.cpp +++ b/plugins/YAMN/mails/decode.cpp @@ -226,10 +226,10 @@ int GetCharsetFromString(char *input,size_t size) #ifdef DEBUG_DECODECODEPAGE DebugLog(DecodeFile,"%s",pout); #endif - for (int i=0;ibody = prev1; break; @@ -559,9 +559,9 @@ void ParseAPart(APartDataType *data) while(!ENDLINE(finder) && !EOS(finder)) finder++; }while(ENDLINEWS(finder)); - if (!_strnicmp(prev1,"Content-type",prev2-prev1)){ + if (!_strnicmp(prev1,"Content-type",prev2-prev1)) { data->ContType = prev3; - } else if (!_strnicmp(prev1,"Content-Transfer-Encoding",prev2-prev1)){ + } else if (!_strnicmp(prev1,"Content-Transfer-Encoding",prev2-prev1)) { data->TransEnc = prev3; } @@ -622,7 +622,7 @@ WCHAR *ParseMultipartBody(char *src, char *bond) while (ENDLINE(partData[i].Src)) partData[i].Src++; } size_t resultSize=0; - for (i=0;i=0;i--) { - if (FreeLibrary(hDllPlugins[i])){ + if (FreeLibrary(hDllPlugins[i])) { hDllPlugins[i] = NULL; //for safety iDllPlugins --; } diff --git a/plugins/YAMN/proto/pop3/pop3.cpp b/plugins/YAMN/proto/pop3/pop3.cpp index 152eda6bb2..05e85d7156 100644 --- a/plugins/YAMN/proto/pop3/pop3.cpp +++ b/plugins/YAMN/proto/pop3/pop3.cpp @@ -71,7 +71,7 @@ char *CPop3Client::Connect(const char* servername,const int port,BOOL UseSSL, BO temp = RecvRest(NetClient->Recv(),POP3_SEARCHACK); extern BOOL SSLLoaded; - if (!NoTLS & !(SSL)){ + if (!NoTLS & !(SSL)) { if (NetClient->Stopped) //check if we can work with this POP3 client session throw POP3Error=(DWORD)EPOP3_STOPPED; NetClient->Send("STLS\r\n"); diff --git a/plugins/YAMN/proto/pop3/pop3comm.cpp b/plugins/YAMN/proto/pop3/pop3comm.cpp index 039cc666c7..dcd38ee2c8 100644 --- a/plugins/YAMN/proto/pop3/pop3comm.cpp +++ b/plugins/YAMN/proto/pop3/pop3comm.cpp @@ -411,7 +411,7 @@ HYAMNMAIL WINAPI CreatePOP3Mail(HACCOUNT Account,DWORD MailDataVersion) } static void SetContactStatus(HACCOUNT account, int status){ - if ((account->hContact) && (account->NewMailN.Flags & YAMN_ACC_CONT)){ + if ((account->hContact) && (account->NewMailN.Flags & YAMN_ACC_CONT)) { DBWriteContactSettingWord(account->hContact, YAMN_DBMODULE, "Status", status); } } @@ -712,7 +712,7 @@ DWORD WINAPI SynchroPOP3(struct CheckParam * WhichTemp) if (MsgQueuePtr->Flags&YAMN_MSG_BODYREQUESTED){ HYAMNMAIL NewMsgsPtr=NULL; for (NewMsgsPtr=(HYAMNMAIL)NewMails;NewMsgsPtr!=NULL;NewMsgsPtr=NewMsgsPtr->Next){ - if (!strcmp(MsgQueuePtr->ID,NewMsgsPtr->ID)){ + if (!strcmp(MsgQueuePtr->ID,NewMsgsPtr->ID)) { TCHAR accstatus[512]; wsprintf(accstatus,TranslateT("Reading body %s"),NewMsgsPtr->ID); SetAccountStatus(ActualAccount,accstatus); @@ -770,7 +770,7 @@ DWORD WINAPI SynchroPOP3(struct CheckParam * WhichTemp) #endif MsgsWriteDone(ActualAccount); for (MsgQueuePtr=(HYAMNMAIL)ActualAccount->Mails;MsgQueuePtr!=NULL;MsgQueuePtr=MsgQueuePtr->Next){ - if ((MsgQueuePtr->Flags&YAMN_MSG_BODYREQUESTED) && (MsgQueuePtr->Flags&YAMN_MSG_BODYRECEIVED)){ + if ((MsgQueuePtr->Flags&YAMN_MSG_BODYREQUESTED) && (MsgQueuePtr->Flags&YAMN_MSG_BODYRECEIVED)) { MsgQueuePtr->Flags&=~YAMN_MSG_BODYREQUESTED; if (MsgQueuePtr->MsgWindow){ SendMessage(MsgQueuePtr->MsgWindow,WM_YAMN_CHANGECONTENT,0,0); diff --git a/plugins/YAMN/services.cpp b/plugins/YAMN/services.cpp index 975c6627e9..b0b524eddc 100644 --- a/plugins/YAMN/services.cpp +++ b/plugins/YAMN/services.cpp @@ -382,12 +382,12 @@ void HookEvents(void) //We set function which registers needed POP3 accounts. This is a part of internal POP3 plugin. //Your plugin should do the same task in your Load fcn. Why we call it in MODULESLOADED? Because netlib //user can be registered after all modules are loaded (see m_netlib.h in Miranda) - for (int i = 0;hookData[i].hookName;i++){ + for (int i = 0;hookData[i].hookName;i++) { hookData[i].hookHandle = HookEvent(hookData[i].hookName, hookData[i].mirandaFunction); } } void UnhookEvents(void){ - for (int i = 0;i<(sizeof(hookData)/sizeof(hookData[0]));i++){ + for (int i = 0;i<(sizeof(hookData)/sizeof(hookData[0]));i++) { if (hookData[i].hookHandle) UnhookEvent(hookData[i].hookHandle); } } @@ -480,14 +480,14 @@ static ServiceDataType serviceData[] = { void CreateServiceFunctions(void) { - for (int i = 0;serviceData[i].serviceName;i++){ + for (int i = 0;serviceData[i].serviceName;i++) { serviceData[i].serviceHandle = CreateServiceFunction(serviceData[i].serviceName, serviceData[i].serviceFunction); } }; void DestroyServiceFunctions(void) { - for (int i = 0;serviceData[i].serviceName;i++){ + for (int i = 0;serviceData[i].serviceName;i++) { if (serviceData[i].serviceHandle) DestroyServiceFunction(serviceData[i].serviceHandle); } }; -- cgit v1.2.3