diff --git a/editors/imhex/Makefile b/editors/imhex/Makefile index 285967932bfd..d459c7761590 100644 --- a/editors/imhex/Makefile +++ b/editors/imhex/Makefile @@ -1,96 +1,102 @@ PORTNAME= imhex -PORTVERSION= 1.27.1 +PORTVERSION= 1.28.0 DISTVERSIONPREFIX= v -PORTREVISION= 1 CATEGORIES= editors MASTER_SITES= https://git.sr.ht/~danyspin97/xdgpp/blob/f01f810714443d0f10c333d4d1d9c0383be41375/:xdg DISTFILES= xdg.hpp:xdg DIST_SUBDIR= imhex MAINTAINER= nobutaka@FreeBSD.org COMMENT= Hex editor for reverse engineers and programmers WWW= https://github.com/WerWolv/ImHex LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE NOT_FOR_ARCHS= i386 powerpc NOT_FOR_ARCHS_REASON= __uint128_t and __int128_t are not supported EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} \ btzy-nativefiledialog-extended-${GH_TAG_NATIVEFILEDIALOG}_GH0${EXTRACT_SUFX} \ capstone-engine-capstone-${GH_TAG_CAPSTONE}_GH0${EXTRACT_SUFX} \ CLIUtils-CLI11-${GH_TAG_CLI11}_GH0${EXTRACT_SUFX} \ fmtlib-fmt-${GH_TAG_FMT}_GH0${EXTRACT_SUFX} \ josuttis-jthread-${GH_TAG_JTHREAD}_GH0${EXTRACT_SUFX} \ VirusTotal-yara-${GH_TAG_YARA}_GH0${EXTRACT_SUFX} \ WerWolv-libromfs-${GH_TAG_LIBROMFS}_GH0${EXTRACT_SUFX} \ + WerWolv-libwolv-${GH_TAG_LIBWOLV}_GH0${EXTRACT_SUFX} \ WerWolv-ImHex-Patterns-${GH_TAG_IMHEX_PATTERNS}_GH0${EXTRACT_SUFX} \ WerWolv-PatternLanguage-${GH_TAG_PATTERN_LANGUAGE}_GH0${EXTRACT_SUFX} BUILD_DEPENDS= glm>0:math/glm \ nlohmann-json>0:devel/nlohmann-json \ ${LOCALBASE}/include/hpx/functional.hpp:devel/hpx \ ${LOCALBASE}/include/range/v3/range.hpp:devel/range-v3 \ ${LOCALBASE}/include/tl/expected.hpp:devel/tl-expected LIB_DEPENDS= libcurl.so:ftp/curl \ libglfw.so:graphics/glfw \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ libmbedtls.so:security/mbedtls \ libtre.so:textproc/libtre -USES= cmake gl gnome pkgconfig python:3.8+ xorg +USES= cmake desktop-file-utils gl gnome pkgconfig python:3.8+ xorg USE_GL= gl glu USE_GNOME= cairo gdkpixbuf2 gtk30 USE_XORG= x11 xcb xau xdmcp USE_GITHUB= yes GH_ACCOUNT= WerWolv GH_PROJECT= ImHex GH_TUPLE= btzy:nativefiledialog-extended:${GH_TAG_NATIVEFILEDIALOG}:nativefiledialog \ capstone-engine:capstone:${GH_TAG_CAPSTONE}:capstone \ CLIUtils:CLI11:${GH_TAG_CLI11}:cli11 \ fmtlib:fmt:${GH_TAG_FMT}:fmt \ josuttis:jthread:${GH_TAG_JTHREAD}:jthread \ VirusTotal:yara:${GH_TAG_YARA}:yara \ WerWolv:ImHex-Patterns:${GH_TAG_IMHEX_PATTERNS}:imhex_patterns \ WerWolv:PatternLanguage:${GH_TAG_PATTERN_LANGUAGE}:pattern_language \ - WerWolv:libromfs:${GH_TAG_LIBROMFS}:libromfs + WerWolv:libromfs:${GH_TAG_LIBROMFS}:libromfs \ + WerWolv:libwolv:${GH_TAG_LIBWOLV}:libwolv \ GH_TAG_CAPSTONE= d5141c0 GH_TAG_CLI11= faea921 GH_TAG_FMT= a337011 -GH_TAG_IMHEX_PATTERNS= ea4dda0 +GH_TAG_IMHEX_PATTERNS= 2ffa4e0 GH_TAG_JTHREAD= 0fa8d39 GH_TAG_LIBROMFS= 40cd303 -GH_TAG_NATIVEFILEDIALOG= 6efc824 -GH_TAG_PATTERN_LANGUAGE= 0e32a23 -GH_TAG_YARA= ba94b4f +GH_TAG_LIBWOLV= bcd987c +GH_TAG_NATIVEFILEDIALOG= 7909f55 +GH_TAG_PATTERN_LANGUAGE= 68210bd +GH_TAG_YARA= 96790e5 CMAKE_ARGS= -DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON \ -DIMHEX_STRIP_RELEASE=OFF -DIMHEX_PLUGINS_IN_SHARE=ON \ -DIMHEX_OFFLINE_BUILD=ON -DIMHEX_USE_GTK_FILE_PICKER=ON PORTDOCS= README.md OPTIONS_DEFINE= DOCS NLS NLS_USES= gettext post-extract: ${CP} ${DISTDIR}/${DIST_SUBDIR}/xdg.hpp ${WRKSRC}/lib/external/xdgpp ${CP} -R ${WRKSRC_capstone}/* ${WRKSRC}/lib/external/capstone ${CP} -R ${WRKSRC_fmt}/* ${WRKSRC}/lib/external/fmt ${CP} -R ${WRKSRC_jthread}/source/*.hpp ${WRKSRC}/lib/libimhex/include ${CP} -R ${WRKSRC_libromfs}/* ${WRKSRC}/lib/external/libromfs + ${CP} -R ${WRKSRC_libwolv}/* ${WRKSRC}/lib/external/libwolv ${CP} -R ${WRKSRC_nativefiledialog}/* ${WRKSRC}/lib/external/nativefiledialog ${CP} -R ${WRKSRC_pattern_language}/* ${WRKSRC}/lib/external/pattern_language ${CP} -R ${WRKSRC_cli11}/* ${WRKSRC}/lib/external/pattern_language/external/cli11 ${CP} -R ${WRKSRC_yara}/* ${WRKSRC}/lib/external/yara/yara ${MKDIR} ${WRKDIR}/.build/_deps/imhex_patterns_src ${CP} -R ${WRKSRC_imhex_patterns}/* ${WRKDIR}/.build/_deps/imhex_patterns_src +post-patch: + ${CP} -R ${WRKSRC}/lib/external/libwolv/* ${WRKSRC}/lib/external/pattern_language/external/libwolv + post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} .include diff --git a/editors/imhex/distinfo b/editors/imhex/distinfo index 82517e4c5c78..dae5dd2ce553 100644 --- a/editors/imhex/distinfo +++ b/editors/imhex/distinfo @@ -1,23 +1,25 @@ -TIMESTAMP = 1676468817 +TIMESTAMP = 1680967037 SHA256 (imhex/xdg.hpp) = 2e08ce74adb71ff9b9aa9e1c999733fccd4b00967b9cf0c0e51dbf049392a9ec SIZE (imhex/xdg.hpp) = 7674 -SHA256 (imhex/WerWolv-ImHex-v1.27.1_GH0.tar.gz) = c0eaba25b6b01242ad23a6872d815372815d40d22a0f727e0b61da5dc59366a4 -SIZE (imhex/WerWolv-ImHex-v1.27.1_GH0.tar.gz) = 11716724 -SHA256 (imhex/btzy-nativefiledialog-extended-6efc824_GH0.tar.gz) = 9ada1814eaedcdb8aaae1829443747ab385b6f296e3e756a483c34456e15dcbd -SIZE (imhex/btzy-nativefiledialog-extended-6efc824_GH0.tar.gz) = 412533 +SHA256 (imhex/WerWolv-ImHex-v1.28.0_GH0.tar.gz) = 6d6d716b6fd785bfb11929ec33fdcbfced25e735519c1bf451c64ddd13b3383f +SIZE (imhex/WerWolv-ImHex-v1.28.0_GH0.tar.gz) = 11741032 +SHA256 (imhex/btzy-nativefiledialog-extended-7909f55_GH0.tar.gz) = eb6c9376ab32dfa1b3f40f197f04d2d3dbe07c8555d57df3945121e843c98a97 +SIZE (imhex/btzy-nativefiledialog-extended-7909f55_GH0.tar.gz) = 412738 SHA256 (imhex/capstone-engine-capstone-d5141c0_GH0.tar.gz) = 435d40757928fa73dec19c6d0fbf171bd76341391c8525ce1286927dab44c3e7 SIZE (imhex/capstone-engine-capstone-d5141c0_GH0.tar.gz) = 5761632 SHA256 (imhex/CLIUtils-CLI11-faea921_GH0.tar.gz) = 84773ee9577e6b719e5a84ad62cc381cf3027756690e1db839eaa50bcafc6c78 SIZE (imhex/CLIUtils-CLI11-faea921_GH0.tar.gz) = 299718 SHA256 (imhex/fmtlib-fmt-a337011_GH0.tar.gz) = ba190d69d8b7994ef2ceb533c56bc34feec296fef2f87efab4cfb981a04601cf SIZE (imhex/fmtlib-fmt-a337011_GH0.tar.gz) = 837936 SHA256 (imhex/josuttis-jthread-0fa8d39_GH0.tar.gz) = ccd9c871dc2da9611e6d0cba5fc859cec9b233541be7501e5cef9eaa367e1280 SIZE (imhex/josuttis-jthread-0fa8d39_GH0.tar.gz) = 4450456 -SHA256 (imhex/VirusTotal-yara-ba94b4f_GH0.tar.gz) = 4c81120bff451a55deaa23b48155d3eb35955ce11a1d76fbfcbbe2c2e33770b9 -SIZE (imhex/VirusTotal-yara-ba94b4f_GH0.tar.gz) = 1288534 -SHA256 (imhex/WerWolv-ImHex-Patterns-ea4dda0_GH0.tar.gz) = da07b7b99386fba50db7132fcb67a40ac990d298c92a3a3687870d062e9cb5c3 -SIZE (imhex/WerWolv-ImHex-Patterns-ea4dda0_GH0.tar.gz) = 6896993 -SHA256 (imhex/WerWolv-PatternLanguage-0e32a23_GH0.tar.gz) = 596bc2636eb07c7de71de3fd6582d7c18ecdf1ac5bc6f55d593c07e12ce8653e -SIZE (imhex/WerWolv-PatternLanguage-0e32a23_GH0.tar.gz) = 428847 +SHA256 (imhex/VirusTotal-yara-96790e5_GH0.tar.gz) = f58a3e8e7fa6bec3b5d8631d4bfbd48da801ebf4b5f8e1b26fea4a1115708a1c +SIZE (imhex/VirusTotal-yara-96790e5_GH0.tar.gz) = 2179144 +SHA256 (imhex/WerWolv-ImHex-Patterns-2ffa4e0_GH0.tar.gz) = 733697f5444c9622f79b47f9b0e83483a1d50e27da93e894ce83402615887038 +SIZE (imhex/WerWolv-ImHex-Patterns-2ffa4e0_GH0.tar.gz) = 3065433 +SHA256 (imhex/WerWolv-PatternLanguage-68210bd_GH0.tar.gz) = dd1404eda3627ed2426cbb50ca68fb5b8af8399b46dabfde8b91dacda975b869 +SIZE (imhex/WerWolv-PatternLanguage-68210bd_GH0.tar.gz) = 223467 SHA256 (imhex/WerWolv-libromfs-40cd303_GH0.tar.gz) = e785499616e1dfc2644be61706cf1fba49a8d8282c6aecf78efee02c6fbbca13 SIZE (imhex/WerWolv-libromfs-40cd303_GH0.tar.gz) = 4301 +SHA256 (imhex/WerWolv-libwolv-bcd987c_GH0.tar.gz) = d170a887ba3d07efabc6180b5b6f077d5b5d261a0144cfe281aa0f04e05f3991 +SIZE (imhex/WerWolv-libwolv-bcd987c_GH0.tar.gz) = 20301 diff --git a/editors/imhex/files/patch-CMakeLists.txt b/editors/imhex/files/patch-CMakeLists.txt index 4839db5e37f7..ba76e857d734 100644 --- a/editors/imhex/files/patch-CMakeLists.txt +++ b/editors/imhex/files/patch-CMakeLists.txt @@ -1,11 +1,11 @@ ---- CMakeLists.txt.orig 2023-02-15 08:39:23 UTC +--- CMakeLists.txt.orig 2023-04-04 10:04:22 UTC +++ CMakeLists.txt -@@ -28,8 +28,6 @@ project(imhex +@@ -29,8 +29,6 @@ project(imhex # Make sure project is configured correctly setDefaultBuiltTypeIfUnset() -detectBadClone() -verifyCompiler() # List plugin names here. Project name must match folder name set(PLUGINS diff --git a/editors/imhex/files/patch-cmake_build__helpers.cmake b/editors/imhex/files/patch-cmake_build__helpers.cmake index 375109f88029..2791ff6dd58b 100644 --- a/editors/imhex/files/patch-cmake_build__helpers.cmake +++ b/editors/imhex/files/patch-cmake_build__helpers.cmake @@ -1,26 +1,26 @@ ---- cmake/build_helpers.cmake.orig 2023-02-15 13:56:27 UTC +--- cmake/build_helpers.cmake.orig 2023-04-04 10:04:22 UTC +++ cmake/build_helpers.cmake -@@ -370,13 +370,13 @@ function(downloadImHexPatternsFiles dest) +@@ -378,13 +378,13 @@ function(downloadImHexPatternsFiles dest) else () # Maybe patterns are cloned to a subdirectory - set(imhex_patterns_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ImHex-Patterns") + set(imhex_patterns_SOURCE_DIR "${CMAKE_BINARY_DIR}/_deps/imhex_patterns_src") endif () if (EXISTS ${imhex_patterns_SOURCE_DIR}) set(PATTERNS_FOLDERS_TO_INSTALL constants encodings includes patterns magic) foreach (FOLDER ${PATTERNS_FOLDERS_TO_INSTALL}) - install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION ${dest}) + install(DIRECTORY "${imhex_patterns_SOURCE_DIR}/${FOLDER}" DESTINATION "share/imhex/") endforeach () endif () -@@ -384,7 +384,6 @@ endfunction() +@@ -392,7 +392,6 @@ endfunction() macro(setupCompilerWarnings target) set(IMHEX_COMMON_FLAGS "-Wall -Wextra -Wpedantic -Werror") -- set(IMHEX_C_FLAGS "${IMHEX_COMMON_FLAGS} -Wno-restrict -Wno-stringop-overread -Wno-stringop-overflow") +- set(IMHEX_C_FLAGS "${IMHEX_COMMON_FLAGS} -Wno-restrict -Wno-stringop-overread -Wno-stringop-overflow -Wno-array-bounds") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${IMHEX_C_FLAGS}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IMHEX_C_FLAGS}") diff --git a/editors/imhex/files/patch-lib_libimhex_source_helpers_file.cpp b/editors/imhex/files/patch-lib_external_libwolv_libs_io_source_io_file.cpp similarity index 56% rename from editors/imhex/files/patch-lib_libimhex_source_helpers_file.cpp rename to editors/imhex/files/patch-lib_external_libwolv_libs_io_source_io_file.cpp index c3e38e800446..45ee30862e05 100644 --- a/editors/imhex/files/patch-lib_libimhex_source_helpers_file.cpp +++ b/editors/imhex/files/patch-lib_external_libwolv_libs_io_source_io_file.cpp @@ -1,51 +1,51 @@ ---- lib/libimhex/source/helpers/file.cpp.orig 2022-10-08 08:03:47 UTC -+++ lib/libimhex/source/helpers/file.cpp -@@ -17,12 +17,12 @@ namespace hex::fs { - this->m_file = _wfopen(path.c_str(), L"w+b"); +--- lib/external/libwolv/libs/io/source/io/file.cpp.orig 2023-04-08 15:55:46 UTC ++++ lib/external/libwolv/libs/io/source/io/file.cpp +@@ -21,12 +21,12 @@ namespace wolv::io { #else + if (mode == File::Mode::Read) -- this->m_file = fopen64(hex::toUTF8String(path).c_str(), "rb"); -+ this->m_file = fopen(hex::toUTF8String(path).c_str(), "rb"); +- this->m_file = fopen64(util::toUTF8String(path).c_str(), "rb"); ++ this->m_file = fopen(util::toUTF8String(path).c_str(), "rb"); else if (mode == File::Mode::Write) -- this->m_file = fopen64(hex::toUTF8String(path).c_str(), "r+b"); -+ this->m_file = fopen(hex::toUTF8String(path).c_str(), "r+b"); +- this->m_file = fopen64(util::toUTF8String(path).c_str(), "r+b"); ++ this->m_file = fopen(util::toUTF8String(path).c_str(), "r+b"); if (mode == File::Mode::Create || (mode == File::Mode::Write && this->m_file == nullptr)) -- this->m_file = fopen64(hex::toUTF8String(path).c_str(), "w+b"); -+ this->m_file = fopen(hex::toUTF8String(path).c_str(), "w+b"); +- this->m_file = fopen64(util::toUTF8String(path).c_str(), "w+b"); ++ this->m_file = fopen(util::toUTF8String(path).c_str(), "w+b"); + #endif } - -@@ -50,7 +50,7 @@ namespace hex::fs { - +@@ -63,7 +63,7 @@ namespace wolv::io { + } void File::seek(u64 offset) { - fseeko64(this->m_file, offset, SEEK_SET); + fseeko(this->m_file, offset, SEEK_SET); } void File::close() { -@@ -135,10 +135,10 @@ namespace hex::fs { +@@ -148,10 +148,10 @@ namespace wolv::io { size_t File::getSize() const { if (!isValid()) return 0; - auto startPos = ftello64(this->m_file); - fseeko64(this->m_file, 0, SEEK_END); - auto size = ftello64(this->m_file); - fseeko64(this->m_file, startPos, SEEK_SET); + auto startPos = ftello(this->m_file); + fseeko(this->m_file, 0, SEEK_END); + auto size = ftello(this->m_file); + fseeko(this->m_file, startPos, SEEK_SET); if (size < 0) return 0; -@@ -149,7 +149,7 @@ namespace hex::fs { +@@ -162,7 +162,7 @@ namespace wolv::io { void File::setSize(u64 size) { if (!isValid()) return; - auto result = ftruncate64(fileno(this->m_file), size); + auto result = ftruncate(fileno(this->m_file), size); - hex::unused(result); + util::unused(result); } diff --git a/editors/imhex/files/patch-lib_external_libwolv_libs_io_source_io_fs.cpp b/editors/imhex/files/patch-lib_external_libwolv_libs_io_source_io_fs.cpp new file mode 100644 index 000000000000..e153e92150a1 --- /dev/null +++ b/editors/imhex/files/patch-lib_external_libwolv_libs_io_source_io_fs.cpp @@ -0,0 +1,11 @@ +--- lib/external/libwolv/libs/io/source/io/fs.cpp.orig 2023-04-08 15:52:49 UTC ++++ lib/external/libwolv/libs/io/source/io/fs.cpp +@@ -15,7 +15,7 @@ + #elif defined(OS_LINUX) + + #include +- #include ++ #include + + #endif + diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_CMakeLists.txt b/editors/imhex/files/patch-lib_external_pattern__language_lib_CMakeLists.txt index a02d6868d77d..21819240ed2f 100644 --- a/editors/imhex/files/patch-lib_external_pattern__language_lib_CMakeLists.txt +++ b/editors/imhex/files/patch-lib_external_pattern__language_lib_CMakeLists.txt @@ -1,11 +1,11 @@ ---- lib/external/pattern_language/lib/CMakeLists.txt.orig 2023-02-12 13:35:48 UTC +--- lib/external/pattern_language/lib/CMakeLists.txt.orig 2023-04-08 15:28:11 UTC +++ lib/external/pattern_language/lib/CMakeLists.txt @@ -34,7 +34,7 @@ add_library(libpl ${LIBRARY_TYPE} - source/pl/lib/std/hash.cpp + source/pl/lib/std/random.cpp ) -target_compile_options(libpl PRIVATE -Wall -Wextra -Werror -Wpedantic -Wno-unknown-pragmas) +target_compile_options(libpl PRIVATE -Wall -Wextra -Werror -Wpedantic -Wno-unknown-pragmas -Wno-error=deprecated-declarations) target_include_directories(libpl PUBLIC include) target_link_libraries(libpl PRIVATE fmt::fmt-header-only) diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_ast_ast__node.hpp b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_ast_ast__node.hpp index 388fdd493069..89b9ea1731aa 100644 --- a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_ast_ast__node.hpp +++ b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_ast_ast__node.hpp @@ -1,17 +1,17 @@ ---- lib/external/pattern_language/lib/include/pl/core/ast/ast_node.hpp.orig 2023-01-05 15:11:08 UTC +--- lib/external/pattern_language/lib/include/pl/core/ast/ast_node.hpp.orig 2023-04-08 15:28:11 UTC +++ lib/external/pattern_language/lib/include/pl/core/ast/ast_node.hpp -@@ -15,11 +15,11 @@ namespace pl::core::ast { +@@ -16,11 +16,11 @@ namespace pl::core::ast { class ASTNode : public Cloneable { public: - constexpr ASTNode() = default; + ASTNode() = default; - constexpr virtual ~ASTNode() = default; + virtual ~ASTNode() = default; - constexpr ASTNode(const ASTNode &) = default; + ASTNode(const ASTNode &) = default; [[nodiscard]] constexpr u32 getLine() const { return this->m_line; } [[nodiscard]] constexpr u32 getColumn() const { return this->m_column; } diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_evaluator.hpp b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_evaluator.hpp deleted file mode 100644 index a5a32aa8d084..000000000000 --- a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_evaluator.hpp +++ /dev/null @@ -1,10 +0,0 @@ ---- lib/external/pattern_language/lib/include/pl/core/evaluator.hpp.orig 2023-01-05 14:44:51 UTC -+++ lib/external/pattern_language/lib/include/pl/core/evaluator.hpp -@@ -7,6 +7,7 @@ - #include - #include - #include -+#include - - #include - #include diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_parser.hpp b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_parser.hpp new file mode 100644 index 000000000000..4881cecc95c8 --- /dev/null +++ b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_parser.hpp @@ -0,0 +1,38 @@ +--- lib/external/pattern_language/lib/include/pl/core/parser.hpp.orig 2023-04-08 16:22:09 UTC ++++ lib/external/pattern_language/lib/include/pl/core/parser.hpp +@@ -233,7 +233,7 @@ namespace pl::core { + else if constexpr (S == Not) + return false; + else +- std::unreachable(); ++ __builtin_unreachable(); + } + + template +@@ -264,7 +264,7 @@ namespace pl::core { + partReset(); + return false; + } else +- std::unreachable(); ++ __builtin_unreachable(); + } + + template +@@ -279,7 +279,7 @@ namespace pl::core { + else if constexpr (S == Not) + return true; + else +- std::unreachable(); ++ __builtin_unreachable(); + } + + template +@@ -289,7 +289,7 @@ namespace pl::core { + else if constexpr (S == Not) + return sequenceImpl(token) && oneOfImpl(args...); + else +- std::unreachable(); ++ __builtin_unreachable(); + } + + template diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_token.hpp b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_token.hpp index d33644543603..515b59369fe1 100644 --- a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_token.hpp +++ b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_core_token.hpp @@ -1,256 +1,20 @@ ---- lib/external/pattern_language/lib/include/pl/core/token.hpp.orig 2023-02-13 14:23:14 UTC +--- lib/external/pattern_language/lib/include/pl/core/token.hpp.orig 2023-04-08 15:28:11 UTC +++ lib/external/pattern_language/lib/include/pl/core/token.hpp -@@ -155,7 +155,7 @@ namespace pl::core { +@@ -157,7 +157,7 @@ namespace pl::core { bool global; std::string comment; - constexpr bool operator==(const DocComment &) const = default; + bool operator==(const DocComment &) const = default; }; struct Literal : public std::variant { -@@ -183,7 +183,7 @@ namespace pl::core { +@@ -185,7 +185,7 @@ namespace pl::core { using ValueTypes = std::variant; - constexpr Token(Type type, auto value, u32 line, u32 column) : type(type), value(std::move(value)), line(line), column(column) {} + inline Token(Type type, auto value, u32 line, u32 column) : type(type), value(std::move(value)), line(line), column(column) {} [[nodiscard]] constexpr static inline bool isInteger(const ValueType &type) { return isUnsigned(type) || isSigned(type); -@@ -220,136 +220,136 @@ namespace pl::core { - - namespace tkn { - -- constexpr inline Token createToken(const core::Token::Type type, const core::Token::ValueTypes &value) { -+ inline Token createToken(const core::Token::Type type, const core::Token::ValueTypes &value) { - return { type, value, 1, 1 }; - } - - namespace Keyword { - -- constexpr auto If = createToken(core::Token::Type::Keyword, Token::Keyword::If); -- constexpr auto Else = createToken(core::Token::Type::Keyword, Token::Keyword::Else); -- constexpr auto While = createToken(core::Token::Type::Keyword, Token::Keyword::While); -- constexpr auto For = createToken(core::Token::Type::Keyword, Token::Keyword::For); -- constexpr auto Return = createToken(core::Token::Type::Keyword, Token::Keyword::Return); -- constexpr auto Break = createToken(core::Token::Type::Keyword, Token::Keyword::Break); -- constexpr auto Continue = createToken(core::Token::Type::Keyword, Token::Keyword::Continue); -- constexpr auto Struct = createToken(core::Token::Type::Keyword, Token::Keyword::Struct); -- constexpr auto Enum = createToken(core::Token::Type::Keyword, Token::Keyword::Enum); -- constexpr auto Union = createToken(core::Token::Type::Keyword, Token::Keyword::Union); -- constexpr auto Function = createToken(core::Token::Type::Keyword, Token::Keyword::Function); -- constexpr auto Bitfield = createToken(core::Token::Type::Keyword, Token::Keyword::Bitfield); -- constexpr auto LittleEndian = createToken(core::Token::Type::Keyword, Token::Keyword::LittleEndian); -- constexpr auto BigEndian = createToken(core::Token::Type::Keyword, Token::Keyword::BigEndian); -- constexpr auto Parent = createToken(core::Token::Type::Keyword, Token::Keyword::Parent); -- constexpr auto Namespace = createToken(core::Token::Type::Keyword, Token::Keyword::Namespace); -- constexpr auto Using = createToken(core::Token::Type::Keyword, Token::Keyword::Using); -- constexpr auto This = createToken(core::Token::Type::Keyword, Token::Keyword::This); -- constexpr auto In = createToken(core::Token::Type::Keyword, Token::Keyword::In); -- constexpr auto Out = createToken(core::Token::Type::Keyword, Token::Keyword::Out); -- constexpr auto Reference = createToken(core::Token::Type::Keyword, Token::Keyword::Reference); -- constexpr auto Null = createToken(core::Token::Type::Keyword, Token::Keyword::Null); -- constexpr auto Const = createToken(core::Token::Type::Keyword, Token::Keyword::Const); -+ inline auto If = createToken(core::Token::Type::Keyword, Token::Keyword::If); -+ inline auto Else = createToken(core::Token::Type::Keyword, Token::Keyword::Else); -+ inline auto While = createToken(core::Token::Type::Keyword, Token::Keyword::While); -+ inline auto For = createToken(core::Token::Type::Keyword, Token::Keyword::For); -+ inline auto Return = createToken(core::Token::Type::Keyword, Token::Keyword::Return); -+ inline auto Break = createToken(core::Token::Type::Keyword, Token::Keyword::Break); -+ inline auto Continue = createToken(core::Token::Type::Keyword, Token::Keyword::Continue); -+ inline auto Struct = createToken(core::Token::Type::Keyword, Token::Keyword::Struct); -+ inline auto Enum = createToken(core::Token::Type::Keyword, Token::Keyword::Enum); -+ inline auto Union = createToken(core::Token::Type::Keyword, Token::Keyword::Union); -+ inline auto Function = createToken(core::Token::Type::Keyword, Token::Keyword::Function); -+ inline auto Bitfield = createToken(core::Token::Type::Keyword, Token::Keyword::Bitfield); -+ inline auto LittleEndian = createToken(core::Token::Type::Keyword, Token::Keyword::LittleEndian); -+ inline auto BigEndian = createToken(core::Token::Type::Keyword, Token::Keyword::BigEndian); -+ inline auto Parent = createToken(core::Token::Type::Keyword, Token::Keyword::Parent); -+ inline auto Namespace = createToken(core::Token::Type::Keyword, Token::Keyword::Namespace); -+ inline auto Using = createToken(core::Token::Type::Keyword, Token::Keyword::Using); -+ inline auto This = createToken(core::Token::Type::Keyword, Token::Keyword::This); -+ inline auto In = createToken(core::Token::Type::Keyword, Token::Keyword::In); -+ inline auto Out = createToken(core::Token::Type::Keyword, Token::Keyword::Out); -+ inline auto Reference = createToken(core::Token::Type::Keyword, Token::Keyword::Reference); -+ inline auto Null = createToken(core::Token::Type::Keyword, Token::Keyword::Null); -+ inline auto Const = createToken(core::Token::Type::Keyword, Token::Keyword::Const); - - } - - namespace Literal { - -- constexpr auto IdentifierValue = [](const std::string &name = { }) -> Token { return createToken(core::Token::Type::Identifier, Token::Identifier(name)); }; -- constexpr auto NumericValue = [](const Token::Literal &value = { }) -> Token { return createToken(core::Token::Type::Integer, value); }; -- constexpr auto StringValue = [](const std::string &value = { }) -> Token { return createToken(core::Token::Type::String, Token::Literal(value)); }; -- constexpr auto DocComment = [](bool global, const std::string &value) -> Token { return { core::Token::Type::DocComment, Token::DocComment { global, value }, 1, 1 }; }; -+ inline auto IdentifierValue = [](const std::string &name = { }) -> Token { return createToken(core::Token::Type::Identifier, Token::Identifier(name)); }; -+ inline auto NumericValue = [](const Token::Literal &value = { }) -> Token { return createToken(core::Token::Type::Integer, value); }; -+ inline auto StringValue = [](const std::string &value = { }) -> Token { return createToken(core::Token::Type::String, Token::Literal(value)); }; -+ inline auto DocComment = [](bool global, const std::string &value) -> Token { return { core::Token::Type::DocComment, Token::DocComment { global, value }, 1, 1 }; }; - -- constexpr auto Identifier = createToken(core::Token::Type::Identifier, { }); -- constexpr auto Numeric = createToken(core::Token::Type::Integer, { }); -- constexpr auto String = createToken(core::Token::Type::String, { }); -+ inline auto Identifier = createToken(core::Token::Type::Identifier, { }); -+ inline auto Numeric = createToken(core::Token::Type::Integer, { }); -+ inline auto String = createToken(core::Token::Type::String, { }); - - } - - namespace Operator { - -- constexpr auto Plus = createToken(core::Token::Type::Operator, Token::Operator::Plus); -- constexpr auto Minus = createToken(core::Token::Type::Operator, Token::Operator::Minus); -- constexpr auto Star = createToken(core::Token::Type::Operator, Token::Operator::Star); -- constexpr auto Slash = createToken(core::Token::Type::Operator, Token::Operator::Slash); -- constexpr auto Percent = createToken(core::Token::Type::Operator, Token::Operator::Percent); -- constexpr auto LeftShift = createToken(core::Token::Type::Operator, Token::Operator::LeftShift); -- constexpr auto RightShift = createToken(core::Token::Type::Operator, Token::Operator::RightShift); -- constexpr auto BitAnd = createToken(core::Token::Type::Operator, Token::Operator::BitAnd); -- constexpr auto BitOr = createToken(core::Token::Type::Operator, Token::Operator::BitOr); -- constexpr auto BitXor = createToken(core::Token::Type::Operator, Token::Operator::BitXor); -- constexpr auto BitNot = createToken(core::Token::Type::Operator, Token::Operator::BitNot); -- constexpr auto BoolEqual = createToken(core::Token::Type::Operator, Token::Operator::BoolEqual); -- constexpr auto BoolNotEqual = createToken(core::Token::Type::Operator, Token::Operator::BoolNotEqual); -- constexpr auto BoolLessThan = createToken(core::Token::Type::Operator, Token::Operator::BoolLessThan); -- constexpr auto BoolGreaterThan = createToken(core::Token::Type::Operator, Token::Operator::BoolGreaterThan); -- constexpr auto BoolLessThanOrEqual = createToken(core::Token::Type::Operator, Token::Operator::BoolLessThanOrEqual); -- constexpr auto BoolGreaterThanOrEqual = createToken(core::Token::Type::Operator, Token::Operator::BoolGreaterThanOrEqual); -- constexpr auto BoolAnd = createToken(core::Token::Type::Operator, Token::Operator::BoolAnd); -- constexpr auto BoolOr = createToken(core::Token::Type::Operator, Token::Operator::BoolOr); -- constexpr auto BoolNot = createToken(core::Token::Type::Operator, Token::Operator::BoolNot); -- constexpr auto BoolXor = createToken(core::Token::Type::Operator, Token::Operator::BoolXor); -- constexpr auto Dollar = createToken(core::Token::Type::Operator, Token::Operator::Dollar); -- constexpr auto Colon = createToken(core::Token::Type::Operator, Token::Operator::Colon); -- constexpr auto ScopeResolution = createToken(core::Token::Type::Operator, Token::Operator::ScopeResolution); -- constexpr auto TernaryConditional = createToken(core::Token::Type::Operator, Token::Operator::TernaryConditional); -- constexpr auto AddressOf = createToken(core::Token::Type::Operator, Token::Operator::AddressOf); -- constexpr auto SizeOf = createToken(core::Token::Type::Operator, Token::Operator::SizeOf); -- constexpr auto At = createToken(core::Token::Type::Operator, Token::Operator::At); -- constexpr auto Assign = createToken(core::Token::Type::Operator, Token::Operator::Assign); -+ inline auto Plus = createToken(core::Token::Type::Operator, Token::Operator::Plus); -+ inline auto Minus = createToken(core::Token::Type::Operator, Token::Operator::Minus); -+ inline auto Star = createToken(core::Token::Type::Operator, Token::Operator::Star); -+ inline auto Slash = createToken(core::Token::Type::Operator, Token::Operator::Slash); -+ inline auto Percent = createToken(core::Token::Type::Operator, Token::Operator::Percent); -+ inline auto LeftShift = createToken(core::Token::Type::Operator, Token::Operator::LeftShift); -+ inline auto RightShift = createToken(core::Token::Type::Operator, Token::Operator::RightShift); -+ inline auto BitAnd = createToken(core::Token::Type::Operator, Token::Operator::BitAnd); -+ inline auto BitOr = createToken(core::Token::Type::Operator, Token::Operator::BitOr); -+ inline auto BitXor = createToken(core::Token::Type::Operator, Token::Operator::BitXor); -+ inline auto BitNot = createToken(core::Token::Type::Operator, Token::Operator::BitNot); -+ inline auto BoolEqual = createToken(core::Token::Type::Operator, Token::Operator::BoolEqual); -+ inline auto BoolNotEqual = createToken(core::Token::Type::Operator, Token::Operator::BoolNotEqual); -+ inline auto BoolLessThan = createToken(core::Token::Type::Operator, Token::Operator::BoolLessThan); -+ inline auto BoolGreaterThan = createToken(core::Token::Type::Operator, Token::Operator::BoolGreaterThan); -+ inline auto BoolLessThanOrEqual = createToken(core::Token::Type::Operator, Token::Operator::BoolLessThanOrEqual); -+ inline auto BoolGreaterThanOrEqual = createToken(core::Token::Type::Operator, Token::Operator::BoolGreaterThanOrEqual); -+ inline auto BoolAnd = createToken(core::Token::Type::Operator, Token::Operator::BoolAnd); -+ inline auto BoolOr = createToken(core::Token::Type::Operator, Token::Operator::BoolOr); -+ inline auto BoolNot = createToken(core::Token::Type::Operator, Token::Operator::BoolNot); -+ inline auto BoolXor = createToken(core::Token::Type::Operator, Token::Operator::BoolXor); -+ inline auto Dollar = createToken(core::Token::Type::Operator, Token::Operator::Dollar); -+ inline auto Colon = createToken(core::Token::Type::Operator, Token::Operator::Colon); -+ inline auto ScopeResolution = createToken(core::Token::Type::Operator, Token::Operator::ScopeResolution); -+ inline auto TernaryConditional = createToken(core::Token::Type::Operator, Token::Operator::TernaryConditional); -+ inline auto AddressOf = createToken(core::Token::Type::Operator, Token::Operator::AddressOf); -+ inline auto SizeOf = createToken(core::Token::Type::Operator, Token::Operator::SizeOf); -+ inline auto At = createToken(core::Token::Type::Operator, Token::Operator::At); -+ inline auto Assign = createToken(core::Token::Type::Operator, Token::Operator::Assign); - - } - - namespace ValueType { - -- constexpr auto CustomType = createToken(core::Token::Type::ValueType, Token::ValueType::CustomType); -- constexpr auto Padding = createToken(core::Token::Type::ValueType, Token::ValueType::Padding); -- constexpr auto Unsigned = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned); -- constexpr auto Signed = createToken(core::Token::Type::ValueType, Token::ValueType::Signed); -- constexpr auto FloatingPoint = createToken(core::Token::Type::ValueType, Token::ValueType::FloatingPoint); -- constexpr auto Auto = createToken(core::Token::Type::ValueType, Token::ValueType::Auto); -- constexpr auto Any = createToken(core::Token::Type::ValueType, Token::ValueType::Any); -+ inline auto CustomType = createToken(core::Token::Type::ValueType, Token::ValueType::CustomType); -+ inline auto Padding = createToken(core::Token::Type::ValueType, Token::ValueType::Padding); -+ inline auto Unsigned = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned); -+ inline auto Signed = createToken(core::Token::Type::ValueType, Token::ValueType::Signed); -+ inline auto FloatingPoint = createToken(core::Token::Type::ValueType, Token::ValueType::FloatingPoint); -+ inline auto Auto = createToken(core::Token::Type::ValueType, Token::ValueType::Auto); -+ inline auto Any = createToken(core::Token::Type::ValueType, Token::ValueType::Any); - -- constexpr auto Unsigned8Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned8Bit); -- constexpr auto Unsigned16Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned16Bit); -- constexpr auto Unsigned24Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned24Bit); -- constexpr auto Unsigned32Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned32Bit); -- constexpr auto Unsigned48Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned48Bit); -- constexpr auto Unsigned64Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned64Bit); -- constexpr auto Unsigned96Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned96Bit); -- constexpr auto Unsigned128Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned128Bit); -+ inline auto Unsigned8Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned8Bit); -+ inline auto Unsigned16Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned16Bit); -+ inline auto Unsigned24Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned24Bit); -+ inline auto Unsigned32Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned32Bit); -+ inline auto Unsigned48Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned48Bit); -+ inline auto Unsigned64Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned64Bit); -+ inline auto Unsigned96Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned96Bit); -+ inline auto Unsigned128Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Unsigned128Bit); - -- constexpr auto Signed8Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed8Bit); -- constexpr auto Signed16Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed16Bit); -- constexpr auto Signed24Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed24Bit); -- constexpr auto Signed32Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed32Bit); -- constexpr auto Signed48Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed48Bit); -- constexpr auto Signed64Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed64Bit); -- constexpr auto Signed96Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed96Bit); -- constexpr auto Signed128Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed128Bit); -+ inline auto Signed8Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed8Bit); -+ inline auto Signed16Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed16Bit); -+ inline auto Signed24Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed24Bit); -+ inline auto Signed32Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed32Bit); -+ inline auto Signed48Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed48Bit); -+ inline auto Signed64Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed64Bit); -+ inline auto Signed96Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed96Bit); -+ inline auto Signed128Bit = createToken(core::Token::Type::ValueType, Token::ValueType::Signed128Bit); - -- constexpr auto Float = createToken(core::Token::Type::ValueType, Token::ValueType::Float); -- constexpr auto Double = createToken(core::Token::Type::ValueType, Token::ValueType::Double); -+ inline auto Float = createToken(core::Token::Type::ValueType, Token::ValueType::Float); -+ inline auto Double = createToken(core::Token::Type::ValueType, Token::ValueType::Double); - -- constexpr auto Boolean = createToken(core::Token::Type::ValueType, Token::ValueType::Boolean); -+ inline auto Boolean = createToken(core::Token::Type::ValueType, Token::ValueType::Boolean); - -- constexpr auto Character = createToken(core::Token::Type::ValueType, Token::ValueType::Character); -- constexpr auto Character16 = createToken(core::Token::Type::ValueType, Token::ValueType::Character16); -- constexpr auto String = createToken(core::Token::Type::ValueType, Token::ValueType::String); -+ inline auto Character = createToken(core::Token::Type::ValueType, Token::ValueType::Character); -+ inline auto Character16 = createToken(core::Token::Type::ValueType, Token::ValueType::Character16); -+ inline auto String = createToken(core::Token::Type::ValueType, Token::ValueType::String); - - } - - namespace Separator { - -- constexpr auto Comma = createToken(core::Token::Type::Separator, Token::Separator::Comma); -- constexpr auto LeftParenthesis = createToken(core::Token::Type::Separator, Token::Separator::LeftParenthesis); -- constexpr auto RightParenthesis = createToken(core::Token::Type::Separator, Token::Separator::RightParenthesis); -- constexpr auto LeftBracket = createToken(core::Token::Type::Separator, Token::Separator::LeftBracket); -- constexpr auto RightBracket = createToken(core::Token::Type::Separator, Token::Separator::RightBracket); -- constexpr auto LeftBrace = createToken(core::Token::Type::Separator, Token::Separator::LeftBrace); -- constexpr auto RightBrace = createToken(core::Token::Type::Separator, Token::Separator::RightBrace); -- constexpr auto Dot = createToken(core::Token::Type::Separator, Token::Separator::Dot); -- constexpr auto Semicolon = createToken(core::Token::Type::Separator, Token::Separator::Semicolon); -- constexpr auto EndOfProgram = createToken(core::Token::Type::Separator, Token::Separator::EndOfProgram); -+ inline auto Comma = createToken(core::Token::Type::Separator, Token::Separator::Comma); -+ inline auto LeftParenthesis = createToken(core::Token::Type::Separator, Token::Separator::LeftParenthesis); -+ inline auto RightParenthesis = createToken(core::Token::Type::Separator, Token::Separator::RightParenthesis); -+ inline auto LeftBracket = createToken(core::Token::Type::Separator, Token::Separator::LeftBracket); -+ inline auto RightBracket = createToken(core::Token::Type::Separator, Token::Separator::RightBracket); -+ inline auto LeftBrace = createToken(core::Token::Type::Separator, Token::Separator::LeftBrace); -+ inline auto RightBrace = createToken(core::Token::Type::Separator, Token::Separator::RightBrace); -+ inline auto Dot = createToken(core::Token::Type::Separator, Token::Separator::Dot); -+ inline auto Semicolon = createToken(core::Token::Type::Separator, Token::Separator::Semicolon); -+ inline auto EndOfProgram = createToken(core::Token::Type::Separator, Token::Separator::EndOfProgram); - - } - diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_patterns_pattern.hpp b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_patterns_pattern.hpp index 04b38f4f4b6c..604dfcad4a70 100644 --- a/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_patterns_pattern.hpp +++ b/editors/imhex/files/patch-lib_external_pattern__language_lib_include_pl_patterns_pattern.hpp @@ -1,11 +1,11 @@ ---- lib/external/pattern_language/lib/include/pl/patterns/pattern.hpp.orig 2023-02-15 14:19:06 UTC +--- lib/external/pattern_language/lib/include/pl/patterns/pattern.hpp.orig 2023-04-08 16:10:41 UTC +++ lib/external/pattern_language/lib/include/pl/patterns/pattern.hpp -@@ -317,7 +317,7 @@ namespace pl::ptrn { +@@ -336,7 +336,7 @@ namespace pl::ptrn { auto startOffset = child->getOffset(); child->setOffset(offset); -- PL_ON_SCOPE_EXIT { child->setOffset(startOffset); }; -+ [[maybe_unused]] auto PL_ANONYMOUS_VARIABLE(SCOPE_EXIT_) = ::pl::scope_guard::ScopeGuardOnExit() + [&, child=child]() { child->setOffset(startOffset); }; +- ON_SCOPE_EXIT { child->setOffset(startOffset); }; ++ [[maybe_unused]] auto WOLV_ANONYMOUS_VARIABLE(SCOPE_EXIT_) = ::wolv::util::scope_guard::ScopeGuardOnExit() + [&, child=child]() { child->setOffset(startOffset); }; auto bytes = child->getBytes(); std::copy(bytes.begin(), bytes.end(), std::back_inserter(result)); diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_source_pl_helpers_file.cpp b/editors/imhex/files/patch-lib_external_pattern__language_lib_source_pl_helpers_file.cpp deleted file mode 100644 index a0e9d7509c14..000000000000 --- a/editors/imhex/files/patch-lib_external_pattern__language_lib_source_pl_helpers_file.cpp +++ /dev/null @@ -1,44 +0,0 @@ ---- lib/external/pattern_language/lib/source/pl/helpers/file.cpp.orig 2022-11-16 14:22:38 UTC -+++ lib/external/pattern_language/lib/source/pl/helpers/file.cpp -@@ -8,7 +8,7 @@ - - namespace pl::hlp::fs { - --#if defined(OS_MACOS) -+#if defined(OS_MACOS) || defined(__FreeBSD__) - #define fopen64 fopen - #define ftruncate64 ftruncate - #endif -@@ -57,7 +57,7 @@ namespace pl::hlp::fs { - - - void File::seek(u64 offset) { -- fseeko64(this->m_file, offset, SEEK_SET); -+ fseeko(this->m_file, offset, SEEK_SET); - } - - void File::close() { -@@ -142,10 +142,10 @@ namespace pl::hlp::fs { - size_t File::getSize() const { - if (!isValid()) return 0; - -- auto startPos = ftello64(this->m_file); -- fseeko64(this->m_file, 0, SEEK_END); -- auto size = ftello64(this->m_file); -- fseeko64(this->m_file, startPos, SEEK_SET); -+ auto startPos = ftello(this->m_file); -+ fseeko(this->m_file, 0, SEEK_END); -+ auto size = ftello(this->m_file); -+ fseeko(this->m_file, startPos, SEEK_SET); - - if (size < 0) - return 0; -@@ -156,7 +156,7 @@ namespace pl::hlp::fs { - void File::setSize(u64 size) { - if (!isValid()) return; - -- auto result = ftruncate64(fileno(this->m_file), size); -+ auto result = ftruncate(fileno(this->m_file), size); - hlp::unused(result); - } - diff --git a/editors/imhex/files/patch-lib_external_pattern__language_lib_source_pl_lib_std_string.cpp b/editors/imhex/files/patch-lib_external_pattern__language_lib_source_pl_lib_std_string.cpp index 9c419ffccee2..79b7826ce37d 100644 --- a/editors/imhex/files/patch-lib_external_pattern__language_lib_source_pl_lib_std_string.cpp +++ b/editors/imhex/files/patch-lib_external_pattern__language_lib_source_pl_lib_std_string.cpp @@ -1,11 +1,11 @@ ---- lib/external/pattern_language/lib/source/pl/lib/std/string.cpp.orig 2022-08-14 15:35:34 UTC +--- lib/external/pattern_language/lib/source/pl/lib/std/string.cpp.orig 2023-04-08 15:36:28 UTC +++ lib/external/pattern_language/lib/source/pl/lib/std/string.cpp @@ -35,7 +35,7 @@ namespace pl::lib::libstd::string { const auto signIndex = index >> (sizeof(index) * 8 - 1); const auto absIndex = (index ^ signIndex) - signIndex; - #else + #else - const auto absIndex = std::abs(index); + const auto absIndex = (unsigned long)std::abs((long)index); - #endif + #endif if (absIndex > string.length()) diff --git a/editors/imhex/files/patch-lib_libimhex_include_hex_data__processor_node.hpp b/editors/imhex/files/patch-lib_libimhex_include_hex_data__processor_node.hpp index 75f1f09572bf..fd9c6ef492b3 100644 --- a/editors/imhex/files/patch-lib_libimhex_include_hex_data__processor_node.hpp +++ b/editors/imhex/files/patch-lib_libimhex_include_hex_data__processor_node.hpp @@ -1,10 +1,10 @@ ---- lib/libimhex/include/hex/data_processor/node.hpp.orig 2023-02-12 18:24:04 UTC +--- lib/libimhex/include/hex/data_processor/node.hpp.orig 2023-04-04 10:04:22 UTC +++ lib/libimhex/include/hex/data_processor/node.hpp -@@ -49,6 +49,7 @@ namespace hex::dp { +@@ -50,6 +50,7 @@ namespace hex::dp { struct NodeError { Node *node; std::string message; + NodeError(Node *n, std::string m) : node(n), message(m) {}; }; void resetOutputData() { diff --git a/editors/imhex/files/patch-lib_libimhex_source_api_imhex__api.cpp b/editors/imhex/files/patch-lib_libimhex_source_api_imhex__api.cpp index 0bea605d4827..483fdddc1daf 100644 --- a/editors/imhex/files/patch-lib_libimhex_source_api_imhex__api.cpp +++ b/editors/imhex/files/patch-lib_libimhex_source_api_imhex__api.cpp @@ -1,19 +1,19 @@ ---- lib/libimhex/source/api/imhex_api.cpp.orig 2022-11-14 09:07:21 UTC +--- lib/libimhex/source/api/imhex_api.cpp.orig 2023-04-04 10:04:22 UTC +++ lib/libimhex/source/api/imhex_api.cpp @@ -4,6 +4,7 @@ #include #include +#include #include #include -@@ -272,7 +273,7 @@ namespace hex { +@@ -259,7 +260,7 @@ namespace hex { } bool isDirty() { - return std::ranges::any_of(s_providers, [](const auto &provider) { + return ranges::any_of(s_providers, [](const auto &provider) { return provider->isDirty(); }); } diff --git a/editors/imhex/files/patch-lib_libimhex_source_api_project__file__manager.cpp b/editors/imhex/files/patch-lib_libimhex_source_api_project__file__manager.cpp index f8ed1e496d67..b5600b88cdf8 100644 --- a/editors/imhex/files/patch-lib_libimhex_source_api_project__file__manager.cpp +++ b/editors/imhex/files/patch-lib_libimhex_source_api_project__file__manager.cpp @@ -1,11 +1,11 @@ ---- lib/libimhex/source/api/project_file_manager.cpp.orig 2023-02-13 15:22:20 UTC +--- lib/libimhex/source/api/project_file_manager.cpp.orig 2023-04-04 10:04:22 UTC +++ lib/libimhex/source/api/project_file_manager.cpp -@@ -43,7 +43,7 @@ namespace hex { +@@ -46,7 +46,7 @@ namespace hex { return false; } - auto providers = auto(ImHexApi::Provider::getProviders()); + auto providers = ImHexApi::Provider::getProviders(); for (const auto &provider : providers) { ImHexApi::Provider::remove(provider); } diff --git a/editors/imhex/files/patch-lib_libimhex_source_helpers_fs.cpp b/editors/imhex/files/patch-lib_libimhex_source_helpers_fs.cpp index ca035f5b4856..71a5ad974e02 100644 --- a/editors/imhex/files/patch-lib_libimhex_source_helpers_fs.cpp +++ b/editors/imhex/files/patch-lib_libimhex_source_helpers_fs.cpp @@ -1,27 +1,27 @@ ---- lib/libimhex/source/helpers/fs.cpp.orig 2023-02-12 18:24:04 UTC +--- lib/libimhex/source/helpers/fs.cpp.orig 2023-04-04 10:04:22 UTC +++ lib/libimhex/source/helpers/fs.cpp -@@ -15,10 +15,15 @@ +@@ -11,10 +11,15 @@ #include #elif defined(OS_LINUX) #include +# if defined(__FreeBSD__) + #include +# else #include +# endif #endif #include +#include #include - namespace hex::fs { -@@ -101,7 +106,7 @@ namespace hex::fs { + #include +@@ -54,7 +59,7 @@ namespace hex::fs { result = NFD::PickFolder(outPath, defaultPath.empty() ? nullptr : defaultPath.c_str()); break; default: - std::unreachable(); -+ pl::hlp::unreachable(); ++ __builtin_unreachable(); } if (result == NFD_OKAY){ diff --git a/editors/imhex/files/patch-main_source_window_window.cpp b/editors/imhex/files/patch-main_source_window_window.cpp new file mode 100644 index 000000000000..986dbccce8f7 --- /dev/null +++ b/editors/imhex/files/patch-main_source_window_window.cpp @@ -0,0 +1,11 @@ +--- main/source/window/window.cpp.orig 2023-04-09 06:24:47 UTC ++++ main/source/window/window.cpp +@@ -272,7 +272,7 @@ namespace hex { + } + } + +- static void createNestedMenu(std::span menuItems, const Shortcut &shortcut, const std::function &callback, const std::function &enabledCallback) { ++ static void createNestedMenu(const std::vector &menuItems, const Shortcut &shortcut, const std::function &callback, const std::function &enabledCallback) { + const auto &name = menuItems.front(); + + if (name == ContentRegistry::Interface::impl::SeparatorValue) { diff --git a/editors/imhex/files/patch-plugins_builtin_include_content_views_view__pattern__editor.hpp b/editors/imhex/files/patch-plugins_builtin_include_content_views_view__pattern__editor.hpp index 1ea8e959ef00..ccb254965155 100644 --- a/editors/imhex/files/patch-plugins_builtin_include_content_views_view__pattern__editor.hpp +++ b/editors/imhex/files/patch-plugins_builtin_include_content_views_view__pattern__editor.hpp @@ -1,19 +1,19 @@ ---- plugins/builtin/include/content/views/view_pattern_editor.hpp.orig 2022-11-14 09:07:21 UTC +--- plugins/builtin/include/content/views/view_pattern_editor.hpp.orig 2023-04-04 10:04:22 UTC +++ plugins/builtin/include/content/views/view_pattern_editor.hpp @@ -16,6 +16,7 @@ #include #include #include +#include #include @@ -65,7 +66,7 @@ namespace hex::plugin::builtin { bool m_syncPatternSourceCode = false; bool m_autoLoadPatterns = true; - std::map> m_sectionWindowDrawer; + std::map> m_sectionWindowDrawer; - private: - void drawConsole(ImVec2 size, const std::vector> &console); - void drawEnvVars(ImVec2 size, std::list &envVars); + + ui::HexEditor m_sectionHexEditor; + diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_command__palette__commands.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_command__palette__commands.cpp new file mode 100644 index 000000000000..6718550d195e --- /dev/null +++ b/editors/imhex/files/patch-plugins_builtin_source_content_command__palette__commands.cpp @@ -0,0 +1,11 @@ +--- plugins/builtin/source/content/command_palette_commands.cpp.orig 2023-04-08 16:49:33 UTC ++++ plugins/builtin/source/content/command_palette_commands.cpp +@@ -69,7 +69,7 @@ namespace hex::plugin::builtin { + if (auto combined = wolv::util::combineStrings(names, " -> "); hex::containsIgnoreCase(combined, input) && !combined.contains(ContentRegistry::Interface::impl::SeparatorValue) && !combined.contains(ContentRegistry::Interface::impl::SubMenuValue)) { + result.emplace_back(ContentRegistry::CommandPaletteCommands::impl::QueryResult { + std::move(combined), +- [entry](const auto&) { entry.callback(); } ++ [entry=entry](const auto&) { entry.callback(); } + }); + } + } diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_data__inspector.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_data__inspector.cpp index f5bcbad9ec53..1e41fa40cd56 100644 --- a/editors/imhex/files/patch-plugins_builtin_source_content_data__inspector.cpp +++ b/editors/imhex/files/patch-plugins_builtin_source_content_data__inspector.cpp @@ -1,20 +1,20 @@ ---- plugins/builtin/source/content/data_inspector.cpp.orig 2022-09-03 22:05:27 UTC +--- plugins/builtin/source/content/data_inspector.cpp.orig 2023-04-04 10:04:22 UTC +++ plugins/builtin/source/content/data_inspector.cpp @@ -105,7 +105,7 @@ namespace hex::plugin::builtin { bool negative = number < 0; - return hex::format(format, negative ? "-" : "", std::abs(number)); + return hex::format(format, negative ? "-" : "", std::abs((long)number)); } template -@@ -285,7 +285,7 @@ namespace hex::plugin::builtin { +@@ -277,7 +277,7 @@ namespace hex::plugin::builtin { auto number = hex::crypt::decodeSleb128(buffer); bool negative = number < 0; - auto value = hex::format(format, negative ? "-" : "", std::abs(number)); + auto value = hex::format(format, negative ? "-" : "", std::abs((long)number)); return [value] { ImGui::TextUnformatted(value.c_str()); return value; }; }, diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_pl__visualizers.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_pl__visualizers.cpp new file mode 100644 index 000000000000..5639a0159ade --- /dev/null +++ b/editors/imhex/files/patch-plugins_builtin_source_content_pl__visualizers.cpp @@ -0,0 +1,31 @@ +--- plugins/builtin/source/content/pl_visualizers.cpp.orig 2023-04-08 16:59:02 UTC ++++ plugins/builtin/source/content/pl_visualizers.cpp +@@ -303,11 +303,11 @@ namespace hex::plugin::builtin { + + ImGui::TableNextColumn(); + ImGui::TextUnformatted("hex.builtin.pl_visualizer.3d.rotation"_lang); +- ImGui::VSliderFloat("##X", ImVec2(18_scaled, textureSize.y), &rotation.data()[0], 0, std::numbers::pi * 2, "", ImGuiSliderFlags_AlwaysClamp); ++ ImGui::VSliderFloat("##X", ImVec2(18_scaled, textureSize.y), &rotation.data()[0], 0, 3.141592653589793238462643383279502884L * 2, "", ImGuiSliderFlags_AlwaysClamp); + ImGui::SameLine(); +- ImGui::VSliderFloat("##Y", ImVec2(18_scaled, textureSize.y), &rotation.data()[1], 0, std::numbers::pi * 2, "", ImGuiSliderFlags_AlwaysClamp); ++ ImGui::VSliderFloat("##Y", ImVec2(18_scaled, textureSize.y), &rotation.data()[1], 0, 3.141592653589793238462643383279502884L * 2, "", ImGuiSliderFlags_AlwaysClamp); + ImGui::SameLine(); +- ImGui::VSliderFloat("##Z", ImVec2(18_scaled, textureSize.y), &rotation.data()[2], 0, std::numbers::pi * 2, "", ImGuiSliderFlags_AlwaysClamp); ++ ImGui::VSliderFloat("##Z", ImVec2(18_scaled, textureSize.y), &rotation.data()[2], 0, 3.141592653589793238462643383279502884L * 2, "", ImGuiSliderFlags_AlwaysClamp); + + ImGui::TableNextRow(); + ImGui::TableNextColumn(); +@@ -319,10 +319,10 @@ namespace hex::plugin::builtin { + ImGui::PopItemWidth(); + + for (u8 i = 0; i < 3; i++) { +- while (rotation.data()[i] > std::numbers::pi * 2) +- rotation.data()[i] -= std::numbers::pi * 2; ++ while (rotation.data()[i] > 3.141592653589793238462643383279502884L * 2) ++ rotation.data()[i] -= 3.141592653589793238462643383279502884L * 2; + while (rotation.data()[i] < 0) +- rotation.data()[i] += std::numbers::pi * 2; ++ rotation.data()[i] += 3.141592653589793238462643383279502884L * 2; + } + + ImGui::TableNextColumn(); diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_providers_disk__provider.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_providers_disk__provider.cpp index 6f842aea0d2a..b66b5990b311 100644 --- a/editors/imhex/files/patch-plugins_builtin_source_content_providers_disk__provider.cpp +++ b/editors/imhex/files/patch-plugins_builtin_source_content_providers_disk__provider.cpp @@ -1,11 +1,11 @@ ---- plugins/builtin/source/content/providers/disk_provider.cpp.orig 2022-10-08 08:03:47 UTC +--- plugins/builtin/source/content/providers/disk_provider.cpp.orig 2023-04-04 10:04:22 UTC +++ plugins/builtin/source/content/providers/disk_provider.cpp -@@ -20,7 +20,7 @@ +@@ -24,7 +24,7 @@ #include #endif -#if defined(OS_LINUX) +#if !defined(__FreeBSD__) #define lseek lseek64 #endif diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_settings__entries.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_settings__entries.cpp deleted file mode 100644 index 554360faa23e..000000000000 --- a/editors/imhex/files/patch-plugins_builtin_source_content_settings__entries.cpp +++ /dev/null @@ -1,12 +0,0 @@ ---- plugins/builtin/source/content/settings_entries.cpp.orig 2023-02-12 18:24:04 UTC -+++ plugins/builtin/source/content/settings_entries.cpp -@@ -24,8 +24,7 @@ namespace { - userFolders.clear(); - std::vector paths = setting; - for (const auto &path : paths) { -- // JSON reads char8_t as array, char8_t is not supported as of now -- std::u8string_view uString(reinterpret_cast(&path.front()), reinterpret_cast(std::next(&path.back()))); -+ std::string_view uString(&path.front()); // This is necessary for Clang13 - userFolders.emplace_back(uString); - } - } diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__find.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__find.cpp index 10e2dd5a7c40..94b040b8b8f5 100644 --- a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__find.cpp +++ b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__find.cpp @@ -1,20 +1,20 @@ ---- plugins/builtin/source/content/views/view_find.cpp.orig 2023-02-12 18:24:04 UTC +--- plugins/builtin/source/content/views/view_find.cpp.orig 2023-04-04 10:04:22 UTC +++ plugins/builtin/source/content/views/view_find.cpp -@@ -305,7 +305,7 @@ namespace hex::plugin::builtin { - - auto occurrence = reader.begin(); +@@ -314,7 +314,7 @@ namespace hex::plugin::builtin { while (true) { + task.update(progress); + - occurrence = std::search(reader.begin(), reader.end(), std::boyer_moore_horspool_searcher(bytes.begin(), bytes.end())); + occurrence = std::search(reader.begin(), reader.end(), bytes.begin(), bytes.end()); if (occurrence == reader.end()) break; -@@ -407,7 +407,7 @@ namespace hex::plugin::builtin { - if (validBytes == size) { - bytes &= hex::bitmask(size * 8); +@@ -423,7 +423,7 @@ namespace hex::plugin::builtin { + + task.update(address); - auto result = std::visit([&](auto tag) { + auto result = std::visit([&, min=min, max=max](auto tag) { using T = std::remove_cvref_t>; auto minValue = std::get(min); diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__hex__editor.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__hex__editor.cpp index d2e69f0e0684..ec2e8357c7dc 100644 --- a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__hex__editor.cpp +++ b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__hex__editor.cpp @@ -1,11 +1,11 @@ ---- plugins/builtin/source/content/views/view_hex_editor.cpp.orig 2023-02-12 18:24:04 UTC +--- plugins/builtin/source/content/views/view_hex_editor.cpp.orig 2023-04-04 10:04:22 UTC +++ plugins/builtin/source/content/views/view_hex_editor.cpp -@@ -297,7 +297,7 @@ namespace hex::plugin::builtin { +@@ -298,7 +298,7 @@ namespace hex::plugin::builtin { reader.seek(this->m_searchPosition.value_or(provider->getBaseAddress())); constexpr static auto searchFunction = [](const auto &haystackBegin, const auto &haystackEnd, const auto &needleBegin, const auto &needleEnd) { - return std::search(haystackBegin, haystackEnd, std::boyer_moore_horspool_searcher(needleBegin, needleEnd)); + return std::search(haystackBegin, haystackEnd, needleBegin, needleEnd); }; if (!backwards) { diff --git a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__pattern__editor.cpp b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__pattern__editor.cpp index fe12e229b4fb..e6d2be7ebd87 100644 --- a/editors/imhex/files/patch-plugins_builtin_source_content_views_view__pattern__editor.cpp +++ b/editors/imhex/files/patch-plugins_builtin_source_content_views_view__pattern__editor.cpp @@ -1,29 +1,32 @@ ---- plugins/builtin/source/content/views/view_pattern_editor.cpp.orig 2023-02-15 08:39:23 UTC +--- plugins/builtin/source/content/views/view_pattern_editor.cpp.orig 2023-04-04 10:04:22 UTC +++ plugins/builtin/source/content/views/view_pattern_editor.cpp -@@ -437,7 +437,7 @@ namespace hex::plugin::builtin { +@@ -440,9 +440,9 @@ namespace hex::plugin::builtin { + dataProvider->writeRaw(0x00, section.data.data(), section.data.size()); dataProvider->setReadOnly(true); - auto hexEditor = ui::HexEditor(); +- auto hexEditor = auto(this->m_sectionHexEditor); ++ auto hexEditor = this->m_sectionHexEditor; + - hexEditor.setBackgroundHighlightCallback([this, id](u64 address, const u8 *, size_t) -> std::optional { + hexEditor.setBackgroundHighlightCallback([this, id=id](u64 address, const u8 *, size_t) -> std::optional { if (this->m_runningEvaluators != 0) return std::nullopt; if (!ImHexApi::Provider::isValid()) -@@ -459,7 +459,7 @@ namespace hex::plugin::builtin { - +@@ -465,7 +465,7 @@ namespace hex::plugin::builtin { auto patternProvider = ImHexApi::Provider::get(); -- this->m_sectionWindowDrawer[patternProvider] = [id, patternProvider, dataProvider = std::move(dataProvider), hexEditor, patternDrawer = ui::PatternDrawer()] mutable { -+ this->m_sectionWindowDrawer[patternProvider] = [id=id, patternProvider, dataProvider = std::move(dataProvider), hexEditor, patternDrawer = ui::PatternDrawer()] mutable { + +- this->m_sectionWindowDrawer[patternProvider] = [id, patternProvider, dataProvider = std::move(dataProvider), hexEditor = std::move(hexEditor), patternDrawer = ui::PatternDrawer()] mutable { ++ this->m_sectionWindowDrawer[patternProvider] = [id=id, patternProvider, dataProvider = std::move(dataProvider), hexEditor = std::move(hexEditor), patternDrawer = ui::PatternDrawer()] mutable { hexEditor.setProvider(dataProvider.get()); hexEditor.draw(480_scaled); + patternDrawer.setSelectionCallback([&](const auto ®ion) { +@@ -952,7 +952,7 @@ namespace hex::plugin::builtin { + if (type->isTemplateType()) + continue; -@@ -931,7 +931,7 @@ namespace hex::plugin::builtin { - if (type->isTemplateType()) - continue; - -- createNestedMenu(hex::splitString(typeName, "::"), [&] { -+ createNestedMenu(hex::splitString(typeName, "::"), [&, typeName=typeName] { - std::string variableName; - for (char &c : hex::replaceStrings(typeName, "::", "_")) - variableName += static_cast(std::tolower(c)); +- createNestedMenu(hex::splitString(typeName, "::"), [&] { ++ createNestedMenu(hex::splitString(typeName, "::"), [&, typeName=typeName] { + std::string variableName; + for (char &c : hex::replaceStrings(typeName, "::", "_")) + variableName += static_cast(std::tolower(c)); diff --git a/editors/imhex/files/patch-plugins_builtin_source_ui_pattern__drawer.cpp b/editors/imhex/files/patch-plugins_builtin_source_ui_pattern__drawer.cpp index 3a6ff03be6c5..3ac0ae00d22f 100644 --- a/editors/imhex/files/patch-plugins_builtin_source_ui_pattern__drawer.cpp +++ b/editors/imhex/files/patch-plugins_builtin_source_ui_pattern__drawer.cpp @@ -1,12 +1,12 @@ ---- plugins/builtin/source/ui/pattern_drawer.cpp.orig 2023-02-12 18:24:04 UTC +--- plugins/builtin/source/ui/pattern_drawer.cpp.orig 2023-04-04 10:04:22 UTC +++ plugins/builtin/source/ui/pattern_drawer.cpp -@@ -134,7 +134,8 @@ namespace hex::plugin::builtin::ui { +@@ -155,7 +155,8 @@ namespace hex::plugin::builtin::ui { ImGui::TextUnformatted("hex.builtin.pattern_drawer.visualizer.invalid_parameter_count"_lang); } else { try { - visualizer.callback(pattern, iteratable, reset, { arguments.begin() + 1, arguments.end() }); + const std::vector args = { arguments.begin() + 1, arguments.end() }; + visualizer.callback(pattern, iteratable, reset, args); } catch (std::exception &e) { this->m_lastVisualizerError = e.what(); } diff --git a/editors/imhex/pkg-plist b/editors/imhex/pkg-plist index a050fd7085a4..5172463a5756 100644 --- a/editors/imhex/pkg-plist +++ b/editors/imhex/pkg-plist @@ -1,152 +1,161 @@ bin/imhex -lib/libimhex.so.1.27.1 +lib/libimhex.so.1.28.0 share/applications/imhex.desktop %%DATADIR%%/constants/_schema.json %%DATADIR%%/constants/crc16.json %%DATADIR%%/constants/crc32.json %%DATADIR%%/constants/http_status.json %%DATADIR%%/constants/linux_errors.json %%DATADIR%%/encodings/arabic_iso.tbl %%DATADIR%%/encodings/arabic_windows.tbl %%DATADIR%%/encodings/ascii_ansi.tbl %%DATADIR%%/encodings/ascii_oem.tbl %%DATADIR%%/encodings/ascii.tbl %%DATADIR%%/encodings/baltic_iso.tbl %%DATADIR%%/encodings/baltic_windows.tbl %%DATADIR%%/encodings/cyrillic_cp866.tbl %%DATADIR%%/encodings/cyrillic_iso.tbl %%DATADIR%%/encodings/cyrillic_koi8_r.tbl %%DATADIR%%/encodings/cyrillic_koi8_u.tbl %%DATADIR%%/encodings/cyrillic_windows.tbl %%DATADIR%%/encodings/eastern_europe_iso.tbl %%DATADIR%%/encodings/eastern_europe_windows.tbl %%DATADIR%%/encodings/ebcdic.tbl %%DATADIR%%/encodings/euc_jp.tbl %%DATADIR%%/encodings/euc_kr.tbl %%DATADIR%%/encodings/greek_iso.tbl %%DATADIR%%/encodings/greek_windows.tbl %%DATADIR%%/encodings/hebrew_iso.tbl %%DATADIR%%/encodings/hebrew_windows.tbl %%DATADIR%%/encodings/iso_646.tbl %%DATADIR%%/encodings/iso_6937.tbl %%DATADIR%%/encodings/jis_x_0201.tbl %%DATADIR%%/encodings/jis_x_0211.tbl %%DATADIR%%/encodings/jis_x_0213.tbl %%DATADIR%%/encodings/macintosh.tbl %%DATADIR%%/encodings/ms932.tbl %%DATADIR%%/encodings/pokegen1_en.tbl +%%DATADIR%%/encodings/pokegen3_en.tbl %%DATADIR%%/encodings/shiftjis.tbl %%DATADIR%%/encodings/thai.tbl %%DATADIR%%/encodings/turkish_iso.tbl %%DATADIR%%/encodings/turkish_windows.tbl %%DATADIR%%/encodings/utf8.tbl %%DATADIR%%/encodings/vietnamese.tbl %%DATADIR%%/includes/hex/core.pat %%DATADIR%%/includes/hex/dec.pat %%DATADIR%%/includes/hex/http.pat +%%DATADIR%%/includes/hex/provider.pat %%DATADIR%%/includes/hex/impl/imhex_check.pat %%DATADIR%%/includes/hex/type/mangled.pat %%DATADIR%%/includes/std/array.pat %%DATADIR%%/includes/std/bit.pat %%DATADIR%%/includes/std/core.pat %%DATADIR%%/includes/std/ctype.pat %%DATADIR%%/includes/std/file.pat %%DATADIR%%/includes/std/fxpt.pat %%DATADIR%%/includes/std/hash.pat %%DATADIR%%/includes/std/io.pat %%DATADIR%%/includes/std/limits.pat %%DATADIR%%/includes/std/math.pat %%DATADIR%%/includes/std/mem.pat %%DATADIR%%/includes/std/ptr.pat +%%DATADIR%%/includes/std/random.pat %%DATADIR%%/includes/std/string.pat %%DATADIR%%/includes/std/sys.pat %%DATADIR%%/includes/std/time.pat %%DATADIR%%/includes/type/base.pat %%DATADIR%%/includes/type/bcd.pat %%DATADIR%%/includes/type/byte.pat %%DATADIR%%/includes/type/color.pat %%DATADIR%%/includes/type/float16.pat %%DATADIR%%/includes/type/guid.pat %%DATADIR%%/includes/type/ip.pat %%DATADIR%%/includes/type/leb128.pat %%DATADIR%%/includes/type/mac.pat %%DATADIR%%/includes/type/magic.pat %%DATADIR%%/includes/type/path.pat %%DATADIR%%/includes/type/size.pat %%DATADIR%%/includes/type/time.pat %%DATADIR%%/includes/type/types/010.pat %%DATADIR%%/includes/type/types/c.pat %%DATADIR%%/includes/type/types/linux.pat %%DATADIR%%/includes/type/types/rust.pat %%DATADIR%%/includes/type/types/win32.pat %%DATADIR%%/magic/nintendo_switch_magic %%DATADIR%%/magic/portable_executable_magic %%DATADIR%%/patterns/afe2.hexpat %%DATADIR%%/patterns/ar.hexpat %%DATADIR%%/patterns/arm_cm_vtor.hexpat %%DATADIR%%/patterns/bencode.hexpat %%DATADIR%%/patterns/bmp.hexpat %%DATADIR%%/patterns/bson.hexpat +%%DATADIR%%/patterns/bsp_goldsrc.hexpat %%DATADIR%%/patterns/cchva.hexpat %%DATADIR%%/patterns/ccpal.hexpat %%DATADIR%%/patterns/ccvxl.hexpat %%DATADIR%%/patterns/chm.hexpat %%DATADIR%%/patterns/coff.hexpat %%DATADIR%%/patterns/cpio.pat %%DATADIR%%/patterns/dds.hexpat +%%DATADIR%%/patterns/dex.hexpat %%DATADIR%%/patterns/dmg.hexpat +%%DATADIR%%/patterns/dsstore.hexpat %%DATADIR%%/patterns/elf.hexpat +%%DATADIR%%/patterns/evtx.hexpat %%DATADIR%%/patterns/fdt.pat %%DATADIR%%/patterns/flac.hexpat %%DATADIR%%/patterns/fs.hexpat %%DATADIR%%/patterns/gif.hexpat %%DATADIR%%/patterns/gzip.hexpat %%DATADIR%%/patterns/ico.hexpat %%DATADIR%%/patterns/id3.hexpat %%DATADIR%%/patterns/intel_hex.hexpat %%DATADIR%%/patterns/ip.hexpat %%DATADIR%%/patterns/iso.hexpat %%DATADIR%%/patterns/java_class.hexpat %%DATADIR%%/patterns/jpeg.hexpat %%DATADIR%%/patterns/lnk.hexpat +%%DATADIR%%/patterns/lua54.hexpat %%DATADIR%%/patterns/macho.hexpat %%DATADIR%%/patterns/midi.hexpat %%DATADIR%%/patterns/minidump.hexpat %%DATADIR%%/patterns/msgpack.hexpat %%DATADIR%%/patterns/nacp.hexpat %%DATADIR%%/patterns/nbt.hexpat %%DATADIR%%/patterns/ne.hexpat %%DATADIR%%/patterns/nro.hexpat %%DATADIR%%/patterns/ntag.hexpat %%DATADIR%%/patterns/ogg.hexpat -%%DATADIR%%/patterns/pbzx.hexpat +%%DATADIR%%/patterns/pbz.hexpat %%DATADIR%%/patterns/pcap.hexpat %%DATADIR%%/patterns/pcx.hexpat %%DATADIR%%/patterns/pe.hexpat %%DATADIR%%/patterns/pfs0.hexpat %%DATADIR%%/patterns/pif.hexpat %%DATADIR%%/patterns/png.hexpat %%DATADIR%%/patterns/prodinfo.hexpat %%DATADIR%%/patterns/protobuf.hexpat %%DATADIR%%/patterns/qbcl.hexpat %%DATADIR%%/patterns/qoi.hexpat %%DATADIR%%/patterns/sit5.hexpat %%DATADIR%%/patterns/spirv.hexpat %%DATADIR%%/patterns/stl.hexpat %%DATADIR%%/patterns/tar.hexpat %%DATADIR%%/patterns/tga.hexpat +%%DATADIR%%/patterns/uefi.hexpat %%DATADIR%%/patterns/uf2.hexpat %%DATADIR%%/patterns/usb.hexpat %%DATADIR%%/patterns/vdf.hexpat %%DATADIR%%/patterns/vhdx.hexpat %%DATADIR%%/patterns/wad.hexpat %%DATADIR%%/patterns/wav.hexpat %%DATADIR%%/patterns/xbeh.hexpat %%DATADIR%%/patterns/xci.hexpat %%DATADIR%%/patterns/xilinx_bit.hexpat %%DATADIR%%/patterns/zip.hexpat %%DATADIR%%/patterns/zstd.hexpat %%DATADIR%%/plugins/builtin.hexplug share/metainfo/net.werwolv.imhex.appdata.xml share/metainfo/net.werwolv.imhex.metainfo.xml share/pixmaps/imhex.png