summaryrefslogtreecommitdiff
path: root/src/cgtop
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-01-18 06:38:13 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-01-25 20:52:53 +0900
commit6d533e56f8f954a9e0c59ecc570ccec69d34bcc2 (patch)
tree92e6ac852a38dfac2bd1dce791545bbcd085ad78 /src/cgtop
parentcd7ae1b44e48b4658476d65fe4b104a75ef05d43 (diff)
downloadsystemd-6d533e56f8f954a9e0c59ecc570ccec69d34bcc2.tar.gz
cgtop: use ansi_normal() or friends instead of ANSI_NORMAL
Diffstat (limited to 'src/cgtop')
-rw-r--r--src/cgtop/cgtop.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c
index e9e7ed2734..9c96b4d697 100644
--- a/src/cgtop/cgtop.c
+++ b/src/cgtop/cgtop.c
@@ -1080,14 +1080,12 @@ static int run(int argc, char *argv[]) {
case '?':
case 'h':
-#define ON ANSI_HIGHLIGHT
-#define OFF ANSI_NORMAL
-
fprintf(stdout,
- "\t<" ON "p" OFF "> By path; <" ON "t" OFF "> By tasks/procs; <" ON "c" OFF "> By CPU; <" ON "m" OFF "> By memory; <" ON "i" OFF "> By I/O\n"
- "\t<" ON "+" OFF "> Inc. delay; <" ON "-" OFF "> Dec. delay; <" ON "%%" OFF "> Toggle time; <" ON "SPACE" OFF "> Refresh\n"
- "\t<" ON "P" OFF "> Toggle count userspace processes; <" ON "k" OFF "> Toggle count all processes\n"
- "\t<" ON "r" OFF "> Count processes recursively; <" ON "q" OFF "> Quit");
+ "\t<%1$sp%2$s> By path; <%1$st%2$s> By tasks/procs; <%1$sc%2$s> By CPU; <%1$sm%2$s> By memory; <%1$si%2$s> By I/O\n"
+ "\t<%1$s+%2$s> Inc. delay; <%1$s-%2$s> Dec. delay; <%1$s%%%2$s> Toggle time; <%1$sSPACE%2$s> Refresh\n"
+ "\t<%1$sP%2$s> Toggle count userspace processes; <%1$sk%2$s> Toggle count all processes\n"
+ "\t<%1$sr%2$s> Count processes recursively; <%1$sq%2$s> Quit",
+ ansi_highlight(), ansi_normal());
fflush(stdout);
sleep(3);
break;