diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-15 17:08:48 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-15 17:08:48 +0000 |
commit | 2b49f2b34e0e3cbcda608c07e5cb206c9fa01c9a (patch) | |
tree | 7f40603382e8150bacecbea9abbe4d62c9a394ef /src/modules/database | |
parent | 41ca3061eb739eb5f929dbbd1f72e3904cb52d5d (diff) |
core: tabs over spaces
git-svn-id: http://svn.miranda-ng.org/main/trunk@2316 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/database')
-rw-r--r-- | src/modules/database/dbini.cpp | 11 | ||||
-rw-r--r-- | src/modules/database/mdatabasecache.cpp | 13 |
2 files changed, 8 insertions, 16 deletions
diff --git a/src/modules/database/dbini.cpp b/src/modules/database/dbini.cpp index 0ef7b261b4..775352cf99 100644 --- a/src/modules/database/dbini.cpp +++ b/src/modules/database/dbini.cpp @@ -36,10 +36,10 @@ static INT_PTR CALLBACK InstallIniDlgProc(HWND hwndDlg, UINT message, WPARAM wPa TranslateDialogDefault(hwndDlg);
SetDlgItemText(hwndDlg, IDC_ININAME, (TCHAR*)lParam);
{
- TCHAR szSecurity[11];
- const TCHAR *pszSecurityInfo;
-
- GetPrivateProfileString(_T("AutoExec"), _T("Warn"), _T("notsafe"), szSecurity, SIZEOF(szSecurity), mirandabootini);
+ TCHAR szSecurity[11];
+ const TCHAR *pszSecurityInfo;
+
+ GetPrivateProfileString(_T("AutoExec"), _T("Warn"), _T("notsafe"), szSecurity, SIZEOF(szSecurity), mirandabootini);
if ( !lstrcmpi(szSecurity, _T("all")))
pszSecurityInfo = LPGENT("Security systems to prevent malicious changes are in place and you will be warned before every change that is made.");
else if ( !lstrcmpi(szSecurity, _T("onlyunsafe")))
@@ -50,6 +50,7 @@ static INT_PTR CALLBACK InstallIniDlgProc(HWND hwndDlg, UINT message, WPARAM wPa if (pszSecurityInfo) SetDlgItemText(hwndDlg, IDC_SECURITYINFO, TranslateTS(pszSecurityInfo));
}
return TRUE;
+
case WM_COMMAND:
switch(LOWORD(wParam)) {
case IDC_VIEWINI:
@@ -401,7 +402,7 @@ static void DoAutoExec(void) GetPrivateProfileString(_T("AutoExec"), _T("OverrideSecurityFilename"), _T(""), szOverrideSecurityFilename, SIZEOF(szOverrideSecurityFilename), mirandabootini);
GetPrivateProfileString(_T("AutoExec"), _T("OnCreateFilename"), _T(""), szOnCreateFilename, SIZEOF(szOnCreateFilename), mirandabootini);
GetPrivateProfileString(_T("AutoExec"), _T("Glob"), _T("autoexec_*.ini"), szFindPath, SIZEOF(szFindPath), mirandabootini);
-
+
if (dbCreated && szOnCreateFilename[0]) {
str2 = Utils_ReplaceVarsT(szOnCreateFilename);
PathToAbsoluteT(str2, szIniPath, NULL);
diff --git a/src/modules/database/mdatabasecache.cpp b/src/modules/database/mdatabasecache.cpp index 04edbc66c2..91c95ee656 100644 --- a/src/modules/database/mdatabasecache.cpp +++ b/src/modules/database/mdatabasecache.cpp @@ -132,19 +132,10 @@ void MDatabaseCache::SetCachedVariant(DBVARIANT* s /* new */, DBVARIANT* d /* ca d->pszVal = (char*)HeapAlloc(m_hCacheHeap,0,strlen(s->pszVal)+1);
strcpy(d->pszVal,s->pszVal);
}
- else if ( szSave != NULL )
+ else if ( szSave != NULL ) {
HeapFree(m_hCacheHeap,0,szSave);
-
-#ifdef DBLOGGING
- switch( d->type ) {
- case DBVT_BYTE: log1( "set cached byte: %d", d->bVal ); break;
- case DBVT_WORD: log1( "set cached word: %d", d->wVal ); break;
- case DBVT_DWORD: log1( "set cached dword: %d", d->dVal ); break;
- case DBVT_UTF8:
- case DBVT_ASCIIZ: log1( "set cached string: '%s'", d->pszVal ); break;
- default: log1( "set cached crap: %d", d->type ); break;
+ d->pszVal = NULL;
}
-#endif
}
void MDatabaseCache::FreeCachedVariant(DBVARIANT* V)
|