Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into release/10.1.x
- Loading branch information
Showing
71 changed files
with
1,215 additions
and
782 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// | ||
// SPDX-License-Identifier: LGPL-2.1-or-later | ||
// | ||
// Copyright © 2020 ANSSI. All Rights Reserved. | ||
// | ||
// Author(s): fabienfl (ANSSI) | ||
// | ||
|
||
#pragma once | ||
|
||
#include "WolfLauncher.h" | ||
|
||
#include <system_error> | ||
|
||
#include "Output/Text/Format.h" | ||
#include "Utils/Iconv.h" | ||
|
||
template<> | ||
struct fmt::formatter<Orc::Command::Wolf::Main::WolfPriority> : public fmt::formatter<std::string_view> | ||
{ | ||
template <typename FormatContext> | ||
auto format(const Orc::Command::Wolf::Main::WolfPriority& priority, FormatContext& ctx) -> decltype(ctx.out()) | ||
{ | ||
std::error_code ec; | ||
const auto utf8 = Orc::Utf16ToUtf8(Orc::Command::Wolf::WolfLauncher::ToString(priority), ec); | ||
if (ec) | ||
{ | ||
return formatter<std::string_view>::format(Orc::kFailedConversion, ctx); | ||
} | ||
|
||
return formatter<std::string_view>::format(utf8, ctx); | ||
} | ||
}; | ||
|
||
template<> | ||
struct fmt::formatter<Orc::Command::Wolf::Main::WolfPriority, wchar_t> | ||
: public fmt::formatter<std::wstring_view, wchar_t> | ||
{ | ||
template <typename FormatContext> | ||
auto format(Orc::Command::Wolf::Main::WolfPriority priority, FormatContext& ctx) -> decltype(ctx.out()) | ||
{ | ||
return formatter<std::wstring_view, wchar_t>::format(Orc::Command::Wolf::Main::ToString(priority), ctx); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// SPDX-License-Identifier: LGPL-2.1-or-later | ||
// | ||
// Copyright © 2020 ANSSI. All Rights Reserved. | ||
// | ||
// Author(s): fabienfl (ANSSI) | ||
// | ||
|
||
#pragma once | ||
|
||
#include "Output/Text/Print.h" | ||
|
||
#include <boost/algorithm/string/join.hpp> | ||
|
||
#include "WolfExecution.h" | ||
|
||
namespace Orc { | ||
namespace Text { | ||
|
||
template <> | ||
struct Printer<Orc::Command::Wolf::WolfExecution::Recipient> | ||
{ | ||
template <typename T> | ||
static void Output(Orc::Text::Tree<T>& node, const Orc::Command::Wolf::WolfExecution::Recipient& recipient) | ||
{ | ||
std::vector<std::wstring> ArchiveSpec; | ||
auto archiveSpecs = boost::join(recipient.ArchiveSpec, L","); | ||
if (archiveSpecs.empty()) | ||
{ | ||
Print(node, recipient.Name); | ||
} | ||
else | ||
{ | ||
Print(node, fmt::format(L"{} [{}]", recipient.Name, archiveSpecs)); | ||
} | ||
} | ||
}; | ||
|
||
} // namespace Text | ||
} // namespace Orc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.