summaryrefslogtreecommitdiff
path: root/plugins/Import
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-02 20:55:18 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-02 20:55:18 +0000
commit78c0815c4118fe24ab78cce2dc48a6232dcd824a (patch)
tree8512c50df70b8dd80c919e88ade3419207c95956 /plugins/Import
parentce816d83a8c75808e0eb06832592bffefe4a8dc4 (diff)
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Import')
-rw-r--r--plugins/Import/mirabilis.c34
-rw-r--r--plugins/Import/mirandahistory.c4
2 files changed, 19 insertions, 19 deletions
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<dwPhoneEntries;n++){
+ for(n = 0;n<dwPhoneEntries;n++) {
dwOffset += *(PWORD)(pDat+dwOffset)+2;
dwOffset += *(PWORD)(pDat+dwOffset)+2;
dwOffset += *(PWORD)(pDat+dwOffset)+2;
@@ -598,7 +598,7 @@ DWORD FindGroupList(DWORD dwOffset)
dwOffset += 0x08;
dwPhoneEntries = *(PDWORD)(pDat+dwOffset); // Phonebook
dwOffset += 0x04;
- for(n = 0;n<dwPhoneEntries;n++){
+ for(n = 0;n<dwPhoneEntries;n++) {
dwOffset += *(PWORD)(pDat+dwOffset)+2;
dwOffset += *(PWORD)(pDat+dwOffset)+2;
dwOffset += *(PWORD)(pDat+dwOffset)+2;
@@ -650,8 +650,8 @@ char* GetGroupName(DWORD dwGroupID)
switch (dwDBVersion) {
case DBV99A:
case DBV99B:
- for (n = 0; n < dwGroups; n++){
- if (dwGroupID == *(PDWORD)(pDat + dwOffset)){
+ for (n = 0; n < dwGroups; n++) {
+ if (dwGroupID == *(PDWORD)(pDat + dwOffset)) {
if (*(PWORD)(pDat + dwOffset + 4) > 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;