From 82016434fff2eb8ed8288c0c45bc76a67574860d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 12 Feb 2013 20:44:55 +0000 Subject: - fix for chinese in popups; - own md5 module removed; - version bump; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@3585 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/YAMN/src/mails/decode.cpp | 20 +++---- plugins/YAMN/src/mails/mails.cpp | 58 ++++++++++---------- plugins/YAMN/src/mails/mime.cpp | 112 +++++++++++++++++++------------------- 3 files changed, 95 insertions(+), 95 deletions(-) (limited to 'plugins/YAMN/src/mails') diff --git a/plugins/YAMN/src/mails/decode.cpp b/plugins/YAMN/src/mails/decode.cpp index 3af1edc056..a0d96dbfb0 100644 --- a/plugins/YAMN/src/mails/decode.cpp +++ b/plugins/YAMN/src/mails/decode.cpp @@ -211,7 +211,7 @@ int GetCharsetFromString(char *input,size_t size) if ((size<1) || (parser=pout=new char[size+1])==NULL) return -1; - while((*pin!=0) && (pin-input< (INT_PTR)size)) + while((*pin != 0) && (pin-input< (INT_PTR)size)) { if ((*pin>='a') && (*pin<='z')) *parser++=*(pin++)-('a'-'A'); // make it capital @@ -300,7 +300,7 @@ int DecodeQuotedPrintable(char *Src,char *Dst,int DstLen, BOOL isQ) char *DstTemp=Dst; DebugLog(DecodeFile,"%s",Src); #endif - for (int Counter=0;((char)*Src!=0) && DstLen && (Counter++\n%s\n\n",Src); #endif - while(*Src!=0 && DstLen && Dst!=End) + while(*Src != 0 && DstLen && Dst != End) { if ((*Src==0x0D)||(*Src==0x0A)) { Src++; @@ -392,7 +392,7 @@ int ConvertStringToUnicode(char *stream,unsigned int cp,WCHAR **out) //codepages, which require to have set 0 in dwFlags parameter when calling MultiByteToWideChar DWORD CodePagesZeroFlags[]={50220,50221,50222,50225,50227,50229,52936,54936,57002,57003,57004,57005,57006,57007,57008,57009,57010,57011,65000,65001}; - if ((cp!=CP_ACP) && (cp!=CP_OEMCP) && (cp!=CP_MACCP) && (cp!=CP_THREAD_ACP) && (cp!=CP_SYMBOL) && (cp!=CP_UTF7) && (cp!=CP_UTF8) && !GetCPInfo(cp,&CPInfo)) + if ((cp != CP_ACP) && (cp != CP_OEMCP) && (cp != CP_MACCP) && (cp != CP_THREAD_ACP) && (cp != CP_SYMBOL) && (cp != CP_UTF7) && (cp != CP_UTF8) && !GetCPInfo(cp,&CPInfo)) cp=CP_ACP; #ifdef DEBUG_DECODECODEPAGE DebugLog(DecodeFile,"%d",cp); @@ -409,15 +409,15 @@ int ConvertStringToUnicode(char *stream,unsigned int cp,WCHAR **out) else streamlen=MultiByteToWideChar(cp,MB_USEGLYPHCHARS,stream,-1,NULL,0); - if (*out!=NULL) + if (*out != NULL) outlen=wcslen(*out); else outlen=0; temp=new WCHAR[streamlen+outlen+1]; - if (*out!=NULL) + 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; @@ -455,7 +455,7 @@ void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode) size_t tempstoreLength = wcslen(tempstore); size_t outind = 0; - while(*start!=0) { + while(*start != 0) { if (CODES(start)) { finder=start+2;finderend=finder; while(!CODED(finderend) && !EOS(finderend)) finderend++; @@ -475,7 +475,7 @@ void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode) } if (-1==(cp=(DWORD)GetCharsetFromString(finder,finderend-finder))) cp=CP_ACP; - if (Encoding!=0) + if (Encoding != 0) { int size,codeend; char *pcodeend; @@ -509,7 +509,7 @@ void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode) size=finderend-finder+1+1; break; } - if (DecodedResult!=NULL) + if (DecodedResult != NULL) delete[] DecodedResult; DecodedResult=new char[size+1]; switch(Encoding) diff --git a/plugins/YAMN/src/mails/mails.cpp b/plugins/YAMN/src/mails/mails.cpp index 785fc5d8d9..758a00dbd5 100644 --- a/plugins/YAMN/src/mails/mails.cpp +++ b/plugins/YAMN/src/mails/mails.cpp @@ -124,12 +124,12 @@ INT_PTR CreateAccountMailSvc(WPARAM wParam,LPARAM lParam) HYAMNMAIL NewMail; //test if we are going to initialize members of suitable structure (structures of plugin and YAMN must match) - if (MailVersion!=YAMN_MAILVERSION) + if (MailVersion != YAMN_MAILVERSION) return NULL; - if (Account->Plugin!=NULL) + if (Account->Plugin != NULL) { - if (Account->Plugin->MailFcn->NewMailFcnPtr!=NULL) + if (Account->Plugin->MailFcn->NewMailFcnPtr != NULL) { //Let plugin create its own structure, which can be derived from CAccount structure if (NULL==(NewMail=Account->Plugin->MailFcn->NewMailFcnPtr(Account,YAMN_MAILVERSION))) @@ -155,29 +155,29 @@ INT_PTR DeleteAccountMailSvc(WPARAM wParam,LPARAM lParam) HYAMNMAIL OldMail=(HYAMNMAIL)lParam; struct CMimeItem *TH; - if (Plugin->MailFcn!=NULL) { - if (Plugin->MailFcn->DeleteMailFcnPtr!=NULL) { + if (Plugin->MailFcn != NULL) { + if (Plugin->MailFcn->DeleteMailFcnPtr != NULL) { //Let plugin delete its own CMimeMsgQueue derived structure Plugin->MailFcn->DeleteMailFcnPtr(OldMail); return 1; } } - if (OldMail->MailData!=NULL) { - if (OldMail->MailData->Body!=NULL) + if (OldMail->MailData != NULL) { + if (OldMail->MailData->Body != NULL) delete[] OldMail->MailData->Body; - if ((TH=OldMail->MailData->TranslatedHeader)!=NULL) - for (;OldMail->MailData->TranslatedHeader!=NULL;) { + if ((TH=OldMail->MailData->TranslatedHeader) != NULL) + for (;OldMail->MailData->TranslatedHeader != NULL;) { TH=TH->Next; - if (OldMail->MailData->TranslatedHeader->name!=NULL) + if (OldMail->MailData->TranslatedHeader->name != NULL) delete[] OldMail->MailData->TranslatedHeader->name; - if (OldMail->MailData->TranslatedHeader->value!=NULL) + if (OldMail->MailData->TranslatedHeader->value != NULL) delete[] OldMail->MailData->TranslatedHeader->value; delete OldMail->MailData->TranslatedHeader; OldMail->MailData->TranslatedHeader=TH; } delete OldMail->MailData; } - if (OldMail->ID!=NULL) + if (OldMail->ID != NULL) delete[] OldMail->ID; delete OldMail; //consider mail as standard HYAMNMAIL, not initialized before and use its own destructor @@ -188,7 +188,7 @@ INT_PTR DeleteAccountMailSvc(WPARAM wParam,LPARAM lParam) void WINAPI AppendQueueFcn(HYAMNMAIL first,HYAMNMAIL second) { HYAMNMAIL Finder=first; - while(Finder->Next!=NULL) Finder=Finder->Next; + while(Finder->Next != NULL) Finder=Finder->Next; Finder->Next=second; } @@ -197,7 +197,7 @@ INT_PTR LoadMailDataSvc(WPARAM wParam,LPARAM lParam) HYAMNMAIL Mail=(HYAMNMAIL)wParam; DWORD MailVersion=(DWORD)lParam; - if (MailVersion!=YAMN_MAILDATAVERSION) + if (MailVersion != YAMN_MAILDATAVERSION) return NULL; //now we have all data to memory persisting, so no loading is needed @@ -217,7 +217,7 @@ INT_PTR SaveMailDataSvc(WPARAM wParam,LPARAM lParam) HYAMNMAIL Mail=(HYAMNMAIL)wParam; DWORD MailVersion=(DWORD)lParam; - if (MailVersion!=YAMN_MAILDATAVERSION) + if (MailVersion != YAMN_MAILDATAVERSION) return (INT_PTR)-1; //now we have all data to memory persisting, so no saving is needed @@ -234,10 +234,10 @@ void WINAPI SynchroMessagesFcn(HACCOUNT Account,HYAMNMAIL *OldQueue,HYAMNMAIL *R HYAMNMAIL Parser,ParserPrev; HYAMNMAIL RemovedOldParser =NULL; HYAMNMAIL RemovedNewParser =NULL; - if (RemovedOld!=NULL) *RemovedOld=NULL; - if (RemovedNew!=NULL) *RemovedNew=NULL; + 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; @@ -256,7 +256,7 @@ void WINAPI SynchroMessagesFcn(HACCOUNT Account,HYAMNMAIL *OldQueue,HYAMNMAIL *R if (0==strcmp(Parser->ID,Finder->ID)) //search for equal message in new queue break; } - if (Parser!=NULL) //found equal message in new queue + if (Parser != NULL) //found equal message in new queue { if (Parser==*NewQueue) *NewQueue=(*NewQueue)->Next; @@ -319,7 +319,7 @@ void WINAPI SynchroMessagesFcn(HACCOUNT Account,HYAMNMAIL *OldQueue,HYAMNMAIL *R void WINAPI DeleteMessagesToEndFcn(HACCOUNT Account,HYAMNMAIL From) { HYAMNMAIL Temp; - while(From!=NULL) + while(From != NULL) { Temp=From; From=From->Next; @@ -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; @@ -386,7 +386,7 @@ void WINAPI TranslateHeaderFcn(char *stream,int len,struct CMimeItem **head) prev1=finder; - while(*finder!=':' && !EOS(finder)) finder++; + while(*finder != ':' && !EOS(finder)) finder++; if (!EOS(finder)) prev2=finder++; else @@ -404,7 +404,7 @@ void WINAPI TranslateHeaderFcn(char *stream,int len,struct CMimeItem **head) while(!ENDLINE(finder) && !EOS(finder)) finder++; }while(ENDLINEWS(finder)); - if (Item!=NULL) + if (Item != NULL) { if (NULL==(Item->Next=new struct CMimeItem)) break; @@ -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/src/mails/mime.cpp b/plugins/YAMN/src/mails/mime.cpp index 13710a2557..33b7735b82 100644 --- a/plugins/YAMN/src/mails/mime.cpp +++ b/plugins/YAMN/src/mails/mime.cpp @@ -98,7 +98,7 @@ void CopyToHeader(char *srcstart,char *srcend,char **dest,int mode) if (srcstart>=srcend) return; - if (NULL!=*dest) + if (NULL != *dest) delete[] *dest; if (NULL==(*dest=new char[srcend-srcstart+1])) return; @@ -127,7 +127,7 @@ void ExtractAddressFromLine(char *finder,char **storeto,char **storetonick) return; } while(WS(finder)) finder++; - if ((*finder)!='<') + if ((*finder) != '<') { char *finderend=finder+1; do @@ -138,12 +138,12 @@ void ExtractAddressFromLine(char *finder,char **storeto,char **storetonick) }while(ENDLINEWS(finderend)); finderend--; while(WS(finderend) || ENDLINE(finderend)) finderend--; //find the end of text, no whitespace - if (*finderend!='>') //not '>' at the end of line + if (*finderend != '>') //not '>' at the end of line CopyToHeader(finder,finderend+1,storeto,MIME_MAIL); else //at the end of line, there's '>' { char *finder2=finderend; - while((*finder2!='<') && (finder2>finder)) finder2--; //go to matching '<' or to the start + while((*finder2 != '<') && (finder2>finder)) finder2--; //go to matching '<' or to the start CopyToHeader(finder2,finderend+1,storeto,MIME_MAIL); if (*finder2=='<') //if we found '<', the rest copy as from nick { @@ -160,7 +160,7 @@ void ExtractAddressFromLine(char *finder,char **storeto,char **storetonick) { if (ENDLINEWS(finderend)) //after endline information continues finderend+=2; - while(!ENDLINE(finderend) && (*finderend!='>') && !EOS(finderend)) finderend++; //seek to the matching < or to the end of line or to the end of string + while(!ENDLINE(finderend) && (*finderend != '>') && !EOS(finderend)) finderend++; //seek to the matching < or to the end of line or to the end of string }while(ENDLINEWS(finderend)); CopyToHeader(finder,finderend+1,storeto,MIME_MAIL); //go to first '>' or to the end and copy finder=finderend+1; @@ -213,13 +213,13 @@ char *ExtractFromContentType(char *ContentType,char *value) temp=finder-1; while((temp>ContentType) && WS(temp)) temp--; //now we have to find, if the word "Charset=" is located after ';' like "; Charset=" - if (*temp!=';' && !ENDLINE(temp) && temp!=ContentType) + if (*temp != ';' && !ENDLINE(temp) && temp != ContentType) return NULL; finder=finder+strlen(value); //jump over value string while(WS(finder)) finder++; //jump over whitespaces temp=finder; - while(*temp!=0 && *temp!=';') temp++; //jump to the end of setting (to the next ;) + while(*temp != 0 && *temp != ';') temp++; //jump to the end of setting (to the next ;) temp--; while(WS(temp)) temp--; //remove whitespaces from the end if (*finder=='\"') { //remove heading and tailing quotes @@ -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); @@ -314,7 +314,7 @@ void ExtractShortHeader(struct CMimeItem *items,struct CShortHeader *head) DebugLog(DecodeFile,"\n"); #endif ToLower(ContentType); - if (NULL!=(CharSetStr=ExtractFromContentType(ContentType,"charset="))) + if (NULL != (CharSetStr=ExtractFromContentType(ContentType,"charset="))) { head->CP=GetCharsetFromString(CharSetStr,strlen(CharSetStr)); delete[] CharSetStr; @@ -328,7 +328,7 @@ void ExtractShortHeader(struct CMimeItem *items,struct CShortHeader *head) #ifdef DEBUG_DECODE DebugLog(DecodeFile,""); #endif - if (head->Priority!=-1) + if (head->Priority != -1) { if (0==strncmp(items->value,"low",3)) head->Priority=5; @@ -372,17 +372,17 @@ void ExtractHeader(struct CMimeItem *items,int &CP,struct CHeader *head) head->Priority=ShortHeader.Priority==-1 ? 3 : ShortHeader.Priority; CP=ShortHeader.CP==-1 ? CP : ShortHeader.CP; #ifdef DEBUG_DECODE - if (NULL!=ShortHeader.From) + if (NULL != ShortHeader.From) DebugLog(DecodeFile,"%s%s%s%s%s%s\n"); DebugLog(DecodeFile,"\n"); @@ -391,38 +391,38 @@ void ExtractHeader(struct CMimeItem *items,int &CP,struct CHeader *head) ConvertCodedStringToUnicode(ShortHeader.From,&head->From,CP,MIME_PLAIN); #ifdef DEBUG_DECODE - if (NULL!=head->From) + if (NULL != head->From) DebugLogW(DecodeFile,L"%s\n",head->From); #endif ConvertCodedStringToUnicode(ShortHeader.FromNick,&head->FromNick,CP,MIME_MAIL); #ifdef DEBUG_DECODE - if (NULL!=head->FromNick) + if (NULL != head->FromNick) DebugLogW(DecodeFile,L"%s\n",head->FromNick); #endif ConvertCodedStringToUnicode(ShortHeader.ReturnPath,&head->ReturnPath,CP,MIME_PLAIN); #ifdef DEBUG_DECODE - if (NULL!=head->ReturnPath) + if (NULL != head->ReturnPath) DebugLogW(DecodeFile,L"%s\n",head->ReturnPath); #endif ConvertCodedStringToUnicode(ShortHeader.ReturnPathNick,&head->ReturnPathNick,CP,MIME_MAIL); #ifdef DEBUG_DECODE - if (NULL!=head->ReturnPathNick) + if (NULL != head->ReturnPathNick) DebugLogW(DecodeFile,L"%s\n",head->ReturnPathNick); #endif ConvertCodedStringToUnicode(ShortHeader.Subject,&head->Subject,CP,MIME_PLAIN); #ifdef DEBUG_DECODE - if (NULL!=head->Subject) + if (NULL != head->Subject) DebugLogW(DecodeFile,L"%s\n",head->Subject); #endif ConvertCodedStringToUnicode(ShortHeader.Date,&head->Date,CP,MIME_PLAIN); #ifdef DEBUG_DECODE - if (NULL!=head->Date) + if (NULL != head->Date) DebugLogW(DecodeFile,L"%s\n",head->Date); #endif ConvertCodedStringToUnicode(ShortHeader.Body,&head->Body,CP,MIME_PLAIN); #ifdef DEBUG_DECODE - if (NULL!=head->Body) + if (NULL != head->Body) DebugLogW(DecodeFile,L"%s\n",head->Body); #endif @@ -439,40 +439,40 @@ void ExtractHeader(struct CMimeItem *items,int &CP,struct CHeader *head) void DeleteShortHeaderContent(struct CShortHeader *head) { - if (head->From!=NULL) delete[] head->From; - if (head->FromNick!=NULL) delete[] head->FromNick; - if (head->ReturnPath!=NULL) delete[] head->ReturnPath; - if (head->ReturnPathNick!=NULL) delete[] head->ReturnPathNick; - if (head->Subject!=NULL) delete[] head->Subject; - if (head->Date!=NULL) delete[] head->Date; - if (head->To!=NULL) DeleteShortNames(head->To); - if (head->Cc!=NULL) DeleteShortNames(head->Cc); - if (head->Bcc!=NULL) DeleteShortNames(head->Bcc); - if (head->Body!=NULL) delete[] head->Body; + if (head->From != NULL) delete[] head->From; + if (head->FromNick != NULL) delete[] head->FromNick; + if (head->ReturnPath != NULL) delete[] head->ReturnPath; + if (head->ReturnPathNick != NULL) delete[] head->ReturnPathNick; + if (head->Subject != NULL) delete[] head->Subject; + if (head->Date != NULL) delete[] head->Date; + if (head->To != NULL) DeleteShortNames(head->To); + if (head->Cc != NULL) DeleteShortNames(head->Cc); + if (head->Bcc != NULL) DeleteShortNames(head->Bcc); + if (head->Body != NULL) delete[] head->Body; } void DeleteHeaderContent(struct CHeader *head) { - if (head->From!=NULL) delete[] head->From; - if (head->FromNick!=NULL) delete[] head->FromNick; - if (head->ReturnPath!=NULL) delete[] head->ReturnPath; - if (head->ReturnPathNick!=NULL) delete[] head->ReturnPathNick; - if (head->Subject!=NULL) delete[] head->Subject; - if (head->Date!=NULL) delete[] head->Date; - if (head->Body!=NULL) delete[] head->Body; - if (head->To!=NULL) DeleteNames(head->To); - if (head->Cc!=NULL) DeleteNames(head->Cc); - if (head->Bcc!=NULL) DeleteNames(head->Bcc); + if (head->From != NULL) delete[] head->From; + if (head->FromNick != NULL) delete[] head->FromNick; + if (head->ReturnPath != NULL) delete[] head->ReturnPath; + if (head->ReturnPathNick != NULL) delete[] head->ReturnPathNick; + if (head->Subject != NULL) delete[] head->Subject; + if (head->Date != NULL) delete[] head->Date; + if (head->Body != NULL) delete[] head->Body; + if (head->To != NULL) DeleteNames(head->To); + if (head->Cc != NULL) DeleteNames(head->Cc); + if (head->Bcc != NULL) DeleteNames(head->Bcc); } 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) + if (Parser->Value != NULL) delete[] Parser->Value; - if (Parser->ValueNick!=NULL) + if (Parser->ValueNick != NULL) delete[] Parser->ValueNick; Old=Parser; Parser=Parser->Next; @@ -483,11 +483,11 @@ 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) + if (Parser->Value != NULL) delete[] Parser->Value; - if (Parser->ValueNick!=NULL) + if (Parser->ValueNick != NULL) delete[] Parser->ValueNick; Old=Parser; Parser=Parser->Next; @@ -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'; } @@ -539,7 +539,7 @@ void ParseAPart(APartDataType *data) } prev1=finder; - while(*finder!=':' && !EOS(finder) && !ENDLINE(finder)) finder++; + while(*finder != ':' && !EOS(finder) && !ENDLINE(finder)) finder++; if (ENDLINE(finder)||EOS(finder)) { // no ":" in the line? here the body begins; data->body = prev1; @@ -631,7 +631,7 @@ WCHAR *ParseMultipartBody(char *src, char *bond) } if (partData[i].ContType) { char *CharSetStr; - if (NULL!=(CharSetStr=ExtractFromContentType(partData[i].ContType,"charset="))) + if (NULL != (CharSetStr=ExtractFromContentType(partData[i].ContType,"charset="))) { partData[i].CodePage=GetCharsetFromString(CharSetStr,strlen(CharSetStr)); delete[] CharSetStr; @@ -658,7 +658,7 @@ WCHAR *ParseMultipartBody(char *src, char *bond) } else if (partData[i].ContType && !_strnicmp(partData[i].ContType,"multipart/",10)) { //Multipart in mulitipart recursive? should be SPAM. Ah well char *bondary=NULL; - if (NULL!=(bondary=ExtractFromContentType(partData[i].ContType,"boundary="))) + if (NULL != (bondary=ExtractFromContentType(partData[i].ContType,"boundary="))) { partData[i].wBody = ParseMultipartBody(partData[i].body,bondary); delete[] bondary; @@ -689,12 +689,12 @@ FailBackRaw: _snprintf(infoline+linesize,sizeof(infoline)-linesize,"; %s",partData[i].ContType); linesize = strlen(infoline); partData[i].ContType=CharSetStr+1; - if (NULL!=(CharSetStr=ExtractFromContentType(partData[i].ContType,"charset="))) { + if (NULL != (CharSetStr=ExtractFromContentType(partData[i].ContType,"charset="))) { _snprintf(infoline+linesize,sizeof(infoline)-linesize,"; %s",CharSetStr); linesize = strlen(infoline); delete[] CharSetStr; } - if (NULL!=(CharSetStr=ExtractFromContentType(partData[i].ContType,"name="))) { + if (NULL != (CharSetStr=ExtractFromContentType(partData[i].ContType,"name="))) { _snprintf(infoline+linesize,sizeof(infoline)-linesize,"; \"%s\"",CharSetStr); linesize = strlen(infoline); delete[] CharSetStr; -- cgit v1.2.3