From 42d22f9907a476732dd73f5905cc4d0478a56bd8 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Tue, 23 Jun 2015 05:51:07 +0000 Subject: Dbx_mmap: unified project git-svn-id: http://svn.miranda-ng.org/main/trunk@14341 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/commonheaders.h | 58 -------------------------- plugins/Db3x_mmap/src/database.cpp | 2 +- plugins/Db3x_mmap/src/dbcache.cpp | 2 +- plugins/Db3x_mmap/src/dbcontacts.cpp | 2 +- plugins/Db3x_mmap/src/dbcrypt.cpp | 2 +- plugins/Db3x_mmap/src/dbevents.cpp | 2 +- plugins/Db3x_mmap/src/dbheaders.cpp | 2 +- plugins/Db3x_mmap/src/dbintf.cpp | 2 +- plugins/Db3x_mmap/src/dbmodulechain.cpp | 2 +- plugins/Db3x_mmap/src/dbsettings.cpp | 2 +- plugins/Db3x_mmap/src/dbtool/aggressive.cpp | 2 +- plugins/Db3x_mmap/src/dbtool/contactchain.cpp | 2 +- plugins/Db3x_mmap/src/dbtool/disk.cpp | 2 +- plugins/Db3x_mmap/src/dbtool/eventchain.cpp | 2 +- plugins/Db3x_mmap/src/dbtool/finaltasks.cpp | 2 +- plugins/Db3x_mmap/src/dbtool/initialchecks.cpp | 2 +- plugins/Db3x_mmap/src/dbtool/modulechain.cpp | 2 +- plugins/Db3x_mmap/src/dbtool/settingschain.cpp | 2 +- plugins/Db3x_mmap/src/dbtool/user.cpp | 2 +- plugins/Db3x_mmap/src/init.cpp | 2 +- plugins/Db3x_mmap/src/stdafx.cpp | 18 -------- plugins/Db3x_mmap/src/stdafx.h | 56 +++++++++++++++++++++++++ plugins/Db3x_mmap/src/ui.cpp | 2 +- 23 files changed, 76 insertions(+), 96 deletions(-) delete mode 100644 plugins/Db3x_mmap/src/commonheaders.h delete mode 100644 plugins/Db3x_mmap/src/stdafx.cpp create mode 100644 plugins/Db3x_mmap/src/stdafx.h (limited to 'plugins/Db3x_mmap/src') diff --git a/plugins/Db3x_mmap/src/commonheaders.h b/plugins/Db3x_mmap/src/commonheaders.h deleted file mode 100644 index 4dec1ac8d7..0000000000 --- a/plugins/Db3x_mmap/src/commonheaders.h +++ /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. -*/ - -#define _CRT_SECURE_NO_WARNINGS - -#pragma warning(disable:4509) - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "database.h" -#include "dbintf.h" -#include "resource.h" -#include "version.h" - -extern HINSTANCE g_hInst; -extern LIST g_Dbs; -extern DBSignature dbSignatureU, dbSignatureE, dbSignatureIM, dbSignatureSA, dbSignatureSD; - -#ifdef __GNUC__ -#define mir_i64(x) (x##LL) -#else -#define mir_i64(x) (x##i64) -#endif diff --git a/plugins/Db3x_mmap/src/database.cpp b/plugins/Db3x_mmap/src/database.cpp index d095b64df0..8f7899db24 100644 --- a/plugins/Db3x_mmap/src/database.cpp +++ b/plugins/Db3x_mmap/src/database.cpp @@ -21,7 +21,7 @@ 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" +#include "stdafx.h" int InitModuleNames(void); int InitMap(void); diff --git a/plugins/Db3x_mmap/src/dbcache.cpp b/plugins/Db3x_mmap/src/dbcache.cpp index 96538c9134..a71feb5586 100644 --- a/plugins/Db3x_mmap/src/dbcache.cpp +++ b/plugins/Db3x_mmap/src/dbcache.cpp @@ -21,7 +21,7 @@ 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" +#include "stdafx.h" void CDb3Mmap::Map() { diff --git a/plugins/Db3x_mmap/src/dbcontacts.cpp b/plugins/Db3x_mmap/src/dbcontacts.cpp index 484cbf9340..b35ea440dd 100644 --- a/plugins/Db3x_mmap/src/dbcontacts.cpp +++ b/plugins/Db3x_mmap/src/dbcontacts.cpp @@ -21,7 +21,7 @@ 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" +#include "stdafx.h" int CDb3Mmap::CheckProto(DBCachedContact *cc, const char *proto) { diff --git a/plugins/Db3x_mmap/src/dbcrypt.cpp b/plugins/Db3x_mmap/src/dbcrypt.cpp index f80dd8f6e2..f95a704439 100644 --- a/plugins/Db3x_mmap/src/dbcrypt.cpp +++ b/plugins/Db3x_mmap/src/dbcrypt.cpp @@ -21,7 +21,7 @@ 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" +#include "stdafx.h" ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/plugins/Db3x_mmap/src/dbevents.cpp b/plugins/Db3x_mmap/src/dbevents.cpp index 7a79bd4327..36d1b7624d 100644 --- a/plugins/Db3x_mmap/src/dbevents.cpp +++ b/plugins/Db3x_mmap/src/dbevents.cpp @@ -21,7 +21,7 @@ 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" +#include "stdafx.h" STDMETHODIMP_(LONG) CDb3Mmap::GetEventCount(MCONTACT contactID) { diff --git a/plugins/Db3x_mmap/src/dbheaders.cpp b/plugins/Db3x_mmap/src/dbheaders.cpp index a8089aca16..94b419b368 100644 --- a/plugins/Db3x_mmap/src/dbheaders.cpp +++ b/plugins/Db3x_mmap/src/dbheaders.cpp @@ -21,7 +21,7 @@ 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" +#include "stdafx.h" //the cache has not been loaded when these functions are used diff --git a/plugins/Db3x_mmap/src/dbintf.cpp b/plugins/Db3x_mmap/src/dbintf.cpp index 8a11e52b51..267c914db0 100644 --- a/plugins/Db3x_mmap/src/dbintf.cpp +++ b/plugins/Db3x_mmap/src/dbintf.cpp @@ -21,7 +21,7 @@ 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" +#include "stdafx.h" DBSignature dbSignatureU = { "Miranda NG DBu", 0x1A }; // unencrypted database DBSignature dbSignatureE = { "Miranda NG DBe", 0x1A }; // encrypted database diff --git a/plugins/Db3x_mmap/src/dbmodulechain.cpp b/plugins/Db3x_mmap/src/dbmodulechain.cpp index 4f590f1b2e..359cf626c3 100644 --- a/plugins/Db3x_mmap/src/dbmodulechain.cpp +++ b/plugins/Db3x_mmap/src/dbmodulechain.cpp @@ -21,7 +21,7 @@ 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" +#include "stdafx.h" void CDb3Mmap::AddToList(char *name, DWORD ofs) { diff --git a/plugins/Db3x_mmap/src/dbsettings.cpp b/plugins/Db3x_mmap/src/dbsettings.cpp index ac1f956b68..b04f219815 100644 --- a/plugins/Db3x_mmap/src/dbsettings.cpp +++ b/plugins/Db3x_mmap/src/dbsettings.cpp @@ -21,7 +21,7 @@ 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" +#include "stdafx.h" DWORD GetModuleNameOfs(const char *szName); DBCachedContact* AddToCachedContactList(MCONTACT contactID, int index); diff --git a/plugins/Db3x_mmap/src/dbtool/aggressive.cpp b/plugins/Db3x_mmap/src/dbtool/aggressive.cpp index e5146e9660..021011c5bd 100644 --- a/plugins/Db3x_mmap/src/dbtool/aggressive.cpp +++ b/plugins/Db3x_mmap/src/dbtool/aggressive.cpp @@ -16,7 +16,7 @@ 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" +#include "..\stdafx.h" #define BLOCKSIZE 65536 diff --git a/plugins/Db3x_mmap/src/dbtool/contactchain.cpp b/plugins/Db3x_mmap/src/dbtool/contactchain.cpp index 639015f67c..9ea8f0cf2b 100644 --- a/plugins/Db3x_mmap/src/dbtool/contactchain.cpp +++ b/plugins/Db3x_mmap/src/dbtool/contactchain.cpp @@ -17,7 +17,7 @@ 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" +#include "..\stdafx.h" static DWORD ofsThisContact, ofsDestPrevContact; static DWORD contactCount; diff --git a/plugins/Db3x_mmap/src/dbtool/disk.cpp b/plugins/Db3x_mmap/src/dbtool/disk.cpp index 6299aa6184..eb7736abe9 100644 --- a/plugins/Db3x_mmap/src/dbtool/disk.cpp +++ b/plugins/Db3x_mmap/src/dbtool/disk.cpp @@ -17,7 +17,7 @@ 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" +#include "..\stdafx.h" int CDb3Mmap::SignatureValid(DWORD ofs, DWORD signature) { diff --git a/plugins/Db3x_mmap/src/dbtool/eventchain.cpp b/plugins/Db3x_mmap/src/dbtool/eventchain.cpp index 16cbb2d7dc..f92f30519f 100644 --- a/plugins/Db3x_mmap/src/dbtool/eventchain.cpp +++ b/plugins/Db3x_mmap/src/dbtool/eventchain.cpp @@ -22,7 +22,7 @@ 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" +#include "..\stdafx.h" #define DBEF_ALL (DBEF_READ | DBEF_SENT | DBEF_RTL | DBEF_UTF | DBEF_ENCRYPTED) diff --git a/plugins/Db3x_mmap/src/dbtool/finaltasks.cpp b/plugins/Db3x_mmap/src/dbtool/finaltasks.cpp index 4151031e27..5d29c75bbd 100644 --- a/plugins/Db3x_mmap/src/dbtool/finaltasks.cpp +++ b/plugins/Db3x_mmap/src/dbtool/finaltasks.cpp @@ -17,7 +17,7 @@ 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" +#include "..\stdafx.h" int CDb3Mmap::WorkFinalTasks(int) { diff --git a/plugins/Db3x_mmap/src/dbtool/initialchecks.cpp b/plugins/Db3x_mmap/src/dbtool/initialchecks.cpp index d7befbf8bc..b3da3241ed 100644 --- a/plugins/Db3x_mmap/src/dbtool/initialchecks.cpp +++ b/plugins/Db3x_mmap/src/dbtool/initialchecks.cpp @@ -17,7 +17,7 @@ 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" +#include "..\stdafx.h" int CDb3Mmap::WorkInitialCheckHeaders() { diff --git a/plugins/Db3x_mmap/src/dbtool/modulechain.cpp b/plugins/Db3x_mmap/src/dbtool/modulechain.cpp index 695698ee7f..02cedd2d91 100644 --- a/plugins/Db3x_mmap/src/dbtool/modulechain.cpp +++ b/plugins/Db3x_mmap/src/dbtool/modulechain.cpp @@ -17,7 +17,7 @@ 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" +#include "..\stdafx.h" struct ModChainEntry { DWORD ofsOld, ofsNew; diff --git a/plugins/Db3x_mmap/src/dbtool/settingschain.cpp b/plugins/Db3x_mmap/src/dbtool/settingschain.cpp index 01630ca3d2..92c63c0b32 100644 --- a/plugins/Db3x_mmap/src/dbtool/settingschain.cpp +++ b/plugins/Db3x_mmap/src/dbtool/settingschain.cpp @@ -17,7 +17,7 @@ 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" +#include "..\stdafx.h" static DWORD ofsThisSettings, ofsDestPrevSettings; diff --git a/plugins/Db3x_mmap/src/dbtool/user.cpp b/plugins/Db3x_mmap/src/dbtool/user.cpp index 2f0a317e90..776fb53315 100644 --- a/plugins/Db3x_mmap/src/dbtool/user.cpp +++ b/plugins/Db3x_mmap/src/dbtool/user.cpp @@ -17,7 +17,7 @@ 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" +#include "..\stdafx.h" static DBContact user; static int phase; diff --git a/plugins/Db3x_mmap/src/init.cpp b/plugins/Db3x_mmap/src/init.cpp index b26caa83cf..1978a9046c 100644 --- a/plugins/Db3x_mmap/src/init.cpp +++ b/plugins/Db3x_mmap/src/init.cpp @@ -21,7 +21,7 @@ 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" +#include "stdafx.h" int hLangpack; diff --git a/plugins/Db3x_mmap/src/stdafx.cpp b/plugins/Db3x_mmap/src/stdafx.cpp deleted file mode 100644 index 048b14e9d2..0000000000 --- a/plugins/Db3x_mmap/src/stdafx.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright (C) 2012-15 Miranda NG project (http://miranda-ng.org) - -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 version 2 -of the License. - -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, see . -*/ - -#include "commonheaders.h" \ No newline at end of file diff --git a/plugins/Db3x_mmap/src/stdafx.h b/plugins/Db3x_mmap/src/stdafx.h new file mode 100644 index 0000000000..d5e1df930f --- /dev/null +++ b/plugins/Db3x_mmap/src/stdafx.h @@ -0,0 +1,56 @@ +/* + +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. +*/ + +#pragma warning(disable:4509) + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "database.h" +#include "dbintf.h" +#include "resource.h" +#include "version.h" + +extern HINSTANCE g_hInst; +extern LIST g_Dbs; +extern DBSignature dbSignatureU, dbSignatureE, dbSignatureIM, dbSignatureSA, dbSignatureSD; + +#ifdef __GNUC__ +#define mir_i64(x) (x##LL) +#else +#define mir_i64(x) (x##i64) +#endif diff --git a/plugins/Db3x_mmap/src/ui.cpp b/plugins/Db3x_mmap/src/ui.cpp index 144b1d275e..c995a5c3f3 100644 --- a/plugins/Db3x_mmap/src/ui.cpp +++ b/plugins/Db3x_mmap/src/ui.cpp @@ -21,7 +21,7 @@ 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" +#include "stdafx.h" struct DlgChangePassParam { -- cgit v1.2.3