diff options
author | George Hazan <george.hazan@gmail.com> | 2012-05-27 16:05:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-05-27 16:05:18 +0000 |
commit | c5e9ee462edc701924e0b378df1404759f9ee0fb (patch) | |
tree | 714ea38805adcef600ac02f021a726169ff31718 /plugins/YAMN/mails | |
parent | 5c64f7b180825e9fa39a394a713de13765e50291 (diff) |
YAMN adaptation for the modern Miranda
git-svn-id: http://svn.miranda-ng.org/main/trunk@198 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/YAMN/mails')
-rw-r--r-- | plugins/YAMN/mails/decode.cpp | 8 | ||||
-rw-r--r-- | plugins/YAMN/mails/mails.cpp | 18 | ||||
-rw-r--r-- | plugins/YAMN/mails/mime.cpp | 12 |
3 files changed, 19 insertions, 19 deletions
diff --git a/plugins/YAMN/mails/decode.cpp b/plugins/YAMN/mails/decode.cpp index 704b61c7d3..4eeb5b6b76 100644 --- a/plugins/YAMN/mails/decode.cpp +++ b/plugins/YAMN/mails/decode.cpp @@ -226,7 +226,7 @@ int GetCharsetFromString(char *input,size_t size) #ifdef DEBUG_DECODECODEPAGE
DebugLog(DecodeFile,"<CodePage>%s</CodePage>",pout);
#endif
- for(int i=0;i<CPLENALL;i++){
+ for (int i=0;i<CPLENALL;i++){
size_t len = strlen(CodePageNamesAll[i].NameBase);
if (0==strncmp(pout,CodePageNamesAll[i].NameBase,len)){
if (0==strcmp(pout+len,CodePageNamesAll[i].NameSub)){
@@ -300,7 +300,7 @@ int DecodeQuotedPrintable(char *Src,char *Dst,int DstLen, BOOL isQ) char *DstTemp=Dst;
DebugLog(DecodeFile,"<Decode Quoted><Input>%s</Input>",Src);
#endif
- for(int Counter=0;((char)*Src!=0) && DstLen && (Counter++<DstLen);Src++,Dst++)
+ for (int Counter=0;((char)*Src!=0) && DstLen && (Counter++<DstLen);Src++,Dst++)
if (*Src=='=')
{
if (!isQ){
@@ -398,7 +398,7 @@ int ConvertStringToUnicode(char *stream,unsigned int cp,WCHAR **out) DebugLog(DecodeFile,"<CodePage #>%d</CodePage #>",cp);
#endif
- for(Index=0;Index<sizeof(CodePagesZeroFlags)/sizeof(CodePagesZeroFlags[0]);Index++)
+ for (Index=0;Index<sizeof(CodePagesZeroFlags)/sizeof(CodePagesZeroFlags[0]);Index++)
if (CodePagesZeroFlags[Index]==cp)
{
Index=-1;
@@ -417,7 +417,7 @@ int ConvertStringToUnicode(char *stream,unsigned int cp,WCHAR **out) if (*out!=NULL)
{
- for(dest=temp;*src!=(WCHAR)0;src++,dest++) //copy old string from *out to temp
+ for (dest=temp;*src!=(WCHAR)0;src++,dest++) //copy old string from *out to temp
*dest=*src;
// *dest++=L' '; //add space?
delete[] *out;
diff --git a/plugins/YAMN/mails/mails.cpp b/plugins/YAMN/mails/mails.cpp index 5d3c0e9284..af0f3d2329 100644 --- a/plugins/YAMN/mails/mails.cpp +++ b/plugins/YAMN/mails/mails.cpp @@ -166,7 +166,7 @@ INT_PTR DeleteAccountMailSvc(WPARAM wParam,LPARAM lParam) if (OldMail->MailData->Body!=NULL)
delete[] OldMail->MailData->Body;
if ((TH=OldMail->MailData->TranslatedHeader)!=NULL)
- for(;OldMail->MailData->TranslatedHeader!=NULL;) {
+ for (;OldMail->MailData->TranslatedHeader!=NULL;) {
TH=TH->Next;
if (OldMail->MailData->TranslatedHeader->name!=NULL)
delete[] OldMail->MailData->TranslatedHeader->name;
@@ -237,7 +237,7 @@ void WINAPI SynchroMessagesFcn(HACCOUNT Account,HYAMNMAIL *OldQueue,HYAMNMAIL *R if (RemovedOld!=NULL) *RemovedOld=NULL;
if (RemovedNew!=NULL) *RemovedNew=NULL;
- for(FinderPrev=NULL,Finder=*OldQueue;Finder!=NULL;)
+ for (FinderPrev=NULL,Finder=*OldQueue;Finder!=NULL;)
{
if (Finder->Flags & YAMN_MSG_DELETED) //if old queue contains deleted mail
{
@@ -245,7 +245,7 @@ void WINAPI SynchroMessagesFcn(HACCOUNT Account,HYAMNMAIL *OldQueue,HYAMNMAIL *R Finder=Finder->Next; //get next message in old queue for testing
continue;
}
- for(ParserPrev=NULL,Parser=*NewQueue;Parser!=NULL;ParserPrev=Parser,Parser=Parser->Next)
+ for (ParserPrev=NULL,Parser=*NewQueue;Parser!=NULL;ParserPrev=Parser,Parser=Parser->Next)
{
if (Parser->Flags & YAMN_MSG_DELETED)
continue;
@@ -339,14 +339,14 @@ void WINAPI DeleteMessageFromQueueFcn(HYAMNMAIL *From,HYAMNMAIL Which,int mode=0 }
else
{
- for(Parser=*From;Which!=Parser->Next;Parser=Parser->Next)
+ for (Parser=*From;Which!=Parser->Next;Parser=Parser->Next)
if (mode && (Parser->Number>Number)) Parser->Number--;
if (mode && (Parser->Number>Number)) Parser->Number--;
Parser->Next=Parser->Next->Next;
Parser=Which->Next;
}
if (mode)
- for(;Parser!=NULL;Parser=Parser->Next)
+ for (;Parser!=NULL;Parser=Parser->Next)
if (Parser->Number>Number) Parser->Number--;
}
@@ -354,7 +354,7 @@ void DeleteMessagesFromQueue(HYAMNMAIL *From,HYAMNMAIL Which,int mode=0) {
HYAMNMAIL Parser;
- for(Parser=Which;Parser!=NULL;Parser=Parser->Next)
+ for (Parser=Which;Parser!=NULL;Parser=Parser->Next)
DeleteMessageFromQueueFcn(From,Parser,mode);
}
@@ -362,7 +362,7 @@ HYAMNMAIL WINAPI FindMessageByIDFcn(HYAMNMAIL From,char *ID) {
HYAMNMAIL Browser;
- for(Browser=From;Browser!=NULL;Browser=Browser->Next)
+ for (Browser=From;Browser!=NULL;Browser=Browser->Next)
if (0==lstrcmpA(Browser->ID,ID))
break;
return Browser;
@@ -458,7 +458,7 @@ HYAMNMAIL WINAPI CreateNewDeleteQueueFcn(HYAMNMAIL From) {
HYAMNMAIL FirstMail,Browser;
- for(FirstMail=NULL;From!=NULL;From=From->Next)
+ for (FirstMail=NULL;From!=NULL;From=From->Next)
{
if ((From->Flags & (YAMN_MSG_USERDELETE | YAMN_MSG_AUTODELETE)) && !(From->Flags & YAMN_MSG_DELETED))
{
@@ -486,7 +486,7 @@ void WINAPI SetRemoveFlagsInQueueFcn(HYAMNMAIL From,DWORD FlagsSet,DWORD FlagsNo {
HYAMNMAIL msgq;
- for(msgq=(HYAMNMAIL)From;msgq!=NULL;msgq=msgq->Next)
+ for (msgq=(HYAMNMAIL)From;msgq!=NULL;msgq=msgq->Next)
{
if ((FlagsSet==(msgq->Flags & FlagsSet)) && (0==(msgq->Flags & FlagsNotSet)))
{
diff --git a/plugins/YAMN/mails/mime.cpp b/plugins/YAMN/mails/mime.cpp index 294206c7ad..d1e1dd7db2 100644 --- a/plugins/YAMN/mails/mime.cpp +++ b/plugins/YAMN/mails/mime.cpp @@ -105,7 +105,7 @@ void CopyToHeader(char *srcstart,char *srcend,char **dest,int mode) dst=*dest;
- for(;srcstart<srcend;dst++,srcstart++)
+ for (;srcstart<srcend;dst++,srcstart++)
{
if (ENDLINE(srcstart))
{
@@ -228,7 +228,7 @@ char *ExtractFromContentType(char *ContentType,char *value) }
if (NULL==(CopiedString=new char[++temp-finder+1]))
return NULL;
- for(copier=CopiedString;finder!=temp;*copier++=*finder++); //copy string
+ for (copier=CopiedString;finder!=temp;*copier++=*finder++); //copy string
*copier=0; //and end it with zero character
return CopiedString;
@@ -236,7 +236,7 @@ char *ExtractFromContentType(char *ContentType,char *value) void ExtractShortHeader(struct CMimeItem *items,struct CShortHeader *head)
{
- for(;items!=NULL;items=items->Next)
+ for (;items!=NULL;items=items->Next)
{
//at the start of line
//MessageBox(NULL,items->value,items->name,0);
@@ -468,7 +468,7 @@ void DeleteHeaderContent(struct CHeader *head) void DeleteNames(PYAMN_MIMENAMES Names)
{
PYAMN_MIMENAMES Parser=Names,Old;
- for(;Parser!=NULL;Parser=Parser->Next)
+ for (;Parser!=NULL;Parser=Parser->Next)
{
if (Parser->Value!=NULL)
delete[] Parser->Value;
@@ -483,7 +483,7 @@ void DeleteNames(PYAMN_MIMENAMES Names) void DeleteShortNames(PYAMN_MIMESHORTNAMES Names)
{
PYAMN_MIMESHORTNAMES Parser=Names,Old;
- for(;Parser!=NULL;Parser=Parser->Next)
+ for (;Parser!=NULL;Parser=Parser->Next)
{
if (Parser->Value!=NULL)
delete[] Parser->Value;
@@ -498,7 +498,7 @@ void DeleteShortNames(PYAMN_MIMESHORTNAMES Names) void inline ToLower(char *string)
{
- for(;*string!=0;string++)
+ for (;*string!=0;string++)
if (*string>='A' && *string<='Z') *string=*string-'A'+'a';
}
|