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/Import/mirabilis.c | 34 +++++++++++++++++----------------- plugins/Import/mirandahistory.c | 4 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'plugins/Import') diff --git a/plugins/Import/mirabilis.c b/plugins/Import/mirabilis.c index 79a07f1546..8d4577acd6 100644 --- a/plugins/Import/mirabilis.c +++ b/plugins/Import/mirabilis.c @@ -245,7 +245,7 @@ static int GetHighestIndexEntry(void) DWORD ofs; ofs=*(PDWORD)(pIdx+12); - for(;;) { + for (;;) { entry=(struct TIdxIndexEntry*)(pIdx+ofs); if(entry->entryIdLow==(DWORD)-2) return ((struct TIdxDatEntry*)entry)->entryId; if(entry->ofsHigher>=0xF0000000) ofs=entry->ofsInHere; @@ -257,7 +257,7 @@ static int GetIdDatOfs(DWORD id) { struct TIdxIndexEntry *entry; DWORD ofs = *(PDWORD)(pIdx+12); - for(;;) { + for (;;) { entry=(struct TIdxIndexEntry*)(pIdx+ofs); if(entry->entryIdLow==(DWORD)-2) { if(entry->entryIdHigh==id) return ((struct TIdxDatEntry*)entry)->datOfs; @@ -390,7 +390,7 @@ DWORD ReadPropertyBlock(DWORD dwOffset, char* SearchWord, int* nSearchResult) if ( SearchWord ) { // Is this the property we are searching for? - if(!lstrcmpA((char*)(pDat+nameOfs),SearchWord)){ + if (!lstrcmpA((char*)(pDat+nameOfs),SearchWord)) { *nSearchResult = 1; return dwOffset; } } @@ -486,10 +486,10 @@ DWORD FindMyDetails(void) DWORD dwOffset = GetIdDatOfs(1005); if (!dwOffset) return 0; - if(*(PDWORD)(pDat+dwOffset+0x08) != 1005) return 0; - if(*(PBYTE)(pDat+dwOffset+0x0C) != 0xE4) return 0; - if(*(int*)(pDat+dwOffset+0x1e) != 'USER') return 0; - if(*(PDWORD)(pDat+dwOffset+0x22) != 6) return 0; + if (*(PDWORD)(pDat+dwOffset+0x08) != 1005) return 0; + if (*(PBYTE)(pDat+dwOffset+0x0C) != 0xE4) return 0; + if (*(int*)(pDat+dwOffset+0x1e) != 'USER') return 0; + if (*(PDWORD)(pDat+dwOffset+0x22) != 6) return 0; return dwOffset; } @@ -528,7 +528,7 @@ DWORD FindGroupList(DWORD dwOffset) dwOffset += 0x04; // ++ UNKNOWN ++ dwPhoneEntries = *(PDWORD)(pDat+dwOffset); // Phonebook starts here dwOffset += 0x04; - for(n = 0;n 1) return 6 + (char*)(pDat + dwOffset); @@ -666,10 +666,10 @@ char* GetGroupName(DWORD dwGroupID) case DBV2000A: case DBV2000B: case DBV2001A: - for (n = 0; n < dwGroups; n++){ - if (tmpOfs = ReadPropertyBlock(dwOffset, "GroupID", &nSearchResult)){ + for (n = 0; n < dwGroups; n++) { + if (tmpOfs = ReadPropertyBlock(dwOffset, "GroupID", &nSearchResult)) { if (nSearchResult) { - if (dwGroupID == *(PDWORD)(pDat + tmpOfs + 1)){ + if (dwGroupID == *(PDWORD)(pDat + tmpOfs + 1)) { strGroupName = 3 + (char*)(pDat + ReadPropertyBlock(dwOffset, "GroupName", &nSearchResult)); if (nSearchResult) { if ((DWORD)*(strGroupName - 2) > 1) @@ -746,7 +746,7 @@ int ImportGroups() switch (nFormat) { case ENTRYV99A: case ENTRYV99B: - for (n = 0; n < dwGroups; n++){ + for (n = 0; n < dwGroups; n++) { if (*(PWORD)(pDat+dwOffset+4) > 1) { if ( CreateGroup(DBVT_ASCIIZ, (char*)(pDat + dwOffset) + 6, NULL )) nImported++; @@ -759,8 +759,8 @@ int ImportGroups() case ENTRYV2001A: case ENTRYV2001B: case ENTRYV2002A: - for (n = 0; n < dwGroups; n++){ - if (tmpOfs = ReadPropertyBlock(dwOffset, "GroupName", &nSearchResult)){ + for (n = 0; n < dwGroups; n++) { + if (tmpOfs = ReadPropertyBlock(dwOffset, "GroupName", &nSearchResult)) { if (nSearchResult) { if (CreateGroup( DBVT_ASCIIZ, (char*)(pDat + tmpOfs + 3), NULL )) nImported++; diff --git a/plugins/Import/mirandahistory.c b/plugins/Import/mirandahistory.c index 232d295f8d..ba7a923df7 100644 --- a/plugins/Import/mirandahistory.c +++ b/plugins/Import/mirandahistory.c @@ -92,7 +92,7 @@ static PBYTE ReadHistoryLines(FILE *fp,int *cbBlob) blob=(char*)realloc(blob,*cbBlob+1); lstrcpy(blob+ofs,str); } - if(*cbBlob) { + if (*cbBlob) { (*cbBlob)--; blob[*cbBlob-1]=0; } @@ -150,7 +150,7 @@ static void OldMirandaHistoryImport(HWND hdlgProgress) tmEventTime.tm_mon=atoi(timeofs+10)-1; tmEventTime.tm_year=atoi(timeofs+13)-1900; dbei.timestamp=mktime(&tmEventTime)+_timezone; - if(!(importOptions&historyTypeToOption[type])) continue; + if (!(importOptions&historyTypeToOption[type])) continue; hContact=HistoryImportFindContact(hdlgProgress,uin,importOptions&IOPT_ADDUNKNOWN); if(hContact==INVALID_HANDLE_VALUE) break; dbei.flags=issent(type)?DBEF_SENT:DBEF_READ; -- cgit v1.2.3