From e4c1b5ae00efaa470a4b41953656ff059d0fd87d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 25 Nov 2013 19:54:47 +0000 Subject: unique signature for the new mmap profile format git-svn-id: http://svn.miranda-ng.org/main/trunk@6983 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x_mmap/src/dbintf.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'plugins/Db3x_mmap/src/dbintf.cpp') diff --git a/plugins/Db3x_mmap/src/dbintf.cpp b/plugins/Db3x_mmap/src/dbintf.cpp index 77df014472..3263c5e8ea 100644 --- a/plugins/Db3x_mmap/src/dbintf.cpp +++ b/plugins/Db3x_mmap/src/dbintf.cpp @@ -23,17 +23,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "commonheaders.h" -DBSignature dbSignature = { "Miranda ICQ DB", 0x1A }; +DBSignature dbSignature = { "Miranda NG DBu", 0x1A }; +DBSignature dbSignatureIM = { "Miranda ICQ DB", 0x1A }; DBSignature dbSignatureSA = { "Miranda ICQ SA", 0x1A }; -static int ModCompare(const ModuleName *mn1, const ModuleName *mn2 ) +static int ModCompare(const ModuleName *mn1, const ModuleName *mn2) { - return strcmp( mn1->name, mn2->name ); + return strcmp(mn1->name, mn2->name); } -static int OfsCompare(const ModuleName *mn1, const ModuleName *mn2 ) +static int OfsCompare(const ModuleName *mn1, const ModuleName *mn2) { - return ( mn1->ofs - mn2->ofs ); + return (mn1->ofs - mn2->ofs); } static int stringCompare2(const char *p1, const char *p2) @@ -118,12 +119,12 @@ int CDb3Base::Load(bool bSkipInit) if ( m_hDbFile == INVALID_HANDLE_VALUE ) return EGROKPRF_CANTREAD; - if ( !ReadFile(m_hDbFile,&m_dbHeader,sizeof(m_dbHeader),&dummy,NULL)) { + if (!ReadFile(m_hDbFile, &m_dbHeader, sizeof(m_dbHeader), &dummy, NULL)) { CloseHandle(m_hDbFile); return EGROKPRF_CANTREAD; } - if ( !bSkipInit) { + if (!bSkipInit) { if (InitCache()) return 1; if (InitModuleNames()) return 1; if (InitCrypt()) return 1; @@ -144,7 +145,7 @@ int CDb3Base::Load(bool bSkipInit) int CDb3Base::Create() { m_hDbFile = CreateFile(m_tszProfileName, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, 0, NULL); - return ( m_hDbFile == INVALID_HANDLE_VALUE ); + return (m_hDbFile == INVALID_HANDLE_VALUE); } STDMETHODIMP_(void) CDb3Base::SetCacheSafetyMode(BOOL bIsSet) -- cgit v1.2.3