diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-09-19 00:45:05 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-09-22 16:30:42 +0200 |
commit | 1fc464f6fbecfc5d8ba9f7b98d19e21fb324bfb9 (patch) | |
tree | cab3dbcc5f1c9bd4bde7601cf2163f7fa73ae860 /src/basic/terminal-util.c | |
parent | 3ade55d31b6154e4da184dd08ad76ae1ea285f22 (diff) |
cgtop: underline table header
Let's underline the header line of the table shown by cgtop, how it is
customary for tables. In order to do this, let's introduce new ANSI
underline macros, and clean up the existing ones as side effect.
Diffstat (limited to 'src/basic/terminal-util.c')
-rw-r--r-- | src/basic/terminal-util.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/basic/terminal-util.c b/src/basic/terminal-util.c index c5ef5ab0d1..dd3d525854 100644 --- a/src/basic/terminal-util.c +++ b/src/basic/terminal-util.c @@ -139,14 +139,14 @@ int ask_char(char *ret, const char *replies, const char *text, ...) { bool need_nl = true; if (on_tty()) - fputs(ANSI_HIGHLIGHT_ON, stdout); + fputs(ANSI_HIGHLIGHT, stdout); va_start(ap, text); vprintf(text, ap); va_end(ap); if (on_tty()) - fputs(ANSI_HIGHLIGHT_OFF, stdout); + fputs(ANSI_NORMAL, stdout); fflush(stdout); @@ -183,14 +183,14 @@ int ask_string(char **ret, const char *text, ...) { va_list ap; if (on_tty()) - fputs(ANSI_HIGHLIGHT_ON, stdout); + fputs(ANSI_HIGHLIGHT, stdout); va_start(ap, text); vprintf(text, ap); va_end(ap); if (on_tty()) - fputs(ANSI_HIGHLIGHT_OFF, stdout); + fputs(ANSI_NORMAL, stdout); fflush(stdout); |