From 06851f5c26bd24c742d13dbbac4c0b19064aba83 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 16 Jan 2015 14:48:00 +0000 Subject: unused files removed from projects git-svn-id: http://svn.miranda-ng.org/main/trunk@11864 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Dbx_mdb/Dbx_mdb_10.vcxproj | 36 ++++----------- plugins/Dbx_mdb/Dbx_mdb_10.vcxproj.filters | 52 ++++++---------------- plugins/Dbx_mdb/Dbx_mdb_12.vcxproj | 2 - plugins/Dbx_mdb/Dbx_mdb_12.vcxproj.filters | 6 --- plugins/Dbx_mdb/src/commonheaders.h | 1 - plugins/Dbx_mdb/src/database.cpp | 58 ------------------------ plugins/Dbx_mdb/src/database.h | 71 ------------------------------ plugins/Dbx_mdb/src/dbevents.cpp | 2 - plugins/Dbx_mdb/src/dbsettings.cpp | 8 +--- plugins/Dbx_mdb/src/lmdb/mdb.c | 1 - 10 files changed, 23 insertions(+), 214 deletions(-) delete mode 100644 plugins/Dbx_mdb/src/database.cpp delete mode 100644 plugins/Dbx_mdb/src/database.h (limited to 'plugins') diff --git a/plugins/Dbx_mdb/Dbx_mdb_10.vcxproj b/plugins/Dbx_mdb/Dbx_mdb_10.vcxproj index ca64db1780..497ca271ce 100644 --- a/plugins/Dbx_mdb/Dbx_mdb_10.vcxproj +++ b/plugins/Dbx_mdb/Dbx_mdb_10.vcxproj @@ -191,41 +191,20 @@ - - - - ..\commonheaders.h + + NotUsing + NotUsing - - ..\commonheaders.h - - - ..\commonheaders.h - - - ..\commonheaders.h - - - ..\commonheaders.h - - - ..\commonheaders.h - - - ..\commonheaders.h - - - ..\commonheaders.h - - - ..\commonheaders.h + + NotUsing + NotUsing Create @@ -235,8 +214,9 @@ - + + diff --git a/plugins/Dbx_mdb/Dbx_mdb_10.vcxproj.filters b/plugins/Dbx_mdb/Dbx_mdb_10.vcxproj.filters index ce3f5306cb..ebf91d5a29 100644 --- a/plugins/Dbx_mdb/Dbx_mdb_10.vcxproj.filters +++ b/plugins/Dbx_mdb/Dbx_mdb_10.vcxproj.filters @@ -13,14 +13,11 @@ {e5e10389-c0d7-4cf8-8442-6714f0d5aff1} ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - {18e1a858-92e5-48e6-98f1-e08f4b562ea8} + + {98bf8a14-03b2-466e-b9fc-564f91ef0ee2} - - Source Files - Source Files @@ -33,9 +30,6 @@ Source Files - - Source Files - Source Files @@ -48,47 +42,23 @@ Source Files - - Source Files\Checker - - - Source Files\Checker - - - Source Files\Checker - - - Source Files\Checker - - - Source Files\Checker - - - Source Files\Checker - - - Source Files\Checker - - - Source Files\Checker - - - Source Files\Checker - Source Files Source Files + + Source Files\lmdb + + + Source Files\lmdb + Header Files - - Header Files - Header Files @@ -98,6 +68,12 @@ Header Files + + Source Files\lmdb + + + Source Files\lmdb + diff --git a/plugins/Dbx_mdb/Dbx_mdb_12.vcxproj b/plugins/Dbx_mdb/Dbx_mdb_12.vcxproj index 60c5538d50..524802fcdc 100644 --- a/plugins/Dbx_mdb/Dbx_mdb_12.vcxproj +++ b/plugins/Dbx_mdb/Dbx_mdb_12.vcxproj @@ -198,7 +198,6 @@ - @@ -225,7 +224,6 @@ - diff --git a/plugins/Dbx_mdb/Dbx_mdb_12.vcxproj.filters b/plugins/Dbx_mdb/Dbx_mdb_12.vcxproj.filters index 101dd06651..4b988cea86 100644 --- a/plugins/Dbx_mdb/Dbx_mdb_12.vcxproj.filters +++ b/plugins/Dbx_mdb/Dbx_mdb_12.vcxproj.filters @@ -18,9 +18,6 @@ - - Source Files - Source Files @@ -59,9 +56,6 @@ Header Files - - Header Files - Header Files diff --git a/plugins/Dbx_mdb/src/commonheaders.h b/plugins/Dbx_mdb/src/commonheaders.h index 3daf109bef..c9f9d4b44d 100644 --- a/plugins/Dbx_mdb/src/commonheaders.h +++ b/plugins/Dbx_mdb/src/commonheaders.h @@ -48,7 +48,6 @@ extern "C" #include "lmdb\lmdb.h" }; -#include "database.h" #include "dbintf.h" #include "resource.h" #include "version.h" diff --git a/plugins/Dbx_mdb/src/database.cpp b/plugins/Dbx_mdb/src/database.cpp deleted file mode 100644 index 5573fe925c..0000000000 --- a/plugins/Dbx_mdb/src/database.cpp +++ /dev/null @@ -1,58 +0,0 @@ -/* - -Miranda NG: the free IM client for Microsoft* Windows* - -Copyright (ñ) 2012-15 Miranda NG project (http://miranda-ng.org) -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - -#include "commonheaders.h" - -///////////////////////////////////////////////////////////////////////////////////////// - -#ifdef DBLOGGING -char* printVariant(DBVARIANT* p) -{ - static char boo[1000]; - - switch (p->type) { - case DBVT_BYTE: mir_snprintf(boo, SIZEOF(boo), "byte: %d", p->bVal ); break; - case DBVT_WORD: mir_snprintf(boo, SIZEOF(boo), "word: %d", p->wVal ); break; - case DBVT_DWORD: mir_snprintf(boo, SIZEOF(boo), "dword: %d", p->dVal ); break; - case DBVT_UTF8: - case DBVT_ASCIIZ: mir_snprintf(boo, SIZEOF(boo), "string: '%s'", p->pszVal); break; - case DBVT_DELETED: strcpy(boo, "deleted"); break; - default: mir_snprintf(boo, SIZEOF(boo), "crap: %d", p->type ); break; - } - return boo; -} - -void DBLog(const char *file,int line,const char *fmt,...) -{ - FILE *fp; - va_list vararg; - char str[1024]; - - va_start(vararg,fmt); - mir_vsnprintf(str,sizeof(str),fmt,vararg); - va_end(vararg); - fp=fopen("c:\\mirandadatabase.log.txt","at"); - fprintf(fp,"%u: %s %d: %s\n",GetTickCount(),file,line,str); - fclose(fp); -} -#endif diff --git a/plugins/Dbx_mdb/src/database.h b/plugins/Dbx_mdb/src/database.h deleted file mode 100644 index 180620e6fd..0000000000 --- a/plugins/Dbx_mdb/src/database.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - -Miranda NG: the free IM client for Microsoft* Windows* - -Copyright (ñ) 2012-15 Miranda NG project (http://miranda-ng.org) -all portions of this codebase are copyrighted to the people -listed in contributors.txt. - -This program is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -*/ - - -//all offsets are relative to the start of the file -//offsets are 0 if there is nothing in the chain or this is the last in the -//chain - -/* tree diagram - -DBHeader -|-->end of file (plain offset) -|-->first contact (DBContact) -| |-->next contact (DBContact) -| | \--> ... -| |-->first settings (DBContactSettings) -| | |-->next settings (DBContactSettings) -| | | \--> ... -| | \-->module name (DBModuleName) -| \-->first/last/firstunread event -|-->user contact (DBContact) -| |-->next contact = NULL -| |-->first settings as above -| \-->first/last/firstunread event as above -\-->first module name (DBModuleName) -\-->next module name (DBModuleName) -\--> ... -*/ - -//#define DBLOGGING - -#ifdef _DEBUG -//#define DBLOGGING -#endif -#ifdef DBLOGGING -char* printVariant(DBVARIANT* p); -void DBLog(const char *file,int line,const char *fmt,...); -#define logg() DBLog(__FILE__,__LINE__,"") -#define log0(s) DBLog(__FILE__,__LINE__,s) -#define log1(s,a) DBLog(__FILE__,__LINE__,s,a) -#define log2(s,a,b) DBLog(__FILE__,__LINE__,s,a,b) -#define log3(s,a,b,c) DBLog(__FILE__,__LINE__,s,a,b,c) -#define log4(s,a,b,c,d) DBLog(__FILE__,__LINE__,s,a,b,c,d) -#else -#define logg() -#define log0(s) -#define log1(s,a) -#define log2(s,a,b) -#define log3(s,a,b,c) -#define log4(s,a,b,c,d) -#endif diff --git a/plugins/Dbx_mdb/src/dbevents.cpp b/plugins/Dbx_mdb/src/dbevents.cpp index dc9638b3dd..6b7085575c 100644 --- a/plugins/Dbx_mdb/src/dbevents.cpp +++ b/plugins/Dbx_mdb/src/dbevents.cpp @@ -81,8 +81,6 @@ STDMETHODIMP_(HANDLE) CDbxMdb::AddEvent(MCONTACT contactID, DBEVENTINFO *dbei) lck.unlock(); - log1("add event @ %08x", ofsNew); - // Notify only in safe mode or on really new events NotifyEventHooks(hEventAddedEvent, contactNotifyID, (LPARAM)-1); diff --git a/plugins/Dbx_mdb/src/dbsettings.cpp b/plugins/Dbx_mdb/src/dbsettings.cpp index 375b973c7e..f8b307936f 100644 --- a/plugins/Dbx_mdb/src/dbsettings.cpp +++ b/plugins/Dbx_mdb/src/dbsettings.cpp @@ -81,7 +81,6 @@ int CDbxMdb::GetContactSettingWorker(MCONTACT contactID, LPCSTR szModule, LPCSTR LBL_Seek: char *szCachedSettingName = m_cache->GetCachedSetting(szModule, szSetting, moduleNameLen, settingNameLen); - log3("get [%08p] %s (%p)", hContact, szCachedSettingName, szCachedSettingName); DBVARIANT *pCachedValue = m_cache->GetCachedValuePtr(contactID, szCachedSettingName, 0); if (pCachedValue != NULL) { @@ -109,7 +108,6 @@ LBL_Seek: } else memcpy(dbv, pCachedValue, sizeof(DBVARIANT)); - log2("get cached %s (%p)", printVariant(dbv), pCachedValue); return (pCachedValue->type == DBVT_DELETED) ? 1 : 0; } @@ -223,10 +221,8 @@ LBL_Seek: /**** add to cache **********************/ if (iType != DBVT_BLOB && iType != DBVT_ENCRYPTED) { DBVARIANT *pCachedValue = m_cache->GetCachedValuePtr(contactID, szCachedSettingName, 1); - if (pCachedValue != NULL) { + if (pCachedValue != NULL) m_cache->SetCachedVariant(dbv, pCachedValue); - log3("set cached [%08p] %s (%p)", hContact, szCachedSettingName, pCachedValue); - } } return 0; @@ -444,7 +440,6 @@ STDMETHODIMP_(BOOL) CDbxMdb::WriteContactSetting(MCONTACT contactID, DBCONTACTWR mir_cslockfull lck(m_csDbAccess); char *szCachedSettingName = m_cache->GetCachedSetting(dbcwWork.szModule, dbcwWork.szSetting, moduleNameLen, settingNameLen); - log3("set [%08p] %s (%p)", hContact, szCachedSettingName, szCachedSettingName); // we don't cache blobs and passwords if (dbcwWork.value.type != DBVT_BLOB && dbcwWork.value.type != DBVT_ENCRYPTED && !bIsEncrypted) { @@ -466,7 +461,6 @@ STDMETHODIMP_(BOOL) CDbxMdb::WriteContactSetting(MCONTACT contactID, DBCONTACTWR } if (szCachedSettingName[-1] != 0) { lck.unlock(); - log2(" set resident as %s (%p)", printVariant(&dbcwWork.value), pCachedValue); NotifyEventHooks(hSettingChangeEvent, contactID, (LPARAM)&dbcwWork); return 0; } diff --git a/plugins/Dbx_mdb/src/lmdb/mdb.c b/plugins/Dbx_mdb/src/lmdb/mdb.c index f7216726f0..2ab6bda0c5 100644 --- a/plugins/Dbx_mdb/src/lmdb/mdb.c +++ b/plugins/Dbx_mdb/src/lmdb/mdb.c @@ -97,7 +97,6 @@ extern int cacheflush(char *addr, int nbytes, int cache); #include #include #include -#include #include #include #include -- cgit v1.2.3