Permalink
Browse files

Imported upstream 1.9.110

Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
  • Loading branch information...
1 parent 5534891 commit 20ed5ef3f7a41888ed725f21566963342ad0e140 Stefan Naewe committed Aug 2, 2012
@@ -4,11 +4,11 @@
* Purpose: File-system functionals.
*
* Created: 19th January 2002
- * Updated: 10th August 2009
+ * Updated: 29th November 2010
*
* Home: http://stlsoft.org/
*
- * Copyright (c) 2002-2009, Matthew Wilson and Synesis Software
+ * Copyright (c) 2002-2010, Matthew Wilson and Synesis Software
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -50,8 +50,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define INETSTL_VER_INETSTL_FILESYSTEM_HPP_FUNCTIONALS_MAJOR 4
# define INETSTL_VER_INETSTL_FILESYSTEM_HPP_FUNCTIONALS_MINOR 0
-# define INETSTL_VER_INETSTL_FILESYSTEM_HPP_FUNCTIONALS_REVISION 3
-# define INETSTL_VER_INETSTL_FILESYSTEM_HPP_FUNCTIONALS_EDIT 33
+# define INETSTL_VER_INETSTL_FILESYSTEM_HPP_FUNCTIONALS_REVISION 4
+# define INETSTL_VER_INETSTL_FILESYSTEM_HPP_FUNCTIONALS_EDIT 34
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -70,6 +70,10 @@
#ifndef INETSTL_INCL_INETSTL_FILESYSTEM_HPP_FILESYSTEM_TRAITS
# include <inetstl/filesystem/filesystem_traits.hpp>
#endif /* !INETSTL_INCL_INETSTL_FILESYSTEM_HPP_FILESYSTEM_TRAITS */
+#ifndef STLSOFT_INCL_STLSOFT_UTIL_HPP_MINMAX
+# include <stlsoft/util/minmax.hpp>
+#endif /* !STLSOFT_INCL_STLSOFT_UTIL_HPP_MINMAX */
+
#ifndef _INETSTL_FUNCTIONALS_NO_STD
# include <functional>
#else /* ? _INETSTL_FUNCTIONALS_NO_STD */
@@ -153,11 +157,15 @@ struct path_compare
private:
static result_type compare_(char_type const* s1, char_type const* s2)
{
- char_type path1[_MAX_PATH + 1];
- char_type path2[_MAX_PATH + 1];
-
- traits_type::str_n_copy(&path1[0], s1, STLSOFT_NUM_ELEMENTS(path1));
- traits_type::str_n_copy(&path2[0], s2, STLSOFT_NUM_ELEMENTS(path2));
+ char_type path1[_MAX_PATH + 1];
+ char_type path2[_MAX_PATH + 1];
+ is_size_t const len1 = traits_type::str_len(s1);
+ is_size_t const len2 = traits_type::str_len(s2);
+
+ traits_type::char_copy(&path1[0], s1, stlsoft_ns_qual(minimum)(STLSOFT_NUM_ELEMENTS(path1), len1));
+ path1[len1] = '\0';
+ traits_type::char_copy(&path2[0], s2, stlsoft_ns_qual(minimum)(STLSOFT_NUM_ELEMENTS(path2), len2));
+ path2[len2] = '\0';
traits_type::remove_dir_end(&path1[0]);
traits_type::remove_dir_end(&path2[0]);
@@ -4,11 +4,11 @@
* Purpose: Contains classes and functions for dealing with MFC strings.
*
* Created: 24th May 2002
- * Updated: 10th August 2009
+ * Updated: 22nd November 2011
*
* Home: http://stlsoft.org/
*
- * Copyright (c) 2002-2009, Matthew Wilson and Synesis Software
+ * Copyright (c) 2002-2011, Matthew Wilson and Synesis Software
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -50,9 +50,9 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define MFCSTL_VER_MFCSTL_SHIMS_ACCESS_HPP_STRING_MAJOR 3
-# define MFCSTL_VER_MFCSTL_SHIMS_ACCESS_HPP_STRING_MINOR 5
+# define MFCSTL_VER_MFCSTL_SHIMS_ACCESS_HPP_STRING_MINOR 6
# define MFCSTL_VER_MFCSTL_SHIMS_ACCESS_HPP_STRING_REVISION 1
-# define MFCSTL_VER_MFCSTL_SHIMS_ACCESS_HPP_STRING_EDIT 84
+# define MFCSTL_VER_MFCSTL_SHIMS_ACCESS_HPP_STRING_EDIT 86
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -62,12 +62,15 @@
#ifndef MFCSTL_INCL_MFCSTL_HPP_MFCSTL
# include <mfcstl/mfcstl.hpp>
#endif /* !MFCSTL_INCL_MFCSTL_HPP_MFCSTL */
+#ifndef MFCSTL_INCL_MFCSTL_SHIMS_ACCESS_STRING_HPP_CEXCEPTION
+# include <mfcstl/shims/access/string/CException.hpp>
+#endif /* !MFCSTL_INCL_MFCSTL_SHIMS_ACCESS_STRING_HPP_CEXCEPTION */
#ifndef MFCSTL_INCL_MFCSTL_SHIMS_ACCESS_STRING_HPP_CSTRING
# include <mfcstl/shims/access/string/cstring.hpp>
#endif /* !MFCSTL_INCL_MFCSTL_SHIMS_ACCESS_STRING_HPP_CSTRING */
-#ifndef MFCSTL_INCL_MFCSTL_SHIMS_ACCESS_STRING_HPP_CSTRING
-# include <mfcstl/shims/access/string/cstring.hpp>
-#endif /* !MFCSTL_INCL_MFCSTL_SHIMS_ACCESS_STRING_HPP_CSTRING */
+#ifndef MFCSTL_INCL_MFCSTL_SHIMS_ACCESS_STRING_HPP_CWND
+# include <mfcstl/shims/access/string/cwnd.hpp>
+#endif /* !MFCSTL_INCL_MFCSTL_SHIMS_ACCESS_STRING_HPP_CWND */
/* ////////////////////////////////////////////////////////////////////// */
@@ -4,11 +4,11 @@
* Purpose: Contains classes and functions for dealing with MFC strings.
*
* Created: 24th May 2002
- * Updated: 12th January 2010
+ * Updated: 22nd November 2011
*
* Home: http://stlsoft.org/
*
- * Copyright (c) 2002-2010, Matthew Wilson and Synesis Software
+ * Copyright (c) 2002-2011, Matthew Wilson and Synesis Software
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -51,8 +51,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define MFCSTL_VER_MFCSTL_SHIMS_ACCESS_STRING_HPP_CWND_MAJOR 4
# define MFCSTL_VER_MFCSTL_SHIMS_ACCESS_STRING_HPP_CWND_MINOR 0
-# define MFCSTL_VER_MFCSTL_SHIMS_ACCESS_STRING_HPP_CWND_REVISION 5
-# define MFCSTL_VER_MFCSTL_SHIMS_ACCESS_STRING_HPP_CWND_EDIT 93
+# define MFCSTL_VER_MFCSTL_SHIMS_ACCESS_STRING_HPP_CWND_REVISION 6
+# define MFCSTL_VER_MFCSTL_SHIMS_ACCESS_STRING_HPP_CWND_EDIT 94
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -724,7 +724,7 @@ inline c_str_ptr_CWnd_proxy c_str_data_a(CListView const& w)
*/
inline ms_size_t c_str_len(CWnd const& w)
{
- return GetWindowTextLength_T_(w);
+ return impl::GetWindowTextLength_T_(w);
}
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# ifdef UNICODE
@@ -744,7 +744,7 @@ inline ms_size_t c_str_len_a(CWnd const& w)
*/
inline ms_size_t c_str_len(CListBox const& w)
{
- return GetWindowTextLength_T_(w);
+ return impl::GetWindowTextLength_T_(w);
}
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# ifdef UNICODE
@@ -766,7 +766,7 @@ inline ms_size_t c_str_len_a(CListBox const& w)
*/
inline ms_size_t c_str_len(CListCtrl const& w)
{
- return GetWindowTextLength_T_(w);
+ return impl::GetWindowTextLength_T_(w);
}
# ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# ifdef UNICODE
@@ -5,11 +5,11 @@
* platform discriminations, and definitions of types.
*
* Created: 20th March 2005
- * Updated: 30th January 2010
+ * Updated: 12th September 2011
*
* Home: http://stlsoft.org/
*
- * Copyright (c) 2005-2010, Matthew Wilson and Synesis Software
+ * Copyright (c) 2005-2011, Matthew Wilson and Synesis Software
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -46,9 +46,9 @@
/* File version */
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define PLATFORMSTL_VER_PLATFORMSTL_H_PLATFORMSTL_MAJOR 1
-# define PLATFORMSTL_VER_PLATFORMSTL_H_PLATFORMSTL_MINOR 13
-# define PLATFORMSTL_VER_PLATFORMSTL_H_PLATFORMSTL_REVISION 2
-# define PLATFORMSTL_VER_PLATFORMSTL_H_PLATFORMSTL_EDIT 39
+# define PLATFORMSTL_VER_PLATFORMSTL_H_PLATFORMSTL_MINOR 14
+# define PLATFORMSTL_VER_PLATFORMSTL_H_PLATFORMSTL_REVISION 1
+# define PLATFORMSTL_VER_PLATFORMSTL_H_PLATFORMSTL_EDIT 40
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/** \file platformstl/platformstl.h
@@ -123,12 +123,13 @@
# define _PLATFORMSTL_VER_1_7_2 0x010702ff /*!< Version 1.7.2 (with STLSoft 1.9.64) */
# define _PLATFORMSTL_VER_1_8_1 0x010801ff /*!< Version 1.8.1 (with STLSoft 1.9.86) */
# define _PLATFORMSTL_VER_1_8_2 0x010802ff /*!< Version 1.8.2 (with STLSoft 1.9.90) */
+# define _PLATFORMSTL_VER_1_8_3 0x010803ff /*!< Version 1.8.3 (with STLSoft 1.9.110) */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
#define _PLATFORMSTL_VER_MAJOR 1
#define _PLATFORMSTL_VER_MINOR 8
-#define _PLATFORMSTL_VER_REVISION 2
-#define _PLATFORMSTL_VER _PLATFORMSTL_VER_1_8_2
+#define _PLATFORMSTL_VER_REVISION 3
+#define _PLATFORMSTL_VER _PLATFORMSTL_VER_1_8_3
/* /////////////////////////////////////////////////////////////////////////
* Includes
@@ -142,8 +143,8 @@
* STLSoft version compatibility
*/
-#if _STLSOFT_VER < 0x01095bff
-# error This version of the PlatformSTL libraries requires STLSoft version 1.9.91, or later. (www.stlsoft.org)
+#if _STLSOFT_VER < 0x01096eff
+# error This version of the PlatformSTL libraries requires STLSoft version 1.9.100, or later. (www.stlsoft.org)
#endif /* STLSoft version */
/* /////////////////////////////////////////////////////////////////////////
@@ -318,6 +319,19 @@
# if defined(_PLATFORMSTL_NO_NAMESPACE)
# error Use of namespaces in PlatformSTL may not be suspended; _PLATFORMSTL_NO_NAMESPACE was detected
# endif /* _PLATFORMSTL_NO_NAMESPACE */
+
+#if defined(PLATFORMSTL_OS_IS_UNIX)
+# ifdef UNIXSTL_NO_NAMESPACE
+# define PLATFORMSTL_NO_PLATFORM_NAMESPACE
+# endif /* UNIXSTL_NO_NAMESPACE */
+#elif defined(PLATFORMSTL_OS_IS_WINDOWS)
+# ifdef WINSTL_NO_NAMESPACE
+# define PLATFORMSTL_NO_PLATFORM_NAMESPACE
+# endif /* WINSTL_NO_NAMESPACE */
+#else /* ? operating system */
+# error Operating system not discriminated. Only UNIX and Windows are currently recognised by PlatformSTL
+#endif /* operating system */
+
#endif /* __cplusplus */
#if !defined(__cplusplus)
@@ -4,11 +4,11 @@
* Purpose: Runtime checking for numeric conversions.
*
* Created: 10th August 2006
- * Updated: 3rd February 2010
+ * Updated: 24th November 2011
*
* Home: http://stlsoft.org/
*
- * Copyright (c) 2006-2010, Matthew Wilson and Synesis Software
+ * Copyright (c) 2006-2011, Matthew Wilson and Synesis Software
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -50,8 +50,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define STLSOFT_VER_STLSOFT_CONVERSION_HPP_TRUNCATION_TEST_MAJOR 1
# define STLSOFT_VER_STLSOFT_CONVERSION_HPP_TRUNCATION_TEST_MINOR 0
-# define STLSOFT_VER_STLSOFT_CONVERSION_HPP_TRUNCATION_TEST_REVISION 5
-# define STLSOFT_VER_STLSOFT_CONVERSION_HPP_TRUNCATION_TEST_EDIT 47
+# define STLSOFT_VER_STLSOFT_CONVERSION_HPP_TRUNCATION_TEST_REVISION 6
+# define STLSOFT_VER_STLSOFT_CONVERSION_HPP_TRUNCATION_TEST_EDIT 48
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -89,6 +89,9 @@
#if defined(STLSOFT_UNITTEST) || \
defined(_DEBUG)
# include <typeinfo>
+# if defined(STLSOFT_COMPILER_IS_MSVC)
+# include <crtdbg.h>
+# endif /* VC++ */
#endif /* STLSOFT_UNITTEST || _DEBUG */
/* /////////////////////////////////////////////////////////////////////////
@@ -171,11 +174,19 @@ template< ss_typename_param_k TO
inline bool truncation_test_helper_runtime_test_different_sign_FROM_is_signed(FROM from, yes_type, TO)
{
#ifdef _DEBUG
- char const *TO_ = typeid(TO).name();
- char const *FROM_ = typeid(FROM).name();
+# if defined(STLSOFT_COMPILER_IS_MSVC)
+ int const flags = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
+ _CrtSetDbgFlag(flags & ~(_CRTDBG_ALLOC_MEM_DF));
+# endif /* VC++ */
+
+ char const* TO_ = typeid(TO).name();
+ char const* FROM_ = typeid(FROM).name();
STLSOFT_SUPPRESS_UNUSED(TO_);
STLSOFT_SUPPRESS_UNUSED(FROM_);
+# if defined(STLSOFT_COMPILER_IS_MSVC)
+ _CrtSetDbgFlag(flags);
+# endif /* VC++ */
#endif /* _DEBUG */
enum { TO_is_signed = is_signed_type<TO>::value };
@@ -245,11 +256,19 @@ template< ss_typename_param_k TO
inline bool truncation_test_helper_runtime_test_different_sign_FROM_is_signed(FROM from, no_type, TO)
{
#ifdef _DEBUG
- char const *TO_ = typeid(TO).name();
- char const *FROM_ = typeid(FROM).name();
+# if defined(STLSOFT_COMPILER_IS_MSVC)
+ int const flags = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
+ _CrtSetDbgFlag(flags & ~(_CRTDBG_ALLOC_MEM_DF));
+# endif /* VC++ */
+
+ char const* TO_ = typeid(TO).name();
+ char const* FROM_ = typeid(FROM).name();
STLSOFT_SUPPRESS_UNUSED(TO_);
STLSOFT_SUPPRESS_UNUSED(FROM_);
+# if defined(STLSOFT_COMPILER_IS_MSVC)
+ _CrtSetDbgFlag(flags);
+# endif /* VC++ */
#endif /* _DEBUG */
enum { TO_is_signed = is_signed_type<TO>::value };
@@ -289,11 +308,19 @@ template< ss_typename_param_k TO
inline bool truncation_test_helper_runtime_test_same_sign(FROM from, yes_type, TO) // The use of the dummy variable is to fix a bug with VC++ 5-7.0
{
#ifdef _DEBUG
- char const *TO_ = typeid(TO).name();
- char const *FROM_ = typeid(FROM).name();
+# if defined(STLSOFT_COMPILER_IS_MSVC)
+ int const flags = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
+ _CrtSetDbgFlag(flags & ~(_CRTDBG_ALLOC_MEM_DF));
+# endif /* VC++ */
+
+ char const* TO_ = typeid(TO).name();
+ char const* FROM_ = typeid(FROM).name();
STLSOFT_SUPPRESS_UNUSED(TO_);
STLSOFT_SUPPRESS_UNUSED(FROM_);
+# if defined(STLSOFT_COMPILER_IS_MSVC)
+ _CrtSetDbgFlag(flags);
+# endif /* VC++ */
#endif /* _DEBUG */
const ss_size_t sizeofFROM = sizeof(FROM);
@@ -326,11 +353,19 @@ template< ss_typename_param_k TO
inline bool truncation_test_helper_runtime_test_same_sign(FROM from, no_type, TO)
{
#ifdef _DEBUG
- char const *TO_ = typeid(TO).name();
- char const *FROM_ = typeid(FROM).name();
+# if defined(STLSOFT_COMPILER_IS_MSVC)
+ int const flags = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
+ _CrtSetDbgFlag(flags & ~(_CRTDBG_ALLOC_MEM_DF));
+# endif /* VC++ */
+
+ char const* TO_ = typeid(TO).name();
+ char const* FROM_ = typeid(FROM).name();
STLSOFT_SUPPRESS_UNUSED(TO_);
STLSOFT_SUPPRESS_UNUSED(FROM_);
+# if defined(STLSOFT_COMPILER_IS_MSVC)
+ _CrtSetDbgFlag(flags);
+# endif /* VC++ */
#endif /* _DEBUG */
enum { TO_is_signed = is_signed_type<TO>::value };
@@ -357,11 +392,19 @@ template< ss_typename_param_k TO
inline bool truncation_test_helper_runtime_test(FROM from, no_type, TO ) // The use of the dummy variable is to fix a bug with VC++ 5-7.0
{
#ifdef _DEBUG
- char const *TO_ = typeid(TO).name();
- char const *FROM_ = typeid(FROM).name();
+# if defined(STLSOFT_COMPILER_IS_MSVC)
+ int const flags = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
+ _CrtSetDbgFlag(flags & ~(_CRTDBG_ALLOC_MEM_DF));
+# endif /* VC++ */
+
+ char const* TO_ = typeid(TO).name();
+ char const* FROM_ = typeid(FROM).name();
STLSOFT_SUPPRESS_UNUSED(TO_);
STLSOFT_SUPPRESS_UNUSED(FROM_);
+# if defined(STLSOFT_COMPILER_IS_MSVC)
+ _CrtSetDbgFlag(flags);
+# endif /* VC++ */
#endif /* _DEBUG */
// Types are different
@@ -395,11 +438,19 @@ template< ss_typename_param_k TO
inline bool truncation_test_(FROM from, TO dummy = TO()) // The use of the dummy variable is to fix a bug with VC++ 5-7.0
{
#ifdef _DEBUG
- char const *TO_ = typeid(TO).name();
- char const *FROM_ = typeid(FROM).name();
+# if defined(STLSOFT_COMPILER_IS_MSVC)
+ int const flags = _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG);
+ _CrtSetDbgFlag(flags & ~(_CRTDBG_ALLOC_MEM_DF));
+# endif /* VC++ */
+
+ char const* TO_ = typeid(TO).name();
+ char const* FROM_ = typeid(FROM).name();
STLSOFT_SUPPRESS_UNUSED(TO_);
STLSOFT_SUPPRESS_UNUSED(FROM_);
+# if defined(STLSOFT_COMPILER_IS_MSVC)
+ _CrtSetDbgFlag(flags);
+# endif /* VC++ */
#endif /* _DEBUG */
// First, we must check that the types are compatible, with constraints
Oops, something went wrong.

0 comments on commit 20ed5ef

Please sign in to comment.