summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-12-30 21:49:10 +0100
committerLennart Poettering <lennart@poettering.net>2021-07-30 16:18:40 +0200
commit30763a32b240fe2c561095441b1e50638a1a4d5b (patch)
treedf1725329db80958da87a489ed0cceedea0f3ba1
parentglyph-util: add three more emojis to emoji list (diff)
downloadsystemd-30763a32b240fe2c561095441b1e50638a1a4d5b.tar.xz
systemd-30763a32b240fe2c561095441b1e50638a1a4d5b.zip
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)
-rw-r--r--src/basic/locale-util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/basic/locale-util.h b/src/basic/locale-util.h
index f50d2c8500..3430eb6ee1 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) : " ";
+}