Skip to content

Commit

Permalink
Imported upstream version 1.9.80
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Naewe <stefan.naewe@atlas-elektronik.com>
  • Loading branch information
Stefan Naewe committed May 29, 2009
1 parent eb3d181 commit 221bb54
Show file tree
Hide file tree
Showing 18 changed files with 296 additions and 142 deletions.
70 changes: 69 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
STLSoft - Changes

; Created: 29th March 2002
; Updated: 2nd May 2009
; Updated: 6th May 2009

============================================================================

Expand All @@ -18,6 +18,74 @@ STLSoft - Changes

============================================================================

Changes for 1.9.80 (6th May 2009)

Summary:
========

* now recognises support for variadic macros and #pragma once for later versions of Borland C/C++
* SunPro compatibility improvements for UNIXSTL synchronisation components
* fixes to defects in stlsoft::basic_simple_string at() and 5-parameter compare() methods
* basic_path class templates (both UNIXSTL and WinSTL versions) now implement assignment operator differently to avoid possibilities of infinite loops (which can happen when a type with an opposing string encoding is used)
* correction to stlsoft::auto_buffer to ensure allocators are involved in swap() operations
* correction to struct in_addr string access shims for compatibility with big-endian architectures
* various changes for compatibility with "safe string" library

Changes:
========

STLSoft:
========

~ include/stlsoft/algorithms/std/alt.hpp:
~ "safe string" library compatibility (via a workaround that just ignores it wrt std::find())

~ include/stlsoft/internal/cccap/borland.h:
~ STLSOFT_CF_PRAGMA_ONCE_SUPPORT support
~ STLSOFT_CF_SUPPORTS_VARIADIC_MACROS support

~ include/stlsoft/iterators/null_output_iterator.hpp:
~ suppression of compiler warning

~ include/stlsoft/memory/auto_buffer.hpp:
~ now swaps allocators

~ include/stlsoft/string/simple_string.hpp:
~ more "safe string" compatibility
~ fixed defective 5-parameter compare() method
~ fixed defect in non-mutating version of at(), whereby specifying the index == length did not throw, but returned a reference to the terminating nul character (which is what the subscript operator should do (and does do))

~ include/stlsoft/string/split_functions.hpp:
~ trivial formatting change

InetSTL:
========

~ include/inetstl/shims/access/string/std/in_addr.hpp:
~ use of ntohl(), so compatible with big-endian as well as little
~ compatibility with "safe string" library

UNIXSTL:
========

~ include/unixstl/filesystem/path.hpp:
~ changed implementation of generic operator =() in order to avoid possibilities of infinite loops (which can happen when a type with an opposing string encoding is used)
~ trivial documentation markup changes

~ include/unixstl/synch/process_mutex.hpp:
~ SunPro support (partially complete)

~ include/unixstl/synch/thread_mutex.hpp:
~ SunPro support (partially complete)

WinSTL:
=======

~ include/winstl/filesystem/path.hpp:
~ changed implementation of generic operator =() in order to avoid possibilities of infinite loops (which can happen when a type with an opposing string encoding is used)

============================================================================

Changes for 1.9.79 (2nd May 2009)

Summary:
Expand Down
14 changes: 13 additions & 1 deletion HISTORY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,23 @@
STLSoft - History

; Created: 29th March 2002
; Updated: 2nd May 2009
; Updated: 6th May 2009

============================================================================


6th May 2009 - 1.9.80 released
------------------------------

* now recognises support for variadic macros and #pragma once for later versions of Borland C/C++
* SunPro compatibility improvements for UNIXSTL synchronisation components
* fixes to defects in stlsoft::basic_simple_string at() and 5-parameter compare() methods
* basic_path class templates (both UNIXSTL and WinSTL versions) now implement assignment operator differently to avoid possibilities of infinite loops (which can happen when a type with an opposing string encoding is used)
* correction to stlsoft::auto_buffer to ensure allocators are involved in swap() operations
* correction to struct in_addr string access shims for compatibility with big-endian architectures
* various changes for compatibility with "safe string" library


2nd May 2009 - 1.9.79 released
------------------------------

Expand Down
6 changes: 3 additions & 3 deletions INSTALL.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
STLSoft - Install

; Created: 29th March 2002
; Updated: 2nd May 2009
; Updated: 6th May 2009

============================================================================

STLSoft is a 100% header-only library, and so requires no building.

It is recommended that you define an STLSOFT environment variable. For
example, if you install to /usr/local/stlsoft/stlsoft-1.9.79, then you
should set STLSOFT to /usr/local/stlsoft/stlsoft-1.9.79. In that case,
example, if you install to /usr/local/stlsoft/stlsoft-1.9.80, then you
should set STLSOFT to /usr/local/stlsoft/stlsoft-1.9.80. In that case,
the file stlsoft/stlsoft.h will be located in
$STLSOFT/include/stlsoft/stlsoft.h

Expand Down
4 changes: 3 additions & 1 deletion NEWS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
STLSoft - News

; Created: 29th March 2002
; Updated: 2nd May 2009
; Updated: 6th May 2009

============================================================================


News:

6th May 2009 - Release of STLSoft 1.9.80

2nd May 2009 - Release of STLSoft 1.9.79

27th Apr 2009 - Release of STLSoft 1.9.78
Expand Down
11 changes: 6 additions & 5 deletions include/inetstl/inetstl.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* and platform discriminations, and definitions of types.
*
* Created: 24th April 2004
* Updated: 1st May 2009
* Updated: 3rd May 2009
*
* Home: http://stlsoft.org/
*
Expand Down Expand Up @@ -47,8 +47,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define INETSTL_VER_INETSTL_H_INETSTL_MAJOR 3
# define INETSTL_VER_INETSTL_H_INETSTL_MINOR 5
# define INETSTL_VER_INETSTL_H_INETSTL_REVISION 1
# define INETSTL_VER_INETSTL_H_INETSTL_EDIT 47
# define INETSTL_VER_INETSTL_H_INETSTL_REVISION 2
# define INETSTL_VER_INETSTL_H_INETSTL_EDIT 48
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

/** \file inetstl/inetstl.h \brief [C, C++] The root header for the \ref group__project__inetstl "InetSTL" project. */
Expand Down Expand Up @@ -114,12 +114,13 @@
# define _INETSTL_VER_1_2_2 0x00010202 /*!< Version 1.2.2 (with STLSoft 1.9.25) */
# define _INETSTL_VER_1_2_3 0x010203ff /*!< Version 1.2.3 (with STLSoft 1.9.46) */
# define _INETSTL_VER_1_3_1 0x00010301 /*!< Version 1.3.1 (with STLSoft 1.9.79) */
# define _INETSTL_VER_1_3_2 0x00010302 /*!< Version 1.3.2 (with STLSoft 1.9.80) */
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

#define _INETSTL_VER_MAJOR 1
#define _INETSTL_VER_MINOR 3
#define _INETSTL_VER_REVISION 1
#define _INETSTL_VER _INETSTL_VER_1_3_1
#define _INETSTL_VER_REVISION 2
#define _INETSTL_VER _INETSTL_VER_1_3_2

/* /////////////////////////////////////////////////////////////////////////
* Includes
Expand Down
37 changes: 24 additions & 13 deletions include/inetstl/shims/access/string/std/in_addr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Purpose: String access shims for Internet types
*
* Created: 21st October 2006
* Updated: 1st May 2009
* Updated: 5th May 2009
*
* Home: http://stlsoft.org/
*
Expand Down Expand Up @@ -51,8 +51,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define INETSTL_VER_INETSTL_SHIMS_ACCESS_STRING_STD_HPP_IN_ADDR_MAJOR 1
# define INETSTL_VER_INETSTL_SHIMS_ACCESS_STRING_STD_HPP_IN_ADDR_MINOR 0
# define INETSTL_VER_INETSTL_SHIMS_ACCESS_STRING_STD_HPP_IN_ADDR_REVISION 4
# define INETSTL_VER_INETSTL_SHIMS_ACCESS_STRING_STD_HPP_IN_ADDR_EDIT 7
# define INETSTL_VER_INETSTL_SHIMS_ACCESS_STRING_STD_HPP_IN_ADDR_REVISION 6
# define INETSTL_VER_INETSTL_SHIMS_ACCESS_STRING_STD_HPP_IN_ADDR_EDIT 9
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

/* /////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -102,15 +102,22 @@ inline stlsoft::basic_shim_string<is_char_a_t, 16> c_str_data_a(struct in_addr c
{
stlsoft::basic_shim_string<is_char_a_t, 16> s(15);

unsigned b0 = (addr.s_addr & 0x000000ff) >> 0;
unsigned b1 = (addr.s_addr & 0x0000ff00) >> 8;
unsigned b2 = (addr.s_addr & 0x00ff0000) >> 16;
unsigned b3 = (addr.s_addr & 0xff000000) >> 24;
is_uint32_t laddr = ntohl(addr.s_addr);
unsigned b3 = (laddr & 0x000000ff) >> 0;
unsigned b2 = (laddr & 0x0000ff00) >> 8;
unsigned b1 = (laddr & 0x00ff0000) >> 16;
unsigned b0 = (laddr & 0xff000000) >> 24;
# ifdef STLSOFT_USING_SAFE_STR_FUNCTIONS
int cch = ::_snprintf_s(s.data(), s.size() + 1u, _TRUNCATE, "%u.%u.%u.%u", b0, b1, b2, b3);
int cch = ::_snprintf_s(
s.data()
, s.size() + 1u
, _TRUNCATE
# else /* ? STLSOFT_USING_SAFE_STR_FUNCTIONS */
int cch = ::sprintf(s.data(), "%u.%u.%u.%u", b0, b1, b2, b3);
int cch = ::sprintf(s.data()
# endif /* STLSOFT_USING_SAFE_STR_FUNCTIONS */
, "%u.%u.%u.%u"
, b0, b1, b2, b3
);

if(cch < 0)
{
Expand All @@ -124,10 +131,14 @@ inline stlsoft::basic_shim_string<is_char_a_t, 16> c_str_data_a(struct in_addr c

inline is_size_t c_str_len_a(struct in_addr const& addr)
{
unsigned b0 = (addr.s_addr & 0x000000ff) >> 0;
unsigned b1 = (addr.s_addr & 0x0000ff00) >> 8;
unsigned b2 = (addr.s_addr & 0x00ff0000) >> 16;
unsigned b3 = (addr.s_addr & 0xff000000) >> 24;
// Don't care about the byte order of the address, as we're only
// calculating length
is_uint32_t laddr = addr.s_addr;

unsigned b0 = (laddr & 0x000000ff) >> 0;
unsigned b1 = (laddr & 0x0000ff00) >> 8;
unsigned b2 = (laddr & 0x00ff0000) >> 16;
unsigned b3 = (laddr & 0xff000000) >> 24;

int cch = 3 // The dot separators
+ 1 + (b0 > 9) + (b0 > 99)
Expand Down
11 changes: 6 additions & 5 deletions include/stlsoft/algorithms/std/alt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* do or do not have a standard library.
*
* Created: 17th January 2002
* Updated: 10th August 2008
* Updated: 6th May 2009
*
* Home: http://stlsoft.org/
*
* Copyright (c) 2005-2008, Matthew Wilson and Synesis Software
* Copyright (c) 2005-2009, Matthew Wilson and Synesis Software
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -55,8 +55,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define STLSOFT_VER_STLSOFT_ALGORITHMS_STD_HPP_ALT_MAJOR 3
# define STLSOFT_VER_STLSOFT_ALGORITHMS_STD_HPP_ALT_MINOR 4
# define STLSOFT_VER_STLSOFT_ALGORITHMS_STD_HPP_ALT_REVISION 2
# define STLSOFT_VER_STLSOFT_ALGORITHMS_STD_HPP_ALT_EDIT 73
# define STLSOFT_VER_STLSOFT_ALGORITHMS_STD_HPP_ALT_REVISION 3
# define STLSOFT_VER_STLSOFT_ALGORITHMS_STD_HPP_ALT_EDIT 74
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

/* /////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -194,7 +194,8 @@ template< ss_typename_param_k I
// [[synesis:function:algorithm: std_copy(T<I> first, T<I> last, T<O> dest)]]
inline O std_copy(I first, I last, O dest)
{
#ifdef STLSOFT_CF_std_NAMESPACE
#if defined(STLSOFT_CF_std_NAMESPACE) && \
!defined(STLSOFT_USING_SAFE_STR_FUNCTIONS)
return stlsoft_ns_qual_std(copy)(first, last, dest);
#else /* ? STLSOFT_CF_std_NAMESPACE */
for(; first != last; ++first, ++dest)
Expand Down
16 changes: 10 additions & 6 deletions include/stlsoft/internal/cccap/borland.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* Purpose: Compiler feature discrimination for Borland C/C++.
*
* Created: 7th February 2003
* Updated: 11th May 2008
* Updated: 6th May 2009
*
* Home: http://stlsoft.org/
*
* Copyright (c) 2003-2008, Matthew Wilson and Synesis Software
* Copyright (c) 2003-2009, Matthew Wilson and Synesis Software
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -57,8 +57,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define STLSOFT_VER_H_STLSOFT_CCCAP_BORLAND_MAJOR 3
# define STLSOFT_VER_H_STLSOFT_CCCAP_BORLAND_MINOR 17
# define STLSOFT_VER_H_STLSOFT_CCCAP_BORLAND_REVISION 1
# define STLSOFT_VER_H_STLSOFT_CCCAP_BORLAND_EDIT 77
# define STLSOFT_VER_H_STLSOFT_CCCAP_BORLAND_REVISION 2
# define STLSOFT_VER_H_STLSOFT_CCCAP_BORLAND_EDIT 78
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

/* /////////////////////////////////////////////////////////////////////////
Expand All @@ -82,7 +82,9 @@
/* Support for #pragma once
*/

/* #define STLSOFT_CF_PRAGMA_ONCE_SUPPORT */
#if (__BORLANDC__ & 0xfff0) >= 0x0580
# define STLSOFT_CF_PRAGMA_ONCE_SUPPORT
#endif /* __BORLANDC__ */

/* Variadic Macros
*/
Expand All @@ -95,7 +97,9 @@
/* Variadic Macros
*/

/* #define STLSOFT_CF_SUPPORTS_VARIADIC_MACROS */
#if (__BORLANDC__ & 0xfff0) >= 0x0580
# define STLSOFT_CF_SUPPORTS_VARIADIC_MACROS
#endif /* __BORLANDC__ */

/* Types:
*/
Expand Down
9 changes: 5 additions & 4 deletions include/stlsoft/iterators/null_output_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
* Purpose: Null output iterator.
*
* Created: 18th February 2006
* Updated: 9th March 2008
* Updated: 6th May 2009
*
* Home: http://stlsoft.org/
*
* Copyright (c) 2006-2008, Matthew Wilson and Synesis Software
* Copyright (c) 2006-2009, Matthew Wilson and Synesis Software
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -51,8 +51,8 @@
#ifndef STLSOFT_DOCUMENTATION_SKIP_SECTION
# define STLSOFT_VER_STLSOFT_ITERATORS_HPP_NULL_OUTPUT_ITERATOR_MAJOR 1
# define STLSOFT_VER_STLSOFT_ITERATORS_HPP_NULL_OUTPUT_ITERATOR_MINOR 0
# define STLSOFT_VER_STLSOFT_ITERATORS_HPP_NULL_OUTPUT_ITERATOR_REVISION 3
# define STLSOFT_VER_STLSOFT_ITERATORS_HPP_NULL_OUTPUT_ITERATOR_EDIT 14
# define STLSOFT_VER_STLSOFT_ITERATORS_HPP_NULL_OUTPUT_ITERATOR_REVISION 4
# define STLSOFT_VER_STLSOFT_ITERATORS_HPP_NULL_OUTPUT_ITERATOR_EDIT 15
#endif /* !STLSOFT_DOCUMENTATION_SKIP_SECTION */

/* /////////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -167,6 +167,7 @@ class null_output_iterator
public:
void operator =(assigned_type const& value)
{
STLSOFT_SUPPRESS_UNUSED(value);
}

private:
Expand Down
Loading

0 comments on commit 221bb54

Please sign in to comment.