Permalink
Browse files

Imported upstream 1.9.105

Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
  • Loading branch information...
1 parent 88f3cac commit 746925fbe96acd190b7267086a0e100de1497bce Stefan Naewe committed Aug 2, 2012
View
54 CHANGES.txt
@@ -2,7 +2,7 @@
STLSoft - Changes
; Created: 29th March 2002
-; Updated: 22nd November 2010
+; Updated: 27th December 2010
============================================================================
@@ -19,6 +19,58 @@ STLSoft - Changes
============================================================================
+Changes for 1.9.105 (27th December 2010)
+
+Summary:
+========
+
+ * several new minor facilities in stlsoft::frequency_map
+ * improved compiler-compatibility in stlsoft::multibyte2wide and stlsoft::wide2multibyte
+ * WinSTL now recognises Win64 architecture when _WIN64 is defined even when WIN64 is not
+
+
+Changes:
+========
+
+ STLSoft:
+ ========
+
+ ~ stlsoft/containers/frequency_map.hpp:
+ + added member function operator +=()
+ + added non-member function operator +()
+ + added total() method
+ + added class invariant and enforcements
+
+ ~ stlsoft/conversion/char_conversions.hpp:
+ ~ GCC compatibility
+
+ ~ stlsoft/shims/access/string/std/exception.hpp:
+ ~ suppressed trivial unused warning
+
+ UNIXSTL:
+ ========
+
+ ~ unixstl/filesystem/path.hpp:
+ ~ minor refactoring, to avoid use of str_n_copy() and str_cat()
+
+ ~ unixstl/filesystem/readdir_sequence.hpp:
+ ~ refactored to remove use of str_n_copy()
+
+ WinSTL:
+ =======
+
+ ~ winstl/filesystem/path.hpp:
+ ~ trivial refactoring
+
+ ~ winstl/window/functions.h:
+ ~ VC++/-Wp64 warning suppression
+
+ ~ winstl/winstl.h:
+ ~ now recognises _WIN64 (without WIN64) when defining architecture as WINSTL_OS_IS_WIN64, and emits a pragma message nag (for supporting compilers)
+
+
+============================================================================
+
Changes for 1.9.104 (22nd November 2010)
Summary:
View
10 HISTORY.txt
@@ -2,11 +2,19 @@
STLSoft - History
; Created: 29th March 2002
-; Updated: 22nd November 2010
+; Updated: 27th December 2010
============================================================================
+27th December 2010 - 1.9.105 released
+-------------------------------------
+
+ * several new minor facilities in stlsoft::frequency_map
+ * improved compiler-compatibility in stlsoft::multibyte2wide and stlsoft::wide2multibyte
+ * WinSTL now recognises Win64 architecture when _WIN64 is defined even when WIN64 is not
+
+
22nd November 2010 - 1.9.104 released
-------------------------------------
View
111 HOW_YOU_CAN_HELP.txt
@@ -0,0 +1,111 @@
+============================================================================
+STLSoft - How You Can Help
+
+; Created: 27th December 2010
+; Updated: 27th December 2010
+
+============================================================================
+
+
+
+There are several ways in which you can help the STLSoft project:
+
+ 1. Defect reports
+ 2. Feature requests
+ 3. Volunteer your help
+ 4. Sponsor development
+ 5. Write articles, blog-posts about your experiences
+ 6. Help flesh out the Wikipedia page for STLSoft
+
+
+1. Defect reports
+-----------------
+
+We're very keen to hear of any problems you have in using the libraries.
+
+If you're unsure whether your issue is a genuine defect in the library, we
+ask that you post a description of your problem on the project Help Forum,
+located at:
+
+ https://sourceforge.net/projects/stlsoft/forums/forum/864084
+
+If you're sure that your issue is a genuine defect, please feel free to
+submit an item in the project Bug Tracker, located at:
+
+ https://sourceforge.net/tracker/?group_id=238860&atid=1107746
+
+In either case, please help us to help you by submitting as much information
+about the problem as you think is relevant, including:
+
+ * the compiler you're using
+ * the architecture and operating system you're targeting
+ * the version of STLSoft
+ * the version of other 3rd-party libraries, such as Boost, Loki, ...
+ * whether you're building using the makefiles or via an IDE
+ * a section of the build output, including the warnings/errors involved
+
+
+2. Feature requests
+-------------------
+
+If there are features that you think would enhance the libraries, please
+feel free to share your ideas.
+
+If you're precisely sure what you need, please feel free to start a
+conversation on the Open Discussion Forum, located at:
+
+ https://sourceforge.net/projects/stlsoft/forums/forum/864083
+
+If you're clear of what you need, please feel free to submit an item in the
+project Feature Request Tracker, located at:
+
+ https://sourceforge.net/tracker/?group_id=238860&atid=1107749
+
+
+3. Volunteer your help
+----------------------
+
+If you have any components you'd like to submit to the libraries, or you
+would like to offer any other help, please get in contact.
+
+In particular, at the moment we're hoping to move to redevelop the STLSoft
+website using MediaWiki (on SourceForge) and we'd be very keen to hear
+from anyone who has skills in this area (as we don't!)
+
+If you wish to help out in any way, please get in contact at via the Open
+Discussion Forum, located at:
+
+ https://sourceforge.net/projects/stlsoft/forums/forum/864083
+
+
+4. Sponsor development
+----------------------
+
+If you value the diligence and effort that's gone into bringing you this
+software, please make a donation to the project, via:
+
+ https://sourceforge.net/project/project_donations.php?group_id=238860
+
+
+5. Write articles, blog-posts about your experiences
+----------------------------------------------------
+
+If you've written articles or blogged about STLSoft, let us know and we'll
+list them on the website, at:
+
+ http://www.stlsoft.org/
+
+If you haven't yet, please consider doing so.
+
+
+6. Help flesh out the Wikipedia page for STLSoft
+------------------------------------------------
+
+Martin Moene has made a great start with the STLSoft Wikipedia page, but
+there's lots more to be done. You can help out by updating the STLSoft
+Wikipedia page at:
+
+ http://en.wikipedia.org/wiki/STLSoft
+
+
+=============================== End of file ================================
View
12 INSTALL.txt
@@ -2,7 +2,7 @@
STLSoft - Install
; Created: 29th March 2002
-; Updated: 22nd November 2010
+; Updated: 27th December 2010
============================================================================
@@ -11,16 +11,16 @@ STLSoft - Install
It is recommended that you define an STLSOFT environment variable.
For example, if you're using UNIX and you install
- to /usr/local/stlsoft/stlsoft-1.9.104 then you should set the environment
- variable STLSOFT to /usr/local/stlsoft/stlsoft-1.9.104 in which case the
+ to /usr/local/stlsoft/stlsoft-1.9.105 then you should set the environment
+ variable STLSOFT to /usr/local/stlsoft/stlsoft-1.9.105 in which case the
file stlsoft/stlsoft.h will be located in
$STLSOFT/include/stlsoft/stlsoft.h
Conversely, if you're using Windows and you intall
- to C:\3pty\STLSoft\stlsoft-1.9.104 then you should set the environment
- variable STLSoft to C:\3pty\STLSoft\stlsoft-1.9.104 in which case the
+ to C:\3pty\STLSoft\stlsoft-1.9.105 then you should set the environment
+ variable STLSoft to C:\3pty\STLSoft\stlsoft-1.9.105 in which case the
file stlsoft/stlsoft.h will be located in
- C:\3pty\STLSoft\stlsoft-1.9.104\stlsoft\stlsoft.h
+ C:\3pty\STLSoft\stlsoft-1.9.105\stlsoft\stlsoft.h
The makefiles / project files of several other open-source projects expect
this symbol, including:
View
4 NEWS.txt
@@ -2,13 +2,15 @@
STLSoft - News
; Created: 29th March 2002
-; Updated: 22nd November 2010
+; Updated: 27th December 2010
============================================================================
News:
+ 27th December 2010 - Release of STLSoft 1.9.105
+
22nd November 2010 - Release of STLSoft 1.9.104
21st November 2010 - Release of STLSoft 1.9.103
View
98 include/stlsoft/containers/frequency_map.hpp
@@ -4,7 +4,7 @@
* Purpose: A container that measures the frequency of the unique elements it contains.
*
* Created: 1st October 2005
- * Updated: 6th May 2010
+ * Updated: 12th December 2010
*
* Home: http://stlsoft.org/
*
@@ -50,9 +50,9 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define STLSOFT_VER_STLSOFT_CONTAINERS_HPP_FREQUENCY_MAP_MAJOR 2
-# define STLSOFT_VER_STLSOFT_CONTAINERS_HPP_FREQUENCY_MAP_MINOR 1
+# define STLSOFT_VER_STLSOFT_CONTAINERS_HPP_FREQUENCY_MAP_MINOR 3
# define STLSOFT_VER_STLSOFT_CONTAINERS_HPP_FREQUENCY_MAP_REVISION 1
-# define STLSOFT_VER_STLSOFT_CONTAINERS_HPP_FREQUENCY_MAP_EDIT 23
+# define STLSOFT_VER_STLSOFT_CONTAINERS_HPP_FREQUENCY_MAP_EDIT 25
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -141,8 +141,12 @@ class frequency_map
public: // Construction
/// Creates an instance of the map
frequency_map()
+ : m_map()
+ , m_total(0)
{
STLSOFT_STATIC_ASSERT(0 != stlsoft::is_integral_type<N>::value);
+
+ STLSOFT_ASSERT(is_valid());
}
public: // Modifiers
@@ -156,7 +160,9 @@ class frequency_map
/// entry cannot be added,
count_type push(key_type const& key)
{
- return ++m_map[key];
+ STLSOFT_ASSERT(is_valid());
+
+ count_type r = ++m_map[key];
#if 0
// NOTE: Because the count type N must be an integer, the code above
@@ -177,40 +183,68 @@ class frequency_map
return ++(*it).second;
}
#endif /* 0 */
+
+ ++m_total;
+
+ STLSOFT_ASSERT(is_valid());
+
+ return r;
}
/// Removes all entries from the map
void clear()
{
+ STLSOFT_ASSERT(is_valid());
+
m_map.clear();
+ m_total = 0u;
+
+ STLSOFT_ASSERT(is_valid());
}
/// Merges in all entries from the given map
class_type& merge(class_type const& rhs)
{
- class_type t(*this);
+ STLSOFT_ASSERT(is_valid());
+
+ class_type t(*this);
{ for(const_iterator i = rhs.begin(); i != rhs.end(); ++i)
{
t.m_map[(*i).first] += (*i).second;
}}
+ t.m_total += rhs.m_total;
t.swap(*this);
+ STLSOFT_ASSERT(is_valid());
+
return *this;
}
+ class_type& operator +=(class_type const& rhs)
+ {
+ return merge(rhs);
+ }
+
/// Swaps the state of the given instance with this instance
void swap(class_type& rhs) stlsoft_throw_0()
{
+ STLSOFT_ASSERT(is_valid());
+
std_swap(m_map, rhs.m_map);
+ std_swap(m_total, rhs.m_total);
+
+ STLSOFT_ASSERT(is_valid());
}
public: // Search
/// Returns an iterator for the entry representing the given key, or
/// <code>end()</code> if no such entry exists.
const_iterator find(key_type const& key) const
{
+ STLSOFT_ASSERT(is_valid());
+
return m_map.find(key);
}
@@ -219,13 +253,17 @@ class frequency_map
/// key, or 0 if no such entry exists.
count_type operator [](key_type const& key) const
{
+ STLSOFT_ASSERT(is_valid());
+
return count(key);
}
/// Returns the count associated with the entry representing the given
/// key, or 0 if no such entry exists.
count_type count(key_type const& key) const
{
+ STLSOFT_ASSERT(is_valid());
+
const_iterator it = m_map.find(key);
return (m_map.end() != it) ? (*it).second : 0;
@@ -235,36 +273,81 @@ class frequency_map
/// Indicates whether the map is empty
bool_type empty() const
{
+ STLSOFT_ASSERT(is_valid());
+
return m_map.empty();
}
- /// The number of entries in the map
+ /// The number of unique entries in the map
///
/// \remarks This may not be the same as the number of calls to
/// <code>push()</code>
size_type size() const
{
+ STLSOFT_ASSERT(is_valid());
+
return m_map.size();
}
+ /// The number of non-unique entries in the map
+ ///
+ /// \remarks This may not be the same as the number of calls to
+ /// <code>push()</code>
+ count_type total() const
+ {
+ STLSOFT_ASSERT(is_valid());
+
+ return m_total;
+ }
+
public: // Iteration
/// A non-mutating (const) iterator representing the start of the sequence
const_iterator begin() const
{
+ STLSOFT_ASSERT(is_valid());
+
return m_map.begin();
}
/// A non-mutating (const) iterator representing the end-point of the sequence
const_iterator end() const
{
+ STLSOFT_ASSERT(is_valid());
+
return m_map.end();
}
+private:
+ bool is_valid() const
+ {
+ return m_map.empty() == (0u == m_total);
+ }
+
private: // Member Variables
map_type_ m_map;
+ count_type m_total;
};
/* /////////////////////////////////////////////////////////////////////////
- * swapping
+ * Operators
+ */
+
+template< ss_typename_param_k T
+ , ss_typename_param_k N
+ >
+inline frequency_map<T, N> operator +(
+ frequency_map<T, N> const& lhs
+, frequency_map<T, N> const& rhs
+)
+{
+ frequency_map<T, N> r(lhs);
+
+ r += rhs;
+
+ return r;
+}
+
+/* /////////////////////////////////////////////////////////////////////////
+ * Swapping
*/
#if !defined(STLSOFT_COMPILER_IS_WATCOM)
@@ -279,6 +362,7 @@ inline void swap(
{
lhs.swap(rhs);
}
+
#endif /* compiler */
/* /////////////////////////////////////////////////////////////////////////
View
30 include/stlsoft/conversion/char_conversions.hpp
@@ -4,7 +4,7 @@
* Purpose: Character-encoding scheme interconversion components.
*
* Created: 31st May 2003
- * Updated: 22nd March 2010
+ * Updated: 21st December 2010
*
* Home: http://stlsoft.org/
*
@@ -51,8 +51,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define STLSOFT_VER_STLSOFT_CONVERSION_HPP_CHAR_CONVERSIONS_MAJOR 5
# define STLSOFT_VER_STLSOFT_CONVERSION_HPP_CHAR_CONVERSIONS_MINOR 1
-# define STLSOFT_VER_STLSOFT_CONVERSION_HPP_CHAR_CONVERSIONS_REVISION 1
-# define STLSOFT_VER_STLSOFT_CONVERSION_HPP_CHAR_CONVERSIONS_EDIT 93
+# define STLSOFT_VER_STLSOFT_CONVERSION_HPP_CHAR_CONVERSIONS_REVISION 2
+# define STLSOFT_VER_STLSOFT_CONVERSION_HPP_CHAR_CONVERSIONS_EDIT 94
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -245,7 +245,17 @@ class multibyte2wide
/// \name Not to be implemented
/// @{
private:
+# if defined(STLSOFT_COMPILER_IS_GCC)
+public:
+ multibyte2wide(multibyte2wide const& rhs)
+ : parent_class_type(rhs.parent_class_type::size())
+ {
+ ::memcpy(this->parent_class_type::data(), rhs.parent_class_type::data(), this->parent_class_type::size());
+ }
+private:
+# else /* compiler */
multibyte2wide(multibyte2wide const&);
+# endif /* compiler */
multibyte2wide& operator =(multibyte2wide const&);
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
@@ -370,10 +380,22 @@ class wide2multibyte
}
/// @}
-// Not to be implemented
+/// \name Not to be implemented
+/// @{
private:
+# if defined(STLSOFT_COMPILER_IS_GCC)
+public:
+ wide2multibyte(wide2multibyte const& rhs)
+ : parent_class_type(rhs.parent_class_type::size())
+ {
+ ::memcpy(this->parent_class_type::data(), rhs.parent_class_type::data(), this->parent_class_type::size());
+ }
+private:
+# else /* compiler */
wide2multibyte(wide2multibyte const&);
+# endif /* compiler */
wide2multibyte& operator =(wide2multibyte const&);
+/// @}
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
};
View
8 include/stlsoft/shims/access/string/std/exception.hpp
@@ -4,7 +4,7 @@
* Purpose: Contains the string access shims for std::exception.
*
* Created: 2nd May 2003
- * Updated: 22nd November 2010
+ * Updated: 29th November 2010
*
* Home: http://stlsoft.org/
*
@@ -51,8 +51,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define _STLSOFT_VER_STLSOFT_SHIMS_ACCESS_STRING_STD_HPP_EXCEPTION_MAJOR 2
# define _STLSOFT_VER_STLSOFT_SHIMS_ACCESS_STRING_STD_HPP_EXCEPTION_MINOR 2
-# define _STLSOFT_VER_STLSOFT_SHIMS_ACCESS_STRING_STD_HPP_EXCEPTION_REVISION 4
-# define _STLSOFT_VER_STLSOFT_SHIMS_ACCESS_STRING_STD_HPP_EXCEPTION_EDIT 40
+# define _STLSOFT_VER_STLSOFT_SHIMS_ACCESS_STRING_STD_HPP_EXCEPTION_REVISION 5
+# define _STLSOFT_VER_STLSOFT_SHIMS_ACCESS_STRING_STD_HPP_EXCEPTION_EDIT 41
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -196,6 +196,8 @@ struct ximpl_stlsoft_shims_access_string_std_exception_
{
#ifdef STLSOFT_CF_EXCEPTION_SUPPORT
STLSOFT_THROW_X(conversion_error(message, err));
+#else /* ?STLSOFT_CF_EXCEPTION_SUPPORT */
+ STLSOFT_SUPPRESS_UNUSED(message);
#endif /* STLSOFT_CF_EXCEPTION_SUPPORT */
return err;
View
11 include/stlsoft/stlsoft.h
@@ -6,7 +6,7 @@
* types.
*
* Created: 15th January 2002
- * Updated: 22nd November 2010
+ * Updated: 21st December 2010
*
* Home: http://stlsoft.org/
*
@@ -54,8 +54,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define STLSOFT_VER_STLSOFT_H_STLSOFT_MAJOR 3
# define STLSOFT_VER_STLSOFT_H_STLSOFT_MINOR 23
-# define STLSOFT_VER_STLSOFT_H_STLSOFT_REVISION 6
-# define STLSOFT_VER_STLSOFT_H_STLSOFT_EDIT 412
+# define STLSOFT_VER_STLSOFT_H_STLSOFT_REVISION 7
+# define STLSOFT_VER_STLSOFT_H_STLSOFT_EDIT 413
#else /* ? STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* # include "./internal/doxygen_defs.h" */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
@@ -267,12 +267,13 @@
# define _STLSOFT_VER_1_9_102 0x010966ff /*!< Version 1.9.102 (8th November 2010) */
# define _STLSOFT_VER_1_9_103 0x010967ff /*!< Version 1.9.103 (20th November 2010) */
# define _STLSOFT_VER_1_9_104 0x010968ff /*!< Version 1.9.104 (22nd November 2010) */
+# define _STLSOFT_VER_1_9_105 0x010969ff /*!< Version 1.9.105 (22nd December 2010) */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
#define _STLSOFT_VER_MAJOR 1
#define _STLSOFT_VER_MINOR 9
-#define _STLSOFT_VER_REVISION 103
-#define _STLSOFT_VER _STLSOFT_VER_1_9_104
+#define _STLSOFT_VER_REVISION 105
+#define _STLSOFT_VER _STLSOFT_VER_1_9_105
/* /////////////////////////////////////////////////////////////////////////
* Basic macros
View
43 include/unixstl/filesystem/path.hpp
@@ -4,7 +4,7 @@
* Purpose: Simple class that represents a path.
*
* Created: 1st May 1993
- * Updated: 27th July 2010
+ * Updated: 29th November 2010
*
* Thanks to: Pablo Aguilar for reporting defect in push_ext() (which
* doesn't work for wide-string builds).
@@ -53,8 +53,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define UNIXSTL_VER_UNIXSTL_FILESYSTEM_HPP_PATH_MAJOR 6
# define UNIXSTL_VER_UNIXSTL_FILESYSTEM_HPP_PATH_MINOR 6
-# define UNIXSTL_VER_UNIXSTL_FILESYSTEM_HPP_PATH_REVISION 3
-# define UNIXSTL_VER_UNIXSTL_FILESYSTEM_HPP_PATH_EDIT 235
+# define UNIXSTL_VER_UNIXSTL_FILESYSTEM_HPP_PATH_REVISION 4
+# define UNIXSTL_VER_UNIXSTL_FILESYSTEM_HPP_PATH_EDIT 236
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -193,7 +193,7 @@ class basic_path
{
m_len = stlsoft_ns_qual(c_str_len)(s);
- traits_type::str_n_copy(&m_buffer[0], stlsoft_ns_qual(c_str_data)(s), m_len);
+ traits_type::char_copy(&m_buffer[0], stlsoft_ns_qual(c_str_data)(s), m_len);
m_buffer[m_len] = '\0';
}
#endif /* STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT */
@@ -356,8 +356,7 @@ class basic_path
class_type& operator_equal_(char_type const* path);
void swap(class_type& rhs);
- class_type& concat_(char_type const* rhs);
- class_type& concat_(class_type const& rhs);
+ class_type& concat_(char_type const* rhs, size_type cch);
static char_type const *next_slash_or_end(char_type const* p);
static char_type path_name_separator_alt();
@@ -827,20 +826,16 @@ template< ss_typename_param_k C
, ss_typename_param_k T
, ss_typename_param_k A
>
-inline ss_typename_param_k basic_path<C, T, A>::class_type& basic_path<C, T, A>::concat_(ss_typename_param_k basic_path<C, T, A>::char_type const* rhs)
-{
- m_len = traits_type::str_len(traits_type::str_cat(&m_buffer[0], rhs));
-
- return *this;
-}
-
-template< ss_typename_param_k C
- , ss_typename_param_k T
- , ss_typename_param_k A
- >
-inline ss_typename_param_k basic_path<C, T, A>::class_type& basic_path<C, T, A>::concat_(basic_path<C, T, A> const& rhs)
-{
- m_len = traits_type::str_len(traits_type::str_cat(&m_buffer[0], rhs.c_str()));
+inline
+ss_typename_param_k basic_path<C, T, A>::class_type&
+basic_path<C, T, A>::concat_(
+ ss_typename_param_k basic_path<C, T, A>::char_type const* rhs
+, ss_typename_param_k basic_path<C, T, A>::size_type cch
+)
+{
+ traits_type::char_copy(&m_buffer[0] + m_len, rhs, cch);
+ m_len += cch;
+ m_buffer[m_len] = '\0';
return *this;
}
@@ -983,7 +978,7 @@ inline basic_path<C, T, A>& basic_path<C, T, A>::push(char_type const* rhs, us_b
class_type newPath(*this);
newPath.push_sep();
- newPath.concat_(rhs);
+ newPath.concat_(rhs, traits_type::str_len(rhs));
if(bAddPathNameSeparator)
{
newPath.push_sep();
@@ -1021,9 +1016,9 @@ inline basic_path<C, T, A>& basic_path<C, T, A>::push_ext(char_type const* rhs,
{
static char_type const s_dot[] = { '.', '\0' };
- newPath.concat_('.', 1u);
+ newPath.concat_(&s_dot[0], 1u);
}
- newPath.concat_(rhs);
+ newPath.concat_(rhs, traits_type::str_len(rhs));
if(bAddPathNameSeparator)
{
newPath.push_sep();
@@ -1409,7 +1404,7 @@ inline basic_path<C, T, A>& basic_path<C, T, A>::canonicalise(us_bool_t bRemoveT
for(i = 0; i < parts.size(); ++i)
{
- traits_type::str_n_copy(dest, parts[i].p, parts[i].len);
+ traits_type::char_copy(dest, parts[i].p, parts[i].len);
dest += parts[i].len;
}
View
11 include/unixstl/filesystem/readdir_sequence.hpp
@@ -4,7 +4,7 @@
* Purpose: readdir_sequence class.
*
* Created: 15th January 2002
- * Updated: 12th January 2010
+ * Updated: 29th November 2010
*
* Home: http://stlsoft.org/
*
@@ -50,8 +50,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define UNIXSTL_VER_UNIXSTL_FILESYSTEM_HPP_READDIR_SEQUENCE_MAJOR 5
# define UNIXSTL_VER_UNIXSTL_FILESYSTEM_HPP_READDIR_SEQUENCE_MINOR 1
-# define UNIXSTL_VER_UNIXSTL_FILESYSTEM_HPP_READDIR_SEQUENCE_REVISION 7
-# define UNIXSTL_VER_UNIXSTL_FILESYSTEM_HPP_READDIR_SEQUENCE_EDIT 126
+# define UNIXSTL_VER_UNIXSTL_FILESYSTEM_HPP_READDIR_SEQUENCE_REVISION 8
+# define UNIXSTL_VER_UNIXSTL_FILESYSTEM_HPP_READDIR_SEQUENCE_EDIT 127
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -520,14 +520,15 @@ inline /* static */ readdir_sequence::string_type readdir_sequence::prepare_dire
if(absolutePath & flags)
{
- n = traits_type::get_full_path_name(directory, path.size(), &path[0]);
+ n = traits_type::get_full_path_name(directory, path.size() - 1u, &path[0]);
if(0 == n)
{
#ifdef STLSOFT_CF_EXCEPTION_SUPPORT
STLSOFT_THROW_X(readdir_sequence_exception("Failed to enumerate directory", errno));
#else /* ? STLSOFT_CF_EXCEPTION_SUPPORT */
- traits_type::str_n_copy(&path[0], directory, path.size());
+ traits_type::char_copy(&path[0], directory, n);
+ path[n] = \'0';
#endif /* STLSOFT_CF_EXCEPTION_SUPPORT */
}
}
View
28 include/winstl/filesystem/path.hpp
@@ -4,7 +4,7 @@
* Purpose: Simple class that represents a path.
*
* Created: 1st May 1993
- * Updated: 1st August 2010
+ * Updated: 29th November 2010
*
* Thanks to: Pablo Aguilar for reporting defect in push_ext() (which
* doesn't work for wide-string builds).
@@ -54,7 +54,7 @@
# define WINSTL_VER_WINSTL_FILESYSTEM_HPP_PATH_MAJOR 6
# define WINSTL_VER_WINSTL_FILESYSTEM_HPP_PATH_MINOR 6
# define WINSTL_VER_WINSTL_FILESYSTEM_HPP_PATH_REVISION 20
-# define WINSTL_VER_WINSTL_FILESYSTEM_HPP_PATH_EDIT 260
+# define WINSTL_VER_WINSTL_FILESYSTEM_HPP_PATH_EDIT 261
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -440,9 +440,6 @@ class basic_path
class_type& push_sep_(char_type sep);
void swap(class_type& rhs);
class_type& concat_(char_type const* rhs, size_type cch);
-#if 0
- class_type& concat_(class_type const& rhs, size_type cch);
-#endif /* 0 */
bool_type has_dir_end_() const;
@@ -986,8 +983,12 @@ template< ss_typename_param_k C
, ss_typename_param_k T
, ss_typename_param_k A
>
-inline ss_typename_param_k basic_path<C, T, A>::class_type&
-basic_path<C, T, A>::concat_(ss_typename_param_k basic_path<C, T, A>::char_type const* rhs, ss_typename_param_k basic_path<C, T, A>::size_type cch)
+inline
+ss_typename_param_k basic_path<C, T, A>::class_type&
+basic_path<C, T, A>::concat_(
+ ss_typename_param_k basic_path<C, T, A>::char_type const* rhs
+, ss_typename_param_k basic_path<C, T, A>::size_type cch
+)
{
traits_type::char_copy(&m_buffer[0] + m_len, rhs, cch);
m_len += cch;
@@ -996,19 +997,6 @@ basic_path<C, T, A>::concat_(ss_typename_param_k basic_path<C, T, A>::char_type
return *this;
}
-#if 0
-template< ss_typename_param_k C
- , ss_typename_param_k T
- , ss_typename_param_k A
- >
-inline ss_typename_param_k basic_path<C, T, A>::class_type& basic_path<C, T, A>::concat_(basic_path<C, T, A> const& rhs)
-{
- return concat_(rhs.data(), rhs.size());
-
- return *this;
-}
-#endif /* 0 */
-
template< ss_typename_param_k C
, ss_typename_param_k T
, ss_typename_param_k A
View
18 include/winstl/window/functions.h
@@ -50,8 +50,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define WINSTL_VER_WINSTL_WINDOW_H_FUNCTIONS_MAJOR 4
# define WINSTL_VER_WINSTL_WINDOW_H_FUNCTIONS_MINOR 0
-# define WINSTL_VER_WINSTL_WINDOW_H_FUNCTIONS_REVISION 10
-# define WINSTL_VER_WINSTL_WINDOW_H_FUNCTIONS_EDIT 66
+# define WINSTL_VER_WINSTL_WINDOW_H_FUNCTIONS_REVISION 11
+# define WINSTL_VER_WINSTL_WINDOW_H_FUNCTIONS_EDIT 67
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/* /////////////////////////////////////////////////////////////////////////
@@ -250,7 +250,21 @@ STLSOFT_INLINE HINSTANCE winstl__GetWindowInstance(HWND hwnd)
const int index = GWL_HINSTANCE;
#endif /* width */
+ /* When compiling for Win32 with -Wp64, the conversion that we've catered
+ * for - by the use of winstl__get_window_sptrint_(), and by the above
+ * discrimination - is mistakenly reported as a truncation, so we need to
+ * suppress the warning nonetheless.
+ */
+#if defined(STLSOFT_COMPILER_IS_MSVC) && \
+ defined(_Wp64)
+# pragma warning(push)
+# pragma warning(disable : 4312)
+#endif
return stlsoft_reinterpret_cast(HINSTANCE, winstl__get_window_sptrint_(hwnd, index));
+#if defined(STLSOFT_COMPILER_IS_MSVC) && \
+ defined(_Wp64)
+# pragma warning(pop)
+#endif
}
#endif /* !NOWINOFFSETS */
View
23 include/winstl/winstl.h
@@ -5,7 +5,7 @@
* and platform discriminations, and definitions of types.
*
* Created: 15th January 2002
- * Updated: 30th August 2010
+ * Updated: 21st December 2010
*
* Home: http://stlsoft.org/
*
@@ -47,8 +47,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define WINSTL_VER_WINSTL_H_WINSTL_MAJOR 3
# define WINSTL_VER_WINSTL_H_WINSTL_MINOR 12
-# define WINSTL_VER_WINSTL_H_WINSTL_REVISION 3
-# define WINSTL_VER_WINSTL_H_WINSTL_EDIT 183
+# define WINSTL_VER_WINSTL_H_WINSTL_REVISION 4
+# define WINSTL_VER_WINSTL_H_WINSTL_EDIT 184
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
/** \file winstl/winstl.h
@@ -145,12 +145,13 @@
# define _WINSTL_VER_1_11_1 0x010b01ff /*!< Version 1.11.1 (with STLSoft 1.9.93) */
# define _WINSTL_VER_1_11_2 0x010b02ff /*!< Version 1.11.2 (with STLSoft 1.9.100) */
# define _WINSTL_VER_1_11_3 0x010b03ff /*!< Version 1.11.3 (with STLSoft 1.9.101) */
+# define _WINSTL_VER_1_11_4 0x010b04ff /*!< Version 1.11.3 (with STLSoft 1.9.105) */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */
#define _WINSTL_VER_MAJOR 1
#define _WINSTL_VER_MINOR 11
-#define _WINSTL_VER_REVISION 3
-#define _WINSTL_VER _WINSTL_VER_1_11_3
+#define _WINSTL_VER_REVISION 4
+#define _WINSTL_VER _WINSTL_VER_1_11_4
/* /////////////////////////////////////////////////////////////////////////
* Includes
@@ -221,8 +222,8 @@
*/
#if !defined(_STLSOFT_VER) || \
- _STLSOFT_VER < 0x010965ff
-# error This version of the WinSTL libraries requires STLSoft version 1.9.101, or later
+ _STLSOFT_VER < 0x010969ff
+# error This version of the WinSTL libraries requires STLSoft version 1.9.105, or later
#endif /* _STLSOFT_VER */
/* /////////////////////////////////////////////////////////////////////////
@@ -237,7 +238,13 @@
# undef WINSTL_OS_IS_WIN64
#endif /* WINSTL_OS_IS_WIN64 */
-#if defined(WIN64)
+#if defined(WIN64) || \
+ defined(_WIN64)
+# if !defined(WIN64)
+# ifdef _STLSOFT_COMPILE_VERBOSE
+# pragma message("Win64 platform targeted, as indicated by definition of _WIN64, but WIN64 is not defined: adjust your project/make settings to define WIN64")
+# endif /* _STLSOFT_COMPILE_VERBOSE */
+# endif /* !WIN64 */
# define WINSTL_OS_IS_WIN64
#elif defined(WIN32)
# define WINSTL_OS_IS_WIN32

0 comments on commit 746925f

Please sign in to comment.