From 20748b34ad43f69ec127a4caab05196e2fd38705 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Mon, 24 Nov 2025 12:08:44 -0500 Subject: hotpatch: urgent patches in shell scripts and library. Signed-off-by: Amlal El Mahrouss --- include/ocl/core/chunk_string.hpp | 11 ++++++----- include/ocl/core/config.hpp | 27 +++++++++++++++++++++++++++ include/ocl/core/includes.hpp | 27 --------------------------- make_dist_linux.sh | 24 +++++++++++++++++++----- 4 files changed, 52 insertions(+), 37 deletions(-) create mode 100644 include/ocl/core/config.hpp delete mode 100644 include/ocl/core/includes.hpp diff --git a/include/ocl/core/chunk_string.hpp b/include/ocl/core/chunk_string.hpp index ccbc10a..c60b0a4 100644 --- a/include/ocl/core/chunk_string.hpp +++ b/include/ocl/core/chunk_string.hpp @@ -20,14 +20,17 @@ namespace ocl template class basic_chunk_string final { + public: + using condition_type = bool; + private: char_type packed_chunks_[max_chunk_size] = {0}; std::size_t chunk_total_{}; - bool bad_{false}; + condition_type bad_{false}; public: - const bool& bad{bad_}; + const condition_type& bad{bad_}; basic_chunk_string() = default; @@ -53,9 +56,7 @@ namespace ocl if (in == nullptr || bad_) return *this; - const auto& sz = std::strlen(in); - - this->operator+=(std::basic_string(in, sz)); + this->operator+=(std::basic_string(in)); return *this; } diff --git a/include/ocl/core/config.hpp b/include/ocl/core/config.hpp new file mode 100644 index 0000000..2ea1399 --- /dev/null +++ b/include/ocl/core/config.hpp @@ -0,0 +1,27 @@ +/* + * File: core/config.hpp + * Purpose: Config file of the OCL. + * Author: Amlal El Mahrouss (amlal@nekernel.org) + * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. + */ + +#pragma once + +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace ocl +{ +#ifdef OCL_USE_UTF8 + using char_type = char8_t; +#else + using char_type = char; +#endif +} // namespace ocl \ No newline at end of file diff --git a/include/ocl/core/includes.hpp b/include/ocl/core/includes.hpp deleted file mode 100644 index 8d94cc0..0000000 --- a/include/ocl/core/includes.hpp +++ /dev/null @@ -1,27 +0,0 @@ -/* - * File: core/config.hpp - * Purpose: Config file of the OCL. - * Author: Amlal El Mahrouss (amlal@nekernel.org) - * Copyright 2025, Amlal El Mahrouss, licensed under the Boost Software License. - */ - -#pragma once - -#include -#include -#include - -#include -#include -#include -#include -#include - -namespace ocl -{ -#ifdef OCL_USE_UTF8 - using char_type = char8_t; -#else - using char_type = char; -#endif -} // namespace ocl \ No newline at end of file diff --git a/make_dist_linux.sh b/make_dist_linux.sh index 2432323..ab78915 100755 --- a/make_dist_linux.sh +++ b/make_dist_linux.sh @@ -1,17 +1,31 @@ #! /bin/sh -outputDir=dist/lib/ +outputDir=dist/include/ocl/ mkdir -p $outputDir +mkdir -p $outputDir'fix' +mkdir -p $outputDir'io' +mkdir -p $outputDir'except' +mkdir -p $outputDir'core' +mkdir -p $outputDir'logic' +mkdir -p $outputDir'memory' +mkdir -p $outputDir'net' +mkdir -p $outputDir'simd' +mkdir -p $outputDir'tests' +mkdir -p $outputDir'utility' +mkdir -p 'dist/tools' + +outputDirCmd=dist/ +outputDirTools=dist/ for f in include/ocl/*/*.hpp; do baseName=`echo $f | cut -d "." -f 1` -echo "RUN:" cp --parents $f.hpp $outputDir$baseName -cp --parents $f.hpp $outputDir$baseName +echo "RUN:" cp $f $outputDir$baseName +cp $f $outputDirCmd$baseName done for f in tools/*.py; do baseName=`echo $f | cut -d "." -f 1` -echo "RUN:" ditto $baseName.py $outputDir$baseName -ditto $baseName.py $outputDir$baseName +echo "RUN:" cp $baseName'.py' $outputDirTools$baseName +cp $baseName'.py' $outputDirTools$baseName'.py' done -- cgit v1.2.3