summaryrefslogtreecommitdiff
path: root/plugins/Dbx_tree
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-09-16 14:39:48 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-09-16 14:39:48 +0000
commit18fd4bec97159cbaa7501a8a1b67540e0865e88b (patch)
tree75ebe7e194ba940cc12f8263ce9a35a32760d40e /plugins/Dbx_tree
parent3d60e28ce573bfd28286d108eeb43ec29bf44d48 (diff)
removed not needed _MSC_VER checks
git-svn-id: http://svn.miranda-ng.org/main/trunk@6088 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dbx_tree')
-rw-r--r--plugins/Dbx_tree/dbx_tree_10.vcxproj2
-rw-r--r--plugins/Dbx_tree/dbx_tree_10.vcxproj.filters6
-rw-r--r--plugins/Dbx_tree/dbx_tree_11.vcxproj2
-rw-r--r--plugins/Dbx_tree/dbx_tree_11.vcxproj.filters6
-rw-r--r--plugins/Dbx_tree/encryption/Common/Cipher.h4
-rw-r--r--plugins/Dbx_tree/encryption/HC256/src/HC256.cpp6
-rw-r--r--plugins/Dbx_tree/src/BTree.h14
-rw-r--r--plugins/Dbx_tree/src/Compatibility.cpp3
-rw-r--r--plugins/Dbx_tree/src/DataBase.cpp3
-rw-r--r--plugins/Dbx_tree/src/DataBase.h4
-rw-r--r--plugins/Dbx_tree/src/DatabaseLink.cpp4
-rw-r--r--plugins/Dbx_tree/src/EncryptionManager.h4
-rw-r--r--plugins/Dbx_tree/src/Entities.cpp6
-rw-r--r--plugins/Dbx_tree/src/Entities.h10
-rw-r--r--plugins/Dbx_tree/src/Events.cpp4
-rw-r--r--plugins/Dbx_tree/src/Events.h17
-rw-r--r--plugins/Dbx_tree/src/FileAccess.cpp4
-rw-r--r--plugins/Dbx_tree/src/Hash.h4
-rw-r--r--plugins/Dbx_tree/src/SHA256.cpp6
-rw-r--r--plugins/Dbx_tree/src/SHA256.h5
-rw-r--r--plugins/Dbx_tree/src/Settings.cpp3
-rw-r--r--plugins/Dbx_tree/src/intrinsics.h10
-rw-r--r--plugins/Dbx_tree/src/inttypes.h8
-rw-r--r--plugins/Dbx_tree/src/savestrings_gcc.h98
-rw-r--r--plugins/Dbx_tree/src/stdint.h247
25 files changed, 8 insertions, 472 deletions
diff --git a/plugins/Dbx_tree/dbx_tree_10.vcxproj b/plugins/Dbx_tree/dbx_tree_10.vcxproj
index 34f4fab22d..4af6d4ab57 100644
--- a/plugins/Dbx_tree/dbx_tree_10.vcxproj
+++ b/plugins/Dbx_tree/dbx_tree_10.vcxproj
@@ -212,9 +212,7 @@
<ClInclude Include="src\lockfree_hashmultimap.h" />
<ClInclude Include="src\Logger.h" />
<ClInclude Include="src\MREWSync.h" />
- <ClInclude Include="src\savestrings_gcc.h" />
<ClInclude Include="src\sigslot.h" />
- <ClInclude Include="src\stdint.h" />
<ClInclude Include="src\Thread.h" />
<ClInclude Include="src\TLS.h" />
<ClInclude Include="src\Version.h" />
diff --git a/plugins/Dbx_tree/dbx_tree_10.vcxproj.filters b/plugins/Dbx_tree/dbx_tree_10.vcxproj.filters
index 48c1982158..729fc15db2 100644
--- a/plugins/Dbx_tree/dbx_tree_10.vcxproj.filters
+++ b/plugins/Dbx_tree/dbx_tree_10.vcxproj.filters
@@ -117,15 +117,9 @@
<ClInclude Include="src\MREWSync.h">
<Filter>Utils\HeaderFiles</Filter>
</ClInclude>
- <ClInclude Include="src\savestrings_gcc.h">
- <Filter>Utils\HeaderFiles</Filter>
- </ClInclude>
<ClInclude Include="src\sigslot.h">
<Filter>Utils\HeaderFiles</Filter>
</ClInclude>
- <ClInclude Include="src\stdint.h">
- <Filter>Utils\HeaderFiles</Filter>
- </ClInclude>
<ClInclude Include="src\Thread.h">
<Filter>Utils\HeaderFiles</Filter>
</ClInclude>
diff --git a/plugins/Dbx_tree/dbx_tree_11.vcxproj b/plugins/Dbx_tree/dbx_tree_11.vcxproj
index 2010c3c6e2..97f06367d7 100644
--- a/plugins/Dbx_tree/dbx_tree_11.vcxproj
+++ b/plugins/Dbx_tree/dbx_tree_11.vcxproj
@@ -215,9 +215,7 @@
<ClInclude Include="src\lockfree_hashmultimap.h" />
<ClInclude Include="src\Logger.h" />
<ClInclude Include="src\MREWSync.h" />
- <ClInclude Include="src\savestrings_gcc.h" />
<ClInclude Include="src\sigslot.h" />
- <ClInclude Include="src\stdint.h" />
<ClInclude Include="src\Thread.h" />
<ClInclude Include="src\TLS.h" />
<ClInclude Include="src\Version.h" />
diff --git a/plugins/Dbx_tree/dbx_tree_11.vcxproj.filters b/plugins/Dbx_tree/dbx_tree_11.vcxproj.filters
index 43faae7f14..1af88b98b8 100644
--- a/plugins/Dbx_tree/dbx_tree_11.vcxproj.filters
+++ b/plugins/Dbx_tree/dbx_tree_11.vcxproj.filters
@@ -108,15 +108,9 @@
<ClInclude Include="src\MREWSync.h">
<Filter>Utils\HeaderFiles</Filter>
</ClInclude>
- <ClInclude Include="src\savestrings_gcc.h">
- <Filter>Utils\HeaderFiles</Filter>
- </ClInclude>
<ClInclude Include="src\sigslot.h">
<Filter>Utils\HeaderFiles</Filter>
</ClInclude>
- <ClInclude Include="src\stdint.h">
- <Filter>Utils\HeaderFiles</Filter>
- </ClInclude>
<ClInclude Include="src\Thread.h">
<Filter>Utils\HeaderFiles</Filter>
</ClInclude>
diff --git a/plugins/Dbx_tree/encryption/Common/Cipher.h b/plugins/Dbx_tree/encryption/Common/Cipher.h
index abdcbf06be..6df8aaeb12 100644
--- a/plugins/Dbx_tree/encryption/Common/Cipher.h
+++ b/plugins/Dbx_tree/encryption/Common/Cipher.h
@@ -22,11 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma once
-#ifdef _MSC_VER
-#include "../../src/stdint.h"
-#else
#include <stdint.h>
-#endif
#include <wchar.h>
diff --git a/plugins/Dbx_tree/encryption/HC256/src/HC256.cpp b/plugins/Dbx_tree/encryption/HC256/src/HC256.cpp
index 056b4e4dae..ea457cd4e3 100644
--- a/plugins/Dbx_tree/encryption/HC256/src/HC256.cpp
+++ b/plugins/Dbx_tree/encryption/HC256/src/HC256.cpp
@@ -24,11 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <stdlib.h>
#include <string.h>
-#ifndef _MSC_VER
- #define rotr(x,n) (((x)>>(n))|((x)<<(32-(n))))
-#else
- #define rotr(x,n) _lrotr(x,n)
-#endif
+#define rotr(x,n) _lrotr(x,n)
#define h1(x,y) { \
uint8_t a,b,c,d; \
diff --git a/plugins/Dbx_tree/src/BTree.h b/plugins/Dbx_tree/src/BTree.h
index 20c2abfd71..277f206b2b 100644
--- a/plugins/Dbx_tree/src/BTree.h
+++ b/plugins/Dbx_tree/src/BTree.h
@@ -25,24 +25,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <stack>
#include "lockfree_hashmultimap.h"
#include "sigslot.h"
-#ifdef _MSC_VER
-#include "stdint.h"
-#else
#include <stdint.h>
-#endif
#include "Logger.h"
-#ifndef _MSC_VER
-#ifdef offsetof
-#undef offsetof
-#endif
-#define offsetof(TYPE, MEMBER) \
- ( (reinterpret_cast <size_t> \
- (&reinterpret_cast <const volatile char &> \
- (static_cast<TYPE *> (0)->MEMBER))))
-#endif
-
template <typename TKey, uint16_t SizeParam = 4>
class CBTree
{
diff --git a/plugins/Dbx_tree/src/Compatibility.cpp b/plugins/Dbx_tree/src/Compatibility.cpp
index a7d4934f39..23cca177e5 100644
--- a/plugins/Dbx_tree/src/Compatibility.cpp
+++ b/plugins/Dbx_tree/src/Compatibility.cpp
@@ -27,9 +27,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "m_database.h"
#include "m_db_int.h"
#undef DB_NOHELPERFUNCTIONS
-#ifndef _MSC_VER
-#include "savestrings_gcc.h"
-#endif
HANDLE gEvents[6] = {0,0,0,0,0,0};
diff --git a/plugins/Dbx_tree/src/DataBase.cpp b/plugins/Dbx_tree/src/DataBase.cpp
index fec7cab8a3..37067ff350 100644
--- a/plugins/Dbx_tree/src/DataBase.cpp
+++ b/plugins/Dbx_tree/src/DataBase.cpp
@@ -23,9 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "Interface.h"
#include "DataBase.h"
#include "newpluginapi.h"
-#ifndef _MSC_VER
-#include "savestrings_gcc.h"
-#endif
#include "Logger.h"
CDataBase *gDataBase = NULL;
diff --git a/plugins/Dbx_tree/src/DataBase.h b/plugins/Dbx_tree/src/DataBase.h
index 25de54551b..539abd6564 100644
--- a/plugins/Dbx_tree/src/DataBase.h
+++ b/plugins/Dbx_tree/src/DataBase.h
@@ -22,11 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma once
-#ifndef _MSC_VER
#include <stdint.h>
-#else
-#include "stdint.h"
-#endif
#include "MREWSync.h"
#include "Events.h"
diff --git a/plugins/Dbx_tree/src/DatabaseLink.cpp b/plugins/Dbx_tree/src/DatabaseLink.cpp
index 13dc4848f0..e48ebfff08 100644
--- a/plugins/Dbx_tree/src/DatabaseLink.cpp
+++ b/plugins/Dbx_tree/src/DatabaseLink.cpp
@@ -22,10 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "Interface.h"
#include "DatabaseLink.h"
-#ifndef _MSC_VER
-#include "savestrings_gcc.h"
-#endif
-
/*
profile: pointer to a string which contains full path + name
diff --git a/plugins/Dbx_tree/src/EncryptionManager.h b/plugins/Dbx_tree/src/EncryptionManager.h
index 768ea19efa..a90a47c960 100644
--- a/plugins/Dbx_tree/src/EncryptionManager.h
+++ b/plugins/Dbx_tree/src/EncryptionManager.h
@@ -22,11 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma once
-#ifndef _MSC_VER
#include <stdint.h>
-#else
-#include "stdint.h"
-#endif
#include "sigslot.h"
#define __INTERFACE_ONLY__
diff --git a/plugins/Dbx_tree/src/Entities.cpp b/plugins/Dbx_tree/src/Entities.cpp
index 4b6ec7dbdf..74af4d6665 100644
--- a/plugins/Dbx_tree/src/Entities.cpp
+++ b/plugins/Dbx_tree/src/Entities.cpp
@@ -675,11 +675,7 @@ TDBTEntityIterationHandle CEntities::IterationInit(const TDBTEntityIterFilter &
iter->q = new std::deque<TEntityIterationItem>;
iter->parents = new std::deque<TEntityIterationItem>;
iter->accounts = new std::deque<TEntityIterationItem>;
- #ifdef _MSC_VER
- iter->returned = new stdext::hash_set<TDBTEntityHandle>;
- #else
- iter->returned = new __gnu_cxx::hash_set<TDBTEntityHandle>;
- #endif
+ iter->returned = new stdext::hash_set<TDBTEntityHandle>;
iter->returned->insert(hParent);
TEntityIterationItem it;
diff --git a/plugins/Dbx_tree/src/Entities.h b/plugins/Dbx_tree/src/Entities.h
index 579383d15f..9cb3a6fea3 100644
--- a/plugins/Dbx_tree/src/Entities.h
+++ b/plugins/Dbx_tree/src/Entities.h
@@ -26,11 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "FileBTree.h"
#include "MREWSync.h"
#include <deque>
-#ifdef _MSC_VER
#include <hash_set>
-#else
-#include <ext/hash_set>
-#endif
#pragma pack(push, 1) // push current alignment to stack, set alignment to 1 byte boundary
@@ -277,11 +273,7 @@ protected:
std::deque<TEntityIterationItem> * q;
std::deque<TEntityIterationItem> * parents;
std::deque<TEntityIterationItem> * accounts;
- #ifdef _MSC_VER
- stdext::hash_set<TDBTEntityHandle> * returned;
- #else
- __gnu_cxx::hash_set<TDBTEntityHandle> * returned;
- #endif
+ stdext::hash_set<TDBTEntityHandle> * returned;
} TEntityIteration, *PEntityIteration;
TDBTEntityHandle m_RootEntity;
diff --git a/plugins/Dbx_tree/src/Events.cpp b/plugins/Dbx_tree/src/Events.cpp
index ee3254ad44..11870f1d1f 100644
--- a/plugins/Dbx_tree/src/Events.cpp
+++ b/plugins/Dbx_tree/src/Events.cpp
@@ -22,10 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "Interface.h"
#include "Events.h"
-#ifndef _MSC_VER
-#include "savestrings_gcc.h"
-#endif
-
CEventsTypeManager::CEventsTypeManager(CEntities & Entities, CSettings & Settings)
: m_Entities(Entities),
diff --git a/plugins/Dbx_tree/src/Events.h b/plugins/Dbx_tree/src/Events.h
index 7a3d50ff19..170ff6fc3c 100644
--- a/plugins/Dbx_tree/src/Events.h
+++ b/plugins/Dbx_tree/src/Events.h
@@ -33,13 +33,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "EncryptionManager.h"
#include "sigslot.h"
-#ifdef _MSC_VER
#include <hash_map>
#include <hash_set>
-#else
-#include <ext/hash_map>
-#include <ext/hash_set>
-#endif
#include <queue>
#include <time.h>
#include <windows.h>
@@ -171,11 +166,7 @@ private:
char * ModuleName;
uint32_t EventType;
} TEventType, *PEventType;
- #ifdef _MSC_VER
typedef stdext::hash_map<uint32_t, PEventType> TTypeMap;
- #else
- typedef __gnu_cxx::hash_map<uint32_t, PEventType> TTypeMap;
- #endif
CEntities & m_Entities;
CSettings & m_Settings;
@@ -228,12 +219,8 @@ private:
uint32_t VirtualCount;
TEventKey FirstVirtualUnread;
} TEntityEventsRecord, *PEntityEventsRecord;
- #ifdef _MSC_VER
- typedef stdext::hash_map<TDBTEntityHandle, TEntityEventsRecord*> TEntityEventsMap;
- #else
- typedef __gnu_cxx::hash_map<TDBTEntityHandle, TEntityEventsRecord*> TEntityEventsMap;
- #endif
- typedef CIterationHeap<TEventBase::iterator> TEventsHeap;
+ typedef stdext::hash_map<TDBTEntityHandle, TEntityEventsRecord*> TEntityEventsMap;
+ typedef CIterationHeap<TEventBase::iterator> TEventsHeap;
CBlockManager & m_BlockManager;
CEncryptionManager & m_EncryptionManager;
diff --git a/plugins/Dbx_tree/src/FileAccess.cpp b/plugins/Dbx_tree/src/FileAccess.cpp
index 144aa586e0..0042abab40 100644
--- a/plugins/Dbx_tree/src/FileAccess.cpp
+++ b/plugins/Dbx_tree/src/FileAccess.cpp
@@ -23,10 +23,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "Interface.h"
#include "FileAccess.h"
#include <vector>
-#ifndef _MSC_VER
-#include "savestrings_gcc.h"
-#define _time32 time
-#endif
#include "Logger.h"
const uint8_t CFileAccess::cJournalSignature[20] = "Miranda IM Journal!";
diff --git a/plugins/Dbx_tree/src/Hash.h b/plugins/Dbx_tree/src/Hash.h
index 886e8b1485..ae5a1d06be 100644
--- a/plugins/Dbx_tree/src/Hash.h
+++ b/plugins/Dbx_tree/src/Hash.h
@@ -20,10 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifndef _MSC_VER
#include <stdint.h>
-#else
-#include "stdint.h"
-#endif
uint32_t Hash(const void * Data, uint32_t Length);
diff --git a/plugins/Dbx_tree/src/SHA256.cpp b/plugins/Dbx_tree/src/SHA256.cpp
index d0b16f907f..f612eab22b 100644
--- a/plugins/Dbx_tree/src/SHA256.cpp
+++ b/plugins/Dbx_tree/src/SHA256.cpp
@@ -30,11 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#endif
#define SHA_LOOPUNROLL
-#ifndef _MSC_VER
- #define rotr(x,n) (((x)>>(n))|((x)<<(32-(n))))
-#else
- #define rotr(x,n) _lrotr(x,n)
-#endif
+#define rotr(x,n) _lrotr(x,n)
// table of round constants
diff --git a/plugins/Dbx_tree/src/SHA256.h b/plugins/Dbx_tree/src/SHA256.h
index a9629e6a2a..ef3f005ccb 100644
--- a/plugins/Dbx_tree/src/SHA256.h
+++ b/plugins/Dbx_tree/src/SHA256.h
@@ -20,12 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#ifndef _MSC_VER
#include <stdint.h>
-#else
-#include "stdint.h"
-#endif
-
class SHA256
{
diff --git a/plugins/Dbx_tree/src/Settings.cpp b/plugins/Dbx_tree/src/Settings.cpp
index 814086a432..c2acd8ddfc 100644
--- a/plugins/Dbx_tree/src/Settings.cpp
+++ b/plugins/Dbx_tree/src/Settings.cpp
@@ -24,9 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "Settings.h"
#include <math.h> // floor function
#include "Hash.h"
-#ifndef _MSC_VER
-#include "savestrings_gcc.h"
-#endif
TDBTSettingHandle CSettingsTree::_FindSetting(const uint32_t Hash, const char * Name, const uint32_t Length)
{
diff --git a/plugins/Dbx_tree/src/intrinsics.h b/plugins/Dbx_tree/src/intrinsics.h
index 7cb8af18f3..2627fc03fc 100644
--- a/plugins/Dbx_tree/src/intrinsics.h
+++ b/plugins/Dbx_tree/src/intrinsics.h
@@ -1,9 +1,7 @@
#pragma once
-#ifdef _MSC_VER
-
#include <intrin.h>
-#include "stdint.h"
+#include <stdint.h>
#ifdef _M_X64
@@ -399,9 +397,3 @@ inline uint32_t ROR_32(uint32_t Value, uint8_t Shift)
#error unsupported architecture
#endif
-
-#else
-
-#error unsupported compiler
-
-#endif
diff --git a/plugins/Dbx_tree/src/inttypes.h b/plugins/Dbx_tree/src/inttypes.h
index 25542771f5..79a1315500 100644
--- a/plugins/Dbx_tree/src/inttypes.h
+++ b/plugins/Dbx_tree/src/inttypes.h
@@ -29,18 +29,12 @@
//
///////////////////////////////////////////////////////////////////////////////
-#ifndef _MSC_VER // [
-#error "Use this header only with Microsoft Visual C++ compilers!"
-#endif // _MSC_VER ]
-
#ifndef _MSC_INTTYPES_H_ // [
#define _MSC_INTTYPES_H_
-#if _MSC_VER > 1000
#pragma once
-#endif
-#include "stdint.h"
+#include <stdint.h>
// 7.8 Format conversion of integer types
diff --git a/plugins/Dbx_tree/src/savestrings_gcc.h b/plugins/Dbx_tree/src/savestrings_gcc.h
deleted file mode 100644
index 2fa60f071a..0000000000
--- a/plugins/Dbx_tree/src/savestrings_gcc.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
-
-dbx_tree: tree database driver for Miranda IM
-
-Copyright 2007-2010 Michael "Protogenes" Kunz,
-
-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 once
-
-inline int strcpy_s(
- char *strDestination,
- size_t numberOfElements,
- const char *strSource
-)
-{
- if (!strDestination) return EINVAL;
- if (!strSource) {strDestination[0] = 0; return EINVAL;}
- size_t l = strlen(strSource);
- if (numberOfElements < l + 1) {strDestination[0] = 0; return ERANGE;}
- memcpy(strDestination, strSource, l + 1);
- return 0;
-}
-
-template <size_t size>
-inline int strcpy_s(
- char (&strDestination)[size],
- const char *strSource
-)
-{
- if (!strDestination) return EINVAL;
- if (!strSource) {strDestination[0] = 0; return EINVAL;}
- size_t l = strlen(strSource);
- if (size < l + 1) {strDestination[0] = 0; return ERANGE;}
-
- memcpy(strDestination, strSource, l + 1);
- return 0;
-}
-
-
-inline int strcat_s(
- char *strDestination,
- size_t numberOfElements,
- const char *strSource
-)
-{
- if (!strDestination) return EINVAL;
- if (!strSource) {strDestination[0] = 0; return EINVAL;}
- size_t l = strlen(strSource);
- size_t m = strlen(strDestination);
- if (numberOfElements < l + m + 1) {strDestination[0] = 0; return ERANGE;}
-
- memcpy(&strDestination[m], strSource, l + 1);
- return 0;
-}
-
-template <size_t size>
-inline int strcat_s(
- char (&strDestination)[size],
- const char *strSource
-)
-{
- if (!strDestination) return EINVAL;
- if (!strSource) {strDestination[0] = 0; return EINVAL;}
- size_t l = strlen(strSource);
- size_t m = strlen(strDestination);
- if (size < l + m + 1) {strDestination[0] = 0; return ERANGE;}
-
- memcpy(&strDestination[m], strSource, l + 1);
- return 0;
-}
-
-inline int strncpy_s(
- char *strDest,
- size_t numberOfElements,
- const char *strSource,
- size_t count
-)
-{
- if (count > numberOfElements)
- return strcpy_s(strDest, numberOfElements, strSource);
- else
- return strcpy_s(strDest, count + 1, strSource);
-} \ No newline at end of file
diff --git a/plugins/Dbx_tree/src/stdint.h b/plugins/Dbx_tree/src/stdint.h
deleted file mode 100644
index 59d067302f..0000000000
--- a/plugins/Dbx_tree/src/stdint.h
+++ /dev/null
@@ -1,247 +0,0 @@
-// ISO C9x compliant stdint.h for Microsoft Visual Studio
-// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
-//
-// Copyright (c) 2006-2008 Alexander Chemeris
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// 1. Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-//
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-//
-// 3. The name of the author may be used to endorse or promote products
-// derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef _MSC_VER // [
-#error "Use this header only with Microsoft Visual C++ compilers!"
-#endif // _MSC_VER ]
-
-#ifndef _MSC_STDINT_H_ // [
-#define _MSC_STDINT_H_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif
-
-#include <limits.h>
-
-// For Visual Studio 6 in C++ mode and for many Visual Studio versions when
-// compiling for ARM we should wrap <wchar.h> include with 'extern "C++" {}'
-// or compiler give many errors like this:
-// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
-#ifdef __cplusplus
-extern "C" {
-#endif
-# include <wchar.h>
-#ifdef __cplusplus
-}
-#endif
-
-// Define _W64 macros to mark types changing their size, like intptr_t.
-#ifndef _W64
-# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
-# define _W64 __w64
-# else
-# define _W64
-# endif
-#endif
-
-
-// 7.18.1 Integer types
-
-// 7.18.1.1 Exact-width integer types
-
-// Visual Studio 6 and Embedded Visual C++ 4 doesn't
-// realize that, e.g. char has the same size as __int8
-// so we give up on __intX for them.
-#if (_MSC_VER < 1300)
- typedef signed char int8_t;
- typedef signed short int16_t;
- typedef signed int int32_t;
- typedef unsigned char uint8_t;
- typedef unsigned short uint16_t;
- typedef unsigned int uint32_t;
-#else
- typedef signed __int8 int8_t;
- typedef signed __int16 int16_t;
- typedef signed __int32 int32_t;
- typedef unsigned __int8 uint8_t;
- typedef unsigned __int16 uint16_t;
- typedef unsigned __int32 uint32_t;
-#endif
-typedef signed __int64 int64_t;
-typedef unsigned __int64 uint64_t;
-
-
-// 7.18.1.2 Minimum-width integer types
-typedef int8_t int_least8_t;
-typedef int16_t int_least16_t;
-typedef int32_t int_least32_t;
-typedef int64_t int_least64_t;
-typedef uint8_t uint_least8_t;
-typedef uint16_t uint_least16_t;
-typedef uint32_t uint_least32_t;
-typedef uint64_t uint_least64_t;
-
-// 7.18.1.3 Fastest minimum-width integer types
-typedef int8_t int_fast8_t;
-typedef int16_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef int64_t int_fast64_t;
-typedef uint8_t uint_fast8_t;
-typedef uint16_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-typedef uint64_t uint_fast64_t;
-
-// 7.18.1.4 Integer types capable of holding object pointers
-#ifdef _WIN64 // [
- typedef signed __int64 intptr_t;
- typedef unsigned __int64 uintptr_t;
-#else // _WIN64 ][
- typedef _W64 signed int intptr_t;
- typedef _W64 unsigned int uintptr_t;
-#endif // _WIN64 ]
-
-// 7.18.1.5 Greatest-width integer types
-typedef int64_t intmax_t;
-typedef uint64_t uintmax_t;
-
-
-// 7.18.2 Limits of specified-width integer types
-
-#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
-
-// 7.18.2.1 Limits of exact-width integer types
-#define INT8_MIN ((int8_t)_I8_MIN)
-#define INT8_MAX _I8_MAX
-#define INT16_MIN ((int16_t)_I16_MIN)
-#define INT16_MAX _I16_MAX
-#define INT32_MIN ((int32_t)_I32_MIN)
-#define INT32_MAX _I32_MAX
-#define INT64_MIN ((int64_t)_I64_MIN)
-#define INT64_MAX _I64_MAX
-#define UINT8_MAX _UI8_MAX
-#define UINT16_MAX _UI16_MAX
-#define UINT32_MAX _UI32_MAX
-#define UINT64_MAX _UI64_MAX
-
-// 7.18.2.2 Limits of minimum-width integer types
-#define INT_LEAST8_MIN INT8_MIN
-#define INT_LEAST8_MAX INT8_MAX
-#define INT_LEAST16_MIN INT16_MIN
-#define INT_LEAST16_MAX INT16_MAX
-#define INT_LEAST32_MIN INT32_MIN
-#define INT_LEAST32_MAX INT32_MAX
-#define INT_LEAST64_MIN INT64_MIN
-#define INT_LEAST64_MAX INT64_MAX
-#define UINT_LEAST8_MAX UINT8_MAX
-#define UINT_LEAST16_MAX UINT16_MAX
-#define UINT_LEAST32_MAX UINT32_MAX
-#define UINT_LEAST64_MAX UINT64_MAX
-
-// 7.18.2.3 Limits of fastest minimum-width integer types
-#define INT_FAST8_MIN INT8_MIN
-#define INT_FAST8_MAX INT8_MAX
-#define INT_FAST16_MIN INT16_MIN
-#define INT_FAST16_MAX INT16_MAX
-#define INT_FAST32_MIN INT32_MIN
-#define INT_FAST32_MAX INT32_MAX
-#define INT_FAST64_MIN INT64_MIN
-#define INT_FAST64_MAX INT64_MAX
-#define UINT_FAST8_MAX UINT8_MAX
-#define UINT_FAST16_MAX UINT16_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-#define UINT_FAST64_MAX UINT64_MAX
-
-// 7.18.2.4 Limits of integer types capable of holding object pointers
-#ifdef _WIN64 // [
-# define INTPTR_MIN INT64_MIN
-# define INTPTR_MAX INT64_MAX
-# define UINTPTR_MAX UINT64_MAX
-#else // _WIN64 ][
-# define INTPTR_MIN INT32_MIN
-# define INTPTR_MAX INT32_MAX
-# define UINTPTR_MAX UINT32_MAX
-#endif // _WIN64 ]
-
-// 7.18.2.5 Limits of greatest-width integer types
-#define INTMAX_MIN INT64_MIN
-#define INTMAX_MAX INT64_MAX
-#define UINTMAX_MAX UINT64_MAX
-
-// 7.18.3 Limits of other integer types
-
-#ifdef _WIN64 // [
-# define PTRDIFF_MIN _I64_MIN
-# define PTRDIFF_MAX _I64_MAX
-#else // _WIN64 ][
-# define PTRDIFF_MIN _I32_MIN
-# define PTRDIFF_MAX _I32_MAX
-#endif // _WIN64 ]
-
-#define SIG_ATOMIC_MIN INT_MIN
-#define SIG_ATOMIC_MAX INT_MAX
-
-#ifndef SIZE_MAX // [
-# ifdef _WIN64 // [
-# define SIZE_MAX _UI64_MAX
-# else // _WIN64 ][
-# define SIZE_MAX _UI32_MAX
-# endif // _WIN64 ]
-#endif // SIZE_MAX ]
-
-// WCHAR_MIN and WCHAR_MAX are also defined in <wchar.h>
-#ifndef WCHAR_MIN // [
-# define WCHAR_MIN 0
-#endif // WCHAR_MIN ]
-#ifndef WCHAR_MAX // [
-# define WCHAR_MAX _UI16_MAX
-#endif // WCHAR_MAX ]
-
-#define WINT_MIN 0
-#define WINT_MAX _UI16_MAX
-
-#endif // __STDC_LIMIT_MACROS ]
-
-
-// 7.18.4 Limits of other integer types
-
-#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
-
-// 7.18.4.1 Macros for minimum-width integer constants
-
-#define INT8_C(val) val##i8
-#define INT16_C(val) val##i16
-#define INT32_C(val) val##i32
-#define INT64_C(val) val##i64
-
-#define UINT8_C(val) val##ui8
-#define UINT16_C(val) val##ui16
-#define UINT32_C(val) val##ui32
-#define UINT64_C(val) val##ui64
-
-// 7.18.4.2 Macros for greatest-width integer constants
-#define INTMAX_C INT64_C
-#define UINTMAX_C UINT64_C
-
-#endif // __STDC_CONSTANT_MACROS ]
-
-
-#endif // _MSC_STDINT_H_ ]