From faf78e24948280b25ccad71e5fe027809f8c6279 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 23 Apr 2024 06:10:50 +0200 Subject: Adding upstream version 2.9.2. Signed-off-by: Daniel Baumann --- apt-private/private-output.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'apt-private/private-output.h') diff --git a/apt-private/private-output.h b/apt-private/private-output.h index 4cc7c01..0eba6f4 100644 --- a/apt-private/private-output.h +++ b/apt-private/private-output.h @@ -1,6 +1,7 @@ #ifndef APT_PRIVATE_OUTPUT_H #define APT_PRIVATE_OUTPUT_H +#include #include #include #include @@ -18,7 +19,6 @@ class CacheFile; class pkgDepCache; class pkgRecords; - APT_PUBLIC extern std::ostream c0out; APT_PUBLIC extern std::ostream c1out; APT_PUBLIC extern std::ostream c2out; @@ -43,7 +43,8 @@ template bool PredicateC Predicate, DisplayP PkgDisplay, DisplayV VerboseDisplay, - std::string colorName = "APT::Color::Neutral") + std::string colorName = "", + std::string Note = "") { size_t const ScreenWidth = (::ScreenWidth > 3) ? ::ScreenWidth - 3 : 0; int ScreenUsed = 0; @@ -52,8 +53,8 @@ template bool bool printedTitle = false; std::vector PackageList; - auto setColor = _config->FindI("APT::Output-Version") >= 30 ? _config->Find(colorName) : ""; - auto resetColor = _config->FindI("APT::Output-Version") >= 30 ? _config->Find("APT::Color::Neutral") : ""; + auto setColor = APT::Configuration::color(colorName); + auto resetColor = not setColor.empty() ? APT::Configuration::color("neutral") : ""; for (auto const &Pkg: cont) { @@ -105,6 +106,8 @@ template bool ShowWithColumns(out, PackageList, 2, ScreenWidth); out << resetColor; } + if (not Note.empty()) + out << Note << std::endl; if (_config->FindI("APT::Output-Version") >= 30) out << std::endl; return false; -- cgit v1.2.3