format-table: before outputting a color, check if colors are available
authorLennart Poettering <lennart@poettering.net>
Tue, 6 Nov 2018 17:37:21 +0000 (18:37 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 30 Nov 2018 15:46:10 +0000 (16:46 +0100)
commita22318e55492af721879d8692ed039144696bb08
tree9e1952578079b4f35fca5b2c709b01494fcaf475
parent165ca5663e9859083c70d793a6b4aa4f3b2af24c
format-table: before outputting a color, check if colors are available

This is in many cases redundant, as a similar check is done by various
callers already, but in other cases (where we read the color from a
static table for example), it's nice to let the color check be done by
the table code itself, and since it doesn't hurt in the other cases just
do it again.
src/shared/format-table.c