diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-26 13:17:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-26 13:17:42 +0000 |
commit | 6956996d9757af785e815de46688ba2a6fb5f8ed (patch) | |
tree | 59903ce84aa1ae87391ca1219b46269ebaf7ef9c /plugins | |
parent | 0a364d9de8f9d8a161728b7d76777519993a3dc2 (diff) |
db3x converted into a stub that cannot load anything
git-svn-id: http://svn.miranda-ng.org/main/trunk@7901 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/!Deprecated/Db3x/db3x_10.vcxproj.filters | 110 | ||||
-rw-r--r-- | plugins/!Deprecated/Db3x/db3x_11.vcxproj.filters | 110 | ||||
-rw-r--r-- | plugins/!Deprecated/Db3x/db3x_12.vcxproj.filters | 110 | ||||
-rw-r--r-- | plugins/!Deprecated/Db3x/src/dbcache3x.cpp | 199 | ||||
-rw-r--r-- | plugins/!Deprecated/Db3x/src/dbintf3x.cpp | 77 | ||||
-rw-r--r-- | plugins/!Deprecated/Db3x/src/dbintf3x.h | 74 | ||||
-rw-r--r-- | plugins/Db3x/db3x_10.vcxproj (renamed from plugins/!Deprecated/Db3x/db3x_10.vcxproj) | 38 | ||||
-rw-r--r-- | plugins/Db3x/db3x_10.vcxproj.filters | 44 | ||||
-rw-r--r-- | plugins/Db3x/db3x_11.vcxproj (renamed from plugins/!Deprecated/Db3x/db3x_11.vcxproj) | 38 | ||||
-rw-r--r-- | plugins/Db3x/db3x_11.vcxproj.filters | 44 | ||||
-rw-r--r-- | plugins/Db3x/db3x_12.vcxproj (renamed from plugins/!Deprecated/Db3x/db3x_12.vcxproj) | 38 | ||||
-rw-r--r-- | plugins/Db3x/db3x_12.vcxproj.filters | 44 | ||||
-rw-r--r-- | plugins/Db3x/docs/db3x-license.txt (renamed from plugins/!Deprecated/Db3x/docs/db3x-license.txt) | 0 | ||||
-rw-r--r-- | plugins/Db3x/docs/db3x-readme.txt (renamed from plugins/!Deprecated/Db3x/docs/db3x-readme.txt) | 0 | ||||
-rw-r--r-- | plugins/Db3x/res/resource.rc (renamed from plugins/!Deprecated/Db3x/res/resource.rc) | 0 | ||||
-rw-r--r-- | plugins/Db3x/res/version.rc (renamed from plugins/!Deprecated/Db3x/res/version.rc) | 0 | ||||
-rw-r--r-- | plugins/Db3x/src/commonheaders.h (renamed from plugins/!Deprecated/Db3x/src/commonheaders.h) | 15 | ||||
-rw-r--r-- | plugins/Db3x/src/init.cpp (renamed from plugins/!Deprecated/Db3x/src/init.cpp) | 43 | ||||
-rw-r--r-- | plugins/Db3x/src/resource.h (renamed from plugins/!Deprecated/Db3x/src/resource.h) | 0 | ||||
-rw-r--r-- | plugins/Db3x/src/stdafx.cpp (renamed from plugins/!Deprecated/Db3x/src/stdafx.cpp) | 0 | ||||
-rw-r--r-- | plugins/Db3x/src/version.h (renamed from plugins/!Deprecated/Db3x/src/version.h) | 0 |
21 files changed, 138 insertions, 846 deletions
diff --git a/plugins/!Deprecated/Db3x/db3x_10.vcxproj.filters b/plugins/!Deprecated/Db3x/db3x_10.vcxproj.filters deleted file mode 100644 index 16623c0627..0000000000 --- a/plugins/!Deprecated/Db3x/db3x_10.vcxproj.filters +++ /dev/null @@ -1,110 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{0102a88b-21e4-49ca-a6fd-fe4978f36faf}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{ec7c1ebb-62dd-4af2-b531-4d1a46abc680}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{fbaceae7-3e4a-4853-96f3-eec77981b2c9}</UniqueIdentifier>
- <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
- </Filter>
- <Filter Include="Mmap">
- <UniqueIdentifier>{640c5715-0e22-4240-8520-f7dedfc9fb87}</UniqueIdentifier>
- </Filter>
- <Filter Include="Mmap\Checker">
- <UniqueIdentifier>{1603e383-8555-4ad2-b245-83442f3c44ee}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="src\init.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\dbintf3x.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\database.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="src\dbcache3x.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbcontacts.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbevents.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbheaders.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbintf.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbmodulechain.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbsettings.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\aggressive.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\user.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\contactchain.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\disk.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\eventchain.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\finaltasks.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\initialchecks.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\modulechain.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\settingschain.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="src\stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="src\commonheaders.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\dbintf3x.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Db3x_mmap\src\dbintf.h">
- <Filter>Mmap</Filter>
- </ClInclude>
- <ClInclude Include="src\resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\version.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="res\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="res\version.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/plugins/!Deprecated/Db3x/db3x_11.vcxproj.filters b/plugins/!Deprecated/Db3x/db3x_11.vcxproj.filters deleted file mode 100644 index 16623c0627..0000000000 --- a/plugins/!Deprecated/Db3x/db3x_11.vcxproj.filters +++ /dev/null @@ -1,110 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{0102a88b-21e4-49ca-a6fd-fe4978f36faf}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{ec7c1ebb-62dd-4af2-b531-4d1a46abc680}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{fbaceae7-3e4a-4853-96f3-eec77981b2c9}</UniqueIdentifier>
- <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
- </Filter>
- <Filter Include="Mmap">
- <UniqueIdentifier>{640c5715-0e22-4240-8520-f7dedfc9fb87}</UniqueIdentifier>
- </Filter>
- <Filter Include="Mmap\Checker">
- <UniqueIdentifier>{1603e383-8555-4ad2-b245-83442f3c44ee}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="src\init.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\dbintf3x.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\database.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="src\dbcache3x.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbcontacts.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbevents.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbheaders.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbintf.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbmodulechain.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbsettings.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\aggressive.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\user.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\contactchain.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\disk.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\eventchain.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\finaltasks.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\initialchecks.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\modulechain.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\settingschain.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="src\stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="src\commonheaders.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\dbintf3x.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Db3x_mmap\src\dbintf.h">
- <Filter>Mmap</Filter>
- </ClInclude>
- <ClInclude Include="src\resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\version.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="res\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="res\version.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/plugins/!Deprecated/Db3x/db3x_12.vcxproj.filters b/plugins/!Deprecated/Db3x/db3x_12.vcxproj.filters deleted file mode 100644 index 16623c0627..0000000000 --- a/plugins/!Deprecated/Db3x/db3x_12.vcxproj.filters +++ /dev/null @@ -1,110 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <Filter Include="Source Files">
- <UniqueIdentifier>{0102a88b-21e4-49ca-a6fd-fe4978f36faf}</UniqueIdentifier>
- <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
- </Filter>
- <Filter Include="Header Files">
- <UniqueIdentifier>{ec7c1ebb-62dd-4af2-b531-4d1a46abc680}</UniqueIdentifier>
- <Extensions>h;hpp;hxx;hm;inl</Extensions>
- </Filter>
- <Filter Include="Resource Files">
- <UniqueIdentifier>{fbaceae7-3e4a-4853-96f3-eec77981b2c9}</UniqueIdentifier>
- <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
- </Filter>
- <Filter Include="Mmap">
- <UniqueIdentifier>{640c5715-0e22-4240-8520-f7dedfc9fb87}</UniqueIdentifier>
- </Filter>
- <Filter Include="Mmap\Checker">
- <UniqueIdentifier>{1603e383-8555-4ad2-b245-83442f3c44ee}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="src\init.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="src\dbintf3x.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\database.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="src\dbcache3x.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbcontacts.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbevents.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbheaders.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbintf.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbmodulechain.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbsettings.cpp">
- <Filter>Mmap</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\aggressive.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\user.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\contactchain.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\disk.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\eventchain.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\finaltasks.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\initialchecks.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\modulechain.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\settingschain.cpp">
- <Filter>Mmap\Checker</Filter>
- </ClCompile>
- <ClCompile Include="src\stdafx.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
- </ItemGroup>
- <ItemGroup>
- <ClInclude Include="src\commonheaders.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\dbintf3x.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="..\Db3x_mmap\src\dbintf.h">
- <Filter>Mmap</Filter>
- </ClInclude>
- <ClInclude Include="src\resource.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- <ClInclude Include="src\version.h">
- <Filter>Header Files</Filter>
- </ClInclude>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="res\resource.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- <ResourceCompile Include="res\version.rc">
- <Filter>Resource Files</Filter>
- </ResourceCompile>
- </ItemGroup>
-</Project>
\ No newline at end of file diff --git a/plugins/!Deprecated/Db3x/src/dbcache3x.cpp b/plugins/!Deprecated/Db3x/src/dbcache3x.cpp deleted file mode 100644 index aeebdf033d..0000000000 --- a/plugins/!Deprecated/Db3x/src/dbcache3x.cpp +++ /dev/null @@ -1,199 +0,0 @@ -/*
-
-Miranda NG: the free IM client for Microsoft* Windows*
-
-Copyright (c) 2012-14 Miranda NG project (http://miranda-ng.org)
-Copyright (ñ) 2000-03 Miranda ICQ/IM project,
-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"
-
-int CDb3x::FindSectionForOffset(const DWORD ofs)
-{
- for (int i = 0; i < CACHESECTIONCOUNT; i++)
- if (ofs >= cacheSectionInfo[i].ofsBase && ofs<cacheSectionInfo[i].ofsBase + CACHESECTIONSIZE)
- return i;
- return -1;
-}
-
-int CDb3x::FindLRUSection(void)
-{
- int lru = 0;
- DWORD lowestLastUse = cacheSectionInfo[0].lastUsed;
- for (int i = 1; i < CACHESECTIONCOUNT; i++)
- if (cacheSectionInfo[i].lastUsed < lowestLastUse) {
- lru = i;
- lowestLastUse = cacheSectionInfo[i].lastUsed;
- }
- return lru;
-}
-
-void CDb3x::LoadSection(const int i,DWORD ofs)
-{
- cacheSectionInfo[i].ofsBase = ofs - ofs%CACHESECTIONSIZE;
- log1("readsect %08x",ofs);
- SetFilePointer(m_hDbFile,cacheSectionInfo[i].ofsBase,NULL,FILE_BEGIN);
- ReadFile(m_hDbFile,m_pDbCache+i*CACHESECTIONSIZE,CACHESECTIONSIZE,&ofs,NULL);
-}
-
-void CDb3x::MoveSection(int *sectId,int dest)
-{
- CopyMemory(m_pDbCache+dest*CACHESECTIONSIZE,m_pDbCache+(*sectId)*CACHESECTIONSIZE,CACHESECTIONSIZE);
- cacheSectionInfo[dest].ofsBase = cacheSectionInfo[*sectId].ofsBase;
- *sectId = dest;
-}
-
-//we are assumed to be in a mutex here
-PBYTE CDb3x::DBRead(DWORD ofs,int bytesRequired,int *bytesAvail)
-{
- int part1sect = FindSectionForOffset(ofs);
- if (ofs%CACHESECTIONSIZE+bytesRequired<CACHESECTIONSIZE) {
- //only one section required
- if (part1sect == -1) {
- part1sect = FindLRUSection();
- LoadSection(part1sect,ofs);
- }
- cacheSectionInfo[part1sect].lastUsed = ++m_lastUseCounter;
- if (bytesAvail!= NULL) *bytesAvail = cacheSectionInfo[part1sect].ofsBase+CACHESECTIONSIZE-ofs;
- return m_pDbCache+part1sect*CACHESECTIONSIZE+(ofs-cacheSectionInfo[part1sect].ofsBase);
- }
- //two sections are required
- int part2sect = FindSectionForOffset(ofs+CACHESECTIONSIZE);
- if (part1sect != -1) {
- if (part2sect == -1) { //first part in cache, but not second part
- if (part1sect == CACHESECTIONCOUNT-1) MoveSection(&part1sect,0);
- LoadSection(part1sect+1,ofs+CACHESECTIONSIZE);
- }
- else if (part2sect!= part1sect+1) { //both parts are in cache, but not already consecutive
- if (part1sect == CACHESECTIONCOUNT-1) {
- //first part is at end, move to before second part
- if (part2sect == 0) //second part is at start: need to move both
- MoveSection(&part2sect,1);
- MoveSection(&part1sect,part2sect-1);
- }
- else //move second part to after first part
- MoveSection(&part2sect,part1sect+1);
- }
- }
- else {
- if (part2sect == -1) { //neither section is in cache
- part1sect = 0; part2sect = 1;
- LoadSection(part1sect,ofs); LoadSection(part2sect,ofs+CACHESECTIONSIZE);
- }
- else { //part 2 is in cache, but not part 1
- if (part2sect == 0) MoveSection(&part2sect,1);
- part1sect = part2sect-1;
- LoadSection(part1sect,ofs);
- }
- }
-
- //both sections are now consecutive, starting at part1sect
- cacheSectionInfo[part1sect].lastUsed = ++m_lastUseCounter;
- cacheSectionInfo[part1sect+1].lastUsed = ++m_lastUseCounter;
- if (bytesAvail!= NULL)
- *bytesAvail = cacheSectionInfo[part1sect+1].ofsBase+CACHESECTIONSIZE-ofs;
- return m_pDbCache+part1sect*CACHESECTIONSIZE+(ofs-cacheSectionInfo[part1sect].ofsBase);
-}
-
-//we are assumed to be in a mutex here
-void CDb3x::DBWrite(DWORD ofs,PVOID pData,int bytes)
-{
- //write direct, and rely on Windows' write caching
- log2("write %d@%08x", bytes, ofs);
- SetFilePointer(m_hDbFile, ofs, NULL, FILE_BEGIN);
-
- DWORD bytesWritten;
- if ( WriteFile(m_hDbFile, pData, bytes, &bytesWritten, NULL) == 0)
- DatabaseCorruption( _T("%s (Write error)"));
-
- logg();
-
- //check if any of the cache sections contain this bit
- for(int i = 0; i < CACHESECTIONCOUNT; i++) {
- if (ofs+bytes >= cacheSectionInfo[i].ofsBase && ofs<cacheSectionInfo[i].ofsBase+CACHESECTIONSIZE) {
- if (ofs<cacheSectionInfo[i].ofsBase) { //don't start at beginning
- if (ofs+bytes >= cacheSectionInfo[i].ofsBase+CACHESECTIONSIZE) //don't finish at end
- CopyMemory(m_pDbCache+i*CACHESECTIONSIZE,(PBYTE)pData+cacheSectionInfo[i].ofsBase-ofs,CACHESECTIONSIZE);
- else CopyMemory(m_pDbCache+i*CACHESECTIONSIZE,(PBYTE)pData+cacheSectionInfo[i].ofsBase-ofs,bytes-(cacheSectionInfo[i].ofsBase-ofs));
- }
- else { //start at beginning
- if (ofs+bytes >= cacheSectionInfo[i].ofsBase+CACHESECTIONSIZE) //don't finish at end
- CopyMemory(m_pDbCache+i*CACHESECTIONSIZE+ofs-cacheSectionInfo[i].ofsBase,pData,cacheSectionInfo[i].ofsBase+CACHESECTIONSIZE-ofs);
- else CopyMemory(m_pDbCache+i*CACHESECTIONSIZE+ofs-cacheSectionInfo[i].ofsBase,pData,bytes);
- }
- }
- }
-}
-
-void CDb3x::DBMoveChunk(DWORD ofsDest,DWORD ofsSource,int bytes)
-{
- DWORD bytesRead;
- PBYTE buf;
-
- log3("move %d %08x->%08x",bytes,ofsSource,ofsDest);
- buf = (PBYTE)mir_alloc(bytes);
- SetFilePointer(m_hDbFile,ofsSource,NULL,FILE_BEGIN);
- ReadFile(m_hDbFile,buf,bytes,&bytesRead,NULL);
- DBWrite(ofsDest,buf,bytes);
- mir_free(buf);
- logg();
-}
-
-static VOID CALLBACK DoBufferFlushTimerProc(HWND hwnd,UINT message,UINT_PTR idEvent,DWORD dwTime)
-{
- for (int i=0; i < g_Dbs.getCount(); i++) {
- CDb3x* db = g_Dbs[i];
-
- KillTimer(NULL, db->m_flushBuffersTimerId);
- log0("tflush1");
- FlushFileBuffers(db->getFile());
- log0("tflush2");
- }
-}
-
-void CDb3x::DBFlush(int setting)
-{
- if (!setting) {
- log0("nflush1");
- if (m_safetyMode) FlushFileBuffers(m_hDbFile);
- log0("nflush2");
- return;
- }
- KillTimer(NULL,m_flushBuffersTimerId);
- m_flushBuffersTimerId = SetTimer(NULL,m_flushBuffersTimerId,50,DoBufferFlushTimerProc);
-}
-
-void CDb3x::DBFill(DWORD ofs,int bytes)
-{
-}
-
-int CDb3x::InitCache(void)
-{
- m_pDbCache = (PBYTE)mir_alloc(CACHESECTIONSIZE*CACHESECTIONCOUNT);
- m_lastUseCounter = CACHESECTIONCOUNT;
- for(int i = 0; i < CACHESECTIONCOUNT; i++) {
- cacheSectionInfo[i].ofsBase = 0;
- cacheSectionInfo[i].lastUsed = i;
- SetFilePointer(m_hDbFile,cacheSectionInfo[i].ofsBase,NULL,FILE_BEGIN);
-
- DWORD bytesRead;
- ReadFile(m_hDbFile,m_pDbCache+i*CACHESECTIONSIZE,CACHESECTIONSIZE,&bytesRead,NULL);
- }
- return 0;
-}
diff --git a/plugins/!Deprecated/Db3x/src/dbintf3x.cpp b/plugins/!Deprecated/Db3x/src/dbintf3x.cpp deleted file mode 100644 index c1b629599d..0000000000 --- a/plugins/!Deprecated/Db3x/src/dbintf3x.cpp +++ /dev/null @@ -1,77 +0,0 @@ -/*
-
-Miranda NG: the free IM client for Microsoft* Windows*
-
-Copyright 2012-14 Miranda NG project,
-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"
-
-extern BOOL safetyMode;
-
-CDb3x::CDb3x(const TCHAR* tszFileName) :
- CDb3Base(tszFileName)
-{
-}
-
-CDb3x::~CDb3x()
-{
- if (m_pDbCache) {
- mir_free(m_pDbCache);
- KillTimer(NULL,m_flushBuffersTimerId);
- }
-}
-
-///////////////////////////////////////////////////////////////////////////////
-
-//this function caches results
-DWORD CDb3x::GetSettingsGroupOfsByModuleNameOfs(DBContact *dbc,DWORD ofsContact,DWORD ofsModuleName)
-{
- DBContactSettings *dbcs;
- DWORD ofsThis;
-
- for ( int i=0; i < SETTINGSGROUPOFSCOUNT; i++)
- if (settingsGroupOfsCache[i].ofsContact == ofsContact && settingsGroupOfsCache[i].ofsModuleName == ofsModuleName)
- return settingsGroupOfsCache[i].ofsSettingsGroup;
-
- ofsThis = dbc->ofsFirstSettings;
- while(ofsThis) {
- dbcs = (struct DBContactSettings*)DBRead(ofsThis,sizeof(struct DBContactSettings),NULL);
- if (dbcs->signature != DBCONTACTSETTINGS_SIGNATURE) DatabaseCorruption( _T("Invalid database module"));
- if (dbcs->ofsModuleName == ofsModuleName) {
- settingsGroupOfsCache[nextSGOCacheEntry].ofsContact = ofsContact;
- settingsGroupOfsCache[nextSGOCacheEntry].ofsModuleName = ofsModuleName;
- settingsGroupOfsCache[nextSGOCacheEntry].ofsSettingsGroup = ofsThis;
- if (++nextSGOCacheEntry==SETTINGSGROUPOFSCOUNT) nextSGOCacheEntry = 0;
- return ofsThis;
- }
- ofsThis = dbcs->ofsNext;
- }
- return 0;
-}
-
-void CDb3x::InvalidateSettingsGroupOfsCacheEntry(DWORD ofsSettingsGroup)
-{
- for (int i=0; i < SETTINGSGROUPOFSCOUNT; i++) {
- if (settingsGroupOfsCache[i].ofsSettingsGroup == ofsSettingsGroup) {
- settingsGroupOfsCache[i].ofsContact = 0;
- settingsGroupOfsCache[i].ofsModuleName = 0;
- settingsGroupOfsCache[i].ofsSettingsGroup = 0;
- break;
-} } }
diff --git a/plugins/!Deprecated/Db3x/src/dbintf3x.h b/plugins/!Deprecated/Db3x/src/dbintf3x.h deleted file mode 100644 index caf5ecf9d5..0000000000 --- a/plugins/!Deprecated/Db3x/src/dbintf3x.h +++ /dev/null @@ -1,74 +0,0 @@ -/*
-
-Miranda NG: the free IM client for Microsoft* Windows*
-
-Copyright 2012-14 Miranda NG project,
-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 <m_db_int.h>
-
-#include "..\..\Db3x_mmap\src\database.h"
-#include "..\..\Db3x_mmap\src\dbintf.h"
-
-#define CACHESECTIONSIZE 4096
-#define CACHESECTIONCOUNT 32
-
-#define SETTINGSGROUPOFSCOUNT 32
-
-struct CDb3x : public CDb3Base
-{
- CDb3x(const TCHAR* tszFileName);
- ~CDb3x();
-
- __inline HANDLE getFile() const { return m_hDbFile; }
-
-protected:
- virtual DWORD GetSettingsGroupOfsByModuleNameOfs(DBContact *dbc,DWORD ofsContact,DWORD ofsModuleName);
- virtual void InvalidateSettingsGroupOfsCacheEntry(DWORD ofsSettingsGroup);
-
- virtual void DBMoveChunk(DWORD ofsDest, DWORD ofsSource, int bytes);
- virtual PBYTE DBRead(DWORD ofs, int bytesRequired, int *bytesAvail);
- virtual void DBWrite(DWORD ofs, PVOID pData, int bytes);
- virtual void DBFill(DWORD ofs, int bytes);
- virtual void DBFlush(int setting);
- virtual int InitCache(void);
-
- PBYTE m_pDbCache;
- DWORD m_lastUseCounter;
-
- struct DBCacheSectionInfo
- {
- DWORD ofsBase;
- DWORD lastUsed;
- }
- cacheSectionInfo[CACHESECTIONCOUNT];
-
- int nextSGOCacheEntry;
- struct SettingsGroupOfsCacheEntry {
- DWORD ofsContact;
- DWORD ofsModuleName;
- DWORD ofsSettingsGroup;
- }
- settingsGroupOfsCache[SETTINGSGROUPOFSCOUNT];
-
- int FindSectionForOffset(const DWORD ofs);
- int FindLRUSection(void);
- void LoadSection(const int i,DWORD ofs);
- void MoveSection(int *sectId,int dest);
-};
diff --git a/plugins/!Deprecated/Db3x/db3x_10.vcxproj b/plugins/Db3x/db3x_10.vcxproj index 9f716c8e12..8fa400f16f 100644 --- a/plugins/!Deprecated/Db3x/db3x_10.vcxproj +++ b/plugins/Db3x/db3x_10.vcxproj @@ -191,51 +191,13 @@ </Link>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="..\db3x_mmap\src\database.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbcontacts.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbevents.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbheaders.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbintf.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbmodulechain.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbsettings.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbtool\aggressive.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\contactchain.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\disk.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\eventchain.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\finaltasks.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\initialchecks.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\modulechain.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\settingschain.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\user.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="src\dbcache3x.cpp" />
- <ClCompile Include="src\dbintf3x.cpp" />
<ClCompile Include="src\stdafx.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\init.cpp" />
</ItemGroup>
<ItemGroup>
- <ClInclude Include="..\Db3x_mmap\src\dbintf.h" />
<ClInclude Include="src\commonheaders.h" />
- <ClInclude Include="src\dbintf3x.h" />
<ClInclude Include="src\resource.h" />
<ClInclude Include="src\version.h" />
</ItemGroup>
diff --git a/plugins/Db3x/db3x_10.vcxproj.filters b/plugins/Db3x/db3x_10.vcxproj.filters new file mode 100644 index 0000000000..76f25b1fb5 --- /dev/null +++ b/plugins/Db3x/db3x_10.vcxproj.filters @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{0102a88b-21e4-49ca-a6fd-fe4978f36faf}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{ec7c1ebb-62dd-4af2-b531-4d1a46abc680}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{fbaceae7-3e4a-4853-96f3-eec77981b2c9}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\init.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="src\commonheaders.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\resource.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="res\version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/plugins/!Deprecated/Db3x/db3x_11.vcxproj b/plugins/Db3x/db3x_11.vcxproj index 9178255941..bcc405fe59 100644 --- a/plugins/!Deprecated/Db3x/db3x_11.vcxproj +++ b/plugins/Db3x/db3x_11.vcxproj @@ -194,51 +194,13 @@ </Link>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="..\db3x_mmap\src\database.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbcontacts.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbevents.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbheaders.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbintf.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbmodulechain.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbsettings.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbtool\aggressive.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\contactchain.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\disk.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\eventchain.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\finaltasks.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\initialchecks.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\modulechain.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\settingschain.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\user.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="src\dbcache3x.cpp" />
- <ClCompile Include="src\dbintf3x.cpp" />
<ClCompile Include="src\stdafx.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\init.cpp" />
</ItemGroup>
<ItemGroup>
- <ClInclude Include="..\Db3x_mmap\src\dbintf.h" />
<ClInclude Include="src\commonheaders.h" />
- <ClInclude Include="src\dbintf3x.h" />
<ClInclude Include="src\resource.h" />
<ClInclude Include="src\version.h" />
</ItemGroup>
diff --git a/plugins/Db3x/db3x_11.vcxproj.filters b/plugins/Db3x/db3x_11.vcxproj.filters new file mode 100644 index 0000000000..76f25b1fb5 --- /dev/null +++ b/plugins/Db3x/db3x_11.vcxproj.filters @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{0102a88b-21e4-49ca-a6fd-fe4978f36faf}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{ec7c1ebb-62dd-4af2-b531-4d1a46abc680}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{fbaceae7-3e4a-4853-96f3-eec77981b2c9}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\init.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="src\commonheaders.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\resource.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="res\version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/plugins/!Deprecated/Db3x/db3x_12.vcxproj b/plugins/Db3x/db3x_12.vcxproj index e3e5c84aab..2774d95441 100644 --- a/plugins/!Deprecated/Db3x/db3x_12.vcxproj +++ b/plugins/Db3x/db3x_12.vcxproj @@ -194,51 +194,13 @@ </Link>
</ItemDefinitionGroup>
<ItemGroup>
- <ClCompile Include="..\db3x_mmap\src\database.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbcontacts.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbevents.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbheaders.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbintf.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbmodulechain.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbsettings.cpp" />
- <ClCompile Include="..\db3x_mmap\src\dbtool\aggressive.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\contactchain.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\disk.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\eventchain.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\finaltasks.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\initialchecks.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\modulechain.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\settingschain.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="..\db3x_mmap\src\dbtool\user.cpp">
- <PrecompiledHeaderFile>..\commonheaders.h</PrecompiledHeaderFile>
- </ClCompile>
- <ClCompile Include="src\dbcache3x.cpp" />
- <ClCompile Include="src\dbintf3x.cpp" />
<ClCompile Include="src\stdafx.cpp">
<PrecompiledHeader>Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="src\init.cpp" />
</ItemGroup>
<ItemGroup>
- <ClInclude Include="..\Db3x_mmap\src\dbintf.h" />
<ClInclude Include="src\commonheaders.h" />
- <ClInclude Include="src\dbintf3x.h" />
<ClInclude Include="src\resource.h" />
<ClInclude Include="src\version.h" />
</ItemGroup>
diff --git a/plugins/Db3x/db3x_12.vcxproj.filters b/plugins/Db3x/db3x_12.vcxproj.filters new file mode 100644 index 0000000000..76f25b1fb5 --- /dev/null +++ b/plugins/Db3x/db3x_12.vcxproj.filters @@ -0,0 +1,44 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{0102a88b-21e4-49ca-a6fd-fe4978f36faf}</UniqueIdentifier>
+ <Extensions>cpp;c;cxx;rc;def;r;odl;idl;hpj;bat</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{ec7c1ebb-62dd-4af2-b531-4d1a46abc680}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{fbaceae7-3e4a-4853-96f3-eec77981b2c9}</UniqueIdentifier>
+ <Extensions>ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="src\init.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="src\stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="src\commonheaders.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\resource.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="src\version.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ResourceCompile Include="res\resource.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ <ResourceCompile Include="res\version.rc">
+ <Filter>Resource Files</Filter>
+ </ResourceCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/plugins/!Deprecated/Db3x/docs/db3x-license.txt b/plugins/Db3x/docs/db3x-license.txt index 7f1161073d..7f1161073d 100644 --- a/plugins/!Deprecated/Db3x/docs/db3x-license.txt +++ b/plugins/Db3x/docs/db3x-license.txt diff --git a/plugins/!Deprecated/Db3x/docs/db3x-readme.txt b/plugins/Db3x/docs/db3x-readme.txt index eb5707c048..eb5707c048 100644 --- a/plugins/!Deprecated/Db3x/docs/db3x-readme.txt +++ b/plugins/Db3x/docs/db3x-readme.txt diff --git a/plugins/!Deprecated/Db3x/res/resource.rc b/plugins/Db3x/res/resource.rc index 56028072ca..56028072ca 100644 --- a/plugins/!Deprecated/Db3x/res/resource.rc +++ b/plugins/Db3x/res/resource.rc diff --git a/plugins/!Deprecated/Db3x/res/version.rc b/plugins/Db3x/res/version.rc index 5bfbab4754..5bfbab4754 100644 --- a/plugins/!Deprecated/Db3x/res/version.rc +++ b/plugins/Db3x/res/version.rc diff --git a/plugins/!Deprecated/Db3x/src/commonheaders.h b/plugins/Db3x/src/commonheaders.h index b97a18157f..ab716c9d7d 100644 --- a/plugins/!Deprecated/Db3x/src/commonheaders.h +++ b/plugins/Db3x/src/commonheaders.h @@ -35,20 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <m_system_cpp.h>
#include <m_database.h>
#include <m_langpack.h>
+#include <m_db_int.h>
#include "version.h"
-#include "dbintf3x.h"
#include "resource.h"
-
-#ifdef __GNUC__
-#define mir_i64(x) (x##LL)
-#else
-#define mir_i64(x) (x##i64)
-#endif
-
-#ifndef MODULAR
-void Encrypt(char*msg,BOOL up);
-#endif
-
-extern LIST<CDb3x> g_Dbs;
-extern DBSignature dbSignature;
\ No newline at end of file diff --git a/plugins/!Deprecated/Db3x/src/init.cpp b/plugins/Db3x/src/init.cpp index e3a01ab40d..da52a4681c 100644 --- a/plugins/!Deprecated/Db3x/src/init.cpp +++ b/plugins/Db3x/src/init.cpp @@ -42,67 +42,35 @@ static PLUGININFOEX pluginInfo = HINSTANCE g_hInst = NULL;
-LIST<CDb3x> g_Dbs(1, HandleKeySortT);
-
/////////////////////////////////////////////////////////////////////////////////////////
// returns 0 if the profile is created, EMKPRF*
static int makeDatabase(const TCHAR *profile)
{
- std::auto_ptr<CDb3x> db(new CDb3x(profile));
- if (db->Create() != ERROR_SUCCESS)
- return EMKPRF_CREATEFAILED;
-
- return db->CreateDbHeaders(dbSignature);
+ return EMKPRF_CREATEFAILED;
}
// returns 0 if the given profile has a valid header
static int grokHeader(const TCHAR *profile)
{
- std::auto_ptr<CDb3x> db(new CDb3x(profile));
- if (db->Load(true) != ERROR_SUCCESS)
- return EGROKPRF_CANTREAD;
-
- return db->CheckDbHeaders();
+ return EGROKPRF_CANTREAD;
}
// returns 0 if all the APIs are injected otherwise, 1
static MIDatabase* LoadDatabase(const TCHAR *profile)
{
- // set the memory, lists & UTF8 manager
- mir_getLP( &pluginInfo );
-
- std::auto_ptr<CDb3x> db(new CDb3x(profile));
- if (db->Load(false) != ERROR_SUCCESS)
- return NULL;
-
- g_Dbs.insert(db.get());
- return db.release();
+ return NULL;
}
static int UnloadDatabase(MIDatabase* db)
{
- g_Dbs.remove((CDb3x*)db);
- delete (CDb3x*)db;
return 0;
}
MIDatabaseChecker* CheckDb(const TCHAR* profile, int *error)
{
- std::auto_ptr<CDb3x> db(new CDb3x(profile));
- if (db->Load(true) != ERROR_SUCCESS) {
- if (error != NULL) *error = EGROKPRF_CANTREAD;
- return NULL;
- }
-
- int chk = db->CheckDbHeaders();
- if (chk != ERROR_SUCCESS) {
- *error = chk;
- return NULL;
- }
-
- *error = 0;
- return db.release();
+ if (error != NULL) *error = EGROKPRF_CANTREAD;
+ return NULL;
}
static DATABASELINK dblink =
@@ -134,7 +102,6 @@ extern "C" __declspec(dllexport) int Load(void) extern "C" __declspec(dllexport) int Unload(void)
{
- g_Dbs.destroy();
return 0;
}
diff --git a/plugins/!Deprecated/Db3x/src/resource.h b/plugins/Db3x/src/resource.h index 96abbfff99..96abbfff99 100644 --- a/plugins/!Deprecated/Db3x/src/resource.h +++ b/plugins/Db3x/src/resource.h diff --git a/plugins/!Deprecated/Db3x/src/stdafx.cpp b/plugins/Db3x/src/stdafx.cpp index 0edf9e36e6..0edf9e36e6 100644 --- a/plugins/!Deprecated/Db3x/src/stdafx.cpp +++ b/plugins/Db3x/src/stdafx.cpp diff --git a/plugins/!Deprecated/Db3x/src/version.h b/plugins/Db3x/src/version.h index f1b5f42140..f1b5f42140 100644 --- a/plugins/!Deprecated/Db3x/src/version.h +++ b/plugins/Db3x/src/version.h |