From f8b4d04713243c9e88e464c5c12f6c042359018a Mon Sep 17 00:00:00 2001 From: WerWolv Date: Mon, 19 Sep 2022 10:34:57 +0200 Subject: [PATCH] feat: Added numeric value search to find view --- .../include/content/views/view_find.hpp | 30 ++- .../source/content/views/view_find.cpp | 241 ++++++++++++++++-- plugins/builtin/source/lang/de_DE.cpp | 18 ++ plugins/builtin/source/lang/en_US.cpp | 17 ++ plugins/builtin/source/lang/it_IT.cpp | 18 ++ plugins/builtin/source/lang/ja_JP.cpp | 18 ++ plugins/builtin/source/lang/ko_KR.cpp | 17 ++ plugins/builtin/source/lang/pt_BR.cpp | 18 ++ plugins/builtin/source/lang/zh_CN.cpp | 18 ++ plugins/builtin/source/lang/zh_TW.cpp | 18 ++ 10 files changed, 385 insertions(+), 28 deletions(-) diff --git a/plugins/builtin/include/content/views/view_find.hpp b/plugins/builtin/include/content/views/view_find.hpp index 25fad52de..61731d9ba 100644 --- a/plugins/builtin/include/content/views/view_find.hpp +++ b/plugins/builtin/include/content/views/view_find.hpp @@ -24,7 +24,8 @@ namespace hex::plugin::builtin { struct Occurrence { Region region; - enum class DecodeType { ASCII, Binary, UTF16LE, UTF16BE } decodeType; + enum class DecodeType { ASCII, Binary, UTF16, Unsigned, Signed, Float, Double } decodeType; + std::endian endian = std::endian::native; }; struct BinaryPattern { @@ -38,7 +39,8 @@ namespace hex::plugin::builtin { Strings, Sequence, Regex, - BinaryPattern + BinaryPattern, + Value } mode = Mode::Strings; struct Strings { @@ -55,7 +57,7 @@ namespace hex::plugin::builtin { bool m_lineFeeds = false; } strings; - struct Bytes { + struct Sequence { std::string sequence; } bytes; @@ -68,6 +70,18 @@ namespace hex::plugin::builtin { std::string input; std::vector pattern; } binaryPattern; + + struct Value { + std::string inputMin, inputMax; + std::endian endian = std::endian::native; + + enum class Type { + U8 = 0, U16 = 1, U32 = 2, U64 = 3, + I8 = 4, I16 = 5, I32 = 6, I64 = 7, + F32 = 8, F64 = 9 + } type = Type::U8; + } value; + } m_searchSettings, m_decodeSettings; using OccurrenceTree = interval_tree::IntervalTree; @@ -80,12 +94,14 @@ namespace hex::plugin::builtin { bool m_settingsValid = false; private: - static std::vector searchStrings(Task &task, prv::Provider *provider, Region searchRegion, SearchSettings::Strings settings); - static std::vector searchSequence(Task &task, prv::Provider *provider, Region searchRegion, SearchSettings::Bytes settings); - static std::vector searchRegex(Task &task, prv::Provider *provider, Region searchRegion, SearchSettings::Regex settings); - static std::vector searchBinaryPattern(Task &task, prv::Provider *provider, Region searchRegion, SearchSettings::BinaryPattern settings); + static std::vector searchStrings(Task &task, prv::Provider *provider, Region searchRegion, const SearchSettings::Strings &settings); + static std::vector searchSequence(Task &task, prv::Provider *provider, Region searchRegion, const SearchSettings::Sequence &settings); + static std::vector searchRegex(Task &task, prv::Provider *provider, Region searchRegion, const SearchSettings::Regex &settings); + static std::vector searchBinaryPattern(Task &task, prv::Provider *provider, Region searchRegion, const SearchSettings::BinaryPattern &settings); + static std::vector searchValue(Task &task, prv::Provider *provider, Region searchRegion, const SearchSettings::Value &settings); static std::vector parseBinaryPatternString(std::string string); + static std::tuple, size_t> parseNumericValueInput(const std::string &input, SearchSettings::Value::Type type); void runSearch(); std::string decodeValue(prv::Provider *provider, Occurrence occurrence) const; diff --git a/plugins/builtin/source/content/views/view_find.cpp b/plugins/builtin/source/content/views/view_find.cpp index 65dd81fc4..4096da094 100644 --- a/plugins/builtin/source/content/views/view_find.cpp +++ b/plugins/builtin/source/content/views/view_find.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include @@ -18,6 +19,9 @@ namespace hex::plugin::builtin { ImHexApi::HexEditor::addBackgroundHighlightingProvider([this](u64 address, const u8* data, size_t size) -> std::optional { hex::unused(data, size); + if (this->m_searchTask.isRunning()) + return { }; + auto provider = ImHexApi::Provider::get(); if (!this->m_occurrenceTree[provider].findOverlapping(address, address).empty()) @@ -29,6 +33,9 @@ namespace hex::plugin::builtin { ImHexApi::HexEditor::addTooltipProvider([this](u64 address, const u8* data, size_t size) { hex::unused(data, size); + if (this->m_searchTask.isRunning()) + return; + auto provider = ImHexApi::Provider::get(); auto occurrences = this->m_occurrenceTree[provider].findOverlapping(address, address); @@ -48,7 +55,7 @@ namespace hex::plugin::builtin { ImGui::ColorButton("##color", ImColor(HighlightColor())); ImGui::SameLine(0, 10); - ImGui::TextFormatted("{}", value); + ImGui::TextFormatted("{} ", value); if (ImGui::GetIO().KeyShift) { ImGui::Indent(); @@ -145,8 +152,54 @@ namespace hex::plugin::builtin { return result; } + template + static std::tuple, size_t> parseNumericValue(const std::string &string) { + static_assert(sizeof(StorageType) >= sizeof(Type)); - std::vector ViewFind::searchStrings(Task &task, prv::Provider *provider, hex::Region searchRegion, SearchSettings::Strings settings) { + 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()) + return { false, { }, 0 }; + + if (value < std::numeric_limits::min() || value > std::numeric_limits::max()) + return { false, { }, 0 }; + + return { true, value, sizeof(Type) }; + } + + std::tuple, size_t> ViewFind::parseNumericValueInput(const std::string &input, SearchSettings::Value::Type type) { + switch (type) { + using enum SearchSettings::Value::Type; + + case U8: return parseNumericValue(input); + case U16: return parseNumericValue(input); + case U32: return parseNumericValue(input); + case U64: return parseNumericValue(input); + case I8: return parseNumericValue(input); + case I16: return parseNumericValue(input); + case I32: return parseNumericValue(input); + case I64: return parseNumericValue(input); + case F32: return parseNumericValue(input); + case F64: return parseNumericValue(input); + default: return { false, { }, 0 }; + } + }; + + template + static std::string formatBytes(const std::vector &bytes) { + if (bytes.size() > sizeof(T)) + return { }; + + T value = 0x00; + std::memcpy(&value, bytes.data(), bytes.size()); + + if (std::signed_integral) + hex::signExtend(bytes.size() * 8, value); + + return hex::format("{}", value); + } + + std::vector ViewFind::searchStrings(Task &task, prv::Provider *provider, hex::Region searchRegion, const SearchSettings::Strings &settings) { using enum SearchSettings::Strings::Type; std::vector results; @@ -175,15 +228,15 @@ namespace hex::plugin::builtin { reader.seek(searchRegion.getStartAddress()); reader.setEndAddress(searchRegion.getEndAddress()); - const Occurrence::DecodeType decodeType = [&]{ + const auto [decodeType, endian] = [&] -> std::pair { if (settings.type == ASCII) - return Occurrence::DecodeType::ASCII; + return { Occurrence::DecodeType::ASCII, std::endian::native }; else if (settings.type == SearchSettings::Strings::Type::UTF16BE) - return Occurrence::DecodeType::UTF16BE; + return { Occurrence::DecodeType::UTF16, std::endian::big }; else if (settings.type == SearchSettings::Strings::Type::UTF16LE) - return Occurrence::DecodeType::UTF16LE; + return { Occurrence::DecodeType::UTF16, std::endian::little }; else - return Occurrence::DecodeType::Binary; + return { Occurrence::DecodeType::Binary, std::endian::native }; }(); size_t countedCharacters = 0; @@ -213,7 +266,7 @@ namespace hex::plugin::builtin { else { if (countedCharacters >= size_t(settings.minLength)) { if (!(settings.nullTermination && byte != 0x00)) { - results.push_back(Occurrence { Region { startAddress, countedCharacters }, decodeType }); + results.push_back(Occurrence { Region { startAddress, countedCharacters }, decodeType, endian }); } } @@ -226,33 +279,34 @@ namespace hex::plugin::builtin { return results; } - std::vector ViewFind::searchSequence(Task &task, prv::Provider *provider, hex::Region searchRegion, SearchSettings::Bytes settings) { + std::vector ViewFind::searchSequence(Task &task, prv::Provider *provider, hex::Region searchRegion, const SearchSettings::Sequence &settings) { std::vector results; auto reader = prv::BufferedReader(provider); reader.seek(searchRegion.getStartAddress()); reader.setEndAddress(searchRegion.getEndAddress()); - auto sequence = hex::decodeByteString(settings.sequence); - if (sequence.empty()) + auto bytes = hex::decodeByteString(settings.sequence); + + if (bytes.empty()) return { }; 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(), std::boyer_moore_horspool_searcher(bytes.begin(), bytes.end())); if (occurrence == reader.end()) break; auto address = occurrence.getAddress(); reader.seek(address + 1); - results.push_back(Occurrence{ Region { address, sequence.size() }, Occurrence::DecodeType::Binary }); + results.push_back(Occurrence{ Region { address, bytes.size() }, Occurrence::DecodeType::Binary, std::endian::native }); task.update(address - searchRegion.getStartAddress()); } return results; } - std::vector ViewFind::searchRegex(Task &task, prv::Provider *provider, hex::Region searchRegion, SearchSettings::Regex settings) { + std::vector ViewFind::searchRegex(Task &task, prv::Provider *provider, hex::Region searchRegion, const SearchSettings::Regex &settings) { auto stringOccurrences = searchStrings(task, provider, searchRegion, SearchSettings::Strings { .minLength = 1, .type = SearchSettings::Strings::Type::ASCII, @@ -283,7 +337,7 @@ namespace hex::plugin::builtin { return result; } - std::vector ViewFind::searchBinaryPattern(Task &task, prv::Provider *provider, hex::Region searchRegion, SearchSettings::BinaryPattern settings) { + std::vector ViewFind::searchBinaryPattern(Task &task, prv::Provider *provider, hex::Region searchRegion, const SearchSettings::BinaryPattern &settings) { std::vector results; auto reader = prv::BufferedReader(provider); @@ -301,7 +355,7 @@ namespace hex::plugin::builtin { if (matchedBytes == settings.pattern.size()) { auto occurrenceAddress = it.getAddress() - (patternSize - 1); - results.push_back(Occurrence { Region { occurrenceAddress, patternSize }, Occurrence::DecodeType::Binary }); + results.push_back(Occurrence { Region { occurrenceAddress, patternSize }, Occurrence::DecodeType::Binary, std::endian::native }); task.update(occurrenceAddress); it.setAddress(occurrenceAddress); matchedBytes = 0; @@ -316,6 +370,73 @@ namespace hex::plugin::builtin { return results; } + std::vector ViewFind::searchValue(Task &task, prv::Provider *provider, Region searchRegion, const SearchSettings::Value &settings) { + std::vector results; + + auto reader = prv::BufferedReader(provider); + 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); + + if (!validMin || !validMax || sizeMin != sizeMax) + return { }; + + const auto size = sizeMin; + + u64 bytes = 0x00; + u64 address = searchRegion.getStartAddress(); + size_t validBytes = 0; + for (u8 byte : reader) { + bytes <<= 8; + bytes |= byte; + + if (validBytes == size) { + bytes &= hex::bitmask(size * 8); + + auto result = std::visit([&](auto tag) { + using T = std::remove_cvref_t>; + + auto minValue = std::get(min); + auto maxValue = std::get(max); + + T value = 0; + std::memcpy(&value, &bytes, size); + value = hex::changeEndianess(value, size, std::endian::big); + value = hex::changeEndianess(value, size, settings.endian); + + return value >= minValue && value <= maxValue; + }, min); + + if (result) { + Occurrence::DecodeType decodeType = [&]{ + switch (settings.type) { + using enum SearchSettings::Value::Type; + using enum Occurrence::DecodeType; + + case U8 ... U64: return Unsigned; + case I8 ... I64: return Signed; + case F32: return Float; + case F64: return Double; + default: return Binary; + } + }(); + + + results.push_back(Occurrence { Region { address - (size - 1), size }, decodeType, settings.endian }); + } + } else { + validBytes++; + } + + address++; + task.update(address); + } + + return results; + } + void ViewFind::runSearch() { Region searchRegion = [this]{ if (this->m_searchSettings.range == ui::SelectedRegion::EntireData || !ImHexApi::HexEditor::isSelectionValid()) { @@ -343,6 +464,9 @@ namespace hex::plugin::builtin { case BinaryPattern: this->m_foundOccurrences[provider] = searchBinaryPattern(task, provider, searchRegion, settings.binaryPattern); break; + case Value: + this->m_foundOccurrences[provider] = searchValue(task, provider, searchRegion, settings.value); + break; } this->m_sortedOccurrences[provider] = this->m_foundOccurrences[provider]; @@ -358,10 +482,14 @@ namespace hex::plugin::builtin { std::vector bytes(std::min(occurrence.region.getSize(), 128)); provider->read(occurrence.region.getStartAddress(), bytes.data(), bytes.size()); + if (occurrence.endian != std::endian::native) + std::reverse(bytes.begin(), bytes.end()); + std::string result; switch (this->m_decodeSettings.mode) { using enum SearchSettings::Mode; + case Value: case Strings: { switch (occurrence.decodeType) { @@ -370,15 +498,22 @@ namespace hex::plugin::builtin { case ASCII: result = hex::encodeByteString(bytes); break; - case UTF16LE: + case UTF16: for (size_t i = 0; i < bytes.size(); i += 2) result += hex::encodeByteString({ bytes[i] }); break; - case UTF16BE: - for (size_t i = 1; i < bytes.size(); i += 2) - result += hex::encodeByteString({ bytes[i] }); + case Unsigned: + result += formatBytes(bytes); + break; + case Signed: + result += formatBytes(bytes); + break; + case Float: + result += formatBytes(bytes); + break; + case Double: + result += formatBytes(bytes); break; - } } break; @@ -506,6 +641,70 @@ namespace hex::plugin::builtin { ImGui::EndTabItem(); } + if (ImGui::BeginTabItem("hex.builtin.view.find.value"_lang)) { + auto &settings = this->m_searchSettings.value; + + mode = SearchSettings::Mode::Value; + + bool edited = false; + + if (ImGui::InputText("hex.builtin.view.find.value.min"_lang, settings.inputMin)) edited = true; + if (ImGui::InputText("hex.builtin.view.find.value.max"_lang, settings.inputMax)) edited = true; + + const std::array InputTypes = { + "hex.builtin.common.type.u8"_lang, + "hex.builtin.common.type.u16"_lang, + "hex.builtin.common.type.u32"_lang, + "hex.builtin.common.type.u64"_lang, + "hex.builtin.common.type.i8"_lang, + "hex.builtin.common.type.i16"_lang, + "hex.builtin.common.type.i32"_lang, + "hex.builtin.common.type.i64"_lang, + "hex.builtin.common.type.f32"_lang, + "hex.builtin.common.type.f64"_lang + }; + + if (ImGui::BeginCombo("hex.builtin.common.type"_lang, InputTypes[std::to_underlying(settings.type)].c_str())) { + for (size_t i = 0; i < InputTypes.size(); i++) { + auto type = static_cast(i); + + if (ImGui::Selectable(InputTypes[i].c_str(), type == settings.type)) { + settings.type = type; + edited = true; + } + } + ImGui::EndCombo(); + } + + { + int selection = [&] { + switch (settings.endian) { + default: + case std::endian::little: return 0; + case std::endian::big: return 1; + } + }(); + + std::array options = { "hex.builtin.common.little"_lang, "hex.builtin.common.big"_lang }; + if (ImGui::SliderInt("hex.builtin.common.endian"_lang, &selection, 0, options.size() - 1, options[selection], ImGuiSliderFlags_NoInput)) { + edited = true; + switch (selection) { + default: + case 0: settings.endian = std::endian::little; break; + case 1: settings.endian = std::endian::big; break; + } + } + } + + if (edited) { + auto [minValid, min, minSize] = parseNumericValueInput(settings.inputMin, settings.type); + auto [maxValid, max, maxSize] = parseNumericValueInput(settings.inputMin, settings.type); + + this->m_settingsValid = minValid && maxValid && minSize == maxSize; + } + + ImGui::EndTabItem(); + } ImGui::EndTabBar(); } diff --git a/plugins/builtin/source/lang/de_DE.cpp b/plugins/builtin/source/lang/de_DE.cpp index 18af53cf9..2127dba5c 100644 --- a/plugins/builtin/source/lang/de_DE.cpp +++ b/plugins/builtin/source/lang/de_DE.cpp @@ -83,6 +83,21 @@ namespace hex::plugin::builtin { { "hex.builtin.common.processing", "Verarbeiten" }, { "hex.builtin.common.filter", "Filter" }, { "hex.builtin.common.value", "Wert" }, + { "hex.builtin.common.type", "Typ" }, + { "hex.builtin.common.type.u8", "uint8_t" }, + { "hex.builtin.common.type.i8", "int8_t" }, + { "hex.builtin.common.type.u16", "uint16_t" }, + { "hex.builtin.common.type.i16", "int16_t" }, + { "hex.builtin.common.type.u24", "uint24_t" }, + { "hex.builtin.common.type.i24", "int24_t" }, + { "hex.builtin.common.type.u32", "uint32_t" }, + { "hex.builtin.common.type.i32", "int32_t" }, + { "hex.builtin.common.type.u48", "uint48_t" }, + { "hex.builtin.common.type.i48", "int48_t" }, + { "hex.builtin.common.type.u64", "uint64_t" }, + { "hex.builtin.common.type.i64", "int64_t" }, + { "hex.builtin.common.type.f32", "float" }, + { "hex.builtin.common.type.f64", "double" }, { "hex.builtin.common.offset", "Offset" }, { "hex.builtin.common.range", "Bereich" }, { "hex.builtin.common.range.entire_data", "Gesammte Daten" }, @@ -422,6 +437,9 @@ namespace hex::plugin::builtin { { "hex.builtin.view.find.regex", "Regex" }, { "hex.builtin.view.find.regex.pattern", "Pattern" }, { "hex.builtin.view.find.regex.full_match", "Benötige volle übereinstimmung" }, + { "hex.builtin.view.find.value", "Numerischer Wert" }, + { "hex.builtin.view.find.value.min", "Minimalwert" }, + { "hex.builtin.view.find.value.max", "Maximalwert" }, { "hex.builtin.view.find.binary_pattern", "Binärpattern" }, { "hex.builtin.view.find.search", "Suchen" }, { "hex.builtin.view.find.context.copy", "Wert Kopieren" }, diff --git a/plugins/builtin/source/lang/en_US.cpp b/plugins/builtin/source/lang/en_US.cpp index 484a8ca97..01266add6 100644 --- a/plugins/builtin/source/lang/en_US.cpp +++ b/plugins/builtin/source/lang/en_US.cpp @@ -85,6 +85,20 @@ namespace hex::plugin::builtin { { "hex.builtin.common.filter", "Filter" }, { "hex.builtin.common.value", "Value" }, { "hex.builtin.common.type", "Type" }, + { "hex.builtin.common.type.u8", "uint8_t" }, + { "hex.builtin.common.type.i8", "int8_t" }, + { "hex.builtin.common.type.u16", "uint16_t" }, + { "hex.builtin.common.type.i16", "int16_t" }, + { "hex.builtin.common.type.u24", "uint24_t" }, + { "hex.builtin.common.type.i24", "int24_t" }, + { "hex.builtin.common.type.u32", "uint32_t" }, + { "hex.builtin.common.type.i32", "int32_t" }, + { "hex.builtin.common.type.u48", "uint48_t" }, + { "hex.builtin.common.type.i48", "int48_t" }, + { "hex.builtin.common.type.u64", "uint64_t" }, + { "hex.builtin.common.type.i64", "int64_t" }, + { "hex.builtin.common.type.f32", "float" }, + { "hex.builtin.common.type.f64", "double" }, { "hex.builtin.common.offset", "Offset" }, { "hex.builtin.common.range", "Range" }, { "hex.builtin.common.range.entire_data", "Entire Data" }, @@ -428,6 +442,9 @@ namespace hex::plugin::builtin { { "hex.builtin.view.find.regex", "Regex" }, { "hex.builtin.view.find.regex.pattern", "Pattern" }, { "hex.builtin.view.find.regex.full_match", "Require full match" }, + { "hex.builtin.view.find.value", "Numeric Value" }, + { "hex.builtin.view.find.value.min", "Minimum Value" }, + { "hex.builtin.view.find.value.max", "Maximum Value" }, { "hex.builtin.view.find.binary_pattern", "Binary Pattern" }, { "hex.builtin.view.find.search", "Search" }, { "hex.builtin.view.find.context.copy", "Copy Value" }, diff --git a/plugins/builtin/source/lang/it_IT.cpp b/plugins/builtin/source/lang/it_IT.cpp index c8ed21ba0..7911582b7 100644 --- a/plugins/builtin/source/lang/it_IT.cpp +++ b/plugins/builtin/source/lang/it_IT.cpp @@ -83,6 +83,21 @@ namespace hex::plugin::builtin { //{ "hex.builtin.common.processing", "Processing" }, //{ "hex.builtin.common.filter", "Filter" }, //{ "hex.builtin.common.value", "Value" }, + //{ "hex.builtin.common.type", "Type" }, + { "hex.builtin.common.type.u8", "uint8_t" }, + { "hex.builtin.common.type.i8", "int8_t" }, + { "hex.builtin.common.type.u16", "uint16_t" }, + { "hex.builtin.common.type.i16", "int16_t" }, + { "hex.builtin.common.type.u24", "uint24_t" }, + { "hex.builtin.common.type.i24", "int24_t" }, + { "hex.builtin.common.type.u32", "uint32_t" }, + { "hex.builtin.common.type.i32", "int32_t" }, + { "hex.builtin.common.type.u48", "uint48_t" }, + { "hex.builtin.common.type.i48", "int48_t" }, + { "hex.builtin.common.type.u64", "uint64_t" }, + { "hex.builtin.common.type.i64", "int64_t" }, + { "hex.builtin.common.type.f32", "float" }, + { "hex.builtin.common.type.f64", "double" }, { "hex.builtin.common.offset", "Offset" }, //{ "hex.builtin.common.range", "Range" }, //{ "hex.builtin.common.range.entire_data", "Entire Data" }, @@ -428,6 +443,9 @@ namespace hex::plugin::builtin { //{ "hex.builtin.view.find.regex.pattern", "Pattern" }, //{ "hex.builtin.view.find.regex.full_match", "Require full match" }, // { "hex.builtin.view.find.binary_pattern", "Binary Pattern" }, + // { "hex.builtin.view.find.value", "Numeric Value" }, + // { "hex.builtin.view.find.value.min", "Minimum Value" }, + // { "hex.builtin.view.find.value.max", "Maximum Value" }, // { "hex.builtin.view.find.search", "Search" }, // { "hex.builtin.view.find.context.copy", "Copy Value" }, // { "hex.builtin.view.find.context.copy_demangle", "Copy Demangled Value" }, diff --git a/plugins/builtin/source/lang/ja_JP.cpp b/plugins/builtin/source/lang/ja_JP.cpp index da0f67962..1cf700a98 100644 --- a/plugins/builtin/source/lang/ja_JP.cpp +++ b/plugins/builtin/source/lang/ja_JP.cpp @@ -83,6 +83,21 @@ namespace hex::plugin::builtin { // { "hex.builtin.common.processing", "Processing" }, { "hex.builtin.common.filter", "フィルタ" }, { "hex.builtin.common.value", "値" }, + //{ "hex.builtin.common.type", "Type" }, + { "hex.builtin.common.type.u8", "uint8_t" }, + { "hex.builtin.common.type.i8", "int8_t" }, + { "hex.builtin.common.type.u16", "uint16_t" }, + { "hex.builtin.common.type.i16", "int16_t" }, + { "hex.builtin.common.type.u24", "uint24_t" }, + { "hex.builtin.common.type.i24", "int24_t" }, + { "hex.builtin.common.type.u32", "uint32_t" }, + { "hex.builtin.common.type.i32", "int32_t" }, + { "hex.builtin.common.type.u48", "uint48_t" }, + { "hex.builtin.common.type.i48", "int48_t" }, + { "hex.builtin.common.type.u64", "uint64_t" }, + { "hex.builtin.common.type.i64", "int64_t" }, + { "hex.builtin.common.type.f32", "float" }, + { "hex.builtin.common.type.f64", "double" }, { "hex.builtin.common.offset", "オフセット" }, { "hex.builtin.common.range", "範囲" }, { "hex.builtin.common.range.entire_data", "データ全体" }, @@ -431,6 +446,9 @@ namespace hex::plugin::builtin { // { "hex.builtin.view.find.regex.pattern", "Pattern" }, // { "hex.builtin.view.find.regex.full_match", "Require full match" }, { "hex.builtin.view.find.binary_pattern", "16進数" }, + //{ "hex.builtin.view.find.value", "Numeric Value" }, + //{ "hex.builtin.view.find.value.min", "Minimum Value" }, + //{ "hex.builtin.view.find.value.max", "Maximum Value" }, { "hex.builtin.view.find.search", "検索を実行" }, { "hex.builtin.view.find.context.copy", "値をコピー" }, // { "hex.builtin.view.find.context.copy_demangle", "Copy Demangled Value" }, diff --git a/plugins/builtin/source/lang/ko_KR.cpp b/plugins/builtin/source/lang/ko_KR.cpp index afa62f140..3a10165b9 100644 --- a/plugins/builtin/source/lang/ko_KR.cpp +++ b/plugins/builtin/source/lang/ko_KR.cpp @@ -84,6 +84,20 @@ namespace hex::plugin::builtin { { "hex.builtin.common.filter", "필터" }, { "hex.builtin.common.value", "값" }, { "hex.builtin.common.type", "타입" }, + { "hex.builtin.common.type.u8", "uint8_t" }, + { "hex.builtin.common.type.i8", "int8_t" }, + { "hex.builtin.common.type.u16", "uint16_t" }, + { "hex.builtin.common.type.i16", "int16_t" }, + { "hex.builtin.common.type.u24", "uint24_t" }, + { "hex.builtin.common.type.i24", "int24_t" }, + { "hex.builtin.common.type.u32", "uint32_t" }, + { "hex.builtin.common.type.i32", "int32_t" }, + { "hex.builtin.common.type.u48", "uint48_t" }, + { "hex.builtin.common.type.i48", "int48_t" }, + { "hex.builtin.common.type.u64", "uint64_t" }, + { "hex.builtin.common.type.i64", "int64_t" }, + { "hex.builtin.common.type.f32", "float" }, + { "hex.builtin.common.type.f64", "double" }, { "hex.builtin.common.offset", "오프셋" }, { "hex.builtin.common.range", "범위" }, { "hex.builtin.common.range.entire_data", "전체 데이터" }, @@ -428,6 +442,9 @@ namespace hex::plugin::builtin { // { "hex.builtin.view.find.regex.pattern", "Pattern" }, // { "hex.builtin.view.find.regex.full_match", "Require full match" }, { "hex.builtin.view.find.binary_pattern", "바이너리 패턴" }, + //{ "hex.builtin.view.find.value", "Numeric Value" }, + // { "hex.builtin.view.find.value.min", "Minimum Value" }, + // { "hex.builtin.view.find.value.max", "Maximum Value" }, { "hex.builtin.view.find.search", "검색" }, { "hex.builtin.view.find.context.copy", "값 복사" }, { "hex.builtin.view.find.context.copy_demangle", "Copy Demangled Value" }, diff --git a/plugins/builtin/source/lang/pt_BR.cpp b/plugins/builtin/source/lang/pt_BR.cpp index 9a49fc75a..553a727f2 100644 --- a/plugins/builtin/source/lang/pt_BR.cpp +++ b/plugins/builtin/source/lang/pt_BR.cpp @@ -83,6 +83,21 @@ namespace hex::plugin::builtin { { "hex.builtin.common.processing", "Processando" }, //{ "hex.builtin.common.filter", "Filter" }, //{ "hex.builtin.common.value", "Value" }, + //{ "hex.builtin.common.type", "Type" }, + { "hex.builtin.common.type.u8", "uint8_t" }, + { "hex.builtin.common.type.i8", "int8_t" }, + { "hex.builtin.common.type.u16", "uint16_t" }, + { "hex.builtin.common.type.i16", "int16_t" }, + { "hex.builtin.common.type.u24", "uint24_t" }, + { "hex.builtin.common.type.i24", "int24_t" }, + { "hex.builtin.common.type.u32", "uint32_t" }, + { "hex.builtin.common.type.i32", "int32_t" }, + { "hex.builtin.common.type.u48", "uint48_t" }, + { "hex.builtin.common.type.i48", "int48_t" }, + { "hex.builtin.common.type.u64", "uint64_t" }, + { "hex.builtin.common.type.i64", "int64_t" }, + { "hex.builtin.common.type.f32", "float" }, + { "hex.builtin.common.type.f64", "double" }, { "hex.builtin.common.offset", "Offset" }, //{ "hex.builtin.common.range", "Range" }, //{ "hex.builtin.common.range.entire_data", "Entire Data" }, @@ -426,6 +441,9 @@ namespace hex::plugin::builtin { // { "hex.builtin.view.find.regex.pattern", "Pattern" }, // { "hex.builtin.view.find.regex.full_match", "Require full match" }, // { "hex.builtin.view.find.binary_pattern", "Binary Pattern" }, + // { "hex.builtin.view.find.value", "Numeric Value" }, + // { "hex.builtin.view.find.value.min", "Minimum Value" }, + // { "hex.builtin.view.find.value.max", "Maximum Value" }, // { "hex.builtin.view.find.search", "Search" }, // { "hex.builtin.view.find.context.copy", "Copy Value" }, // { "hex.builtin.view.find.context.copy_demangle", "Copy Demangled Value" }, diff --git a/plugins/builtin/source/lang/zh_CN.cpp b/plugins/builtin/source/lang/zh_CN.cpp index 6453ea378..e53d1c2d0 100644 --- a/plugins/builtin/source/lang/zh_CN.cpp +++ b/plugins/builtin/source/lang/zh_CN.cpp @@ -83,6 +83,21 @@ namespace hex::plugin::builtin { { "hex.builtin.common.processing", "处理" }, { "hex.builtin.common.filter", "过滤器" }, { "hex.builtin.common.value", "值" }, + //{ "hex.builtin.common.type", "Type" }, + { "hex.builtin.common.type.u8", "uint8_t" }, + { "hex.builtin.common.type.i8", "int8_t" }, + { "hex.builtin.common.type.u16", "uint16_t" }, + { "hex.builtin.common.type.i16", "int16_t" }, + { "hex.builtin.common.type.u24", "uint24_t" }, + { "hex.builtin.common.type.i24", "int24_t" }, + { "hex.builtin.common.type.u32", "uint32_t" }, + { "hex.builtin.common.type.i32", "int32_t" }, + { "hex.builtin.common.type.u48", "uint48_t" }, + { "hex.builtin.common.type.i48", "int48_t" }, + { "hex.builtin.common.type.u64", "uint64_t" }, + { "hex.builtin.common.type.i64", "int64_t" }, + { "hex.builtin.common.type.f32", "float" }, + { "hex.builtin.common.type.f64", "double" }, { "hex.builtin.common.offset", "偏移" }, { "hex.builtin.common.range", "范围" }, { "hex.builtin.common.range.entire_data", "所有数据" }, @@ -429,6 +444,9 @@ namespace hex::plugin::builtin { // { "hex.builtin.view.find.regex.pattern", "Pattern" }, // { "hex.builtin.view.find.regex.full_match", "Require full match" }, { "hex.builtin.view.find.binary_pattern", "二进制模式" }, + //{ "hex.builtin.view.find.value", "Numeric Value" }, + // { "hex.builtin.view.find.value.min", "Minimum Value" }, + // { "hex.builtin.view.find.value.max", "Maximum Value" }, { "hex.builtin.view.find.search", "搜索" }, { "hex.builtin.view.find.context.copy", "复制值" }, { "hex.builtin.view.find.context.copy_demangle", "复制值的还原名" }, diff --git a/plugins/builtin/source/lang/zh_TW.cpp b/plugins/builtin/source/lang/zh_TW.cpp index 66b1d9967..06a722bcf 100644 --- a/plugins/builtin/source/lang/zh_TW.cpp +++ b/plugins/builtin/source/lang/zh_TW.cpp @@ -83,6 +83,21 @@ namespace hex::plugin::builtin { { "hex.builtin.common.processing", "正在處理" }, //{ "hex.builtin.common.filter", "Filter" }, //{ "hex.builtin.common.value", "Value" }, + //{ "hex.builtin.common.type", "Type" }, + { "hex.builtin.common.type.u8", "uint8_t" }, + { "hex.builtin.common.type.i8", "int8_t" }, + { "hex.builtin.common.type.u16", "uint16_t" }, + { "hex.builtin.common.type.i16", "int16_t" }, + { "hex.builtin.common.type.u24", "uint24_t" }, + { "hex.builtin.common.type.i24", "int24_t" }, + { "hex.builtin.common.type.u32", "uint32_t" }, + { "hex.builtin.common.type.i32", "int32_t" }, + { "hex.builtin.common.type.u48", "uint48_t" }, + { "hex.builtin.common.type.i48", "int48_t" }, + { "hex.builtin.common.type.u64", "uint64_t" }, + { "hex.builtin.common.type.i64", "int64_t" }, + { "hex.builtin.common.type.f32", "float" }, + { "hex.builtin.common.type.f64", "double" }, { "hex.builtin.common.offset", "位移" }, //{ "hex.builtin.common.range", "Range" }, //{ "hex.builtin.common.range.entire_data", "Entire Data" }, @@ -427,6 +442,9 @@ namespace hex::plugin::builtin { // { "hex.builtin.view.find.regex.pattern", "Pattern" }, // { "hex.builtin.view.find.regex.full_match", "Require full match" }, // { "hex.builtin.view.find.binary_pattern", "Binary Pattern" }, + // { "hex.builtin.view.find.value", "Numeric Value" }, + // { "hex.builtin.view.find.value.min", "Minimum Value" }, + // { "hex.builtin.view.find.value.max", "Maximum Value" }, // { "hex.builtin.view.find.search", "Search" }, // { "hex.builtin.view.find.context.copy", "Copy Value" }, // { "hex.builtin.view.find.context.copy_demangle", "Copy Demangled Value" },