summaryrefslogtreecommitdiffstats
path: root/apt-private/private-output.h
diff options
context:
space:
mode:
Diffstat (limited to 'apt-private/private-output.h')
-rw-r--r--apt-private/private-output.h11
1 files changed, 7 insertions, 4 deletions
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 <apt-pkg/aptconfiguration.h>
#include <apt-pkg/cacheset.h>
#include <apt-pkg/configuration.h>
#include <apt-pkg/macros.h>
@@ -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<class Container, class PredicateC, class DisplayP, class DisplayV> 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<class Container, class PredicateC, class DisplayP, class DisplayV> bool
bool printedTitle = false;
std::vector<std::string> 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<class Container, class PredicateC, class DisplayP, class DisplayV> 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;