diff options
author | David Kalnischkies <david@kalnischkies.de> | 2014-03-05 22:11:25 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2014-03-13 13:58:45 +0100 |
commit | 453b82a388013e522b3a1b9fcd6ed0810dab1f4f (patch) | |
tree | baa519d4f494816eb31b4cd4d06351c2ba23a1b7 /apt-pkg/install-progress.cc | |
parent | 54298f49d71347616df19b8d2f59c907374e07b3 (diff) |
cleanup headers and especially #includes everywhere
Beside being a bit cleaner it hopefully also resolves oddball problems
I have with high levels of parallel jobs.
Git-Dch: Ignore
Reported-By: iwyu (include-what-you-use)
Diffstat (limited to 'apt-pkg/install-progress.cc')
-rw-r--r-- | apt-pkg/install-progress.cc | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/apt-pkg/install-progress.cc b/apt-pkg/install-progress.cc index 657330b60..6f43e0bc0 100644 --- a/apt-pkg/install-progress.cc +++ b/apt-pkg/install-progress.cc @@ -1,17 +1,23 @@ +#include <config.h> + #include <apt-pkg/configuration.h> #include <apt-pkg/fileutl.h> #include <apt-pkg/strutl.h> #include <apt-pkg/install-progress.h> -#include <apti18n.h> - -#include <termios.h> +#include <signal.h> +#include <unistd.h> +#include <iostream> +#include <string> +#include <vector> #include <sys/ioctl.h> #include <sstream> #include <fcntl.h> #include <algorithm> #include <stdio.h> +#include <apti18n.h> + namespace APT { namespace Progress { @@ -329,15 +335,15 @@ bool PackageManagerFancy::StatusChanged(std::string PackageName, int row = GetNumberTerminalRows(); - static string save_cursor = "\033[s"; - static string restore_cursor = "\033[u"; - - static string set_bg_color = "\033[42m"; // green - static string set_fg_color = "\033[30m"; // black - - static string restore_bg = "\033[49m"; - static string restore_fg = "\033[39m"; - + static std::string save_cursor = "\033[s"; + static std::string restore_cursor = "\033[u"; + + static std::string set_bg_color = "\033[42m"; // green + static std::string set_fg_color = "\033[30m"; // black + + static std::string restore_bg = "\033[49m"; + static std::string restore_fg = "\033[39m"; + std::cout << save_cursor // move cursor position to last row << "\033[" << row << ";0f" |