]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
util: add one more helper for generating colored check mark glyphs 20170/head
authorLennart Poettering <lennart@poettering.net>
Wed, 30 Dec 2020 20:49:10 +0000 (21:49 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 30 Jul 2021 14:18:40 +0000 (16:18 +0200)
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

index f50d2c850086d83bff2e59b7858495606733d890..3430eb6ee1ff98e62b64d31222abb2993d135d50 100644 (file)
@@ -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) : " ";
+}