[med-svn] [Git][med-team/dssp][master] 2 commits: New upstream version 4.2.2

Maarten L. Hekkelman (@mhekkel-guest) gitlab at salsa.debian.org
Thu Feb 2 09:25:53 GMT 2023



Maarten L. Hekkelman pushed to branch master at Debian Med / dssp


Commits:
04622184 by Maarten L. Hekkelman at 2023-02-02T10:05:46+01:00
New upstream version 4.2.2
- - - - -
51bb367a by Maarten L. Hekkelman at 2023-02-02T10:06:20+01:00
Update upstream source from tag 'upstream/4.2.2'

Update to upstream version '4.2.2'
with Debian dir f4dbb8e0d448393d2228454fdfe921d9f40e2300

- - - - -


18 changed files:

- .gitignore
- CMakeLists.txt
- changelog
- debian/changelog
- include/dssp.hpp
- − libconfig/CMakeLists.txt
- − libconfig/README.md
- − libconfig/changelog
- − libconfig/cmake/libconfigConfig.cmake
- − libconfig/cmake/libconfigConfig.cmake.in
- − libconfig/include/cfg.hpp
- − libconfig/include/cfg/text.hpp
- − libconfig/include/cfg/utilities.hpp
- − libconfig/test/unit-test.conf
- − libconfig/test/unit-test.cpp
- src/dssp-io.cpp
- src/dssp.cpp
- test/unit-test-dssp.cpp


Changes:

=====================================
.gitignore
=====================================
@@ -7,3 +7,4 @@ build
 .gdb_history
 **/*.dssp
 src/revision.hpp
+out/


=====================================
CMakeLists.txt
=====================================
@@ -25,7 +25,7 @@
 cmake_minimum_required(VERSION 3.15)
 
 # set the project name
-project(mkdssp VERSION 4.2.1 LANGUAGES CXX)
+project(mkdssp VERSION 4.2.2 LANGUAGES CXX)
 
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 
@@ -50,13 +50,20 @@ elseif(MSVC)
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
 endif()
 
-if(NOT "$ENV{CCP4}" STREQUAL "")
-	set(CCP4 $ENV{CCP4})
-	list(PREPEND CMAKE_MODULE_PATH "${CCP4}/Lib")
-	list(APPEND CMAKE_PREFIX_PATH ${CCP4})
+# Optionally build a version to be installed inside CCP4
+option(BUILD_FOR_CCP4 "Build a version to be installed in CCP4" OFF)
 
-	if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
-		set(CMAKE_INSTALL_PREFIX ${CCP4})
+if(BUILD_FOR_CCP4)
+	if("$ENV{CCP4}" STREQUAL "" OR NOT EXISTS $ENV{CCP4})
+		message(FATAL_ERROR "A CCP4 built was requested but CCP4 was not sourced")
+	else()
+		list(APPEND CMAKE_MODULE_PATH "$ENV{CCP4}")
+		list(APPEND CMAKE_PREFIX_PATH "$ENV{CCP4}")
+		set(CMAKE_INSTALL_PREFIX "$ENV{CCP4}")
+
+		if(WIN32)
+			set(BUILD_SHARED_LIBS ON)
+		endif()
 	endif()
 endif()
 
@@ -83,12 +90,12 @@ include(VersionString)
 write_version_header("${PROJECT_SOURCE_DIR}/src")
 
 # Optionally use mrc to create resources
-find_package(Mrc)
+find_package(Mrc QUIET)
 
 if(MRC_FOUND)
 	option(USE_RSRC "Use mrc to create resources" ON)
 else()
-	message(WARNING "Not using resources since mrc was not found")
+	message(STATUS "Not using resources since mrc was not found")
 endif()
 
 set(CMAKE_THREAD_PREFER_PTHREAD)
@@ -97,7 +104,7 @@ find_package(Threads)
 
 if(NOT PDB_REDO_META)
 	find_package(libmcfp REQUIRED)
-	find_package(cifpp 5.0.4 REQUIRED)
+	find_package(cifpp 5.0.6 REQUIRED)
 endif()
 
 # The DSSP code is in a separate library, optionally to be used by others


=====================================
changelog
=====================================
@@ -1,3 +1,7 @@
+Version 4.2.2
+- Building for CCP4
+- Fix is_cis
+
 Version 4.2.1
 - The previous version was a bit overly strict
 - Introduce a --quiet flag.


=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+dssp (4.2.2-1) unstable; urgency=medium
+
+  * New upstream. 
+
+ -- Maarten L. Hekkelman <maarten at hekkelman.com>  Thu, 02 Feb 2023 10:05:57 +0100
+
 dssp (4.2.1-1) unstable; urgency=medium
 
   * New upstream.


=====================================
include/dssp.hpp
=====================================
@@ -29,10 +29,10 @@
 /// \file DSSP.hpp
 /// Calculate DSSP-like secondary structure information.
 
-#include <filesystem>
-
 #include <cif++.hpp>
 
+#include <filesystem>
+
 class dssp
 {
   public:
@@ -143,7 +143,7 @@ class dssp
 		float omega() const;
 
 		bool is_pre_pro() const;
-		bool is_cis() const { return omega() < 30.0f; }
+		bool is_cis() const { return std::abs(omega()) < 30.0f; }
 
 		float chiral_volume() const;
 		std::size_t nr_of_chis() const;


=====================================
libconfig/CMakeLists.txt deleted
=====================================
@@ -1,117 +0,0 @@
-# Copyright Maarten L. Hekkelman, 2022
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-cmake_minimum_required(VERSION 3.16)
-
-# set the project name
-project(libconfig VERSION 1.2.0 LANGUAGES CXX)
-
-include(GNUInstallDirs)
-include(CMakePackageConfigHelpers)
-include(Dart)
-
-set(CXX_EXTENSIONS OFF)
-set(CMAKE_CXX_STANDARD 17 CACHE STRING "The minimum version of C++ required for this library")
-set(CMAKE_CXX_STANDARD_REQUIRED ON)
-
-option(ENABLE_TESTING "Build the unit test applications" OFF)
-
-if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers")
-elseif(MSVC)
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
-endif()
-
-if(MSVC)
-	# make msvc standards compliant...
-	add_compile_options(/permissive-)
-
-	macro(get_WIN32_WINNT version)
-		if(WIN32 AND CMAKE_SYSTEM_VERSION)
-			set(ver ${CMAKE_SYSTEM_VERSION})
-			string(REPLACE "." "" ver ${ver})
-			string(REGEX REPLACE "([0-9])" "0\\1" ver ${ver})
-
-			set(${version} "0x${ver}")
-		endif()
-	endmacro()
-
-	get_WIN32_WINNT(ver)
-	add_definitions(-D_WIN32_WINNT=${ver})
-endif()
-
-add_library(libconfig INTERFACE)
-add_library(libconfig::libconfig ALIAS libconfig)
-
-target_include_directories(libconfig INTERFACE
-	$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
-	$<INSTALL_INTERFACE:include>
-)
-
-# adding header sources just helps IDEs
-target_sources(libconfig INTERFACE
-	$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>$<INSTALL_INTERFACE:include>/cfg.hpp
-)
-
-set_target_properties(libconfig PROPERTIES PUBLIC_HEADER include/cfg.hpp)
-
-# installation
-set(version_config "${CMAKE_CURRENT_BINARY_DIR}/libconfigConfigVersion.cmake")
-
-set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_INCLUDEDIR})
-
-write_basic_package_version_file("${version_config}"
-	VERSION ${PROJECT_VERSION}
-	COMPATIBILITY SameMajorVersion)
-
-install(TARGETS libconfig
-	EXPORT libconfigConfig
-	PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
-
-install(
-	DIRECTORY include/cfg
-	DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
-	COMPONENT Devel
-)
-
-export(TARGETS libconfig NAMESPACE libconfig:: FILE libconfigTargets.cmake)
-
-if(WIN32 AND NOT CYGWIN)
-	set(CONFIG_LOC CMake)
-else()
-	set(CONFIG_LOC "${CMAKE_INSTALL_LIBDIR}/cmake/libconfig")
-endif()
-
-configure_package_config_file(
-	${PROJECT_SOURCE_DIR}/cmake/libconfigConfig.cmake.in
-	${PROJECT_SOURCE_DIR}/cmake/libconfigConfig.cmake
-	INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/libconfig
-	PATH_VARS INCLUDE_INSTALL_DIR
-)
-
-install(EXPORT libconfigConfig
-	FILE libconfigTargets.cmake
-	NAMESPACE libconfig::
-	DESTINATION ${CONFIG_LOC})
-
-install(
-	FILES cmake/libconfigConfig.cmake "${version_config}"
-	DESTINATION ${CONFIG_LOC})
-
-# if(ENABLE_TESTING)
-# 	enable_testing()
-
-# 	add_executable(libconfig-unit-test ${PROJECT_SOURCE_DIR}/test/unit-test.cpp)
-
-# 	target_link_libraries(libconfig-unit-test libconfig::libconfig)
-
-# 	if(MSVC)
-# 		# Specify unwind semantics so that MSVC knowns how to handle exceptions
-# 		target_compile_options(libconfig-unit-test PRIVATE /EHsc)
-# 	endif()
-
-# 	add_test(NAME libconfig-unit-test
-# 		COMMAND $<TARGET_FILE:libconfig-unit-test> -- ${PROJECT_SOURCE_DIR}/test)
-# endif()


=====================================
libconfig/README.md deleted
=====================================
@@ -1,72 +0,0 @@
-# libconfig
-
-A library for parsing command line arguments and making them available throughout a program.
-
-## Synopsis
-
-```c++
-#include <cfg.hpp>
-
-int VERBOSE = 0;
-
-int main(int argc, char * const argv[])
-{
-    // config is a singleton class
-    auto &config = cfg::config::instance();
-
-    // Tell config what options to accept
-    // This can be done more than once, replacing
-    // the current set of options.
-    config.init("usage: test [options] input output",
-        cfg::make_option("verbose,v", "Use verbose output"),
-        cfg::make_option("help,h", "Show this help"),
-        cfg::make_option<std::string>("opt1", "foo", "First option"),
-        cfg::make_option<std::string>("config", "Name of a config file to use"),
-        cfg::make_option<float>("float-value,f", "Another option")
-    );
-
-    // Do the parsing of argv
-    config.parse(argc, argv);
-
-    // Set verbose based on number of times the
-    // -v or --verbose flag was passed
-    VERBOSE = config.count("verbose");
-
-    // Check for the help flag
-    if (config.has("help"))
-    {
-        // print out the options to the screen
-        std::cout << config << std::endl;
-        exit(0);
-    }
-
-    // Optionally read a config file
-    // Config file is by default called myapp.conf
-    // but can be overridden with the --config parameter
-    // Files will be located in current dictory and /etc
-    if (config.has("config"))
-        config.parse_config_file("config", "myapp.conf",
-            { fs::current_path().string(), "/etc/" }
-        );
-
-    // Operands are parameters that are not options
-    // E.g. filenames to process
-    if (config.operands().size() != 2)
-    {
-        std::cerr << config << std::endl;
-        exit(1);
-    }
-
-    std::filesystem::path input = config.operands().front();
-    std::filesystem::path output = config.operands().back();
-    
-    // Get values from options with a value
-    std::option1 = config.get<std::string>("opt1");
-    float option2 = 3.14;
-    if (config.has("float-value"))
-        option2 = config.get<float>("float-value");
-
-    ... etc
-
-}
-```


=====================================
libconfig/changelog deleted
=====================================
@@ -1,17 +0,0 @@
-Version 1.1.1
-- Better support for older GCC compilers
-Version 1.2.0
-- New, tuples base implementation
-- Add 'usage' parameter to init
-
-Version 1.1.0
-- Parse config files
-
-Version 1.0.2
-- Fix get_terminal_width. Should be inline of course.
-
-Version 1.0.1
-- printing options, word-wrapped
-
-Version 1.0.0
-- initial release
\ No newline at end of file


=====================================
libconfig/cmake/libconfigConfig.cmake deleted
=====================================
@@ -1,29 +0,0 @@
-
-####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
-####### Any changes to this file will be overwritten by the next CMake run ####
-####### The input file was libconfigConfig.cmake.in                            ########
-
-get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)
-
-macro(set_and_check _var _file)
-  set(${_var} "${_file}")
-  if(NOT EXISTS "${_file}")
-    message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
-  endif()
-endmacro()
-
-macro(check_required_components _NAME)
-  foreach(comp ${${_NAME}_FIND_COMPONENTS})
-    if(NOT ${_NAME}_${comp}_FOUND)
-      if(${_NAME}_FIND_REQUIRED_${comp})
-        set(${_NAME}_FOUND FALSE)
-      endif()
-    endif()
-  endforeach()
-endmacro()
-
-####################################################################################
-
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/libconfigTargets.cmake")
-
-check_required_components(libconfig)


=====================================
libconfig/cmake/libconfigConfig.cmake.in deleted
=====================================
@@ -1,5 +0,0 @@
- at PACKAGE_INIT@
-
-INCLUDE("${CMAKE_CURRENT_LIST_DIR}/libconfigTargets.cmake")
-
-check_required_components(libconfig)


=====================================
libconfig/include/cfg.hpp deleted
=====================================
@@ -1,928 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2022 Maarten L. Hekkelman
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following disclaimer
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 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.
- */
-
-#pragma once
-
-/// \file cfg.hpp
-/// This header-only library contains code to parse argc/argv and store the
-/// values contained therein into a singleton object.
-
-#include <cassert>
-#include <cstring>
-
-#include <any>
-#include <charconv>
-#include <deque>
-#include <filesystem>
-#include <fstream>
-#include <memory>
-#include <optional>
-#include <type_traits>
-#include <vector>
-
-#include <cfg/text.hpp>
-#include <cfg/utilities.hpp>
-
-namespace cfg
-{
-
-// we use the new system_error stuff.
-
-enum class config_error
-{
-	unknown_option = 1,
-	option_does_not_accept_argument,
-	missing_argument_for_option,
-	option_not_specified,
-	invalid_config_file
-};
-
-class config_category_impl : public std::error_category
-{
-  public:
-	const char *name() const noexcept override
-	{
-		return "configuration";
-	}
-
-	std::string message(int ev) const override
-	{
-		switch (static_cast<config_error>(ev))
-		{
-			case config_error::unknown_option:
-				return "unknown option";
-			case config_error::option_does_not_accept_argument:
-				return "option does not accept argument";
-			case config_error::missing_argument_for_option:
-				return "missing argument for option";
-			case config_error::option_not_specified:
-				return "option was not specified";
-			case config_error::invalid_config_file:
-				return "config file contains a syntax error";
-			default:
-				assert(false);
-				return "unknown error code";
-		}
-	}
-
-	bool equivalent(const std::error_code &code, int condition) const noexcept override
-	{
-		return false;
-	}
-};
-
-inline std::error_category &config_category()
-{
-	static config_category_impl instance;
-	return instance;
-}
-
-inline std::error_code make_error_code(config_error e)
-{
-	return std::error_code(static_cast<int>(e), config_category());
-}
-
-inline std::error_condition make_error_condition(config_error e)
-{
-	return std::error_condition(static_cast<int>(e), config_category());
-}
-
-// --------------------------------------------------------------------
-// Some template wizardry to detect containers, needed to have special
-// handling of options that can be repeated.
-
-template <typename T>
-using iterator_t = typename T::iterator;
-
-template <typename T>
-using value_type_t = typename T::value_type;
-
-template <typename T>
-using std_string_npos_t = decltype(T::npos);
-
-template <typename T, typename = void>
-struct is_container_type : std::false_type
-{
-};
-
-template <typename T>
-struct is_container_type<T,
-	std::enable_if_t<
-		std::experimental::is_detected_v<value_type_t, T> and
-		std::experimental::is_detected_v<iterator_t, T> and
-		not std::experimental::is_detected_v<std_string_npos_t, T>>> : std::true_type
-{
-};
-
-template <typename T>
-inline constexpr bool is_container_type_v = is_container_type<T>::value;
-
-// --------------------------------------------------------------------
-// The options classes
-
-namespace detail
-{
-	// The option traits classes are used to convert from the string-based
-	// command line argument to the type that should be stored.
-	// In fact, here is where the command line arguments are checked for
-	// proper formatting.
-	template <typename T, typename = void>
-	struct option_traits;
-
-	template <typename T>
-	struct option_traits<T, typename std::enable_if_t<std::is_arithmetic_v<T>>>
-	{
-		using value_type = T;
-
-		static value_type set_value(std::string_view argument, std::error_code &ec)
-		{
-			value_type value{};
-			auto r = charconv<value_type>::from_chars(argument.begin(), argument.end(), value);
-			if (r.ec != std::errc())
-				ec = std::make_error_code(r.ec);
-			return value;
-		}
-
-		static std::string to_string(const T &value)
-		{
-			char b[32];
-			auto r = charconv<value_type>::to_chars(b, b + sizeof(b), value);
-			if (r.ec != std::errc())
-				throw std::system_error(std::make_error_code(r.ec));
-			return { b, r.ptr };
-		}
-	};
-
-	template <>
-	struct option_traits<std::filesystem::path>
-	{
-		using value_type = std::filesystem::path;
-
-		static value_type set_value(std::string_view argument, std::error_code &ec)
-		{
-			return value_type{ argument };
-		}
-
-		static std::string to_string(const std::filesystem::path &value)
-		{
-			return value.string();
-		}
-	};
-
-	template <typename T>
-	struct option_traits<T, typename std::enable_if_t<not std::is_arithmetic_v<T> and std::is_assignable_v<std::string, T>>>
-	{
-		using value_type = std::string;
-
-		static value_type set_value(std::string_view argument, std::error_code &ec)
-		{
-			return value_type{ argument };
-		}
-
-		static std::string to_string(const T &value)
-		{
-			return { value };
-		}
-	};
-
-	// The Options. The reason to have this weird constructing of
-	// polymorphic options based on templates is to have a very
-	// simple interface. The disadvantage is that the options have
-	// to be copied during the construction of the config object.
-
-	struct option_base
-	{
-		std::string m_name;        ///< The long argument name
-		std::string m_desc;        ///< The description of the argument
-		char m_short_name;         ///< The single character name of the argument, can be zero
-		bool m_is_flag = true,     ///< When true, this option does not allow arguments
-			m_has_default = false, ///< When true, this option has a default value.
-			m_multi = false,       ///< When true, this option allows mulitple values.
-			m_hidden;              ///< When true, this option is hidden from the help text
-		int m_seen = 0;            ///< How often the option was seen on the command line
-
-		option_base(const option_base &rhs) = default;
-
-		option_base(std::string_view name, std::string_view desc, bool hidden)
-			: m_name(name)
-			, m_desc(desc)
-			, m_short_name(0)
-			, m_hidden(hidden)
-		{
-			if (m_name.length() == 1)
-				m_short_name = m_name.front();
-			else if (m_name.length() > 2 and m_name[m_name.length() - 2] == ',')
-			{
-				m_short_name = m_name.back();
-				m_name.erase(m_name.end() - 2, m_name.end());
-			}
-		}
-
-		virtual ~option_base() = default;
-
-		virtual void set_value(std::string_view value, std::error_code &ec)
-		{
-			assert(false);
-		}
-
-		virtual std::any get_value() const
-		{
-			return {};
-		}
-
-		virtual std::string get_default_value() const
-		{
-			return {};
-		}
-
-		uint32_t width() const
-		{
-			uint32_t result = m_name.length();
-			if (result <= 1)
-				result = 2;
-			else if (m_short_name != 0)
-				result += 7;
-			if (not m_is_flag)
-			{
-				result += 4;
-				if (m_has_default)
-					result += 4 + get_default_value().length();
-			}
-			return result + 6;
-		}
-
-		void write(std::ostream &os, uint32_t width) const
-		{
-			uint32_t w2 = 2;
-			os << "  ";
-			if (m_short_name)
-			{
-				os << '-' << m_short_name;
-				w2 += 2;
-				if (m_name.length() > 1)
-				{
-					os << " [ --" << m_name << " ]";
-					w2 += 7 + m_name.length();
-				}
-			}
-			else
-			{
-				os << "--" << m_name;
-				w2 += 2 + m_name.length();
-			}
-
-			if (not m_is_flag)
-			{
-				os << " arg";
-				w2 += 4;
-
-				if (m_has_default)
-				{
-					auto default_value = get_default_value();
-					os << " (=" << default_value << ')';
-					w2 += 4 + default_value.length();
-				}
-			}
-
-			auto leading_spaces = width;
-			if (w2 + 2 > width)
-				os << std::endl;
-			else
-				leading_spaces = width - w2;
-
-			word_wrapper ww(m_desc, get_terminal_width() - width);
-			for (auto line : ww)
-			{
-				os << std::string(leading_spaces, ' ') << line << std::endl;
-				leading_spaces = width;
-			}
-		}
-	};
-
-	template <typename T>
-	struct option : public option_base
-	{
-		using traits_type = option_traits<T>;
-		using value_type = typename option_traits<T>::value_type;
-
-		std::optional<value_type> m_value;
-
-		option(const option &rhs) = default;
-
-		option(std::string_view name, std::string_view desc, bool hidden)
-			: option_base(name, desc, hidden)
-		{
-			m_is_flag = false;
-		}
-
-		option(std::string_view name, const value_type &default_value, std::string_view desc, bool hidden)
-			: option(name, desc, hidden)
-		{
-			m_has_default = true;
-			m_value = default_value;
-		}
-
-		void set_value(std::string_view argument, std::error_code &ec) override
-		{
-			m_value = traits_type::set_value(argument, ec);
-		}
-
-		std::any get_value() const override
-		{
-			std::any result;
-			if (m_value)
-				result = *m_value;
-			return result;
-		}
-
-		std::string get_default_value() const override
-		{
-			if constexpr (std::is_same_v<value_type, std::string>)
-				return *m_value;
-			else
-				return traits_type::to_string(*m_value);
-		}
-	};
-
-	template <typename T>
-	struct multiple_option : public option_base
-	{
-		using value_type = typename T::value_type;
-		using traits_type = option_traits<value_type>;
-
-		std::vector<value_type> m_values;
-
-		multiple_option(const multiple_option &rhs) = default;
-
-		multiple_option(std::string_view name, std::string_view desc, bool hidden)
-			: option_base(name, desc, hidden)
-		{
-			m_is_flag = false;
-			m_multi = true;
-		}
-
-		void set_value(std::string_view argument, std::error_code &ec) override
-		{
-			m_values.emplace_back(traits_type::set_value(argument, ec));
-		}
-
-		std::any get_value() const override
-		{
-			return { m_values };
-		}
-	};
-
-	template <>
-	struct option<void> : public option_base
-	{
-		option(const option &rhs) = default;
-
-		option(std::string_view name, std::string_view desc, bool hidden)
-			: option_base(name, desc, hidden)
-		{
-		}
-	};
-
-} // namespace detail
-
-// --------------------------------------------------------------------
-/// \brief A singleton class. Use config::instance to create an instance
-
-class config
-{
-  public:
-	using option_base = detail::option_base;
-
-	void set_usage(std::string_view usage)
-	{
-		m_usage = usage;
-	}
-
-	/// \brief Initialise a config instance with a \a usage message and a set of \a options
-	template <typename... Options>
-	void init(std::string_view usage, Options... options)
-	{
-		m_usage = usage;
-		m_impl.reset(new config_impl(std::forward<Options>(options)...));
-	}
-
-	void set_ignore_unknown(bool ignore_unknown)
-	{
-		m_ignore_unknown = ignore_unknown;
-	}
-
-	static config &instance()
-	{
-		static std::unique_ptr<config> s_instance;
-		if (not s_instance)
-			s_instance.reset(new config);
-		return *s_instance;
-	}
-
-	bool has(std::string_view name) const
-	{
-		auto opt = m_impl->get_option(name);
-		return opt != nullptr and (opt->m_seen > 0 or opt->m_has_default);
-	}
-
-	int count(std::string_view name) const
-	{
-		auto opt = m_impl->get_option(name);
-		return opt ? opt->m_seen : 0;
-	}
-
-	template <typename T>
-	auto get(std::string_view name) const
-	{
-		auto opt = m_impl->get_option(name);
-		if (opt == nullptr)
-			throw std::system_error(make_error_code(config_error::unknown_option), std::string{ name });
-
-		std::any value = opt->get_value();
-
-		if (not value.has_value())
-			throw std::system_error(make_error_code(config_error::option_not_specified), std::string{ name });
-
-		return std::any_cast<T>(value);
-	}
-
-	const std::vector<std::string> &operands() const
-	{
-		return m_impl->m_operands;
-	}
-
-	friend std::ostream &operator<<(std::ostream &os, const config &conf)
-	{
-		uint32_t terminal_width = get_terminal_width();
-
-		if (not conf.m_usage.empty())
-			os << conf.m_usage << std::endl;
-
-		uint32_t options_width = conf.m_impl->get_option_width();
-
-		if (options_width > terminal_width / 2)
-			options_width = terminal_width / 2;
-
-		conf.m_impl->write(os, options_width);
-
-		return os;
-	}
-
-	// --------------------------------------------------------------------
-
-	void parse(int argc, const char *const argv[])
-	{
-		std::error_code ec;
-		parse(argc, argv, ec);
-		if (ec)
-			throw std::system_error(ec);
-	}
-
-	void parse_config_file(std::string_view config_option, std::string_view config_file_name,
-		std::initializer_list<std::string_view> search_dirs)
-	{
-		std::error_code ec;
-		parse_config_file(config_option, config_file_name, search_dirs, ec);
-		if (ec)
-			throw std::system_error(ec);
-	}
-
-	void parse_config_file(std::string_view config_option, std::string_view config_file_name,
-		std::initializer_list<std::string_view> search_dirs, std::error_code &ec)
-	{
-		std::string file_name{ config_file_name };
-		if (has(config_option))
-			file_name = get<std::string>(config_option);
-
-		for (std::filesystem::path dir : search_dirs)
-		{
-			std::ifstream file(dir / file_name);
-
-			if (not file.is_open())
-				continue;
-
-			parse_config_file(file, ec);
-			break;
-		}
-	}
-
-	void parse_config_file(const std::filesystem::path &file, std::error_code &ec)
-	{
-		std::ifstream is(file);
-		if (is.is_open())
-			parse_config_file(is, ec);
-	}
-
-	static bool is_name_char(int ch)
-	{
-		return std::isalnum(ch) or ch == '_' or ch == '-';
-	}
-
-	static constexpr bool is_eoln(int ch)
-	{
-		return ch == '\n' or ch == '\r' or ch == std::char_traits<char>::eof();
-	}
-
-	void parse_config_file(std::istream &is, std::error_code &ec)
-	{
-		auto &buffer = *is.rdbuf();
-
-		enum class State
-		{
-			NAME_START,
-			COMMENT,
-			NAME,
-			ASSIGN,
-			VALUE_START,
-			VALUE
-		} state = State::NAME_START;
-
-		std::string name, value;
-
-		for (;;)
-		{
-			auto ch = buffer.sbumpc();
-
-			switch (state)
-			{
-				case State::NAME_START:
-					if (is_name_char(ch))
-					{
-						name = { static_cast<char>(ch) };
-						value.clear();
-						state = State::NAME;
-					}
-					else if (ch == '#')
-						state = State::COMMENT;
-					else if (ch != ' ' and ch != '\t' and not is_eoln(ch))
-						ec = make_error_code(config_error::invalid_config_file);
-					break;
-
-				case State::COMMENT:
-					if (is_eoln(ch))
-						state = State::NAME_START;
-					break;
-
-				case State::NAME:
-					if (is_name_char(ch))
-						name.insert(name.end(), static_cast<char>(ch));
-					else if	(is_eoln(ch))
-					{
-						auto opt = m_impl->get_option(name);
-
-						if (opt == nullptr)
-						{
-							if (not m_ignore_unknown)
-								ec = make_error_code(config_error::unknown_option);
-						}
-						else if (not opt->m_is_flag)
-							ec = make_error_code(config_error::missing_argument_for_option);
-						else
-							++opt->m_seen;
-
-						state = State::NAME_START;
-					}
-					else
-					{
-						buffer.sungetc();
-						state = State::ASSIGN;
-					}
-					break;
-
-				case State::ASSIGN:
-					if (ch == '=')
-						state = State::VALUE_START;
-					else if (is_eoln(ch))
-					{
-						auto opt = m_impl->get_option(name);
-
-						if (opt == nullptr)
-						{
-							if (not m_ignore_unknown)
-								ec = make_error_code(config_error::unknown_option);
-						}
-						else if (not opt->m_is_flag)
-							ec = make_error_code(config_error::missing_argument_for_option);
-						else
-							++opt->m_seen;
-
-						state = State::NAME_START;
-					}
-					else if (ch != ' ' and ch != '\t')
-						ec = make_error_code(config_error::invalid_config_file);
-					break;
-
-				case State::VALUE_START:
-				case State::VALUE:
-					if (is_eoln(ch))
-					{
-						auto opt = m_impl->get_option(name);
-
-						if (opt == nullptr)
-						{
-							if (not m_ignore_unknown)
-								ec = make_error_code(config_error::unknown_option);
-						}
-						else if (opt->m_is_flag)
-							ec = make_error_code(config_error::option_does_not_accept_argument);
-						else if (not value.empty() and (opt->m_seen == 0 or opt->m_multi))
-						{
-							opt->set_value(value, ec);
-							++opt->m_seen;
-						}
-
-						state = State::NAME_START;
-					}
-					else if (state == State::VALUE)
-						value.insert(value.end(), static_cast<char>(ch));
-					else if (ch != ' ' and ch != '\t')
-					{
-						value = { static_cast<char>(ch) };
-						state = State::VALUE;
-					}
-					break;
-			}
-
-			if (ec or ch == std::char_traits<char>::eof())
-				break;
-		}
-	}
-
-	void parse(int argc, const char *const argv[], std::error_code &ec)
-	{
-		using namespace std::literals;
-
-		enum class State
-		{
-			options,
-			operands
-		} state = State::options;
-
-		for (int i = 1; i < argc and not ec; ++i)
-		{
-			const char *arg = argv[i];
-
-			if (arg == nullptr) // should not happen
-				break;
-
-			if (state == State::options)
-			{
-				if (*arg != '-') // according to POSIX this is the end of options, start operands
-				                 // state = State::operands;
-				{                // however, people nowadays expect to be able to mix operands and options
-					m_impl->m_operands.emplace_back(arg);
-					continue;
-				}
-				else if (arg[1] == '-' and arg[2] == 0)
-				{
-					state = State::operands;
-					continue;
-				}
-			}
-
-			if (state == State::operands)
-			{
-				m_impl->m_operands.emplace_back(arg);
-				continue;
-			}
-
-			option_base *opt = nullptr;
-			std::string_view opt_arg;
-
-			assert(*arg == '-');
-			++arg;
-
-			if (*arg == '-') // double --, start of new argument
-			{
-				++arg;
-
-				assert(*arg != 0); // this should not happen, as it was checked for before
-
-				std::string_view s_arg(arg);
-				std::string_view::size_type p = s_arg.find('=');
-
-				if (p != std::string_view::npos)
-				{
-					opt_arg = s_arg.substr(p + 1);
-					s_arg = s_arg.substr(0, p);
-				}
-
-				opt = m_impl->get_option(s_arg);
-				if (opt == nullptr)
-				{
-					if (not m_ignore_unknown)
-						ec = make_error_code(config_error::unknown_option);
-					continue;
-				}
-
-				if (opt->m_is_flag)
-				{
-					if (not opt_arg.empty())
-						ec = make_error_code(config_error::option_does_not_accept_argument);
-
-					++opt->m_seen;
-					continue;
-				}
-
-				++opt->m_seen;
-			}
-			else // single character options
-			{
-				bool expect_option_argument = false;
-
-				while (*arg != 0 and not ec)
-				{
-					opt = m_impl->get_option(*arg++);
-
-					if (opt == nullptr)
-					{
-						if (not m_ignore_unknown)
-							ec = make_error_code(config_error::unknown_option);
-						continue;
-					}
-
-					++opt->m_seen;
-					if (opt->m_is_flag)
-						continue;
-
-					opt_arg = arg;
-					expect_option_argument = true;
-					break;
-				}
-
-				if (not expect_option_argument)
-					continue;
-			}
-
-			if (opt_arg.empty() and i + 1 < argc) // So, the = character was not present, the next arg must be the option argument
-			{
-				++i;
-				opt_arg = argv[i];
-			}
-
-			if (opt_arg.empty())
-				ec = make_error_code(config_error::missing_argument_for_option);
-			else
-				opt->set_value(opt_arg, ec);
-		}
-	}
-
-  private:
-	config() = default;
-	config(const config &) = delete;
-	config &operator=(const config &) = delete;
-
-	struct config_impl_base
-	{
-		virtual ~config_impl_base() = default;
-
-		virtual option_base *get_option(std::string_view name) = 0;
-		virtual option_base *get_option(char short_name) = 0;
-
-		virtual uint32_t get_option_width() const = 0;
-		virtual void write(std::ostream &os, uint32_t width) const = 0;
-
-		std::vector<std::string> m_operands;
-	};
-
-	template <typename... Options>
-	struct config_impl : public config_impl_base
-	{
-		static constexpr size_t N = sizeof...(Options);
-
-		config_impl(Options... options)
-			: m_options(std::forward<Options>(options)...)
-		{
-		}
-
-		option_base *get_option(std::string_view name) override
-		{
-			return get_option<0>(name);
-		}
-
-		template<size_t Ix>
-		option_base *get_option([[maybe_unused]] std::string_view name)
-		{
-			if constexpr (Ix == N)
-				return nullptr;
-			else
-			{
-				option_base &opt = std::get<Ix>(m_options);
-				return (opt.m_name == name) ? &opt : get_option<Ix + 1>(name);
-			}
-		}
-
-		option_base *get_option(char short_name) override
-		{
-			return get_option<0>(short_name);
-		}
-
-		template<size_t Ix>
-		option_base *get_option([[maybe_unused]] char short_name)
-		{
-			if constexpr (Ix == N)
-				return nullptr;
-			else
-			{
-				option_base &opt = std::get<Ix>(m_options);
-				return (opt.m_short_name == short_name) ? &opt : get_option<Ix + 1>(short_name);
-			}
-		}
-
-		virtual uint32_t get_option_width() const override
-		{
-			return std::apply([](Options const& ...opts) {
-				uint32_t width = 0;
-				((width = std::max(width, opts.width())), ...);
-				return width;
-			}, m_options);
-		}
-
-		virtual void write(std::ostream &os, uint32_t width) const override
-		{
-			std::apply([&os,width](Options const& ...opts) {
-				(opts.write(os, width), ...);
-			}, m_options);
-		}
-
-		std::tuple<Options...> m_options;
-	};
-
-	std::unique_ptr<config_impl_base> m_impl;
-	bool m_ignore_unknown = false;
-	std::string m_usage;
-};
-
-// --------------------------------------------------------------------
-
-template <typename T = void, std::enable_if_t<not is_container_type_v<T>, int> = 0>
-auto make_option(std::string_view name, std::string_view description)
-{
-	return detail::option<T>(name, description, false);
-}
-
-template <typename T = void, std::enable_if_t<not is_container_type_v<T>, int> = 0>
-auto make_hidden_option(std::string_view name, std::string_view description)
-{
-	return detail::option<T>(name, description, true);
-}
-
-template <typename T, std::enable_if_t<not is_container_type_v<T>, int> = 0>
-auto make_option(std::string_view name, const T &v, std::string_view description)
-{
-	return detail::option<T>(name, v, description, false);
-}
-
-template <typename T, std::enable_if_t<not is_container_type_v<T>, int> = 0>
-auto make_hidden_option(std::string_view name, const T &v, std::string_view description)
-{
-	return detail::option<T>(name, v, description, true);
-}
-
-template <typename T, std::enable_if_t<is_container_type_v<T>, int> = 0>
-auto make_option(std::string_view name, std::string_view description)
-{
-	return detail::multiple_option<T>(name, description, false);
-}
-
-template <typename T, std::enable_if_t<is_container_type_v<T>, int> = 0>
-auto make_hidden_option(std::string_view name, std::string_view description)
-{
-	return detail::option<T>(name, description, true);
-}
-
-} // namespace cfg
-
-namespace std
-{
-
-template <>
-struct is_error_condition_enum<cfg::config_error>
-	: public true_type
-{
-};
-
-} // namespace std
\ No newline at end of file


=====================================
libconfig/include/cfg/text.hpp deleted
=====================================
@@ -1,457 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2022 Maarten L. hekkelman
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following disclaimer
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 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.
- */
-
-#pragma once
-
-#include <algorithm>
-#include <charconv>
-#include <cmath>
-#include <experimental/type_traits>
-
-namespace cfg
-{
-
-template <typename T>
-struct my_charconv
-{
-	using value_type = T;
-
-	static std::from_chars_result from_chars(const char *first, const char *last, value_type &value)
-	{
-		std::from_chars_result result{ first, {} };
-
-		enum State
-		{
-			IntegerSign,
-			Integer,
-			Fraction,
-			ExponentSign,
-			Exponent
-		} state = IntegerSign;
-		int sign = 1;
-		unsigned long long vi = 0;
-		long double f = 1;
-		int exponent_sign = 1;
-		int exponent = 0;
-		bool done = false;
-
-		while (not done and result.ec == std::errc())
-		{
-			char ch = result.ptr != last ? *result.ptr : 0;
-			++result.ptr;
-
-			switch (state)
-			{
-				case IntegerSign:
-					if (ch == '-')
-					{
-						sign = -1;
-						state = Integer;
-					}
-					else if (ch == '+')
-						state = Integer;
-					else if (ch >= '0' and ch <= '9')
-					{
-						vi = ch - '0';
-						state = Integer;
-					}
-					else if (ch == '.')
-						state = Fraction;
-					else
-						result.ec = std::errc::invalid_argument;
-					break;
-
-				case Integer:
-					if (ch >= '0' and ch <= '9')
-						vi = 10 * vi + (ch - '0');
-					else if (ch == 'e' or ch == 'E')
-						state = ExponentSign;
-					else if (ch == '.')
-						state = Fraction;
-					else
-					{
-						done = true;
-						--result.ptr;
-					}
-					break;
-
-				case Fraction:
-					if (ch >= '0' and ch <= '9')
-					{
-						vi = 10 * vi + (ch - '0');
-						f /= 10;
-					}
-					else if (ch == 'e' or ch == 'E')
-						state = ExponentSign;
-					else
-					{
-						done = true;
-						--result.ptr;
-					}
-					break;
-
-				case ExponentSign:
-					if (ch == '-')
-					{
-						exponent_sign = -1;
-						state = Exponent;
-					}
-					else if (ch == '+')
-						state = Exponent;
-					else if (ch >= '0' and ch <= '9')
-					{
-						exponent = ch - '0';
-						state = Exponent;
-					}
-					else
-						result.ec = std::errc::invalid_argument;
-					break;
-
-				case Exponent:
-					if (ch >= '0' and ch <= '9')
-						exponent = 10 * exponent + (ch - '0');
-					else
-					{
-						done = true;
-						--result.ptr;
-					}
-					break;
-			}
-		}
-
-		if (result.ec == std::errc())
-		{
-			long double v = f * vi * sign;
-			if (exponent != 0)
-				v *= std::pow(10, exponent * exponent_sign);
-
-			if (std::isnan(v))
-				result.ec = std::errc::invalid_argument;
-			else if (std::abs(v) > std::numeric_limits<value_type>::max())
-				result.ec = std::errc::result_out_of_range;
-
-			value = static_cast<value_type>(v);
-		}
-
-		return result;
-	}
-
-	template <typename Iterator, std::enable_if_t<std::is_floating_point_v<T>, int> = 0>
-	static std::to_chars_result to_chars(Iterator first, Iterator last, const T &value)
-	{
-		int size = last - first;
-		int r;
-
-		if constexpr (std::is_same_v<T, long double>)
-			r = snprintf(first, last - first, "%lg", value);
-		else
-			r = snprintf(first, last - first, "%g", value);
-
-		std::to_chars_result result;
-		if (r < 0 or r >= size)
-			result = { first, std::errc::value_too_large };
-		else
-			result = { first + r, std::errc() };
-
-		return result;
-	}
-};
-
-template <typename T>
-struct std_charconv
-{
-	static std::from_chars_result from_chars(const char *a, const char *b, T &d)
-	{
-		return std::from_chars(a, b, d);
-	}
-
-	template<typename Iterator>
-	static std::to_chars_result to_chars(Iterator a, Iterator b, const T &value)
-	{
-		return std::to_chars(a, b, value);
-	}
-};
-
-template <typename T>
-using from_chars_function = decltype(std::from_chars(std::declval<const char *>(), std::declval<const char *>(), std::declval<T &>()));
-
-template <typename T>
-using charconv = typename std::conditional_t<std::experimental::is_detected_v<from_chars_function, T>, std_charconv<T>, my_charconv<T>>;
-
-// --------------------------------------------------------------------
-/// Simplified line breaking code taken from a decent text editor.
-/// In this case, simplified means it only supports ASCII.
-/// The algorithm uses dynamic programming to find the optimal
-/// separation in lines.
-
-class word_wrapper : public std::vector<std::string_view>
-{
-  public:
-	word_wrapper(std::string_view text, size_t width)
-		: m_width(width)
-	{
-		std::string_view::size_type line_start = 0, line_end = text.find('\n');
-		
-		for (;;)
-		{
-			auto line = text.substr(line_start, line_end - line_start);
-			if (line.empty())
-				this->push_back(line);
-			else
-			{
-				auto lines = wrap_line(line);
-				this->insert(this->end(), lines.begin(), lines.end());
-			}
-
-			if (line_end == std::string_view::npos)
-				break;
-
-			line_start = line_end + 1;
-			line_end = text.find('\n', line_start);
-		}
-	}
-
-  private:
-	std::vector<std::string_view> wrap_line(std::string_view line)
-	{
-		std::vector<std::string_view> result;
-		std::vector<size_t> offsets = { 0 };
-
-		auto b = line.begin();
-		while (b != line.end())
-		{
-			auto e = next_line_break(b, line.end());
-
-			offsets.push_back(e - line.begin());
-
-			b = e;
-		}
-
-		size_t count = offsets.size() - 1;
-
-		std::vector<size_t> minima(count + 1, std::numeric_limits<size_t>::max());
-		minima[0] = 0;
-		std::vector<size_t> breaks(count + 1, 0);
-
-		for (size_t i = 0; i < count; ++i)
-		{
-			size_t j = i + 1;
-			while (j <= count)
-			{
-				size_t w = offsets[j] - offsets[i];
-
-				if (w > m_width)
-					break;
-
-				while (w > 0 and std::isspace(line[offsets[i] + w - 1]))
-					--w;
-
-				size_t cost = minima[i];
-				if (j < count) // last line may be shorter
-					cost += (m_width - w) * (m_width - w);
-
-				if (cost < minima[j])
-				{
-					minima[j] = cost;
-					breaks[j] = i;
-				}
-
-				++j;
-			}
-		}
-
-		size_t j = count;
-		while (j > 0)
-		{
-			size_t i = breaks[j];
-			result.push_back(line.substr(offsets[i], offsets[j] - offsets[i]));
-			j = i;
-		}
-
-		reverse(result.begin(), result.end());
-
-		return result;
-	}
-
-	std::string_view::const_iterator next_line_break(std::string_view::const_iterator text, std::string_view::const_iterator end)
-	{
-		if (text == end)
-			return text;
-
-		enum LineBreakClass
-		{
-			OP, // OpenPunctuation,
-			CL, // ClosePunctuation,
-			CP, // CloseParenthesis,
-			QU, // Quotation,
-			// GL, // NonBreaking,
-			// NS, // Nonstarter,
-			EX, // Exlamation,
-			SY, // SymbolAllowingBreakAfter,
-			IS, // InfixNumericSeparator,
-			PR, // PrefixNumeric,
-			PO, // PostfixNumeric,
-			NU, // Numeric,
-			AL, // Alphabetic,
-			// ID, // Ideographic,
-			// IN, // Inseperable,
-			HY, // Hyphen,
-			BA, // BreakAfter,
-			// BB, // BreakBefor,
-			// B2, // BreakOpportunityBeforeAndAfter,
-			// ZW, // ZeroWidthSpace,
-			CM, // CombiningMark,
-			WJ, // WordJoiner,
-			// H2, // HangulLVSyllable,
-			// H3, // HangulLVTSyllable,
-			// JL, // HangulLJamo,
-			// JV, // HangulVJamo,
-			// JT, // HangulTJamo,
-
-			MB, // MandatoryBreak,
-			CR, // CarriageReturn,
-			LF, // LineFeed,
-			// NL, // NextLine,
-			// SU, // Surrogate,
-			SP, // Space,
-			// CB, // ContigentBreakOpportunity,
-			// AM, // Ambiguous,
-			// CC, // ComplexContext,
-			UN, // Unknown
-		};
-
-		static const LineBreakClass kASCII_LineBreakTable[128] = {
-			CM, CM, CM, CM, CM, CM, CM, CM,
-			CM, BA, LF, MB, MB, CR, CM, CM,
-			CM, CM, CM, CM, CM, CM, CM, CM,
-			CM, CM, CM, CM, CM, CM, CM, CM,
-			SP, EX, QU, AL, PR, PO, AL, QU,
-			OP, CP, AL, PR, IS, HY, IS, SY,
-			NU, NU, NU, NU, NU, NU, NU, NU,
-			NU, NU, IS, IS, AL, AL, AL, EX,
-			AL, AL, AL, AL, AL, AL, AL, AL,
-			AL, AL, AL, AL, AL, AL, AL, AL,
-			AL, AL, AL, AL, AL, AL, AL, AL,
-			AL, AL, AL, OP, PR, CP, AL, AL,
-			AL, AL, AL, AL, AL, AL, AL, AL,
-			AL, AL, AL, AL, AL, AL, AL, AL,
-			AL, AL, AL, AL, AL, AL, AL, AL,
-			AL, AL, AL, OP, BA, CL, AL, CM
-		};
-
-		enum BreakAction
-		{
-			DBK = 0, // direct break 	(blank in table)
-			IBK,     // indirect break	(% in table)
-			PBK,     // prohibited break (^ in table)
-			CIB,     // combining indirect break
-			CPB      // combining prohibited break
-		};
-
-		// const breakAction brkTable[27][27] = {
-		static const BreakAction brkTable[15][15] = {
-			//         OP   CL   CP   QU   /*GL   NS  */ EX   SY   IS   PR   PO   NU   AL   /*ID   IN  */ HY   BA   /*BB   B2   ZW  */ CM   WJ   /*H2   H3   JL   JV   JT */
-			/* OP */ { PBK, PBK, PBK, PBK, /*PBK, PBK,*/ PBK, PBK, PBK, PBK, PBK, PBK, PBK, /*PBK, PBK,*/ PBK, PBK, /*PBK, PBK, PBK,*/ CPB, PBK, /*PBK, PBK, PBK, PBK, PBK*/ },
-			/* CL */ { DBK, PBK, PBK, IBK, /*IBK, PBK,*/ PBK, PBK, PBK, IBK, IBK, DBK, DBK, /*DBK, DBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, DBK*/ },
-			/* CP */ { DBK, PBK, PBK, IBK, /*IBK, PBK,*/ PBK, PBK, PBK, IBK, IBK, IBK, IBK, /*DBK, DBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, DBK*/ },
-			/* QU */ { PBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, IBK, IBK, IBK, IBK, /*IBK, IBK,*/ IBK, IBK, /*IBK, IBK, PBK,*/ CIB, PBK, /*IBK, IBK, IBK, IBK, IBK*/ },
-			// /* GL */ { IBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, IBK, IBK, IBK, IBK, /*IBK, IBK,*/ IBK, IBK, /*IBK, IBK, PBK,*/ CIB, PBK, /*IBK, IBK, IBK, IBK, IBK*/ },
-			// /* NS */ { DBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, DBK, DBK, DBK, DBK, /*DBK, DBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, DBK*/ },
-			/* EX */ { DBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, DBK, DBK, DBK, DBK, /*DBK, DBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, DBK*/ },
-			/* SY */ { DBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, DBK, DBK, IBK, DBK, /*DBK, DBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, DBK*/ },
-			/* IS */ { DBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, DBK, DBK, IBK, IBK, /*DBK, DBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, DBK*/ },
-			/* PR */ { IBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, DBK, DBK, IBK, IBK, /*IBK, DBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*IBK, IBK, IBK, IBK, IBK*/ },
-			/* PO */ { IBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, DBK, DBK, IBK, IBK, /*DBK, DBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, DBK*/ },
-			/* NU */ { DBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, IBK, IBK, IBK, IBK, /*DBK, IBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, DBK*/ },
-			/* AL */ { DBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, DBK, DBK, IBK, IBK, /*DBK, IBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, DBK*/ },
-			// /* ID */ { DBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, DBK, IBK, DBK, DBK, /*DBK, IBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, DBK*/ },
-			// /* IN */ { DBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, DBK, DBK, DBK, DBK, /*DBK, IBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, DBK*/ },
-			/* HY */ { DBK, PBK, PBK, IBK, /*DBK, IBK,*/ PBK, PBK, PBK, DBK, DBK, IBK, DBK, /*DBK, DBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, DBK*/ },
-			/* BA */ { DBK, PBK, PBK, IBK, /*DBK, IBK,*/ PBK, PBK, PBK, DBK, DBK, DBK, DBK, /*DBK, DBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, DBK*/ },
-			// /* BB */ { IBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, IBK, IBK, IBK, IBK, /*IBK, IBK,*/ IBK, IBK, /*IBK, IBK, PBK,*/ CIB, PBK, /*IBK, IBK, IBK, IBK, IBK*/ },
-			// /* B2 */ { DBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, DBK, DBK, DBK, DBK, /*DBK, DBK,*/ IBK, IBK, /*DBK, PBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, DBK*/ },
-			// /* ZW */ { DBK, DBK, DBK, DBK, /*DBK, DBK,*/ DBK, DBK, DBK, DBK, DBK, DBK, DBK, /*DBK, DBK,*/ DBK, DBK, /*DBK, DBK, PBK,*/ DBK, DBK, /*DBK, DBK, DBK, DBK, DBK*/ },
-			/* CM */ { DBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, DBK, DBK, IBK, IBK, /*DBK, IBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, DBK*/ },
-			/* WJ */ { IBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, IBK, IBK, IBK, IBK, /*IBK, IBK,*/ IBK, IBK, /*IBK, IBK, PBK,*/ CIB, PBK, /*IBK, IBK, IBK, IBK, IBK*/ },
-			// /* H2 */ { DBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, DBK, IBK, DBK, DBK, /*DBK, IBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, IBK, IBK*/ },
-			// /* H3 */ { DBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, DBK, IBK, DBK, DBK, /*DBK, IBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, IBK*/ },
-			// /* JL */ { DBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, DBK, IBK, DBK, DBK, /*DBK, IBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*IBK, IBK, IBK, IBK, DBK*/ },
-			// /* JV */ { DBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, DBK, IBK, DBK, DBK, /*DBK, IBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, IBK, IBK*/ },
-			// /* JT */ { DBK, PBK, PBK, IBK, /*IBK, IBK,*/ PBK, PBK, PBK, DBK, IBK, DBK, DBK, /*DBK, IBK,*/ IBK, IBK, /*DBK, DBK, PBK,*/ CIB, PBK, /*DBK, DBK, DBK, DBK, IBK*/ },
-		};
-
-		uint8_t ch = *text;
-
-		LineBreakClass cls;
-
-		if (ch == '\n')
-			cls = MB;
-		else if (ch < 128)
-		{
-			cls = kASCII_LineBreakTable[ch];
-			if (cls > MB and cls != SP) // duh...
-				cls = AL;
-		}
-		else
-			cls = UN;
-
-		if (cls == SP)
-			cls = WJ;
-
-		LineBreakClass ncls = cls;
-
-		while (++text != end and cls != MB)
-		{
-			ch = *text;
-
-			LineBreakClass lcls = ncls;
-
-			if (ch == '\n')
-			{
-				++text;
-				break;
-			}
-
-			ncls = kASCII_LineBreakTable[ch];
-
-			if (ncls == SP)
-				continue;
-
-			BreakAction brk = brkTable[cls][ncls];
-
-			if (brk == DBK or (brk == IBK and lcls == SP))
-				break;
-
-			cls = ncls;
-		}
-
-		return text;
-	}
-
-	size_t m_width;
-};
-
-} // namespace cfg


=====================================
libconfig/include/cfg/utilities.hpp deleted
=====================================
@@ -1,76 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2022 Maarten L. Hekkelman
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following disclaimer
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 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.
- */
-
-#pragma once
-
-#include <climits>
-#include <cstdint>
-
-#if __has_include(<sys/ioctl.h>)
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <unistd.h>
-#elif defined(_MSC_VER)
-#include <windows.h>
-#endif
-
-namespace cfg
-{
-
-#if defined(_MSC_VER)
-/// @brief Get the width in columns of the current terminal
-/// @return number of columns of the terminal
-inline uint32_t get_terminal_width()
-{
-    CONSOLE_SCREEN_BUFFER_INFO csbi;
-    ::GetConsoleScreenBufferInfo(::GetStdHandle(STD_OUTPUT_HANDLE), &csbi);
-    return csbi.srWindow.Right - csbi.srWindow.Left + 1;
-}
-
-#elif __has_include(<sys/ioctl.h>)
-/// @brief Get the width in columns of the current terminal
-/// @return number of columns of the terminal
-inline uint32_t get_terminal_width()
-{
-	uint32_t result = 80;
-
-	if (::isatty(STDOUT_FILENO))
-	{
-		struct winsize w;
-		::ioctl(0, TIOCGWINSZ, &w);
-		result = w.ws_col;
-	}
-	return result;
-}
-#else
-#warning "Could not find the terminal width, falling back to default"
-inline uint32_t get_terminal_width()
-{
-	return 80;
-}
-#endif
-
-} // namespace cfg
\ No newline at end of file


=====================================
libconfig/test/unit-test.conf deleted
=====================================
@@ -1,3 +0,0 @@
-# A simple test config file
-aap = 2
-noot = 3
\ No newline at end of file


=====================================
libconfig/test/unit-test.cpp deleted
=====================================
@@ -1,527 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2022 Maarten L. Hekkelman
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following disclaimer
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 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.
- */
-
-#define BOOST_TEST_ALTERNATIVE_INIT_API
-#include <boost/test/included/unit_test.hpp>
-
-#include <filesystem>
-
-#include <cfg.hpp>
-
-namespace tt = boost::test_tools;
-namespace utf = boost::unit_test;
-namespace fs = std::filesystem;
-
-fs::path gTestDir = fs::current_path();
-
-// --------------------------------------------------------------------
-
-bool init_unit_test()
-{
-	// not a test, just initialize test dir
-	if (boost::unit_test::framework::master_test_suite().argc == 2)
-		gTestDir = boost::unit_test::framework::master_test_suite().argv[1];
-
-	return true;
-}
-
-// --------------------------------------------------------------------
-
-BOOST_AUTO_TEST_CASE(t_1, * utf::tolerance(0.001))
-{
-	int argc = 3;
-	const char *const argv[] = {
-		"test", "--flag", nullptr
-	};
-
-	auto &config = cfg::config::instance();
-
-	config.init(
-		"test [options]",
-		cfg::make_option("flag", ""),
-		cfg::make_option<int>("param_int", ""),
-		cfg::make_option("param_int_2", 1, ""),
-		cfg::make_option<float>("param_float", ""),
-		cfg::make_option("param_float_2", 3.14f, ""));
-	
-	config.parse(argc, argv);
-
-	BOOST_CHECK(config.has("flag"));
-	BOOST_CHECK(not config.has("flag2"));
-
-	BOOST_CHECK_EQUAL(config.get<int>("param_int_2"), 1);
-	BOOST_CHECK_THROW(config.get<float>("param_int_2"), std::bad_any_cast);
-	BOOST_CHECK_THROW(config.get<int>("param_int"), std::system_error);
-
-	BOOST_TEST(config.get<float>("param_float_2") == 3.14);
-	BOOST_CHECK_THROW(config.get<int>("param_float_2"), std::bad_any_cast);
-	BOOST_CHECK_THROW(config.get<float>("param_float"), std::system_error);
-}
-
-BOOST_AUTO_TEST_CASE(t_2)
-{
-	int argc = 3;
-	const char *const argv[] = {
-		"test", "-vvvv", "--verbose", nullptr
-	};
-
-	auto &config = cfg::config::instance();
-
-	config.init(
-		"test [options]",
-		cfg::make_option("verbose,v", ""));
-	
-	config.parse(argc, argv);
-
-	BOOST_CHECK_EQUAL(config.count("verbose"), 5);
-}
-
-BOOST_AUTO_TEST_CASE(t_3)
-{
-	int argc = 2;
-	const char *const argv[] = {
-		"test", "--param_int=42", nullptr
-	};
-
-	auto &config = cfg::config::instance();
-
-	config.init(
-		"test [options]",
-		cfg::make_option<int>("param_int", ""));
-	
-	config.parse(argc, argv);
-
-	BOOST_CHECK(config.has("param_int"));
-	BOOST_CHECK_EQUAL(config.get<int>("param_int"), 42);
-}
-
-BOOST_AUTO_TEST_CASE(t_4)
-{
-	int argc = 3;
-	const char *const argv[] = {
-		"test", "--param_int", "42", nullptr
-	};
-
-	auto &config = cfg::config::instance();
-
-	config.init(
-		"test [options]",
-		cfg::make_option<int>("param_int", ""));
-	
-	config.parse(argc, argv);
-
-	BOOST_CHECK(config.has("param_int"));
-	BOOST_CHECK_EQUAL(config.get<int>("param_int"), 42);
-}
-
-BOOST_AUTO_TEST_CASE(t_5)
-{
-	const char *const argv[] = {
-		"test", "-i", "42", "-j43", nullptr
-	};
-	int argc = sizeof(argv) / sizeof(char*);
-	
-	auto &config = cfg::config::instance();
-
-	config.init(
-		"test [options]",
-		cfg::make_option<int>("nr1,i", ""),
-		cfg::make_option<int>("nr2,j", ""));
-	
-	config.parse(argc, argv);
-
-	BOOST_CHECK(config.has("nr1"));
-	BOOST_CHECK(config.has("nr2"));
-
-	BOOST_CHECK_EQUAL(config.get<int>("nr1"), 42);
-	BOOST_CHECK_EQUAL(config.get<int>("nr2"), 43);
-}
-
-BOOST_AUTO_TEST_CASE(t_6)
-{
-	const char *const argv[] = {
-		"test", "-i", "42", "-j43", "foo", "bar", nullptr
-	};
-	int argc = sizeof(argv) / sizeof(char*);
-	
-	auto &config = cfg::config::instance();
-
-	config.init(
-		"test [options]",
-		cfg::make_option<int>("nr1,i", ""),
-		cfg::make_option<int>("nr2,j", ""));
-	
-	config.parse(argc, argv);
-
-	BOOST_CHECK(config.has("nr1"));
-	BOOST_CHECK(config.has("nr2"));
-
-	BOOST_CHECK_EQUAL(config.get<int>("nr1"), 42);
-	BOOST_CHECK_EQUAL(config.get<int>("nr2"), 43);
-
-	BOOST_CHECK_EQUAL(config.operands().size(), 2);
-	BOOST_CHECK_EQUAL(config.operands().front(), "foo");
-	BOOST_CHECK_EQUAL(config.operands().back(), "bar");
-}
-
-BOOST_AUTO_TEST_CASE(t_7)
-{
-	const char *const argv[] = {
-		"test", "--", "-i", "42", "-j43", "foo", "bar", nullptr
-	};
-	int argc = sizeof(argv) / sizeof(char*) - 1;
-	
-	auto &config = cfg::config::instance();
-
-	config.init(
-		"test [options]",
-		cfg::make_option<int>("nr1,i", ""),
-		cfg::make_option<int>("nr2,j", ""));
-	
-	config.parse(argc, argv);
-
-	BOOST_CHECK(not config.has("nr1"));
-	BOOST_CHECK(not config.has("nr2"));
-
-	BOOST_CHECK_EQUAL(config.operands().size(), 5);
-
-	auto compare = std::vector<std::string>{ argv[2], argv[3], argv[4], argv[5], argv[6] };
-	BOOST_CHECK(config.operands() == compare);
-}
-
-BOOST_AUTO_TEST_CASE(t_8)
-{
-	const char *const argv[] = {
-		"test", "-i", "foo", "-jbar", nullptr
-	};
-	int argc = sizeof(argv) / sizeof(char*) - 1;
-	
-	auto &config = cfg::config::instance();
-
-	config.init(
-		"test [options]",
-		cfg::make_option<const char*>("i", ""),
-		cfg::make_option<std::string_view>("j", ""),
-		cfg::make_option("k", "baz", ""));
-	
-	config.parse(argc, argv);
-
-	BOOST_CHECK(config.has("i"));
-	BOOST_CHECK_EQUAL(config.get<std::string>("i"), "foo");
-	BOOST_CHECK(config.has("j"));
-	BOOST_CHECK_EQUAL(config.get<std::string>("j"), "bar");
-
-	BOOST_CHECK(config.has("k"));
-	BOOST_CHECK_EQUAL(config.get<std::string>("k"), "baz");
-}
-
-BOOST_AUTO_TEST_CASE(t_9)
-{
-	auto &config = cfg::config::instance();
-
-	config.set_usage("usage: test [options]");
-
-	config.init(
-		"test [options]",
-		cfg::make_option<const char*>("i", "First option"),
-		cfg::make_option<std::string_view>("j", "This is the second option"),
-		cfg::make_option("a-very-long-option-name,k", "baz", "And, you guessed it, this must be option three."));
-	
-// 	std::stringstream ss;
-
-// 	int fd = open("/dev/null", O_RDWR);
-// 	dup2(fd, STDOUT_FILENO);
-
-// 	ss << config << std::endl;
-
-// 	const char kExpected[] = R"(usage: test [options]
-//   -i arg                                First option
-//   -j arg                                This is the second option
-//   -k [ --a-very-long-option-name ] arg (=baz)
-//                                         And, you guessed it, this must be
-//                                         option three.
-
-// )";
-
-// 	std::cerr << '>' << kExpected << '<' << std::endl;
-// 	std::cerr << '>' << ss.str() << '<' << std::endl;
-
-// 	BOOST_CHECK_EQUAL(ss.str(), kExpected);
-}
-
-BOOST_AUTO_TEST_CASE(t_10)
-{
-	std::string s1 = R"(SPDX-License-Identifier: BSD-2-Clause
-
-Copyright (c) 2022 Maarten L. Hekkelman
-
-Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer
-2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 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.
-)";
-
-	cfg::word_wrapper ww(s1, 80);
-
-	std::ostringstream os;
-
-	for (auto line : ww)
-		os << line << std::endl;
-	
-	BOOST_CHECK_EQUAL(os.str(), R"(SPDX-License-Identifier: BSD-2-Clause
-
-Copyright (c) 2022 Maarten L. Hekkelman
-
-Redistribution and use in source and binary forms, with or without 
-modification, are permitted provided that the following conditions are met:
-
-1. Redistributions of source code must retain the above copyright notice, this 
-list of conditions and the following disclaimer
-2. Redistributions in binary form must reproduce the above copyright notice, 
-this list of conditions and the following disclaimer in the documentation and/
-or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS 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.
-
-)");
-}
-
-BOOST_AUTO_TEST_CASE(t_11)
-{
-	const char *const argv[] = {
-		"test", "-faap", "-fnoot", "-fmies", nullptr
-	};
-	int argc = sizeof(argv) / sizeof(char*) - 1;
-
-	auto &config = cfg::config::instance();
-
-	config.init(
-		"test [options]",
-		cfg::make_option<std::vector<std::string>>("file,f", ""));
-	
-	config.parse(argc, argv);
-
-	BOOST_CHECK_EQUAL(config.count("file"), 3);
-	
-	std::vector<std::string> files = config.get<std::vector<std::string>>("file");
-	BOOST_CHECK_EQUAL(files.size(), 3);
-	BOOST_CHECK_EQUAL(files[0], "aap");
-	BOOST_CHECK_EQUAL(files[1], "noot");
-	BOOST_CHECK_EQUAL(files[2], "mies");
-}
-
-BOOST_AUTO_TEST_CASE(t_12)
-{
-	const char *const argv[] = {
-		"test", "--aap", nullptr
-	};
-	int argc = sizeof(argv) / sizeof(char*) - 1;
-
-	auto &config = cfg::config::instance();
-
-	config.init(
-		"test [options]",
-		cfg::make_option<std::vector<std::string>>("file,f", ""));
-	
-	std::error_code ec;
-	config.parse(argc, argv, ec);
-	BOOST_CHECK(ec == cfg::config_error::unknown_option);
-
-	config.set_ignore_unknown(true);
-	ec = {};
-
-	config.parse(argc, argv, ec);
-	BOOST_CHECK(ec == std::errc());
-}
-
-// --------------------------------------------------------------------
-
-BOOST_AUTO_TEST_CASE(file_1, * utf::tolerance(0.001))
-{
-	const std::string_view config_file{ R"(
-# This is a test configuration
-aap=1
-noot = 2
-mies = 	
-pi = 3.14
-s = hello, world!
-verbose
-	)" };
-
-	struct membuf : public std::streambuf
-	{
-		membuf(char * text, size_t length)
-		{
-			this->setg(text, text, text + length);
-		}
-	} buffer(const_cast<char *>(config_file.data()), config_file.length());
-
-	std::istream is(&buffer);
-
-	auto &config = cfg::config::instance();
-
-	config.init(
-		"test [options]",
-		cfg::make_option<const char*>("aap", ""),
-		cfg::make_option<int>("noot", ""),
-		cfg::make_option<std::string>("mies", ""),
-		cfg::make_option<float>("pi", ""),
-		cfg::make_option<std::string>("s", ""),
-		cfg::make_option("verbose,v", ""));
-	
-	std::error_code ec;
-
-	config.parse_config_file(is, ec);
-
-	BOOST_CHECK(ec == std::errc());
-
-	BOOST_CHECK(config.has("aap"));
-	BOOST_CHECK_EQUAL(config.get<std::string>("aap"), "1");
-
-	BOOST_CHECK(config.has("noot"));
-	BOOST_CHECK_EQUAL(config.get<int>("noot"), 2);
-
-	BOOST_CHECK(config.has("pi"));
-	BOOST_TEST(config.get<float>("pi") == 3.14);
-
-	BOOST_CHECK(config.has("s"));
-	BOOST_CHECK_EQUAL(config.get<std::string>("s"), "hello, world!");
-
-	BOOST_CHECK(config.has("verbose"));
-}
-
-BOOST_AUTO_TEST_CASE(file_2)
-{
-	auto &config = cfg::config::instance();
-
-	std::tuple<std::string_view,std::string_view,std::error_code> tests[] = {
-		{ "aap !", "aap", make_error_code(cfg::config_error::invalid_config_file) },
-		{ "aap=aap", "aap", {} },
-		{ "aap", "aap", make_error_code(cfg::config_error::missing_argument_for_option) },
-		{ "verbose=1", "verbose", make_error_code(cfg::config_error::option_does_not_accept_argument) },
-				
-	};
-
-	for (const auto &[config_file, option, err] : tests)
-	{
-		struct membuf : public std::streambuf
-		{
-			membuf(char * text, size_t length)
-			{
-				this->setg(text, text, text + length);
-			}
-		} buffer(const_cast<char *>(config_file.data()), config_file.length());
-
-		std::istream is(&buffer);
-
-		std::error_code ec;
-		config.init(
-			"test [options]",
-			cfg::make_option<const char*>("aap", ""),
-			cfg::make_option<int>("noot", ""),
-			cfg::make_option<float>("pi", ""),
-			cfg::make_option<std::string>("s", ""),
-			cfg::make_option("verbose,v", ""));
-		
-		config.parse_config_file(is, ec);
-
-		BOOST_CHECK(ec == err);
-
-		if (ec == std::errc())
-			BOOST_CHECK(config.has(option));
-	}
-}
-
-BOOST_AUTO_TEST_CASE(file_3)
-{
-	auto &config = cfg::config::instance();
-
-	config.init(
-		"test [options]",
-		cfg::make_option<const char*>("aap", ""),
-		cfg::make_option<int>("noot", ""),
-		cfg::make_option<std::string>("config", ""));
-	
-	std::error_code ec;
-
-	const char *const argv[] = {
-		"test", "--aap=aap", "--noot=42", "--config=unit-test.conf", nullptr
-	};
-	int argc = sizeof(argv) / sizeof(char*) - 1;
-
-	config.parse(argc, argv);
-
-	config.parse_config_file("config", "bla-bla.conf", { gTestDir.string() }, ec);
-
-	BOOST_CHECK(ec == std::errc());
-
-	BOOST_CHECK(config.has("aap"));
-	BOOST_CHECK_EQUAL(config.get<std::string>("aap"), "aap");
-
-	BOOST_CHECK(config.has("noot"));
-	BOOST_CHECK_EQUAL(config.get<int>("noot"), 42);
-}
-
-BOOST_AUTO_TEST_CASE(file_4)
-{
-	auto &config = cfg::config::instance();
-
-	config.init(
-		"test [options]",
-		cfg::make_option<const char*>("aap", ""),
-		cfg::make_option<int>("noot", ""),
-		cfg::make_option<std::string>("config", ""));
-	
-	std::error_code ec;
-
-	const char *const argv[] = {
-		"test", "--aap=aap", nullptr
-	};
-	int argc = sizeof(argv) / sizeof(char*) - 1;
-
-	config.parse(argc, argv);
-
-	config.parse_config_file("config", "unit-test.conf", { gTestDir.string() }, ec);
-
-	BOOST_CHECK(ec == std::errc());
-
-	BOOST_CHECK(config.has("aap"));
-	BOOST_CHECK_EQUAL(config.get<std::string>("aap"), "aap");
-
-	BOOST_CHECK(config.has("noot"));
-	BOOST_CHECK_EQUAL(config.get<int>("noot"), 3);
-}
\ No newline at end of file


=====================================
src/dssp-io.cpp
=====================================
@@ -24,19 +24,16 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#if __has_include("config.hpp")
-#include "config.hpp"
-#endif
+#include "dssp-io.hpp"
+#include "revision.hpp"
+
+#include <cif++/pdb/io.hpp>
 
 #include <exception>
 #include <filesystem>
 #include <fstream>
 #include <iostream>
 
-#include <cif++/pdb/io.hpp>
-
-#include "dssp-io.hpp"
-#include "revision.hpp"
 
 // --------------------------------------------------------------------
 
@@ -315,7 +312,7 @@ void writeSheets(cif::datablock &db, const dssp &dssp)
 			continue;
 
 		if (not sheetMap.count(sheetID))
-			sheetMap[sheetID] = sheetMap.size();
+			sheetMap[sheetID] = static_cast<int>(sheetMap.size());
 
 		strands.emplace_back(std::make_tuple(sheetMap[sheetID], res_list{ res }));
 	}


=====================================
src/dssp.cpp
=====================================
@@ -26,12 +26,13 @@
 
 // Calculate DSSP-like secondary structure information
 
+#include "dssp.hpp"
+
+#include <deque>
 #include <iomanip>
 #include <numeric>
 #include <thread>
 
-#include "dssp.hpp"
-
 using residue = dssp::residue;
 using statistics = dssp::statistics;
 using structure_type = dssp::structure_type;
@@ -96,16 +97,16 @@ float dihedral_angle(const point &p1, const point &p2, const point &p3, const po
 	point x = cross_product(z, v43);
 	point y = cross_product(z, x);
 
-	double u = dot_product(x, x);
-	double v = dot_product(y, y);
+	float u = dot_product(x, x);
+	float v = dot_product(y, y);
 
-	double result = 360;
+	float result = 360;
 	if (u > 0 and v > 0)
 	{
 		u = dot_product(p, x) / std::sqrt(u);
 		v = dot_product(p, y) / std::sqrt(v);
 		if (u != 0 or v != 0)
-			result = std::atan2(v, u) * 180 / kPI;
+			result = std::atan2(v, u) * 180.f / static_cast<float>(kPI);
 	}
 
 	return result;
@@ -116,9 +117,9 @@ float cosinus_angle(const point &p1, const point &p2, const point &p3, const poi
 	point v12 = p1 - p2;
 	point v34 = p3 - p4;
 
-	double result = 0;
+	float result = 0;
 
-	double x = dot_product(v12, v12) * dot_product(v34, v34);
+	float x = dot_product(v12, v12) * dot_product(v34, v34);
 	if (x > 0)
 		result = dot_product(v12, v34) / std::sqrt(x);
 
@@ -450,8 +451,8 @@ struct dssp::residue
 		return mSSBridgeNr;
 	}
 
-	double CalculateSurface(const std::vector<residue> &inResidues);
-	double CalculateSurface(const point &inAtom, float inRadius, const std::vector<residue *> &inNeighbours);
+	float CalculateSurface(const std::vector<residue> &inResidues);
+	float CalculateSurface(const point &inAtom, float inRadius, const std::vector<residue *> &inNeighbours);
 
 	bool AtomIntersectsBox(const point &atom, float inRadius) const
 	{
@@ -527,10 +528,10 @@ struct dssp::residue
 	float mRadius;
 	point mCenter;
 	std::vector<std::tuple<std::string, point>> mSideChain;
-	double mAccessibility = 0;
-	double mChiralVolume = 0;
+	float mAccessibility = 0;
+	float mChiralVolume = 0;
 
-	double mAlpha = 360, mKappa = 360, mPhi = 360, mPsi = 360, mTCO = 0, mOmega = 360;
+	float mAlpha = 360, mKappa = 360, mPhi = 360, mPsi = 360, mTCO = 0, mOmega = 360;
 
 	residue_type mType;
 	uint8_t mSSBridgeNr = 0;
@@ -629,7 +630,7 @@ MSurfaceDots::MSurfaceDots(int32_t N)
 	}
 }
 
-double residue::CalculateSurface(const point &inAtom, float inRadius, const std::vector<residue *> &inNeighbours)
+float residue::CalculateSurface(const point &inAtom, float inRadius, const std::vector<residue *> &inNeighbours)
 {
 	accumulator accumulate;
 
@@ -650,7 +651,7 @@ double residue::CalculateSurface(const point &inAtom, float inRadius, const std:
 	accumulate.sort();
 
 	float radius = inRadius + kRadiusWater;
-	double surface = 0;
+	float surface = 0;
 
 	MSurfaceDots &surfaceDots = MSurfaceDots::Instance();
 
@@ -663,20 +664,20 @@ double residue::CalculateSurface(const point &inAtom, float inRadius, const std:
 			free = accumulate.m_x[k].radius < distance_sq(xx, accumulate.m_x[k].location);
 
 		if (free)
-			surface += surfaceDots.weight();
+			surface += static_cast<float>(surfaceDots.weight());
 	}
 
 	return surface * radius * radius;
 }
 
-double residue::CalculateSurface(const std::vector<residue> &inResidues)
+float residue::CalculateSurface(const std::vector<residue> &inResidues)
 {
 	std::vector<residue *> neighbours;
 
 	for (auto &r : inResidues)
 	{
 		point center = r.mCenter;
-		double radius = r.mRadius;
+		float radius = r.mRadius;
 
 		if (distance(mCenter, center) < mRadius + radius)
 			neighbours.push_back(const_cast<residue *>(&r));
@@ -1215,8 +1216,8 @@ void CalculatePPHelices(std::vector<residue> &inResidues, statistics &stats, int
 
 	for (uint32_t i = 1; i + 1 < inResidues.size(); ++i)
 	{
-		phi[i] = inResidues[i].mPhi;
-		psi[i] = inResidues[i].mPsi;
+		phi[i] = static_cast<float>(inResidues[i].mPhi);
+		psi[i] = static_cast<float>(inResidues[i].mPsi);
 	}
 
 	for (uint32_t i = 1; i + 3 < inResidues.size(); ++i)
@@ -1435,13 +1436,13 @@ DSSP_impl::DSSP_impl(const cif::datablock &db, int model_nr, int min_poly_prolin
 
 			if (NoChainBreak(prevPrev, nextNext) and prevPrev.mSeqID + 4 == nextNext.mSeqID)
 			{
-				double ckap = cosinus_angle(
+				float ckap = cosinus_angle(
 					cur.mCAlpha,
 					prevPrev.mCAlpha,
 					nextNext.mCAlpha,
 					cur.mCAlpha);
-				double skap = std::sqrt(1 - ckap * ckap);
-				cur.mKappa = std::atan2(skap, ckap) * 180 / kPI;
+				float skap = std::sqrt(1 - ckap * ckap);
+				cur.mKappa = std::atan2(skap, ckap) * static_cast<float>(180 / kPI);
 			}
 		}
 
@@ -2086,7 +2087,7 @@ dssp::iterator &dssp::iterator::operator--()
 // --------------------------------------------------------------------
 
 dssp::dssp(const cif::mm::structure &s, int min_poly_proline_stretch_length, bool calculateSurfaceAccessibility)
-	: dssp(s.get_datablock(), s.get_model_nr(), min_poly_proline_stretch_length, calculateSurfaceAccessibility)
+	: dssp(s.get_datablock(), static_cast<int>(s.get_model_nr()), min_poly_proline_stretch_length, calculateSurfaceAccessibility)
 {
 }
 


=====================================
test/unit-test-dssp.cpp
=====================================
@@ -166,16 +166,16 @@ BOOST_AUTO_TEST_CASE(dssp_1)
 
 		std::cout << line << std::endl;
 
-		auto f = cif::split(line, "\t");
+		auto fld = cif::split(line, "\t");
 
-		BOOST_CHECK_EQUAL(f.size(), 3);
-		if (f.size() != 3)
+		BOOST_CHECK_EQUAL(fld.size(), 3);
+		if (fld.size() != 3)
 			continue;
 
 		int seqID;
-		std::from_chars(f[0].begin(), f[0].end(), seqID);
-		std::string asymID{ f[1] };
-		std::string secstr{ f[2] };
+		std::from_chars(fld[0].data(), fld[0].data() + fld[0].length(), seqID);
+		std::string asymID{ fld[1] };
+		std::string secstr{ fld[2] };
 		if (secstr == "_")
 			secstr = " ";
 
@@ -200,16 +200,16 @@ BOOST_AUTO_TEST_CASE(dssp_2)
 
 	while (getline(t, line))
 	{
-		auto f = cif::split(line, "\t");
+		auto fld = cif::split(line, "\t");
 
-		BOOST_CHECK_EQUAL(f.size(), 3);
-		if (f.size() != 3)
+		BOOST_CHECK_EQUAL(fld.size(), 3);
+		if (fld.size() != 3)
 			continue;
 
 		int seqID;
-		std::from_chars(f[0].begin(), f[0].end(), seqID);
-		std::string asymID{ f[1] };
-		std::string secstr{ f[2] };
+		std::from_chars(fld[0].data(), fld[0].data() + fld[0].length(), seqID);
+		std::string asymID{ fld[1] };
+		std::string secstr{ fld[2] };
 		if (secstr == "_")
 			secstr = " ";
 



View it on GitLab: https://salsa.debian.org/med-team/dssp/-/compare/020875829eed7dc92570a39966545037c7711193...51bb367a3cbf002ceb6ab591c70b248f6ae45c91

-- 
View it on GitLab: https://salsa.debian.org/med-team/dssp/-/compare/020875829eed7dc92570a39966545037c7711193...51bb367a3cbf002ceb6ab591c70b248f6ae45c91
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20230202/4ca949ce/attachment-0001.htm>


More information about the debian-med-commit mailing list