diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
commit | 78c0815c4118fe24ab78cce2dc48a6232dcd824a (patch) | |
tree | 8512c50df70b8dd80c919e88ade3419207c95956 /plugins/SecureIM/splitmsg.cpp | |
parent | ce816d83a8c75808e0eb06832592bffefe4a8dc4 (diff) |
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SecureIM/splitmsg.cpp')
-rw-r--r-- | plugins/SecureIM/splitmsg.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/SecureIM/splitmsg.cpp b/plugins/SecureIM/splitmsg.cpp index 45c2da17e2..ca4f0635cf 100644 --- a/plugins/SecureIM/splitmsg.cpp +++ b/plugins/SecureIM/splitmsg.cpp @@ -42,7 +42,7 @@ LPSTR combineMessage(pUinKey ptr, LPSTR szMsg) { sscanf(szMsg,"%4X%2X%2X",&msg_id,&part_num,&part_all);
//
pPM ppm = NULL, pm = ptr->msgPart;
- if( !ptr->msgPart ) {
+ if ( !ptr->msgPart ) {
pm = ptr->msgPart = new partitionMessage;
memset(pm,0,sizeof(partitionMessage));
pm->id = msg_id;
@@ -51,10 +51,10 @@ LPSTR combineMessage(pUinKey ptr, LPSTR szMsg) { }
else
while(pm) {
- if( pm->id == msg_id ) break;
+ if ( pm->id == msg_id ) break;
ppm = pm; pm = pm->nextMessage;
}
- if(!pm) { // nothing to found
+ if (!pm) { // nothing to found
pm = ppm->nextMessage = new partitionMessage;
memset(pm,0,sizeof(partitionMessage));
pm->id = msg_id;
@@ -67,14 +67,14 @@ LPSTR combineMessage(pUinKey ptr, LPSTR szMsg) { Sent_NetLog("combine: save part: %s",pm->message[part_num]);
#endif
int len=0,i;
- for( i=0; i<part_all; i++ ){
+ for ( i=0; i<part_all; i++ ) {
if(pm->message[i]==NULL) break;
len+=(int)strlen(pm->message[i]);
}
- if( i==part_all ) { // combine message
+ if ( i==part_all ) { // combine message
SAFE_FREE(ptr->tmp);
ptr->tmp = (LPSTR) mir_alloc(len+1); *(ptr->tmp)='\0';
- for( i=0; i<part_all; i++ ){
+ for ( i=0; i<part_all; i++ ) {
strcat(ptr->tmp,pm->message[i]);
delete pm->message[i];
}
@@ -102,7 +102,7 @@ int splitMessageSend(pUinKey ptr, LPSTR szMsg) { int ret;
int len = (int)strlen(szMsg);
int par = (getContactStatus(ptr->hContact)==ID_STATUS_OFFLINE)?ptr->proto->split_off:ptr->proto->split_on;
- if( par && len>par ) {
+ if ( par && len>par ) {
LPSTR msg = splitMsg(szMsg,par);
LPSTR buf = msg;
while( *buf ) {
|