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.
This commit is contained in:
+2
-2
@@ -340,10 +340,10 @@ static int write_to_console(
|
||||
}
|
||||
|
||||
if (highlight)
|
||||
IOVEC_SET_STRING(iovec[n++], ANSI_HIGHLIGHT_RED_ON);
|
||||
IOVEC_SET_STRING(iovec[n++], ANSI_HIGHLIGHT_RED);
|
||||
IOVEC_SET_STRING(iovec[n++], buffer);
|
||||
if (highlight)
|
||||
IOVEC_SET_STRING(iovec[n++], ANSI_HIGHLIGHT_OFF);
|
||||
IOVEC_SET_STRING(iovec[n++], ANSI_NORMAL);
|
||||
IOVEC_SET_STRING(iovec[n++], "\n");
|
||||
|
||||
if (writev(console_fd, iovec, n) < 0) {
|
||||
|
||||
Reference in New Issue
Block a user