From: Lennart Poettering Date: Wed, 30 Dec 2020 20:49:10 +0000 (+0100) Subject: util: add one more helper for generating colored check mark glyphs X-Git-Tag: v250-rc1~896^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F20170%2Fhead;p=thirdparty%2Fsystemd.git util: add one more helper for generating colored check mark glyphs This one is useful for a outputs with a slightly more "positive" outlook, i.e. where only the checkmarks are shown but the crossmarks are replaced by spaces. (Usecase: a larger table with many checkmarks, where the red crossmarks might just be too much negative noise) --- diff --git a/src/basic/locale-util.h b/src/basic/locale-util.h index f50d2c85008..3430eb6ee1f 100644 --- a/src/basic/locale-util.h +++ b/src/basic/locale-util.h @@ -98,3 +98,7 @@ static inline void locale_variables_freep(char*(*l)[_VARIABLE_LC_MAX]) { static inline const char *special_glyph_check_mark(bool b) { return b ? special_glyph(SPECIAL_GLYPH_CHECK_MARK) : special_glyph(SPECIAL_GLYPH_CROSS_MARK); } + +static inline const char *special_glyph_check_mark_space(bool b) { + return b ? special_glyph(SPECIAL_GLYPH_CHECK_MARK) : " "; +}