summaryrefslogtreecommitdiff
path: root/src/modules/database
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-06-13 17:26:45 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-06-13 17:26:45 +0000
commit5e686292c537275c8ea1399f311c082d905e8a63 (patch)
tree88a4f3921ff70323775f3329c8820a0fe947d74f /src/modules/database
parent90c154b4be566ec4a804217d0f1e50fb1e259b72 (diff)
code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@398 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/database')
-rw-r--r--src/modules/database/database.cpp8
-rw-r--r--src/modules/database/dbini.cpp12
-rw-r--r--src/modules/database/profilemanager.cpp4
3 files changed, 12 insertions, 12 deletions
diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp
index a2cae1e64b..0ed1001308 100644
--- a/src/modules/database/database.cpp
+++ b/src/modules/database/database.cpp
@@ -140,7 +140,7 @@ static int getProfileCmdLineArgs(TCHAR * szProfile, size_t cch)
TCHAR szThisParam[1024];
int firstParam=1;
- while(szCmdLine[0])
+ while (szCmdLine[0])
{
if (szCmdLine[0] == '"')
{
@@ -155,7 +155,7 @@ static int getProfileCmdLineArgs(TCHAR * szProfile, size_t cch)
lstrcpyn(szThisParam, szCmdLine, min(SIZEOF(szThisParam), szEndOfParam - szCmdLine+1));
szCmdLine = szEndOfParam;
}
- while(*szCmdLine && *szCmdLine<=' ') szCmdLine++;
+ while (*szCmdLine && *szCmdLine<=' ') szCmdLine++;
if (firstParam) { firstParam=0; continue; } //first param is executable name
if (szThisParam[0] == '/' || szThisParam[0] == '-') continue; //no switches supported
@@ -254,7 +254,7 @@ static void moveProfileDirProfiles(TCHAR * profiledir, BOOL isRootDir = TRUE)
}
mir_free(profile);
}
- while(FindNextFile(hFind, &ffd));
+ while (FindNextFile(hFind, &ffd));
}
FindClose(hFind);
}
@@ -488,7 +488,7 @@ static BOOL CALLBACK EnumMirandaWindows(HWND hwnd, LPARAM lParam)
TCHAR classname[256];
ENUMMIRANDAWINDOW * x = (ENUMMIRANDAWINDOW *)lParam;
DWORD_PTR res=0;
- if ( GetClassName(hwnd,classname,SIZEOF(classname)) && lstrcmp( _T("Miranda"),classname)==0 ) {
+ if ( GetClassName(hwnd,classname,SIZEOF(classname)) && lstrcmp( _T("Miranda"),classname) == 0 ) {
if ( SendMessageTimeout(hwnd, x->msg, (WPARAM)x->aPath, 0, SMTO_ABORTIFHUNG, 100, &res) && res ) {
x->found++;
return FALSE;
diff --git a/src/modules/database/dbini.cpp b/src/modules/database/dbini.cpp
index 60a72b71c6..cecbef4dd8 100644
--- a/src/modules/database/dbini.cpp
+++ b/src/modules/database/dbini.cpp
@@ -203,7 +203,7 @@ static void ProcessIniFile(TCHAR* szIniPath, char *szSafeSections, char *szUnsaf
bool warnThisSection = false;
char szSection[128]; szSection[0] = 0;
- while(!feof(fp)) {
+ while (!feof(fp)) {
char szLine[2048];
if (fgets(szLine,sizeof(szLine),fp) == NULL)
break;
@@ -286,7 +286,7 @@ static void ProcessIniFile(TCHAR* szIniPath, char *szSafeSections, char *szUnsaf
warnInfo.szValue=szValue;
warnInfo.warnNoMore=0;
warnInfo.cancel=0;
- if (warnThisSection && IDNO==DialogBoxParam(hMirandaInst,MAKEINTRESOURCE(IDD_WARNINICHANGE),NULL,WarnIniChangeDlgProc,(LPARAM)&warnInfo))
+ if (warnThisSection && IDNO == DialogBoxParam(hMirandaInst,MAKEINTRESOURCE(IDD_WARNINICHANGE),NULL,WarnIniChangeDlgProc,(LPARAM)&warnInfo))
continue;
if (warnInfo.cancel)
break;
@@ -322,7 +322,7 @@ static void ProcessIniFile(TCHAR* szIniPath, char *szSafeSections, char *szUnsaf
case 'G':
{ char *pstr;
for (pstr=szValue+1;*pstr;pstr++) {
- if (*pstr=='\\') {
+ if (*pstr == '\\') {
switch(pstr[1]) {
case 'n': *pstr='\n'; break;
case 't': *pstr='\t'; break;
@@ -347,7 +347,7 @@ static void ProcessIniFile(TCHAR* szIniPath, char *szSafeSections, char *szUnsaf
buf=(PBYTE)mir_alloc(lstrlenA(szValue+1));
for (len=0,pszValue=szValue+1;;len++) {
buf[len]=(BYTE)strtol(pszValue,&pszEnd,0x10);
- if (pszValue==pszEnd) break;
+ if (pszValue == pszEnd) break;
pszValue=pszEnd;
}
cws.szModule=szSection;
@@ -420,8 +420,8 @@ static void DoAutoExec(void)
mir_sntprintf(szIniPath, SIZEOF(szIniPath), _T("%s%s"), szFindPath, fd.cFileName);
if (!lstrcmpi(szUse,_T("prompt")) && !secFN) {
int result=DialogBoxParam(hMirandaInst,MAKEINTRESOURCE(IDD_INSTALLINI),NULL,InstallIniDlgProc,(LPARAM)szIniPath);
- if (result==IDC_NOTOALL) break;
- if (result==IDCANCEL) continue;
+ if (result == IDC_NOTOALL) break;
+ if (result == IDCANCEL) continue;
}
ProcessIniFile(szIniPath, szSafeSections, szUnsafeSections, secur, secFN);
diff --git a/src/modules/database/profilemanager.cpp b/src/modules/database/profilemanager.cpp
index fcb7d246f5..b764a43ff3 100644
--- a/src/modules/database/profilemanager.cpp
+++ b/src/modules/database/profilemanager.cpp
@@ -446,7 +446,7 @@ static INT_PTR CALLBACK DlgProfileSelect(HWND hwndDlg, UINT msg, WPARAM wParam,
if ( wParam )
{
SetWindowText(dat->hwndOK, TranslateT("&Run"));
- EnableWindow(dat->hwndOK, ListView_GetSelectedCount(hwndList)==1);
+ EnableWindow(dat->hwndOK, ListView_GetSelectedCount(hwndList) == 1);
}
break;
@@ -705,7 +705,7 @@ static INT_PTR CALLBACK DlgProfileManager(HWND hwndDlg, UINT msg, WPARAM wParam,
pshn.lParam=0;
pshn.hdr.code=PSN_RESET;
for (i=0;i<dat->pageCount;i++) {
- if (dat->opd[i].hwnd==NULL || !dat->opd[i].changed) continue;
+ if (dat->opd[i].hwnd == NULL || !dat->opd[i].changed) continue;
pshn.hdr.hwndFrom=dat->opd[i].hwnd;
SendMessage(dat->opd[i].hwnd,WM_NOTIFY,0,(LPARAM)&pshn);
}