From 30763a32b240fe2c561095441b1e50638a1a4d5b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 30 Dec 2020 21:49:10 +0100 Subject: [PATCH] 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) --- src/basic/locale-util.h | 4 ++++ 1 file changed, 4 insertions(+) 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) : " "; +} -- 2.47.3