diff --git a/etc/c/recls/linux.mak b/etc/c/recls/linux.mak
deleted file mode 100644
index e19ef09ed..000000000
--- a/etc/c/recls/linux.mak
+++ /dev/null
@@ -1,80 +0,0 @@
-# ##############################################################################
-# File: makefile.unix
-#
-# Purpose: GCC 3.2+ makefile for the recls library (std.recls)
-#
-# Created: 24th November 2003
-# Updated: 24th November 2003
-#
-# Copyright: Synesis Software Pty Ltd, (c) 2003. All rights reserved.
-#
-# Home: www.synesis.com.au/software
-#
-# ##############################################################################
-
-# ##############################################################################
-# Macros
-
-CC = g++
-LD = g++
-AR = ar
-
-RECLS_INCLUDE = .
-RECLS_LIBDIR = .
-RECLS_SRCDIR = .
-
-STLSOFT_RECLS_PATCH_INCLUDE = #$(RECLS_INCLUDE)
-
-STLSOFT_INCLUDE = ../stlsoft
-
-F_WARN_ALL = -Wall
-F_WARN_AS_ERR = #
-F_OPT_SPEED = -O4
-F_TARG_PENTIUM = -mcpu=i686
-F_NOLOGO =
-
-
-CCFLAGS = $(F_WARN_ALL) $(F_WARN_AS_ERR) $(F_OPT_SPEED) $(F_TARG_PENTIUM) $(F_NOLOGO)
-CCDEFS = -DNDEBUG -DUNIX -D_M_IX86
-
-CCARGS = $(CCFLAGS) $(CCDEFS) -c -I. -I$(STLSOFT_INCLUDE)
-
-################################################################################
-# Objects
-
-OBJS_C = \
- ./recls_api.o \
- ./recls_fileinfo.o \
- ./recls_internal.o \
- ./recls_util.o \
- ./recls_api_unix.o \
- ./recls_fileinfo_unix.o \
- ./recls_util_unix.o
-
-
-################################################################################
-# Suffix rules
-
-.c.o:
- $(CC) $(CCARGS) -o$@ $?
-
-.cpp.o:
- $(CC) $(CCARGS) -o$@ $?
-
-################################################################################
-# Targets
-
-target: $(RECLS_LIBDIR)/librecls.a
-
-clean:
- @echo Cleaning targets
- @rm -f $(RECLS_LIBDIR)/librecls.a
- @rm -f $(OBJS_C)
- @rm -f *.map
-
-# executables
-
-$(RECLS_LIBDIR)/librecls.a: $(OBJS_C)
- $(AR) -r $@ $(OBJS_C)
-
-################################################################################
diff --git a/etc/c/recls/recls.h b/etc/c/recls/recls.h
deleted file mode 100644
index 95fae789d..000000000
--- a/etc/c/recls/recls.h
+++ /dev/null
@@ -1,655 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls.h
- *
- * Purpose: Main header file for the recls API.
- *
- * Created: 15th August 2003
- * Updated: 21st November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 RECLS_INCL_H_RECLS
-#define RECLS_INCL_H_RECLS
-
-/* File version */
-#ifndef RECLS_DOCUMENTATION_SKIP_SECTION
-# define RECLS_VER_H_RECLS_MAJOR 1
-# define RECLS_VER_H_RECLS_MINOR 5
-# define RECLS_VER_H_RECLS_REVISION 2
-# define RECLS_VER_H_RECLS_EDIT 24
-#endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
-
-/** \file recls.h The root header for the \ref group_recls API */
-
-/** \name recls API Version
- *
- * \ingroup group_recls
- */
-/** @{ */
-/** \def RECLS_VER_MAJOR The major version number of RECLS */
-
-/** \def RECLS_VER_MINOR The minor version number of RECLS */
-
-/** \def RECLS_VER_REVISION The revision version number of RECLS */
-
-/** \def RECLS_VER The current composite version number of RECLS */
-/** @} */
-
-/* recls version */
-#define RECLS_VER_MAJOR 1
-#define RECLS_VER_MINOR 2
-#define RECLS_VER_REVISION 1
-#define RECLS_VER_1_0_1 0x01000100
-#define RECLS_VER_1_1_1 0x01010100
-#define RECLS_VER_1_2_1 0x01020100
-#define RECLS_VER RECLS_VER_1_2_1
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Strictness
- */
-
-#ifndef RECLS_NO_STRICT
-# define RECLS_STRICT
-#endif /* !RECLS_NO_STRICT */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-/* Detects C & C++ things, such as namespace support */
-#include "recls_language.h"
-/* Includes platform-specific headers */
-#include "recls_platform.h"
-/* Includes stddef.h / cstddef, and defines the recls types: recls_s/uint8/16/32/64_t */
-#include "recls_compiler.h"
-/* Defines recls_filesize_t, recls_time_t */
-#include "recls_platform_types.h"
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-#if !defined(RECLS_NO_NAMESPACE)
-# define RECLS_QUAL(x) ::recls::x
-#else
-# define RECLS_QUAL(x) x
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Pre-processor discrimination
- */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Function specifications
- */
-
-/*** Defines the recls linkage and calling convention */
-#define RECLS_FNDECL(rt) RECLS_LINKAGE_C rt RECLS_CALLCONV_DEFAULT
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Typedefs
- */
-
-/* recls_rc_t */
-#ifdef __cplusplus
-
-/** The type of return codes issued by the API functions */
-typedef recls_sint32_t recls_rc_t;
-
-/** General success code */
-const recls_rc_t RECLS_RC_OK(0);
-/** General failure code */
-const recls_rc_t RECLS_RC_FAIL(-1);
-
-/** Returns non-zero if the given return code indicates failure */
-inline bool RECLS_FAILED(recls_rc_t const &rc)
-{
- return rc < 0;
-}
-
-/** Returns non-zero if the given return code indicates success */
-inline bool RECLS_SUCCEEDED(recls_rc_t const &rc)
-{
- return !RECLS_FAILED(rc);
-}
-
-#else /* ? __cplusplus */
-
-/** The type of return codes issued by the API functions */
-typedef recls_sint32_t recls_rc_t;
-
-/** General success code */
-#define RECLS_RC_OK (0)
-/** General failure code */
-#define RECLS_RC_FAIL (-1)
-
-/** Evaluates to non-zero if the given return code indicates failure */
-#define RECLS_FAILED(rc) ((rc) < 0)
-/** Evaluates to non-zero if the given return code indicates success */
-#define RECLS_SUCCEEDED(rc) (!FAILED(rc))
-
-#endif /* __cplusplus */
-
-
-/* hrecls_t */
-struct hrecls_t_;
-/** The handle to a recursive search operation */
-typedef struct hrecls_t_ const * hrecls_t;
-
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-/* Defines result codes */
-#include "recls_retcodes.h"
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Flags
- */
-
-/** \brief Search flags
- * \ingroup group_recls
- *
- * These flags moderate the search behaviour of the
- * \link recls::Recls_Search Recls_Search\endlink and
- * \link recls::Recls_SearchProcess Recls_SearchProcess\endlink functions.
- */
-enum RECLS_FLAG
-{
- RECLS_F_FILES = 0x00000001 /*!< Include files in search. Included by default if none specified */
- , RECLS_F_DIRECTORIES = 0x00000002 /*!< Include directories in search. Not currently supported. */
- , RECLS_F_LINKS = 0x00000004 /*!< Include links in search. Ignored in Win32. */
- , RECLS_F_DEVICES = 0x00000008 /*!< Include devices in search. Not currently supported. */
- , RECLS_F_TYPEMASK = 0x00000FFF
- , RECLS_F_RECURSIVE = 0x00010000 /*!< Searches given directory and all sub-directories */
- , RECLS_F_NO_FOLLOW_LINKS = 0x00020000 /*!< Does not expand links */
- , RECLS_F_DIRECTORY_PARTS = 0x00040000 /*!< Fills out the directory parts. Supported from version 1.1.1 onwards. */
- , RECLS_F_DETAILS_LATER = 0x00080000 /*!< Does not fill out anything other than the path. Not currently supported. */
-};
-
-#if !defined(__cplusplus) && \
- !defined(RECLS_DOCUMENTATION_SKIP_SECTION)
-typedef enum RECLS_FLAG RECLS_FLAG;
-#endif /* !__cplusplus && !RECLS_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Typedefs
- */
-
-struct recls_fileinfo_t;
-
-/** Opaque type representing a file-system entry information */
-typedef struct recls_fileinfo_t const *recls_info_t;
-
-/** Opaque type representing a user-defined parameter to the process function */
-typedef void *recls_process_fn_param_t;
-
-/** User-supplied process function, used by Recls_SearchProcess()
- *
- * \param info entry info structure
- * \param param the parameter passed to Recls_SearchProcess()
- * \return A status to indicate whether to continue or cancel the processing
- * \retval 0 cancel the processing
- * \retval non-0 continue the processing
- */
-typedef int (RECLS_CALLCONV_DEFAULT *hrecls_process_fn_t)(recls_info_t info, recls_process_fn_param_t param);
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace typedefs
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-typedef recls_info_t info_t;
-typedef recls_process_fn_param_t process_fn_param_t;
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Functions
- */
-
-/***************************************
- * Search control
- */
-
-/** \name Search control functions
- *
- * \ingroup group_recls
- */
-/** @{ */
-
-/** Searches a given directory for matching files of the given pattern
- *
- *
- * \param searchRoot The directory representing the root of the search
- * \param pattern The search pattern, e.g. "*.c"
- * \param flags A combination of 0 or more RECLS_FLAG values
- * \param phSrch Address of the search handle
- * \return A status code indicating success/failure
- *
- */
-RECLS_FNDECL(recls_rc_t) Recls_Search( recls_char_t const *searchRoot
- , recls_char_t const *pattern
- , recls_uint32_t flags
- , hrecls_t *phSrch);
-
-/** Searches a given directory for matching files of the given pattern, and processes them according to the given process function
- *
- * \param searchRoot The directory representing the root of the search
- * \param pattern The search pattern, e.g. "*.c"
- * \param flags A combination of 0 or more RECLS_FLAG values
- * \param pfn The processing function
- * \param param A caller-supplied parameter that is passed through to \c pfn on each invocation. The function can cancel the enumeration by returning 0
- * \return A status code indicating success/failure
- *
- * \note Available from version 1.1 of the recls API
- */
-RECLS_FNDECL(recls_rc_t) Recls_SearchProcess( recls_char_t const *searchRoot
- , recls_char_t const *pattern
- , recls_uint32_t flags
- , hrecls_process_fn_t pfn
- , recls_process_fn_param_t param);
-
-/** Closes the given search
- *
- * \param hSrch Handle of the search to close. May not be NULL.
- */
-RECLS_FNDECL(void) Recls_SearchClose( hrecls_t hSrch);
-
-/** @} */
-
-/***************************************
- * Search enumeration
- */
-
-/** \name Search enumeration functions
- *
- * \ingroup group_recls
- */
-/** @{ */
-
-/** Advances the search one position
- *
- * \param hSrch Handle of the search to close. May not be NULL.
- * \return Status code
- * \retval RECLS_RC_OK Position was advanced; search handle can be queried for details
- * \retval RECLS_RC_NO_MORE_DATA There are no more items in the search
- * \retval Any other status code indicates an error
- */
-RECLS_FNDECL(recls_rc_t) Recls_GetNext( hrecls_t hSrch);
-
-/** Advances the search one position, and retrieves the information for the new position
- *
- * \param hSrch Handle of the search to close. May not be NULL.
- * \param phEntry Pointer to receive entry info structure.
- * \return Status code
- * \retval RECLS_RC_OK Position was advanced; search handle can be queried for details
- * \retval RECLS_RC_NO_MORE_DATA There are no more items in the search
- * \retval Any other status code indicates an error
- */
-RECLS_FNDECL(recls_rc_t) Recls_GetDetails( hrecls_t hSrch
- , recls_info_t *phEntry);
-
-/** Retrieves the information for the current search position
- *
- * \param hSrch Handle of the search to close. May not be NULL.
- * \param phEntry Pointer to receive entry info structure.
- * \return Status code
- * \retval RECLS_RC_OK Position was advanced; search handle can be queried for details
- * \retval Any other status code indicates an error
- */
-RECLS_FNDECL(recls_rc_t) Recls_GetNextDetails( hrecls_t hSrch
- , recls_info_t *phEntry);
-
-/** @} */
-
-/***************************************
- * File entry info structure
- */
-
-/** \name File entry info structure functions
- *
- * \ingroup group_recls
- */
-/** @{ */
-
-/** Releases the resources associated with an entry info structure.
- *
- * \param hEntry The info entry structure.
- */
-RECLS_FNDECL(void) Recls_CloseDetails( recls_info_t hEntry);
-
-/** Copies an entry info structure.
- *
- * \param hEntry The info entry structure.
- * \param phEntry Address to receive a copy of the info entry structure. May not be NULL.
- * \return Status code
- * \retval RECLS_RC_OK Entry was generated.
- * \retval Any other status code indicates an error
- */
-RECLS_FNDECL(recls_rc_t) Recls_CopyDetails( recls_info_t hEntry
- , recls_info_t *phEntry);
-
-/** Reports on the number of outstanding (i.e. in client code) file entry info structures
- *
- * \param hSrch Handle of the search to close. May not be NULL.
- * \param count Pointer to an integer variable to receive the result.
- * \return Status code
- * \retval RECLS_RC_OK Information was retrieved.
- * \retval Any other status code indicates an error
- */
-RECLS_FNDECL(recls_rc_t) Recls_OutstandingDetails(hrecls_t hSrch
- , recls_uint32_t *count);
-
-/** @} */
-
-/***************************************
- * Error handling
- */
-
-/** \name Error handling functions
- *
- * \ingroup group_recls
- */
-/** @{ */
-
-/** Returns the last error code associated with the given search handle
- *
- * \param hSrch Handle of the search to close. May not be NULL.
- * \return The last error code for the search handle
- */
-RECLS_FNDECL(recls_rc_t) Recls_GetLastError( hrecls_t hSrch);
-
-/** Gets the error string representing the given error
- *
- * \param rc The error code
- * \param buffer Pointer to character buffer in which to write the error. If NULL, the function returns the number of characters required.
- * \param cchBuffer Number of character spaces in \c buffer. Ignored if \c buffer is NULL.
- * \return The number of characters written to the buffer, or required for, the error.
- */
-RECLS_FNDECL(size_t) Recls_GetErrorString( recls_rc_t rc
- , recls_char_t *buffer
- , size_t cchBuffer);
-
-/** Gets the error string representing the current error associated with the given search handle
- *
- * \param hSrch Handle of the search to close. May not be NULL.
- * \param buffer Pointer to character buffer in which to write the error. If NULL, the function returns the number of characters required.
- * \param cchBuffer Number of character spaces in \c buffer. Ignored if \c buffer is NULL.
- * \return The number of characters written to the buffer, or required for, the error.
- */
-RECLS_FNDECL(size_t) Recls_GetLastErrorString( hrecls_t hSrch
- , recls_char_t *buffer
- , size_t cchBuffer);
-
-/** @} */
-
-/***************************************
- * Property elicitation
- */
-
-/** \name Property elicitation functions
- *
- * \ingroup group_recls
- */
-/** @{ */
-
-/** Retrieves the full path of the given entry recls_fileinfo_t
- *
- * \param hEntry The entry recls_fileinfo_t. Cannot be NULL
- * \param buffer Pointer to character buffer in which to write the path. If NULL, the function returns the number of characters required.
- * \param cchBuffer Number of character spaces in \c buffer. Ignored if \c buffer is NULL.
- * \return The number of characters written to the buffer, or required for, the path.
- */
-RECLS_FNDECL(size_t) Recls_GetPathProperty( recls_info_t hEntry
- , recls_char_t *buffer
- , size_t cchBuffer);
-
-/** Retrieves the directory of the given entry recls_fileinfo_t
- *
- * \param hEntry The entry recls_fileinfo_t. Cannot be NULL
- * \param buffer Pointer to character buffer in which to write the directory. If NULL, the function returns the number of characters required.
- * \param cchBuffer Number of character spaces in \c buffer. Ignored if \c buffer is NULL.
- * \return The number of characters written to the buffer, or required for, the directory.
- */
-RECLS_FNDECL(size_t) Recls_GetDirectoryProperty(recls_info_t hEntry
- , recls_char_t *buffer
- , size_t cchBuffer);
-
-/** Retrieves the directory and drive of the given entry recls_fileinfo_t
- *
- * \param hEntry The entry recls_fileinfo_t. Cannot be NULL
- * \param buffer Pointer to character buffer in which to write the directory. If NULL, the function returns the number of characters required.
- * \param cchBuffer Number of character spaces in \c buffer. Ignored if \c buffer is NULL.
- * \return The number of characters written to the buffer, or required for, the directory.
- * \note On systems that do not have a drive, this function behaves identically to Recls_GetDirectoryProperty()
- */
-RECLS_FNDECL(size_t) Recls_GetDirectoryPathProperty( recls_info_t hEntry
- , recls_char_t *buffer
- , size_t cchBuffer);
-
-/** Retrieves the file (filename + extension) of the given entry recls_fileinfo_t
- *
- * \param hEntry The entry recls_fileinfo_t. Cannot be NULL
- * \param buffer Pointer to character buffer in which to write the file. If NULL, the function returns the number of characters required.
- * \param cchBuffer Number of character spaces in \c buffer. Ignored if \c buffer is NULL.
- * \return The number of characters written to the buffer, or required for, the file.
- */
-RECLS_FNDECL(size_t) Recls_GetFileProperty( recls_info_t hEntry
- , recls_char_t *buffer
- , size_t cchBuffer);
-
-/** Retrieves the short version of the file of the given entry recls_fileinfo_t
- *
- * \param hEntry The entry recls_fileinfo_t. Cannot be NULL
- * \param buffer Pointer to character buffer in which to write the file. If NULL, the function returns the number of characters required.
- * \param cchBuffer Number of character spaces in \c buffer. Ignored if \c buffer is NULL.
- * \return The number of characters written to the buffer, or required for, the file.
- *
- * \note On systems where there is no concept of a short name, this function behaves exactly as Recls_GetFileProperty()
- */
-RECLS_FNDECL(size_t) Recls_GetShortFileProperty(recls_info_t hEntry
- , recls_char_t *buffer
- , size_t cchBuffer);
-
-/** Retrieves the filename (not including extension, if any) of the given entry recls_fileinfo_t
- *
- * \param hEntry The entry recls_fileinfo_t. Cannot be NULL
- * \param buffer Pointer to character buffer in which to write the filename. If NULL, the function returns the number of characters required.
- * \param cchBuffer Number of character spaces in \c buffer. Ignored if \c buffer is NULL.
- * \return The number of characters written to the buffer, or required for, the filename.
- */
-RECLS_FNDECL(size_t) Recls_GetFileNameProperty( recls_info_t hEntry
- , recls_char_t *buffer
- , size_t cchBuffer);
-
-/** Retrieves the file extension of the given entry recls_fileinfo_t
- *
- * \param hEntry The entry recls_fileinfo_t. Cannot be NULL
- * \param buffer Pointer to character buffer in which to write the extension. If NULL, the function returns the number of characters required.
- * \param cchBuffer Number of character spaces in \c buffer. Ignored if \c buffer is NULL.
- * \return The number of characters written to the buffer, or required for, the extension.
- */
-RECLS_FNDECL(size_t) Recls_GetFileExtProperty( recls_info_t hEntry
- , recls_char_t *buffer
- , size_t cchBuffer);
-
-/** Retrieves a directory part of the given entry recls_fileinfo_t
- *
- * \param hEntry The entry recls_fileinfo_t. Cannot be NULL
- * \param part The part requested. If -1, then the function returns the number of parts
- * \param buffer Pointer to character buffer in which to write the extension. If NULL, the function returns the number of characters required. Ignored if part is -1.
- * \param cchBuffer Number of character spaces in \c buffer. Ignored if \c buffer is NULL or part is -1.
- * \return If \c part is -1, returns the number of parts. Otherwise, The number of characters written to the buffer, or required for, the extension.
- *
- * \note The behaviour is undefined if part is outside the range of parts.
- */
-RECLS_FNDECL(size_t) Recls_GetDirectoryPartProperty(recls_info_t hEntry
- , int part
- , recls_char_t *buffer
- , size_t cchBuffer);
-
-
-/** Returns non-zero if the file entry is read-only.
- *
- * \param hEntry The file entry info structure to test. May not be NULL
- * \retval true file entry is read-only
- * \retval false file entry is not read-only
- *
- * \note There is no error return
- */
-RECLS_FNDECL(recls_bool_t) Recls_IsFileReadOnly(recls_info_t hEntry);
-
-/** Returns non-zero if the file entry represents a directory.
- *
- * \param hEntry The file entry info structure to test. May not be NULL
- * \retval true file entry is a directory
- * \retval false file entry is not directory
- *
- * \note There is no error return
- */
-RECLS_FNDECL(recls_bool_t) Recls_IsFileDirectory(recls_info_t hEntry);
-
-/** Returns non-zero if the file entry represents a link.
- *
- * \param hEntry The file entry info structure to test. May not be NULL
- * \retval true file entry is a link
- * \retval false file entry is not link
- *
- * \note There is no error return
- */
-RECLS_FNDECL(recls_bool_t) Recls_IsFileLink( recls_info_t hEntry);
-
-/** Acquires the size of the file entry.
- *
- * \param hEntry The file entry info structure to test. May not be NULL
- * \param size Pointer to the location in which to store the size
- *
- * \note There is no error return. File system entries that do not have a meaningful size will be given a notional size of 0.
- */
-RECLS_FNDECL(void) Recls_GetSizeProperty( recls_info_t hEntry
- , recls_filesize_t *size);
-
-/** Returns the time the file was created */
-RECLS_FNDECL(recls_time_t) Recls_GetCreationTime(recls_info_t hEntry);
-
-/** Returns the time the file was last modified */
-RECLS_FNDECL(recls_time_t) Recls_GetModificationTime(recls_info_t hEntry);
-
-/** Returns the time the file was last accessed */
-RECLS_FNDECL(recls_time_t) Recls_GetLastAccessTime(recls_info_t hEntry);
-
-/** Returns the time the file status was last changed */
-RECLS_FNDECL(recls_time_t) Recls_GetLastStatusChangeTime(recls_info_t hEntry);
-
-/** @} */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Platform-specific includes
- */
-
-/*** \def RECLS_PLATFORM_API_WIN32 Defined if Win32 platform-specific extensions are in use */
-/*** \def RECLS_PLATFORM_API_UNIX Defined if UNIX platform-specific extensions are in use */
-
-#ifdef RECLS_PLATFORM_API_WIN32
-# undef RECLS_PLATFORM_API_WIN32
-#endif /* RECLS_PLATFORM_API_WIN32 */
-
-#ifdef RECLS_PLATFORM_API_UNIX
-# undef RECLS_PLATFORM_API_UNIX
-#endif /* RECLS_PLATFORM_API_UNIX */
-
-#if !defined(RECLS_PURE_API)
-# if defined(RECLS_PLATFORM_IS_WIN32)
-# include "recls_win32.h"
-# define RECLS_PLATFORM_API_WIN32
-# elif defined(RECLS_PLATFORM_IS_UNIX)
-# include "recls_unix.h"
-# define RECLS_PLATFORM_API_UNIX
-# else
-# error Platform not recognised
-# endif /* platform */
-#endif /* !RECLS_PURE_API */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !RECLS_INCL_H_RECLS */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_api.cpp b/etc/c/recls/recls_api.cpp
deleted file mode 100644
index 184f0bc2a..000000000
--- a/etc/c/recls/recls_api.cpp
+++ /dev/null
@@ -1,382 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_api.cpp
- *
- * Purpose: Main (platform-independent) implementation file for the recls API.
- *
- * Created: 16th August 2003
- * Updated: 27th November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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.
- *
- * ////////////////////////////////////////////////////////////////////////// */
-
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#define RECLS_PURE_API
-
-#include "recls.h"
-#include "recls_internal.h"
-#include "recls_assert.h"
-
-#include
-
-#include "recls_debug.h"
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Search control
- */
-
-/** Closes the given search */
-RECLS_FNDECL(void) Recls_SearchClose(hrecls_t hSrch)
-{
- function_scope_trace("Recls_SearchClose");
-
- ReclsSearchInfo *si = ReclsSearchInfo::FromHandle(hSrch);
-
- recls_assert(NULL != si);
-
- delete si;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Search enumeration
- */
-
-RECLS_FNDECL(recls_rc_t) Recls_SearchProcess( recls_char_t const *searchRoot
- , recls_char_t const *pattern
- , recls_uint32_t flags
- , hrecls_process_fn_t pfn
- , recls_process_fn_param_t param)
-{
- function_scope_trace("Recls_SearchProcess");
-
- recls_assert(NULL != pfn);
-
- hrecls_t hSrch;
- recls_rc_t rc = Recls_Search(searchRoot, pattern, flags, &hSrch);
-
- if(RECLS_SUCCEEDED(rc))
- {
- recls_info_t info;
-
- do
- {
- rc = Recls_GetDetails(hSrch, &info);
-
- if(RECLS_FAILED(rc))
- {
- break;
- }
- else
- {
- int res = (*pfn)(info, param);
-
- Recls_CloseDetails(info);
-
- if(0 == res)
- {
- break;
- }
- }
- }
- while(RECLS_SUCCEEDED(rc = Recls_GetNext(hSrch)));
-
- Recls_SearchClose(hSrch);
- }
-
- if(RECLS_RC_NO_MORE_DATA == rc)
- {
- rc = RECLS_RC_OK;
- }
-
- return rc;
-}
-
-RECLS_FNDECL(recls_rc_t) Recls_GetNext(hrecls_t hSrch)
-{
- function_scope_trace("Recls_GetNext");
-
- ReclsSearchInfo *si = ReclsSearchInfo::FromHandle(hSrch);
-
- recls_assert(NULL != si);
-
- return si->GetNext();
-}
-
-RECLS_FNDECL(recls_rc_t) Recls_GetDetails( hrecls_t hSrch
- , recls_info_t *pinfo)
-{
- function_scope_trace("Recls_GetDetails");
-
- ReclsSearchInfo *si = ReclsSearchInfo::FromHandle(hSrch);
-
- recls_assert(NULL != si);
- recls_assert(NULL != pinfo);
-
- return si->GetDetails(pinfo);
-}
-
-RECLS_FNDECL(recls_rc_t) Recls_GetNextDetails( hrecls_t hSrch
- , recls_info_t *pinfo)
-{
- function_scope_trace("Recls_GetNextDetails");
-
- ReclsSearchInfo *si = ReclsSearchInfo::FromHandle(hSrch);
-
- recls_assert(NULL != si);
-
- return si->GetNextDetails(pinfo);
-}
-
-/***************************************
- * File entry info structure
- */
-
-RECLS_FNDECL(void) Recls_CloseDetails(recls_info_t fileInfo)
-{
- function_scope_trace("Recls_CloseDetails");
-
- recls_assert(NULL != fileInfo);
-
- FileInfo_Release(fileInfo);
-}
-
-RECLS_FNDECL(recls_rc_t) Recls_CopyDetails( recls_info_t fileInfo
- , recls_info_t *pinfo)
-{
- function_scope_trace("Recls_CopyDetails");
-
- recls_assert(NULL != fileInfo);
-
- return FileInfo_Copy(fileInfo, pinfo);
-}
-
-RECLS_FNDECL(recls_rc_t) Recls_OutstandingDetails( hrecls_t hSrch
- , recls_uint32_t *count)
-{
- function_scope_trace("Recls_OutstandingDetails");
-
- ReclsSearchInfo *si = ReclsSearchInfo::FromHandle(hSrch);
-
- recls_assert(NULL != si);
- recls_assert(NULL != count);
- STLSOFT_SUPPRESS_UNUSED(si);
-
- recls_sint32_t cCreated;
- recls_sint32_t cShared;
-
- FileInfo_BlockCount(&cCreated, &cShared);
-
- *count = cCreated;
-
- return RECLS_RC_OK;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Error handling
- */
-
-RECLS_FNDECL(recls_rc_t) Recls_GetLastError(hrecls_t hSrch)
-{
- function_scope_trace("Recls_GetLastError");
-
- ReclsSearchInfo *si = ReclsSearchInfo::FromHandle(hSrch);
-
- recls_assert(NULL != si);
-
- return si->GetLastError();
-}
-
-RECLS_FNDECL(size_t) Recls_GetLastErrorString( hrecls_t hSrch
- , recls_char_t *buffer
- , size_t cchBuffer)
-{
- function_scope_trace("Recls_GetLastErrorString");
-
- return Recls_GetErrorString(Recls_GetLastError(hSrch), buffer, cchBuffer);
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Property elicitation
- */
-
-RECLS_FNDECL(size_t) Recls_GetPathProperty( recls_info_t fileInfo
- , recls_char_t *buffer
- , size_t cchBuffer)
-{
- function_scope_trace("Recls_GetPathProperty");
-
- recls_assert(NULL != fileInfo);
-
- return Recls_GetStringProperty_(&fileInfo->path, buffer, cchBuffer);
-}
-
-RECLS_FNDECL(size_t) Recls_GetDirectoryProperty( recls_info_t fileInfo
- , recls_char_t *buffer
- , size_t cchBuffer)
-{
- function_scope_trace("Recls_GetDirectoryProperty");
-
- recls_assert(NULL != fileInfo);
-
- return Recls_GetStringProperty_(&fileInfo->directory, buffer, cchBuffer);
-}
-
-RECLS_FNDECL(size_t) Recls_GetFileProperty( recls_info_t fileInfo
- , recls_char_t *buffer
- , size_t cchBuffer)
-{
- function_scope_trace("Recls_GetFileProperty");
-
- recls_assert(NULL != fileInfo);
-
- struct recls_strptrs_t file =
- {
- fileInfo->fileName.begin /* File is defined by start of fileName ... */
- , fileInfo->fileExt.end /* ... to end of fileExt. */
- };
-
- return Recls_GetStringProperty_(&file, buffer, cchBuffer);
-}
-
-RECLS_FNDECL(size_t) Recls_GetFileNameProperty( recls_info_t fileInfo
- , recls_char_t *buffer
- , size_t cchBuffer)
-{
- function_scope_trace("Recls_GetFileNameProperty");
-
- recls_assert(NULL != fileInfo);
-
- return Recls_GetStringProperty_(&fileInfo->fileName, buffer, cchBuffer);
-}
-
-RECLS_FNDECL(size_t) Recls_GetFileExtProperty( recls_info_t fileInfo
- , recls_char_t *buffer
- , size_t cchBuffer)
-{
- function_scope_trace("Recls_GetFileExtProperty");
-
- recls_assert(NULL != fileInfo);
-
- return Recls_GetStringProperty_(&fileInfo->fileExt, buffer, cchBuffer);
-}
-
-RECLS_FNDECL(size_t) Recls_GetDirectoryPartProperty( recls_info_t fileInfo
- , int part
- , recls_char_t *buffer
- , size_t cchBuffer)
-{
- function_scope_trace("Recls_GetDirectoryPartProperty");
-
- recls_assert(NULL != fileInfo);
-
- size_t cParts = fileInfo->directoryParts.end - fileInfo->directoryParts.begin;
-
-//debug_printf("%s: %u parts\n", fileInfo->path.begin, cParts);
-
- if(part < 0)
- {
- return cParts;
- }
- else
- {
- recls_assert(static_cast(part) < cParts);
-
- return Recls_GetStringProperty_(&fileInfo->directoryParts.begin[part], buffer, cchBuffer);
- }
-}
-
-RECLS_FNDECL(void) Recls_GetSizeProperty( recls_info_t fileInfo
- , recls_filesize_t *size)
-{
- function_scope_trace("Recls_GetSizeProperty");
-
- recls_assert(NULL != fileInfo);
- recls_assert(NULL != size);
-
- *size = fileInfo->size;
-}
-
-RECLS_FNDECL(recls_time_t) Recls_GetModificationTime(recls_info_t fileInfo)
-{
- function_scope_trace("Recls_GetModificationTime");
-
- recls_assert(NULL != fileInfo);
-
- return fileInfo->modificationTime;
-}
-
-RECLS_FNDECL(recls_time_t) Recls_GetLastAccessTime(recls_info_t fileInfo)
-{
- function_scope_trace("Recls_GetLastAccessTime");
-
- recls_assert(NULL != fileInfo);
-
- return fileInfo->lastAccessTime;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_api_unix.cpp b/etc/c/recls/recls_api_unix.cpp
deleted file mode 100644
index 2dca7cc8d..000000000
--- a/etc/c/recls/recls_api_unix.cpp
+++ /dev/null
@@ -1,1045 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_api_unix.cpp
- *
- * Purpose: Win32 implementation file for the recls API.
- *
- * Created: 16th August 2003
- * Updated: 27th November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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.
- *
- * ////////////////////////////////////////////////////////////////////////// */
-
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include "recls.h"
-#include "recls_internal.h"
-#include "recls_assert.h"
-#include "recls_util.h"
-
-#include
-
-#include
-#include
-
-# include
-# include
-
-#include "recls_debug.h"
-
-#include
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-unixstl_ns_using(glob_sequence)
-
-typedef unixstl_ns_qual(filesystem_traits) traits_type; // We need to do this, because VC is a bit thick
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Utility functions
- */
-
-#if defined(_DEBUG) && \
- defined(RECLS_PLATFORM_IS_WIN32)
-
-/* static */ tls_index function_scope::sm_index;
-
-#endif /* _DEBUG */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-static recls_info_t create_entryinfo_from_psrecord(recls_char_t const * /* rootDir */, recls_uint32_t flags, recls_char_t const *entry)
-{
- typedef recls_char_t char_type;
-
- recls_char_t rootDir[PATH_MAX];
- recls_char_t entryName[PATH_MAX];
- recls_char_t *name_start;
-
- traits_type::str_copy(rootDir, entry);
- name_start = strrchr(rootDir, '/');
- traits_type::str_copy(entryName, ++name_start);
- *name_start = '\0';
-
- function_scope_trace("create_entryinfo_from_psrecord");
-
- // size of structure is:
- //
- // offsetof(struct recls_fileinfo_t, data)
- // + directory parts
- // + full path (+ null)
- // + short name (+ null)
-
- size_t cchRootDir = traits_type::str_len(rootDir);
-
-// recls_assert(cchRootDir > 0);
-// recls_assert(rootDir[cchRootDir - 1] == traits_type::path_name_separator());
-
- size_t cchFileName = traits_type::str_len(entryName);
- size_t cDirParts = ((flags & RECLS_F_DIRECTORY_PARTS) == RECLS_F_DIRECTORY_PARTS) ? count_dir_parts(rootDir, rootDir + cchRootDir) : 0;
- size_t cbPath = align_up_size(sizeof(char_type) * (1 + cchRootDir + cchFileName));
- size_t cb = offsetof(struct recls_fileinfo_t, data)
- + cDirParts * sizeof(recls_strptrs_t)
- + cbPath;
-
- struct recls_fileinfo_t *info = const_cast(FileInfo_Allocate(cb));
-
- if(NULL != info)
- {
- char_type *fullPath = (char_type*)&info->data[cDirParts * sizeof(recls_strptrs_t)];
-// char_type *altName = (char_type*)&info->data[cDirParts * sizeof(recls_strptrs_t) + cbPath];
-
- // full path
- traits_type::str_copy(fullPath, rootDir);
- traits_type::str_cat(fullPath, entryName);
- info->path.begin = fullPath;
- info->path.end = fullPath + cchRootDir + cchFileName;
-
- // directory, file (name + ext)
- info->directory.begin = fullPath;
- info->directory.end = fullPath + cchRootDir;
- info->fileName.begin = info->directory.end;
- info->fileName.end = strrchr(info->directory.end, '.');
- if(NULL != info->fileName.end)
- {
- info->fileExt.begin = info->fileName.end + 1;
- info->fileExt.end = info->directory.end + cchFileName;
- }
- else
- {
- info->fileName.end = info->directory.end + cchFileName;
- info->fileExt.begin = info->directory.end + cchFileName;
- info->fileExt.end = info->directory.end + cchFileName;
- }
-
- // determine the directory parts
- char_type const *p = info->directory.begin;
- char_type const *l = info->directory.end;
- struct recls_strptrs_t *begin = (struct recls_strptrs_t*)&info->data[0];
-
- info->directoryParts.begin = begin;
- info->directoryParts.end = begin + cDirParts;
-
- if(info->directoryParts.begin != info->directoryParts.end)
- {
- recls_assert((flags & RECLS_F_DIRECTORY_PARTS) == RECLS_F_DIRECTORY_PARTS);
-
- begin->begin = p;
-
- for(; p != l; ++p)
- {
- if(*p == traits_type::path_name_separator())
- {
- begin->end = p + 1;
-
- if(++begin != info->directoryParts.end)
- {
- begin->begin = p + 1;
- }
- }
- }
- }
-
- struct stat st;
-
- stat(fullPath, &st);
-
- // attributes
- info->attributes = st.st_mode;
-
- // time, size
- info->lastStatusChangeTime = st.st_ctime;
- info->modificationTime = st.st_mtime;
- info->lastAccessTime = st.st_atime;
- info->size = st.st_size;
-
- // Checks
- recls_assert(info->path.begin < info->path.end);
-
- recls_assert(info->directory.begin < info->directory.end);
- recls_assert(info->path.begin <= info->directory.begin);
- recls_assert(info->directory.end <= info->path.end);
-
- recls_assert(info->fileName.begin <= info->fileName.end);
-
- recls_assert(info->fileExt.begin <= info->fileExt.end);
-
- recls_assert(info->fileName.begin < info->fileExt.end);
- recls_assert(info->fileName.end <= info->fileExt.begin);
- }
-
- return info;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * PlatformDirectoryNode
- */
-
-class PlatformDirectoryNode
- : public ReclsDNode
-{
-public:
- typedef recls_char_t char_type;
- typedef PlatformDirectoryNode class_type;
-private:
- typedef glob_sequence directory_sequence_t;
- typedef glob_sequence entry_sequence_t;
-
-// Construction
-private:
- PlatformDirectoryNode(recls_uint32_t flags, char_type const *rootDir, char_type const *pattern);
-public:
- virtual ~PlatformDirectoryNode();
-
- static PlatformDirectoryNode *FindAndCreate(recls_uint32_t flags, char_type const *rootDir, char_type const *pattern);
- static PlatformDirectoryNode *FindAndCreate(recls_uint32_t flags, char_type const *rootDir, char_type const *subDir, char_type const *pattern);
-
-// ReclsDNode methods
-private:
- virtual recls_rc_t GetNext();
- virtual recls_rc_t GetDetails(recls_info_t *pinfo);
- virtual recls_rc_t GetNextDetails(recls_info_t *pinfo);
-
-// Implementation
-private:
- recls_rc_t Initialise();
-
- recls_bool_t _is_valid() const;
-
-#if defined(RECLS_COMPILER_IS_BORLAND)
- static directory_sequence_t::const_iterator _select_iter(int b, directory_sequence_t::const_iterator trueVal, directory_sequence_t::const_iterator falseVal)
- {
- // I can't explain it, but Borland does not like the tertiary operator and the copy-ctors of the iterators
- if(b)
- {
- return trueVal;
- }
- else
- {
- return falseVal;
- }
- }
-#endif /* !RECLS_COMPILER_IS_BORLAND */
- static int _ssFlags_from_reclsFlags(recls_uint32_t flags)
- {
- recls_assert(0 == (flags & RECLS_F_LINKS)); // Doesn't work with links
- recls_assert(0 == (flags & RECLS_F_DEVICES)); // Doesn't work with devices
-
- int ssFlags = 0;
-
- if(0 != (flags & RECLS_F_FILES))
- {
- ssFlags |= entry_sequence_t::files;
- }
- if(0 != (flags & RECLS_F_DIRECTORIES))
- {
- ssFlags |= entry_sequence_t::directories;
- }
-
- return ssFlags;
- }
-
-// Members
-private:
- recls_info_t m_current;
- ReclsDNode *m_dnode;
- recls_uint32_t const m_flags;
- entry_sequence_t m_entries;
- entry_sequence_t::const_iterator m_entriesBegin;
- directory_sequence_t m_directories;
- directory_sequence_t::const_iterator m_directoriesBegin;
- char_type m_rootDir[RECLS_PATH_MAX];
- char_type m_pattern[RECLS_PATH_MAX];
-};
-
-PlatformDirectoryNode::PlatformDirectoryNode(recls_uint32_t flags, PlatformDirectoryNode::char_type const *rootDir, PlatformDirectoryNode::char_type const *pattern)
- : m_current(NULL)
- , m_dnode(NULL)
- , m_flags(flags)
- , m_entries(rootDir, pattern, _ssFlags_from_reclsFlags(flags))
- , m_entriesBegin(m_entries.begin())
-#ifdef _MSC_VER // For testing
- , m_directories(rootDir, "*.*", directory_sequence_t::directories)
-#else /* ? _MSC_VER */
- , m_directories(rootDir, traits_type::pattern_all(), directory_sequence_t::directories)
-#endif /* _MSC_VER */
-#if !defined(RECLS_COMPILER_IS_BORLAND)
- , m_directoriesBegin((flags & RECLS_F_RECURSIVE) ? m_directories.begin() : m_directories.end())
-#else
- , m_directoriesBegin(_select_iter((flags & RECLS_F_RECURSIVE), m_directories.begin(), m_directories.end()))
-#endif /* !RECLS_COMPILER_IS_BORLAND */
-{
- function_scope_trace("PlatformDirectoryNode::PlatformDirectoryNode");
-
-#if defined(RECLS_COMPILER_IS_BORLAND)
-// m_directoriesBegin = ((flags & RECLS_F_RECURSIVE) ? m_directories.begin() : m_directories.end());
-#endif /* !RECLS_COMPILER_IS_BORLAND */
-
- traits_type::str_copy(m_rootDir, rootDir);
- traits_type::ensure_dir_end(m_rootDir);
- traits_type::str_copy(m_pattern, pattern);
-
- recls_assert(stlsoft_raw_offsetof(PlatformDirectoryNode, m_entries) < stlsoft_raw_offsetof(PlatformDirectoryNode, m_entriesBegin));
- recls_assert(stlsoft_raw_offsetof(PlatformDirectoryNode, m_directories) < stlsoft_raw_offsetof(PlatformDirectoryNode, m_directoriesBegin));
-}
-
-inline /* static */ PlatformDirectoryNode *PlatformDirectoryNode::FindAndCreate(recls_uint32_t flags, PlatformDirectoryNode::char_type const *rootDir, PlatformDirectoryNode::char_type const *pattern)
-{
- PlatformDirectoryNode *node;
-
- function_scope_trace("PlatformDirectoryNode::FindAndCreate");
-
-#ifdef RECLS_COMPILER_THROWS_ON_NEW_FAIL
- try
- {
-#endif /* RECLS_COMPILER_THROWS_ON_NEW_FAIL */
- node = new PlatformDirectoryNode(flags, rootDir, pattern);
-#ifdef RECLS_COMPILER_THROWS_ON_NEW_FAIL
- }
- catch(std::bad_alloc &)
- {
- node = NULL;
- }
-#endif /* RECLS_COMPILER_THROWS_ON_NEW_FAIL */
-
- if(NULL != node)
- {
- // Ensure that it, or one of its sub-nodes, has matching entries.
- recls_rc_t rc = node->Initialise();
-
- if(RECLS_FAILED(rc))
- {
- delete node;
-
- node = NULL;
- }
- }
-
- recls_assert(NULL == node || node->_is_valid());
-
- return node;
-}
-
-inline /* static */ PlatformDirectoryNode *PlatformDirectoryNode::FindAndCreate(recls_uint32_t flags, PlatformDirectoryNode::char_type const *rootDir, PlatformDirectoryNode::char_type const *subDir, PlatformDirectoryNode::char_type const *pattern)
-{
- char_type compositeDir[RECLS_PATH_MAX];
-
- recls_assert(rootDir[traits_type::str_len(rootDir) - 1] == traits_type::path_name_separator());
-
- // Only need subdir, since globbing provides partial path
- traits_type::str_copy(compositeDir, subDir);
-
- return FindAndCreate(flags, compositeDir, pattern);
-}
-
-PlatformDirectoryNode::~PlatformDirectoryNode()
-{
- function_scope_trace("PlatformDirectoryNode::~PlatformDirectoryNode");
-
- FileInfo_Release(m_current);
-
- delete m_dnode;
-}
-
-recls_rc_t PlatformDirectoryNode::Initialise()
-{
- function_scope_trace("PlatformDirectoryNode::Initialise");
-
- recls_rc_t rc;
-
- recls_assert(NULL == m_current);
- recls_assert(NULL == m_dnode);
-
- if(m_entriesBegin != m_entries.end())
- {
- // (i) Try getting a file first,
- m_current = create_entryinfo_from_psrecord(m_rootDir, m_flags, *m_entriesBegin);
-
- if(NULL == m_current)
- {
- rc = RECLS_RC_OUT_OF_MEMORY;
- }
- else
- {
- rc = RECLS_RC_OK;
- }
- }
- else
- {
- if(m_directoriesBegin == m_directories.end())
- {
- rc = RECLS_RC_NO_MORE_DATA;
- }
- else
- {
- do
- {
-#if 1
- // The way glob_sequence works
- m_dnode = PlatformDirectoryNode::FindAndCreate(m_flags, m_rootDir, *m_directoriesBegin, m_pattern);
-#else /* ? 0 */
-// m_dnode = PlatformDirectoryNode::FindAndCreate(m_flags, (*m_directoriesBegin).get_path(), m_pattern);
-#endif /* 0 */
-
- } while(NULL == m_dnode && ++m_directoriesBegin != m_directories.end());
-
- rc = (NULL == m_dnode) ? RECLS_RC_NO_MORE_DATA : RECLS_RC_OK;
- }
- }
-
- if(RECLS_SUCCEEDED(rc))
- {
- recls_assert(_is_valid());
- }
-
- return rc;
-}
-
-recls_bool_t PlatformDirectoryNode::_is_valid() const
-{
- function_scope_trace("PlatformDirectoryNode::_is_valid");
-
- recls_rc_t rc = RECLS_RC_OK;
-
-#ifdef STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT
-# pragma message("Flesh these out")
-#endif /* STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT */
- if(RECLS_SUCCEEDED(rc))
- {
-
- }
-
- if(RECLS_SUCCEEDED(rc))
- {
- }
-
- if(RECLS_SUCCEEDED(rc))
- {
- }
-
- if(RECLS_SUCCEEDED(rc))
- {
- }
-
- // (i) Either we are enumerating files (m_current != NULL) or directories (m_dnode != NULL), but not both
- recls_assert(NULL == m_current || NULL == m_dnode);
- // (ii) Either we are enumerating files (m_current != NULL) or there are no more files to enumerate
- recls_assert(NULL != m_current || m_entriesBegin == m_entries.end());
-
- return RECLS_SUCCEEDED(rc);
-}
-
-
-recls_rc_t PlatformDirectoryNode::GetNext()
-{
- function_scope_trace("PlatformDirectoryNode::GetNext");
-
- recls_assert(_is_valid());
-
- /* Searching operates as follows:
- *
- * 1. Return all the contents of the files
- * 2. Return the contents of the directories.
- *
- * Hence, if m_dnode is non-NULL, we've already searched
- */
-
- /* States:
- *
- * - Iterating files: m_entriesBegin != m_entries.end(), m_dnode is NULL, m_directoriesBegin != m_directories.end()
- * - Iterating directories: m_directoriesBegin != m_directories.end(), m_dnode is non-NULL, m_current is NULL
- *
- */
-
- // Invariants
-
- // (i) Either we are enumerating files (m_current != NULL) or directories (m_dnode != NULL), but not both
- recls_assert(NULL == m_current || NULL == m_dnode);
- // (ii) Either we are enumerating files (m_current != NULL) or there are no more files to enumerate
- recls_assert(NULL != m_current || m_entriesBegin == m_entries.end());
-
- recls_rc_t rc = RECLS_RC_NO_MORE_DATA;
-
- if(NULL != m_current)
- {
- // Currently enumerating through the files
-
- recls_assert(m_entriesBegin != m_entries.end());
- recls_assert(NULL == m_dnode);
-
- // Advance, and check for end of sequence
- ++m_entriesBegin;
-
- FileInfo_Release(m_current);
- if(m_entriesBegin != m_entries.end())
- {
- // Still enumerating, so just update m_current
- m_current = create_entryinfo_from_psrecord(m_rootDir, m_flags, *m_entriesBegin);
-
- rc = RECLS_RC_OK;
- }
- else
- {
- // No more left in the files sequence, so delete m_current
- m_current = NULL;
-
- rc = RECLS_RC_NO_MORE_DATA;
- }
- }
-
- if(NULL == m_current)
- {
- // Now we are either enumerating the directories, or we've already done so
-
- if(NULL != m_dnode)
- {
- // Currently enumerating the directories
- rc = m_dnode->GetNext();
-
- if(RECLS_RC_NO_MORE_DATA == rc)
- {
- ++m_directoriesBegin;
-
- delete m_dnode;
-
- m_dnode = NULL;
- }
- }
-
- if(m_directoriesBegin == m_directories.end())
- {
- // Enumeration is complete.
- rc = RECLS_RC_NO_MORE_DATA;
- }
- else
- {
- if(NULL == m_dnode)
- {
- do
- {
- // Creation of the node will cause it to enter the first enumeration
- // state. However, if there are no matching
-
- recls_assert(m_directoriesBegin != m_directories.end());
-
-#if 1
- // The way glob_sequence works
- m_dnode = PlatformDirectoryNode::FindAndCreate(m_flags, m_rootDir, *m_directoriesBegin, m_pattern);
-#else /* ? 0 */
-// m_dnode = PlatformDirectoryNode::FindAndCreate(m_flags, (*m_directoriesBegin).get_path(), m_pattern);
-#endif /* 0 */
-
- if(NULL != m_dnode)
- {
- rc = RECLS_RC_OK;
- }
- else
- {
- ++m_directoriesBegin;
- }
-
- } while(NULL == m_dnode && m_directoriesBegin != m_directories.end());
- }
- }
- }
-
- recls_assert(_is_valid());
-
- return rc;
-}
-
-recls_rc_t PlatformDirectoryNode::GetDetails(recls_info_t *pinfo)
-{
- function_scope_trace("PlatformDirectoryNode::GetDetails");
-
- recls_assert(_is_valid());
-
- recls_rc_t rc;
-
- recls_assert(NULL != pinfo);
- recls_assert(NULL == m_current || NULL == m_dnode);
-
- if(NULL != m_current)
- {
- // Currently searching for files from the current directory
-
- recls_assert(NULL == m_dnode);
-
- rc = FileInfo_Copy(m_current, pinfo);
-
-#if defined(_DEBUG) && \
- defined(RECLS_PLATFORM_IS_WIN32)
- {
- recls_char_t buffer[RECLS_PATH_MAX];
-
- Recls_GetPathProperty(m_current, buffer, stlsoft_num_elements(buffer));
-
- debug_printf(" [%s]\n", buffer);
- }
-#endif /* _DEBUG */
- }
- else if(NULL != m_dnode)
- {
- recls_assert(NULL == m_current);
-
- // Sub-directory searching is active, so get from there.
-
- rc = m_dnode->GetDetails(pinfo);
- }
- else
- {
- // Enumeration has completed
- rc = RECLS_RC_NO_MORE_DATA;
- }
-
- recls_assert(_is_valid());
-
- return rc;
-}
-
-recls_rc_t PlatformDirectoryNode::GetNextDetails(recls_info_t *pinfo)
-{
- function_scope_trace("PlatformDirectoryNode::GetNextDetails");
-
- recls_assert(_is_valid());
- recls_assert(NULL != pinfo);
-
- recls_rc_t rc = GetNext();
-
- if(RECLS_SUCCEEDED(rc))
- {
- rc = GetDetails(pinfo);
- }
-
- recls_assert(_is_valid());
-
- return rc;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * ReclsSearchInfo
- */
-
-void *ReclsSearchInfo::operator new(size_t cb, int cDirParts, size_t cbRootDir)
-{
- function_scope_trace("ReclsSearchInfo::operator new");
-
- cbRootDir = align_up_size(cbRootDir);
-
- recls_assert(cb > stlsoft_raw_offsetof(ReclsSearchInfo, data));
-
- cb = stlsoft_raw_offsetof(ReclsSearchInfo, data)
- + (cDirParts) * sizeof(recls_strptrs_t)
- + cbRootDir;
-
- return malloc(cb);
-}
-
-#if !defined(RECLS_COMPILER_IS_BORLAND) && \
- !defined(RECLS_COMPILER_IS_DMC)
-void ReclsSearchInfo::operator delete(void *pv, int /* cDirParts */, size_t /* cbRootDir */)
-{
- function_scope_trace("ReclsSearchInfo::operator delete");
-
- free(pv);
-}
-#endif /* !RECLS_COMPILER_IS_BORLAND && !RECLS_COMPILER_IS_DMC */
-
-void ReclsSearchInfo::operator delete(void *pv)
-{
- function_scope_trace("ReclsSearchInfo::operator delete");
-
- free(pv);
-}
-
-inline /* static */ recls_rc_t ReclsSearchInfo::FindAndCreate(ReclsSearchInfo::char_type const *rootDir, ReclsSearchInfo::char_type const *pattern, recls_uint32_t flags, ReclsSearchInfo **ppsi)
-{
- function_scope_trace("ReclsSearchInfo::FindAndCreate");
-
- recls_rc_t rc;
- ReclsSearchInfo *si;
- char_type fullPath[RECLS_PATH_MAX];
- size_t cchFullPath;
-
- *ppsi = NULL;
-
- cchFullPath = traits_type::get_full_path_name(rootDir, RECLS_NUM_ELEMENTS(fullPath), fullPath);
- if( 0 == cchFullPath ||
- !file_exists(fullPath))
- {
- rc = RECLS_RC_INVALID_DIRECTORY;
- }
- else
- {
-#if defined(EMULATE_UNIX_ON_WIN32)
- recls_char_t *_fullPath = fullPath;
- recls_char_t *fullPath = _fullPath + 2;
-
- std::replace(fullPath, fullPath + cchFullPath, '\\', traits_type::path_name_separator());
-#endif /* EMULATE_UNIX_ON_WIN32 */
-
- traits_type::ensure_dir_end(fullPath);
-
- size_t lenSearchRoot = traits_type::str_len(fullPath);
-
- recls_assert(0 < lenSearchRoot);
-
- rootDir = fullPath;
-
- // Count the directory parts. This is always done for the ReclsSearchInfo class, since it
- // uses them to recurse.
- char_type const *begin = rootDir;
- char_type const *const end = rootDir + lenSearchRoot;
- int cDirParts = count_dir_parts(begin, end);
-
-#ifdef RECLS_COMPILER_THROWS_ON_NEW_FAIL
- try
- {
-#endif /* RECLS_COMPILER_THROWS_ON_NEW_FAIL */
- si = new(cDirParts, sizeof(char_type) * (1 + lenSearchRoot)) ReclsSearchInfo(cDirParts, rootDir, pattern, flags);
-#ifdef RECLS_COMPILER_THROWS_ON_NEW_FAIL
- }
- catch(std::bad_alloc &)
- {
- si = NULL;
- }
-#endif /* RECLS_COMPILER_THROWS_ON_NEW_FAIL */
-
- if(NULL == si)
- {
- rc = RECLS_RC_FAIL;
- }
- else
- {
- // This is a nasty hack. It's tantamount to ctor & create function, so
- // should be made more elegant soon.
- if(NULL == si->m_dnode)
- {
- delete si;
-
- si = NULL;
-
- rc = RECLS_RC_NO_MORE_DATA;
- }
- else
- {
- *ppsi = si;
-
- rc = RECLS_RC_OK;
- }
- }
- }
-
- return rc;
-}
-
-ReclsSearchInfo::char_type const *ReclsSearchInfo::_calc_rootDir(int cDirParts, ReclsSearchInfo::char_type const *rootDir)
-{
- function_scope_trace("ReclsSearchInfo::_calc_rootDir");
-
- // Root dir is located after file parts, and before pattern
- return traits_type::str_copy((char_type*)&data[cDirParts * sizeof(recls_strptrs_t)], rootDir);
-}
-
-ReclsSearchInfo::ReclsSearchInfo( int cDirParts
- , ReclsSearchInfo::char_type const *rootDir
- , ReclsSearchInfo::char_type const *pattern
- , recls_uint32_t flags)
- : m_flags(flags)
- , m_lastError(RECLS_RC_OK)
- , m_rootDir(_calc_rootDir(cDirParts, rootDir))
-{
- function_scope_trace("ReclsSearchInfo::ReclsSearchInfo");
-
- recls_assert(NULL != rootDir);
- recls_assert(NULL != pattern);
- recls_assert(traits_type::str_len(rootDir) < RECLS_PATH_MAX);
- recls_assert(traits_type::str_len(pattern) < RECLS_PATH_MAX);
-
- // Initialise the directory parts.
-
- recls_assert(rootDir[1] != ':');
-
-// char_type const *p = rootDir;
-// struct recls_strptrs_t *begin = (struct recls_strptrs_t*)&data[0];
-
- // Now start the search
- m_dnode = PlatformDirectoryNode::FindAndCreate(m_flags, rootDir, pattern);
-}
-
-// Operations
-recls_rc_t ReclsSearchInfo::GetNext()
-{
- function_scope_trace("ReclsSearchInfo::GetNext");
-
- recls_assert(NULL != m_dnode);
-
- m_lastError = m_dnode->GetNext();
-
- if(RECLS_RC_NO_MORE_DATA == m_lastError)
- {
- delete m_dnode;
-
- m_dnode = NULL;
- }
-
- return m_lastError;
-}
-
-recls_rc_t ReclsSearchInfo::GetDetails(recls_info_t *pinfo)
-{
- function_scope_trace("ReclsSearchInfo::GetDetails");
-
- recls_assert(NULL != m_dnode);
-
- return (m_lastError = m_dnode->GetDetails(pinfo));
-}
-
-recls_rc_t ReclsSearchInfo::GetNextDetails(recls_info_t *pinfo)
-{
- function_scope_trace("ReclsSearchInfo::GetNextDetails");
-
- recls_assert(NULL != m_dnode);
-
- m_lastError = m_dnode->GetNextDetails(pinfo);
-
- if(RECLS_RC_NO_MORE_DATA == m_lastError)
- {
- delete m_dnode;
- }
-
- return m_lastError;
-}
-
-// Accessors
-
-recls_rc_t ReclsSearchInfo::GetLastError() const
-{
- function_scope_trace("ReclsSearchInfo::GetLastError");
-
- return m_lastError;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Search control
- */
-
-RECLS_FNDECL(recls_rc_t) Recls_Search( recls_char_t const *searchRoot
- , recls_char_t const *pattern
- , recls_uint32_t flags
- , hrecls_t *phSrch)
-{
- function_scope_trace("Recls_Search");
-
- recls_assert(NULL != searchRoot);
- recls_assert(NULL != pattern);
- recls_assert(NULL != phSrch);
-
- *phSrch = ReclsSearchInfo::ToHandle(NULL);
-
- recls_rc_t rc;
-
- // Validate the search root
- if( NULL == searchRoot ||
- 0 == *searchRoot)
- {
- searchRoot = ".";
- }
-
- // Validate the flags
- if(0 == (flags & RECLS_F_TYPEMASK))
- {
- flags |= RECLS_F_FILES;
- }
-
- // Since Win32 does not support all search types, we need to inform
- // the caller if they ask to create a search that can never be
- // satisfied.
- if(0 == (flags & (RECLS_F_FILES | RECLS_F_DIRECTORIES)))
- {
- rc = RECLS_RC_INVALID_SEARCH_TYPE;
- }
- // Validate the pattern.
- else if('\0' == *pattern)
- {
- rc = RECLS_RC_NO_MORE_DATA;
- }
- else
- {
- ReclsSearchInfo *si;
-
- rc = ReclsSearchInfo::FindAndCreate(searchRoot, pattern, flags, &si);
-
- if(RECLS_SUCCEEDED(rc))
- {
- *phSrch = ReclsSearchInfo::ToHandle(si);
-
- rc = RECLS_RC_OK;
- }
- }
-
- return rc;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Error handling
- */
-
-RECLS_FNDECL(size_t) Recls_GetErrorString( recls_rc_t rc
- , recls_char_t *buffer
- , size_t cchBuffer)
-{
- function_scope_trace("Recls_GetErrorString");
-
- recls_assert(NULL != buffer);
-
- if(rc == RECLS_RC_SEARCH_NO_CURRENT)
- {
- strncpy(buffer, "Search has no current node", cchBuffer);
- }
- else if(rc == RECLS_RC_INVALID_DIRECTORY)
- {
- strncpy(buffer, "Invalid directory", cchBuffer);
- }
- else if(rc == RECLS_RC_NO_MORE_DATA)
- {
- strncpy(buffer, "No more data", cchBuffer);
- }
- else if(rc == RECLS_RC_OUT_OF_MEMORY)
- {
- strncpy(buffer, "No more memory", cchBuffer);
- }
-
- return strlen(buffer);
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Property elicitation
- */
-
-RECLS_FNDECL(size_t) Recls_GetDirectoryPathProperty( recls_info_t fileInfo
- , recls_char_t *buffer
- , size_t cchBuffer)
-{
- function_scope_trace("Recls_GetDirectoryPathProperty");
-
- recls_assert(NULL != fileInfo);
-
- struct recls_strptrs_t directoryPath =
- {
- fileInfo->path.begin /* Directory path is defined by start of path ... */
- , fileInfo->directory.end /* ... to end of directory. */
- };
-
- return Recls_GetStringProperty_(&directoryPath, buffer, cchBuffer);
-}
-
-RECLS_FNDECL(recls_bool_t) Recls_IsFileReadOnly(recls_info_t fileInfo)
-{
- function_scope_trace("Recls_IsFileReadOnly");
-
- recls_assert(NULL != fileInfo);
-
- return (fileInfo->attributes & S_IWRITE) == 0;
-}
-
-RECLS_FNDECL(recls_bool_t) Recls_IsFileDirectory(recls_info_t fileInfo)
-{
- function_scope_trace("Recls_IsFileDirectory");
-
- recls_assert(NULL != fileInfo);
-
- return (fileInfo->attributes & S_IFMT) == S_IFDIR;
-}
-
-RECLS_FNDECL(recls_bool_t) Recls_IsFileLink(recls_info_t fileInfo)
-{
- function_scope_trace("Recls_IsFileLink");
-
- recls_assert(NULL != fileInfo);
- ((void)fileInfo);
-
- return false;
-}
-
-RECLS_FNDECL(recls_time_t) Recls_GetCreationTime(recls_info_t fileInfo)
-{
- function_scope_trace("Recls_GetCreationTime");
-
- recls_assert(NULL != fileInfo);
-
- return fileInfo->modificationTime;
-}
-
-RECLS_FNDECL(recls_time_t) Recls_GetLastStatusChangeTime(recls_info_t fileInfo)
-{
- function_scope_trace("Recls_GetLastStatusChangeTime");
-
- recls_assert(NULL != fileInfo);
-
- return fileInfo->lastStatusChangeTime;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_api_win32.cpp b/etc/c/recls/recls_api_win32.cpp
deleted file mode 100644
index 7c22c5443..000000000
--- a/etc/c/recls/recls_api_win32.cpp
+++ /dev/null
@@ -1,1053 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_api_win32.cpp
- *
- * Purpose: Win32 implementation file for the recls API.
- *
- * Created: 16th August 2003
- * Updated: 28th November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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.
- *
- * ////////////////////////////////////////////////////////////////////////// */
-
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include "recls.h"
-#include "recls_internal.h"
-#include "recls_assert.h"
-#include "recls_util.h"
-
-#include
-
-#include
-#include
-#include
-
-#include
-#include
-
-#include
-
-#include "recls_debug.h"
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-winstl_ns_using(basic_findfile_sequence)
-
-typedef winstl_ns_qual(filesystem_traits) traits_type; // We need to do this, because VC is a bit thick
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Utility functions
- */
-
-#if defined(_DEBUG)
-
-/* static */ tls_index function_scope::sm_index;
-
-#endif /* _DEBUG */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-static recls_info_t create_entryinfo_from_psrecord(recls_char_t const *rootDir, recls_uint32_t flags, WIN32_FIND_DATA const &findData)
-{
- typedef recls_char_t char_type;
-
- function_scope_trace("create_entryinfo_from_psrecord");
-
- // size of structure is:
- //
- // offsetof(struct recls_fileinfo_t, data)
- // + directory parts
- // + full path (+ null)
- // + short name (+ null)
-
- size_t cchRootDir = traits_type::str_len(rootDir);
-
- recls_assert(cchRootDir > 0);
- recls_assert(rootDir[cchRootDir - 1] == traits_type::path_name_separator());
-
- size_t cchFileName = traits_type::str_len(findData.cFileName);
- size_t cDirParts = ((flags & RECLS_F_DIRECTORY_PARTS) == RECLS_F_DIRECTORY_PARTS) ? count_dir_parts(rootDir + 2, rootDir + cchRootDir) : 0;
- size_t cbPath = align_up_size(sizeof(char_type) * (1 + cchRootDir + cchFileName));
- size_t cbAlt = align_up_size(sizeof(char_type) * (1 + RECLS_NUM_ELEMENTS(findData.cAlternateFileName)));
- size_t cb = offsetof(struct recls_fileinfo_t, data)
- + cDirParts * sizeof(recls_strptrs_t)
- + cbPath
- + cbAlt;
-
- struct recls_fileinfo_t *info = const_cast(FileInfo_Allocate(cb));
-
- if(NULL != info)
- {
- char_type *fullPath = (char_type*)&info->data[cDirParts * sizeof(recls_strptrs_t)];
- char_type *altName = (char_type*)&info->data[cDirParts * sizeof(recls_strptrs_t) + cbPath];
-
- // full path
- traits_type::str_copy(fullPath, rootDir);
- traits_type::str_cat(fullPath, findData.cFileName);
- info->path.begin = fullPath;
- info->path.end = fullPath + cchRootDir + cchFileName;
-
- // drive, directory, file (name + ext)
- info->drive = fullPath[0];
- info->directory.begin = fullPath + 2;
- info->directory.end = fullPath + cchRootDir;
- info->fileName.begin = info->directory.end;
- info->fileName.end = strrchr(info->directory.end, '.');
- if(NULL != info->fileName.end)
- {
- info->fileExt.begin = info->fileName.end + 1;
- info->fileExt.end = info->directory.end + cchFileName;
- }
- else
- {
- info->fileName.end = info->directory.end + cchFileName;
- info->fileExt.begin = info->directory.end + cchFileName;
- info->fileExt.end = info->directory.end + cchFileName;
- }
-
- // determine the directory parts
- char_type const *p = info->directory.begin;
- char_type const *l = info->directory.end;
- struct recls_strptrs_t *begin = (struct recls_strptrs_t*)&info->data[0];
-
- info->directoryParts.begin = begin;
- info->directoryParts.end = begin + cDirParts;
-
- if(info->directoryParts.begin != info->directoryParts.end)
- {
- recls_assert((flags & RECLS_F_DIRECTORY_PARTS) == RECLS_F_DIRECTORY_PARTS);
-
- begin->begin = p;
-
- for(; p != l; ++p)
- {
- if(*p == traits_type::path_name_separator())
- {
- begin->end = p + 1;
-
- if(++begin != info->directoryParts.end)
- {
- begin->begin = p + 1;
- }
- }
- }
- }
-
- // alt name
- traits_type::str_copy(altName, findData.cAlternateFileName);
- info->shortFile.begin = altName;
- info->shortFile.end = altName + traits_type::str_len(altName);
-
- // attributes
- info->attributes = findData.dwFileAttributes;
-
- // time, size
- info->creationTime = findData.ftCreationTime;
- info->modificationTime = findData.ftLastWriteTime;
- info->lastAccessTime = findData.ftLastAccessTime;
- info->size.u.HighPart = findData.nFileSizeHigh;
- info->size.u.LowPart = findData.nFileSizeLow;
-
- // Checks
- recls_assert(info->path.begin < info->path.end);
-
- recls_assert(info->directory.begin < info->directory.end);
- recls_assert(info->path.begin <= info->directory.begin);
- recls_assert(info->directory.end <= info->path.end);
-
- recls_assert(info->fileName.begin <= info->fileName.end);
-
- recls_assert(info->fileExt.begin <= info->fileExt.end);
-
- recls_assert(info->fileName.begin < info->fileExt.end);
- recls_assert(info->fileName.end <= info->fileExt.begin);
- }
-
- return info;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * PlatformDirectoryNode
- */
-
-class PlatformDirectoryNode
- : public ReclsDNode
-{
-public:
- typedef recls_char_t char_type;
- typedef PlatformDirectoryNode class_type;
-private:
- typedef basic_findfile_sequence directory_sequence_t;
- typedef basic_findfile_sequence entry_sequence_t;
-
-// Construction
-private:
- PlatformDirectoryNode(recls_uint32_t flags, char_type const *rootDir, char_type const *pattern);
-public:
- virtual ~PlatformDirectoryNode();
-
- static PlatformDirectoryNode *FindAndCreate(recls_uint32_t flags, char_type const *rootDir, char_type const *pattern);
- static PlatformDirectoryNode *FindAndCreate(recls_uint32_t flags, char_type const *rootDir, char_type const *subDir, char_type const *pattern);
-
-// ReclsDNode methods
-private:
- virtual recls_rc_t GetNext();
- virtual recls_rc_t GetDetails(recls_info_t *pinfo);
- virtual recls_rc_t GetNextDetails(recls_info_t *pinfo);
-
-// Implementation
-private:
- recls_rc_t Initialise();
-
- recls_bool_t _is_valid() const;
-
-#if defined(RECLS_COMPILER_IS_BORLAND)
- static directory_sequence_t::const_iterator _select_iter(int b, directory_sequence_t::const_iterator trueVal, directory_sequence_t::const_iterator falseVal)
- {
- // I can't explain it, but Borland does not like the tertiary operator and the copy-ctors of the iterators
- if(b)
- {
- return trueVal;
- }
- else
- {
- return falseVal;
- }
- }
-#endif /* !RECLS_COMPILER_IS_BORLAND */
- static int _ssFlags_from_reclsFlags(recls_uint32_t flags)
- {
- recls_assert(0 == (flags & RECLS_F_LINKS)); // Doesn't work with links
- recls_assert(0 == (flags & RECLS_F_DEVICES)); // Doesn't work with devices
-
- int ssFlags = 0;
-
- if(0 != (flags & RECLS_F_FILES))
- {
- ssFlags |= entry_sequence_t::files;
- }
- if(0 != (flags & RECLS_F_DIRECTORIES))
- {
- ssFlags |= entry_sequence_t::directories;
- }
-
- return ssFlags;
- }
-
-// Members
-private:
- recls_info_t m_current;
- ReclsDNode *m_dnode;
- recls_uint32_t const m_flags;
- entry_sequence_t m_entries;
- entry_sequence_t::const_iterator m_entriesBegin;
- directory_sequence_t m_directories;
- directory_sequence_t::const_iterator m_directoriesBegin;
- char_type m_rootDir[RECLS_PATH_MAX];
- char_type m_pattern[RECLS_PATH_MAX];
-};
-
-PlatformDirectoryNode::PlatformDirectoryNode(recls_uint32_t flags, PlatformDirectoryNode::char_type const *rootDir, PlatformDirectoryNode::char_type const *pattern)
- : m_current(NULL)
- , m_dnode(NULL)
- , m_flags(flags)
- , m_entries(rootDir, pattern, _ssFlags_from_reclsFlags(flags))
- , m_entriesBegin(m_entries.begin())
- , m_directories(rootDir, traits_type::pattern_all(), directory_sequence_t::directories)
-#if !defined(RECLS_COMPILER_IS_BORLAND)
- , m_directoriesBegin((flags & RECLS_F_RECURSIVE) ? m_directories.begin() : m_directories.end())
-#else
- , m_directoriesBegin(_select_iter((flags & RECLS_F_RECURSIVE), m_directories.begin(), m_directories.end()))
-#endif /* !RECLS_COMPILER_IS_BORLAND */
-{
- function_scope_trace("PlatformDirectoryNode::PlatformDirectoryNode");
-
-#if defined(RECLS_COMPILER_IS_BORLAND)
-// m_directoriesBegin = ((flags & RECLS_F_RECURSIVE) ? m_directories.begin() : m_directories.end());
-#endif /* !RECLS_COMPILER_IS_BORLAND */
-
- traits_type::str_copy(m_rootDir, rootDir);
- traits_type::ensure_dir_end(m_rootDir);
- traits_type::str_copy(m_pattern, pattern);
-
- recls_assert(stlsoft_raw_offsetof(PlatformDirectoryNode, m_entries) < stlsoft_raw_offsetof(PlatformDirectoryNode, m_entriesBegin));
- recls_assert(stlsoft_raw_offsetof(PlatformDirectoryNode, m_directories) < stlsoft_raw_offsetof(PlatformDirectoryNode, m_directoriesBegin));
-}
-
-inline /* static */ PlatformDirectoryNode *PlatformDirectoryNode::FindAndCreate(recls_uint32_t flags, PlatformDirectoryNode::char_type const *rootDir, PlatformDirectoryNode::char_type const *pattern)
-{
- PlatformDirectoryNode *node;
-
- function_scope_trace("PlatformDirectoryNode::FindAndCreate");
-
-#ifdef RECLS_COMPILER_THROWS_ON_NEW_FAIL
- try
- {
-#endif /* RECLS_COMPILER_THROWS_ON_NEW_FAIL */
- node = new PlatformDirectoryNode(flags, rootDir, pattern);
-#ifdef RECLS_COMPILER_THROWS_ON_NEW_FAIL
- }
- catch(std::bad_alloc &)
- {
- node = NULL;
- }
-#endif /* RECLS_COMPILER_THROWS_ON_NEW_FAIL */
-
- if(NULL != node)
- {
- // Ensure that it, or one of its sub-nodes, has matching entries.
- recls_rc_t rc = node->Initialise();
-
- if(RECLS_FAILED(rc))
- {
- delete node;
-
- node = NULL;
- }
- }
-
- recls_assert(NULL == node || node->_is_valid());
-
- return node;
-}
-
-inline /* static */ PlatformDirectoryNode *PlatformDirectoryNode::FindAndCreate(recls_uint32_t flags, PlatformDirectoryNode::char_type const *rootDir, PlatformDirectoryNode::char_type const *subDir, PlatformDirectoryNode::char_type const *pattern)
-{
- char_type compositeDir[RECLS_PATH_MAX];
-
- recls_assert(rootDir[traits_type::str_len(rootDir) - 1] == traits_type::path_name_separator());
-
- traits_type::str_copy(compositeDir, rootDir);
- traits_type::str_cat(compositeDir, subDir);
-
- return FindAndCreate(flags, compositeDir, pattern);
-}
-
-PlatformDirectoryNode::~PlatformDirectoryNode()
-{
- function_scope_trace("PlatformDirectoryNode::~PlatformDirectoryNode");
-
- FileInfo_Release(m_current);
-
- delete m_dnode;
-}
-
-recls_rc_t PlatformDirectoryNode::Initialise()
-{
- function_scope_trace("PlatformDirectoryNode::Initialise");
-
- recls_rc_t rc;
-
- recls_assert(NULL == m_current);
- recls_assert(NULL == m_dnode);
-
- if(m_entriesBegin != m_entries.end())
- {
- // (i) Try getting a file first,
- m_current = create_entryinfo_from_psrecord(m_rootDir, m_flags, (*m_entriesBegin).get_find_data());
-
- if(NULL == m_current)
- {
- rc = RECLS_RC_OUT_OF_MEMORY;
- }
- else
- {
- rc = RECLS_RC_OK;
- }
- }
- else
- {
- if(m_directoriesBegin == m_directories.end())
- {
- rc = RECLS_RC_NO_MORE_DATA;
- }
- else
- {
- do
- {
-#if 0
-// m_dnode = PlatformDirectoryNode::FindAndCreate(m_flags, m_rootDir, (*m_directoriesBegin, m_pattern);
-#else /* ? 0 */
- // The way basic_findfile_sequence<> works
- m_dnode = PlatformDirectoryNode::FindAndCreate(m_flags, (*m_directoriesBegin).get_path(), m_pattern);
-#endif /* 0 */
-
- } while(NULL == m_dnode && ++m_directoriesBegin != m_directories.end());
-
- rc = (NULL == m_dnode) ? RECLS_RC_NO_MORE_DATA : RECLS_RC_OK;
- }
- }
-
- if(RECLS_SUCCEEDED(rc))
- {
- recls_assert(_is_valid());
- }
-
- return rc;
-}
-
-recls_bool_t PlatformDirectoryNode::_is_valid() const
-{
- function_scope_trace("PlatformDirectoryNode::_is_valid");
-
- recls_rc_t rc = RECLS_RC_OK;
-
-#ifdef STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT
-# pragma message("Flesh these out")
-#endif /* STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT */
- if(RECLS_SUCCEEDED(rc))
- {
-
- }
-
- if(RECLS_SUCCEEDED(rc))
- {
- }
-
- if(RECLS_SUCCEEDED(rc))
- {
- }
-
- if(RECLS_SUCCEEDED(rc))
- {
- }
-
- // (i) Either we are enumerating files (m_current != NULL) or directories (m_dnode != NULL), but not both
- recls_assert(NULL == m_current || NULL == m_dnode);
- // (ii) Either we are enumerating files (m_current != NULL) or there are no more files to enumerate
- recls_assert(NULL != m_current || m_entriesBegin == m_entries.end());
-
- return RECLS_SUCCEEDED(rc);
-}
-
-
-recls_rc_t PlatformDirectoryNode::GetNext()
-{
- function_scope_trace("PlatformDirectoryNode::GetNext");
-
- recls_assert(_is_valid());
-
- /* Searching operates as follows:
- *
- * 1. Return all the contents of the files
- * 2. Return the contents of the directories.
- *
- * Hence, if m_dnode is non-NULL, we've already searched
- */
-
- /* States:
- *
- * - Iterating files: m_entriesBegin != m_entries.end(), m_dnode is NULL, m_directoriesBegin != m_directories.end()
- * - Iterating directories: m_directoriesBegin != m_directories.end(), m_dnode is non-NULL, m_current is NULL
- *
- */
-
- // Invariants
-
- // (i) Either we are enumerating files (m_current != NULL) or directories (m_dnode != NULL), but not both
- recls_assert(NULL == m_current || NULL == m_dnode);
- // (ii) Either we are enumerating files (m_current != NULL) or there are no more files to enumerate
- recls_assert(NULL != m_current || m_entriesBegin == m_entries.end());
-
- recls_rc_t rc = RECLS_RC_NO_MORE_DATA;
-
- if(NULL != m_current)
- {
- // Currently enumerating through the files
-
- recls_assert(m_entriesBegin != m_entries.end());
- recls_assert(NULL == m_dnode);
-
- // Advance, and check for end of sequence
- ++m_entriesBegin;
-
- FileInfo_Release(m_current);
- if(m_entriesBegin != m_entries.end())
- {
- // Still enumerating, so just update m_current
- m_current = create_entryinfo_from_psrecord(m_rootDir, m_flags, (*m_entriesBegin).get_find_data());
-
- rc = RECLS_RC_OK;
- }
- else
- {
- // No more left in the files sequence, so delete m_current
- m_current = NULL;
-
- rc = RECLS_RC_NO_MORE_DATA;
- }
- }
-
- if(NULL == m_current)
- {
- // Now we are either enumerating the directories, or we've already done so
-
- if(NULL != m_dnode)
- {
- // Currently enumerating the directories
- rc = m_dnode->GetNext();
-
- if(RECLS_RC_NO_MORE_DATA == rc)
- {
- ++m_directoriesBegin;
-
- delete m_dnode;
-
- m_dnode = NULL;
- }
- }
-
- if(m_directoriesBegin == m_directories.end())
- {
- // Enumeration is complete.
- rc = RECLS_RC_NO_MORE_DATA;
- }
- else
- {
- if(NULL == m_dnode)
- {
- do
- {
- // Creation of the node will cause it to enter the first enumeration
- // state. However, if there are no matching
-
- recls_assert(m_directoriesBegin != m_directories.end());
-
-#if 0
-// m_dnode = PlatformDirectoryNode::FindAndCreate(m_flags, m_rootDir, *m_directoriesBegin, m_pattern);
-#else /* ? 0 */
- // The way basic_findfile_sequence<> works
- m_dnode = PlatformDirectoryNode::FindAndCreate(m_flags, (*m_directoriesBegin).get_path(), m_pattern);
-#endif /* 0 */
-
- if(NULL != m_dnode)
- {
- rc = RECLS_RC_OK;
- }
- else
- {
- ++m_directoriesBegin;
- }
-
- } while(NULL == m_dnode && m_directoriesBegin != m_directories.end());
- }
- }
- }
-
- recls_assert(_is_valid());
-
- return rc;
-}
-
-recls_rc_t PlatformDirectoryNode::GetDetails(recls_info_t *pinfo)
-{
- function_scope_trace("PlatformDirectoryNode::GetDetails");
-
- recls_assert(_is_valid());
-
- recls_rc_t rc;
-
- recls_assert(NULL != pinfo);
- recls_assert(NULL == m_current || NULL == m_dnode);
-
- if(NULL != m_current)
- {
- // Currently searching for files from the current directory
-
- recls_assert(NULL == m_dnode);
-
- rc = FileInfo_Copy(m_current, pinfo);
-
-#ifdef _DEBUG
- {
- recls_char_t buffer[RECLS_PATH_MAX];
-
- Recls_GetPathProperty(m_current, buffer, stlsoft_num_elements(buffer));
-
- debug_printf(" [%s]\n", buffer);
- }
-#endif /* _DEBUG */
- }
- else if(NULL != m_dnode)
- {
- recls_assert(NULL == m_current);
-
- // Sub-directory searching is active, so get from there.
-
- rc = m_dnode->GetDetails(pinfo);
- }
- else
- {
- // Enumeration has completed
- rc = RECLS_RC_NO_MORE_DATA;
- }
-
- recls_assert(_is_valid());
-
- return rc;
-}
-
-recls_rc_t PlatformDirectoryNode::GetNextDetails(recls_info_t *pinfo)
-{
- function_scope_trace("PlatformDirectoryNode::GetNextDetails");
-
- recls_assert(_is_valid());
- recls_assert(NULL != pinfo);
-
- recls_rc_t rc = GetNext();
-
- if(RECLS_SUCCEEDED(rc))
- {
- rc = GetDetails(pinfo);
- }
-
- recls_assert(_is_valid());
-
- return rc;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * ReclsSearchInfo
- */
-
-void *ReclsSearchInfo::operator new(size_t cb, int cDirParts, size_t cbRootDir)
-{
- function_scope_trace("ReclsSearchInfo::operator new");
-
- cbRootDir = align_up_size(cbRootDir);
-
- recls_assert(cb > stlsoft_raw_offsetof(ReclsSearchInfo, data));
-
- cb = stlsoft_raw_offsetof(ReclsSearchInfo, data)
- + (cDirParts) * sizeof(recls_strptrs_t)
- + cbRootDir;
-
- return malloc(cb);
-}
-
-#if !defined(RECLS_COMPILER_IS_BORLAND) && \
- !defined(RECLS_COMPILER_IS_DMC) && \
- !defined(RECLS_COMPILER_IS_INTEL) && \
- !defined(RECLS_COMPILER_IS_WATCOM)
-void ReclsSearchInfo::operator delete(void *pv, int /* cDirParts */, size_t /* cbRootDir */)
-{
- function_scope_trace("ReclsSearchInfo::operator delete");
-
- free(pv);
-}
-#endif /* !RECLS_COMPILER_IS_BORLAND && !RECLS_COMPILER_IS_DMC */
-
-void ReclsSearchInfo::operator delete(void *pv)
-{
- function_scope_trace("ReclsSearchInfo::operator delete");
-
- free(pv);
-}
-
-inline /* static */ recls_rc_t ReclsSearchInfo::FindAndCreate(ReclsSearchInfo::char_type const *rootDir, ReclsSearchInfo::char_type const *pattern, recls_uint32_t flags, ReclsSearchInfo **ppsi)
-{
- function_scope_trace("ReclsSearchInfo::FindAndCreate");
-
- recls_rc_t rc;
- ReclsSearchInfo *si;
- char_type fullPath[RECLS_PATH_MAX];
- size_t cchFullPath;
-
- *ppsi = NULL;
-
- cchFullPath = traits_type::get_full_path_name(rootDir, RECLS_NUM_ELEMENTS(fullPath), fullPath);
- if( 0 == cchFullPath ||
- !file_exists(fullPath))
- {
- rc = RECLS_RC_INVALID_DIRECTORY;
- }
- else
- {
- traits_type::ensure_dir_end(fullPath);
-
- size_t lenSearchRoot = traits_type::str_len(fullPath);
-
- recls_assert(0 < lenSearchRoot);
-
- rootDir = fullPath;
-
- // Count the directory parts. This is always done for the ReclsSearchInfo class, since it
- // uses them to recurse.
- char_type const *begin = rootDir + 2;
- char_type const *const end = rootDir + lenSearchRoot;
- int cDirParts = count_dir_parts(begin, end);
-
-#ifdef RECLS_COMPILER_THROWS_ON_NEW_FAIL
- try
- {
-#endif /* RECLS_COMPILER_THROWS_ON_NEW_FAIL */
- si = new(cDirParts, sizeof(char_type) * (1 + lenSearchRoot)) ReclsSearchInfo(cDirParts, rootDir, pattern, flags);
-#ifdef RECLS_COMPILER_THROWS_ON_NEW_FAIL
- }
- catch(std::bad_alloc &)
- {
- si = NULL;
- }
-#endif /* RECLS_COMPILER_THROWS_ON_NEW_FAIL */
-
- if(NULL == si)
- {
- rc = RECLS_RC_FAIL;
- }
- else
- {
- // This is a nasty hack. It's tantamount to ctor & create function, so
- // should be made more elegant soon.
- if(NULL == si->m_dnode)
- {
- delete si;
-
- si = NULL;
-
- rc = RECLS_RC_NO_MORE_DATA;
- }
- else
- {
- *ppsi = si;
-
- rc = RECLS_RC_OK;
- }
- }
- }
-
- return rc;
-}
-
-ReclsSearchInfo::char_type const *ReclsSearchInfo::_calc_rootDir(int cDirParts, ReclsSearchInfo::char_type const *rootDir)
-{
- function_scope_trace("ReclsSearchInfo::_calc_rootDir");
-
- // Root dir is located after file parts, and before pattern
- return traits_type::str_copy((char_type*)&data[cDirParts * sizeof(recls_strptrs_t)], rootDir);
-}
-
-ReclsSearchInfo::ReclsSearchInfo( int cDirParts
- , ReclsSearchInfo::char_type const *rootDir
- , ReclsSearchInfo::char_type const *pattern
- , recls_uint32_t flags)
- : m_flags(flags)
- , m_lastError(RECLS_RC_OK)
- , m_rootDir(_calc_rootDir(cDirParts, rootDir))
-{
- function_scope_trace("ReclsSearchInfo::ReclsSearchInfo");
-
- recls_assert(NULL != rootDir);
- recls_assert(NULL != pattern);
- recls_assert(traits_type::str_len(rootDir) < RECLS_PATH_MAX);
- recls_assert(traits_type::str_len(pattern) < RECLS_PATH_MAX);
-
- // Initialise the directory parts.
-
- recls_assert(rootDir[1] == ':');
-
-// char_type const *p = rootDir + 2;
-// struct recls_strptrs_t *begin = (struct recls_strptrs_t*)&data[0];
-
- // Now start the search
- m_dnode = PlatformDirectoryNode::FindAndCreate(m_flags, rootDir, pattern);
-}
-
-// Operations
-recls_rc_t ReclsSearchInfo::GetNext()
-{
- function_scope_trace("ReclsSearchInfo::GetNext");
-
- recls_assert(NULL != m_dnode);
-
- m_lastError = m_dnode->GetNext();
-
- if(RECLS_RC_NO_MORE_DATA == m_lastError)
- {
- delete m_dnode;
-
- m_dnode = NULL;
- }
-
- return m_lastError;
-}
-
-recls_rc_t ReclsSearchInfo::GetDetails(recls_info_t *pinfo)
-{
- function_scope_trace("ReclsSearchInfo::GetDetails");
-
- recls_assert(NULL != m_dnode);
-
- return (m_lastError = m_dnode->GetDetails(pinfo));
-}
-
-recls_rc_t ReclsSearchInfo::GetNextDetails(recls_info_t *pinfo)
-{
- function_scope_trace("ReclsSearchInfo::GetNextDetails");
-
- recls_assert(NULL != m_dnode);
-
- m_lastError = m_dnode->GetNextDetails(pinfo);
-
- if(RECLS_RC_NO_MORE_DATA == m_lastError)
- {
- delete m_dnode;
- }
-
- return m_lastError;
-}
-
-// Accessors
-
-recls_rc_t ReclsSearchInfo::GetLastError() const
-{
- function_scope_trace("ReclsSearchInfo::GetLastError");
-
- return m_lastError;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Search control
- */
-
-RECLS_FNDECL(recls_rc_t) Recls_Search( recls_char_t const *searchRoot
- , recls_char_t const *pattern
- , recls_uint32_t flags
- , hrecls_t *phSrch)
-{
- function_scope_trace("Recls_Search");
-
- recls_assert(NULL != searchRoot);
- recls_assert(NULL != pattern);
- recls_assert(NULL != phSrch);
-
- *phSrch = ReclsSearchInfo::ToHandle(NULL);
-
- recls_rc_t rc;
-
- // Validate the search root
- if( NULL == searchRoot ||
- 0 == *searchRoot)
- {
- searchRoot = ".";
- }
-
- // Validate the flags
- if(0 == (flags & RECLS_F_TYPEMASK))
- {
- flags |= RECLS_F_FILES;
- }
-
- // Since Win32 does not support all search types, we need to inform
- // the caller if they ask to create a search that can never be
- // satisfied.
- if(0 == (flags & (RECLS_F_FILES | RECLS_F_DIRECTORIES)))
- {
- rc = RECLS_RC_INVALID_SEARCH_TYPE;
- }
- // Validate the pattern.
- else if('\0' == *pattern)
- {
- rc = RECLS_RC_NO_MORE_DATA;
- }
- else
- {
- ReclsSearchInfo *si;
-
- rc = ReclsSearchInfo::FindAndCreate(searchRoot, pattern, flags, &si);
-
- if(RECLS_SUCCEEDED(rc))
- {
- *phSrch = ReclsSearchInfo::ToHandle(si);
-
- rc = RECLS_RC_OK;
- }
- }
-
- return rc;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Error handling
- */
-
-RECLS_FNDECL(size_t) Recls_GetErrorString( recls_rc_t rc
- , recls_char_t *buffer
- , size_t cchBuffer)
-{
- function_scope_trace("Recls_GetErrorString");
-
- recls_assert(NULL != buffer);
-
- if(rc == RECLS_RC_SEARCH_NO_CURRENT)
- {
- strncpy(buffer, "Search has no current node", cchBuffer);
- }
- else if(rc == RECLS_RC_INVALID_DIRECTORY)
- {
- strncpy(buffer, "Invalid directory", cchBuffer);
- }
- else if(rc == RECLS_RC_NO_MORE_DATA)
- {
- strncpy(buffer, "No more data", cchBuffer);
- }
- else if(rc == RECLS_RC_OUT_OF_MEMORY)
- {
- strncpy(buffer, "No more memory", cchBuffer);
- }
-
- return strlen(buffer);
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Property elicitation
- */
-
-RECLS_FNDECL(size_t) Recls_GetDirectoryPathProperty( recls_info_t fileInfo
- , recls_char_t *buffer
- , size_t cchBuffer)
-{
- function_scope_trace("Recls_GetDirectoryPathProperty");
-
- recls_assert(NULL != fileInfo);
-
- struct recls_strptrs_t directoryPath =
- {
- fileInfo->path.begin /* Directory path is defined by start of path ... */
- , fileInfo->directory.end /* ... to end of directory. */
- };
-
- return Recls_GetStringProperty_(&directoryPath, buffer, cchBuffer);
-}
-
-RECLS_FNDECL(size_t) Recls_GetShortFileProperty( recls_info_t fileInfo
- , recls_char_t *buffer
- , size_t cchBuffer)
-{
- function_scope_trace("Recls_GetShortFileProperty");
-
- recls_assert(NULL != fileInfo);
-
- return Recls_GetStringProperty_(&fileInfo->shortFile, buffer, cchBuffer);
-}
-
-RECLS_FNDECL(void) Recls_GetDriveProperty( recls_info_t fileInfo
- , recls_char_t *pchDrive)
-{
- function_scope_trace("Recls_GetDriveProperty");
-
- recls_assert(NULL != fileInfo);
- recls_assert(NULL != pchDrive);
-
- *pchDrive = (recls_char_t)toupper(*fileInfo->path.begin);
-}
-
-RECLS_FNDECL(recls_bool_t) Recls_IsFileReadOnly(recls_info_t fileInfo)
-{
- function_scope_trace("Recls_IsFileReadOnly");
-
- recls_assert(NULL != fileInfo);
-
- return fileInfo->attributes & FILE_ATTRIBUTE_READONLY;
-}
-
-RECLS_FNDECL(recls_bool_t) Recls_IsFileDirectory(recls_info_t fileInfo)
-{
- function_scope_trace("Recls_IsFileDirectory");
-
- recls_assert(NULL != fileInfo);
-
- return fileInfo->attributes & FILE_ATTRIBUTE_DIRECTORY;
-}
-
-RECLS_FNDECL(recls_bool_t) Recls_IsFileLink(recls_info_t fileInfo)
-{
- function_scope_trace("Recls_IsFileLink");
-
- recls_assert(NULL != fileInfo);
- ((void)fileInfo);
-
- return false;
-}
-
-RECLS_FNDECL(recls_time_t) Recls_GetCreationTime(recls_info_t fileInfo)
-{
- function_scope_trace("Recls_GetCreationTime");
-
- recls_assert(NULL != fileInfo);
-
- return fileInfo->creationTime;
-}
-
-RECLS_FNDECL(recls_time_t) Recls_GetLastStatusChangeTime(recls_info_t fileInfo)
-{
- function_scope_trace("Recls_GetLastStatusChangeTime");
-
- recls_assert(NULL != fileInfo);
-
- return fileInfo->modificationTime;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_assert.h b/etc/c/recls/recls_assert.h
deleted file mode 100644
index af7135029..000000000
--- a/etc/c/recls/recls_assert.h
+++ /dev/null
@@ -1,128 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_assert.h
- *
- * Purpose: Compiler discrimination for the recls API.
- *
- * Created: 15th August 2003
- * Updated: 2nd November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 RECLS_INCL_H_RECLS_ASSERT
-#define RECLS_INCL_H_RECLS_ASSERT
-
-/* File version */
-#ifndef RECLS_DOCUMENTATION_SKIP_SECTION
-# define RECLS_VER_H_RECLS_ASSERT_MAJOR 1
-# define RECLS_VER_H_RECLS_ASSERT_MINOR 0
-# define RECLS_VER_H_RECLS_ASSERT_REVISION 6
-# define RECLS_VER_H_RECLS_ASSERT_EDIT 6
-#endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
-
-/** \file recls_assert.h Assertions for the \ref group_recls API */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include "recls.h"
-
-/** \def recls_assert Assert macro for the recls API
- *
- * \param x The expression that must evaluate to \c true
- */
-
-#if defined(RECLS_PLATFORM_IS_WIN32) && \
- defined(_MSC_VER)
-# include // Prefer MSVCRT for VC++ and compatible compilers
-# define recls_assert(x) _ASSERTE(x)
-#else
-# include
-# define recls_assert(x) assert(x)
-#endif /* compiler */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Macros
- */
-
-/** \def recls_message_assert Assert macro for the recls API
- *
- * \param m The literal string describing the failed condition
- * \param x The expression that must evaluate to \c true
- */
-
-#if defined(__WATCOMC__)
- #define recls_message_assert(m, ) recls_assert(x)
-#else
- #define recls_message_assert(m, x) recls_assert((m, x))
-#endif /* __WATCOMC__ */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !RECLS_INCL_H_RECLS_ASSERT */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_compiler.h b/etc/c/recls/recls_compiler.h
deleted file mode 100644
index 7ca008497..000000000
--- a/etc/c/recls/recls_compiler.h
+++ /dev/null
@@ -1,202 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_compiler.h
- *
- * Purpose: Compiler discrimination for the recls API.
- *
- * Created: 15th August 2003
- * Updated: 23rd September 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 RECLS_INCL_H_RECLS_COMPILER
-#define RECLS_INCL_H_RECLS_COMPILER
-
-/* File version */
-#ifndef RECLS_DOCUMENTATION_SKIP_SECTION
-# define RECLS_VER_H_RECLS_COMPILER_MAJOR 1
-# define RECLS_VER_H_RECLS_COMPILER_MINOR 0
-# define RECLS_VER_H_RECLS_COMPILER_REVISION 6
-# define RECLS_VER_H_RECLS_COMPILER_EDIT 6
-#endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
-
-/** \file recls_compiler.h Compiler detection for the \ref group_recls API */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Compiler detection
- */
-
-#if defined(__BORLANDC__)
-# define RECLS_COMPILER_IS_BORLAND
-#elif defined(__DMC__)
-# define RECLS_COMPILER_IS_DMC
-#elif defined(__GNUC__)
-# define RECLS_COMPILER_IS_GCC
-#elif defined(__INTEL_COMPILER)
-# define RECLS_COMPILER_IS_INTEL
-#elif defined(__MWERKS__)
-# define RECLS_COMPILER_IS_MWERKS
-#elif defined(__WATCOMC__)
-# define RECLS_COMPILER_IS_WATCOM
-#elif defined(_MSC_VER)
-# define RECLS_COMPILER_IS_MSVC
-#else
-# error Compiler not recognised
-#endif /* compiler */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#if defined(RECLS_COMPILER_IS_BORLAND)
-# include "recls_compiler_borland.h"
-#elif defined(RECLS_COMPILER_IS_DMC)
-# include "recls_compiler_dmc.h"
-#elif defined(RECLS_COMPILER_IS_GCC)
-# include "recls_compiler_gcc.h"
-#elif defined(RECLS_COMPILER_IS_INTEL)
-# include "recls_compiler_intel.h"
-#elif defined(RECLS_COMPILER_IS_MWERKS)
-# include "recls_compiler_mwerks.h"
-#elif defined(RECLS_COMPILER_IS_WATCOM)
-# include "recls_compiler_watcom.h"
-#elif defined(RECLS_COMPILER_IS_MSVC)
-# include "recls_compiler_msvc.h"
-#else
-# error Compiler not recognised. recls recognises Borland, CodeWarrior, Digital Mars, GCC, Intel, Visual C++ and Watcom.
-#endif /* compiler */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Calling convention
- */
-
-/** \def RECLS_CALLCONV_NULL Unspecified calling convention for the \c recls API */
-/** \def RECLS_CALLCONV_CDECL \c cdecl calling convention for the \c recls API */
-/** \def RECLS_CALLCONV_STDDECL \c stdcall calling convention for the \c recls API */
-/** \def RECLS_CALLCONV_FASTDECL \c fastcall calling convention for the \c recls API */
-/** \def RECLS_CALLCONV_DEFAULT Default calling convention for the \c recls API */
-
-#define RECLS_CALLCONV_NULL
-#ifdef RECLS_DOCUMENTATION_SKIP_SECTION
-# define RECLS_CALLCONV_CDECL
-# define RECLS_CALLCONV_STDDECL
-# define RECLS_CALLCONV_FASTDECL
-# define RECLS_CALLCONV_DEFAULT
-#elif defined(RECLS_PLATFORM_IS_WIN32)
-# define RECLS_CALLCONV_CDECL __cdecl
-# define RECLS_CALLCONV_STDDECL __stdcall
-# define RECLS_CALLCONV_FASTDECL __fastcall
-# define RECLS_CALLCONV_DEFAULT __stdcall
-#elif defined(RECLS_PLATFORM_IS_WIN16)
-# define RECLS_CALLCONV_CDECL _cdecl
-# define RECLS_CALLCONV_STDDECL _pascal
-# define RECLS_CALLCONV_FASTDECL _pascal
-# define RECLS_CALLCONV_DEFAULT _pascal
-#elif defined(RECLS_PLATFORM_IS_UNIX)
-# define RECLS_CALLCONV_CDECL
-# define RECLS_CALLCONV_STDDECL
-# define RECLS_CALLCONV_FASTDECL
-# define RECLS_CALLCONV_DEFAULT
-#else
-# error Platform not recognised
-#endif /* __SYNSOFT_VAL_OS_WIN16 */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Typedefs
- */
-
-/** \def recls_bool_t The boolean type of the \c recls API */
-typedef unsigned int recls_bool_t;
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace typedefs
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-typedef recls_sint8_t sint8_t;
-typedef recls_uint8_t uint8_t;
-
-typedef recls_sint16_t sint16_t;
-typedef recls_uint16_t uint16_t;
-
-typedef recls_sint32_t sint32_t;
-typedef recls_uint32_t uint32_t;
-
-typedef recls_sint64_t sint64_t;
-typedef recls_uint64_t uint64_t;
-
-typedef recls_bool_t bool_t;
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Constants and definitions
- */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !RECLS_INCL_H_RECLS_COMPILER */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_compiler_dmc.h b/etc/c/recls/recls_compiler_dmc.h
deleted file mode 100644
index 52ed5a587..000000000
--- a/etc/c/recls/recls_compiler_dmc.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_compiler_dmc.h
- *
- * Purpose: Digital Mars specific types and includes for the recls API.
- *
- * Created: 17th August 2003
- * Updated: 2nd November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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.
- *
- * ////////////////////////////////////////////////////////////////////////// */
-
-
-#if !defined(RECLS_INCL_H_RECLS_COMPILER) && \
- !defined(RECLS_DOCUMENTATION_SKIP_SECTION)
-# error recls_compiler_dmc.h cannot be included directly. Include recls.h
-#else
-
-#ifndef RECLS_COMPILER_IS_DMC
-# error recls_compiler_dmc.h can only be used for Digital Mars compiler builds
-#endif /* !RECLS_COMPILER_IS_DMC */
-
-/* File version */
-#ifndef RECLS_DOCUMENTATION_SKIP_SECTION
-# define RECLS_VER_H_RECLS_COMPILER_DMC_MAJOR 1
-# define RECLS_VER_H_RECLS_COMPILER_DMC_MINOR 1
-# define RECLS_VER_H_RECLS_COMPILER_DMC_REVISION 1
-# define RECLS_VER_H_RECLS_COMPILER_DMC_EDIT 4
-#endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
-
-/** \file recls_compiler_dmc.h Digital Mars C/C++-specific compiler definitions for the \ref group_recls API */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Typedefs
- */
-
-/** \def recls_byte_t The byte type for the \ref group_recls API */
-/** \def recls_sint8_t The 8-bit signed integer type for the \ref group_recls API */
-/** \def recls_uint8_t The 8-bit unsigned integer type for the \ref group_recls API */
-/** \def recls_sint16_t The 16-bit signed integer type for the \ref group_recls API */
-/** \def recls_uint16_t The 16-bit unsigned integer type for the \ref group_recls API */
-/** \def recls_sint32_t The 32-bit signed integer type for the \ref group_recls API */
-/** \def recls_uint32_t The 32-bit unsigned integer type for the \ref group_recls API */
-/** \def recls_sint64_t The 64-bit signed integer type for the \ref group_recls API */
-/** \def recls_uint64_t The 64-bit unsigned integer type for the \ref group_recls API */
-
-typedef unsigned char recls_byte_t;
-
-typedef signed char recls_sint8_t;
-typedef unsigned char recls_uint8_t;
-
-typedef signed short recls_sint16_t;
-typedef unsigned short recls_uint16_t;
-
-typedef signed long recls_sint32_t;
-typedef unsigned long recls_uint32_t;
-
-typedef signed __int64 recls_sint64_t;
-typedef unsigned __int64 recls_uint64_t;
-
-/** \def recls_char_a_t The ANSI character type for the \ref group_recls API */
-/** \def recls_char_w_t The Unicode character type for the \ref group_recls API */
-typedef char recls_char_a_t;
-typedef wchar_t recls_char_w_t;
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* RECLS_INCL_H_RECLS_COMPILER */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_compiler_gcc.h b/etc/c/recls/recls_compiler_gcc.h
deleted file mode 100644
index 4a3bbe805..000000000
--- a/etc/c/recls/recls_compiler_gcc.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_compiler_gcc.h
- *
- * Purpose: Digital Mars specific types and includes for the recls API.
- *
- * Created: 17th August 2003
- * Updated: 2nd November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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.
- *
- * ////////////////////////////////////////////////////////////////////////// */
-
-
-#if !defined(RECLS_INCL_H_RECLS_COMPILER) && \
- !defined(RECLS_DOCUMENTATION_SKIP_SECTION)
-# error recls_compiler_gcc.h cannot be included directly. Include recls.h
-#else
-
-#ifndef RECLS_COMPILER_IS_GCC
-# error recls_compiler_gcc.h can only be used for GCC compiler builds
-#endif /* !RECLS_COMPILER_IS_GCC */
-
-/* File version */
-#ifndef RECLS_DOCUMENTATION_SKIP_SECTION
-# define RECLS_VER_H_RECLS_COMPILER_GCC_MAJOR 1
-# define RECLS_VER_H_RECLS_COMPILER_GCC_MINOR 1
-# define RECLS_VER_H_RECLS_COMPILER_GCC_REVISION 1
-# define RECLS_VER_H_RECLS_COMPILER_GCC_EDIT 4
-#endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
-
-/** \file recls_compiler_gcc.h GCC-specific compiler definitions for the \ref group_recls API */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Typedefs
- */
-
-/** \def recls_byte_t The byte type for the \ref group_recls API */
-/** \def recls_sint8_t The 8-bit signed integer type for the \ref group_recls API */
-/** \def recls_uint8_t The 8-bit unsigned integer type for the \ref group_recls API */
-/** \def recls_sint16_t The 16-bit signed integer type for the \ref group_recls API */
-/** \def recls_uint16_t The 16-bit unsigned integer type for the \ref group_recls API */
-/** \def recls_sint32_t The 32-bit signed integer type for the \ref group_recls API */
-/** \def recls_uint32_t The 32-bit unsigned integer type for the \ref group_recls API */
-/** \def recls_sint64_t The 64-bit signed integer type for the \ref group_recls API */
-/** \def recls_uint64_t The 64-bit unsigned integer type for the \ref group_recls API */
-
-typedef unsigned char recls_byte_t;
-
-typedef signed char recls_sint8_t;
-typedef unsigned char recls_uint8_t;
-
-typedef signed short recls_sint16_t;
-typedef unsigned short recls_uint16_t;
-
-typedef signed long recls_sint32_t;
-typedef unsigned long recls_uint32_t;
-
-typedef signed long long recls_sint64_t;
-typedef unsigned long long recls_uint64_t;
-
-/** \def recls_char_a_t The ANSI character type for the \ref group_recls API */
-/** \def recls_char_w_t The Unicode character type for the \ref group_recls API */
-typedef char recls_char_a_t;
-typedef wchar_t recls_char_w_t;
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* RECLS_INCL_H_RECLS_COMPILER */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_debug.h b/etc/c/recls/recls_debug.h
deleted file mode 100644
index 3a65e7ee2..000000000
--- a/etc/c/recls/recls_debug.h
+++ /dev/null
@@ -1,183 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_debug.h
- *
- * Purpose: Compiler discrimination for the recls API.
- *
- * Created: 30th September 2003
- * Updated: 24th November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 RECLS_INCL_H_RECLS_DEBUG
-#define RECLS_INCL_H_RECLS_DEBUG
-
-/* File version */
-#ifndef RECLS_DOCUMENTATION_SKIP_SECTION
-# define RECLS_VER_H_RECLS_DEBUG_MAJOR 1
-# define RECLS_VER_H_RECLS_DEBUG_MINOR 0
-# define RECLS_VER_H_RECLS_DEBUG_REVISION 6
-# define RECLS_VER_H_RECLS_DEBUG_EDIT 6
-#endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
-
-/** \file recls_debug.h Debug infrastructure for the \ref group_recls API */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include "recls.h"
-#if defined(RECLS_PLATFORM_IS_WIN32) && \
- defined(_DEBUG)
-# include
-# include
-#endif /* _DEBUG && RECLS_PLATFORM_IS_WIN32 */
-#include
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-#if defined(_DEBUG) && \
- defined(RECLS_PLATFORM_IS_WIN32)
-winstl_ns_using(last_error_scope)
-winstl_ns_using(tls_index)
-#endif /* _DEBUG && RECLS_PLATFORM_IS_WIN32 */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * debug_printf
- */
-
-#if defined(_DEBUG) && \
- defined(RECLS_PLATFORM_IS_WIN32)
-
-inline void debug_printf(char const *fmt, ...)
-{
- va_list args;
- char _sz[2048];
-
- va_start(args, fmt);
-
- _vsnprintf(_sz, stlsoft_num_elements(_sz), fmt, args);
- OutputDebugStringA(_sz);
-
- va_end(args);
-}
-
-class function_scope
-{
-public:
- function_scope(char const *fn)
- {
- last_error_scope error_scope;
-
- strncpy(m_fn, fn, stlsoft_num_elements(m_fn) - 1);
- debug_printf("%*s>> %s()\n", _post_inc(), "", m_fn);
- }
- ~function_scope()
- {
- last_error_scope error_scope;
-
- debug_printf("%*s<< %s()\n", _pre_dec(), "", m_fn);
- }
-
-private:
- typedef stlsoft::sint32_t int32_t;
-
- static int32_t _post_inc()
- {
- int32_t i = reinterpret_cast(::TlsGetValue(sm_index));
- int32_t r = i++;
-
- ::TlsSetValue(sm_index, reinterpret_cast(i));
-
- return r;
- }
- static int32_t _pre_dec()
- {
- int32_t i = reinterpret_cast(::TlsGetValue(sm_index));
- int32_t r = --i;
-
- ::TlsSetValue(sm_index, reinterpret_cast(i));
-
- return r;
- }
-
-private:
- char m_fn[1024];
- static tls_index sm_index;
-};
-
-# define function_scope_trace(f) function_scope _scope_ ## __LINE__(f)
-
-#else /* ? _DEBUG && RECLS_PLATFORM_IS_WIN32 */
-inline void _debug_printf(char const *, ...)
-{}
-# define debug_printf (0) ? ((void)0) : _debug_printf
-# define function_scope_trace(f) do { ; } while(0)
-#endif /* _DEBUG && RECLS_PLATFORM_IS_WIN32 */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !RECLS_INCL_H_RECLS_DEBUG */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_defs.h b/etc/c/recls/recls_defs.h
deleted file mode 100644
index 25c1edba3..000000000
--- a/etc/c/recls/recls_defs.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_defs.h
- *
- * Purpose: Definitions for the recls API.
- *
- * Created: 15th August 2003
- * Updated: 27th November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 RECLS_INCL_H_RECLS_DEFS
-#define RECLS_INCL_H_RECLS_DEFS
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#if defined(
-
-
-#ifdef __cplusplus
-
-#include
-
-
-
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#ifndef RECLS_INCL_H_RECLS_DEFS
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_fileinfo.cpp b/etc/c/recls/recls_fileinfo.cpp
deleted file mode 100644
index 0b3668175..000000000
--- a/etc/c/recls/recls_fileinfo.cpp
+++ /dev/null
@@ -1,88 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_api.cpp
- *
- * Purpose: Main (platform-independent) implementation file for the recls API.
- *
- * Created: 16th August 2003
- * Updated: 27th November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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.
- *
- * ////////////////////////////////////////////////////////////////////////// */
-
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include "recls.h"
-#include "recls_internal.h"
-#include "recls_assert.h"
-
-#ifdef __cplusplus
-# include
-#endif /* __cplusplus */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_fileinfo_unix.cpp b/etc/c/recls/recls_fileinfo_unix.cpp
deleted file mode 100644
index 0d4d7d0b5..000000000
--- a/etc/c/recls/recls_fileinfo_unix.cpp
+++ /dev/null
@@ -1,307 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_fileinfo_unix.cpp
- *
- * Purpose: UNIX implementation for the file information blocks of the recls API.
- *
- * Created: 2nd November 2003
- * Updated: 27th November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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.
- *
- * ////////////////////////////////////////////////////////////////////////// */
-
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include "recls.h"
-#include "recls_internal.h"
-#include "recls_assert.h"
-
-#include
-#include
-
-// For ease of debugging for those of you (us?) that prefer working on Win32,
-// the definition of EMULATE_UNIX_ON_WIN32 will allow you to do so.
-#if defined(EMULATE_UNIX_ON_WIN32)
-# include
-# if defined(_MT) || \
- defined(__MT__)
-# ifndef _REENTRANT
-# define _REENTRANT
-# endif /* !_REENTRANT */
-# define RECLS_FILEINFO_MULTITHREADED
-# endif /* _MT || __MT__ */
-#else /* ? EMULATE_UNIX_ON_WIN32 */
-# if defined(_REENTRANT)
-# define RECLS_FILEINFO_MULTITHREADED
-# endif /* _REENTRANT */
-#endif /* EMULATE_UNIX_ON_WIN32 */
-
-
-//#define RECLS_UNIX_USE_ATOMIC_OPERATIONS // Define this if you're on Linux (and you know what you're doing!)
-
-#if defined(RECLS_FILEINFO_MULTITHREADED)
- // If we're multi-threading, then we have two options:
-# if defined(RECLS_UNIX_USE_ATOMIC_OPERATIONS)
- // 1. On Linux we can use the kernel's atomic operations, since all we need
- // is atomic integer operations. Since these kernel operations are not
- // standard, you must explicitly select them in your build by defining
- // the symbol RECLS_UNIX_USE_ATOMIC_OPERATIONS
-# include
-# else /* ? RECLS_UNIX_USE_ATOMIC_OPERATIONS */
- // 2. On other UNIX systems we use the UNIXSTL thread_mutex class
-# include
-# endif /* !RECLS_UNIX_USE_ATOMIC_OPERATIONS */
-#else /* ? RECLS_FILEINFO_MULTITHREADED */
- // When not multi-threaded, we just use the STLSoft null_mutex class, which
- // is just a stub
-# include
-#endif /* RECLS_FILEINFO_MULTITHREADED */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Typedefs
- */
-
-#if defined(RECLS_FILEINFO_MULTITHREADED) && \
- defined(RECLS_UNIX_USE_ATOMIC_OPERATIONS)
-typedef atomic_t rc_atomic_t;
-# define rc_atomic_init(x) ATOMIC_INIT(x)
-#else /* ? RECLS_FILEINFO_MULTITHREADED && RECLS_UNIX_USE_ATOMIC_OPERATIONS */
-typedef recls_sint32_t rc_atomic_t;
-# define rc_atomic_init(x) x
-#endif /* RECLS_FILEINFO_MULTITHREADED && RECLS_UNIX_USE_ATOMIC_OPERATIONS */
-
-struct counted_recls_info_t
-{
- volatile rc_atomic_t rc;
- recls_uint32_t _;
- struct recls_fileinfo_t info;
-};
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Constants and definitions
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace
-{
-#else
-static
-#endif /* !RECLS_NO_NAMESPACE */
-
-volatile rc_atomic_t s_createdInfoBlocks = rc_atomic_init(0);
-volatile rc_atomic_t s_sharedInfoBlocks = rc_atomic_init(0);
-
-#if !defined(RECLS_NO_NAMESPACE)
-} // namespace recls
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Helpers
- */
-
-#if !defined(RECLS_UNIX_USE_ATOMIC_OPERATIONS)
-namespace
-{
-#if defined(RECLS_FILEINFO_MULTITHREADED)
-// unixstl::process_mutex s_mx(true);
- unixstl::thread_mutex s_mx(true);
- typedef unixstl::thread_mutex mutex_t;
-#else /* ? RECLS_FILEINFO_MULTITHREADED */
- stlsoft::null_mutex s_mx;
-
- typedef stlsoft::null_mutex mutex_t;
-#endif /* RECLS_FILEINFO_MULTITHREADED */
-}
-#endif /* !RECLS_UNIX_USE_ATOMIC_OPERATIONS */
-
-inline void RC_PreIncrement(rc_atomic_t volatile *p)
-{
-#if defined(RECLS_UNIX_USE_ATOMIC_OPERATIONS)
-
- atomic_inc(p);
-
-#else /* ? RECLS_UNIX_USE_ATOMIC_OPERATIONS */
- stlsoft::lock_scope lock(s_mx);
-
- ++(*p);
-#endif /* !RECLS_UNIX_USE_ATOMIC_OPERATIONS */
-}
-
-inline recls_sint32_t RC_PreDecrement(rc_atomic_t volatile *p)
-{
-#if defined(RECLS_UNIX_USE_ATOMIC_OPERATIONS)
-
- return 1 + atomic_dec_and_test(p);
-
-#else /* ? RECLS_UNIX_USE_ATOMIC_OPERATIONS */
- stlsoft::lock_scope lock(s_mx);
-
- return --(*p);
-#endif /* !RECLS_UNIX_USE_ATOMIC_OPERATIONS */
-}
-
-inline recls_sint32_t RC_ReadValue(rc_atomic_t volatile *p)
-{
-#if defined(RECLS_UNIX_USE_ATOMIC_OPERATIONS)
-
- return atomic_read(p);
-
-#else /* ? RECLS_UNIX_USE_ATOMIC_OPERATIONS */
- stlsoft::lock_scope lock(s_mx);
-
- return (*p);
-#endif /* !RECLS_UNIX_USE_ATOMIC_OPERATIONS */
-}
-
-inline struct counted_recls_info_t *counted_info_from_info(recls_info_t i)
-{
- recls_assert(i != NULL);
-
- // can't be bothered with all the C++ casts here!
- return (struct counted_recls_info_t *)((recls_byte_t*)i - offsetof(counted_recls_info_t, info));
-}
-
-inline recls_info_t info_from_counted_info(struct counted_recls_info_t * ci)
-{
- recls_assert(ci != NULL);
-
- return &ci->info;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * File info functions
- */
-
-RECLS_FNDECL(recls_info_t) FileInfo_Allocate(size_t cb)
-{
- // Simply allocate a lock-count prior to the main memory (but do it on an 8-byte block)
- counted_recls_info_t *ci = static_cast(malloc(cb - sizeof(struct recls_fileinfo_t) + sizeof(struct counted_recls_info_t)));
- recls_info_t info;
-
- if(NULL == ci)
- {
- info = NULL;
- }
- else
- {
- rc_atomic_t initial = rc_atomic_init(1);
-
- ci->rc = initial; // One initial reference
- info = info_from_counted_info(ci);
-
- RC_PreIncrement(&s_createdInfoBlocks);
- }
-
- return info;
-}
-
-RECLS_FNDECL(void) FileInfo_Release(recls_info_t fileInfo)
-{
- if(NULL != fileInfo)
- {
- counted_recls_info_t *pci = counted_info_from_info(fileInfo);
-
- if(0 == RC_PreDecrement(&pci->rc))
- {
- free(pci);
-
- RC_PreDecrement(&s_createdInfoBlocks);
- }
- else
- {
- RC_PreDecrement(&s_sharedInfoBlocks);
- }
- }
-}
-
-RECLS_FNDECL(recls_rc_t) FileInfo_Copy(recls_info_t fileInfo, recls_info_t *pinfo)
-{
- recls_assert(NULL != pinfo);
-
- if(NULL != fileInfo)
- {
- counted_recls_info_t *pci = counted_info_from_info(fileInfo);
-
- RC_PreIncrement(&pci->rc);
- RC_PreIncrement(&s_sharedInfoBlocks);
- }
-
- *pinfo = fileInfo;
-
- return RECLS_RC_OK;
-}
-
-RECLS_FNDECL(void) FileInfo_BlockCount(recls_sint32_t *pcCreated, recls_sint32_t *pcShared)
-{
- recls_assert(NULL != pcCreated);
- recls_assert(NULL != pcShared);
-
- *pcCreated = RC_ReadValue(&s_createdInfoBlocks);
- *pcShared = RC_ReadValue(&s_sharedInfoBlocks);
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_fileinfo_win32.cpp b/etc/c/recls/recls_fileinfo_win32.cpp
deleted file mode 100644
index 5ee13cd88..000000000
--- a/etc/c/recls/recls_fileinfo_win32.cpp
+++ /dev/null
@@ -1,225 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_fileinfo_win32.cpp
- *
- * Purpose: Win32 implementation for the file information blocks of the recls API.
- *
- * Created: 16th August 2003
- * Updated: 27th November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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.
- *
- * ////////////////////////////////////////////////////////////////////////// */
-
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include "recls.h"
-#include "recls_internal.h"
-#include "recls_assert.h"
-
-#include
-
-#include
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Constants and definitions
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace
-{
-#else
-static
-#endif /* !RECLS_NO_NAMESPACE */
-
-volatile recls_sint32_t s_createdInfoBlocks = 0;
-volatile recls_sint32_t s_sharedInfoBlocks = 0;
-
-#if !defined(RECLS_NO_NAMESPACE)
-} // namespace recls
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Typedefs
- */
-
-struct counted_recls_info_t
-{
- volatile recls_sint32_t rc;
- recls_uint32_t _;
- struct recls_fileinfo_t info;
-};
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Helpers
- */
-
-inline recls_sint32_t RC_PreIncrement(recls_sint32_t volatile *p)
-{
- return winstl::atomic_preincrement(p);
-}
-
-inline recls_sint32_t RC_PreDecrement(recls_sint32_t volatile *p)
-{
- return winstl::atomic_predecrement(p);
-}
-
-inline struct counted_recls_info_t *counted_info_from_info(recls_info_t i)
-{
- recls_assert(i != NULL);
-
- // can't be bothered with all the C++ casts here!
- return (struct counted_recls_info_t *)((recls_byte_t*)i - offsetof(counted_recls_info_t, info));
-}
-
-inline recls_info_t info_from_counted_info(struct counted_recls_info_t * ci)
-{
- recls_assert(ci != NULL);
-
- return &ci->info;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * File info functions
- */
-
-RECLS_FNDECL(recls_info_t) FileInfo_Allocate(size_t cb)
-{
- // Simply allocate a lock-count prior to the main memory (but do it on an 8-byte block)
- counted_recls_info_t *ci = static_cast(malloc(cb - sizeof(struct recls_fileinfo_t) + sizeof(struct counted_recls_info_t)));
- recls_info_t info;
-
- if(NULL == ci)
- {
- info = NULL;
- }
- else
- {
- ci->rc = 1; // One initial reference
- info = info_from_counted_info(ci);
-
- RC_PreIncrement(&s_createdInfoBlocks);
- }
-
- return info;
-}
-
-RECLS_FNDECL(void) FileInfo_Release(recls_info_t fileInfo)
-{
- if(NULL != fileInfo)
- {
- counted_recls_info_t *pci = counted_info_from_info(fileInfo);
-
- if(0 == RC_PreDecrement(&pci->rc))
- {
- free(pci);
-
- RC_PreDecrement(&s_createdInfoBlocks);
- }
- else
- {
- RC_PreDecrement(&s_sharedInfoBlocks);
- }
- }
-}
-
-RECLS_FNDECL(recls_rc_t) FileInfo_Copy(recls_info_t fileInfo, recls_info_t *pinfo)
-{
- recls_assert(NULL != pinfo);
-
- if(NULL != fileInfo)
- {
- counted_recls_info_t *pci = counted_info_from_info(fileInfo);
-
- RC_PreIncrement(&pci->rc);
- RC_PreIncrement(&s_sharedInfoBlocks);
- }
-
- *pinfo = fileInfo;
-
- return RECLS_RC_OK;
-}
-
-RECLS_FNDECL(void) FileInfo_BlockCount(recls_sint32_t *pcCreated, recls_sint32_t *pcShared)
-{
- recls_assert(NULL != pcCreated);
- recls_assert(NULL != pcShared);
-
- // Because on 3.51 and 95, the InterlockedInc/Decrement functions do not
- // return the values, we're going to fudge it
-
- RC_PreIncrement(&s_createdInfoBlocks);
- recls_sint32_t createdInfoBlocks = s_createdInfoBlocks;
- RC_PreDecrement(&s_createdInfoBlocks);
- *pcCreated = createdInfoBlocks - 1;
-
- RC_PreIncrement(&s_sharedInfoBlocks);
- recls_sint32_t sharedInfoBlocks = s_sharedInfoBlocks;
- RC_PreDecrement(&s_sharedInfoBlocks);
- *pcShared = sharedInfoBlocks - 1;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_internal.cpp b/etc/c/recls/recls_internal.cpp
deleted file mode 100644
index 3505cf8e8..000000000
--- a/etc/c/recls/recls_internal.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_internal.cpp
- *
- * Purpose: Implementation file for the recls API internal helpers.
- *
- * Created: 16th August 2003
- * Updated: 27th November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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.
- *
- * ////////////////////////////////////////////////////////////////////////// */
-
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include "recls.h"
-#include "recls_internal.h"
-#include "recls_assert.h"
-
-#include
-
-#include
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-static size_t recls_strncpy(recls_char_t *dest, size_t cchDest, recls_char_t const *src, size_t cchSrc)
-{
- size_t cchWritten;
-
- if(cchDest < cchSrc)
- {
- /* Just to straight strncpy. */
- strncpy(dest, src, cchDest);
-
- cchWritten = cchDest;
- }
- else
- {
- strncpy(dest, src, cchSrc);
-
- if(cchSrc < cchDest)
- {
- /* Fill the rest up with blanks. */
-
- memset(&dest[cchSrc], 0, sizeof(recls_char_t) * (cchDest - cchSrc));
- }
-
- cchWritten = cchSrc;
- }
-
- return cchWritten;
-}
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#if defined(RECLS_COMPILER_IS_DMC) || \
- defined(RECLS_COMPILER_IS_WATCOM)
-RECLS_FNDECL(size_t) Recls_GetStringProperty_( struct recls_strptrs_t const * ptrs
- , recls_char_t * buffer
- , size_t cchBuffer)
-#else
-RECLS_FNDECL(size_t) Recls_GetStringProperty_( struct recls_strptrs_t const *const ptrs
- , recls_char_t *const buffer
- , size_t const cchBuffer)
-#endif /* RECLS_COMPILER_IS_DMC || RECLS_COMPILER_IS_WATCOM */
-{
- recls_assert(NULL != ptrs);
-
- size_t cch = ptrs->end - ptrs->begin;
-
- if(NULL != buffer)
- {
- cch = recls_strncpy(buffer, cchBuffer, ptrs->begin, cch);
- }
-
- return cch;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_internal.h b/etc/c/recls/recls_internal.h
deleted file mode 100644
index d09951a0e..000000000
--- a/etc/c/recls/recls_internal.h
+++ /dev/null
@@ -1,245 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_internal.h
- *
- * Purpose: Main header file for the recls API.
- *
- * Created: 15th August 2003
- * Updated: 24th November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 RECLS_INCL_H_RECLS_INTERNAL
-#define RECLS_INCL_H_RECLS_INTERNAL
-
-/* File version */
-#ifndef RECLS_DOCUMENTATION_SKIP_SECTION
-# define RECLS_VER_H_RECLS_INTERNAL_MAJOR 1
-# define RECLS_VER_H_RECLS_INTERNAL_MINOR 2
-# define RECLS_VER_H_RECLS_INTERNAL_REVISION 3
-# define RECLS_VER_H_RECLS_INTERNAL_EDIT 12
-#endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef __cplusplus
-# error This file can only be included in C++ compilation units
-#endif /* __cplusplus */
-
-#include "recls.h"
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Macros
- */
-
-#ifndef RECLS_NUM_ELEMENTS
-# if defined(stlsoft_num_elements)
-# define RECLS_NUM_ELEMENTS(x) stlsoft_num_elements(x)
-# else /* ? stlsoft_num_elements */
-# define RECLS_NUM_ELEMENTS(x) (sizeof(x) / sizeof((x)[0]))
-# endif /* stlsoft_num_elements */
-#endif /* !RECLS_NUM_ELEMENTS */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Classes
- */
-
-// class ReclsDNode
-/// Interface for directory nodes
-///
-/// \note It has an ugly name-prefix if need to compile with compiler that does not support namespaces
-struct ReclsDNode
-{
- /// Destructory
- ///
- /// ReclsDNode instances are not reference-counted, but are
- /// deleted by their owner. They are non-shareable.
- virtual ~ReclsDNode() = 0;
-
- virtual recls_rc_t GetNext() = 0;
-
- virtual recls_rc_t GetDetails(recls_info_t *pinfo) = 0;
-
- virtual recls_rc_t GetNextDetails(recls_info_t *pinfo) = 0;
-};
-
-inline ReclsDNode::~ReclsDNode()
-{}
-
-// class ReclsDNode
-/// Search info structure
-///
-/// \note It has an ugly name-prefix if need to compile with compiler that does not support namespaces
-class ReclsSearchInfo
-{
-public:
- typedef recls_char_t char_type;
- typedef ReclsSearchInfo class_type;
-
-// Allocation
-private:
- void *operator new(size_t cb, int cDirParts, size_t cbRootDir);
-#if !defined(RECLS_COMPILER_IS_BORLAND) && \
- !defined(RECLS_COMPILER_IS_DMC) && \
- !defined(RECLS_COMPILER_IS_INTEL) && \
- !defined(RECLS_COMPILER_IS_WATCOM)
- void operator delete(void *pv, int cDirParts, size_t cbRootDir);
-#endif /* !RECLS_COMPILER_IS_BORLAND && !RECLS_COMPILER_IS_DMC */
-public:
- void operator delete(void *pv);
-
-// Construction
-protected:
- ReclsSearchInfo(int cDirParts
- , char_type const *rootDir
- , char_type const *pattern
- , recls_uint32_t flags);
-public:
- static recls_rc_t FindAndCreate(char_type const *rootDir
- , char_type const *pattern
- , recls_uint32_t flags
- , ReclsSearchInfo **ppsi);
-
-// Operations
-public:
- recls_rc_t GetNext();
-
- recls_rc_t GetDetails(recls_info_t *pinfo);
-
- recls_rc_t GetNextDetails(recls_info_t *pinfo);
-
-// Accessors
-public:
- recls_rc_t GetLastError() const;
-
-// Handle interconversion
-public:
- static hrecls_t ToHandle(ReclsSearchInfo *si);
- static ReclsSearchInfo *FromHandle(hrecls_t h);
-
-// Implementation
-private:
- char_type const *_calc_rootDir(int cDirParts, char_type const *rootDir);
-
-// Members
-private:
- recls_uint32_t m_flags;
- ReclsDNode *m_dnode;
- recls_rc_t m_lastError;
- char_type const * const m_rootDir;
-
- /** The opaque data of the search */
- recls_byte_t data[1];
- /*
- * The data comprises:
- *
- * - root dir
- *
- */
-
-// Not to be implemented
-private:
- ReclsSearchInfo(ReclsSearchInfo const &);
- ReclsSearchInfo &operator =(ReclsSearchInfo const &);
-};
-
-inline /* static */ hrecls_t ReclsSearchInfo::ToHandle(ReclsSearchInfo *si)
-{
- return hrecls_t(si);
-}
-
-inline /* static */ ReclsSearchInfo *ReclsSearchInfo::FromHandle(hrecls_t h)
-{
- return const_cast(reinterpret_cast(h));
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * File info functions
- */
-
-RECLS_FNDECL(recls_info_t) FileInfo_Allocate( size_t cb);
-RECLS_FNDECL(void) FileInfo_Release( recls_info_t fileInfo);
-RECLS_FNDECL(recls_rc_t) FileInfo_Copy( recls_info_t fileInfo
- , recls_info_t *pinfo);
-
-RECLS_FNDECL(void) FileInfo_BlockCount(recls_sint32_t *pcCreated
- , recls_sint32_t *pcShared);
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Helper functions
- */
-
-RECLS_FNDECL(size_t) Recls_GetStringProperty_( struct recls_strptrs_t const *ptrs
- , recls_char_t *buffer
- , size_t cchBuffer);
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !RECLS_INCL_H_RECLS_INTERNAL */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_language.h b/etc/c/recls/recls_language.h
deleted file mode 100644
index 6393fd99c..000000000
--- a/etc/c/recls/recls_language.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_language.h
- *
- * Purpose: Platform discrimination for the recls API.
- *
- * Created: 15th August 2003
- * Updated: 23rd September 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 RECLS_INCL_H_RECLS_LANGUAGE
-#define RECLS_INCL_H_RECLS_LANGUAGE
-
-/* File version */
-#ifndef RECLS_DOCUMENTATION_SKIP_SECTION
-# define RECLS_VER_H_RECLS_LANGUAGE_MAJOR 1
-# define RECLS_VER_H_RECLS_LANGUAGE_MINOR 0
-# define RECLS_VER_H_RECLS_LANGUAGE_REVISION 8
-# define RECLS_VER_H_RECLS_LANGUAGE_EDIT 8
-#endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
-
-/** \file recls_language.h Language detection for the \ref group_recls API */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Linkage
- */
-
-/** \def RECLS_LINKAGE_C The linkage for recls functions. Is \c extern \c "C" in C++ and \c extern in C. */
-
-#ifdef __cplusplus
-# define RECLS_LINKAGE_C extern "C"
-# define RECLS_LINKAGE_CPP extern "C++"
-#else
-# define RECLS_LINKAGE_C extern
-#endif /* __cplusplus */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(__cplusplus)
-# define RECLS_NO_NAMESPACE
-#endif /* !__cplusplus */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Typedefs
- */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !RECLS_INCL_H_RECLS_LANGUAGE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_platform.h b/etc/c/recls/recls_platform.h
deleted file mode 100644
index f2c5138d2..000000000
--- a/etc/c/recls/recls_platform.h
+++ /dev/null
@@ -1,148 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_platform.h
- *
- * Purpose: Platform discrimination for the recls API.
- *
- * Created: 15th August 2003
- * Updated: 2nd November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 RECLS_INCL_H_RECLS_PLATFORM
-#define RECLS_INCL_H_RECLS_PLATFORM
-
-/* File version */
-#ifndef RECLS_DOCUMENTATION_SKIP_SECTION
-# define RECLS_VER_H_RECLS_PLATFORM_MAJOR 1
-# define RECLS_VER_H_RECLS_PLATFORM_MINOR 2
-# define RECLS_VER_H_RECLS_PLATFORM_REVISION 2
-# define RECLS_VER_H_RECLS_PLATFORM_EDIT 10
-#endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
-
-/** \file recls_platform.h Platform detection for the \ref group_recls API */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Platform recognition
- *
- * Define the symbol RECLS_OVERRIDE_PLATFORM to provide your own platform
- * discrimination
- */
-
-#ifndef RECLS_OVERRIDE_PLATFORM
-# if defined(WIN32) || \
- defined(_WIN32)
-# define RECLS_PLATFORM_IS_WIN32
-# elif defined(unix) || \
- defined(UNIX) || \
- defined(__unix) || \
- defined(__unix__) || \
- ( defined(__xlC__) && \
- defined(_POWER) && \
- defined(_AIX))
-# define RECLS_PLATFORM_IS_UNIX
-# else
-# error Platform not (yet) recognised
-# endif /* platform */
-#endif /* !RECLS_OVERRIDE_PLATFORM */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#if defined(RECLS_PLATFORM_IS_WIN32)
-# include
-#elif defined(RECLS_PLATFORM_IS_UNIX)
-# include
-#else
-# error Platform not (yet) recognised
-#endif /* platform */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Constants and definitions
- */
-
-/** \def RECLS_PATH_MAX The maximum number of characters in a path on the host operating-system. */
-
-#if defined(RECLS_PLATFORM_IS_WIN32)
-
-# define RECLS_PATH_MAX (_MAX_PATH)
-
-#elif defined(RECLS_PLATFORM_IS_UNIX)
-
-# define RECLS_PATH_MAX (PATH_MAX)
-
-#else
-
-# error Platform not (yet) recognised
-
-#endif /* platform */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !RECLS_INCL_H_RECLS_PLATFORM */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_platform_types.h b/etc/c/recls/recls_platform_types.h
deleted file mode 100644
index 9d190b4db..000000000
--- a/etc/c/recls/recls_platform_types.h
+++ /dev/null
@@ -1,245 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_platform_types.h
- *
- * Purpose: Platform discrimination for the recls API.
- *
- * Created: 18th August 2003
- * Updated: 21st November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 RECLS_INCL_H_RECLS_PLATFORM_TYPES
-#define RECLS_INCL_H_RECLS_PLATFORM_TYPES
-
-/* File version */
-#ifndef RECLS_DOCUMENTATION_SKIP_SECTION
-# define RECLS_VER_H_RECLS_PLATFORM_TYPES_MAJOR 1
-# define RECLS_VER_H_RECLS_PLATFORM_TYPES_MINOR 3
-# define RECLS_VER_H_RECLS_PLATFORM_TYPES_REVISION 1
-# define RECLS_VER_H_RECLS_PLATFORM_TYPES_EDIT 8
-#endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
-
-/** \file recls_platform_types.h Platform-dependent types for the \ref group_recls API */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef RECLS_INCL_H_RECLS_PLATFORM
-# error recls_platform_types.h must not be included directly. You should include recls.h
-#endif /* !RECLS_INCL_H_RECLS_PLATFORM */
-
-#if defined(RECLS_PLATFORM_IS_WIN32)
-//# include
-#elif defined(RECLS_PLATFORM_IS_UNIX)
-# include
-# include
-#else
-# error Platform not (yet) recognised
-#endif /* platform */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Platform-dependent types
- */
-
-/** \def recls_time_t The time type for the recls API */
-/** \def recls_filesize_t The file-size type for the recls API */
-
-#if defined(RECLS_PLATFORM_IS_WIN32)
-
- typedef FILETIME recls_time_t;
- typedef ULARGE_INTEGER recls_filesize_t;
-
-#elif defined(RECLS_PLATFORM_IS_UNIX)
-
- typedef time_t recls_time_t;
- typedef off_t recls_filesize_t;
-
-#else
-
-# error Platform not (yet) recognised
-
- typedef platform-dependent-type recls_time_t;
- typedef platform-dependent-type recls_filesize_t;
-
-#endif /* platform */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Typedefs
- */
-
-#ifdef RECLS_CHAR_TYPE_IS_CHAR
-# undef RECLS_CHAR_TYPE_IS_CHAR
-#endif /* RECLS_CHAR_TYPE_IS_CHAR */
-
-#ifdef RECLS_CHAR_TYPE_IS_WCHAR
-# undef RECLS_CHAR_TYPE_IS_WCHAR
-#endif /* RECLS_CHAR_TYPE_IS_WCHAR */
-
-/** The recls library ambient character type */
-#if 1
-typedef recls_char_a_t recls_char_t;
-# define RECLS_CHAR_TYPE_IS_CHAR
-#else /* ? 0 */
-typedef recls_char_w_t recls_char_t;
-# define RECLS_CHAR_TYPE_IS_WCHAR
-#endif /* 0 */
-
-
-/** An asymmetric range representing a sequence of characters (ie a string) */
-struct recls_strptrs_t
-{
- /** Points to the start of the sequence. */
- recls_char_t const *begin;
- /** Points to one-past-the-end of the sequence. */
- recls_char_t const *end;
-};
-
-/** An asymmetric range representing a sequence of recls_strptrs_t (ie a set of strings) */
-struct recls_strptrsptrs_t
-{
- /** Points to the start of the sequence. */
- struct recls_strptrs_t const *begin;
- /** Points to one-past-the-end of the sequence. */
- struct recls_strptrs_t const *end;
-};
-
-/** A file entry info structure
- *
- * \note Several parts of this structure are platform-dependent.
- */
-struct recls_fileinfo_t
-{
-/** \name attributes */
-/** @{ */
- /** The file attributes */
- recls_uint32_t attributes;
-/** @} */
-/** \name Path components */
-/** @{ */
- /** The full path of the file */
- struct recls_strptrs_t path;
-#if defined(RECLS_PLATFORM_IS_WIN32)
- /** The short (8.3) path of the file
- *
- * \note This member is only defined for the Win32 platform.
- */
- struct recls_strptrs_t shortFile;
- /** The letter of the drive */
- recls_char_t drive;
-#endif /* RECLS_PLATFORM_IS_WIN32 */
- /** The directory component */
- struct recls_strptrs_t directory;
- /** The file name component (excluding extension) */
- struct recls_strptrs_t fileName;
- /** The file extension component (excluding '.') */
- struct recls_strptrs_t fileExt;
- /** The directory parts */
- struct recls_strptrsptrs_t directoryParts;
-/** @} */
-/** \name File times */
-/** @{ */
-#if defined(RECLS_PLATFORM_IS_WIN32)
- /** The time the file was created
- *
- * \note This member is only defined for the Win32 platform.
- */
- recls_time_t creationTime;
-#endif /* RECLS_PLATFORM_IS_WIN32 */
- /** The time the file was last modified */
- recls_time_t modificationTime;
- /** The time the file was last accessed */
- recls_time_t lastAccessTime;
-#if defined(RECLS_PLATFORM_IS_UNIX)
- /** The time the file status was last changed
- *
- * \note This member is only defined for the UNIX platform.
- */
- recls_time_t lastStatusChangeTime;
-#endif /* RECLS_PLATFORM_IS_UNIX */
-/** @} */
-/** \name Size */
-/** @{ */
- /** The size of the file */
- recls_filesize_t size;
-/** @} */
-/* data */
- /** The opaque data of the file; it is not accessible to any client code, and must not be manipulated in any way */
- recls_byte_t data[1];
- /*
- *
- * - full path
- * - directory parts
- *
- */
-};
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !RECLS_INCL_H_RECLS_PLATFORM_TYPES */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_retcodes.h b/etc/c/recls/recls_retcodes.h
deleted file mode 100644
index dbb69f472..000000000
--- a/etc/c/recls/recls_retcodes.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_retcodes.h
- *
- * Purpose: Return codes for the recls API.
- *
- * Created: 15th August 2003
- * Updated: 27th September 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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.
- *
- * ////////////////////////////////////////////////////////////////////////// */
-
-
-#if !defined(RECLS_INCL_H_RECLS) && \
- !defined(RECLS_DOCUMENTATION_SKIP_SECTION)
-# error recls_retcodes.h cannot be included directly. Include recls.h
-#else
-
-/* File version */
-#ifndef RECLS_DOCUMENTATION_SKIP_SECTION
-# define RECLS_VER_H_RECLS_RETCODES_MAJOR 1
-# define RECLS_VER_H_RECLS_RETCODES_MINOR 1
-# define RECLS_VER_H_RECLS_RETCODES_REVISION 2
-# define RECLS_VER_H_RECLS_RETCODES_EDIT 10
-#endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
-
-/** \file recls_retcodes.h Return codes for the \ref group_recls API */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Constants and definitions
- */
-
-/** No search is currently active */
-#define RECLS_RC_SEARCH_NO_CURRENT ((RECLS_QUAL(recls_rc_t))(-1 - 1001))
-/** The directory was invalid, or does not exist */
-#define RECLS_RC_INVALID_DIRECTORY ((RECLS_QUAL(recls_rc_t))(-1 - 1002))
-/** No more data is available */
-#define RECLS_RC_NO_MORE_DATA ((RECLS_QUAL(recls_rc_t))(-1 - 1003))
-/** Memory exhaustion */
-#define RECLS_RC_OUT_OF_MEMORY ((RECLS_QUAL(recls_rc_t))(-1 - 1004))
-/** Function not implemented */
-#define RECLS_RC_NOT_IMPLEMENTED ((RECLS_QUAL(recls_rc_t))(-1 - 1005))
-/** Invalid search type */
-#define RECLS_RC_INVALID_SEARCH_TYPE ((RECLS_QUAL(recls_rc_t))(-1 - 1006))
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !RECLS_INCL_H_RECLS */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_unix.h b/etc/c/recls/recls_unix.h
deleted file mode 100644
index c33756622..000000000
--- a/etc/c/recls/recls_unix.h
+++ /dev/null
@@ -1,115 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_unix.h
- *
- * Purpose: UNIX-specific header file for the recls API.
- *
- * Created: 18th August 2003
- * Updated: 23rd September 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 RECLS_INCL_H_RECLS_UNIX
-#define RECLS_INCL_H_RECLS_UNIX
-
-/* File version */
-#ifndef RECLS_DOCUMENTATION_SKIP_SECTION
-# define RECLS_VER_H_RECLS_UNIX_MAJOR 1
-# define RECLS_VER_H_RECLS_UNIX_MINOR 0
-# define RECLS_VER_H_RECLS_UNIX_REVISION 3
-# define RECLS_VER_H_RECLS_UNIX_EDIT 3
-#endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
-
-/** \file recls_unix.h UNIX-specific parts of the \ref group_recls API */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Strictness
- */
-
-#ifndef RECLS_NO_STRICT
-# define RECLS_STRICT
-#endif /* !RECLS_NO_STRICT */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include "recls.h"
-
-#ifndef RECLS_PLATFORM_IS_UNIX
-# error recls_unix.h is to be included in UNIX compilations only
-#endif /* RECLS_PLATFORM_IS_UNIX */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Functions
- */
-
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !RECLS_INCL_H_RECLS_UNIX */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_util.cpp b/etc/c/recls/recls_util.cpp
deleted file mode 100644
index 4b2f7d079..000000000
--- a/etc/c/recls/recls_util.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_util.cpp
- *
- * Purpose: Platform-independent utility functions for the recls API.
- *
- * Created: 17th August 2003
- * Updated: 27th November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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.
- *
- * ////////////////////////////////////////////////////////////////////////// */
-
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include "recls.h"
-#include "recls_internal.h"
-#include "recls_assert.h"
-#include "recls_util.h"
-
-#include
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-RECLS_LINKAGE_C size_t align_up_size(size_t i)
-{
- return (size_t)((i + (4 - 1)) & ~(4 - 1));
-}
-
-RECLS_LINKAGE_C recls_bool_t is_dots(recls_char_t const *f)
-{
- recls_assert(NULL != f);
-
- return ( f[0] == '.' &&
- f[1] == '\0') ||
- ( f[0] == '.' &&
- f[1] == '.' &&
- f[2] == '\0');
-}
-
-RECLS_LINKAGE_C size_t count_char_instances_a(recls_char_a_t const *begin, recls_char_a_t const *end, recls_char_a_t const ch)
-{
- size_t cDirParts = 0;
-
- for(; begin != end; ++begin)
- {
- if(*begin == ch)
- {
- ++cDirParts;
- }
- }
-
- return cDirParts;
-}
-
-RECLS_LINKAGE_C size_t count_char_instances_w(recls_char_w_t const *begin, recls_char_w_t const *end, recls_char_w_t const ch)
-{
- size_t cDirParts = 0;
-
- for(; begin != end; ++begin)
- {
- if(*begin == ch)
- {
- ++cDirParts;
- }
- }
-
- return cDirParts;
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_util.h b/etc/c/recls/recls_util.h
deleted file mode 100644
index 86bddbb48..000000000
--- a/etc/c/recls/recls_util.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_util.h
- *
- * Purpose: Utility functions for the recls API.
- *
- * Created: 17th August 2003
- * Updated: 21st November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 RECLS_INCL_H_RECLS_UTIL
-#define RECLS_INCL_H_RECLS_UTIL
-
-/* File version */
-#ifndef RECLS_DOCUMENTATION_SKIP_SECTION
-# define RECLS_VER_H_RECLS_UTIL_MAJOR 1
-# define RECLS_VER_H_RECLS_UTIL_MINOR 4
-# define RECLS_VER_H_RECLS_UTIL_REVISION 1
-# define RECLS_VER_H_RECLS_UTIL_EDIT 9
-#endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
-
-/** \file recls_util.h Utility functions for the \ref group_recls API */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include "recls.h"
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Functions
- */
-
-RECLS_LINKAGE_C recls_bool_t is_dots(recls_char_t const *f);
-RECLS_LINKAGE_C recls_bool_t file_exists(recls_char_t const *f);
-RECLS_LINKAGE_C size_t align_up_size(size_t i);
-RECLS_LINKAGE_C size_t count_char_instances_a(recls_char_a_t const *begin, recls_char_a_t const *end, recls_char_a_t const ch);
-RECLS_LINKAGE_C size_t count_char_instances_w(recls_char_w_t const *begin, recls_char_w_t const *end, recls_char_w_t const ch);
-RECLS_LINKAGE_C size_t count_dir_parts_a(recls_char_a_t const *begin, recls_char_a_t const *end);
-RECLS_LINKAGE_C size_t count_dir_parts_w(recls_char_w_t const *begin, recls_char_w_t const *end);
-
-#ifdef __cplusplus
-inline size_t count_dir_parts(recls_char_a_t const *begin, recls_char_a_t const *end)
-{
- return count_dir_parts_a(begin, end);
-}
-
-inline size_t count_dir_parts(recls_char_w_t const *begin, recls_char_w_t const *end)
-{
- return count_dir_parts_w(begin, end);
-}
-#endif /* __cplusplus */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !RECLS_INCL_H_RECLS_UTIL */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_util_unix.cpp b/etc/c/recls/recls_util_unix.cpp
deleted file mode 100644
index cbb10faeb..000000000
--- a/etc/c/recls/recls_util_unix.cpp
+++ /dev/null
@@ -1,116 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_util_win32.cpp
- *
- * Purpose: Win32 utility functions for the recls API.
- *
- * Created: 17th August 2003
- * Updated: 27th November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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.
- *
- * ////////////////////////////////////////////////////////////////////////// */
-
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include "recls.h"
-#include "recls_internal.h"
-#include "recls_assert.h"
-#include "recls_util.h"
-
-#include
-
-#include
-
-#include
-#include
-
-#include
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-unixstl_ns_using(filesystem_traits)
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-RECLS_LINKAGE_C recls_bool_t file_exists(recls_char_t const *f)
-{
- struct stat st;
-
- return 0 == stat(f, &st) || errno != ENOENT;
-}
-
-RECLS_LINKAGE_C size_t count_dir_parts_a(recls_char_a_t const *begin, recls_char_a_t const *end)
-{
- return count_char_instances_a(begin, end, unixstl_ns_qual(filesystem_traits)::path_name_separator());
-}
-
-#if 0
-RECLS_LINKAGE_C size_t count_dir_parts_w(recls_char_w_t const *begin, recls_char_w_t const *end)
-{
- return count_char_instances_w(begin, end, unixstl_ns_qual(filesystem_traits)::path_name_separator());
-}
-#endif /* 0 */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_util_win32.cpp b/etc/c/recls/recls_util_win32.cpp
deleted file mode 100644
index 14ad883b2..000000000
--- a/etc/c/recls/recls_util_win32.cpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_util_win32.cpp
- *
- * Purpose: Win32 utility functions for the recls API.
- *
- * Created: 17th August 2003
- * Updated: 27th November 2003
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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.
- *
- * ////////////////////////////////////////////////////////////////////////// */
-
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include "recls.h"
-#include "recls_internal.h"
-#include "recls_assert.h"
-#include "recls_util.h"
-
-#include
-
-#include
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-RECLS_LINKAGE_C recls_bool_t file_exists(recls_char_t const *f)
-{
- return 0xFFFFFFFF != ::GetFileAttributes(f);
-}
-
-RECLS_LINKAGE_C size_t count_dir_parts_a(recls_char_a_t const *begin, recls_char_a_t const *end)
-{
- return count_char_instances_a(begin, end, winstl_ns_qual(filesystem_traits)::path_name_separator());
-}
-
-RECLS_LINKAGE_C size_t count_dir_parts_w(recls_char_w_t const *begin, recls_char_w_t const *end)
-{
- return count_char_instances_w(begin, end, winstl_ns_qual(filesystem_traits)::path_name_separator());
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/recls_win32.h b/etc/c/recls/recls_win32.h
deleted file mode 100644
index 10d046560..000000000
--- a/etc/c/recls/recls_win32.h
+++ /dev/null
@@ -1,124 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: recls_win32.h
- *
- * Purpose: Win32-specific header file for the recls API.
- *
- * Created: 18th August 2003
- * Updated: 21st November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/software
- * http://www.recls.org/
- *
- * email: submissions@recls.org for submissions
- * admin@recls.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 RECLS_INCL_H_RECLS_WIN32
-#define RECLS_INCL_H_RECLS_WIN32
-
-/* File version */
-#ifndef RECLS_DOCUMENTATION_SKIP_SECTION
-# define RECLS_VER_H_RECLS_WIN32_MAJOR 1
-# define RECLS_VER_H_RECLS_WIN32_MINOR 1
-# define RECLS_VER_H_RECLS_WIN32_REVISION 2
-# define RECLS_VER_H_RECLS_WIN32_EDIT 6
-#endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
-
-/** \file recls_win32.h Win32-specific parts of the \ref group_recls API */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Strictness
- */
-
-#ifndef RECLS_NO_STRICT
-# define RECLS_STRICT
-#endif /* !RECLS_NO_STRICT */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include "recls.h"
-
-#ifndef RECLS_PLATFORM_IS_WIN32
-# error recls_win32.h is to be included in Win32 compilations only
-#endif /* RECLS_PLATFORM_IS_WIN32 */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-namespace recls
-{
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Functions
- */
-
-/** Gets the drive associated with the given file entry info structure
- *
- * \param hEntry The info entry structure.
- * \param pchDrive Pointer to a character to receive the drive character. Cannot be NULL. The character will be in uppercase.
- */
-RECLS_FNDECL(void) Recls_GetDriveProperty( recls_info_t hEntry
- , recls_char_t *pchDrive);
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#if !defined(RECLS_NO_NAMESPACE)
-} /* namespace recls */
-#endif /* !RECLS_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !RECLS_INCL_H_RECLS_WIN32 */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/recls/win32.mak b/etc/c/recls/win32.mak
deleted file mode 100644
index 6b048c87c..000000000
--- a/etc/c/recls/win32.mak
+++ /dev/null
@@ -1,69 +0,0 @@
-# ##############################################################################
-# File: makefile.win32
-#
-# Purpose: Digital Mars C/C++ 8.38+ makefile for the recls library (std.recls)
-#
-# Created: 24th November 2003
-# Updated: 24th November 2003
-#
-# Copyright: Synesis Software Pty Ltd, (c) 2003. All rights reserved.
-#
-# Home: www.synesis.com.au/software
-#
-# ##############################################################################
-
-# ##############################################################################
-# Macros
-
-CC = dmc
-
-RECLS_LIBDIR = .
-
-STLSOFT_RECLS_PATCH_INCLUDE = $(RECLS_INCLUDE)
-
-STLSOFT_INCLUDE = ..\stlsoft
-
-CCFLAGS = -wx -o
-CCDEFS = -DNDEBUG
-
-CCARGS = $(CCFLAGS) $(CCDEFS) -c -I. -I$(STLSOFT_INCLUDE) -Ic:\dm\stlport\stlport
-
-################################################################################
-# Objects
-
-OBJS_C = \
- .\recls_api.obj \
- .\recls_fileinfo.obj \
- .\recls_internal.obj \
- .\recls_util.obj \
- .\recls_api_win32.obj \
- .\recls_fileinfo_win32.obj \
- .\recls_util_win32.obj
-
-
-################################################################################
-# Suffix rules
-
-.c.obj:
- $(CC) $(CCARGS) -o$@ $?
-
-.cpp.obj:
- $(CC) $(CCARGS) -o$@ $?
-
-################################################################################
-# Targets
-
-target: $(RECLS_LIBDIR)\recls.lib
-
-clean:
- @echo Cleaning other file types
- @if exist $(RECLS_LIBDIR)\recls.lib del $(RECLS_LIBDIR)\recls.lib
- @del $(OBJS_C) 2>NUL
- @if exist *.map del *.map
-
-# executables
-
-$(RECLS_LIBDIR)\recls.lib: $(OBJS_C)
- lib -c $@ $(OBJS_C)
-
-################################################################################
diff --git a/etc/c/stlsoft/stlsoft.h b/etc/c/stlsoft/stlsoft.h
deleted file mode 100644
index aa4a5ddcb..000000000
--- a/etc/c/stlsoft/stlsoft.h
+++ /dev/null
@@ -1,1994 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: stlsoft.h
- *
- * Purpose: Root header for the STLSoft libraries. Performs various compiler
- * and platform discriminations, and definitions of types.
- *
- * Created: 15th January 2002
- * Updated: 24th November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/stlsoft
- * http://www.stlsoft.org/
- *
- * email: submissions@stlsoft.org for submissions
- * admin@stlsoft.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _STLSOFT_INCL_H_STLSOFT
-#define _STLSOFT_INCL_H_STLSOFT
-
-/* File version */
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-# define _STLSOFT_VER_H_STLSOFT_MAJOR 1
-# define _STLSOFT_VER_H_STLSOFT_MINOR 48
-# define _STLSOFT_VER_H_STLSOFT_REVISION 2
-# define _STLSOFT_VER_H_STLSOFT_EDIT 166
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/** \file stlsoft.h The root header for the \ref STLSoft project, and for all other \ref projects "projects" */
-
-/** \weakgroup projects STLSoft Projects
- *
- * \brief The Projects that comprise the STLSoft libraries
- *
- * The STLSoft libraries are split up into sub-projects, where each sub-project only
- * depends on the STLSoft main project, which resides in the stlsoft
- * namespace.
- */
-
-/** \defgroup STLSoft STLSoft
- * \ingroup projects
- *
- * \brief
... Robust, Lightweight, Cross-platform, Template Software ...
- *
- * The philosophy of STLSoft is very simple: providing robust and lightweight software to the development community. The main STLSoft project, STLSoft itself (located at the site you are viewing now) provides cross-platform, technology/API-neutral classes and functions that stand on their own and are useful as independent libraries. They also support the other sub-projects (COMSTL, UNIXSTL, WinSTL, etc.) which are targeted at specific operating systems, technologies and APIs.
-
- * The philosophy of COMSTL is essentially
- * the same as that of the STLSoft
- * organisation: providing robust and lightweight software to the Component
- * Object Model (COM) development community.
- * COMSTL provides template-based software
- * that builds on that provided by COM and
- * STLSoft in order to reduce programmer
- * effort and increase robustness in the use of the COM.
- *
- * Namespaces
- *
- * The COMSTL namespace comstl
- * is actually an alias for the namespace stlsoft::comstl_project
,
- * and as such all the COMSTL project components actually reside within the
- * stlsoft
namespace
- *
- * Dependencies
- *
- * As with all parts of the STLSoft libraries, there are no
- * dependencies on COMSTL binary components
- * and no need to compile COMSTL implementation
- * files; COMSTL is 100% header-only!
- *
- * As with most of the STLSoft sub-projects,
- * COMSTL depends only on
- *
- * - Selected headers from the C standard library, such as wchar.h
- * - Selected headers from the C++ standard library, such as new
, functional
- * - Selected header files of the STLSoft main project
- * - The header files particular to the technology area, in this case the COM library headers, such as objbase.h
- * - The binary (static and dynamic libraries) components particular to the technology area, in this case the COM libraries that ship with the operating system and your compiler(s)
- *
- * In addition, some parts of the libraries exhibit different behaviour when
- * translated in different contexts, such as with _WIN32_DCOM
- * defined, or with iaccess.h
include. In all
- * cases the libraries function correctly in whatever context they are compiled.
- */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * STLSoft version
- *
- * The libraries version information is comprised of major, minor and revision
- * components.
- *
- * The major version is denoted by the _STLSOFT_VER_MAJOR preprocessor symbol.
- * A changes to the major version component implies that a dramatic change has
- * occured in the libraries, such that considerable changes to source dependent
- * on previous versions would need to be effected.
- *
- * The minor version is denoted by the _STLSOFT_VER_MINOR preprocessor symbol.
- * Changes to the minor version component imply that a significant change has
- * occured to the libraries, either in the addition of new functionality or in
- * the destructive change to one or more components such that recomplilation and
- * code change may be necessitated.
- *
- * The revision version is denoted by the _STLSOFT_VER_REVISIO preprocessor
- * symbol. Changes to the revision version component imply that a bug has been
- * fixed. Dependent code should be recompiled in order to pick up the changes.
- *
- * In addition to the individual version symbols - _STLSOFT_VER_MAJOR,
- * _STLSOFT_VER_MINOR and _STLSOFT_VER_REVISION - a composite symbol _STLSOFT_VER
- * is defined, where the upper 8 bits are 0, bits 16-23 represent the major
- * component, bits 8-15 represent the minor component, and bits 0-7 represent
- * the revision component.
- *
- * Each release of the libraries will bear a different version, and that version
- * will also have its own symbol: Version 1.0.1 specifies _STLSOFT_VER_1_0_1.
- *
- * Thus the symbol _STLSOFT_VER may be compared meaningfully with a specific
- * version symbol, e.g.# if _STLSOFT_VER >= _STLSOFT_VER_1_0_1
- */
-
-/// \def _STLSOFT_VER_MAJOR
-/// The major version number of STLSoft
-
-/// \def _STLSOFT_VER_MINOR
-/// The minor version number of STLSoft
-
-/// \def _STLSOFT_VER_REVISION
-/// The revision version number of STLSoft
-
-/// \def _STLSOFT_VER
-/// The current composite version number of STLSoft
-
-#define _STLSOFT_VER_MAJOR 1
-#define _STLSOFT_VER_MINOR 6
-#define _STLSOFT_VER_REVISION 6
-#define _STLSOFT_VER_1_0_1 0x00010001 /*!< Version 1.0.1 */
-#define _STLSOFT_VER_1_0_2 0x00010002 /*!< Version 1.0.2 */
-#define _STLSOFT_VER_1_1_1 0x00010101 /*!< Version 1.1.1 */
-#define _STLSOFT_VER_1_1_2 0x00010102 /*!< Version 1.1.2 */
-#define _STLSOFT_VER_1_1_3 0x00010103 /*!< Version 1.1.3 */
-#define _STLSOFT_VER_1_2_1 0x00010201 /*!< Version 1.2.1 */
-#define _STLSOFT_VER_1_3_1 0x00010301 /*!< Version 1.3.1 */
-#define _STLSOFT_VER_1_3_2 0x00010302 /*!< Version 1.3.2 */
-#define _STLSOFT_VER_1_4_1 0x00010401 /*!< Version 1.4.1 */
-#define _STLSOFT_VER_1_4_2 0x00010402 /*!< Version 1.4.2 */
-#define _STLSOFT_VER_1_4_3 0x00010403 /*!< Version 1.4.3 */
-#define _STLSOFT_VER_1_4_4 0x00010404 /*!< Version 1.4.4 */
-#define _STLSOFT_VER_1_4_5 0x00010405 /*!< Version 1.4.5 */
-#define _STLSOFT_VER_1_4_6 0x00010406 /*!< Version 1.4.6 */
-#define _STLSOFT_VER_1_5_1 0x00010501 /*!< Version 1.5.1 */
-#define _STLSOFT_VER_1_5_2 0x00010502 /*!< Version 1.5.2 */
-#define _STLSOFT_VER_1_6_1 0x00010601 /*!< Version 1.6.1 */
-#define _STLSOFT_VER_1_6_2 0x00010602 /*!< Version 1.6.2 */
-#define _STLSOFT_VER_1_6_3 0x00010603 /*!< Version 1.6.3 */
-#define _STLSOFT_VER_1_6_4 0x00010604 /*!< Version 1.6.4 */
-#define _STLSOFT_VER_1_6_5 0x00010605 /*!< Version 1.6.5 */
-#define _STLSOFT_VER_1_6_6 0x00010606 /*!< Version 1.6.6 */
-
-#define _STLSOFT_VER _STLSOFT_VER_1_6_6
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Basic macros
- */
-
-/* Compilation messages
- *
- * To see certain informational messages during compilation define the
- * preprocessor symbol _STLSOFT_COMPILE_VERBOSE
- */
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-# define STLSOFT_STRINGIZE_(x) #x
-# define STLSOFT_STRINGIZE(x) STLSOFT_STRINGIZE_(x)
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* Simple macro indirection
- */
-
-#define STLSOFT_MACRO_INDIRECT(x) x
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Sanity checks - 1
- *
- * C++ - must be C++ compilation unit
- */
-
-/* Must be C++. */
-#ifndef __cplusplus
-# error The STLSoft libraries are only compatible with C++ compilation units
-#endif /* __cplusplus */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Compiler compatibility
- *
- * Currently the only compilers supported by the STLSoft libraries are
- *
- * Borland C++ 5.5, 5.51 & 5.6
- * Comeau 4.3.1
- * Digital Mars C/C++ 8.26 and above
- * GCC 2.95, 2.96 & 3.2
- * Intel C/C++ 6.0 & 7.0
- * Metrowerks 2.4 & 3.0 (CodeWarrior 7.0 & 8.0)
- * Visual C++ 4.2, 5.0, 6.0 & .NET
- * Watcom C/C++ 11.0
- *
- * The following compilers are intended to be supported in a future release:
- *
- * Comeau C++
- */
-
-#ifdef __STLSOFT_COMPILER_IS_UNKNOWN
-# undef __STLSOFT_COMPILER_IS_UNKNOWN
-#endif /* __STLSOFT_COMPILER_IS_UNKNOWN */
-
-#ifdef __STLSOFT_COMPILER_IS_BORLAND
-# undef __STLSOFT_COMPILER_IS_BORLAND
-#endif /* __STLSOFT_COMPILER_IS_BORLAND */
-
-#ifdef __STLSOFT_COMPILER_IS_COMO
-# undef __STLSOFT_COMPILER_IS_COMO
-#endif /* __STLSOFT_COMPILER_IS_COMO */
-
-#ifdef __STLSOFT_COMPILER_IS_DMC
-# undef __STLSOFT_COMPILER_IS_DMC
-#endif /* __STLSOFT_COMPILER_IS_DMC */
-
-#ifdef __STLSOFT_COMPILER_IS_GCC
-# undef __STLSOFT_COMPILER_IS_GCC
-#endif /* __STLSOFT_COMPILER_IS_GCC */
-
-#ifdef __STLSOFT_COMPILER_IS_INTEL
-# undef __STLSOFT_COMPILER_IS_INTEL
-#endif /* __STLSOFT_COMPILER_IS_INTEL */
-
-#ifdef __STLSOFT_COMPILER_IS_MSVC
-# undef __STLSOFT_COMPILER_IS_MSVC
-#endif /* __STLSOFT_COMPILER_IS_MSVC */
-
-#ifdef __STLSOFT_COMPILER_IS_MWERKS
-# undef __STLSOFT_COMPILER_IS_MWERKS
-#endif /* __STLSOFT_COMPILER_IS_MWERKS */
-
-#ifdef __STLSOFT_COMPILER_IS_VECTORC
-# undef __STLSOFT_COMPILER_IS_VECTORC
-#endif /* __STLSOFT_COMPILER_IS_VECTORC */
-
-#ifdef __STLSOFT_COMPILER_IS_WATCOM
-# undef __STLSOFT_COMPILER_IS_WATCOM
-#endif /* __STLSOFT_COMPILER_IS_WATCOM */
-
-/* First we do a check to see whether other compilers are providing
- * compatibility with Visual C++, and handle that.
- */
-
-#ifdef _MSC_VER
-# if defined(__BORLANDC__) || /* Borland C/C++ */ \
- defined(__COMO__) || /* Comeau C/C++ */ \
- defined(__DMC__) || /* Digital Mars C/C++ */ \
- defined(__GNUC__) || /* GNU C/C++ */ \
- defined(__INTEL_COMPILER) || /* Intel C/C++ */ \
- defined(__MWERKS__) || /* Metrowerks C/C++ */ \
- defined(__WATCOMC__) /* Watcom C/C++ */
- /* Handle Microsoft Visual C++ support. */
-# if defined(_STLSOFT_NO_MSC_VER_SUPPORT) || \
- ( defined(_STLSOFT_STRICT) && \
- !defined(_STLSOFT_MSC_VER_SUPPORT))
-# undef _MSC_VER
-# endif /* _STLSOFT_NO_MSC_VER_SUPPORT || (_STLSOFT_STRICT && _STLSOFT_MSC_VER_SUPPORT) */
-# endif /* compiler */
-#endif /* _MSC_VER */
-
-#if defined(_STLSOFT_FORCE_CUSTOM_COMPILER)
-# define __STLSOFT_COMPILER_LABEL_STRING "Custom (forced) compiler"
-# define __STLSOFT_COMPILER_VERSION_STRING "Custom (forced) compiler"
-# define __STLSOFT_COMPILER_IS_CUSTOM
-# ifndef __STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME
-# error When using the custom compiler option you must define the symbol __STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME, e.g. #define __STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME
-# endif /* !__STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME */
-
-#elif defined(__COMO__) /* Do Comeau next, so that no Comeau back-end server compilers are preferentially discriminated */
-/* Comeau C++ */
-# define __STLSOFT_COMPILER_IS_COMO
-# define __STLSOFT_COMPILER_LABEL_STRING "Comeau C++"
-# if __COMO_VERSION__ < 4300
-# error Only versions 4.3.0.1 and later of Comeau C++ compiler is supported by the STLSoft libraries
-# elif (__COMO_VERSION__ == 4300)
-# define __STLSOFT_COMPILER_VERSION_STRING "Comeau C++ 4.3.0.1"
-# else
-# define __STLSOFT_COMPILER_VERSION_STRING "Unknown version of Comeau C++"
-# endif /* __COMO_VERSION__ */
-
-#elif defined(__BORLANDC__)
-/* Borland C++ */
-# define __STLSOFT_COMPILER_IS_BORLAND
-# define __STLSOFT_COMPILER_LABEL_STRING "Borland C/C++"
-# if 0 /* (__BORLANDC__ == 0x0460) */
-# define __STLSOFT_COMPILER_VERSION_STRING "Borland C++ 4.52"
-# elif (__BORLANDC__ == 0x0550)
-# define __STLSOFT_COMPILER_VERSION_STRING "Borland C++ 5.5"
-# elif (__BORLANDC__ == 0x0551)
-# define __STLSOFT_COMPILER_VERSION_STRING "Borland C++ 5.51"
-# elif (__BORLANDC__ == 0x0560)
-# define __STLSOFT_COMPILER_VERSION_STRING "Borland C++ 5.6"
-# elif (__BORLANDC__ == 0x0564)
-# define __STLSOFT_COMPILER_VERSION_STRING "Borland C++ 5.64 (C++ BuilderX)"
-# else
- /*# error Currently only versions 4.52, 5.5, 5.51 and 5.6 of the Borland C++ compiler are supported by the STLSoft libraries */
-# error Currently only versions 5.5, 5.51 and 5.6 of the Borland C++ compiler are supported by the STLSoft libraries
-# endif /* __BORLANDC__ */
-
-#elif defined(__DMC__)
-/* Digital Mars C/C++ */
-# define __STLSOFT_COMPILER_IS_DMC
-# define __STLSOFT_COMPILER_LABEL_STRING "Digital Mars C/C++"
-# if (__DMC__ < 0x0826)
-# error Only versions 8.26 and later of the Digital Mars C/C++ compilers are supported by the STLSoft libraries
-# else
-# if __DMC__ >= 0x0832
-# define __STLSOFT_COMPILER_VERSION_STRING __DMC_VERSION_STRING__
-# elif (__DMC__ == 0x0826)
-# define __STLSOFT_COMPILER_VERSION_STRING "Digital Mars C/C++ 8.26"
-# elif (__DMC__ == 0x0827)
-# define __STLSOFT_COMPILER_VERSION_STRING "Digital Mars C/C++ 8.27"
-# elif (__DMC__ == 0x0828)
-# define __STLSOFT_COMPILER_VERSION_STRING "Digital Mars C/C++ 8.28"
-# elif (__DMC__ == 0x0829)
-# define __STLSOFT_COMPILER_VERSION_STRING "Digital Mars C/C++ 8.29"
-# elif (__DMC__ == 0x0830)
-# define __STLSOFT_COMPILER_VERSION_STRING "Digital Mars C/C++ 8.30"
-# elif (__DMC__ == 0x0831)
-# define __STLSOFT_COMPILER_VERSION_STRING "Digital Mars C/C++ 8.31"
-# endif /* __DMC__ */
-# endif /* version */
-
-#elif defined(__GNUC__)
-/* GNU C/C++ */
-# define __STLSOFT_COMPILER_IS_GCC
-# define __STLSOFT_COMPILER_LABEL_STRING "GNU C/C++"
-# if __GNUC__ != 2 && \
- __GNUC__ != 3 && \
- __GNUC__ != 4
-# error GNU C/C++ compilers whose major version is not 2 or 3 are not currently supported by the STLSoft libraries
-# elif __GNUC__ == 2
-# if __GNUC_MINOR__ < 95
-# error Currently only version 2.95 and above of the GNU C/C++ compiler is supported by the STLSoft libraries
-# elif __GNUC_MINOR__ == 95
-# define __STLSOFT_COMPILER_VERSION_STRING "GNU C/C++ 2.95"
-# elif __GNUC_MINOR__ == 96
-# define __STLSOFT_COMPILER_VERSION_STRING "GNU C/C++ 2.96"
-# else
-# define __STLSOFT_COMPILER_VERSION_STRING "GNU C/C++ >2.96 - you should be aware that this version may not be supported correctly"
-# endif /* __GNUC__ != 2 */
-# elif __GNUC__ == 3
-# if __GNUC_MINOR__ == 2
-# define __STLSOFT_COMPILER_VERSION_STRING "GNU C/C++ 3.2"
-# else
-# define __STLSOFT_COMPILER_VERSION_STRING "GNU C/C++ >3.2 - you should be aware that this version may not be supported correctly"
-# endif /* __GNUC__ != 2 */
-# elif __GNUC__ == 4
-# define __STLSOFT_COMPILER_VERSION_STRING "GNU C/C++ >= 4.0 - you should be aware that this version may not be supported correctly"
-# endif /* __GNUC__ */
-
-#elif defined(__INTEL_COMPILER)
-/* Intel C++ */
-# define __STLSOFT_COMPILER_IS_INTEL
-# define __STLSOFT_COMPILER_LABEL_STRING "Intel C/C++"
-# if (__INTEL_COMPILER == 600)
-# define __STLSOFT_COMPILER_VERSION_STRING "Intel C/C++ 6.0"
-# elif (__INTEL_COMPILER == 700)
-# define __STLSOFT_COMPILER_VERSION_STRING "Intel C/C++ 7.0"
-# else
-# error Only Intel C++ Compiler versions 6.0 and 7.0 currently supported by the STLSoft libraries
-# endif /* __INTEL_COMPILER */
-
-#elif defined(__MWERKS__)
-/* Metrowerks C++ */
-# define __STLSOFT_COMPILER_IS_MWERKS
-# define __STLSOFT_COMPILER_LABEL_STRING "Metrowerks CodeWarrior C/C++"
-# if ((__MWERKS__ & 0xFF00) == 0x2400)
-# define __STLSOFT_COMPILER_VERSION_STRING "Metrowerks CodeWarrior C++ 2.4"
-# elif ((__MWERKS__ & 0xFF00) == 0x3000)
-# define __STLSOFT_COMPILER_VERSION_STRING "Metrowerks CodeWarrior C++ 3.0"
-# else
-# error Only Metrowerks C++ Compiler 2.4 (CodeWarrior 7) and 3.0 (CodeWarrior 8) currently supported by the STLSoft libraries
-# endif /* __MWERKS__ */
-
-#elif defined(__VECTORC)
-/* CodePlay Vector C/C++ */
-# define __STLSOFT_COMPILER_IS_VECTORC
-# define __STLSOFT_COMPILER_LABEL_STRING "CodePlay VectorC C/C++"
-# if (__VECTORC == 1)
-# define __STLSOFT_COMPILER_VERSION_STRING "CodePlay VectorC C/C++"
-# else
-# error Currently only versions of the CodePlay Vector C/C++ compiler defining __VECTORC == 1 are supported by the STLSoft libraries
-# endif /* __VECTORC */
-
-#elif defined(__WATCOMC__)
-/* Watcom C/C++ */
-# define __STLSOFT_COMPILER_IS_WATCOM
-# define __STLSOFT_COMPILER_LABEL_STRING "Watcom C/C++"
-
-# if (__WATCOMC__ == 1100)
-# define __STLSOFT_COMPILER_VERSION_STRING "Watcom C/C++ 11.0"
-# elif (__WATCOMC__ == 1200)
-# define __STLSOFT_COMPILER_VERSION_STRING "Open Watcom C/C++ 1.0 (Watcom 12.0)"
-# else
-# error Currently only versions 11.0 and 12.0 of the Watcom C/C++ compiler is supported by the STLSoft libraries
-# endif /* __WATCOMC__ */
-
-#elif defined(_MSC_VER)
-/* Visual C++ */
-# define __STLSOFT_COMPILER_IS_MSVC
-# define __STLSOFT_COMPILER_LABEL_STRING "Visual C++"
-
-# if (_MSC_VER == 1020)
-# define __STLSOFT_COMPILER_VERSION_STRING "Visual C++ 4.2"
-# elif (_MSC_VER == 1100)
-# define __STLSOFT_COMPILER_VERSION_STRING "Visual C++ 5.0"
-# elif (_MSC_VER == 1200)
-# define __STLSOFT_COMPILER_VERSION_STRING "Visual C++ 6.0"
-# elif (_MSC_VER == 1300)
-# define __STLSOFT_COMPILER_VERSION_STRING "Visual C++ .NET (7.0)"
-# elif (_MSC_VER == 1310)
-# define __STLSOFT_COMPILER_VERSION_STRING "Visual C++ .NET (7.1)"
-# else
-# error Currently only versions 4.2, 5.0, 6.0, 7.0 & 7.1 of the Visual C++ compiler are supported by the STLSoft libraries
-# endif /* _MSC_VER */
-
-#else
-/* No recognised compiler */
-# if defined(_STLSOFT_FORCE_UNKNOWN_COMPILER) || \
- defined(_STLSOFT_FORCE_ANY_COMPILER)
-# define __STLSOFT_COMPILER_LABEL_STRING "Unknown (forced) compiler"
-# define __STLSOFT_COMPILER_VERSION_STRING "Unknown (forced) compiler"
-# define __STLSOFT_COMPILER_IS_UNKNOWN
-# else
-# error Compiler is not recognised.
-# error Currently only Borland C++, Comeau C++, Digital Mars C/C++, GNU C/C++,
-# error Intel C/C++, Metrowerks CodeWarrior, Visual C++ and Watcom C/C++
-# error compilers are supported by the STLSoft libraries
-# error If you want to use the libraries with your compiler, you may specify the
-# error _STLSOFT_FORCE_CUSTOM_COMPILER or _STLSOFT_FORCE_ANY_COMPILER pre-processor
-# error symbols.
-# error _STLSOFT_FORCE_ANY_COMPILER assumes that your compiler can support all
-# error modern C++ compiler features, and causes the inclusion of the compiler
-# error features file stlsoft_cccap_unknown.h, which is provided by STLSoft.
-# error _STLSOFT_FORCE_CUSTOM_COMPILER requires that you specify the name of the
-# error compiler features file in __STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME.
-# error The idea is to use _STLSOFT_FORCE_ANY_COMPILER, to determine what language
-# error features your compiler can support, and then copy, edit and use that file
-# error via _STLSOFT_FORCE_CUSTOM_COMPILER and __STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME.
-# endif /* _STLSOFT_FORCE_ANY_COMPILER */
-
-#endif /* compiler tag */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Compiler language feature support
- *
- * Various compilers support the language differently (or not at all), so these
- * features are discriminated here and utilised by various means within the code
- * in order to minimise the use of the preprocessor conditionals in the other
- * libraries' source code.
- */
-
-/* Template support.
- *
- * Discriminated symbol is __STLSOFT_CF_TEMPLATE_SUPPORT
- */
-
-#ifdef __STLSOFT_CF_TEMPLATE_SUPPORT
-# undef __STLSOFT_CF_TEMPLATE_SUPPORT
-#endif /* __STLSOFT_CF_TEMPLATE_SUPPORT */
-
-/* Exception signature support.
- *
- * Discriminated symbol is __STLSOFT_CF_EXCEPTION_SIGNATURE_SUPPORT
- */
-#ifdef __STLSOFT_CF_EXCEPTION_SIGNATURE_SUPPORT
-# undef __STLSOFT_CF_EXCEPTION_SIGNATURE_SUPPORT
-#endif /* __STLSOFT_CF_EXCEPTION_SIGNATURE_SUPPORT */
-
-/* Native bool support.
- *
- * Discriminated symbol is __STLSOFT_CF_NATIVE_BOOL_SUPPORT
- */
-#ifdef __STLSOFT_CF_NATIVE_BOOL_SUPPORT
-# undef __STLSOFT_CF_NATIVE_BOOL_SUPPORT
-#endif /* __STLSOFT_CF_NATIVE_BOOL_SUPPORT */
-
-/* Native / typedef'd wchar_t support.
- *
- * Discriminated symbols are __STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT
- * __STLSOFT_CF_TYPEDEF_WCHAR_T_SUPPORT
- *
- * Implementation symbol is __STLSOFT_NATIVE_WCHAR_T
- */
-#ifdef __STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT
-# undef __STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT
-#endif /* __STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT */
-
-#ifdef __STLSOFT_CF_TYPEDEF_WCHAR_T_SUPPORT
-# undef __STLSOFT_CF_TYPEDEF_WCHAR_T_SUPPORT
-#endif /* __STLSOFT_CF_TYPEDEF_WCHAR_T_SUPPORT */
-
-#ifdef __STLSOFT_NATIVE_WCHAR_T
-# undef __STLSOFT_NATIVE_WCHAR_T
-#endif /* __STLSOFT_NATIVE_WCHAR_T */
-
-/* 8-bit, 16-bit, 32-bit type support
- *
- * Discriminated symbol is __STLSOFT_CF_NATIVE_8BIT_INT_SUPPORT,
- * __STLSOFT_CF_NATIVE_16BIT_INT_SUPPORT,
- * __STLSOFT_CF_NATIVE_32BIT_INT_SUPPORT
- *
- * Implementation symbol are __STLSOFT_NATIVE_INT8_T,
- * __STLSOFT_NATIVE_SINT8_T,
- * __STLSOFT_NATIVE_UINT8_T,
- * __STLSOFT_NATIVE_INT16_T,
- * __STLSOFT_NATIVE_SINT16_T,
- * __STLSOFT_NATIVE_UINT16_T,
- * __STLSOFT_NATIVE_INT32_T,
- * __STLSOFT_NATIVE_SINT32_T,
- * __STLSOFT_NATIVE_UINT32_T
- */
-
-#ifdef __STLSOFT_CF_NATIVE_8BIT_INT_SUPPORT
-# undef __STLSOFT_CF_NATIVE_8BIT_INT_SUPPORT
-#endif /* __STLSOFT_CF_NATIVE_8BIT_INT_SUPPORT */
-
-#ifdef __STLSOFT_CF_NATIVE_16BIT_INT_SUPPORT
-# undef __STLSOFT_CF_NATIVE_16BIT_INT_SUPPORT
-#endif /* __STLSOFT_CF_NATIVE_16BIT_INT_SUPPORT */
-
-#ifdef __STLSOFT_CF_NATIVE_32BIT_INT_SUPPORT
-# undef __STLSOFT_CF_NATIVE_32BIT_INT_SUPPORT
-#endif /* __STLSOFT_CF_NATIVE_32BIT_INT_SUPPORT */
-
-#ifdef __STLSOFT_NATIVE_INT8_T
-# undef __STLSOFT_NATIVE_INT8_T
-#endif /* __STLSOFT_NATIVE_INT8_T */
-#ifdef __STLSOFT_NATIVE_SINT8_T
-# undef __STLSOFT_NATIVE_SINT8_T
-#endif /* __STLSOFT_NATIVE_SINT8_T */
-#ifdef __STLSOFT_NATIVE_UINT8_T
-# undef __STLSOFT_NATIVE_UINT8_T
-#endif /* __STLSOFT_NATIVE_UINT8_T */
-
-#ifdef __STLSOFT_NATIVE_INT16_T
-# undef __STLSOFT_NATIVE_INT16_T
-#endif /* __STLSOFT_NATIVE_INT16_T */
-#ifdef __STLSOFT_NATIVE_SINT16_T
-# undef __STLSOFT_NATIVE_SINT16_T
-#endif /* __STLSOFT_NATIVE_SINT16_T */
-#ifdef __STLSOFT_NATIVE_UINT16_T
-# undef __STLSOFT_NATIVE_UINT16_T
-#endif /* __STLSOFT_NATIVE_UINT16_T */
-
-#ifdef __STLSOFT_NATIVE_INT32_T
-# undef __STLSOFT_NATIVE_INT32_T
-#endif /* __STLSOFT_NATIVE_INT32_T */
-#ifdef __STLSOFT_NATIVE_SINT32_T
-# undef __STLSOFT_NATIVE_SINT32_T
-#endif /* __STLSOFT_NATIVE_SINT32_T */
-#ifdef __STLSOFT_NATIVE_UINT32_T
-# undef __STLSOFT_NATIVE_UINT32_T
-#endif /* __STLSOFT_NATIVE_UINT32_T */
-
-/* 64-bit support.
- *
- * Discriminated symbols are __STLSOFT_CF_NATIVE___int64_SUPPORT,
- * __STLSOFT_CF_NATIVE_LONG_LONG_SUPPORT and
- * __STLSOFT_CF_NATIVE_64BIT_INTEGER_SUPPORT.
- *
- * 64-bit support is discriminated in the following two forms:
- *
- * (i) long long
- * (ii) __int64
- *
- * Form (i) support is selectively preferred. Form (ii) support
- * is only discriminated in the absence of form (i).
- */
-
-#ifdef __STLSOFT_CF_NATIVE_64BIT_INTEGER_SUPPORT
-# undef __STLSOFT_CF_NATIVE_64BIT_INTEGER_SUPPORT
-#endif /* __STLSOFT_CF_NATIVE_64BIT_INTEGER_SUPPORT */
-
-#ifdef __STLSOFT_CF_NATIVE_LONG_LONG_SUPPORT
-# undef __STLSOFT_CF_NATIVE_LONG_LONG_SUPPORT
-#endif /* __STLSOFT_CF_NATIVE_LONG_LONG_SUPPORT */
-
-#ifdef __STLSOFT_CF_NATIVE___int64_SUPPORT
-# undef __STLSOFT_CF_NATIVE___int64_SUPPORT
-#endif /* __STLSOFT_CF_NATIVE___int64_SUPPORT */
-
-#ifdef __STLSOFT_CF_INT_DISTINCT_TYPE
-# undef __STLSOFT_CF_INT_DISTINCT_TYPE
-#endif /* __STLSOFT_CF_INT_DISTINCT_TYPE */
-
-/* Compiler supports static assert.
- *
- * Discriminated symbol is __STLSOFT_CF_STATIC_ASSERT_SUPPORT
- */
-#ifdef __STLSOFT_CF_STATIC_ASSERT_SUPPORT
-# undef __STLSOFT_CF_STATIC_ASSERT_SUPPORT
-#endif /* __STLSOFT_CF_STATIC_ASSERT_SUPPORT */
-
-/* Function signature requires full-qualification.
- *
- * Discriminated symbol is __STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED
- */
-#ifdef __STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED
-# undef __STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED
-#endif /* __STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED */
-
-/* Exception support.
- *
- * Discriminated symbol is __STLSOFT_CF_EXCEPTION_SUPPORT
- */
-#ifdef __STLSOFT_CF_EXCEPTION_SUPPORT
-# undef __STLSOFT_CF_EXCEPTION_SUPPORT
-#endif /* __STLSOFT_CF_EXCEPTION_SUPPORT */
-
-/* Template class default fundamental type argument support
- *
- * Discriminated symbol is __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_FUNDAMENTAL_ARGUMENT_SUPPORT
- *
- * Microsoft Visual C++ 4.2 does not support template default fundamental type arguments.
- */
-#ifdef __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_FUNDAMENTAL_ARGUMENT_SUPPORT
-# undef __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_FUNDAMENTAL_ARGUMENT_SUPPORT
-#endif /* __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_FUNDAMENTAL_ARGUMENT_SUPPORT */
-
-/* Template class default class type argument support
- *
- * Discriminated symbol is __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT
- *
- * Microsoft Visual C++ 4.2 does not support template default class type arguments.
- */
-#ifdef __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT
-# undef __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT
-#endif /* __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT */
-
-/* Member functions can appear as template parameters
- *
- * Discriminated symbol is STLSOFT_CF_MEM_FUNC_AS_TEMPLATE_PARAM_SUPPORT
- */
-#ifdef STLSOFT_CF_MEM_FUNC_AS_TEMPLATE_PARAM_SUPPORT
-# undef STLSOFT_CF_MEM_FUNC_AS_TEMPLATE_PARAM_SUPPORT
-#endif /* STLSOFT_CF_MEM_FUNC_AS_TEMPLATE_PARAM_SUPPORT */
-
-/* Member template function support.
- *
- * Discriminated symbol is __STLSOFT_CF_MEMBER_TEMPLATE_FUNCTION_SUPPORT
- */
-#ifdef __STLSOFT_CF_MEMBER_TEMPLATE_FUNCTION_SUPPORT
-# undef __STLSOFT_CF_MEMBER_TEMPLATE_FUNCTION_SUPPORT
-#endif // __STLSOFT_CF_MEMBER_TEMPLATE_FUNCTION_SUPPORT
-
-/* Member template constructor support.
- *
- * Discriminated symbol is __STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT
- */
-#ifdef __STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT
-# undef __STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT
-#endif // __STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT
-
-/* Member template range method support.
- *
- * Discriminated symbol is __STLSOFT_CF_MEMBER_TEMPLATE_RANGE_METHOD_SUPPORT
- */
-#ifdef __STLSOFT_CF_MEMBER_TEMPLATE_RANGE_METHOD_SUPPORT
-# undef __STLSOFT_CF_MEMBER_TEMPLATE_RANGE_METHOD_SUPPORT
-#endif // __STLSOFT_CF_MEMBER_TEMPLATE_RANGE_METHOD_SUPPORT
-
-/* Member template class support.
- *
- * Discriminated symbol is __STLSOFT_CF_MEMBER_TEMPLATE_CLASS_SUPPORT
- */
-#ifdef __STLSOFT_CF_MEMBER_TEMPLATE_CLASS_SUPPORT
-# undef __STLSOFT_CF_MEMBER_TEMPLATE_CLASS_SUPPORT
-#endif // __STLSOFT_CF_MEMBER_TEMPLATE_CLASS_SUPPORT
-
-/* Template specialisation syntax support
- *
- * Discriminated symbol is __STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX
- */
-#ifdef __STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX
-# undef __STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX
-#endif /* __STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX */
-
-/* Template partial specialisation support.
- *
- * Discriminated symbol is __STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT
- */
-#ifdef __STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT
-# undef __STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT
-#endif // __STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT
-
-/* Template out-of-class function specialisation support.
- *
- * Discriminated symbol is __STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
- */
-#ifdef __STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
-# undef __STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
-#endif /* __STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT */
-
-/* Standard library STL elements in std namespace.
- *
- * Discriminated symbol is __STLSOFT_CF_std_NAMESPACE
- */
-#ifdef __STLSOFT_CF_std_NAMESPACE
-# undef __STLSOFT_CF_std_NAMESPACE
-#endif /* __STLSOFT_CF_std_NAMESPACE */
-
-/* std::char_traits available.
- *
- * Discriminated symbol is __STLSOFT_CF_std_char_traits_AVAILABLE
- */
-#ifdef __STLSOFT_CF_std_char_traits_AVAILABLE
-# undef __STLSOFT_CF_std_char_traits_AVAILABLE
-#endif /* __STLSOFT_CF_std_char_traits_AVAILABLE */
-
-/* stl-like allocator classes provide allocate() hint argument
- *
- * Discriminated symbol is __STLSOFT_CF_ALLOCATOR_ALLOCATE_HAS_HINT
- *
- * Note: this should be resolving on the library, not the compiler
- */
-#ifdef __STLSOFT_CF_ALLOCATOR_ALLOCATE_HAS_HINT
-# undef __STLSOFT_CF_ALLOCATOR_ALLOCATE_HAS_HINT
-#endif /* __STLSOFT_CF_ALLOCATOR_ALLOCATE_HAS_HINT */
-
-/* stl-like allocator classes provide deallocate() object count argument
- *
- * Discriminated symbol is __STLSOFT_CF_ALLOCATOR_DEALLOCATE_HAS_OBJECTCOUNT
- *
- * Note: this should be resolving on the library, not the compiler
- */
-#ifdef __STLSOFT_CF_ALLOCATOR_DEALLOCATE_HAS_OBJECTCOUNT
-# undef __STLSOFT_CF_ALLOCATOR_DEALLOCATE_HAS_OBJECTCOUNT
-#endif /* __STLSOFT_CF_ALLOCATOR_DEALLOCATE_HAS_OBJECTCOUNT */
-
-/* Bidirectional iterator support
- */
-#ifdef __STLSOFT_CF_BIDIRECTIONAL_ITERATOR_SUPPORT
-# undef __STLSOFT_CF_BIDIRECTIONAL_ITERATOR_SUPPORT
-#endif /* __STLSOFT_CF_BIDIRECTIONAL_ITERATOR_SUPPORT */
-
-/* explicit keyword support
- *
- * Discriminated symbol is __STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT
- */
-#ifdef __STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT
-# undef __STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT
-#endif /* __STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT */
-
-/* mutable keyword support
- *
- * Discriminated symbol is __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT
- */
-#ifdef __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT
-# undef __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT
-#endif /* __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT */
-
-/* typename keyword support
- *
- * Discriminated symbols are __STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT,
- * __STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT,
- * __STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT and
- * __STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT
- *
- * The typename keyword is actually used for two distinct purposes: the
- * generic type placeholder in template parameter specifications, and the
- * stipulation to compilers that a particular template derived construct
- * is a type, rather than a member or operation.
- *
- * These two uses have varying support on different compilers, hence the
- * STLSoft libraries utilise the ss_typename_param_k pseudo keyword for the
- * first purpose, and the ss_typename_type_k pseudo keyword for the second.
- *
- * In addition, some compilers cannot handle the use of typename as a type
- * qualifier in a template default parameter, so we further define the keyword
- * ss_typename_type_def_k. And some cannot handle it in a constructor
- * initialiser list, for which ss_typename_type_mil_k is defined.
- */
-#ifdef __STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT
-# undef __STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT
-#endif /* __STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT */
-
-#ifdef __STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT
-# undef __STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT
-#endif /* __STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT */
-
-#ifdef __STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT
-# undef __STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT
-#endif /* __STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT */
-
-#ifdef __STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT
-# undef __STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT
-#endif /* __STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT */
-
-/* Move constructor support
- *
- * Discriminated symbol is __STLSOFT_CF_MOVE_CONSTRUCTOR_SUPPORT
- */
-#ifdef __STLSOFT_CF_MOVE_CONSTRUCTOR_SUPPORT
-# undef __STLSOFT_CF_MOVE_CONSTRUCTOR_SUPPORT
-#endif /* __STLSOFT_CF_MOVE_CONSTRUCTOR_SUPPORT */
-
-/* Koening Lookup support
- *
- * Discriminated symbol is __STLSOFT_CF_KOENIG_LOOKUP_SUPPORT
- */
-#ifdef __STLSOFT_CF_KOENIG_LOOKUP_SUPPORT
-# undef __STLSOFT_CF_KOENIG_LOOKUP_SUPPORT
-#endif /* __STLSOFT_CF_KOENIG_LOOKUP_SUPPORT */
-
-/* Template template support
- *
- * Discriminated symbol is __STLSOFT_CF_TEMPLATE_TEMPLATE_SUPPORT
- */
-#ifdef __STLSOFT_CF_TEMPLATE_TEMPLATE_SUPPORT
-# undef __STLSOFT_CF_TEMPLATE_TEMPLATE_SUPPORT
-#endif /* __STLSOFT_CF_TEMPLATE_TEMPLATE_SUPPORT */
-
-
-#ifdef __STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT
-# undef __STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT
-#endif /* __STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT */
-
-#ifdef __STLSOFT_CF_VENEER_SUPPORT
-# undef __STLSOFT_CF_VENEER_SUPPORT
-#endif /* __STLSOFT_CF_VENEER_SUPPORT */
-
-#ifdef __STLSOFT_CF_TEMPLATE_SHIMS_NOT_SUPPORTED
-# undef __STLSOFT_CF_TEMPLATE_SHIMS_NOT_SUPPORTED
-#endif /* __STLSOFT_CF_TEMPLATE_SHIMS_NOT_SUPPORTED */
-
-#ifdef __STLSOFT_CF_NEGATIVE_MODULUS_POSITIVE_GIVES_NEGATIVE_RESULT
-# undef __STLSOFT_CF_NEGATIVE_MODULUS_POSITIVE_GIVES_NEGATIVE_RESULT
-#endif /* __STLSOFT_CF_NEGATIVE_MODULUS_POSITIVE_GIVES_NEGATIVE_RESULT */
-
-#ifdef STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT
-# undef STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT
-#endif /* STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT */
-
-#ifdef STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT
-# undef STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT
-#endif /* STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT */
-
-#ifdef STLSOFT_CF_FASTCALL_SUPPORTED
-# undef STLSOFT_CF_FASTCALL_SUPPORTED
-#endif /* STLSOFT_CF_FASTCALL_SUPPORTED */
-
-#ifdef STLSOFT_CF_STDCALL_SUPPORTED
-# undef STLSOFT_CF_STDCALL_SUPPORTED
-#endif /* STLSOFT_CF_STDCALL_SUPPORTED */
-
-#ifdef STSLSOFT_INLINE_ASM_SUPPORTED
-# undef STSLSOFT_INLINE_ASM_SUPPORTED
-#endif /* STSLSOFT_INLINE_ASM_SUPPORTED */
-
-#ifdef STSLSOFT_ASM_IN_INLINE_SUPPORTED
-# undef STSLSOFT_ASM_IN_INLINE_SUPPORTED
-#endif /* STSLSOFT_ASM_IN_INLINE_SUPPORTED */
-
-/* Now we include the appropriate compiler-specific header */
-
-#if defined(__STLSOFT_COMPILER_IS_CUSTOM)
-# include __STLSOFT_CF_CUSTOM_COMPILER_INCLUDE_NAME
-#elif defined(__STLSOFT_COMPILER_IS_UNKNOWN)
-# include "stlsoft_cccap_unknown.h"
-#elif defined(__STLSOFT_COMPILER_IS_BORLAND)
-# include "stlsoft_cccap_borland.h"
-#elif defined(__STLSOFT_COMPILER_IS_COMO)
-# include "stlsoft_cccap_como.h"
-#elif defined(__STLSOFT_COMPILER_IS_DMC)
-# include "stlsoft_cccap_dmc.h"
-#elif defined(__STLSOFT_COMPILER_IS_GCC)
-# include "stlsoft_cccap_gcc.h"
-#elif defined(__STLSOFT_COMPILER_IS_INTEL)
-# include "stlsoft_cccap_intel.h"
-#elif defined(__STLSOFT_COMPILER_IS_MSVC)
-# include "stlsoft_cccap_msvc.h"
-#elif defined(__STLSOFT_COMPILER_IS_MWERKS)
-# include "stlsoft_cccap_mwerks.h"
-#elif defined(__STLSOFT_COMPILER_IS_VECTORC)
-# include "stlsoft_cccap_vectorc.h"
-#elif defined(__STLSOFT_COMPILER_IS_WATCOM)
-# include "stlsoft_cccap_watcom.h"
-#else
-# error Compiler not correctly discriminated
-#endif /* compiler */
-
-#if defined(_STLSOFT_COMPILE_VERBOSE) && \
- !defined(STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT)
-# undef _STLSOFT_COMPILE_VERBOSE
-# endif /* !STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT && _STLSOFT_COMPILE_VERBOSE */
-
-# ifdef _STLSOFT_COMPILE_VERBOSE
-# pragma message(__STLSOFT_COMPILER_VERSION_STRING)
-# endif /* STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT && _STLSOFT_COMPILE_VERBOSE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Sanity checks - 2
- *
- * MBCS - none of the libraries code is written to support MBCS
- */
-
-/* Should not be MBCS.
- *
- * Only ANSI and Unicode character encoding schemese are explicitly supported.
- */
-#ifdef _MBCS
-# ifdef _STLSOFT_STRICT
-# error The STLSoft libraries are not compatible with variable length character representation schemes such as MBCS
-# else
-# ifdef _STLSOFT_COMPILE_VERBOSE
-# pragma message("The STLSoft libraries are not compatible with variable length character representation schemes such as MBCS")
-# endif /* _STLSOFT_COMPILE_VERBOSE */
-# endif /* _STLSOFT_STRICT */
-#endif /* _MBCS */
-
-
-
-
-
-/* Template support */
-#ifndef __STLSOFT_CF_TEMPLATE_SUPPORT
-# error Template support not detected. STLSoft libraries are template-based and require this support.
-#endif /* __STLSOFT_CF_TEMPLATE_SUPPORT */
-
-
-/* Native 64-bit integer support */
-#if defined(__STLSOFT_CF_NATIVE___int64_SUPPORT) || \
- defined(__STLSOFT_CF_NATIVE_LONG_LONG_SUPPORT)
-# define __STLSOFT_CF_NATIVE_64BIT_INTEGER_SUPPORT
-#endif /* __STLSOFT_CF_NATIVE___int64_SUPPORT || __STLSOFT_CF_NATIVE_LONG_LONG_SUPPORT */
-
-/* Out-of-class method definition argument full-qualification requirement */
-#ifdef __STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED
-# define _stlsoft_qualify_fn_arg(Q, T) Q::T
-#else
-# define _stlsoft_qualify_fn_arg(Q, T) T
-#endif /* __STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED */
-
-/* Out-of-memory throws bad_alloc.
- *
- * Discriminated symbol is __STLSOFT_CF_NOTHROW_BAD_ALLOC
- *
- * By default, compilations with the Borland, and Watcom compilers throw
- * bad_alloc in conditions of memory exhaustion, and those with Digital Mars
- * and Microsoft do not.
- *
- * The Microsoft compilers do not throw bad_alloc for long established reasons,
- * though they can be made to do so (see Matthew Wilson, "Generating
- * Out-Of-Memory Exceptions", Windows Developer's Journal, Vol 12 Number 5, May
- * 2001). This feature may be added in a forthcoming release of the libraries.
- *
- * The Digital Mars compiler appears to ship without any header files that
- * define bad_alloc (whether in std or not), so it is therefore assumed that
- * operator new will not throw exceptions in out of memory conditions.
- *
- * Define __STLSOFT_CF_THROW_BAD_ALLOC to force Microsoft to do so.
- * Define __STLSOFT_CF_NO_THROW_BAD_ALLOC to prevent Borland/Comeau/Digital Mars/
- * GCC/Metrowerks/Watcom from doing so.
- */
-
-#ifndef __STLSOFT_CF_EXCEPTION_SUPPORT
-# define __STLSOFT_CF_NOTHROW_BAD_ALLOC
-#endif /* !__STLSOFT_CF_EXCEPTION_SUPPORT */
-
-#ifdef __STLSOFT_CF_NOTHROW_BAD_ALLOC
-# ifdef __STLSOFT_CF_THROW_BAD_ALLOC
-# undef __STLSOFT_CF_THROW_BAD_ALLOC
-# endif /* __STLSOFT_CF_THROW_BAD_ALLOC */
-#else
- /* Leave it to whatever the compiler's capability discrimination has determined */
-#endif /* __STLSOFT_CF_NOTHROW_BAD_ALLOC */
-
-
-/* Template specialisation syntax support
- */
-#ifdef __STLSOFT_TEMPLATE_SPECIALISATION
-# undef __STLSOFT_TEMPLATE_SPECIALISATION
-#endif /* __STLSOFT_TEMPLATE_SPECIALISATION */
-
-#ifdef __STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX
-# define STLSOFT_TEMPLATE_SPECIALISATION template <>
-#else
-# define STLSOFT_TEMPLATE_SPECIALISATION
-#endif /* __STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX */
-
-
-/* Keyword support.
- *
- * Define _STLSOFT_FORCE_ALL_KEYWORDS to force the assumption of compiler
- * support for all keywords.
- *
- * Define _STLSOFT_FORCE_KEYWORD_EXPLICIT to force the assumption of compiler
- * support for the explicit keyword
- *
- * Define _STLSOFT_FORCE_KEYWORD_MUTABLE to force the assumption of compiler
- * support for the mutable keyword
- *
- * Define _STLSOFT_FORCE_KEYWORD_TYPENAME to force the assumption of compiler
- * support for the typename keyword
- */
-
-#ifdef _STLSOFT_FORCE_ALL_KEYWORDS
-# define _STLSOFT_FORCE_KEYWORD_EXPLICIT
-# define _STLSOFT_FORCE_KEYWORD_MUTABLE
-# define _STLSOFT_FORCE_KEYWORD_TYPENAME
-#endif /* _STLSOFT_FORCE_ALL_KEYWORDS */
-
-#if !defined(__STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT) && \
- defined(_STLSOFT_FORCE_KEYWORD_EXPLICIT)
-# define __STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT
-#endif /* !__STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT && _STLSOFT_FORCE_KEYWORD_EXPLICIT */
-
-#if !defined(__STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT) && \
- defined(_STLSOFT_FORCE_KEYWORD_MUTABLE)
-# define __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT
-#endif /* !__STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT && _STLSOFT_FORCE_KEYWORD_MUTABLE */
-
-#if !defined(__STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT) && \
- defined(_STLSOFT_FORCE_KEYWORD_TYPENAME)
-# define __STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT
-#endif /* !__STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT && _STLSOFT_FORCE_KEYWORD_TYPENAME */
-
-#if !defined(__STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT) && \
- defined(_STLSOFT_FORCE_KEYWORD_TYPENAME)
-# define __STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT
-#endif /* !__STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT && _STLSOFT_FORCE_KEYWORD_TYPENAME */
-
-#if !defined(__STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT) && \
- defined(_STLSOFT_FORCE_KEYWORD_TYPENAME)
-# define __STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT
-#endif /* !__STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT && _STLSOFT_FORCE_KEYWORD_TYPENAME */
-
-#if !defined(__STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT) && \
- defined(_STLSOFT_FORCE_KEYWORD_TYPENAME)
-# define __STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT
-#endif /* !__STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT && _STLSOFT_FORCE_KEYWORD_TYPENAME */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * operator bool()
- *
- * If the symbol STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT
- * is defined, operator bool should be defined as follows:
- *
- * class X
- * {
- * private:
- * struct boolean { int i; }
- * typedef int boolean::*boolean_t;
- * public:
- * operator boolean_t () const;
- *
- * otherwise it should be
- *
- * class X
- * {
- * private:
- * typedef ss_bool_t boolean_t;
- * public:
- * operator boolean_t () const;
- *
- *
- * If the symbol STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT
- * is defined, it means that (!x) can de deduced by the compiler, otherwise it
- * will need to be provided
- *
- * If STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT is not defined
- * then STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT should not be
- * defined, so we do a check here.
- *
- */
-
-#if !defined(STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT) && \
- defined(STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT)
-# error Cannot rely on use of boolean as pointer to member for operator !
-# error Undefine STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT when
-# error STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT is not defined
-#endif /* !STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT && STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Obsolete symbol definitions
- *
- * Define _STLSOFT_INCLUDE_OBSOLETE to include the definitions of symbols prior
- * to version 1.5.1
- */
-
-/* Verify that the significant changes to STLSoft 1.5.1 are checked with respect
- * to other previously released projects
- */
-
-#if ( defined(_ATLSTL_VER) && \
- _ATLSTL_VER <= 0x00010204) || \
- ( defined(_COMSTL_VER) && \
- _COMSTL_VER <= 0x00010201) || \
- ( defined(_MFCSTL_VER) && \
- _MFCSTL_VER <= 0x00010202) || \
- ( defined(_UNIXSTL_VER) && \
- _UNIXSTL_VER <= 0x00000901) || \
- ( defined(_WINSTL_VER) && \
- _WINSTL_VER <= 0x00010201)
-# ifdef _STLSOFT_STRICT
-# error You are using an old version of one or more of ATLSTL, COMSTL, MFCSTL, UNIXSTL and WinSTL. Please upgrade all dependent projects in line with the STLSoft version you are using
-# else
-# ifdef _STLSOFT_COMPILE_VERBOSE
-# pragma message("You are using an old version of one or more of ATLSTL, COMSTL, MFCSTL, UNIXSTL and WinSTL. _STLSOFT_INCLUDE_OBSOLETE will be defined (but is not guaranteed to work!)")
-# endif /* _STLSOFT_COMPILE_VERBOSE */
-# ifndef _STLSOFT_INCLUDE_OBSOLETE
-# define _STLSOFT_INCLUDE_OBSOLETE
-# endif /* !_STLSOFT_INCLUDE_OBSOLETE */
-# endif /* _STLSOFT_STRICT */
-#endif /* sub-project versions */
-
-#ifdef _STLSOFT_INCLUDE_OBSOLETE
-# include "stlsoft_cc_obsolete.h"
-#endif /* _STLSOFT_INCLUDE_OBSOLETE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _STLSOFT_NO_STD_INCLUDES
-# include // standard types
-# include // standard constants
-#endif /* !_STLSOFT_NO_STD_INCLUDES */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Debugging
- *
- * The macro stlsoft_assert provides standard debug-mode assert functionality.
- */
-
-#if defined(_STLSOFT_NO_ASSERT) && \
- defined(__STLSOFT_CF_ASSERT_SUPPORT)
-# undef __STLSOFT_CF_ASSERT_SUPPORT
-#endif /* _STLSOFT_NO_ASSERT && __STLSOFT_CF_ASSERT_SUPPORT */
-
-/// \def stlsoft_assert Defines a runtime assertion
-///
-/// \param ex Must be non-zero, or an assertion will be fired
-#ifdef __STLSOFT_CF_ASSERT_SUPPORT
-# ifdef __STLSOFT_CF_USE_cassert
- /* Using the standard assertion mechanism, located in */
-# include
-# define stlsoft_assert(ex) assert(ex)
-# else
- /* Using either a custom or proprietary assertion mechanism, so must
- * provide the header include name
- */
-# ifndef __STLSOFT_CF_ASSERT_INCLUDE_NAME
-# error Must supply an assert include filename with custom or proprietary assertion mechanism
-# else
-# include __STLSOFT_CF_ASSERT_INCLUDE_NAME
-# endif /* !__STLSOFT_CF_ASSERT_INCLUDE_NAME */
-# endif /* __STLSOFT_CF_USE_cassert */
-# ifndef stlsoft_assert
-# error If your compiler discrimination file supports assertions, it must defined stlsoft_assert() (taking a single parameter)
-# endif /* !stlsoft_assert */
-#endif /* !__STLSOFT_CF_ASSERT_SUPPORT */
-
-/// \def stlsoft_message_assert Defines a runtime assertion, with message
-///
-/// \param ex Must be non-zero, or an assertion will be fired
-/// \param _m The literal character string message to be included in the assertion
-#if defined(__STLSOFT_CF_ASSERT_SUPPORT)
-# if defined(__WATCOMC__)
-# define stlsoft_message_assert(_m, ex) stlsoft_assert(ex)
-# else
-# define stlsoft_message_assert(_m, ex) stlsoft_assert((_m, ex))
-# endif /* __WATCOMC__ */
-#else
-# define stlsoft_message_assert(_m, ex)
-#endif /* __STLSOFT_CF_ASSERT_SUPPORT */
-
-/// \def stlsoft_static_assert Defines a compile-time assertion
-///
-/// \param ex Must be non-zero, or compilation will fail
-#if defined(__STLSOFT_CF_STATIC_ASSERT_SUPPORT)
-# if defined(__STLSOFT_COMPILER_IS_GCC)
-# define stlsoft_static_assert(ex) do { typedef int ai[(ex) ? 1 : -1]; } while(0)
-# else
-# define stlsoft_static_assert(ex) do { typedef int ai[(ex) ? 1 : 0]; } while(0)
-# endif /* compiler */
-#else
-# define stlsoft_static_assert(ex) stlsoft_message_assert("Static assertion failed: ", (ex))
-#endif /* __STLSOFT_COMPILER_IS_DMC */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- *
- * The STLSoft uses namespaces by default, unless the _STLSOFT_NO_NAMESPACES
- * preprocessor symbol is defined, in which case all elements are placed within
- * the global namespace.
- *
- * The macro stlsoft_ns_qual() macro can be used to refer to elements in the
- * STLSoft libraries irrespective of whether they are in the stlsoft namespace
- * or in the global namespace.
- *
- * Some compilers do not support the standard library in the std namespace, so
- * the stlsoft_ns_qual_std() macro can be used to refer to elements in the
- * STLSoft libraries irrespective of whether they are in the std namespace or
- * in the global namespace.
- */
-
-/* No STLSoft namespaces means no stlsoft namespace */
-#ifdef _STLSOFT_NO_NAMESPACES
-# define _STLSOFT_NO_NAMESPACE
-#endif /* _STLSOFT_NO_NAMESPACES */
-
-#ifndef _STLSOFT_NO_NAMESPACE
-/// The STLSoft namespace - \c stlsoft - is the namespace for the STLSoft main
-/// project, and the root namespace for all the other STLSoft projects, whose
-/// individual namespaces reside within it.
-namespace stlsoft
-{
-#endif /* !_STLSOFT_NO_NAMESPACE */
-
-/// \def stlsoft_ns_qual(x)
-/// Qualifies with stlsoft:: if STLSoft is using namespaces or, if not, does not qualify
-
-/// \def stlsoft_ns_using(x)
-/// Declares a using directive (with respect to stlsoft) if STLSoft is using namespaces or, if not, does nothing
-
-#ifndef _STLSOFT_NO_NAMESPACE
-# define stlsoft_ns_qual(x) ::stlsoft::x
-# define stlsoft_ns_using(x) using ::stlsoft::x;
-#else
-# define stlsoft_ns_qual(x) x
-# define stlsoft_ns_using(x)
-#endif /* !_STLSOFT_NO_NAMESPACE */
-
-/// \def stlsoft_ns_qual_std(x)
-/// Qualifies with std:: if STLSoft is being translated in the context of the standard library being within the std namespace or, if not, does not qualify
-
-/// \def stlsoft_ns_using_std(x)
-/// Declares a using directive (with respect to std) if STLSoft is being translated in the context of the standard library being within the std namespace or, if not, does nothing
-
-#ifdef __STLSOFT_CF_std_NAMESPACE
-# define stlsoft_ns_qual_std(x) ::std::x
-# define stlsoft_ns_using_std(x) using ::std::x;
-#else
-# define stlsoft_ns_qual_std(x) x
-# define stlsoft_ns_using_std(x)
-#endif /* !__STLSOFT_CF_std_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Typedefs
- *
- * The STLSoft uses a number of typedefs to aid in compiler-independence in the
- * libraries' main code.
- */
-
-/* Type definitions - precursors */
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-
-/* ptrdiff_t
- */
-#ifndef _STLSOFT_NO_STD_INCLUDES
- typedef ptrdiff_t ss_ptrdiff_pr_t_; // ptr diff
-#else
- typedef int ss_ptrdiff_pr_t_; // ptr diff
-#endif /* !_STLSOFT_NO_STD_INCLUDES */
-
-/* size_t
- */
-#ifndef _STLSOFT_NO_STD_INCLUDES
- typedef size_t ss_size_pr_t_; // size
-#else
- typedef unsigned int ss_size_pr_t_; // size
-#endif /* !_STLSOFT_NO_STD_INCLUDES */
-
-/* wchar_t
- *
- * wchar_t is either a built-in type, or is defined to unsigned 16-bit value
- */
-
-#ifdef __STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT
- /* It's some kind of compiler native type. */
-# ifndef __STLSOFT_NATIVE_WCHAR_T
- /* either wchar_t itself */
- typedef wchar_t ss_char_w_pr_t_; // Unicode char type
-# else
- /* or a compiler-specific type */
- typedef __STLSOFT_NATIVE_WCHAR_T ss_char_w_pr_t_; // Unicode char type
-# endif /* !__STLSOFT_NATIVE_WCHAR_T */
-#elif defined(__STLSOFT_CF_TYPEDEF_WCHAR_T_SUPPORT)
- typedef wchar_t ss_char_w_pr_t_; // Unicode char type
-#else
- /* It's some kind of library-defined type. */
-# ifndef _STLSOFT_NO_STD_INCLUDES
- typedef wchar_t ss_char_w_pr_t_; // Unicode char type
-# else
- typedef unsigned short ss_char_w_pr_t_; // Unicode char type
-# endif /* __STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT */
-#endif /* !__STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT */
-
-/* 8-bit */
-#ifdef __STLSOFT_CF_NATIVE_8BIT_INT_SUPPORT
- typedef __STLSOFT_NATIVE_INT8_T ss_int8_pr_t_;
- typedef __STLSOFT_NATIVE_SINT8_T ss_sint8_pr_t_;
- typedef __STLSOFT_NATIVE_UINT8_T ss_uint8_pr_t_;
-#else
- typedef signed char ss_int8_pr_t_;
- typedef signed char ss_sint8_pr_t_;
- typedef unsigned char ss_uint8_pr_t_;
-#endif /* __STLSOFT_CF_NATIVE_8BIT_INT_SUPPORT */
-
-/* 16-bit */
-#ifdef __STLSOFT_CF_NATIVE_16BIT_INT_SUPPORT
- typedef __STLSOFT_NATIVE_INT16_T ss_int16_pr_t_;
- typedef __STLSOFT_NATIVE_SINT16_T ss_sint16_pr_t_;
- typedef __STLSOFT_NATIVE_UINT16_T ss_uint16_pr_t_;
-#else
- typedef short ss_int16_pr_t_;
- typedef signed short ss_sint16_pr_t_;
- typedef unsigned short ss_uint16_pr_t_;
-#endif /* __STLSOFT_CF_NATIVE_16BIT_INT_SUPPORT */
-
-/* 32-bit */
-#ifdef __STLSOFT_CF_NATIVE_32BIT_INT_SUPPORT
- typedef __STLSOFT_NATIVE_INT32_T ss_int32_pr_t_;
- typedef __STLSOFT_NATIVE_SINT32_T ss_sint32_pr_t_;
- typedef __STLSOFT_NATIVE_UINT32_T ss_uint32_pr_t_;
-#else
- typedef long ss_int32_pr_t_;
- typedef signed long ss_sint32_pr_t_;
- typedef unsigned long ss_uint32_pr_t_;
-#endif /* __STLSOFT_CF_NATIVE_32BIT_INT_SUPPORT */
-
-/* 64-bit */
-#ifdef __STLSOFT_CF_NATIVE___int64_SUPPORT
- typedef __int64 ss_int64_pr_t_;
- typedef signed __int64 ss_sint64_pr_t_;
- typedef unsigned __int64 ss_uint64_pr_t_;
-#elif defined(__STLSOFT_CF_NATIVE_LONG_LONG_SUPPORT)
- typedef long long ss_int64_pr_t_;
- typedef signed long long ss_sint64_pr_t_;
- typedef unsigned long long ss_uint64_pr_t_;
-#endif /* __STLSOFT_CF_NATIVE_LONG_LONG_SUPPORT */
-
-/* bool */
-#ifdef __STLSOFT_CF_NATIVE_BOOL_SUPPORT
- typedef bool ss_bool_pr_t_;
-#else
- typedef unsigned int ss_bool_pr_t_;
-#endif /* __STLSOFT_CF_NATIVE_BOOL_SUPPORT */
-
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* Type definitions - proper */
-
-typedef char ss_char_a_t; //!< Ansi char type
-typedef ss_char_w_pr_t_ ss_char_w_t; //!< Unicode char type
-typedef ss_int8_pr_t_ ss_int8_t; //!< 8-bit integer
-typedef ss_sint8_pr_t_ ss_sint8_t; //!< 8-bit signed integer
-typedef ss_uint8_pr_t_ ss_uint8_t; //!< 8-bit unsigned integer
-typedef ss_int16_pr_t_ ss_int16_t; //!< 16-bit integer
-typedef ss_sint16_pr_t_ ss_sint16_t; //!< 16-bit signed integer
-typedef ss_uint16_pr_t_ ss_uint16_t; //!< 16-bit unsigned integer
-typedef ss_int32_pr_t_ ss_int32_t; //!< 32-bit integer
-typedef ss_sint32_pr_t_ ss_sint32_t; //!< 32-bit signed integer
-typedef ss_uint32_pr_t_ ss_uint32_t; //!< 32-bit unsigned integer
-#ifdef __STLSOFT_CF_NATIVE_64BIT_INTEGER_SUPPORT
- typedef ss_int64_pr_t_ ss_int64_t; //!< 64-bit integer
- typedef ss_sint64_pr_t_ ss_sint64_t; //!< 64-bit signed integer
- typedef ss_uint64_pr_t_ ss_uint64_t; //!< 64-bit unsigned integer
-#endif /* __STLSOFT_CF_NATIVE_64BIT_INTEGER_SUPPORT */
-typedef short ss_short_t; //!< short integer
-typedef int ss_int_t; //!< integer
-typedef signed int ss_sint_t; //!< signed integer
-typedef unsigned int ss_uint_t; //!< unsigned integer
-typedef long ss_long_t; //!< long integer
-typedef ss_uint8_t ss_byte_t; //!< Byte
-typedef ss_bool_pr_t_ ss_bool_t; //!< bool
-typedef ss_size_pr_t_ ss_size_t; //!< size
-typedef ss_ptrdiff_pr_t_ ss_ptrdiff_t; //!< ptr diff
-typedef long ss_streampos_t; //!< streampos
-typedef long ss_streamoff_t; //!< streamoff
-
-#ifndef _STLSOFT_NO_NAMESPACE
-typedef ss_char_a_t char_a_t; //!< Ansi char type
-typedef ss_char_w_t char_w_t; //!< Unicode char type
-typedef ss_int8_t int8_t; //!< 8-bit integer
-typedef ss_sint8_t sint8_t; //!< 8-bit signed integer
-typedef ss_uint8_t uint8_t; //!< 8-bit unsigned integer
-typedef ss_int16_t int16_t; //!< 16-bit integer
-typedef ss_sint16_t sint16_t; //!< 16-bit signed integer
-typedef ss_uint16_t uint16_t; //!< 16-bit unsigned integer
-typedef ss_int32_t int32_t; //!< 32-bit integer
-typedef ss_sint32_t sint32_t; //!< 32-bit signed integer
-typedef ss_uint32_t uint32_t; //!< 32-bit unsigned integer
-# ifdef __STLSOFT_CF_NATIVE_64BIT_INTEGER_SUPPORT
-typedef ss_int64_t int64_t; //!< 64-bit integer
-typedef ss_sint64_t sint64_t; //!< 64-bit signed integer
-typedef ss_uint64_t uint64_t; //!< 64-bit unsigned integer
-# endif /* __STLSOFT_CF_NATIVE_64BIT_INTEGER_SUPPORT */
-typedef ss_short_t short_t; //!< short integer
-typedef ss_int_t int_t; //!< integer
-typedef ss_sint_t sint_t; //!< signed integer
-typedef ss_uint_t uint_t; //!< unsigned integer
-typedef ss_long_t long_t; //!< long integer
-typedef ss_byte_t byte_t; //!< Byte
-typedef ss_bool_t bool_t; //!< bool
-typedef ss_size_t size_t; //!< size
-typedef ss_ptrdiff_t ptrdiff_t; //!< ptr diff
-typedef ss_streampos_t streampos_t; //!< streampos
-typedef ss_streamoff_t streamoff_t; //!< streamoff
-#endif /* !_STLSOFT_NO_NAMESPACE */
-
-
-#if 0
-template
-struct uintp_traits;
-
-STLSOFT_GEN_TRAIT_SPECIALISATION
-struct uintp_traits<1>
-{
- typedef uint8_t unsigned_type;
-}
-
-typedef size_traits::signed_type sintp_t;
-typedef size_traits::unsigned_type uintp_t;
-
-#endif /* 0 */
-
-
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-#ifdef __cplusplus
-struct stlsoft_size_checker
-{
-#ifdef __STLSOFT_COMPILER_IS_GCC
-protected: // GCC is too "helpful" in this case, so must declare as protected
-#else
-private:
-#endif /* __STLSOFT_COMPILER_IS_GCC */
- stlsoft_size_checker();
- ~stlsoft_size_checker()
- {
- // Char types
- stlsoft_static_assert(sizeof(ss_char_a_t) >= 1);
- stlsoft_static_assert(sizeof(ss_char_w_t) >= 2);
- // 8-bit types
- stlsoft_static_assert(sizeof(ss_int8_t) == 1);
- stlsoft_static_assert(sizeof(ss_sint8_t) == sizeof(ss_int8_t));
- stlsoft_static_assert(sizeof(ss_uint8_t) == sizeof(ss_int8_t));
- // 16-bit types
- stlsoft_static_assert(sizeof(ss_int16_t) == 2);
- stlsoft_static_assert(sizeof(ss_sint16_t) == sizeof(ss_int16_t));
- stlsoft_static_assert(sizeof(ss_uint16_t) == sizeof(ss_int16_t));
- // 32-bit types
- stlsoft_static_assert(sizeof(ss_int32_t) == 4);
- stlsoft_static_assert(sizeof(ss_sint32_t) == sizeof(ss_int32_t));
- stlsoft_static_assert(sizeof(ss_uint32_t) == sizeof(ss_int32_t));
- // 64-bit types
-#ifdef __STLSOFT_CF_NATIVE_64BIT_INTEGER_SUPPORT
- stlsoft_static_assert(sizeof(ss_int64_t) == 8);
- stlsoft_static_assert(sizeof(ss_sint64_t) == sizeof(ss_int64_t));
- stlsoft_static_assert(sizeof(ss_uint64_t) == sizeof(ss_int64_t));
-#endif /* __STLSOFT_CF_NATIVE_64BIT_INTEGER_SUPPORT */
- // Integer types
- stlsoft_static_assert(sizeof(ss_int_t) >= 1);
- stlsoft_static_assert(sizeof(ss_sint_t) == sizeof(ss_int_t));
- stlsoft_static_assert(sizeof(ss_uint_t) == sizeof(ss_int_t));
- stlsoft_static_assert(sizeof(ss_long_t) >= sizeof(ss_int_t));
- // byte type
- stlsoft_static_assert(sizeof(ss_byte_t) == 1);
- // Bool type
- stlsoft_static_assert(sizeof(ss_bool_t) >= 1);
- // Other types
- stlsoft_static_assert(sizeof(ss_size_t) >= 1);
- stlsoft_static_assert(sizeof(ss_ptrdiff_t) >= 1);
- stlsoft_static_assert(sizeof(ss_streampos_t) >= 1);
- stlsoft_static_assert(sizeof(ss_streamoff_t) >= 1);
- }
-};
-#endif /* __cplusplus */
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Keywords
- *
- * The STLSoft uses a number of preprocessor symbols to aid in compiler
- * compatibility in the libraries' code.
- *
- * ss_explicit_k - explicit, or nothing
- * ss_mutable_k - mutable, or nothing
- * ss_typename_type_k - typename, or nothing (used within template
- * definitions for declaring types derived from
- * externally derived types)
- * ss_typename_param_k - typename or class (used for template parameters)
- * ss_typename_type_def_k - typename qualifier in template default parameters
- * ss_typename_type_mil_k - typename qualifier in constructor initialiser lists
- */
-
-/// \def ss_explicit_k
-///
-/// Evaluates to explicit on translators that support the keyword, otherwise to nothing
-#ifdef __STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT
-# define ss_explicit_k explicit
-#else
-# define ss_explicit_k
-#endif /* __STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT */
-
-/// \def ss_mutable_k
-///
-/// Evaluates to mutable on translators that support the keyword, otherwise to nothing
-#ifdef __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT
-# define ss_mutable_k mutable
-#else
-# define ss_mutable_k
-#endif /* __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT */
-
-/// \def ss_typename_param_k
-///
-/// Evaluates to typename on translators that support the keyword, otherwise to class
-#ifdef __STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT
-# define ss_typename_param_k typename
-#else
-# define ss_typename_param_k class
-#endif /* __STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT */
-
-/// \def ss_typename_type_k
-///
-/// Evaluates to typename on translators that support the keyword, otherwise to nothing
-#ifdef __STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT
-# define ss_typename_type_k typename
-#else
-# define ss_typename_type_k
-#endif /* __STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT */
-
-/// \def ss_typename_type_def_k
-///
-/// Evaluates to typename on translators that support the keyword, otherwise to nothing
-#ifdef __STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT
-# define ss_typename_type_def_k typename
-#else
-# define ss_typename_type_def_k
-#endif /* __STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT */
-
-/// \def ss_typename_type_mil_k
-///
-/// Evaluates to typename on translators that support the keyword, otherwise to nothing
-#ifdef __STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT
-# define ss_typename_type_mil_k typename
-#else
-# define ss_typename_type_mil_k
-#endif /* __STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT */
-
-
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-/* /////////////////////////////////////////////////////////////////////////////
- * Values
- *
- * Since the boolean type may not be supported natively on all compilers, the
- * values of true and false may also not be provided. Hence the values of
- * ss_true_v and ss_false_v are defined, and are used in all code.
- */
-
-#ifdef __STLSOFT_CF_NATIVE_BOOL_SUPPORT
-# define ss_true_v (true)
-# define ss_false_v (false)
-#else
-# define ss_true_v (1)
-# define ss_false_v (0)
-#endif /* __STLSOFT_CF_NATIVE_BOOL_SUPPORT */
-
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-/* /////////////////////////////////////////////////////////////////////////////
- * Code modification macros
- */
-
-/// \defgroup code_modification_macros Code Modification Macros
-/// \ingroup STLSoft
-/// \brief These macros are used to help out where compiler differences are
-/// so great as to cause great disgusting messes in the class/function implementations
-/// @{
-
-/* Exception signatures. */
-#if !defined(__STLSOFT_DOCUMENTATION_SKIP_SECTION) && \
- defined(__STLSOFT_CF_EXCEPTION_SIGNATURE_SUPPORT)
-# define stlsoft_throw_0() throw ()
-# define stlsoft_throw_1(x1) throw (x1)
-# define stlsoft_throw_2(x1, x2) throw (x1, x2)
-# define stlsoft_throw_3(x1, x2, x3) throw (x1, x2, x3)
-# define stlsoft_throw_4(x1, x2, x3, x4) throw (x1, x2, x3, x4)
-# define stlsoft_throw_5(x1, x2, x3, x4, x5) throw (x1, x2, x3, x4, x5)
-# define stlsoft_throw_6(x1, x2, x3, x4, x5, x6) throw (x1, x2, x3, x4, x5, x6)
-# define stlsoft_throw_7(x1, x2, x3, x4, x5, x6, x7) throw (x1, x2, x3, x4, x5, x6, x7)
-# define stlsoft_throw_8(x1, x2, x3, x4, x5, x6, x7, x8) throw (x1, x2, x3, x4, x5, x6, x7, x8)
-#else
-# define stlsoft_throw_0()
-# define stlsoft_throw_1(x1)
-# define stlsoft_throw_2(x1, x2)
-# define stlsoft_throw_3(x1, x2, x3)
-# define stlsoft_throw_4(x1, x2, x3, x4)
-# define stlsoft_throw_5(x1, x2, x3, x4, x5)
-# define stlsoft_throw_6(x1, x2, x3, x4, x5, x6)
-# define stlsoft_throw_7(x1, x2, x3, x4, x5, x6, x7)
-# define stlsoft_throw_8(x1, x2, x3, x4, x5, x6, x7, x8)
-#endif /* __STLSOFT_CF_EXCEPTION_SIGNATURE_SUPPORT && !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/// \def stlsoft_num_elements
-///
-/// Evaluates, at compile time, to the number of elements within the given vector entity
-///
-/// Is it used as follows:
-///
-/// \htmlonly
-///
-/// int ai[20];
-///
-/// int i = 32;
-///
-/// int *pi = &i;
-///
-/// std::vector<int> vi;
-///
-///
-/// size_t s_ai = stlsoft_num_elements(ai); // Ok
-///
-/// size_t s_i = stlsoft_num_elements(i); // Error
-///
-/// size_t s_pi = stlsoft_num_elements(pi); // Error
-///
-/// size_t s_vi = stlsoft_num_elements(vi); // Error
-///
-///
-/// \endhtmlonly
-///
-/// \note For most of the supported compilers, this macro will reject application to pointer
-/// types, or to class types providing operator []
. This helps to avoid the common
-/// gotcha whereby (sizeof(ar) / sizeof(ar[0]))
is applied to such types, without
-/// causing a compiler error.
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-# define _stlsoft_num_elements(ar) (sizeof(ar) / sizeof(0[(ar)]))
-
-# if defined(__cplusplus) && \
- defined(__STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT)
-# if 0/* defined(__STLSOFT_COMPILER_IS_GCC) */
-# pragma pack(push, 1)
-template
-struct ss_array_size_struct
-{
- ss_sint8_t c[N];
-};
-# pragma pack(pop)
-
-template
-ss_array_size_struct ss_static_array_size(T (&)[N]);
-
-# define stlsoft_num_elements(ar) sizeof(stlsoft_ns_qual(ss_static_array_size)(ar))
-# else /* ? 0 */
-template
-struct ss_array_size_struct
-{
- ss_sint8_t c[N];
-};
-
-template
-ss_array_size_struct ss_static_array_size(T (&)[N]);
-
-# define stlsoft_num_elements(ar) sizeof(stlsoft_ns_qual(ss_static_array_size)(ar).c)
-# endif /* 0 */
-# else
-# define stlsoft_num_elements(ar) _stlsoft_num_elements(ar)
-# endif /* __cplusplus && __STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT */
-#else
-# define stlsoft_num_elements(ar)
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/// \def stlsoft_raw_offsetof
-///
-/// Evaluates, at compile time, the offset of a structure/class member
-
-#if defined(__STLSOFT_COMPILER_IS_GCC) && \
- __GNUC__ >= 3
-# define stlsoft_raw_offsetof(s, m) (reinterpret_cast(&reinterpret_cast(1)->m) - 1)
-#else
-# ifndef _STLSOFT_NO_STD_INCLUDES
-# define stlsoft_raw_offsetof(s, m) offsetof(s, m)
-# else
-# define stlsoft_raw_offsetof(s, m) reinterpret_cast(&static_cast(0)->m)
-# endif /* !_STLSOFT_NO_STD_INCLUDES */
-#endif /* __GNUC__ >= 3 */
-
-
-/* destroy function */
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-template
-void stlsoft_destroy_instance_fn(T *p)
-{
- p->~T();
-
- /* SSCB: Borland C++ and Visual C++ remove the dtor for basic
- * structs, and then warn that p is unused. This reference
- * suppresses that warning.
- */
- ((void)p);
-}
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/// \def stlsoft_destroy_instance
-///
-/// Destroys the given instance \c p of the given type (\c t and \c _type)
-#if defined(__STLSOFT_DOCUMENTATION_SKIP_SECTION) || \
- defined(__STLSOFT_COMPILER_IS_DMC)
-# define stlsoft_destroy_instance(t, _type, p) do { (p)->~t(); } while(0)
-#else
-# define stlsoft_destroy_instance(t, _type, p) stlsoft_destroy_instance_fn((p))
-#endif /* __STLSOFT_COMPILER_IS_DMC */
-
-/// Generates an opaque type with the name \c type
-///
-/// For example, the following defines two distinct opaque types:
-///
-/// \htmlonly
-///
-/// stlsoft_gen_opaque(HThread)
-///
-/// stlsoft_gen_opaque(HProcess)
-///
-///
-///
-/// \endhtmlonly
-///
-/// The two types are incompatible with each other, and with any other types (except that
-/// they are both convertible to void const *
-
-#define stlsoft_gen_opaque(type) typedef struct __stlsoft_htype##type{ int i;} const *type;
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-/// Define a 'final' class, ie. one that cannot be inherited from
-# define stlsoft_sterile_class(_cls) class __m__##_cls { private: __m__##_cls(){} ~__m__##_cls(){} friend class _cls; }; class _cls: public __m__##_cls
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/// \def STLSOFT_DECLARE_TEMPLATE_PARAM_AS_FRIEND
-/// \ingroup code_modification_macros
-///
-/// \brief Declares a template (class) parameter to be a friend of the template.
-///
-/// Is it used as follows:
-///
-/// \htmlonly
-///
-/// template<typename T>
-///
-/// class Thing
-///
-/// {
-///
-/// STLSOFT_DECLARE_TEMPLATE_PARAM_AS_FRIEND(T);
-///
-///
-/// private:
-///
-/// int m_member; // Thing<T>::m_member visible to T
-///
-/// };
-///
-///
-/// \endhtmlonly
-///
-/// \note This is contrary to the C++-98 standard. Section 7.1.5.3(2) notes: "...within a class
-/// template with a template type-parameter T, the declaration ["]friend class T;["] is ill-formed."
-/// However, it gives the expected behaviour for all compilers currently supported by STLSoft
-
-#if defined(__STLSOFT_DOCUMENTATION_SKIP_SECTION) || \
- defined(__STLSOFT_COMPILER_IS_BORLAND) || \
- defined(__STLSOFT_COMPILER_IS_COMO) || \
- defined(__STLSOFT_COMPILER_IS_DMC) || \
- ( defined(__STLSOFT_COMPILER_IS_GCC) && \
- __GNUC__ < 3) || \
- defined(__STLSOFT_COMPILER_IS_INTEL) || \
- defined(__STLSOFT_COMPILER_IS_MSVC) || \
- defined(__STLSOFT_COMPILER_IS_VECTORC) || \
- defined(__STLSOFT_COMPILER_IS_WATCOM)
-# define STLSOFT_DECLARE_TEMPLATE_PARAM_AS_FRIEND(T) friend T
-#elif defined(__STLSOFT_COMPILER_IS_MWERKS)
-# define STLSOFT_DECLARE_TEMPLATE_PARAM_AS_FRIEND(T) friend class T
-#elif defined(__STLSOFT_COMPILER_IS_GCC) && \
- __GNUC__ >= 3
-
-# define STLSOFT_DECLARE_TEMPLATE_PARAM_AS_FRIEND(T) \
- \
- struct friend_maker \
- { \
- typedef T T2; \
- }; \
- \
- typedef typename friend_maker::T2 friend_type; \
- \
- friend friend_type
-
-#else
-# error Compiler not discriminated
-#endif /* compiler */
-
-
-/// \def STLSOFT_GEN_TRAIT_SPECIALISATION
-/// \ingroup code_modification_macros
-///
-/// \brief Used to define a specialisation of a traits type
-///
-#define STLSOFT_GEN_TRAIT_SPECIALISATION(TR, T, V) \
- \
- STLSOFT_TEMPLATE_SPECIALISATION \
- struct TR \
- { \
- enum { value = V }; \
- };
-
-
-/// \def STLSOFT_SUPPRESS_UNUSED
-/// \ingroup code_modification_macros
-///
-/// \brief Used to suppress unused variable warnings
-///
-#ifdef __STLSOFT_COMPILER_IS_INTEL
-# define STLSOFT_SUPPRESS_UNUSED(x) ((void)((x) = (x)))
-#else /* ? __STLSOFT_COMPILER_IS_INTEL */
-# define STLSOFT_SUPPRESS_UNUSED(x) ((void)x)
-#endif /* __STLSOFT_COMPILER_IS_INTEL */
-
-
-
-/// @}
-
-/// \defgroup pointer_manipulation_functions Pointer Manipulation Functions
-/// \ingroup STLSoft
-/// \brief These functions assist in calculations with, and the manipulation of pointers
-/// @{
-
-/// Offsets a pointer by a number of bytes
-///
-/// \param p The pointer to be offset
-/// \param n The number of bytes to offset
-/// \result \c p offset by \c bytes
-template
-inline void const *ptr_byte_offset(T const p, ss_ptrdiff_t n)
-{
- return static_cast(static_cast(static_cast(p)) + n);
-}
-
-/// Offsets a pointer by a number of elements
-///
-/// \param p The pointer to be offset
-/// \param n The number of elements to offset
-/// \result \c p offset by \c elements
-template
-inline T const *ptr_offset(T const *p, ss_ptrdiff_t n)
-{
- return p + n;
-}
-
-/// Get the difference in bytes between two pointers
-template
-inline ss_ptrdiff_t ptr_byte_diff(T1 const *p1, T2 const *p2)
-{
- return static_cast(static_cast(p1)) - static_cast(static_cast(p2));
-}
-
-/// Get the difference in elements between two pointers
-template
-inline ss_ptrdiff_t ptr_diff(T1 const *p1, T2 const *p2)
-{
- return p1 - p2;
-}
-
-/// @} // end of group pointer_manipulation_functions
-
-/* Mutable support */
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-template
-#ifdef __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT
-inline T &mutable_access(T &t)
-#else
-inline T &mutable_access(T const &t)
-#endif /* __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT */
-{
-#ifdef __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT
- return t;
-#else
- return const_cast(t);
-#endif /* __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT */
-}
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* Move constructor support */
-#ifdef __STLSOFT_CF_MOVE_CONSTRUCTOR_SUPPORT
-# define stlsoft_define_move_rhs_type(t) t &
-#else
-# define stlsoft_define_move_rhs_type(t) t const &
-#endif /* __STLSOFT_CF_MOVE_CONSTRUCTOR_SUPPORT */
-
-template
-inline T &move_lhs_from_rhs(stlsoft_define_move_rhs_type(T) t)
-{
-#ifdef __STLSOFT_CF_MOVE_CONSTRUCTOR_SUPPORT
- return t;
-#else
- return const_cast(t);
-#endif /* __STLSOFT_CF_MOVE_CONSTRUCTOR_SUPPORT */
-}
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Memory
- */
-
-// function operator new
-//
-// When namespaces are being used, stlsoft provides its own placement new,
-// otherwise it includes in order to access the global version.
-
-#ifdef _STLSOFT_NO_NAMESPACE
-# if defined(__STLSOFT_COMPILER_IS_BORLAND) && \
- __BORLANDC__ < 0x0550
-# include
-# else
-# include
-# endif /* __STLSOFT_COMPILER_IS_BORLAND && __BORLANDC__ < 0x0550 */
-#else
-# if ( defined(__STLSOFT_COMPILER_IS_DMC) && \
- __DMC__ < 0x0833) || \
- ( defined(__STLSOFT_COMPILER_IS_MSVC) && \
- _MSC_VER < 1300)
-inline void *operator new(ss_size_t /* si */, void *pv)
-{
- return pv;
-}
-# endif /* compiler */
-#endif /* !_STLSOFT_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#ifndef _STLSOFT_NO_NAMESPACE
-} // namespace stlsoft
-#endif /* !_STLSOFT_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !_STLSOFT_INCL_H_STLSOFT */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/stlsoft_cccap_dmc.h b/etc/c/stlsoft/stlsoft_cccap_dmc.h
deleted file mode 100644
index 5f369b709..000000000
--- a/etc/c/stlsoft/stlsoft_cccap_dmc.h
+++ /dev/null
@@ -1,323 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: stlsoft_cccap_dmc.h
- *
- * Purpose: Compiler feature discrimination for Digital Mars C/C++.
- *
- * Created: 7th February 2003
- * Updated: 28th November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/stlsoft
- * http://www.stlsoft.org/
- *
- * email: submissions@stlsoft.org for submissions
- * admin@stlsoft.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _STLSOFT_INCL_H_STLSOFT
-# error This file must not be included independently of stlsoft.h
-#endif /* !_STLSOFT_INCL_H_STLSOFT */
-
-#ifdef _STLSOFT_INCL_H_STLSOFT_CCCAP_DMC
-# error This file cannot be included more than once in any compilation unit
-#endif /* _STLSOFT_INCL_H_STLSOFT_CCCAP_DMC */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-# define _STLSOFT_VER_H_STLSOFT_CCCAP_DMC_MAJOR 1
-# define _STLSOFT_VER_H_STLSOFT_CCCAP_DMC_MINOR 13
-# define _STLSOFT_VER_H_STLSOFT_CCCAP_DMC_REVISION 2
-# define _STLSOFT_VER_H_STLSOFT_CCCAP_DMC_EDIT 34
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Compiler features
- */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#include /* Needed to determine whether we're using STLport or SGI STL */
-
-/* Messaging
- */
-
-#define STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT
-
-/* Types:
- */
-
-/* bool */
-#ifdef _BOOL_DEFINED
-# define __STLSOFT_CF_NATIVE_BOOL_SUPPORT
-#else
- /* Not defined */
-#endif /* _BOOL_DEFINED */
-
-/* wchar_t */
-#ifdef _WCHAR_T_DEFINED
-# define __STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT
-#else
- /* Not defined */
-#endif /* _WCHAR_T_DEFINED */
-
-/* Native 8-bit integer */
-//#define __STLSOFT_CF_NATIVE_8BIT_INT_SUPPORT
-
-/* Native 16-bit integer */
-//#define __STLSOFT_CF_NATIVE_16BIT_INT_SUPPORT
-
-/* Native 32-bit integer */
-//#define __STLSOFT_CF_NATIVE_32BIT_INT_SUPPORT
-
-/* Native 64-bit integer */
-#define __STLSOFT_CF_NATIVE___int64_SUPPORT
-
-/* long long */
-#define __STLSOFT_CF_NATIVE_LONG_LONG_SUPPORT
-
-/* Are integers a unique type (i.e. not int8/16/32/64)? */
-#define __STLSOFT_CF_INT_DISTINCT_TYPE
-
-#if __DMC__ >= 0x0835
-# define __STLSOFT_CF_STATIC_ASSERT_SUPPORT
-#endif /* __DMC__ */
-
-/* Exception support */
-#ifdef _CPPUNWIND
-# define __STLSOFT_CF_EXCEPTION_SUPPORT
-#else
- /* Not defined */
-#endif /* _CPPUNWIND */
-
-/* */
-//#define __STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED
-
-/* Namespace support */
- /* The current versions (up to and including 8.32) of the Digital Mars
- * compiler have issues whereby out-of-class inline methods seem to be placed
- * within their namespace of instantiation rather than of definition, so
- * namespace support is turned off.
- */
-#if __DMC__ < 0x833
-# define _STLSOFT_NO_NAMESPACES
-#endif /* __DMC__ < 0x832 */
-
-#define __STLSOFT_CF_NAMESPACE_SUPPORT
-
-#define STLSOFT_CF_ANONYMOUS_UNION_SUPPORT
-
-/* Template support */
-#define __STLSOFT_CF_TEMPLATE_SUPPORT
-
-//#define STLSOFT_CF_TEMPLATE_TYPE_REQUIRED_IN_ARGS
-
-//#define __STLSOFT_CF_EXCEPTION_SIGNATURE_SUPPORT
-
-//#define __STLSOFT_CF_THROW_BAD_ALLOC
-
-#define __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_FUNDAMENTAL_ARGUMENT_SUPPORT
-
-#define __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT
-
-#if __DMC__ >= 0x0837
-# define STLSOFT_CF_MEM_FUNC_AS_TEMPLATE_PARAM_SUPPORT
-#else
- /* Not defined */
-#endif /* __DMC__ */
-
-#if __DMC__ >= 0x0832
-# define __STLSOFT_CF_MEMBER_TEMPLATE_FUNCTION_SUPPORT
-#else
- /* Not defined */
-#endif /* __DMC__ */
-
-#if __DMC__ >= 0x0832
-# define __STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT
-#else
- /* Not defined */
-#endif /* __DMC__ */
-
-#if 0 /* __DMC__ >= 0x0836? */
-# define __STLSOFT_CF_MEMBER_TEMPLATE_RANGE_METHOD_SUPPORT
-#else
- /* Not defined */
-#endif /* __DMC__ */
-
-#if __DMC__ >= 0x0829
-# define __STLSOFT_CF_MEMBER_TEMPLATE_CLASS_SUPPORT
-#else
- /* Not defined */
-#endif /* __DMC__ */
-
-#if __DMC__ >= 0x0829
-# define __STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX
-#else
- /* Not defined */
-#endif /* __DMC__ */
-
-#if __DMC__ >= 0x0829
-# define __STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT
-#else
- /* Not defined */
-#endif /* __DMC__ */
-
-//#define __STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
-
-#ifdef _STLPORT_VERSION
-# define __STLSOFT_CF_std_NAMESPACE
-#else
- /* Not defined */
-#endif /* _STLPORT_VERSION */
-
-#define __STLSOFT_CF_std_char_traits_AVAILABLE
-
-#if 0 /* __DMC__ >= 0x0836? */
-# define __STLSOFT_CF_ALLOCATOR_ALLOCATE_HAS_HINT
-#else
- /* Not defined */
-#endif /* __DMC__ */
-
-#define __STLSOFT_CF_ALLOCATOR_DEALLOCATE_HAS_OBJECTCOUNT
-
-#if (__DMC__ >= 0x0829)
-# define __STLSOFT_CF_BIDIRECTIONAL_ITERATOR_SUPPORT
-#else
- /* Not defined */
-#endif /* __DMC__ >= 0x0829 */
-
-#define __STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT
-
-#define __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT
-
-#define __STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT
-
-#define __STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT
-
-#define __STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT
-
-//#define __STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT
-
-#define __STLSOFT_CF_MOVE_CONSTRUCTOR_SUPPORT
-
-#if __DMC__ >= 0x0834
-# define __STLSOFT_CF_KOENIG_LOOKUP_SUPPORT
-#endif /* __DMC__ */
-
-//#define __STLSOFT_CF_TEMPLATE_TEMPLATE_SUPPORT
-
-#if __DMC__ >= 0x0838
-# define __STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT
-#else
- /* Not defined */
-#endif /* __DMC__ */
-
-#define __STLSOFT_CF_VENEER_SUPPORT
-
-// Shims are supported
-//# define __STLSOFT_CF_TEMPLATE_SHIMS_NOT_SUPPORTED
-
-#define __STLSOFT_CF_NEGATIVE_MODULUS_POSITIVE_GIVES_NEGATIVE_RESULT
-
-#define STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT
-#define STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT
-
-#if defined(_STLSOFT_CUSTOM_ASSERT)
- /* You have defined the pre-processor symbol _STLSOFT_CUSTOM_ASSERT,
- * which stipulates that you will be providing your own assert. This
- * requires that you have defined _STLSOFT_CUSTOM_ASSERT() as a macro
- * taking 1 parameter (the condition to assert).
- *
- * Suppose you have a function _DisplayAssert(), which has the
- * following signature:
- *
- * void _DisplayAssert(char const *file, int line, char const *expression);
- *
- * Presumably you would also have your own assert macro, say MY_ASSERT(),
- * defined as:
- *
- * #define MY_ASSERT(_x) ((void)((!(_x)) ? ((void)(_DisplayAssert(__FILE__, __LINE__, #_x))) : ((void)0)))
- *
- * so you would simply need to define _STLSOFT_CUSTOM_ASSERT() in terms of
- * MY_ASSERT(), as in:
- *
- * #define _STLSOFT_CUSTOM_ASSERT(_x) MY_ASSERT(_x)
- *
- * where
- */
-# define __STLSOFT_CF_ASSERT_SUPPORT
-# define stlsoft_assert(_x) _STLSOFT_CUSTOM_ASSERT(_x)
-# if defined(_STLSOFT_CUSTOM_ASSERT_INCLUDE)
-# define __STLSOFT_CF_ASSERT_INCLUDE_NAME _STLSOFT_CUSTOM_ASSERT_INCLUDE
-# else
-# error You must define _STLSOFT_CUSTOM_ASSERT_INCLUDE along with _STLSOFT_CUSTOM_ASSERT()
-# endif /* !_STLSOFT_CUSTOM_ASSERT_INCLUDE */
-#else
-# define __STLSOFT_CF_ASSERT_SUPPORT
- //#define __STLSOFT_CF_USE_cassert
-# define __STLSOFT_CF_ASSERT_INCLUDE_NAME
-# define stlsoft_assert(_x) assert(_x)
-#endif /* _STLSOFT_CUSTOM_ASSERT */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Calling convention
- */
-
-#define STLSOFT_CF_FASTCALL_SUPPORTED
-#define STLSOFT_CF_STDCALL_SUPPORTED
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Inline assembler
- */
-
-#define STSLSOFT_INLINE_ASM_SUPPORTED
-#define STSLSOFT_ASM_IN_INLINE_SUPPORTED
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Compiler warning suppression
- */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/stlsoft_cccap_gcc.h b/etc/c/stlsoft/stlsoft_cccap_gcc.h
deleted file mode 100644
index 17edd906c..000000000
--- a/etc/c/stlsoft/stlsoft_cccap_gcc.h
+++ /dev/null
@@ -1,255 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: stlsoft_cccap_gcc.h
- *
- * Purpose: Compiler feature discrimination for GNU C/C++.
- *
- * Created: 7th February 2003
- * Updated: 22nd November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/stlsoft
- * http://www.stlsoft.org/
- *
- * email: submissions@stlsoft.org for submissions
- * admin@stlsoft.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _STLSOFT_INCL_H_STLSOFT
-# error This file must not be included independently of stlsoft.h
-#endif /* !_STLSOFT_INCL_H_STLSOFT */
-
-#ifdef _STLSOFT_INCL_H_STLSOFT_CCCAP_GCC
-# error This file cannot be included more than once in any compilation unit
-#endif /* _STLSOFT_INCL_H_STLSOFT_CCCAP_GCC */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#define _STLSOFT_VER_H_STLSOFT_CCCAP_GCC_MAJOR 1
-#define _STLSOFT_VER_H_STLSOFT_CCCAP_GCC_MINOR 10
-#define _STLSOFT_VER_H_STLSOFT_CCCAP_GCC_REVISION 1
-#define _STLSOFT_VER_H_STLSOFT_CCCAP_GCC_EDIT 22
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Compiler features
- */
-
-/* Messaging
- */
-
-//#define STLSOFT_CF_PRAGMA_MESSAGE_SUPPORT
-
-/* Types:
- */
-
-/* bool */
-#define __STLSOFT_CF_NATIVE_BOOL_SUPPORT
-
-/* wchar_t */
-//#define __STLSOFT_CF_NATIVE_WCHAR_T_SUPPORT
-
-/* Native 8-bit integer */
-//#define __STLSOFT_CF_NATIVE_8BIT_INT_SUPPORT
-
-/* Native 16-bit integer */
-//#define __STLSOFT_CF_NATIVE_16BIT_INT_SUPPORT
-
-/* Native 32-bit integer */
-//#define __STLSOFT_CF_NATIVE_32BIT_INT_SUPPORT
-
-/* Native 64-bit integer */
-//#define __STLSOFT_CF_NATIVE___int64_SUPPORT
-
-/* long long */
-#define __STLSOFT_CF_NATIVE_LONG_LONG_SUPPORT
-
-#define __STLSOFT_CF_INT_DISTINCT_TYPE
-
-#define __STLSOFT_CF_STATIC_ASSERT_SUPPORT
-
-/* Exception support */
-#define __STLSOFT_CF_EXCEPTION_SUPPORT
-
-/* */
-#define __STLSOFT_CF_FUNCTION_SIGNATURE_FULL_ARG_QUALIFICATION_REQUIRED
-
-/* Namespace support */
-//#define _STLSOFT_NO_NAMESPACES
-
-#define __STLSOFT_CF_NAMESPACE_SUPPORT
-
-#define STLSOFT_CF_ANONYMOUS_UNION_SUPPORT
-
-/* Template support */
-#define __STLSOFT_CF_TEMPLATE_SUPPORT
-
-//#define STLSOFT_CF_TEMPLATE_TYPE_REQUIRED_IN_ARGS
-
-#define __STLSOFT_CF_EXCEPTION_SIGNATURE_SUPPORT
-
-#define __STLSOFT_CF_THROW_BAD_ALLOC
-
-#define __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_FUNDAMENTAL_ARGUMENT_SUPPORT
-
-#define __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT
-
-#define STLSOFT_CF_MEM_FUNC_AS_TEMPLATE_PARAM_SUPPORT
-
-#define __STLSOFT_CF_MEMBER_TEMPLATE_FUNCTION_SUPPORT
-
-#define __STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT
-
-#define __STLSOFT_CF_MEMBER_TEMPLATE_RANGE_METHOD_SUPPORT
-
-#define __STLSOFT_CF_MEMBER_TEMPLATE_CLASS_SUPPORT
-
-#define __STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX
-
-#define __STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT
-
-#define __STLSOFT_CF_TEMPLATE_OUTOFCLASSFN_QUALIFIED_TYPE_SUPPORT
-
-#define __STLSOFT_CF_std_NAMESPACE
-
-#if __GNUC__ >= 3
-# define __STLSOFT_CF_std_char_traits_AVAILABLE
-#endif /* */
-
-#define __STLSOFT_CF_ALLOCATOR_ALLOCATE_HAS_HINT
-
-#define __STLSOFT_CF_ALLOCATOR_DEALLOCATE_HAS_OBJECTCOUNT
-
-#define __STLSOFT_CF_BIDIRECTIONAL_ITERATOR_SUPPORT
-
-#define __STLSOFT_CF_EXPLICIT_KEYWORD_SUPPORT
-
-#define __STLSOFT_CF_MUTABLE_KEYWORD_SUPPORT
-
-#define __STLSOFT_CF_TYPENAME_PARAM_KEYWORD_SUPPORT
-
-#define __STLSOFT_CF_TYPENAME_TYPE_KEYWORD_SUPPORT
-
-#define __STLSOFT_CF_TYPENAME_TYPE_DEF_KEYWORD_SUPPORT
-
-//#define __STLSOFT_CF_TYPENAME_TYPE_MIL_KEYWORD_SUPPORT
-
-//# define __STLSOFT_CF_MOVE_CONSTRUCTOR_SUPPORT
-
-#define __STLSOFT_CF_KOENIG_LOOKUP_SUPPORT
-
-#define __STLSOFT_CF_TEMPLATE_TEMPLATE_SUPPORT
-
-#if __GNUC__ >= 3
-# define __STLSOFT_CF_STATIC_ARRAY_SIZE_DETERMINATION_SUPPORT
-#endif /* 2.95+ */
-
-#if __GNUC__ >= 3
-# define __STLSOFT_CF_VENEER_SUPPORT
-#endif /* */
-
-// Shims are supported
-//# define __STLSOFT_CF_TEMPLATE_SHIMS_NOT_SUPPORTED
-
-#define __STLSOFT_CF_NEGATIVE_MODULUS_POSITIVE_GIVES_NEGATIVE_RESULT
-
-#define STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT
-#define STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT
-
-#if defined(_STLSOFT_CUSTOM_ASSERT)
- /* You have defined the pre-processor symbol _STLSOFT_CUSTOM_ASSERT,
- * which stipulates that you will be providing your own assert. This
- * requires that you have defined _STLSOFT_CUSTOM_ASSERT() as a macro
- * taking 1 parameter (the condition to assert).
- *
- * Suppose you have a function _DisplayAssert(), which has the
- * following signature:
- *
- * void _DisplayAssert(char const *file, int line, char const *expression);
- *
- * Presumably you would also have your own assert macro, say MY_ASSERT(),
- * defined as:
- *
- * #define MY_ASSERT(_x) ((void)((!(_x)) ? ((void)(_DisplayAssert(__FILE__, __LINE__, #_x))) : ((void)0)))
- *
- * so you would simply need to define _STLSOFT_CUSTOM_ASSERT() in terms of
- * MY_ASSERT(), as in:
- *
- * #define _STLSOFT_CUSTOM_ASSERT(_x) MY_ASSERT(_x)
- *
- * where
- */
-# define __STLSOFT_CF_ASSERT_SUPPORT
-# define stlsoft_assert(_x) _STLSOFT_CUSTOM_ASSERT(_x)
-# if defined(_STLSOFT_CUSTOM_ASSERT_INCLUDE)
-# define __STLSOFT_CF_ASSERT_INCLUDE_NAME _STLSOFT_CUSTOM_ASSERT_INCLUDE
-# else
-# error You must define _STLSOFT_CUSTOM_ASSERT_INCLUDE along with _STLSOFT_CUSTOM_ASSERT()
-# endif /* !_STLSOFT_CUSTOM_ASSERT_INCLUDE */
-#else
-# define __STLSOFT_CF_ASSERT_SUPPORT
-//# define __STLSOFT_CF_USE_cassert
-# define __STLSOFT_CF_ASSERT_INCLUDE_NAME
-# define stlsoft_assert(_x) assert(_x)
-#endif /* _STLSOFT_CUSTOM_ASSERT */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Calling convention
- */
-
-#define STLSOFT_CF_FASTCALL_SUPPORTED
-#define STLSOFT_CF_STDCALL_SUPPORTED
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Inline assembler
- */
-
-//#define STSLSOFT_INLINE_ASM_SUPPORTED
-//#define STSLSOFT_ASM_IN_INLINE_SUPPORTED
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Compiler warning suppression
- */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/stlsoft_iterator.h b/etc/c/stlsoft/stlsoft_iterator.h
deleted file mode 100644
index a5a012b64..000000000
--- a/etc/c/stlsoft/stlsoft_iterator.h
+++ /dev/null
@@ -1,766 +0,0 @@
-/* ////////////////////////////////////////////////////////////////////////////
- * File: stlsoft_iterator.h (originally MTIter.h, ::SynesisStl)
- *
- * Purpose: iterator classes.
- *
- * Created: 2nd January 2000
- * Updated: 28th November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/stlsoft
- * http://www.stlsoft.org/
- *
- * email: submissions@stlsoft.org for submissions
- * admin@stlsoft.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _STLSOFT_INCL_H_STLSOFT_ITERATOR
-#define _STLSOFT_INCL_H_STLSOFT_ITERATOR
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-# define _STLSOFT_VER_H_STLSOFT_ITERATOR_MAJOR 1
-# define _STLSOFT_VER_H_STLSOFT_ITERATOR_MINOR 14
-# define _STLSOFT_VER_H_STLSOFT_ITERATOR_REVISION 1
-# define _STLSOFT_VER_H_STLSOFT_ITERATOR_EDIT 43
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* ////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _STLSOFT_INCL_H_STLSOFT
-# include "stlsoft.h" // Include the STLSoft root header
-#endif /* !_STLSOFT_INCL_H_STLSOFT */
-#include // std::iterator, std::reverse_iterator, std::reverse_bidirectional_iterator
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Warnings
- */
-
-/* This is here temporarily, until a better solution can be found. */
-#ifdef __STLSOFT_COMPILER_IS_MSVC
-# pragma warning(disable : 4097) // suppresses: typedef-name 'identifier1' used as synonym for class-name 'identifier2'
-#endif /* __STLSOFT_COMPILER_IS_MSVC */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#ifndef _STLSOFT_NO_NAMESPACE
-namespace stlsoft
-{
-#endif /* _STLSOFT_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Library identification
- */
-
-// This is all some hideous kludge caused by Dinkumware's standard library's
-// failure to leave behind any definitive discriminatable vestige of its
-// presence.
-
-#ifdef __STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES
-# undef __STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES
-#endif /* !__STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES */
-
-#ifdef __STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES_1300
-# undef __STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES_1300
-#endif /* !__STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES_1300 */
-
-#ifdef __STLSOFT_CF_STL_IS_STLPORT
-# undef __STLSOFT_CF_STL_IS_STLPORT
-#endif /* !__STLSOFT_CF_STL_IS_STLPORT */
-
-/* Detect whether Dinkumware "may" be present
- *
- * Discriminated symbol is __STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES
- */
-#if ( defined(__STLSOFT_COMPILER_IS_INTEL) || \
- ( defined(__STLSOFT_COMPILER_IS_MSVC) && \
- _MSC_VER >= 1200 && \
- _MSC_VER < 1310)) && \
- defined(_STD_BEGIN) && \
- defined(_STD_END) && \
- defined(_Mbstinit)
-# define __STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES
-#endif /* _MSC_VER && _MSC_VER == 1300 */
-
-#if defined(__STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES) && \
- defined(_DEPRECATED) && \
- defined(_HAS_TEMPLATE_PARTIAL_ORDERING) && \
- defined(_CPPLIB_VER)
-# define __STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES_1300
-#endif /* */
-
-/* Detect whether STLport is present
- *
- * Discriminated symbol is __STLSOFT_CF_STL_IS_STLPORT
- */
-#ifdef _STLPORT_VERSION
-# define __STLSOFT_CF_STL_IS_STLPORT
-#endif /* _STLPORT_VERSION */
-
-/* Must be either Dinkumware or STLport if compiling with Intel or Visual C++
- */
-#if ( defined(__STLSOFT_COMPILER_IS_INTEL) || \
- ( defined(__STLSOFT_COMPILER_IS_MSVC) && \
- _MSC_VER >= 1200 && \
- _MSC_VER < 1310)) && \
- ( !defined(__STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES) && \
- !defined(__STLSOFT_CF_STL_IS_STLPORT))
-# error When compiling with Intel C/C++ or Microsoft Visual C++, only the Dinkumware or STLport STL implementations are currently supported.
-# error Please contact STLSoft (admin@stlsoft.org) if you need to support a different STL implementation with these compilers.
-#endif /* (Intel || MSVC) && !DinkumWare && !STLport */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Iterator macros
- */
-
-/* reverse_iterator */
-
-#if defined(__STLSOFT_COMPILER_IS_BORLAND)
-# define stlsoft_reverse_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-#elif defined(__STLSOFT_COMPILER_IS_CUSTOM) || \
- defined(__STLSOFT_COMPILER_IS_UNKNOWN)
-# define stlsoft_reverse_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-#elif defined(__STLSOFT_COMPILER_IS_DMC)
-# if defined(__STLSOFT_CF_STL_IS_STLPORT)
-# define stlsoft_reverse_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-# else /* ? __STLSOFT_CF_STL_IS_STLPORT */
-# define stlsoft_reverse_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-# endif /* __STLSOFT_CF_STL_IS_STLPORT */
-#elif defined(__STLSOFT_COMPILER_IS_COMO)
-# define stlsoft_reverse_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-#elif defined(__STLSOFT_COMPILER_IS_GCC)
-# if __GNUC__ < 3
-# define stlsoft_reverse_iterator(I, T, R, P, D) ::reverse_iterator
-# else
-# define stlsoft_reverse_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-# endif /* __GNUC__ < 3 */
-#elif defined(__STLSOFT_COMPILER_IS_INTEL)
-# if defined(__STLSOFT_CF_STL_IS_STLPORT) || \
- defined(__STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES_1300)
-# define stlsoft_reverse_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-# else
-# define stlsoft_reverse_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-# endif /* __STLSOFT_CF_STL_IS_STLPORT || __STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES_1300 */
-#elif defined(__STLSOFT_COMPILER_IS_MWERKS)
-# define stlsoft_reverse_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-#elif defined(__STLSOFT_COMPILER_IS_MSVC)
-# if _MSC_VER >= 1310
-# define stlsoft_reverse_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-# elif defined(__STLSOFT_CF_STL_IS_STLPORT)
-# define stlsoft_reverse_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-# elif defined(__STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES_1300)
-# define stlsoft_reverse_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-# else
-# define stlsoft_reverse_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-# endif /* __STLSOFT_CF_STL_IS_STLPORT || __STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES_1300 */
-#elif defined(__STLSOFT_COMPILER_IS_WATCOM)
-# if defined(__STLSOFT_CF_STL_IS_STLPORT)
-# define stlsoft_reverse_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-# else
-# error Watcom is not supported independently of STLport
-# endif /* __STLSOFT_CF_STL_IS_STLPORT */
-#else
-# error Compiler not recognised
-#endif /* compiler */
-
-/* reverse_bidirectional_iterator */
-
-#if defined(__STLSOFT_COMPILER_IS_BORLAND)
-# define stlsoft_reverse_bidirectional_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-#elif defined(__STLSOFT_COMPILER_IS_CUSTOM) || \
- defined(__STLSOFT_COMPILER_IS_UNKNOWN)
-# define stlsoft_reverse_bidirectional_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_bidirectional_iterator)
-#elif defined(__STLSOFT_COMPILER_IS_DMC)
-# if defined(__STLSOFT_CF_STL_IS_STLPORT)
-# define stlsoft_reverse_bidirectional_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-# else /* ? __STLSOFT_CF_STL_IS_STLPORT */
-# define stlsoft_reverse_bidirectional_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_bidirectional_iterator)
-# endif /* __STLSOFT_CF_STL_IS_STLPORT */
-#elif defined(__STLSOFT_COMPILER_IS_COMO)
-# define stlsoft_reverse_bidirectional_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-#elif defined(__STLSOFT_COMPILER_IS_GCC)
-# if __GNUC__ < 3
-# define stlsoft_reverse_bidirectional_iterator(I, T, R, P, D) ::reverse_iterator
-# else
-# define stlsoft_reverse_bidirectional_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-# endif /* __GNUC__ < 3 */
-#elif defined(__STLSOFT_COMPILER_IS_MWERKS)
-# define stlsoft_reverse_bidirectional_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-#elif defined(__STLSOFT_COMPILER_IS_INTEL)
-# ifdef __STLSOFT_CF_STL_IS_STLPORT
-# define stlsoft_reverse_bidirectional_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-# else
-# define stlsoft_reverse_bidirectional_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_bidirectional_iterator)
-# endif /* __STLSOFT_CF_STL_IS_STLPORT */
-#elif defined(__STLSOFT_COMPILER_IS_MSVC)
-# ifdef __STLSOFT_CF_STL_IS_STLPORT
-# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION
-# define stlsoft_reverse_bidirectional_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-# else
-# define stlsoft_reverse_bidirectional_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_bidirectional_iterator)
-# endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */
-# else
-# define stlsoft_reverse_bidirectional_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_bidirectional_iterator)
-# endif /* __STLSOFT_CF_STL_IS_STLPORT */
-#elif defined(__STLSOFT_COMPILER_IS_WATCOM)
-# if defined(__STLSOFT_CF_STL_IS_STLPORT)
-# define stlsoft_reverse_bidirectional_iterator(I, T, R, P, D) stlsoft_ns_qual_std(reverse_iterator)
-# else
-# error Watcom is not supported independently of STLport
-# endif /* __STLSOFT_CF_STL_IS_STLPORT */
-#else
-# error Compiler not recognised
-#endif /* compiler */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Iterators
- */
-
-// class iterator_base
-/// Base type for iterator
types
-//
-/// This class abstract std::iterator functionality for deriving classes, hiding
-/// the inconsistencies and incompatibilities of the various compilers and/or
-/// libraries supported by the STLSoft libraries.
-///
-/// \param C The iterator category
-/// \param T The value type
-/// \param D The distance type
-/// \param P The pointer type
-/// \param R The reference type
-template< ss_typename_param_k C /* category */
- , ss_typename_param_k T /* type */
- , ss_typename_param_k D /* distance */
- , ss_typename_param_k P /* pointer */
- , ss_typename_param_k R /* reference */
- >
-struct iterator_base
-#if defined(__STLSOFT_COMPILER_IS_INTEL) || \
- defined(__STLSOFT_COMPILER_IS_MSVC)
- : public stlsoft_ns_qual_std(iterator)
-#elif defined(__STLSOFT_COMPILER_IS_MWERKS)
- : public stlsoft_ns_qual_std(iterator)
-#endif /* __STLSOFT_COMPILER_IS_MSVC */
-{
-#if defined(__STLSOFT_COMPILER_IS_INTEL) || \
- defined(__STLSOFT_COMPILER_IS_MSVC)
- typedef stlsoft_ns_qual_std(iterator) parent_class_type;
-#elif defined(__STLSOFT_COMPILER_IS_MWERKS)
- typedef stlsoft_ns_qual_std(iterator) parent_class_type;
-#endif /* __STLSOFT_COMPILER_IS_MSVC */
-
-public:
-#if defined(__STLSOFT_COMPILER_IS_INTEL) || \
- defined(__STLSOFT_COMPILER_IS_MSVC) || \
- defined(__STLSOFT_COMPILER_IS_MWERKS)
- typedef ss_typename_type_k parent_class_type::iterator_category iterator_category;
- typedef ss_typename_type_k parent_class_type::value_type value_type;
-# if ( defined(__STLSOFT_COMPILER_IS_INTEL) || \
- defined(__STLSOFT_COMPILER_IS_MSVC)) && \
- !defined(__STLSOFT_CF_STL_IS_STLPORT)
- typedef ss_typename_type_k parent_class_type::distance_type difference_type;
- typedef P pointer;
- typedef R reference;
-# else
- typedef ss_typename_type_k parent_class_type::difference_type difference_type;
- typedef ss_typename_type_k parent_class_type::pointer pointer;
- typedef ss_typename_type_k parent_class_type::reference reference;
-# endif /* __STLSOFT_COMPILER_IS_MSVC */
-
-#elif defined(__STLSOFT_COMPILER_IS_GCC) || \
- defined(__STLSOFT_COMPILER_IS_BORLAND)
-# if defined(__STLSOFT_COMPILER_IS_GCC)
-# if __GNUC__ < 3
- typedef __STD::input_iterator_tag iterator_category;
-# else
- typedef stlsoft_ns_qual_std(input_iterator_tag) iterator_category;
-# endif /* __GNUC__ < 3 */
-# elif defined(__STLSOFT_COMPILER_IS_BORLAND)
- typedef stlsoft_ns_qual_std(input_iterator_tag) iterator_category;
-# endif /* __STLSOFT_COMPILER_IS_GCC || __STLSOFT_COMPILER_IS_BORLAND */
- typedef T value_type;
- typedef D difference_type;
- typedef P pointer;
- typedef R reference;
-#else
- /* All other compilers. */
-# if defined(__STLSOFT_COMPILER_IS_CUSTOM) || \
- defined(__STLSOFT_COMPILER_IS_UNKNOWN) || \
- defined(__STLSOFT_COMPILER_IS_DMC)
- typedef C iterator_category;
- typedef T value_type;
- typedef D difference_type;
- typedef P pointer;
- typedef R reference;
-# elif defined(__STLSOFT_COMPILER_IS_WATCOM)
-# if defined(__STLSOFT_CF_STL_IS_STLPORT)
- typedef ss_typename_type_k parent_class_type::distance_type difference_type;
- typedef P pointer;
- typedef R reference;
-# else
-# error Watcom is not supported independently of STLport
-# endif /* __STLSOFT_CF_STL_IS_STLPORT */
-# else
-# error Compiler not supported
-# endif /* !__STLSOFT_COMPILER_IS_DMC */
-#endif /* __STLSOFT_COMPILER_IS_GCC || __STLSOFT_COMPILER_IS_BORLAND */
-
- /* These two are for compatibility with older non-standard implementations, and
- * will be benignly ignored by anything not requiring them.
- */
- typedef pointer pointer_type;
- typedef reference reference_type;
-};
-
-
-// reverse_iterator_base, const_reverse_iterator_base,
-// reverse_bidirectional_iterator_base and const_reverse_bidirectional_iterator_base
-//
-// These classes act as the base for reverse iterators, insulating deriving
-// classes from the inconsistencies and incompatibilities of the various
-// compilers and/or libraries supported by the STLSoft libraries.
-
-// class reverse_iterator_base
-/// Base type for reverse_iterator
types
-//
-/// This class acts as the base for reverse iterators, insulating deriving
-/// classes from the inconsistencies and incompatibilities of the various
-/// compilers and/or libraries supported by the STLSoft libraries.
-///
-/// \param I The iterator type
-/// \param T The value type
-/// \param R The reference type
-/// \param P The pointer type
-/// \param D The distance type
-template< ss_typename_param_k I
- , ss_typename_param_k T
- , ss_typename_param_k R
- , ss_typename_param_k P
- , ss_typename_param_k D
- >
-struct reverse_iterator_base
- : public stlsoft_reverse_iterator(I, T, R, P, D)
-{
-public:
- typedef stlsoft_reverse_iterator(I, T, R, P, D) parent_class_type;
-
- typedef ss_typename_type_k parent_class_type::iterator_category iterator_category;
- typedef ss_typename_type_k parent_class_type::value_type value_type;
-# if ( defined(__STLSOFT_COMPILER_IS_INTEL) || \
- defined(__STLSOFT_COMPILER_IS_MSVC)) && \
- _MSC_VER < 1300 && /* This is truly hideous, but since PJP doesn't put version numbers in the VC++ stl swill, we have no choice */ \
- !defined(__STLSOFT_CF_STL_IS_STLPORT)
- typedef ss_typename_type_k parent_class_type::distance_type difference_type;
- typedef ss_typename_type_k parent_class_type::pointer_type pointer;
- typedef ss_typename_type_k parent_class_type::reference_type reference;
-#else
- typedef ss_typename_type_k parent_class_type::difference_type difference_type;
- typedef ss_typename_type_k parent_class_type::pointer pointer;
- typedef ss_typename_type_k parent_class_type::reference reference;
-#endif /* __STLSOFT_COMPILER_IS_MSVC */
-
- /* These two are for compatibility with older non-standard implementations, and
- * will be benignly ignored by anything not requiring them.
- */
- typedef pointer pointer_type;
- typedef reference reference_type;
-
-// Construction
-public:
- /// Constructor
- ss_explicit_k reverse_iterator_base(I i)
- : parent_class_type(i)
- {}
-};
-
-// class const_reverse_iterator_base
-/// Base type for const_reverse_iterator
types
-//
-/// This class acts as the base for const reverse iterators, insulating deriving
-/// classes from the inconsistencies and incompatibilities of the various
-/// compilers and/or libraries supported by the STLSoft libraries.
-///
-/// \param I The iterator type
-/// \param T The value type
-/// \param R The reference type
-/// \param P The pointer type
-/// \param D The distance type
-template< ss_typename_param_k I
- , ss_typename_param_k T
- , ss_typename_param_k R
- , ss_typename_param_k P
- , ss_typename_param_k D
- >
-struct const_reverse_iterator_base
- : public stlsoft_reverse_iterator(I, T, R, P, D)
-{
-public:
- typedef stlsoft_reverse_iterator(I, T, R, P, D) parent_class_type;
-
- typedef ss_typename_type_k parent_class_type::iterator_category iterator_category;
- typedef ss_typename_type_k parent_class_type::value_type value_type;
-# if ( defined(__STLSOFT_COMPILER_IS_INTEL) || \
- defined(__STLSOFT_COMPILER_IS_MSVC)) && \
- _MSC_VER < 1300 && /* This is truly hideous, but since PJP doesn't put version numbers in the VC++ stl swill, we have no choice */ \
- !defined(__STLSOFT_CF_STL_IS_STLPORT)
- typedef ss_typename_type_k parent_class_type::distance_type difference_type;
- typedef ss_typename_type_k parent_class_type::pointer_type pointer;
- typedef ss_typename_type_k parent_class_type::reference_type reference;
-#else
- typedef ss_typename_type_k parent_class_type::difference_type difference_type;
- typedef ss_typename_type_k parent_class_type::pointer pointer;
- typedef ss_typename_type_k parent_class_type::reference reference;
-#endif /* __STLSOFT_COMPILER_IS_MSVC && __STLSOFT_CF_STL_IS_STLPORT */
-
- /* These two are for compatibility with older non-standard implementations, and
- * will be benignly ignored by anything not requiring them.
- */
- typedef pointer pointer_type;
- typedef reference reference_type;
-
-// Construction
-public:
- /// Constructor
- ss_explicit_k const_reverse_iterator_base(I i)
- : parent_class_type(i)
- {}
-};
-
-#ifdef __STLSOFT_CF_BIDIRECTIONAL_ITERATOR_SUPPORT
-
-// class reverse_bidirectional_iterator_base
-/// Base type for reverse_bidirectional_iterator
types
-//
-/// This class acts as the base for reverse bidirectional iterators,
-/// insulating deriving classes from the inconsistencies and incompatibilities
-/// of the various compilers and/or libraries supported by the STLSoft libraries.
-///
-/// \param I The iterator type
-/// \param T The value type
-/// \param R The reference type
-/// \param P The pointer type
-/// \param D The distance type
-template< ss_typename_param_k I
- , ss_typename_param_k T
- , ss_typename_param_k R
- , ss_typename_param_k P
- , ss_typename_param_k D
- >
-struct reverse_bidirectional_iterator_base
- : public stlsoft_reverse_bidirectional_iterator(I, T, R, P, D)
-{
-public:
- typedef stlsoft_reverse_bidirectional_iterator(I, T, R, P, D) parent_class_type;
-
- typedef ss_typename_type_k parent_class_type::iterator_category iterator_category;
- typedef ss_typename_type_k parent_class_type::value_type value_type;
-# if ( defined(__STLSOFT_COMPILER_IS_INTEL) || \
- defined(__STLSOFT_COMPILER_IS_MSVC)) && \
- _MSC_VER < 1300 && /* This is truly hideous, but since PJP doesn't put version numbers in the VC++ stl swill, we have no choice */ \
- !defined(__STLSOFT_CF_STL_IS_STLPORT)
- typedef ss_typename_type_k parent_class_type::distance_type difference_type;
- typedef ss_typename_type_k parent_class_type::pointer_type pointer;
- typedef ss_typename_type_k parent_class_type::reference_type reference;
-#else
- typedef ss_typename_type_k parent_class_type::difference_type difference_type;
- typedef ss_typename_type_k parent_class_type::pointer pointer;
- typedef ss_typename_type_k parent_class_type::reference reference;
-#endif /* __STLSOFT_COMPILER_IS_MSVC */
-
- /* These two are for compatibility with older non-standard implementations, and
- * will be benignly ignored by anything not requiring them.
- */
- typedef pointer pointer_type;
- typedef reference reference_type;
-
-// Construction
-public:
- /// Constructor
- ss_explicit_k reverse_bidirectional_iterator_base(I i)
- : parent_class_type(i)
- {}
-};
-
-// class const_reverse_bidirectional_iterator_base
-/// Base type for const_reverse_bidirectional_iterator
types
-//
-/// This class acts as the base for const reverse bidirectional iterators,
-/// insulating deriving classes from the inconsistencies and incompatibilities
-/// of the various compilers and/or libraries supported by the STLSoft libraries.
-///
-/// \param I The iterator type
-/// \param T The value type
-/// \param R The reference type
-/// \param P The pointer type
-/// \param D The distance type
-template< ss_typename_param_k I
- , ss_typename_param_k T
- , ss_typename_param_k R
- , ss_typename_param_k P
- , ss_typename_param_k D
- >
-struct const_reverse_bidirectional_iterator_base
- : public stlsoft_reverse_bidirectional_iterator(I, T, R, P, D)
-{
-public:
- typedef stlsoft_reverse_bidirectional_iterator(I, T, R, P, D) parent_class_type;
-
- typedef ss_typename_type_k parent_class_type::iterator_category iterator_category;
- typedef ss_typename_type_k parent_class_type::value_type value_type;
-# if ( defined(__STLSOFT_COMPILER_IS_INTEL) || \
- defined(__STLSOFT_COMPILER_IS_MSVC)) && \
- _MSC_VER < 1300 && /* This is truly hideous, but since PJP doesn't put version numbers in the VC++ stl swill, we have no choice */ \
- !defined(__STLSOFT_CF_STL_IS_STLPORT)
- typedef ss_typename_type_k parent_class_type::distance_type difference_type;
- typedef ss_typename_type_k parent_class_type::pointer_type pointer;
- typedef ss_typename_type_k parent_class_type::reference_type reference;
-#else
- typedef ss_typename_type_k parent_class_type::difference_type difference_type;
- typedef ss_typename_type_k parent_class_type::pointer pointer;
- typedef ss_typename_type_k parent_class_type::reference reference;
-#endif /* __STLSOFT_COMPILER_IS_MSVC && __STLSOFT_CF_STL_IS_STLPORT */
-
- /* These two are for compatibility with older non-standard implementations, and
- * will be benignly ignored by anything not requiring them.
- */
- typedef pointer pointer_type;
- typedef reference reference_type;
-
-// Construction
-public:
- /// Constructor
- ss_explicit_k const_reverse_bidirectional_iterator_base(I i)
- : parent_class_type(i)
- {}
-};
-
-#endif /* __STLSOFT_CF_BIDIRECTIONAL_ITERATOR_SUPPORT */
-
-// Random access iterator support
-
-#ifdef __STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES
-
-#ifndef _STLSOFT_NO_NAMESPACE
-} // namespace stlsoft
-#endif /* _STLSOFT_NO_NAMESPACE */
-
-template< ss_typename_param_k _Ty
- , ss_typename_param_k _Diff
- , ss_typename_param_k _Pointer
- , ss_typename_param_k _Reference
- , ss_typename_param_k _Pointer2
- , ss_typename_param_k _Reference2
- >
-class _Ptrit
-{
-public:
- typedef _Pointer iterator_type;
-
-private:
- char x[1024];
-};
-
-namespace std
-{
- namespace test_dinkumware
- {
- template< ss_typename_param_k T1
- , ss_typename_param_k T2
- , bool S
- >
- struct select_type
- {
- typedef T1 selected_type;
- };
-
-#ifdef __STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT
- template< ss_typename_param_k T1
- , ss_typename_param_k T2
- >
- struct select_type
- {
- typedef T2 selected_type;
- };
-#endif //# ifdef __STLSOFT_CF_TEMPLATE_PARTIAL_SPECIALISATION_SUPPORT
-
- template< class V
- , class P
- , class R
- >
- class _Ptrit_tdkw
- {
- typedef _Ptrit _Ptrit_type;
-
- public:
- typedef select_type<_Ptrit_type, P, sizeof(_Ptrit_type) < 1024>::selected_type iterator_type;
- };
-
- }
-}
-
-#ifndef _STLSOFT_NO_NAMESPACE
-namespace stlsoft
-{
-#endif /* _STLSOFT_NO_NAMESPACE */
-
-#endif /* !__STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES */
-
-/// Pointer iterator type
-///
-/// \param V The value type
-/// \param P The pointer type
-/// \param R The reference type
-template< ss_typename_param_k V
- , ss_typename_param_k P
- , ss_typename_param_k R
- >
-struct pointer_iterator
-{
-#if defined(__STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES) && \
- !defined(__STLSOFT_CF_STL_IS_STLPORT)
-# if defined(__STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES_1300)
- typedef std::test_dinkumware::_Ptrit_tdkw::iterator_type iterator_type;
-# else
- typedef P iterator_type;
-# endif /* __STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES_1300 */
-#elif defined(__STLSOFT_COMPILER_IS_MSVC) && \
- !defined(__STLSOFT_CF_STL_IS_STLPORT) && \
- defined(_XUTILITY_) && \
- _MSC_VER == 1300
- typedef std::_Ptrit iterator_type;
-#else
- typedef P iterator_type;
-#endif /* !__STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES */
-};
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#if defined(__STLSOFT_COMPILER_IS_DMC) && \
- !defined(__STLSOFT_CF_STL_IS_STLPORT)
-template< ss_typename_param_k V
- , ss_typename_param_k P
- , ss_typename_param_k R
- >
-inline random_access_iterator_tag iterator_category(pointer_iterator::iterator_type const &)
-{
- return random_access_iterator_tag();
-}
-
-template< ss_typename_param_k V
- , ss_typename_param_k P
- , ss_typename_param_k R
- >
-inline ptrdiff_t* distance_type(pointer_iterator::iterator_type const &)
-{
- return static_cast(0);
-}
-#endif /* __STLSOFT_COMPILER_IS_DMC && !__STLSOFT_CF_STL_IS_STLPORT */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-
-/// Iterator category obtainer
-///
-/// \param I The iterator type
-/// \param i The iterator instance
-
-#if defined(__STLSOFT_COMPILER_IS_DMC)
-# if defined(__STLSOFT_CF_STL_IS_STLPORT)
-# define stlsoft_iterator_query_category(I, i) (stlsoft_ns_qual_std(iterator_traits)::iterator_category())
-//# error Digital Mars with STLport not yet supported
-# else
-# define stlsoft_iterator_query_category(I, i) (stlsoft_ns_qual_std(iterator_category)(i))
-# endif /* */
-#elif defined(__STLSOFT_COMPILER_IS_INTEL)
-# if defined(__STLSOFT_CF_STL_IS_STLPORT)
-# define stlsoft_iterator_query_category(I, i) (stlsoft_ns_qual_std(iterator_traits)::iterator_category())
-# elif defined(__STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES)
-# define stlsoft_iterator_query_category(I, i) (stlsoft_ns_qual_std(_Iter_cat)(i))
-# else
-# error
-# endif /* */
-#elif defined(__STLSOFT_COMPILER_IS_MSVC)
-# if defined(__STLSOFT_CF_STL_IS_STLPORT)
-# if _MSC_VER < 1300
-# define stlsoft_iterator_query_category(I, i) (stlsoft_ns_qual_std(iterator_category)(i))
-# else
-# define stlsoft_iterator_query_category(I, i) (stlsoft_ns_qual_std(iterator_category)(i))
-# endif /* _MSC_VER < 1300 */
-# elif defined(__STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES)
-# define stlsoft_iterator_query_category(I, i) (stlsoft_ns_qual_std(_Iter_cat)(i))
-# elif(_MSC_VER >= 1310)
-# define stlsoft_iterator_query_category(I, i) (stlsoft_ns_qual_std(iterator_traits)::iterator_category())
-# elif(_MSC_VER >= 1200)
-# error
-# endif /* */
-#else
-# define stlsoft_iterator_query_category(I, i) (stlsoft_ns_qual_std(iterator_traits)::iterator_category())
-#endif /* __STLSOFT_CF_MIGHT_BE_DINKUMWARE_MS_NAUGHTIES && !__STLSOFT_CF_STL_IS_STLPORT */
-
-#if 0
-template
-struct queried_iterator_category
-{
-};
-
-template
-query_iterator_category
-#endif /* 0 */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#ifndef _STLSOFT_NO_NAMESPACE
-} // namespace stlsoft
-#endif /* _STLSOFT_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* _STLSOFT_INCL_H_STLSOFT_ITERATOR */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/stlsoft_lock_scope.h b/etc/c/stlsoft/stlsoft_lock_scope.h
deleted file mode 100644
index e71e5992b..000000000
--- a/etc/c/stlsoft/stlsoft_lock_scope.h
+++ /dev/null
@@ -1,237 +0,0 @@
-/* ////////////////////////////////////////////////////////////////////////////
- * File: stlsoft_lock_scope.h (originally MLLock.h, ::SynesisStd)
- *
- * Purpose: Synchronisation object lock scoping class.
- *
- * Created: 1st October 1994
- * Updated: 22nd November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/stlsoft
- * http://www.stlsoft.org/
- *
- * email: submissions@stlsoft.org for submissions
- * admin@stlsoft.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _STLSOFT_INCL_H_STLSOFT_LOCK_SCOPE
-#define _STLSOFT_INCL_H_STLSOFT_LOCK_SCOPE
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-#define _STLSOFT_VER_H_STLSOFT_LOCK_SCOPE_MAJOR 3
-#define _STLSOFT_VER_H_STLSOFT_LOCK_SCOPE_MINOR 0
-#define _STLSOFT_VER_H_STLSOFT_LOCK_SCOPE_REVISION 2
-#define _STLSOFT_VER_H_STLSOFT_LOCK_SCOPE_EDIT 89
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _STLSOFT_INCL_H_STLSOFT
-# include "stlsoft.h" // Include the STLSoft root header
-#endif /* !_STLSOFT_INCL_H_STLSOFT */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#ifndef _STLSOFT_NO_NAMESPACE
-namespace stlsoft
-{
-#endif /* _STLSOFT_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Classes
- */
-
-// class lock_traits
-
-/// Traits class for lockable objects
-///
-/// \param L The lockable class
-template
-struct lock_traits
-{
-public:
- /// The lockable type
- typedef L lock_type;
- /// The current parameterisation of this type
- typedef lock_traits class_type;
-
-// Operations
-public:
- /// Locks the given lockable instance
- static void lock(lock_type &c)
- {
- lock_instance(c);
- }
-
- /// Unlocks the given lockable instance
- static void unlock(lock_type &c)
- {
- unlock_instance(c);
- }
-};
-
-// class lock_invert_traits
-
-/// Traits class for inverting the lock status of lockable objects
-///
-/// \param L The lockable class
-template
-struct lock_invert_traits
-{
-public:
- /// The lockable type
- typedef L lock_type;
- /// The current parameterisation of this type
- typedef lock_invert_traits class_type;
-
-// Operations
-public:
- /// Unlocks the given lockable instance
- static void lock(lock_type &c)
- {
- unlock_instance(c);
- }
-
- /// Locks the given lockable instance
- static void unlock(lock_type &c)
- {
- lock_instance(c);
- }
-};
-
-// class lock_traits_inverter
-
-/// Traits inverter class for inverting the lock behaviour of lockable traits types
-///
-/// \param L The traits class
-template
-struct lock_traits_inverter
-{
-public:
- /// The traits type
- typedef T traits_type;
- /// The lockable type
- typedef ss_typename_type_k traits_type::lock_type lock_type;
- /// The current parameterisation of this type
- typedef lock_traits_inverter class_type;
-
-// Operations
-public:
- /// Unlocks the given lockable instance
- static void lock(lock_type &c)
- {
- traits_type::unlock(c);
- }
-
- /// Locks the given lockable instance
- static void unlock(lock_type &c)
- {
- traits_type::lock(c);
- }
-};
-
-// class lock_scope
-
-/// This class scopes the lock status of a lockable type
-///
-/// \param L The lockable type, e.g. stlsoft::null_mutex
-/// \param T The lock traits. On translators that support default template arguments this defaults to lock_traits
-template< ss_typename_param_k L
-#ifdef __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT
- , ss_typename_param_k T = lock_traits
-#else
- , ss_typename_param_k T
-#endif /* __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT */
- >
-class lock_scope
-{
-public:
- /// The lockable type
- typedef L lock_type;
- /// The traits type
- typedef T traits_type;
- /// The current parameterisation of this type
- typedef lock_scope class_type;
-
-// Construction
-public:
- /// Locks the lockable instance
- lock_scope(lock_type &l)
- : m_l(l)
- {
- traits_type::lock(m_l);
- }
- /// Unlocks the lockable instance
- ~lock_scope()
- {
- traits_type::unlock(m_l);
- }
-
-// Members
-private:
- lock_type &m_l;
-
-// Not to be implemented
-private:
- lock_scope(class_type const &rhs);
- lock_scope &operator =(class_type const &rhs);
-};
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#ifndef _STLSOFT_NO_NAMESPACE
-} // namespace stlsoft
-#endif /* _STLSOFT_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !_STLSOFT_INCL_H_STLSOFT_LOCK_SCOPE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/stlsoft_null.h b/etc/c/stlsoft/stlsoft_null.h
deleted file mode 100644
index c09cb4b04..000000000
--- a/etc/c/stlsoft/stlsoft_null.h
+++ /dev/null
@@ -1,240 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: stlsoft_null.h
- *
- * Purpose: NULL_v template class.
- *
- * Created: 8th September 2002
- * Updated: 24th November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/stlsoft
- * http://www.stlsoft.org/
- *
- * email: submissions@stlsoft.org for submissions
- * admin@stlsoft.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _STLSOFT_INCL_H_STLSOFT_NULL
-#define _STLSOFT_INCL_H_STLSOFT_NULL
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-#define _STLSOFT_VER_H_STLSOFT_NULL_MAJOR 1
-#define _STLSOFT_VER_H_STLSOFT_NULL_MINOR 6
-#define _STLSOFT_VER_H_STLSOFT_NULL_REVISION 1
-#define _STLSOFT_VER_H_STLSOFT_NULL_EDIT 19
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _STLSOFT_INCL_H_STLSOFT
-# include "stlsoft.h" // Include the STLSoft root header
-#endif /* !_STLSOFT_INCL_H_STLSOFT */
-
-/* _STLSOFT_NULL_v_DEFINED */
-
-#ifdef _STLSOFT_NULL_v_DEFINED
-# undef _STLSOFT_NULL_v_DEFINED
-#endif /* _STLSOFT_NULL_v_DEFINED */
-
-#define _STLSOFT_NULL_v_DEFINED
-
-#if defined(__STLSOFT_COMPILER_IS_DMC)
-//# if __DMC__ < 0x0832
-# undef _STLSOFT_NULL_v_DEFINED
-//# endif /* __DMC__ < 0x0832 */
-#elif defined(__STLSOFT_COMPILER_IS_MSVC) && \
- _MSC_VER < 1310
-# undef _STLSOFT_NULL_v_DEFINED
-#elif defined(__STLSOFT_COMPILER_IS_WATCOM)
-# undef _STLSOFT_NULL_v_DEFINED
-#endif /* compiler */
-
-/* _STLSOFT_NULL_v_DEFINED_PTR_TO_MEMBER_SUPPORT */
-
-#ifdef _STLSOFT_NULL_v_DEFINED_PTR_TO_MEMBER_SUPPORT
-# undef _STLSOFT_NULL_v_DEFINED_PTR_TO_MEMBER_SUPPORT
-#endif /* _STLSOFT_NULL_v_DEFINED_PTR_TO_MEMBER_SUPPORT */
-
-#define _STLSOFT_NULL_v_DEFINED_PTR_TO_MEMBER_SUPPORT
-
-#if defined(__STLSOFT_COMPILER_IS_GCC)
-# undef _STLSOFT_NULL_v_DEFINED_PTR_TO_MEMBER_SUPPORT
-#elif defined(__STLSOFT_COMPILER_IS_MWERKS)
-# undef _STLSOFT_NULL_v_DEFINED_PTR_TO_MEMBER_SUPPORT
-#endif /* compiler */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#ifndef _STLSOFT_NO_NAMESPACE
-namespace stlsoft
-{
-#endif /* _STLSOFT_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Classes
- */
-
-#ifdef _STLSOFT_NULL_v_DEFINED
-
-/// \brief Represents a type that can be an active replacement for NULL
-///
-/// This class can act as a replacement for the NULL macro, by being validly
-/// assigned to or equated with pointer types only, as in
-///
-/// int i = NULL; // error
-/// int *p = NULL; // OK
-///
-/// if(i == NULL) {} // error
-/// if(NULL == i) {} // error
-///
-/// if(p == NULL) {} // OK
-/// if(NULL == p) {} // OK
-///
-///
-/// When used via inclusion of the file stlsoft_nulldef.h, the macro NULL is
-/// redefined as NULL_v(), such that expressions containing NULL will be valid
-/// against pointers only.
-struct NULL_v
-{
-// Construction
-public:
- /// Default constructor
- NULL_v()
- {}
-
-/// Static creation
-public:
- static NULL_v create()
- {
- return NULL_v();
- }
-
-// Conversion
-public:
- /// Implicit conversion operator (convertible to any pointer type)
- ///
- /// \param T The type of the pointer to which an instance will be convertible
- template
- operator T *() const
- {
- return 0;
- }
-
-#ifdef _STLSOFT_NULL_v_DEFINED_PTR_TO_MEMBER_SUPPORT
- /// Implicit conversion operator (convertible to any pointer type)
- ///
- /// \param T The type of the pointer to which an instance will be convertible
- template
- operator T2 C::*() const
- {
- return 0;
- }
-#endif /* _STLSOFT_NULL_v_DEFINED_PTR_TO_MEMBER_SUPPORT */
-
- /// Evaluates whether an instance of a type is null
- ///
- /// \param rhs A reference arbitrary type which will be compared to null
- template
- ss_bool_t equals(T const &rhs) const
- {
- return rhs == 0;
- }
-
-// Not to be implemented
-private:
- void operator &() const;
-
- NULL_v(NULL_v const &);
- NULL_v const &operator =(NULL_v const &);
-};
-
-#if 1
-/// operator == for NULL_v and an arbitrary type
-template
-inline ss_bool_t operator ==(NULL_v const &lhs, T const &rhs)
-{
- return lhs.equals(rhs);
-}
-
-/// operator == for an arbitrary type and NULL_v
-template
-inline ss_bool_t operator ==(T const &lhs, NULL_v const &rhs)
-{
- return rhs.equals(lhs);
-}
-
-/// operator != for NULL_v and an arbitrary type
-template
-inline ss_bool_t operator !=(NULL_v const &lhs, T const &rhs)
-{
- return !lhs.equals(rhs);
-}
-
-/// operator != for an arbitrary type and NULL_v
-template
-inline ss_bool_t operator !=(T const &lhs, NULL_v const &rhs)
-{
- return !rhs.equals(lhs);
-}
-#endif /* 0 */
-
-#endif /* _STLSOFT_NULL_v_DEFINED */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#ifndef _STLSOFT_NO_NAMESPACE
-} // namespace stlsoft
-#endif /* _STLSOFT_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !_STLSOFT_INCL_H_STLSOFT_NULL */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/stlsoft_null_mutex.h b/etc/c/stlsoft/stlsoft_null_mutex.h
deleted file mode 100644
index f277aac4b..000000000
--- a/etc/c/stlsoft/stlsoft_null_mutex.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/* ////////////////////////////////////////////////////////////////////////////
- * File: stlsoft_null_mutex.h (originally MLMutex.h, ::SynesisStd)
- *
- * Purpose: Mutual exclusion model class.
- *
- * Date: 19th December 1997
- * Updated: 2nd July 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/stlsoft
- * http://www.stlsoft.org/
- *
- * email: submissions@stlsoft.org for submissions
- * admin@stlsoft.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _STLSOFT_INCL_H_STLSOFT_NULL_MUTEX
-#define _STLSOFT_INCL_H_STLSOFT_NULL_MUTEX
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-#define _STLSOFT_VER_H_STLSOFT_NULL_MUTEX_MAJOR 1
-#define _STLSOFT_VER_H_STLSOFT_NULL_MUTEX_MINOR 1
-#define _STLSOFT_VER_H_STLSOFT_NULL_MUTEX_REVISION 1
-#define _STLSOFT_VER_H_STLSOFT_NULL_MUTEX_EDIT 10
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _STLSOFT_INCL_H_STLSOFT
- #include "stlsoft.h" // Include the STLSoft root header
-#endif /* !_STLSOFT_INCL_H_STLSOFT */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#ifndef _STLSOFT_NO_NAMESPACE
-namespace stlsoft
-{
-#endif /* _STLSOFT_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Classes
- */
-
-// class null_mutex
-
-/// This class provides a null implementation of the mutex model
-class null_mutex
-{
-public:
- typedef null_mutex class_type;
-
-// Construction
-public:
- /// Creates an instance of the mutex
- null_mutex() stlsoft_throw_0()
- {}
-
-// Operations
-public:
- /// Acquires a lock on the mutex, pending the thread until the lock is aquired
- void lock() stlsoft_throw_0()
- {}
- /// Releases an aquired lock on the mutex
- void unlock() stlsoft_throw_0()
- {}
-
-// Not to be implemented
-private:
- null_mutex(class_type const &rhs);
- null_mutex &operator =(class_type const &rhs);
-};
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Control shims
- */
-
-/// \weakgroup concepts STLSoft Concepts
-
-/// \weakgroup concepts_shims Shims
-/// \ingroup concepts
-
-/// \weakgroup concepts_shims_sync_control Synchronisation Control Shims
-/// \ingroup concepts_shims
-/// \brief These \ref concepts_shims "shims" control the behaviour of synchronisation objects
-
-/// \defgroup stlsoft_sync_control_shims Synchronisation Control Shims (STLSoft)
-/// \ingroup STLSoft concepts_shims_sync_control
-/// \brief These \ref concepts_shims "shims" control the behaviour of synchronisation objects
-/// @{
-
-/// This control \ref concepts_shims "shim" aquires a lock on the given mutex
-///
-/// \param mx The mutex on which to aquire the lock
-inline void lock_instance(null_mutex &)
-{}
-
-/// This control ref concepts_shims "shim" releases a lock on the given mutex
-///
-/// \param mx The mutex on which to release the lock
-inline void unlock_instance(null_mutex &)
-{}
-
-/// @} // end of group stlsoft_sync_control_shims
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#ifndef _STLSOFT_NO_NAMESPACE
-} // namespace stlsoft
-#endif /* _STLSOFT_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !_STLSOFT_INCL_H_STLSOFT_NULL_MUTEX */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/stlsoft_nulldef.h b/etc/c/stlsoft/stlsoft_nulldef.h
deleted file mode 100644
index b7bfbc0b2..000000000
--- a/etc/c/stlsoft/stlsoft_nulldef.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: stlsoft_nulldef.h
- *
- * Purpose: Include for defining NULL to be the NULL_v template class.
- *
- * Created: 17th December 2002
- * Updated: 24th November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/stlsoft
- * http://www.stlsoft.org/
- *
- * email: submissions@stlsoft.org for submissions
- * admin@stlsoft.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _STLSOFT_INCL_H_STLSOFT_NULLDEF
-#define _STLSOFT_INCL_H_STLSOFT_NULLDEF
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-#define _STLSOFT_VER_H_STLSOFT_NULLDEF_MAJOR 1
-#define _STLSOFT_VER_H_STLSOFT_NULLDEF_MINOR 0
-#define _STLSOFT_VER_H_STLSOFT_NULLDEF_REVISION 5
-#define _STLSOFT_VER_H_STLSOFT_NULLDEF_EDIT 8
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _STLSOFT_INCL_H_STLSOFT
-# include "stlsoft.h" // Include the STLSoft root header
-#endif /* !_STLSOFT_INCL_H_STLSOFT */
-#ifndef _STLSOFT_INCL_H_STLSOFT_NULL
-# include "stlsoft_null.h" // Include the STLSoft root header
-#endif /* !_STLSOFT_INCL_H_STLSOFT_NULL */
-
-#include // Always make sure that this is included, irrespective of
- // its potential inclusion within stlsoft.h
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Definitions
- */
-
-#ifndef NULL
-# ifdef _STLSOFT_COMPILE_VERBOSE
-# pragma message("NULL not defined. This is potentially dangerous. You are advised to include its defining header before stlsoft_nulldef.h")
-# endif /* _STLSOFT_COMPILE_VERBOSE */
-#endif /* !NULL */
-
-#ifdef _STLSOFT_NULL_v_DEFINED
-# ifdef __cplusplus
-# ifdef NULL
-# undef NULL
-# endif /* NULL */
- /// \def NULL
- ///
- /// By including this file, \c NULL is (re-)defined to be stlsoft::NULL_v()
- /// which means that any use of \c NULL must be with pointer types.
-# define NULL stlsoft_ns_qual(NULL_v)::create()
-# endif /* __cplusplus */
-#endif /* _STLSOFT_NULL_v_DEFINED */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !_STLSOFT_INCL_H_STLSOFT_NULLDEF */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/stlsoft_static_initialisers.h b/etc/c/stlsoft/stlsoft_static_initialisers.h
deleted file mode 100644
index fe0e60a7d..000000000
--- a/etc/c/stlsoft/stlsoft_static_initialisers.h
+++ /dev/null
@@ -1,255 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: stlsoft_static_initialisers.h (formerly MLClsCtr.h, ::SynesisStd)
- *
- * Purpose: Class constructor.
- *
- * Created: 17th February 1997
- * Updated: 26th November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/stlsoft
- * http://www.stlsoft.org/
- *
- * email: submissions@stlsoft.org for submissions
- * admin@stlsoft.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _STLSOFT_INCL_H_STLSOFT_STATIC_INITIALISERS
-#define _STLSOFT_INCL_H_STLSOFT_STATIC_INITIALISERS
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-# define _STLSOFT_VER_H_STLSOFT_STATIC_INITIALISERS_MAJOR 1
-# define _STLSOFT_VER_H_STLSOFT_STATIC_INITIALISERS_MINOR 8
-# define _STLSOFT_VER_H_STLSOFT_STATIC_INITIALISERS_REVISION 2
-# define _STLSOFT_VER_H_STLSOFT_STATIC_INITIALISERS_EDIT 191
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _STLSOFT_INCL_H_STLSOFT
-# include "stlsoft.h" // Include the STLSoft root header
-#endif /* !_STLSOFT_INCL_H_STLSOFT */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#ifndef _STLSOFT_NO_NAMESPACE
-namespace stlsoft
-{
-#endif /* _STLSOFT_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Classes
- */
-
-#if 0
-class method_constructor
-{
-public:
- template
- method_constructor(T const &t, void (T::*const fn)())
- {
- (t.*fn)();
- }
- template
- method_constructor(T const &t, R (T::*const fn)())
- {
- (t.*fn)();
- }
-};
-#endif /* 0 */
-
-/// static_initialiser
-///
-/// Initialises any non-class function or type
-class static_initialiser
-{
-public:
- typedef static_initialiser class_type;
-
-/// \name Constructors
-//@{
-public:
-#ifdef __STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT
- template
- static_initialiser(T const &/* t */)
- {}
- template
- static_initialiser(T const * /* pt */)
- {}
-#else
- static_initialiser(int /* t */)
- {}
- static_initialiser(void const * /* pt */)
- {}
-#endif // __STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT
-//@}
-
-/// \name Not to be implemented
-//@{
-private:
- static_initialiser(class_type const &);
- static_initialiser &operator =(class_type const &);
-
-#ifdef __STLSOFT_COMPILER_IS_COMO
- void *operator new(ss_size_t) stlsoft_throw_0()
- {
- return 0;
- }
-#else /* ? __STLSOFT_COMPILER_IS_COMO */
- void *operator new(ss_size_t) stlsoft_throw_0();
-#endif /* __STLSOFT_COMPILER_IS_COMO */
- void operator delete(void *)
- {}
-//@}
-};
-
-
-class api_constructor
-{
-/// \name Constructors
-//@{
-public:
- api_constructor(void (*pfnInit)(), void (*pfnUninit)())
- : m_pfnUninit(pfnUninit)
- {
- if(NULL != pfnInit)
- {
- (*pfnInit)();
- }
- }
- ~api_constructor()
- {
- if(NULL != m_pfnUninit)
- {
- (*m_pfnUninit)();
- }
- }
-//@}
-
-/// \name Members
-//@{
-private:
- void (*m_pfnUninit)(void);
-//@}
-
-/// \name Not to be implemented
-//@{
-private:
- api_constructor(api_constructor const &);
- api_constructor &operator =(api_constructor const &);
-
-#ifdef __STLSOFT_COMPILER_IS_COMO
- void *operator new(ss_size_t) stlsoft_throw_0()
- {
- return 0;
- }
-#else /* ? __STLSOFT_COMPILER_IS_COMO */
- void *operator new(ss_size_t) stlsoft_throw_0();
-#endif /* __STLSOFT_COMPILER_IS_COMO */
- void operator delete(void *)
- {}
-//@}
-};
-
-template
-class class_constructor
- : protected api_constructor
-{
-/// \name Member types
-//@{
-public:
- typedef void (*class_init_fn_t)();
- typedef void (*class_uninit_fn_t)();
-
-//@}
-
-/// \name Constructors
-//@{
-public:
- ss_explicit_k class_constructor()
- : api_constructor(&T::class_init, &T::class_uninit)
- {}
-
- ss_explicit_k class_constructor( class_init_fn_t pfnInit
- , class_uninit_fn_t pfnUninit)
- : api_constructor(pfnInit, pfnUninit)
- {}
-//@}
-
-/// \name Not to be implemented
-//@{
-private:
- class_constructor(class_constructor const &);
- class_constructor &operator =(class_constructor const &);
-
-#ifdef __STLSOFT_COMPILER_IS_COMO
- void *operator new(ss_size_t) stlsoft_throw_0()
- {
- return 0;
- }
-#else /* ? __STLSOFT_COMPILER_IS_COMO */
- void *operator new(ss_size_t) stlsoft_throw_0();
-#endif /* __STLSOFT_COMPILER_IS_COMO */
- void operator delete(void *)
- {}
-//@}
-};
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#ifndef _STLSOFT_NO_NAMESPACE
-} // namespace stlsoft
-#endif /* _STLSOFT_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !_STLSOFT_INCL_H_STLSOFT_STATIC_INITIALISERS */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/unixstl.h b/etc/c/stlsoft/unixstl.h
deleted file mode 100644
index 13f03e107..000000000
--- a/etc/c/stlsoft/unixstl.h
+++ /dev/null
@@ -1,436 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: unixstl.h
- *
- * Purpose: Root header for the UNIXSTL libraries. Performs various compiler
- * and platform discriminations, and definitions of types.
- *
- * Created: 15th January 2002
- * Updated: 16th October 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/unixstl
- * http://www.unixstl.org/
- *
- * email: submissions@unixstl.org for submissions
- * admin@unixstl.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _UNIXSTL_INCL_H_UNIXSTL
-#define _UNIXSTL_INCL_H_UNIXSTL
-
-/* File version */
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-#define _UNIXSTL_VER_H_UNIXSTL_MAJOR 1
-#define _UNIXSTL_VER_H_UNIXSTL_MINOR 5
-#define _UNIXSTL_VER_H_UNIXSTL_REVISION 2
-#define _UNIXSTL_VER_H_UNIXSTL_EDIT 28
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/** \file unixstl.h The root header for the \ref UNIXSTL project */
-
-/** \weakgroup projects STLSoft Projects
- *
- * \brief The Projects that comprise the STLSoft libraries
- */
-
-/** \defgroup UNIXSTL UNIXSTL
- * \ingroup projects
- *
- * \brief
Template Software for the UNIX Operating System
- *
- * The philosophy of UNIXSTL (http://unixstl.org/) is essentially the same as that
- * of the STLSoft (http://stlsoft.org/) organisation: providing robust and
- * lightweight software to the UNIX development
- * community. UNIXSTL provides template-based software that builds on that
- * provided by UNIX and STLSoft in order to reduce programmer effort and increase
- * robustness in the use of the UNIX.
- *
- * Namespaces
- *
- * The UNIXSTL namespace unixstl
is actually an alias for the
- * namespace stlsoft::unixstl_project
, and as such all the
- * UNIXSTL project components actually reside within the
- * stlsoft
namespace. However, there is never any need to
- * use the stlsoft::unixstl_project
namespace in your code,
- * and you should always use the alias unixstl
.
- *
- * Dependencies
- *
- * As with all parts of the STLSoft libraries, there are no
- * dependencies on UNIXSTL binary components and no need to compile UNIXSTL
- * implementation files; UNIXSTL is 100% header-only!
- *
- * As with most of the STLSoft sub-projects, UNIXSTL depends only on:
- *
- * - Selected headers from the C standard library, such as wchar.h
- * - Selected headers from the C++ standard library, such as new
, functional
- * - Selected header files of the STLSoft main project
- * - The header files particular to the technology area, in this case the UNIX library headers, such as dirent.h
- * - The binary (static and dynamic libraries) components particular to the technology area, in this case the UNIX libraries that ship with the operating system and your compiler(s)
- */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * UNIXSTL version
- *
- * The libraries version information is comprised of major, minor and revision
- * components.
- *
- * The major version is denoted by the _UNIXSTL_VER_MAJOR preprocessor symbol.
- * A changes to the major version component implies that a dramatic change has
- * occurred in the libraries, such that considerable changes to source dependent
- * on previous versions would need to be effected.
- *
- * The minor version is denoted by the _UNIXSTL_VER_MINOR preprocessor symbol.
- * Changes to the minor version component imply that a significant change has
- * occurred to the libraries, either in the addition of new functionality or in
- * the destructive change to one or more components such that recomplilation and
- * code change may be necessitated.
- *
- * The revision version is denoted by the _UNIXSTL_VER_REVISIO preprocessor
- * symbol. Changes to the revision version component imply that a bug has been
- * fixed. Dependent code should be recompiled in order to pick up the changes.
- *
- * In addition to the individual version symbols - _UNIXSTL_VER_MAJOR,
- * _UNIXSTL_VER_MINOR and _UNIXSTL_VER_REVISION - a composite symbol _UNIXSTL_VER
- * is defined, where the upper 8 bits are 0, bits 16-23 represent the major
- * component, bits 8-15 represent the minor component, and bits 0-7 represent
- * the revision component.
- *
- * Each release of the libraries will bear a different version, and that version
- * will also have its own symbol: Version 1.0.1 specifies _UNIXSTL_VER_1_0_1.
- *
- * Thus the symbol _UNIXSTL_VER may be compared meaningfully with a specific
- * version symbol, e.g. #if _UNIXSTL_VER >= _UNIXSTL_VER_1_0_1
- */
-
-/// \def _UNIXSTL_VER_MAJOR
-/// The major version number of UNIXSTL
-
-/// \def _UNIXSTL_VER_MINOR
-/// The minor version number of UNIXSTL
-
-/// \def _UNIXSTL_VER_REVISION
-/// The revision version number of UNIXSTL
-
-/// \def _UNIXSTL_VER
-/// The current composite version number of UNIXSTL
-
-#define _UNIXSTL_VER_MAJOR 1
-#define _UNIXSTL_VER_MINOR 1
-#define _UNIXSTL_VER_REVISION 1
-#define _UNIXSTL_VER_0_9_1 0x00000901 /*!< Version 0.9.1 */
-#define _UNIXSTL_VER_0_9_2 0x00000902 /*!< Version 0.9.2 */
-#define _UNIXSTL_VER_1_0_1 0x00010001 /*!< Version 1.0.1 */
-#define _UNIXSTL_VER_1_0_2 0x00010002 /*!< Version 1.0.2 */
-#define _UNIXSTL_VER_1_0_3 0x00010003 /*!< Version 1.0.3 */
-#define _UNIXSTL_VER_1_1_1 0x00010101 /*!< Version 1.1.1 */
-
-#define _UNIXSTL_VER _UNIXSTL_VER_1_1_1
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _STLSOFT_INCL_H_STLSOFT
- #include "stlsoft.h" // Include the STLSoft root header
-#endif /* !_STLSOFT_INCL_H_STLSOFT */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * STLSoft version compatibility
- */
-
-#if !defined(_STLSOFT_VER_1_5_1) || \
- _STLSOFT_VER < _STLSOFT_VER_1_5_1
- #error This version of the UNIXSTL libraries requires STLSoft version 1.5.1 or later
-#endif /* _STLSOFT_VER < _STLSOFT_VER_1_5_1 */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Compiler compatibility
- *
- * Currently the only compilers supported by the UNIXSTL libraries are
- *
- * GCC 2.95, 2.96, 3.2
- * Intel C/C++ 6.0 & 7.0
- */
-
-#if defined(__STLSOFT_COMPILER_IS_GCC)
-/* GNU C/C++ */
- #if __GNUC__ < 2 || \
- ( __GNUC__ == 2 && \
- __GNUC_MINOR__ < 95)
- #error Versions of GNU C/C++ prior to 2.95 are not supported by the UNIXSTL libraries
- #endif /* __GNUC__ */
-
-#elif defined(__STLSOFT_COMPILER_IS_INTEL)
-/* Intel C++ */
- #if (__INTEL_COMPILER < 700)
- #error Versions of Intel C++ prior to 7.0 are not supported by the UNIXSTL libraries
- #endif /* __INTEL_COMPILER */
-
-#else
-/* No recognised compiler */
-# ifdef _STLSOFT_FORCE_ANY_COMPILER
-# define _UNIXSTL_COMPILER_IS_UNKNOWN
-# ifdef _STLSOFT_COMPILE_VERBOSE
-# pragma message("Compiler is unknown to UNIXSTL")
-# endif /* _STLSOFT_COMPILE_VERBOSE */
-# else
-# error Currently only GNU C/C++ compiler supported by the UNIXSTL libraries
-# endif /* _STLSOFT_FORCE_ANY_COMPILER */
-#endif /* compiler */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Debugging
- *
- * The macro unixstl_assert provides standard debug-mode assert functionality.
- */
-
-/// Defines a runtime assertion
-///
-/// \param _x Must be non-zero, or an assertion will be fired
-#define unixstl_assert(_x) stlsoft_assert(_x)
-
-/// Defines a runtime assertion, with message
-///
-/// \param _x Must be non-zero, or an assertion will be fired
-/// \param _m The literal character string message to be included in the assertion
-#define unixstl_message_assert(_m, _x) stlsoft_message_assert(_m, _x)
-
-/// Defines a compile-time assertion
-///
-/// \param _x Must be non-zero, or compilation will fail
-#define unixstl_static_assert(_x) stlsoft_static_assert(_x)
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- *
- * The UNIXSTL components are contained within the unixstl namespace. This is
- * usually an alias for stlsoft::unixstl_project,
- *
- * When compilers support namespaces they are defined by default. They can be
- * undefined using a cascasing system, as follows:
- *
- * If _STLSOFT_NO_NAMESPACES is defined, then _UNIXSTL_NO_NAMESPACES is defined.
- *
- * If _UNIXSTL_NO_NAMESPACES is defined, then _UNIXSTL_NO_NAMESPACE is defined.
- *
- * If _UNIXSTL_NO_NAMESPACE is defined, then the UNIXSTL constructs are defined
- * in the global scope.
- *
- * If _STLSOFT_NO_NAMESPACES, _UNIXSTL_NO_NAMESPACES and _UNIXSTL_NO_NAMESPACE are
- * all undefined but the symbol _STLSOFT_NO_NAMESPACE is defined (whence the
- * namespace stlsoft does not exist), then the UNIXSTL constructs are defined
- * within the unixstl namespace. The definition matrix is as follows:
- *
- * _STLSOFT_NO_NAMESPACE _UNIXSTL_NO_NAMESPACE unixstl definition
- * --------------------- -------------------- -----------------
- * not defined not defined = stlsoft::unixstl_project
- * not defined defined not defined
- * defined not defined unixstl
- * defined defined not defined
- *
- *
- *
- * The macro unixstl_ns_qual() macro can be used to refer to elements in the
- * UNIXSTL libraries irrespective of whether they are in the
- * stlsoft::unixstl_project (or unixstl) namespace or in the global namespace.
- *
- * Furthermore, some compilers do not support the standard library in the std
- * namespace, so the unixstl_ns_qual_std() macro can be used to refer to elements
- * in the UNIXSTL libraries irrespective of whether they are in the std namespace
- * or in the global namespace.
- */
-
-/* No STLSoft namespaces means no UNIXSTL namespaces */
-#ifdef _STLSOFT_NO_NAMESPACES
- #define _UNIXSTL_NO_NAMESPACES
-#endif /* _STLSOFT_NO_NAMESPACES */
-
-/* No UNIXSTL namespaces means no unixstl namespace */
-#ifdef _UNIXSTL_NO_NAMESPACES
- #define _UNIXSTL_NO_NAMESPACE
-#endif /* _UNIXSTL_NO_NAMESPACES */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
- #ifdef _STLSOFT_NO_NAMESPACE
-/* There is no stlsoft namespace, so must define ::unixstl */
-namespace unixstl
-{
- #else
-/* Define stlsoft::unixstl_project */
-
-namespace stlsoft
-{
-
-/// The UNIXSTL namespace - \c unixstl (aliased to \c stlsoft::unixstl_project) - is
-/// the namespace for the UNIXSTL project.
-namespace unixstl_project
-{
-
- #endif /* _STLSOFT_NO_NAMESPACE */
-#else
-stlsoft_ns_using(move_lhs_from_rhs)
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-/// \def unixstl_ns_qual(x)
-/// Qualifies with unixstl:: if UNIXSTL is using namespaces or, if not, does not qualify
-
-/// \def unixstl_ns_using(x)
-/// Declares a using directive (with respect to unixstl) if UNIXSTL is using namespaces or, if not, does nothing
-
-#ifndef _UNIXSTL_NO_NAMESPACE
- #define unixstl_ns_qual(x) ::unixstl::x
- #define unixstl_ns_using(x) using ::unixstl::x;
-#else
- #define unixstl_ns_qual(x) x
- #define unixstl_ns_using(x)
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-/// \def unixstl_ns_qual_std(x)
-/// Qualifies with std:: if UNIXSTL is being translated in the context of the standard library being within the std namespace or, if not, does not qualify
-
-/// \def unixstl_ns_using_std(x)
-/// Declares a using directive (with respect to std) if UNIXSTL is being translated in the context of the standard library being within the std namespace or, if not, does nothing
-
-#ifdef __STLSOFT_CF_std_NAMESPACE
- #define unixstl_ns_qual_std(x) ::std::x
- #define unixstl_ns_using_std(x) using ::std::x;
-#else
- #define unixstl_ns_qual_std(x) x
- #define unixstl_ns_using_std(x)
-#endif /* !__STLSOFT_CF_std_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Typedefs
- *
- * The UNIXSTL uses a number of typedefs to aid in compiler-independence in the
- * libraries' main code.
- */
-
-typedef stlsoft_ns_qual(ss_char_a_t) us_char_a_t; //!< Ansi char type
-typedef stlsoft_ns_qual(ss_char_w_t) us_char_w_t; //!< Unicode char type
-typedef stlsoft_ns_qual(ss_sint8_t) us_sint8_t; //!< 8-bit signed integer
-typedef stlsoft_ns_qual(ss_uint8_t) us_uint8_t; //!< 8-bit unsigned integer
-typedef stlsoft_ns_qual(ss_int16_t) us_int16_t; //!< 16-bit integer
-typedef stlsoft_ns_qual(ss_sint16_t) us_sint16_t; //!< 16-bit signed integer
-typedef stlsoft_ns_qual(ss_uint16_t) us_uint16_t; //!< 16-bit unsigned integer
-typedef stlsoft_ns_qual(ss_int32_t) us_int32_t; //!< 32-bit integer
-typedef stlsoft_ns_qual(ss_sint32_t) us_sint32_t; //!< 32-bit signed integer
-typedef stlsoft_ns_qual(ss_uint32_t) us_uint32_t; //!< 32-bit unsigned integer
-#ifdef __STLSOFT_CF_NATIVE_64BIT_INTEGER_SUPPORT
-typedef stlsoft_ns_qual(ss_int64_t) us_int64_t; //!< 64-bit integer
-typedef stlsoft_ns_qual(ss_sint64_t) us_sint64_t; //!< 64-bit signed integer
-typedef stlsoft_ns_qual(ss_uint64_t) us_uint64_t; //!< 64-bit unsigned integer
-#endif /* __STLSOFT_CF_NATIVE_64BIT_INTEGER_SUPPORT */
-typedef stlsoft_ns_qual(ss_int_t) us_int_t; //!< integer
-typedef stlsoft_ns_qual(ss_sint_t) us_sint_t; //!< signed integer
-typedef stlsoft_ns_qual(ss_uint_t) us_uint_t; //!< unsigned integer
-typedef stlsoft_ns_qual(ss_long_t) us_long_t; //!< long
-typedef stlsoft_ns_qual(ss_bool_t) us_bool_t; //!< bool
-typedef stlsoft_ns_qual(ss_size_t) us_size_t; //!< size
-typedef stlsoft_ns_qual(ss_ptrdiff_t) us_ptrdiff_t; //!< ptr diff
-typedef stlsoft_ns_qual(ss_streampos_t) us_streampos_t; //!< streampos
-typedef stlsoft_ns_qual(ss_streamoff_t) us_streamoff_t; //!< streamoff
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-/* /////////////////////////////////////////////////////////////////////////////
- * Values
- *
- * Since the boolean type may not be supported natively on all compilers, the
- * values of true and false may also not be provided. Hence the values of
- * us_true_v and us_false_v are defined, and are used in all code.
- */
-
-#define us_true_v ss_true_v
-#define us_false_v ss_false_v
-
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-/* /////////////////////////////////////////////////////////////////////////////
- * Code modification macros
- */
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-/* Exception signatures. */
-#define unixstl_throw_0() stlsoft_throw_0()
-#define unixstl_throw_1(x1) stlsoft_throw_1(x1)
-#define unixstl_throw_2(x1, x2) stlsoft_throw_2(x1, x2)
-#define unixstl_throw_3(x1, x2, x3) stlsoft_throw_3(x1, x2, x3)
-#define unixstl_throw_4(x1, x2, x3, x4) stlsoft_throw_4(x1, x2, x3, x4)
-#define unixstl_throw_5(x1, x2, x3, x4, x5) stlsoft_throw_5(x1, x2, x3, x4, x5)
-#define unixstl_throw_6(x1, x2, x3, x4, x5, x6) stlsoft_throw_6(x1, x2, x3, x4, x5, x6)
-#define unixstl_throw_7(x1, x2, x3, x4, x5, x6, x7) stlsoft_throw_7(x1, x2, x3, x4, x5, x6, x7)
-#define unixstl_throw_8(x1, x2, x3, x4, x5, x6, x7, x8) stlsoft_throw_8(x1, x2, x3, x4, x5, x6, x7, x8)
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/// Evaluates, at compile time, to the number of elements within the given vector entity
-#define unixstl_num_elements(_x) stlsoft_num_elements(_x)
-
-/// Destroys the given instance \c p of the given type (\c t and \c _type)
-#define unixstl_destroy_instance(t, _type, p) stlsoft_destroy_instance(t, _type, p)
-
-/// Generates an opaque type with the name \c _htype
-#define unixstl_gen_opaque(_htype) stlsoft_gen_opaque(_htype)
-
-/// Define a 'final' class, ie. one that cannot be inherited from
-#define unixstl_sterile_class(_cls) stlsoft_sterile_class(_cls)
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
- #ifdef _STLSOFT_NO_NAMESPACE
-} // namespace unixstl
- #else
-} // namespace unixstl_project
-} // namespace stlsoft
-namespace unixstl = ::stlsoft::unixstl_project;
- #endif /* _STLSOFT_NO_NAMESPACE */
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !_UNIXSTL_INCL_H_UNIXSTL */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/unixstl_current_directory.h b/etc/c/stlsoft/unixstl_current_directory.h
deleted file mode 100644
index ca6cbc259..000000000
--- a/etc/c/stlsoft/unixstl_current_directory.h
+++ /dev/null
@@ -1,251 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: unixstl_current_directory.h
- *
- * Purpose: Simple class that gets, and makes accessible, the current
- * directory.
- *
- * Created: 1st November 2003
- * Updated: 2nd November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/unixstl
- * http://www.unixstl.org/
- *
- * email: submissions@unixstl.org for submissions
- * admin@unixstl.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _UNIXSTL_INCL_H_UNIXSTL_CURRENT_DIRECTORY
-#define _UNIXSTL_INCL_H_UNIXSTL_CURRENT_DIRECTORY
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-#define _UNIXSTL_VER_H_UNIXSTL_CURRENT_DIRECTORY_MAJOR 1
-#define _UNIXSTL_VER_H_UNIXSTL_CURRENT_DIRECTORY_MINOR 0
-#define _UNIXSTL_VER_H_UNIXSTL_CURRENT_DIRECTORY_REVISION 2
-#define _UNIXSTL_VER_H_UNIXSTL_CURRENT_DIRECTORY_EDIT 2
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _UNIXSTL_INCL_H_UNIXSTL
-# include "unixstl.h" // Include the WinSTL root header
-#endif /* !_UNIXSTL_INCL_H_UNIXSTL */
-#ifndef _UNIXSTL_INCL_H_UNIXSTL_FILESYSTEM_TRAITS
-# include "unixstl_filesystem_traits.h" // file_traits
-#endif /* !_UNIXSTL_INCL_H_UNIXSTL_FILESYSTEM_TRAITS */
-#include
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
-# ifdef _STLSOFT_NO_NAMESPACE
-/* There is no stlsoft namespace, so must define ::unixstl */
-namespace unixstl
-{
-# else
-/* Define stlsoft::unixstl_project */
-
-namespace stlsoft
-{
-
-namespace unixstl_project
-{
-
-# endif /* _STLSOFT_NO_NAMESPACE */
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-/// \weakgroup libraries STLSoft Libraries
-/// \brief The individual libraries
-
-/// \weakgroup libraries_filesystem File-System Library
-/// \ingroup libraries
-/// \brief This library provides facilities for defining and manipulating file-system objects
-
-/// \weakgroup unixstl_filesystem_library File-System Library (WinSTL)
-/// \ingroup WinSTL libraries_filesystem
-/// \brief This library provides facilities for defining and manipulating file-system objects for the Win32 API
-/// @{
-
-/* /////////////////////////////////////////////////////////////////////////////
- * basic_current_directory
- *
- * This class wraps the GetCurrentDirectory() API function, and effectively acts
- * as a C-string of its value.
- */
-
-/// Represents the current directory
-///
-/// \param C The character type
-/// \param T The traits type. On translators that support default template arguments, this defaults to filesystem_traits
-template< ss_typename_param_k C
-#ifdef __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT
- , ss_typename_param_k T = filesystem_traits
-#else
- , ss_typename_param_k T /* = filesystem_traits */
-#endif /* __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT */
- >
-class basic_current_directory
-{
-public:
- /// The char type
- typedef C char_type;
- /// The traits type
- typedef T traits_type;
- /// The current parameterisation of the type
- typedef basic_current_directory class_type;
- /// The size type
- typedef us_size_t size_type;
-
-// Construction
-public:
- /// Default constructor
- basic_current_directory();
-
-// Operations
-public:
- /// Gets the current directory into the given buffer
- static size_type get_path(char_type *buffer, size_type cchBuffer);
-
-// Attributes
-public:
- /// Returns a non-mutable (const) pointer to the path
- char_type const *get_path() const;
- /// Returns the length of the converted path
- size_type length() const;
-
-// Conversions
-public:
- /// Implicit conversion to a non-mutable (const) pointer to the path
- operator char_type const *() const
- {
- return get_path();
- }
-
-// Members
-private:
- char_type m_dir[1 + PATH_MAX];
- size_type const m_len;
-
-// Not to be implemented
-private:
- basic_current_directory(const class_type &);
- basic_current_directory &operator =(const class_type &);
-};
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Typedefs for commonly encountered types
- */
-
-/// Instantiation of the basic_current_directory template for the ANSI character type \c char
-typedef basic_current_directory > current_directory_a;
-/// Instantiation of the basic_current_directory template for the Unicode character type \c wchar_t
-typedef basic_current_directory > current_directory_w;
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Implementation
- */
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-
-template< ss_typename_param_k C
- , ss_typename_param_k T
- >
-inline basic_current_directory::basic_current_directory()
- : m_len(get_path(m_dir, unixstl_num_elements(m_dir)))
-{}
-
-template< ss_typename_param_k C
- , ss_typename_param_k T
- >
-inline /* static */ ss_typename_type_k basic_current_directory::size_type basic_current_directory::get_path(ss_typename_type_k basic_current_directory::char_type *buffer, ss_typename_type_k basic_current_directory::size_type cchBuffer)
-{
- return static_cast(traits_type::get_current_directory(cchBuffer, buffer));
-}
-
-template< ss_typename_param_k C
- , ss_typename_param_k T
- >
-inline ss_typename_type_k basic_current_directory::char_type const *basic_current_directory::get_path() const
-{
- return m_dir;
-}
-
-template< ss_typename_param_k C
- , ss_typename_param_k T
- >
-inline ss_typename_type_k basic_current_directory::size_type basic_current_directory::length() const
-{
- return m_len;
-}
-
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-/// @} // end of group unixstl_filesystem_library
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
-# ifdef _STLSOFT_NO_NAMESPACE
-} // namespace unixstl
-# else
-} // namespace unixstl_project
-} // namespace stlsoft
-# endif /* _STLSOFT_NO_NAMESPACE */
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* _UNIXSTL_INCL_H_UNIXSTL_CURRENT_DIRECTORY */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/unixstl_current_directory_scope.h b/etc/c/stlsoft/unixstl_current_directory_scope.h
deleted file mode 100644
index 708218198..000000000
--- a/etc/c/stlsoft/unixstl_current_directory_scope.h
+++ /dev/null
@@ -1,313 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: unixstl_current_directory_scope.h (formerly MLPwdScp.h, ::SynesisStd)
- *
- * Purpose: Current working directory scoping class.
- *
- * Created: 12th November 1998
- * Updated: 2nd November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/unixstl
- * http://www.unixstl.org/
- *
- * email: submissions@unixstl.org for submissions
- * admin@unixstl.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _UNIXSTL_INCL_H_UNIXSTL_CURRENT_DIRECTORY_SCOPE
-#define _UNIXSTL_INCL_H_UNIXSTL_CURRENT_DIRECTORY_SCOPE
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-#define _UNIXSTL_VER_H_UNIXSTL_CURRENT_DIRECTORY_SCOPE_MAJOR 2
-#define _UNIXSTL_VER_H_UNIXSTL_CURRENT_DIRECTORY_SCOPE_MINOR 4
-#define _UNIXSTL_VER_H_UNIXSTL_CURRENT_DIRECTORY_SCOPE_REVISION 2
-#define _UNIXSTL_VER_H_UNIXSTL_CURRENT_DIRECTORY_SCOPE_EDIT 51
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _UNIXSTL_INCL_H_WINSTL
-# include "unixstl.h" // Include the UNIXSTL root header
-#endif /* !_UNIXSTL_INCL_H_WINSTL */
-#ifndef _UNIXSTL_INCL_H_UNIXSTL_FILESYSTEM_TRAITS
-# include "unixstl_filesystem_traits.h" // file_traits
-#endif /* !_UNIXSTL_INCL_H_UNIXSTL_FILESYSTEM_TRAITS */
-#ifndef _STLSOFT_INCL_H_STLSOFT_STRING_ACCESS
-# include "stlsoft_string_access.h" // stlsoft::c_str_ptr
-#endif /* !_STLSOFT_INCL_H_STLSOFT_STRING_ACCESS */
-#ifndef _UNIXSTL_INCL_H_UNIXSTL_STRING_ACCESS
-# include "unixstl_string_access.h" // unixstl::c_str_ptr
-#endif /* !_UNIXSTL_INCL_H_UNIXSTL_STRING_ACCESS */
-#include
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
-# ifdef _STLSOFT_NO_NAMESPACE
-/* There is no stlsoft namespace, so must define ::unixstl */
-namespace unixstl
-{
-# else
-/* Define stlsoft::unixstl_project */
-
-namespace stlsoft
-{
-
-namespace unixstl_project
-{
-
-# endif /* _STLSOFT_NO_NAMESPACE */
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-stlsoft_ns_using(c_str_ptr)
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-/// \weakgroup libraries STLSoft Libraries
-/// \brief The individual libraries
-
-/// \weakgroup libraries_filesystem File-System Library
-/// \ingroup libraries
-/// \brief This library provides facilities for defining and manipulating file-system objects
-
-/// \defgroup unixstl_filesystem_library File-System Library (UNIXSTL)
-/// \ingroup UNIXSTL libraries_filesystem
-/// \brief This library provides facilities for defining and manipulating UNIX file-system objects
-/// @{
-
-/* /////////////////////////////////////////////////////////////////////////////
- * basic_current_directory_scope
- *
- * This class pushes the given directory as the current directory upon
- * construction, and pops back to the original at destruction.
- */
-
-/// \brief Current directory scoping class
-///
-/// This class scopes the process's current directory, by changing to the path
-/// given in the constructor, and then, if that succeeded, changing back in the
-/// destructor
-///
-/// \param C The character type (e.g. \c char, \c wchar_t)
-/// \param T The file-system traits. In translators that support default template parameters that defaults to \c filesystem_traits
-
-template< ss_typename_param_k C
-#ifdef __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT
- , ss_typename_param_k T = filesystem_traits
-#else
- , ss_typename_param_k T /* = filesystem_traits */
-#endif /* __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT */
- >
-class basic_current_directory_scope
-{
-public:
- typedef C char_type; /*!< The character type */
-private:
- typedef T traits_type;
- typedef basic_current_directory_scope class_type;
-
-// Construction
-public:
- /// \brief Constructs a scope instance and changes to the given directory
- ///
- /// \param dir The name of the directory to change the current directory to
- ss_explicit_k basic_current_directory_scope(char_type const *dir);
-#if defined(__STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT)
- /// \brief Constructs a scope instance and changes to the given directory
- ///
- /// \param dir The name of the directory to change the current directory to
- template
- ss_explicit_k basic_current_directory_scope(S const &dir)
- {
- _init(c_str_ptr(dir));
- }
-#endif /* __STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT */
- /// \brief Returns the current directory to its original location
- ~basic_current_directory_scope() unixstl_throw_0();
-
-// Conversions
-public:
- /// Returns a C-string pointer to the original directory
- operator char_type const *() const;
-
-/// \name State
-/// @{
-private:
-#ifdef STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT
- /// An opaque type to use for boolean evaluation
- struct boolean { int i; };
- typedef int boolean::*boolean_t;
-#else /* ? STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT */
- typedef us_bool_t boolean_t;
-#endif /* STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT */
-public:
- /// Indicates whether the construction was successful
- ///
- /// \retval true The scope instance was successfully constructed and the current directory changed as per the constructor argument
- /// \retval false The scope instance was not successfully constructed, and the current directory was unchanged.
- operator boolean_t () const;
-#ifndef STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT
- /// Indicates whether the construction failed
- ///
- /// This method is the opposite of operator us_bool_t(), and the return values are inverted.
- us_bool_t operator !() const;
-#endif /* !STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT */
-
-/// @}
-
-// Implementation
-private:
- void _init(char_type const *dir);
-
-// Members
-private:
- char_type m_previous[1 + PATH_MAX];
-
-// Not to be implemented
-private:
- basic_current_directory_scope();
- basic_current_directory_scope(class_type const &);
- class_type const &operator =(class_type const &);
-};
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Typedefs for commonly encountered types
- */
-
-/// Instantiation of the basic_current_directory_scope template for the ANSI character type \c char
-typedef basic_current_directory_scope > current_directory_scope_a;
-/// Instantiation of the basic_current_directory_scope template for the Unicode character type \c wchar_t
-typedef basic_current_directory_scope > current_directory_scope_w;
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Implementation
- */
-
-template< ss_typename_param_k C
- , ss_typename_param_k T
- >
-inline void basic_current_directory_scope::_init(ss_typename_type_k basic_current_directory_scope::char_type const *dir)
-{
- if( 0 == traits_type::get_current_directory(unixstl_num_elements(m_previous), m_previous) ||
- !traits_type::set_current_directory(dir))
- {
- m_previous[0] = '\0';
- }
-}
-
-template< ss_typename_param_k C
- , ss_typename_param_k T
- >
-inline basic_current_directory_scope::basic_current_directory_scope(ss_typename_type_k basic_current_directory_scope::char_type const *dir)
-{
- _init(c_str_ptr(dir));
-}
-
-template< ss_typename_param_k C
- , ss_typename_param_k T
- >
-inline basic_current_directory_scope::~basic_current_directory_scope() unixstl_throw_0()
-{
- if(m_previous[0] != '\0')
- {
- traits_type::set_current_directory(m_previous);
- }
-}
-
-template< ss_typename_param_k C
- , ss_typename_param_k T
- >
-inline basic_current_directory_scope::operator ss_typename_type_k basic_current_directory_scope::char_type const *() const
-{
- return m_previous;
-}
-
-template< ss_typename_param_k C
- , ss_typename_param_k T
- >
-inline basic_current_directory_scope::operator ss_typename_type_k basic_current_directory_scope::boolean_t () const
-{
-#ifdef STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT
- return m_previous[0] != '\0' ? &boolean::i : NULL;
-#else /* ? STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT */
- return m_previous[0] != '\0';
-#endif /* STLSOFT_CF_OPERATOR_BOOL_AS_OPERATOR_POINTER_TO_MEMBER_SUPPORT */
-}
-
-#ifndef STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT
-template< ss_typename_param_k C
- , ss_typename_param_k T
- >
-inline us_bool_t basic_current_directory_scope::operator !() const
-{
- return !operator us_bool_t();
-}
-#endif /* !STLSOFT_CF_OPERATOR_NOT_VIA_OPERATOR_POINTER_TO_MEMBER_SUPPORT */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-/// @} // end of group unixstl_filesystem_library
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
-# ifdef _STLSOFT_NO_NAMESPACE
-} // namespace unixstl
-# else
-} // namespace unixstl_project
-} // namespace stlsoft
-# endif /* _STLSOFT_NO_NAMESPACE */
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* _UNIXSTL_INCL_H_UNIXSTL_CURRENT_DIRECTORY_SCOPE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/unixstl_environment_variable.h b/etc/c/stlsoft/unixstl_environment_variable.h
deleted file mode 100644
index ac082dc86..000000000
--- a/etc/c/stlsoft/unixstl_environment_variable.h
+++ /dev/null
@@ -1,255 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: unixstl_environment_variable.h
- *
- * Purpose: Simple class that provides access to an environment variable.
- *
- * Created: 2nd November 2003
- * Updated: 2nd November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/unixstl
- * http://www.unixstl.org/
- *
- * email: submissions@unixstl.org for submissions
- * admin@unixstl.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _UNIXSTL_INCL_H_UNIXSTL_ENVIRONMENT_VARIABLE
-#define _UNIXSTL_INCL_H_UNIXSTL_ENVIRONMENT_VARIABLE
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-#define _UNIXSTL_VER_H_UNIXSTL_ENVIRONMENT_VARIABLE_MAJOR 1
-#define _UNIXSTL_VER_H_UNIXSTL_ENVIRONMENT_VARIABLE_MINOR 3
-#define _UNIXSTL_VER_H_UNIXSTL_ENVIRONMENT_VARIABLE_REVISION 1
-#define _UNIXSTL_VER_H_UNIXSTL_ENVIRONMENT_VARIABLE_EDIT 14
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _UNIXSTL_INCL_H_UNIXSTL
-# include "unixstl.h" // Include the WinSTL root header
-#endif /* !_UNIXSTL_INCL_H_UNIXSTL */
-#ifndef _UNIXSTL_INCL_H_UNIXSTL_SYSTEM_VERSION
-# include "unixstl_filesystem_traits.h" // Include the WinSTL get_environment_variable
-#endif /* !_UNIXSTL_INCL_H_UNIXSTL_SYSTEM_VERSION */
-#ifndef _STLSOFT_INCL_H_STLSOFT_STRING_ACCESS
-# include "stlsoft_string_access.h" // stlsoft::c_str_ptr
-#endif /* !_STLSOFT_INCL_H_STLSOFT_STRING_ACCESS */
-#ifndef _UNIXSTL_INCL_H_UNIXSTL_STRING_ACCESS
-# include "unixstl_string_access.h" // unixstl::c_str_ptr
-#endif /* !_UNIXSTL_INCL_H_UNIXSTL_STRING_ACCESS */
-#ifndef _STLSOFT_INCL_H_STLSOFT_AUTO_BUFFER
-# include "stlsoft_auto_buffer.h" // stlsoft::auto_buffer
-#endif /* !_STLSOFT_INCL_H_STLSOFT_AUTO_BUFFER */
-#ifndef _STLSOFT_INCL_H_STLSOFT_MALLOC_ALLOCATOR
-# include "stlsoft_malloc_allocator.h" // malloc_allocator
-#endif /* _STLSOFT_INCL_H_STLSOFT_MALLOC_ALLOCATOR */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
-# ifdef _STLSOFT_NO_NAMESPACE
-/* There is no stlsoft namespace, so must define ::unixstl */
-namespace unixstl
-{
-# else
-/* Define stlsoft::unixstl_project */
-
-namespace stlsoft
-{
-
-namespace unixstl_project
-{
-
-# endif /* _STLSOFT_NO_NAMESPACE */
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-stlsoft_ns_using(c_str_ptr)
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-/// \weakgroup libraries STLSoft Libraries
-/// \brief The individual libraries
-
-/// \weakgroup libraries_system System Library
-/// \ingroup libraries
-/// \brief This library provides facilities for accessing system attributes
-
-/// \defgroup unixstl_system_library System Library (WinSTL)
-/// \ingroup WinSTL libraries_system
-/// \brief This library provides facilities for accessing Win32 system attributes
-/// @{
-
-/* /////////////////////////////////////////////////////////////////////////////
- * basic_environment_variable
- *
- * This class converts a relative path to an absolute one, and effectively acts
- * as a C-string of its value.
- */
-
-/// Represents an environment variable
-///
-/// \param C The character type
-/// \param T The traits type. On translators that support default template arguments, this defaults to filesystem_traits
-template< ss_typename_param_k C
-#ifdef __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT
- , ss_typename_param_k T = filesystem_traits
-#else
- , ss_typename_param_k T /* = filesystem_traits */
-#endif /* __STLSOFT_CF_TEMPLATE_CLASS_DEFAULT_CLASS_ARGUMENT_SUPPORT */
- >
-class basic_environment_variable
-{
-public:
- /// The char type
- typedef C char_type;
- /// The traits type
- typedef T traits_type;
- /// The current parameterisation of the type
- typedef basic_environment_variable class_type;
- /// The size type
- typedef size_t size_type;
-
-// Construction
-public:
- /// Create an instance representing the given environment variable
- ss_explicit_k basic_environment_variable(char_type const *name)
- : m_buffer(1 + traits_type::get_environment_variable(name, 0, 0))
- {
- if( 0 == traits_type::get_environment_variable(name, m_buffer, m_buffer.size()) &&
- 0 != m_buffer.size())
- {
- m_buffer[0] = 0;
- }
- }
-#ifdef __STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT
- /// Create an instance representing the given environment variable
- template
- ss_explicit_k basic_environment_variable(S const &name)
- : m_buffer(1 + traits_type::get_environment_variable(c_str_ptr(name), 0, 0))
- {
- if( 0 == traits_type::get_environment_variable(c_str_ptr(name), m_buffer, m_buffer.size()) &&
- 0 != m_buffer.size())
- {
- m_buffer[0] = 0;
- }
- }
-#endif /* __STLSOFT_CF_MEMBER_TEMPLATE_CTOR_SUPPORT */
-
-// Conversions
-public:
- /// Implicit conversion to a non-mutable (const) pointer to the variable
- operator char_type const *() const
- {
- return m_buffer.data();
- }
-
-// Attributes
-public:
- /// Returns the length of the variable
- size_type length() const
- {
- return m_buffer.size() - 1;
- }
-
-// Members
-private:
- typedef stlsoft_ns_qual(auto_buffer) > buffer_t;
-
- buffer_t m_buffer;
-
-// Not to be implemented
-private:
- basic_environment_variable(basic_environment_variable const &);
- basic_environment_variable &operator =(basic_environment_variable const &);
-};
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Typedefs for commonly encountered types
- */
-
-/// Instantiation of the basic_environment_variable template for the ANSI character type \c char
-typedef basic_environment_variable > environment_variable_a;
-/// Instantiation of the basic_environment_variable template for the Unicode character type \c wchar_t
-typedef basic_environment_variable > environment_variable_w;
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Helper functions
- */
-
-#if !defined(__STLSOFT_COMPILER_IS_MSVC) || \
- _MSC_VER >= 1100
-
-/// This helper function makes an environment variable without needing to
-/// qualify the template parameter.
-template
-inline basic_environment_variable make_environment_variable(C const *path)
-{
- return basic_environment_variable(path);
-}
-
-#endif /* !(_MSC_VER < 1100) */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
-# ifdef _STLSOFT_NO_NAMESPACE
-} // namespace unixstl
-# else
-} // namespace unixstl_project
-} // namespace stlsoft
-# endif /* _STLSOFT_NO_NAMESPACE */
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* _UNIXSTL_INCL_H_UNIXSTL_ENVIRONMENT_VARIABLE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/unixstl_filesystem_traits.h b/etc/c/stlsoft/unixstl_filesystem_traits.h
deleted file mode 100644
index 708f6a837..000000000
--- a/etc/c/stlsoft/unixstl_filesystem_traits.h
+++ /dev/null
@@ -1,462 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: unixstl_filesystem_traits.h
- *
- * Purpose: Contains the filesystem_traits template class, and ANSI and
- * Unicode specialisations thereof.
- *
- * Created: 15th November 2002
- * Updated: 3rd November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/unixstl
- * http://www.unixstl.org/
- *
- * email: submissions@unixstl.org for submissions
- * admin@unixstl.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _UNIXSTL_INCL_H_UNIXSTL_FILESYSTEM_TRAITS
-#define _UNIXSTL_INCL_H_UNIXSTL_FILESYSTEM_TRAITS
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-#define _UNIXSTL_VER_H_UNIXSTL_FILESYSTEM_TRAITS_MAJOR 1
-#define _UNIXSTL_VER_H_UNIXSTL_FILESYSTEM_TRAITS_MINOR 6
-#define _UNIXSTL_VER_H_UNIXSTL_FILESYSTEM_TRAITS_REVISION 1
-#define _UNIXSTL_VER_H_UNIXSTL_FILESYSTEM_TRAITS_EDIT 22
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _UNIXSTL_INCL_H_WINSTL
-# include "unixstl.h" // Include the UNIXSTL root header
-#endif /* !_UNIXSTL_INCL_H_WINSTL */
-#include
-#include
-#include
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
-# ifdef _STLSOFT_NO_NAMESPACE
-/* There is no stlsoft namespace, so must define ::unixstl */
-namespace unixstl
-{
-# else
-/* Define stlsoft::unixstl_project */
-
-namespace stlsoft
-{
-
-namespace unixstl_project
-{
-
-# endif /* _STLSOFT_NO_NAMESPACE */
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-/// \weakgroup libraries STLSoft Libraries
-/// \brief The individual libraries
-
-/// \weakgroup libraries_filesystem File-System Library
-/// \ingroup libraries
-/// \brief This library provides facilities for defining and manipulating file-system objects
-
-/// \defgroup unixstl_filesystem_library File-System Library (UNIXSTL)
-/// \ingroup UNIXSTL libraries_filesystem
-/// \brief This library provides facilities for defining and manipulating UNIX file-system objects
-/// @{
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Classes
- *
- * filesystem_traits - a traits template, along with
- * filesystem_traits and
- * filesystem_traits
- */
-
-/// \brief Traits class for file-system operations
-///
-/// \param C The character type (e.g. \c char, \c wchar_t)
-template
-#ifdef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-struct filesystem_traits
-{
-public:
- typedef C char_type; /*!< The character type */
- typedef us_size_t size_type; /*!< The size type */
-
-public:
- // General string handling
-
- /// Copies the contents of \c src to \c dest
- static char_type *str_copy(char_type *dest, char_type const *src);
- /// Appends the contents of \c src to \c dest
- static char_type *str_cat(char_type *dest, char_type const *src);
- /// Comparies the contents of \c src and \c dest
- static us_int_t str_compare(char_type const *s1, char_type const *s2);
- /// Evaluates the length of \c src
- static size_type str_len(char_type const *src);
-
- // File-system entry names
-
- /// Appends a path name separator to \c dir if one does not exist
- static char_type *ensure_dir_end(char_type *dir);
- /// Removes a path name separator to \c dir if one does not exist
- static char_type *remove_dir_end(char_type *dir);
- /// Returns \c true if dir is \c "." or \c ".."
- static us_bool_t is_dots(char_type const *dir);
- /// Returns the path separator
- ///
- /// This is the separator that is used to separate multiple paths on the operating system. On UNIX it is ':'
- static char_type path_separator();
- /// Returns the path name separator
- ///
- /// This is the separator that is used to separate parts of a path on the operating system. On UNIX it is '/'
- static char_type path_name_separator();
- /// Returns the wildcard pattern that represents all possible matches
- ///
- /// \note On UNIX it is '*'
- static char_type const *pattern_all();
- /// Gets the full path name into the given buffer, returning a pointer to the file-part
- static us_size_t get_full_path_name(char_type const *fileName, us_size_t cchBuffer, char_type *buffer, char_type **ppFile);
- /// Gets the full path name into the given buffer
- static us_size_t get_full_path_name(char_type const *fileName, us_size_t cchBuffer, char_type *buffer);
-
- // File system state
-
- /// Sets the current directory to \c dir
- static us_bool_t set_current_directory(char_type const *dir);
- /// Retrieves the name of the current directory into \c buffer up to a maximum of \c cchBuffer characters
- static us_uint_t get_current_directory(us_uint_t cchBuffer, char_type *buffer);
-
- // Environment
-
- /// Gets an environment variable into the given buffer
- static us_uint_t get_environment_variable(char_type const *name, char_type *buffer, us_uint_t cchBuffer);
- /// Expands environment strings in \c src into \dest, up to a maximum \c cchDest characters
- static us_uint_t expand_environment_strings(char_type const *src, char_type *buffer, us_uint_t cchBuffer);
-};
-#else
-struct filesystem_traits;
-
-#ifdef __STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX
-template <>
-#endif /* __STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX */
-struct filesystem_traits
-{
-public:
- typedef us_char_a_t char_type;
- typedef us_size_t size_type;
-
-public:
- // General string handling
- static char_type *str_copy(char_type *dest, char_type const *src)
- {
- return strcpy(dest, src);
- }
-
- static char_type *str_cat(char_type *dest, char_type const *src)
- {
- return strcat(dest, src);
- }
-
- static us_int_t str_compare(char_type const *s1, char_type const *s2)
- {
- return strcmp(s1, s2);
- }
-
- static size_type str_len(char_type const *src)
- {
- return static_cast(strlen(src));
- }
-
- // File-system entry names
- static char_type *ensure_dir_end(char_type *dir)
- {
- char_type *end;
-
- for(end = dir; *end != '\0'; ++end)
- {}
-
- if( dir < end &&
- *(end - 1) != path_name_separator())
- {
- *end = path_name_separator();
- *(end + 1) = '\0';
- }
-
- return dir;
- }
-
- static char_type *remove_dir_end(char_type *dir)
- {
- char_type *end;
-
- for(end = dir; *end != '\0'; ++end)
- {}
-
- if( dir < end &&
- *(end - 1) == path_name_separator())
- {
- *(end - 1) = '\0';
- }
-
- return dir;
- }
-
- static us_bool_t is_dots(char_type const *dir)
- {
- return dir != 0 &&
- dir[0] == '.' &&
- ( dir[1] == '\0' ||
- ( dir[1] == '.' &&
- dir[2] == '\0'));
- }
-
- static char_type path_separator()
- {
- return ':';
- }
-
- static char_type path_name_separator()
- {
- return '/';
- }
-
- static char_type const *pattern_all()
- {
- return "*";
- }
-
- static us_size_t get_full_path_name(char_type const *fileName, us_size_t cchBuffer, char_type *buffer, char_type **ppFile);
-
- static us_size_t get_full_path_name(char_type const *fileName, us_size_t cchBuffer, char_type *buffer)
- {
- unixstl_assert(buffer != NULL);
-
- if(fileName[0] == path_name_separator())
- {
- str_copy(buffer, fileName);
- }
- else
- {
- get_current_directory(cchBuffer, buffer);
- if(0 != str_compare(fileName, "."))
- {
- ensure_dir_end(buffer);
- str_cat(buffer, fileName);
- }
- }
-
- return str_len(buffer);
- }
-
- // File system state
- static us_bool_t set_current_directory(char_type const *dir)
- {
- return chdir(dir) == 0;
- }
-
- static us_uint_t get_current_directory(us_uint_t cchBuffer, char_type *buffer)
- {
- return getcwd(buffer, cchBuffer) != 0;
- }
-
- // Environment
-
- static us_uint_t get_environment_variable(char_type const *name, char_type *buffer, us_uint_t cchBuffer)
- {
- char *var = getenv(name);
-
- if(NULL == var)
- {
- return 0;
- }
- else
- {
- size_t var_len = strlen(var);
-
- strncpy(buffer, var, cchBuffer);
-
- return (var_len < cchBuffer) ? var_len : cchBuffer;
- }
- }
-
- static us_uint_t expand_environment_strings(char_type const *src, char_type *buffer, us_uint_t cchBuffer);
-};
-
-#if 0
-#ifdef __STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX
-template <>
-#endif /* __STLSOFT_CF_TEMPLATE_SPECIALISATION_SYNTAX */
-struct filesystem_traits
-{
-public:
- typedef us_char_w_t char_type;
- typedef us_size_t size_type;
-
-public:
- // General string handling
- static char_type *str_copy(char_type *dest, char_type const *src)
- {
- return wcscpy(dest, src);
- }
-
- static char_type *str_cat(char_type *dest, char_type const *src)
- {
- return wcscat(dest, src);
- }
-
- static us_int_t str_compare(char_type const *s1, char_type const *s2)
- {
- return wcscmp(s1, s2);
- }
-
- static size_type str_len(char_type const *src)
- {
- return static_cast(wcslen(src));
- }
-
- // File-system entry names
- static char_type *ensure_dir_end(char_type *dir)
- {
- char_type *end;
-
- for(end = dir; *end != L'\0'; ++end)
- {}
-
- if( dir < end &&
- *(end - 1) != path_name_separator())
- {
- *end = path_name_separator();
- *(end + 1) = L'\0';
- }
-
- return dir;
- }
-
- static char_type *remove_dir_end(char_type *dir)
- {
- char_type *end;
-
- for(end = dir; *end != L'\0'; ++end)
- {}
-
- if( dir < end &&
- *(end - 1) == path_name_separator())
- {
- *(end - 1) = L'\0';
- }
-
- return dir;
- }
-
- static us_bool_t is_dots(char_type const *dir)
- {
- return dir != 0 &&
- dir[0] == '.' &&
- ( dir[1] == L'\0' ||
- ( dir[1] == L'.' &&
- dir[2] == L'\0'));
- }
-
- static char_type path_separator()
- {
- return L':';
- }
-
- static char_type path_name_separator()
- {
- return L'/';
- }
-
- static char_type const *pattern_all()
- {
- return L"*";
- }
-
- static us_size_t get_full_path_name(char_type const *fileName, us_size_t cchBuffer, char_type *buffer, char_type **ppFile);
- static us_size_t get_full_path_name(char_type const *fileName, us_size_t cchBuffer, char_type *buffer)
- {
- char_type *pFile;
-
- return get_full_path_name(fileName, cchBuffer, buffer, &pFile);
- }
-
- // File system state
- static us_bool_t set_current_directory(char_type const *dir);
-
- static us_uint_t get_current_directory(us_uint_t cchBuffer, char_type *buffer);
-};
-#endif /* 0 */
-
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-/// @} // end of group unixstl_filesystem_library
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
-# ifdef _STLSOFT_NO_NAMESPACE
-} // namespace unixstl
-# else
-} // namespace unixstl_project
-} // namespace stlsoft
-# endif /* _STLSOFT_NO_NAMESPACE */
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* _UNIXSTL_INCL_H_UNIXSTL_FILESYSTEM_TRAITS */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/unixstl_findfile_sequence.h b/etc/c/stlsoft/unixstl_findfile_sequence.h
deleted file mode 100644
index 0fc860928..000000000
--- a/etc/c/stlsoft/unixstl_findfile_sequence.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: unixstl_findfile_sequence.h
- *
- * Purpose: findfile_sequence class. It is now implemented as a typedef to
- * the glob_sequence class.
- *
- * Created: 15th January 2002
- * Updated: 3rd November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/unixstl
- * http://www.unixstl.org/
- *
- * email: submissions@unixstl.org for submissions
- * admin@unixstl.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _INCL_UNIXSTL_H_UNIXSTL_FINDFILE_SEQUENCE
-#define _INCL_UNIXSTL_H_UNIXSTL_FINDFILE_SEQUENCE
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-#define _UNIXSTL_VER_H_UNIXSTL_FINDFILE_SEQUENCE_MAJOR 2
-#define _UNIXSTL_VER_H_UNIXSTL_FINDFILE_SEQUENCE_MINOR 1
-#define _UNIXSTL_VER_H_UNIXSTL_FINDFILE_SEQUENCE_REVISION 1
-#define _UNIXSTL_VER_H_UNIXSTL_FINDFILE_SEQUENCE_EDIT 43
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _INCL_UNIXSTL_H_UNIXSTL
-# include "unixstl.h" // Include the UNIXSTL root header
-#endif /* !_INCL_UNIXSTL_H_UNIXSTL */
-
-#ifdef _UNIXSTL_FINDFILE_SEQUENCE_NO_BACK_SLASH_TERMINATOR
-# define _UNIXSTL_GLOB_SEQUENCE_NO_BACK_SLASH_TERMINATOR
-#endif /* _UNIXSTL_FINDFILE_SEQUENCE_NO_BACK_SLASH_TERMINATOR */
-
-#ifndef _INCL_UNIXSTL_H_UNIXSTL_GLOB_SEQUENCE
-# include "unixstl_glob_sequence.h" // glob_sequence
-#endif /* !_INCL_UNIXSTL_H_UNIXSTL_GLOB_SEQUENCE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- *
- * The UNIXSTL components are contained within the unixstl namespace. This is
- * actually an alias for stlsoft::unixstl_project,
- *
- * The definition matrix is as follows:
- *
- * _STLSOFT_NO_NAMESPACE _UNIXSTL_NO_NAMESPACE unixstl definition
- * --------------------- --------------------- -----------------
- * not defined not defined = stlsoft::unixstl_project
- * not defined defined not defined
- * defined not defined unixstl
- * defined defined not defined
- *
- */
-
-/* No STLSoft namespaces means no UNIXSTL namespaces */
-#ifdef _STLSOFT_NO_NAMESPACES
-# define _UNIXSTL_NO_NAMESPACES
-#endif /* _STLSOFT_NO_NAMESPACES */
-
-/* No UNIXSTL namespaces means no unixstl namespace */
-#ifdef _UNIXSTL_NO_NAMESPACES
-# define _UNIXSTL_NO_NAMESPACE
-#endif /* _UNIXSTL_NO_NAMESPACES */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
-# ifdef _STLSOFT_NO_NAMESPACE
-/* There is no stlsoft namespace, so must define ::unixstl */
-namespace unixstl
-{
-# else
-/* Define stlsoft::unixstl_project */
-
-namespace stlsoft
-{
-
-namespace unixstl_project
-{
-
-# endif /* _STLSOFT_NO_NAMESPACE */
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-/// \weakgroup libraries STLSoft Libraries
-/// \brief The individual libraries
-
-/// \weakgroup libraries_filesystem File-System Library
-/// \ingroup libraries
-/// \brief This library provides facilities for defining and manipulating file-system objects
-
-/// \defgroup unixstl_filesystem_library File-System Library (UNIXSTL)
-/// \ingroup UNIXSTL libraries_filesystem
-/// \brief This library provides facilities for defining and manipulating UNIX file-system objects
-/// @{
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Typedefs
- */
-
-typedef glob_sequence findfile_sequence;
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-/// @} // end of group unixstl_filesystem_library
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
-# ifdef _STLSOFT_NO_NAMESPACE
-} // namespace unixstl
-# else
-} // namespace unixstl_project
-} // namespace stlsoft
-# endif /* _STLSOFT_NO_NAMESPACE */
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !_INCL_UNIXSTL_H_UNIXSTL_FINDFILE_SEQUENCE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/unixstl_functionals.h b/etc/c/stlsoft/unixstl_functionals.h
deleted file mode 100644
index e7c087d09..000000000
--- a/etc/c/stlsoft/unixstl_functionals.h
+++ /dev/null
@@ -1,213 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: unixstl_functionals.h
- *
- * Purpose: A number of useful functionals .
- *
- * Created: 2nd November 2003
- * Updated: 2nd November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/unixstl
- * http://www.unixstl.org/
- *
- * email: submissions@unixstl.org for submissions
- * admin@unixstl.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _UNIXSTL_INCL_H_UNIXSTL_FUNCTIONALS
-#define _UNIXSTL_INCL_H_UNIXSTL_FUNCTIONALS
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-#define _UNIXSTL_VER_H_UNIXSTL_FUNCTIONALS_MAJOR 1
-#define _UNIXSTL_VER_H_UNIXSTL_FUNCTIONALS_MINOR 0
-#define _UNIXSTL_VER_H_UNIXSTL_FUNCTIONALS_REVISION 2
-#define _UNIXSTL_VER_H_UNIXSTL_FUNCTIONALS_EDIT 3
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _UNIXSTL_INCL_H_UNIXSTL
-# include "unixstl.h" // Include the WinSTL root header
-#endif /* !_UNIXSTL_INCL_H_UNIXSTL */
-#ifndef _STLSOFT_INCL_H_STLSOFT_STRING_ACCESS
-# include "stlsoft_string_access.h" // c_str_ptr, etc.
-#endif /* !_STLSOFT_INCL_H_STLSOFT_STRING_ACCESS */
-#ifndef _UNIXSTL_INCL_H_UNIXSTL_STRING_ACCESS
-# include "unixstl_string_access.h" // c_str_ptr, etc.
-#endif /* !_UNIXSTL_INCL_H_UNIXSTL_STRING_ACCESS */
-#ifndef _UNIXSTL_INCL_H_UNIXSTL_FILESYSTEM_TRAITS
-# include "unixstl_filesystem_traits.h"
-#endif /* !_UNIXSTL_INCL_H_UNIXSTL_FILESYSTEM_TRAITS */
-#ifndef _UNIXSTL_FUNCTIONALS_NO_STD
-# include
-#endif /* _UNIXSTL_FUNCTIONALS_NO_STD */
-#include
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
-# ifdef _STLSOFT_NO_NAMESPACE
-/* There is no stlsoft namespace, so must define ::unixstl */
-namespace unixstl
-{
-# else
-/* Define stlsoft::unixstl_project */
-
-namespace stlsoft
-{
-
-namespace unixstl_project
-{
-
-# endif /* _STLSOFT_NO_NAMESPACE */
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-stlsoft_ns_using(c_str_ptr)
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Classes
- */
-
-/// Function object that compares two file-system paths
-///
-/// \param C The character type
-template
-struct compare_path
-#ifndef _UNIXSTL_FUNCTIONALS_NO_STD
- : unixstl_ns_qual_std(binary_function)
-#endif /* _UNIXSTL_FUNCTIONALS_NO_STD */
-{
-public:
- /// The character type
- typedef C char_type;
-#ifndef _UNIXSTL_FUNCTIONALS_NO_STD
-private:
- typedef unixstl_ns_qual_std(binary_function) parent_class_type;
-public:
- /// The first argument type
- typedef ss_typename_type_k parent_class_type::first_argument_type first_argument_type;
- /// The second argument type
- typedef ss_typename_type_k parent_class_type::second_argument_type second_argument_type;
- /// The result type
- typedef ss_typename_type_k parent_class_type::result_type result_type;
-#else
- /// The first argument type
- typedef const char_type *first_argument_type;
- /// The second argument type
- typedef const char_type *second_argument_type;
- /// The result type
- typedef us_bool_t result_type;
-#endif /* _UNIXSTL_FUNCTIONALS_NO_STD */
- /// The traits type
- typedef filesystem_traits traits_type;
- /// The current parameterisation of the type
- typedef compare_path class_type;
-
-public:
- /// Function call, compares \c s1 with \c s2
- ///
- /// \note The comparison is determined by evaluation the full-paths of both \c s1 and \c s2
-#ifdef __STLSOFT_CF_MEMBER_TEMPLATE_FUNCTION_SUPPORT
- template
- result_type operator ()(T1 const &s1, T2 const &s2)
- {
- return _compare(c_str_ptr(s1), c_str_ptr(s2));
- }
-#else
- result_type operator ()(first_argument_type s1, second_argument_type s2)
- {
- return _compare(s1, s2);
- }
-#endif /* __STLSOFT_CF_MEMBER_TEMPLATE_FUNCTION_SUPPORT */
-
-// Implementation
-private:
- result_type _compare(char_type const *s1, char_type const *s2)
- {
- char_type path1[PATH_MAX + 1];
- char_type path2[PATH_MAX + 1];
- result_type result;
-
- if(!traits_type::get_full_path_name(s1, unixstl_num_elements(path1), path1))
- {
- result = false;
- }
- else if(!traits_type::get_full_path_name(s2, unixstl_num_elements(path2), path2))
- {
- result = false;
- }
- else
- {
- traits_type::ensure_dir_end(path1);
- traits_type::ensure_dir_end(path2);
-
- result = traits_type::str_compare(path1, path2) == 0;
- }
-
- return result;
- }
-};
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
-# ifdef _STLSOFT_NO_NAMESPACE
-} // namespace unixstl
-# else
-} // namespace unixstl_project
-} // namespace stlsoft
-# endif /* _STLSOFT_NO_NAMESPACE */
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* _UNIXSTL_INCL_H_UNIXSTL_FUNCTIONALS */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/unixstl_glob_sequence.h b/etc/c/stlsoft/unixstl_glob_sequence.h
deleted file mode 100644
index ecad16ea3..000000000
--- a/etc/c/stlsoft/unixstl_glob_sequence.h
+++ /dev/null
@@ -1,536 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: unixstl_glob_sequence.h (formerly unixstl_findfile_sequence.h)
- *
- * Purpose: glob_sequence class.
- *
- * Created: 15th January 2002
- * Updated: 10th November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/unixstl
- * http://www.unixstl.org/
- *
- * email: submissions@unixstl.org for submissions
- * admin@unixstl.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _INCL_UNIXSTL_H_UNIXSTL_GLOB_SEQUENCE
-#define _INCL_UNIXSTL_H_UNIXSTL_GLOB_SEQUENCE
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-#define _UNIXSTL_VER_H_UNIXSTL_GLOB_SEQUENCE_MAJOR 2
-#define _UNIXSTL_VER_H_UNIXSTL_GLOB_SEQUENCE_MINOR 1
-#define _UNIXSTL_VER_H_UNIXSTL_GLOB_SEQUENCE_REVISION 4
-#define _UNIXSTL_VER_H_UNIXSTL_GLOB_SEQUENCE_EDIT 46
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _INCL_UNIXSTL_H_UNIXSTL
-# include "unixstl.h" // Include the UNIXSTL root header
-#endif /* !_INCL_UNIXSTL_H_UNIXSTL */
-#ifndef _INCL_UNIXSTL_H_UNIXSTL_FILESYSTEM_TRAITS
-# include "unixstl_filesystem_traits.h" // filesystem_traits
-#endif /* !_INCL_UNIXSTL_H_UNIXSTL_FILESYSTEM_TRAITS */
-#ifndef _STLSOFT_INCL_H_STLSOFT_ITERATOR
-# include "stlsoft_iterator.h"
-#endif /* !_STLSOFT_INCL_H_STLSOFT_ITERATOR */
-#include
-#include
-#include
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- *
- * The UNIXSTL components are contained within the unixstl namespace. This is
- * actually an alias for stlsoft::unixstl_project,
- *
- * The definition matrix is as follows:
- *
- * _STLSOFT_NO_NAMESPACE _UNIXSTL_NO_NAMESPACE unixstl definition
- * --------------------- --------------------- -----------------
- * not defined not defined = stlsoft::unixstl_project
- * not defined defined not defined
- * defined not defined unixstl
- * defined defined not defined
- *
- */
-
-/* No STLSoft namespaces means no UNIXSTL namespaces */
-#ifdef _STLSOFT_NO_NAMESPACES
-# define _UNIXSTL_NO_NAMESPACES
-#endif /* _STLSOFT_NO_NAMESPACES */
-
-/* No UNIXSTL namespaces means no unixstl namespace */
-#ifdef _UNIXSTL_NO_NAMESPACES
-# define _UNIXSTL_NO_NAMESPACE
-#endif /* _UNIXSTL_NO_NAMESPACES */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
-# ifdef _STLSOFT_NO_NAMESPACE
-/* There is no stlsoft namespace, so must define ::unixstl */
-namespace unixstl
-{
-# else
-/* Define stlsoft::unixstl_project */
-
-namespace stlsoft
-{
-
-namespace unixstl_project
-{
-
-# endif /* _STLSOFT_NO_NAMESPACE */
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-/// \weakgroup libraries STLSoft Libraries
-/// \brief The individual libraries
-
-/// \weakgroup libraries_filesystem File-System Library
-/// \ingroup libraries
-/// \brief This library provides facilities for defining and manipulating file-system objects
-
-/// \defgroup unixstl_filesystem_library File-System Library (UNIXSTL)
-/// \ingroup UNIXSTL libraries_filesystem
-/// \brief This library provides facilities for defining and manipulating UNIX file-system objects
-/// @{
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Classes
- */
-
-/// \brief STL-like readonly sequence based on the results of file-system wildcard matches
-///
-/// This class presents and STL-like readonly sequence interface to allow the
-/// iteration over the results of file-system wildcard matches.
-
-class glob_sequence
-{
-private:
- typedef glob_sequence class_type;
-public:
- /// The char type
- typedef us_char_a_t char_type;
- /// The value type
- typedef char_type const *value_type;
- /// The type of the const (non-mutating) iterator
- typedef value_type *const_iterator;
-private:
-// typedef value_type &reference;
- typedef value_type const &const_reference;
-// typedef value_type *pointer;
- typedef value_type const *const_pointer;
-public:
- /// The size type
- typedef us_size_t size_type;
- /// The difference type
- typedef us_ptrdiff_t difference_type;
-
- /// The type of the const (non-mutating) reverse iterator
- typedef stlsoft_ns_qual(reverse_iterator_base) < const_iterator
- , value_type
- , const_reference
- , const_pointer
- , difference_type
- > const_reverse_iterator;
-
-public:
- enum
- {
- includeDots = 0x0008 /*!< Requests that dots directories be included in the returned sequence */
- , directories = 0x0010 /*!< Causes the search to include directories */
- , files = 0x0020 /*!< Causes the search to include files */
- , noSort = 0x0100 /*!< Does not sort entries */
- , markDirs = 0x0200 /*!< Mark directories with a trailing path name separator */
- ,
- };
-
-// Construction
-public:
- /// \brief Constructs a sequence according to the given criteria
- ///
- /// The constructor initialises a glob_sequence instance on the given
- /// pattern with the given flags.
- ///
- /// \param pattern The pattern against which to match the file-system contents
- /// \param flags Flags to alter the behaviour of the search
- ss_explicit_k glob_sequence(char_type const *pattern, us_int_t flags = noSort)
- : m_flags(validate_flags_(flags))
- {
- m_cItems = _init(pattern);
- }
-
- /// \brief Constructs a sequence according to the given criteria
- ///
- /// The constructor initialises a glob_sequence instance on the given
- /// pattern with the given flags.
- ///
- /// \param directory The directory in which the pattern is located
- /// \param pattern The pattern against which to match the file-system contents
- /// \param flags Flags to alter the behaviour of the search
- glob_sequence(char_type const *directory, char_type const *pattern, us_int_t flags = noSort)
- : m_flags(validate_flags_(flags))
- {
- m_cItems = _init(directory, pattern);
- }
-
- // Releases any acquired resources
- ~glob_sequence() unixstl_throw_0()
- {
- if(NULL != m_base)
- {
- globfree(&m_gl);
- }
- }
-
-// Attributes
-public:
- /// Returns the number of elements in the sequence
- us_size_t size() const
- {
- return m_cItems;
- }
-
- /// \brief Indicates whether the search sequence is empty
- us_bool_t empty() const
- {
- return size() == 0;
- }
-
- /// \brief Returns the value corresponding to the given index
- ///
- /// \note In debug-mode a runtime assert is applied to enforce that the index is valid. There is no release-time checking on the index validity!
- value_type const operator [](size_type index) const
- {
- unixstl_message_assert("index access out of range in glob_sequence", index < m_cItems + 1); // Has to be +1, since legitimate to take address of one-past-the-end
-
- return m_base[index];
- }
-
-// Iteration
-public:
- /// Begins the iteration
- ///
- /// \return An iterator representing the start of the sequence
- const_iterator begin() const
- {
- return m_base;
- }
- /// Ends the iteration
- ///
- /// \return An iterator representing the end of the sequence
- const_iterator end() const
- {
- return m_base + m_cItems;
- }
-
- /// Begins the reverse iteration
- ///
- /// \return An iterator representing the start of the reverse sequence
- const_reverse_iterator rbegin() const
- {
- return const_reverse_iterator(end());
- }
- /// Ends the reverse iteration
- ///
- /// \return An iterator representing the end of the reverse sequence
- const_reverse_iterator rend() const
- {
- return const_reverse_iterator(begin());
- }
-
-// Implementation
-private:
- static us_int_t validate_flags_(us_int_t flags)
- {
- if((flags & (directories | files)) == 0)
- {
- flags |= (directories | files);
- }
-
- if((flags & directories) == 0)
- {
- // It's more efficient to not bother doing a separate dots check if all
- // directories are being elided.
-// flags |= includeDots;
- }
-
- return flags;
- }
-
- // Returns true if pch == "" or "/" (or "\\"), false otherwise
- static us_bool_t _is_end_of_path_elements(char_type const *pch, difference_type index)
- {
- return pch[index] == '\0' ||
- ( pch[index + 1] == '\0' &&
- (
-#if defined(_UNIXSTL_COMPILER_IS_UNKNOWN) && \
- !defined(_UNIXSTL_GLOB_SEQUENCE_NO_BACK_SLASH_TERMINATOR)
- pch[index] == '\\' ||
-#endif /* _UNIXSTL_COMPILER_IS_UNKNOWN && !_UNIXSTL_GLOB_SEQUENCE_NO_BACK_SLASH_TERMINATOR */
- pch[index] == '/'));
- }
-
- static us_bool_t _is_dots(char_type const *s, us_bool_t &bTwoDots)
- {
- return s != 0 &&
- s[0] == '.' &&
- ( (bTwoDots = false, _is_end_of_path_elements(s, 1)) ||
- (bTwoDots = true, ( s[1] == '.' &&
- _is_end_of_path_elements(s, 2))));
- }
-
- us_int_t _init(char_type const *directory, char_type const *pattern)
- {
- us_int_t glob_flags = 0;
- char_type _directory[1 + PATH_MAX];
- char_type _pattern[1 + PATH_MAX];
-
- // If a directory is given, always turn it into an absolute directory
- if( NULL != directory &&
- 0 != *directory)
- {
- filesystem_traits::str_copy(_directory, directory);
- filesystem_traits::ensure_dir_end(_directory);
- directory = _directory;
- }
-
- // If a directory is given, always prefix into pattern
- if( NULL != directory &&
- 0 != *directory)
- {
- filesystem_traits::str_copy(_pattern, directory);
- filesystem_traits::str_cat(_pattern, pattern);
-
- pattern = _pattern;
- }
-
- if(m_flags & noSort)
- {
- glob_flags |= GLOB_NOSORT;
- }
-
- if(m_flags & markDirs)
- {
- glob_flags |= GLOB_MARK;
- }
-
- if((m_flags & (directories | files)) == directories)
- {
- glob_flags |= GLOB_ONLYDIR;
- }
-
- if(0 == glob(pattern, glob_flags, NULL, &m_gl))
- {
- char_type **base = m_gl.gl_pathv;
- us_int_t cItems = m_gl.gl_pathc;
-
- if(!(m_flags & includeDots))
- {
- // Now remove the dots. If located at the start of
- // the gl buffer, then simply increment m_base to
- // be above that. If not then rearrange the base
- // two pointers such that they are there.
-
- us_bool_t foundDot1 = false;
- us_bool_t foundDot2 = false;
- char_type **begin = base;
- char_type **end = begin + cItems;
-
- for(; begin != end; ++begin)
- {
- us_bool_t bTwoDots;
-
- if(_is_dots(*begin, bTwoDots))
- {
- if(begin != base)
- {
- // Swap with whatever is at base[0]
- char_type *t = *begin;
-
- *begin = *base;
- *base = t;
- }
-
- ++base;
- --cItems;
-
- (bTwoDots ? foundDot2 : foundDot1) = true;
-
- if( foundDot1 &&
- foundDot2)
- {
- break;
- }
- }
- }
- }
-
- // We should be able to trust glob() to return only directories when
- // asked, so we assume the following only needs to be done when
- // have asked for files alone
-#ifdef UNIXSTL_GLOB_SEQUENCE_ULTRA_CAUTIOUS
- if((m_flags & (directories | files)) != (directories | files))
-#else /* ? UNIXSTL_GLOB_SEQUENCE_ULTRA_CAUTIOUS */
- if((m_flags & (directories | files)) == files)
-#endif /* UNIXSTL_GLOB_SEQUENCE_ULTRA_CAUTIOUS */
- {
- char_type **begin = base;
- char_type **end = begin + cItems;
-
- for(; begin != end; ++begin)
- {
- // Now need to process the file, by using stat
- struct stat st;
- int res;
- char_type buffer[PATH_MAX];
- char_type *entry = *begin;
-
- if(0 != (m_flags & markDirs))
- {
- filesystem_traits::str_copy(buffer, entry);
- filesystem_traits::remove_dir_end(buffer);
- entry = buffer;
- }
- res = stat(entry, &st);
-
- if(0 != res)
- {
- // Failed to get info from entry. Must assume it is
- // dead, so skip it
- }
- else
- {
-#ifdef UNIXSTL_GLOB_SEQUENCE_ULTRA_CAUTIOUS
- if(m_flags & directories) // Want directories
- {
- if(S_IFDIR == (st.st_mode & S_IFDIR))
- {
- continue; // A directory, so accept it
- }
- }
-#endif /* UNIXSTL_GLOB_SEQUENCE_ULTRA_CAUTIOUS */
- if(m_flags & files) // Want files
- {
- if(S_IFREG == (st.st_mode & S_IFREG))
- {
- continue; // A file, so accept it
- }
- }
- }
-
- if(begin != base)
- {
- // Swap with whatever is at base[0]
- char_type *t = *begin;
-
- *begin = *base;
- *base = t;
- }
-
- ++base;
- --cItems;
- }
- }
-
- // Set m_base and m_cItems to the correct values, with
- // or without dots. m_base is cast here to remove the
- // need for const-casting throughout the rest of the
- // class
- m_base = const_cast(base);
-
- return cItems;
- }
- else
- {
- m_base = NULL;
-
- return 0;
- }
- }
-
- us_int_t _init(char_type const *pattern)
- {
- return _init(NULL, pattern);
- }
-
-// Members
-private:
- us_int_t const m_flags;
- glob_t m_gl;
- char_type const **m_base;
- us_int_t m_cItems;
-
-// Not to be implemented
-private:
- glob_sequence(class_type const &);
- class_type const &operator =(class_type const &);
-};
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-/// @} // end of group unixstl_filesystem_library
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
-# ifdef _STLSOFT_NO_NAMESPACE
-} // namespace unixstl
-# else
-} // namespace unixstl_project
-} // namespace stlsoft
-# endif /* _STLSOFT_NO_NAMESPACE */
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !_INCL_UNIXSTL_H_UNIXSTL_GLOB_SEQUENCE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/unixstl_limits.h b/etc/c/stlsoft/unixstl_limits.h
deleted file mode 100644
index ee12bcfed..000000000
--- a/etc/c/stlsoft/unixstl_limits.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/* /////////////////////////////////////////////////////////////////////////////
- * File: unixstl_limits.h
- *
- * Purpose: Header for limits.
- *
- * Created: 14th November 2002
- * Updated: 2nd November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/unixstl
- * http://www.unixstl.org/
- *
- * email: submissions@unixstl.org for submissions
- * admin@unixstl.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _INCL_UNIXSTL_H_UNIXSTL_LIMITS
-#define _INCL_UNIXSTL_H_UNIXSTL_LIMITS
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-#define _UNIXSTL_VER_H_UNIXSTL_LIMITS_MAJOR 1
-#define _UNIXSTL_VER_H_UNIXSTL_LIMITS_MINOR 1
-#define _UNIXSTL_VER_H_UNIXSTL_LIMITS_REVISION 2
-#define _UNIXSTL_VER_H_UNIXSTL_LIMITS_EDIT 9
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _INCL_UNIXSTL_H_UNIXSTL
-# include "unixstl.h" // Include the UNIXSTL root header
-#endif /* !_INCL_UNIXSTL_H_UNIXSTL */
-#include
-#include
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Namespace
- *
- * The UNIXSTL components are contained within the unixstl namespace. This is
- * actually an alias for stlsoft::unixstl_project,
- *
- * The definition matrix is as follows:
- *
- * _STLSOFT_NO_NAMESPACE _UNIXSTL_NO_NAMESPACE unixstl definition
- * --------------------- --------------------- -----------------
- * not defined not defined = stlsoft::unixstl_project
- * not defined defined not defined
- * defined not defined unixstl
- * defined defined not defined
- *
- */
-
-/* No STLSoft namespaces means no UNIXSTL namespaces */
-#ifdef _STLSOFT_NO_NAMESPACES
-# define _UNIXSTL_NO_NAMESPACES
-#endif /* _STLSOFT_NO_NAMESPACES */
-
-/* No UNIXSTL namespaces means no unixstl namespace */
-#ifdef _UNIXSTL_NO_NAMESPACES
-# define _UNIXSTL_NO_NAMESPACE
-#endif /* _UNIXSTL_NO_NAMESPACES */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
-# ifdef _STLSOFT_NO_NAMESPACE
-/* There is no stlsoft namespace, so must define ::unixstl */
-namespace unixstl
-{
-# else
-/* Define stlsoft::unixstl_project */
-
-namespace stlsoft
-{
-
-namespace unixstl_project
-{
-
-# endif /* _STLSOFT_NO_NAMESPACE */
-#else
-stlsoft_ns_using(move_lhs_from_rhs)
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Constants and definitions
- */
-
-/* UNIXSTL_NAME_MAX */
-
-/** \def UNIXSTL_NAME_MAX
- *
- * The maxiumum number of characters in a UNIXSTL file-system name
- */
-
-#ifdef NAME_MAX
-# define UNIXSTL_NAME_MAX NAME_MAX
-#elif defined(PATH_MAX)
-# define UNIXSTL_NAME_MAX PATH_MAX
-#else
-# define UNIXSTL_NAME_MAX (512)
-#endif /* NAME_MAX */
-
-/* UNIXSTL_PATH_MAX */
-
-/** \def UNIXSTL_PATH_MAX
- *
- * The maxiumum number of characters in a UNIXSTL file-system path
- */
-
-#ifdef PATH_MAX
-# define UNIXSTL_PATH_MAX PATH_MAX
-#else
-# define UNIXSTL_PATH_MAX (512)
-#endif /* NAME_MAX */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#ifndef _UNIXSTL_NO_NAMESPACE
-# ifdef _STLSOFT_NO_NAMESPACE
-} // namespace unixstl
-# else
-} // namespace unixstl_project
-} // namespace stlsoft
-# endif /* _STLSOFT_NO_NAMESPACE */
-#endif /* !_UNIXSTL_NO_NAMESPACE */
-
-/* ////////////////////////////////////////////////////////////////////////// */
-
-#endif /* !_INCL_UNIXSTL_H_UNIXSTL_LIMITS */
-
-/* ////////////////////////////////////////////////////////////////////////// */
diff --git a/etc/c/stlsoft/unixstl_process_mutex.h b/etc/c/stlsoft/unixstl_process_mutex.h
deleted file mode 100644
index 40b4e695a..000000000
--- a/etc/c/stlsoft/unixstl_process_mutex.h
+++ /dev/null
@@ -1,296 +0,0 @@
-/* ////////////////////////////////////////////////////////////////////////////
- * File: unixstl_process_mutex.h
- *
- * Purpose: Intra-process mutext, based on PTHREADS.
- *
- * Date: 15th May 2002
- * Updated: 23rd November 2003
- *
- * Author: Matthew Wilson, Synesis Software Pty Ltd.
- *
- * License: (Licensed under the Synesis Software Standard Source License)
- *
- * Copyright (C) 2002-2003, Synesis Software Pty Ltd.
- *
- * All rights reserved.
- *
- * www: http://www.synesis.com.au/unixstl
- * http://www.unixstl.org/
- *
- * email: submissions@unixstl.org for submissions
- * admin@unixstl.org for other enquiries
- *
- * Redistribution and use in source and binary forms, with or
- * without modification, are permitted provided that the following
- * conditions are met:
- *
- * (i) Redistributions of source code must retain the above
- * copyright notice and contact information, this list of
- * conditions and the following disclaimer.
- *
- * (ii) Any derived versions of this software (howsoever modified)
- * remain the sole property of Synesis Software.
- *
- * (iii) Any derived versions of this software (howsoever modified)
- * remain subject to all these conditions.
- *
- * (iv) Neither the name of Synesis Software nor the names of any
- * subdivisions, employees or agents of Synesis Software, nor the
- * names of any other contributors to this software may be used to
- * endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * This source code is provided by Synesis Software "as is" and any
- * warranties, whether expressed or implied, including, but not
- * limited to, the implied warranties of merchantability and
- * fitness for a particular purpose are disclaimed. In no event
- * shall the Synesis Software 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 _UNIXSTL_INCL_H_UNIXSTL_PROCESS_MUTEX
-#define _UNIXSTL_INCL_H_UNIXSTL_PROCESS_MUTEX
-
-#ifndef __STLSOFT_DOCUMENTATION_SKIP_SECTION
-# define _UNIXSTL_VER_H_UNIXSTL_PROCESS_MUTEX_MAJOR 1
-# define _UNIXSTL_VER_H_UNIXSTL_PROCESS_MUTEX_MINOR 3
-# define _UNIXSTL_VER_H_UNIXSTL_PROCESS_MUTEX_REVISION 4
-# define _UNIXSTL_VER_H_UNIXSTL_PROCESS_MUTEX_EDIT 15
-#endif /* !__STLSOFT_DOCUMENTATION_SKIP_SECTION */
-
-/* /////////////////////////////////////////////////////////////////////////////
- * Includes
- */
-
-#ifndef _UNIXSTL_INCL_H_UNIXSTL
-# include "unixstl.h" // Include the UNIXSTL root header
-#endif /* !_UNIXSTL_INCL_H_UNIXSTL */
-#if !defined(_REENTRANT) && \
- !defined(_POSIX_THREADS)
-# error unixstl_process_mutex.h must be compiled in the context of PTHREADS
-#endif /* !_REENTRANT && !_POSIX_THREADS */
-#include