editors/imhex: Update to 1.24.3
This commit is contained in:
parent
8dad5f9f33
commit
e1d94b436d
@ -1,5 +1,5 @@
|
||||
PORTNAME= imhex
|
||||
PORTVERSION= 1.23.1
|
||||
PORTVERSION= 1.24.3
|
||||
DISTVERSIONPREFIX= v
|
||||
CATEGORIES= editors
|
||||
MASTER_SITES= https://git.sr.ht/~danyspin97/xdgpp/blob/f01f810714443d0f10c333d4d1d9c0383be41375/:xdg
|
||||
@ -20,6 +20,7 @@ EXTRACT_ONLY= ${DISTNAME}${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-ImHex-Patterns-${GH_TAG_IMHEX_PATTERNS}_GH0${EXTRACT_SUFX} \
|
||||
@ -29,8 +30,8 @@ BUILD_DEPENDS= glm>0:math/glm \
|
||||
nlohmann-json>0:devel/nlohmann-json \
|
||||
${LOCALBASE}/include/range/v3/range.hpp:devel/range-v3
|
||||
LIB_DEPENDS= libcurl.so:ftp/curl \
|
||||
libfreetype.so:print/freetype2 \
|
||||
libglfw.so:graphics/glfw \
|
||||
libfreetype.so:print/freetype2 \
|
||||
libharfbuzz.so:print/harfbuzz \
|
||||
libmbedtls.so:security/mbedtls \
|
||||
libtre.so:textproc/libtre
|
||||
@ -47,6 +48,7 @@ GH_TUPLE= btzy:nativefiledialog-extended:${GH_TAG_NATIVEFILEDIALOG}:nativefiledi
|
||||
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 \
|
||||
@ -54,12 +56,13 @@ GH_TUPLE= btzy:nativefiledialog-extended:${GH_TAG_NATIVEFILEDIALOG}:nativefiledi
|
||||
|
||||
GH_TAG_CAPSTONE= d5141c0
|
||||
GH_TAG_CLI11= faea921
|
||||
GH_TAG_FMT= c4ee726
|
||||
GH_TAG_IMHEX_PATTERNS= 5481c2f
|
||||
GH_TAG_LIBROMFS= 8c8556d
|
||||
GH_TAG_NATIVEFILEDIALOG= 6967d28
|
||||
GH_TAG_PATTERN_LANGUAGE= 143628a
|
||||
GH_TAG_YARA= d5a7565
|
||||
GH_TAG_FMT= a337011
|
||||
GH_TAG_IMHEX_PATTERNS= 8e70a55
|
||||
GH_TAG_JTHREAD= 0fa8d39
|
||||
GH_TAG_LIBROMFS= 8efe4c4
|
||||
GH_TAG_NATIVEFILEDIALOG= d4df2b6
|
||||
GH_TAG_PATTERN_LANGUAGE= ab7d738
|
||||
GH_TAG_YARA= ba94b4f
|
||||
|
||||
CMAKE_ARGS= -DUSE_SYSTEM_CURL=ON -DUSE_SYSTEM_NLOHMANN_JSON=ON \
|
||||
-DIMHEX_STRIP_RELEASE=OFF -DIMHEX_PLUGINS_IN_SHARE=ON \
|
||||
@ -84,6 +87,7 @@ 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_nativefiledialog}/* ${WRKSRC}/lib/external/nativefiledialog
|
||||
${CP} -R ${WRKSRC_pattern_language}/* ${WRKSRC}/lib/external/pattern_language
|
||||
|
@ -1,21 +1,23 @@
|
||||
TIMESTAMP = 1663402501
|
||||
TIMESTAMP = 1665857378
|
||||
SHA256 (imhex/xdg.hpp) = 2e08ce74adb71ff9b9aa9e1c999733fccd4b00967b9cf0c0e51dbf049392a9ec
|
||||
SIZE (imhex/xdg.hpp) = 7674
|
||||
SHA256 (imhex/WerWolv-ImHex-v1.23.1_GH0.tar.gz) = 37bd49d0a8f9b7785106b15f829965affb6235199ea0763397af4fe97b3a1682
|
||||
SIZE (imhex/WerWolv-ImHex-v1.23.1_GH0.tar.gz) = 10927633
|
||||
SHA256 (imhex/btzy-nativefiledialog-extended-6967d28_GH0.tar.gz) = 67575871aca25f6b448831183851656d95cee5af773ac7b2a1f7f887f6d874d6
|
||||
SIZE (imhex/btzy-nativefiledialog-extended-6967d28_GH0.tar.gz) = 412145
|
||||
SHA256 (imhex/WerWolv-ImHex-v1.24.3_GH0.tar.gz) = 5d6780b2d4c3b92bbe7619dcae34138072a8ed9c540523d25760da237f01d279
|
||||
SIZE (imhex/WerWolv-ImHex-v1.24.3_GH0.tar.gz) = 11126282
|
||||
SHA256 (imhex/btzy-nativefiledialog-extended-d4df2b6_GH0.tar.gz) = a0440e52bd25b8f85cb25ef68fe19ca39b4b0fad39358d5a501b317cad9d0f69
|
||||
SIZE (imhex/btzy-nativefiledialog-extended-d4df2b6_GH0.tar.gz) = 412249
|
||||
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-c4ee726_GH0.tar.gz) = 05ba66b0a9ed040e5cfb07e845a0aa61fdbbb9a0cbd22a1860a303e8cbf343e4
|
||||
SIZE (imhex/fmtlib-fmt-c4ee726_GH0.tar.gz) = 833672
|
||||
SHA256 (imhex/VirusTotal-yara-d5a7565_GH0.tar.gz) = 1c908b160f2432a25aefc1e94147949d24bcb79c1412a2be840f767531f3ff7e
|
||||
SIZE (imhex/VirusTotal-yara-d5a7565_GH0.tar.gz) = 1287317
|
||||
SHA256 (imhex/WerWolv-ImHex-Patterns-5481c2f_GH0.tar.gz) = cfa2c76fb0986e406a3541202df4b7e2e5b8cf6bcf5fb14d6605efb1ca32f6bc
|
||||
SIZE (imhex/WerWolv-ImHex-Patterns-5481c2f_GH0.tar.gz) = 5171762
|
||||
SHA256 (imhex/WerWolv-PatternLanguage-143628a_GH0.tar.gz) = 4d284923d1fec8bb942145365cd57e0b33e786c5db2cd7d3d133be417a516070
|
||||
SIZE (imhex/WerWolv-PatternLanguage-143628a_GH0.tar.gz) = 288257
|
||||
SHA256 (imhex/WerWolv-libromfs-8c8556d_GH0.tar.gz) = 46364edcf21a4cbe7c48094e755751aa03704a9c1efe3be5add5f52a15690474
|
||||
SIZE (imhex/WerWolv-libromfs-8c8556d_GH0.tar.gz) = 3868
|
||||
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-8e70a55_GH0.tar.gz) = 8d283e8806412d4083f9da9c7b1ff499bc7374394397bd7f270ba11277cd6df2
|
||||
SIZE (imhex/WerWolv-ImHex-Patterns-8e70a55_GH0.tar.gz) = 5176390
|
||||
SHA256 (imhex/WerWolv-PatternLanguage-ab7d738_GH0.tar.gz) = d7b5844a21622265a1ecd5184650177595cfa40a7bb17cb44f2104f29dc38ac5
|
||||
SIZE (imhex/WerWolv-PatternLanguage-ab7d738_GH0.tar.gz) = 415301
|
||||
SHA256 (imhex/WerWolv-libromfs-8efe4c4_GH0.tar.gz) = cc538b4add2a451c7c9be4237717b3231171cce56db51a956eaffd85d7f5af5b
|
||||
SIZE (imhex/WerWolv-libromfs-8efe4c4_GH0.tar.gz) = 4078
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- CMakeLists.txt.orig 2022-09-03 22:05:27 UTC
|
||||
--- CMakeLists.txt.orig 2022-10-08 08:03:47 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -22,8 +22,6 @@ project(imhex VERSION ${IMHEX_VERSION})
|
||||
@@ -23,8 +23,6 @@ project(imhex VERSION ${IMHEX_VERSION})
|
||||
|
||||
# Make sure project is configured correctly
|
||||
setDefaultBuiltTypeIfUnset()
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- cmake/build_helpers.cmake.orig 2022-09-15 12:40:14 UTC
|
||||
--- cmake/build_helpers.cmake.orig 2022-10-08 08:03:47 UTC
|
||||
+++ cmake/build_helpers.cmake
|
||||
@@ -383,24 +383,15 @@ function(downloadImHexPatternsFiles dest)
|
||||
else ()
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
macro(setupCompilerWarnings target)
|
||||
set(IMHEX_COMMON_FLAGS "-Wall -Wextra -Werror")
|
||||
- set(IMHEX_C_FLAGS "${IMHEX_COMMON_FLAGS} -Wno-restrict -Wno-stringop-overread")
|
||||
- set(IMHEX_C_FLAGS "${IMHEX_COMMON_FLAGS} -Wno-restrict -Wno-stringop-overread -Wno-stringop-overflow")
|
||||
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${IMHEX_C_FLAGS}")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${IMHEX_C_FLAGS}")
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- lib/external/pattern_language/lib/include/pl/core/ast/ast_node_bitfield.hpp.orig 2022-08-18 14:31:33 UTC
|
||||
+++ lib/external/pattern_language/lib/include/pl/core/ast/ast_node_bitfield.hpp
|
||||
@@ -86,7 +86,6 @@ namespace pl::core::ast {
|
||||
|
||||
private:
|
||||
std::vector<std::unique_ptr<ASTNode>> m_entries;
|
||||
- mutable size_t m_bitOffset = 0x00;
|
||||
};
|
||||
|
||||
}
|
||||
\ No newline at end of file
|
@ -1,4 +1,4 @@
|
||||
--- lib/external/pattern_language/lib/include/pl/core/token.hpp.orig 2022-09-16 15:30:16 UTC
|
||||
--- lib/external/pattern_language/lib/include/pl/core/token.hpp.orig 2022-10-15 20:26:43 UTC
|
||||
+++ lib/external/pattern_language/lib/include/pl/core/token.hpp
|
||||
@@ -148,9 +148,9 @@ namespace pl::core {
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
[[nodiscard]] constexpr static inline bool isInteger(const ValueType &type) {
|
||||
return isUnsigned(type) || isSigned(type);
|
||||
}
|
||||
@@ -194,133 +194,133 @@ namespace pl::core {
|
||||
@@ -206,133 +206,133 @@ namespace pl::core {
|
||||
|
||||
namespace tkn {
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- lib/libimhex/CMakeLists.txt.orig 2022-08-14 12:54:20 UTC
|
||||
--- lib/libimhex/CMakeLists.txt.orig 2022-10-08 08:03:47 UTC
|
||||
+++ lib/libimhex/CMakeLists.txt
|
||||
@@ -26,7 +26,6 @@ set(FPHSA_NAME_MISMATCHED ON CACHE BOOL "")
|
||||
@@ -27,7 +27,6 @@ set(FPHSA_NAME_MISMATCHED ON CACHE BOOL "")
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
if (NOT USE_SYSTEM_NFD)
|
||||
|
@ -0,0 +1,18 @@
|
||||
--- lib/libimhex/include/hex/api/task.hpp.orig 2022-10-08 08:03:47 UTC
|
||||
+++ lib/libimhex/include/hex/api/task.hpp
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
+#include <jthread.hpp>
|
||||
|
||||
#include <cstdio>
|
||||
#include <thread>
|
||||
@@ -11,6 +12,7 @@
|
||||
#include <memory>
|
||||
#include <list>
|
||||
#include <condition_variable>
|
||||
+#include <vector>
|
||||
|
||||
namespace hex {
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- lib/libimhex/include/hex/data_processor/node.hpp.orig 2022-08-14 15:02:06 UTC
|
||||
--- lib/libimhex/include/hex/data_processor/node.hpp.orig 2022-10-08 08:03:47 UTC
|
||||
+++ lib/libimhex/include/hex/data_processor/node.hpp
|
||||
@@ -45,6 +45,7 @@ namespace hex::dp {
|
||||
@@ -46,6 +46,7 @@ namespace hex::dp {
|
||||
struct NodeError {
|
||||
Node *node;
|
||||
std::string message;
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- lib/libimhex/source/api/imhex_api.cpp.orig 2022-08-17 21:25:52 UTC
|
||||
--- lib/libimhex/source/api/imhex_api.cpp.orig 2022-10-08 08:03:47 UTC
|
||||
+++ lib/libimhex/source/api/imhex_api.cpp
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <hex/api/event.hpp>
|
||||
@ -8,7 +8,7 @@
|
||||
#include <utility>
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -260,7 +261,7 @@ namespace hex {
|
||||
@@ -266,7 +267,7 @@ namespace hex {
|
||||
}
|
||||
|
||||
bool isDirty() {
|
||||
|
@ -1,18 +1,18 @@
|
||||
--- lib/libimhex/source/helpers/file.cpp.orig 2022-08-17 21:25:52 UTC
|
||||
--- 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");
|
||||
#else
|
||||
if (mode == File::Mode::Read)
|
||||
- this->m_file = fopen64(path.string().c_str(), "rb");
|
||||
+ this->m_file = fopen(path.string().c_str(), "rb");
|
||||
- this->m_file = fopen64(hex::toUTF8String(path).c_str(), "rb");
|
||||
+ this->m_file = fopen(hex::toUTF8String(path).c_str(), "rb");
|
||||
else if (mode == File::Mode::Write)
|
||||
- this->m_file = fopen64(path.string().c_str(), "r+b");
|
||||
+ this->m_file = fopen(path.string().c_str(), "r+b");
|
||||
- this->m_file = fopen64(hex::toUTF8String(path).c_str(), "r+b");
|
||||
+ this->m_file = fopen(hex::toUTF8String(path).c_str(), "r+b");
|
||||
|
||||
if (mode == File::Mode::Create || (mode == File::Mode::Write && this->m_file == nullptr))
|
||||
- this->m_file = fopen64(path.string().c_str(), "w+b");
|
||||
+ this->m_file = fopen(path.string().c_str(), "w+b");
|
||||
- this->m_file = fopen64(hex::toUTF8String(path).c_str(), "w+b");
|
||||
+ this->m_file = fopen(hex::toUTF8String(path).c_str(), "w+b");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
--- lib/libimhex/source/helpers/fs.cpp.orig 2022-08-05 10:52:34 UTC
|
||||
--- lib/libimhex/source/helpers/fs.cpp.orig 2022-10-08 08:03:47 UTC
|
||||
+++ lib/libimhex/source/helpers/fs.cpp
|
||||
@@ -14,10 +14,15 @@
|
||||
#include <shlobj.h>
|
||||
@ -16,7 +16,7 @@
|
||||
#include <filesystem>
|
||||
|
||||
namespace hex::fs {
|
||||
@@ -179,7 +184,7 @@ namespace hex::fs {
|
||||
@@ -189,7 +194,7 @@ namespace hex::fs {
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,15 @@
|
||||
--- plugins/builtin/source/content/helpers/math_evaluator.cpp.orig 2022-10-12 10:48:50 UTC
|
||||
+++ plugins/builtin/source/content/helpers/math_evaluator.cpp
|
||||
@@ -434,9 +434,9 @@ namespace hex {
|
||||
template<typename T>
|
||||
void MathEvaluator<T>::registerStandardVariables() {
|
||||
this->setVariable("ans", 0);
|
||||
- this->setVariable("pi", std::numbers::pi, true);
|
||||
- this->setVariable("e", std::numbers::e, true);
|
||||
- this->setVariable("phi", std::numbers::phi, true);
|
||||
+ this->setVariable("pi", 3.141592653589793238462643383279502884L, true);
|
||||
+ this->setVariable("e", 2.718281828459045235360287471352662498L, true);
|
||||
+ this->setVariable("phi", 1.618033988749894848204586834365638117L, true);
|
||||
}
|
||||
|
||||
template<typename T>
|
@ -1,13 +1,11 @@
|
||||
--- plugins/builtin/source/content/providers/disk_provider.cpp.orig 2022-08-14 12:54:20 UTC
|
||||
--- plugins/builtin/source/content/providers/disk_provider.cpp.orig 2022-10-08 08:03:47 UTC
|
||||
+++ plugins/builtin/source/content/providers/disk_provider.cpp
|
||||
@@ -18,8 +18,9 @@
|
||||
#include <sys/stat.h>
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
+# if !defined(__FreeBSD__)
|
||||
-#if defined(OS_LINUX)
|
||||
+#if !defined(__FreeBSD__)
|
||||
#define lseek lseek64
|
||||
-
|
||||
+# endif
|
||||
#elif defined(OS_MACOS)
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- plugins/builtin/source/content/settings_entries.cpp.orig 2022-07-16 11:41:37 UTC
|
||||
--- plugins/builtin/source/content/settings_entries.cpp.orig 2022-10-08 08:03:47 UTC
|
||||
+++ plugins/builtin/source/content/settings_entries.cpp
|
||||
@@ -19,8 +19,7 @@ namespace {
|
||||
@@ -21,8 +21,7 @@ namespace {
|
||||
userFolders.clear();
|
||||
std::vector<std::string> paths = setting;
|
||||
for (const auto &path : paths) {
|
||||
|
@ -1,11 +1,128 @@
|
||||
--- plugins/builtin/source/content/views/view_find.cpp.orig 2022-09-15 12:40:14 UTC
|
||||
--- plugins/builtin/source/content/views/view_find.cpp.orig 2022-10-08 08:03:47 UTC
|
||||
+++ plugins/builtin/source/content/views/view_find.cpp
|
||||
@@ -239,7 +239,7 @@ namespace hex::plugin::builtin {
|
||||
@@ -153,34 +153,87 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
template<typename Type, typename StorageType>
|
||||
- static std::tuple<bool, std::variant<u64, i64, float, double>, size_t> parseNumericValue(const std::string &string) {
|
||||
+ static std::tuple<bool, u64, size_t> parseNumericValue_u(const std::string &string) {
|
||||
static_assert(sizeof(StorageType) >= sizeof(Type));
|
||||
|
||||
StorageType value = 0x00;
|
||||
- auto result = std::from_chars(string.data(), string.data() + string.size(), value);
|
||||
- if (result.ec != std::errc() || result.ptr != string.data() + string.size())
|
||||
+ try {
|
||||
+ value = std::stoull(string.data());
|
||||
+ } catch (...) {
|
||||
return { false, { }, 0 };
|
||||
+ }
|
||||
|
||||
- if (value < std::numeric_limits<Type>::min() || value > std::numeric_limits<Type>::max())
|
||||
+ if (value < std::numeric_limits<Type>::lowest() || value > std::numeric_limits<Type>::max())
|
||||
return { false, { }, 0 };
|
||||
|
||||
return { true, value, sizeof(Type) };
|
||||
}
|
||||
|
||||
+ template<typename Type, typename StorageType>
|
||||
+ static std::tuple<bool, i64, size_t> parseNumericValue_i(const std::string &string) {
|
||||
+ static_assert(sizeof(StorageType) >= sizeof(Type));
|
||||
+
|
||||
+ StorageType value = 0x00;
|
||||
+ try {
|
||||
+ value = std::stoll(string.data());
|
||||
+ } catch (...) {
|
||||
+ return { false, { }, 0 };
|
||||
+ }
|
||||
+
|
||||
+ if (value < std::numeric_limits<Type>::lowest() || value > std::numeric_limits<Type>::max())
|
||||
+ return { false, { }, 0 };
|
||||
+
|
||||
+ return { true, value, sizeof(Type) };
|
||||
+ }
|
||||
+
|
||||
+ template<typename Type, typename StorageType>
|
||||
+ static std::tuple<bool, float, size_t> parseNumericValue_f(const std::string &string) {
|
||||
+ static_assert(sizeof(StorageType) >= sizeof(Type));
|
||||
+
|
||||
+ StorageType value = 0x00;
|
||||
+ try {
|
||||
+ value = std::stof(string.data());
|
||||
+ } catch (...) {
|
||||
+ return { false, { }, 0 };
|
||||
+ }
|
||||
+
|
||||
+ if (value < std::numeric_limits<Type>::lowest() || value > std::numeric_limits<Type>::max())
|
||||
+ return { false, { }, 0 };
|
||||
+
|
||||
+ return { true, value, sizeof(float) };
|
||||
+ }
|
||||
+
|
||||
+ template<typename Type, typename StorageType>
|
||||
+ static std::tuple<bool, double, size_t> parseNumericValue_d(const std::string &string) {
|
||||
+ static_assert(sizeof(StorageType) >= sizeof(Type));
|
||||
+
|
||||
+ StorageType value = 0x00;
|
||||
+ try {
|
||||
+ value = std::stod(string.data());
|
||||
+ } catch (...) {
|
||||
+ return { false, { }, 0 };
|
||||
+ }
|
||||
+
|
||||
+ if (value < std::numeric_limits<Type>::lowest() || value > std::numeric_limits<Type>::max())
|
||||
+ return { false, { }, 0 };
|
||||
+
|
||||
+ return { true, value, sizeof(Type) };
|
||||
+ }
|
||||
+
|
||||
std::tuple<bool, std::variant<u64, i64, float, double>, size_t> ViewFind::parseNumericValueInput(const std::string &input, SearchSettings::Value::Type type) {
|
||||
switch (type) {
|
||||
using enum SearchSettings::Value::Type;
|
||||
|
||||
- case U8: return parseNumericValue<u8, u64>(input);
|
||||
- case U16: return parseNumericValue<u16, u64>(input);
|
||||
- case U32: return parseNumericValue<u32, u64>(input);
|
||||
- case U64: return parseNumericValue<u64, u64>(input);
|
||||
- case I8: return parseNumericValue<i8, i64>(input);
|
||||
- case I16: return parseNumericValue<i16, i64>(input);
|
||||
- case I32: return parseNumericValue<i32, i64>(input);
|
||||
- case I64: return parseNumericValue<i64, i64>(input);
|
||||
- case F32: return parseNumericValue<float, float>(input);
|
||||
- case F64: return parseNumericValue<double, double>(input);
|
||||
+ case U8: return parseNumericValue_u<u8, u64>(input);
|
||||
+ case U16: return parseNumericValue_u<u16, u64>(input);
|
||||
+ case U32: return parseNumericValue_u<u32, u64>(input);
|
||||
+ case U64: return parseNumericValue_u<u64, u64>(input);
|
||||
+ case I8: return parseNumericValue_i<i8, i64>(input);
|
||||
+ case I16: return parseNumericValue_i<i16, i64>(input);
|
||||
+ case I32: return parseNumericValue_i<i32, i64>(input);
|
||||
+ case I64: return parseNumericValue_i<i64, i64>(input);
|
||||
+ case F32: return parseNumericValue_f<float, float>(input);
|
||||
+ case F64: return parseNumericValue_d<double, double>(input);
|
||||
default: return { false, { }, 0 };
|
||||
}
|
||||
}
|
||||
@@ -293,7 +346,7 @@ namespace hex::plugin::builtin {
|
||||
|
||||
auto occurrence = reader.begin();
|
||||
while (true) {
|
||||
- occurrence = std::search(reader.begin(), reader.end(), std::boyer_moore_horspool_searcher(sequence.begin(), sequence.end()));
|
||||
+ occurrence = std::search(reader.begin(), reader.end(), sequence.begin(), sequence.end());
|
||||
- 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;
|
||||
|
||||
@@ -377,8 +430,12 @@ namespace hex::plugin::builtin {
|
||||
reader.seek(searchRegion.getStartAddress());
|
||||
reader.setEndAddress(searchRegion.getEndAddress());
|
||||
|
||||
- const auto [validMin, min, sizeMin] = parseNumericValueInput(settings.inputMin, settings.type);
|
||||
- const auto [validMax, max, sizeMax] = parseNumericValueInput(settings.inputMax, settings.type);
|
||||
+ const auto validMin = std::get<0>(parseNumericValueInput(settings.inputMin, settings.type));
|
||||
+ const auto min = std::get<1>(parseNumericValueInput(settings.inputMin, settings.type));
|
||||
+ const auto sizeMin = std::get<2>(parseNumericValueInput(settings.inputMin, settings.type));
|
||||
+ const auto validMax = std::get<0>(parseNumericValueInput(settings.inputMax, settings.type));
|
||||
+ const auto max = std::get<1>(parseNumericValueInput(settings.inputMax, settings.type));
|
||||
+ const auto sizeMax = std::get<2>(parseNumericValueInput(settings.inputMax, settings.type));
|
||||
|
||||
if (!validMin || !validMax || sizeMin != sizeMax)
|
||||
return { };
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- plugins/builtin/source/content/views/view_hex_editor.cpp.orig 2022-09-03 22:05:27 UTC
|
||||
--- plugins/builtin/source/content/views/view_hex_editor.cpp.orig 2022-10-12 10:48:50 UTC
|
||||
+++ plugins/builtin/source/content/views/view_hex_editor.cpp
|
||||
@@ -288,7 +288,7 @@ namespace hex::plugin::builtin {
|
||||
@@ -290,7 +290,7 @@ namespace hex::plugin::builtin {
|
||||
reader.seek(this->m_searchPosition.value_or(0x00));
|
||||
|
||||
constexpr static auto searchFunction = [](const auto &haystackBegin, const auto &haystackEnd, const auto &needleBegin, const auto &needleEnd) {
|
||||
|
@ -0,0 +1,10 @@
|
||||
--- plugins/windows/include/views/view_tty_console.hpp.orig 2022-10-15 14:50:11 UTC
|
||||
+++ plugins/windows/include/views/view_tty_console.hpp
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex/ui/view.hpp>
|
||||
+#include <jthread.hpp>
|
||||
|
||||
#include <windows.h>
|
||||
|
@ -1,5 +1,5 @@
|
||||
bin/imhex
|
||||
lib/libimhex.so.1.23.1
|
||||
lib/libimhex.so.1.24.3
|
||||
share/applications/imhex.desktop
|
||||
%%DATADIR%%/constants/_schema.json
|
||||
%%DATADIR%%/constants/crc16.json
|
||||
@ -7,17 +7,24 @@ share/applications/imhex.desktop
|
||||
%%DATADIR%%/constants/http_status.json
|
||||
%%DATADIR%%/constants/linux_errors.json
|
||||
%%DATADIR%%/includes/hex/core.pat
|
||||
%%DATADIR%%/includes/hex/dec.pat
|
||||
%%DATADIR%%/includes/hex/http.pat
|
||||
%%DATADIR%%/includes/hex/impl/imhex_check.pat
|
||||
%%DATADIR%%/includes/hex/type/mangled.pat
|
||||
%%DATADIR%%/includes/std/array.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%%/includes/type/base.pat
|
||||
%%DATADIR%%/includes/type/color.pat
|
||||
%%DATADIR%%/patterns/bson.hexpat
|
||||
%%DATADIR%%/patterns/flac.hexpat
|
||||
%%DATADIR%%/patterns/id3.hexpat
|
||||
%%DATADIR%%/patterns/minidump.hexpat
|
||||
%%DATADIR%%/patterns/msgpack.hexpat
|
||||
%%DATADIR%%/patterns/usb.hexpat
|
||||
%%DATADIR%%/patterns/xilinx_bit.hexpat
|
||||
%%DATADIR%%/encodings/arabic_iso.tbl
|
||||
%%DATADIR%%/encodings/arabic_windows.tbl
|
||||
|
Loading…
Reference in New Issue
Block a user