summaryrefslogtreecommitdiff
path: root/src/analyze
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-12-13 22:11:32 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-12-14 08:22:54 +0100
commit9a6f746fb6e21dc4fe79ed93dde8b79371a13d34 (patch)
tree3893a2ce756b0326fd463a7d7244d2ad82a4f6fb /src/analyze
parentfd0ec39d3848029abd3a439e84c5728331de2128 (diff)
downloadsystemd-9a6f746fb6e21dc4fe79ed93dde8b79371a13d34.tar.gz
locale-util: prefix special glyph enum values with SPECIAL_GLYPH_
This has been irritating me for quite a while: let's prefix these enum values with a common prefix, like we do for almost all other enums. No change in behaviour, just some renaming.
Diffstat (limited to 'src/analyze')
-rw-r--r--src/analyze/analyze-security.c22
-rw-r--r--src/analyze/analyze.c6
2 files changed, 14 insertions, 14 deletions
diff --git a/src/analyze/analyze-security.c b/src/analyze/analyze-security.c
index cdbe2b31c8..8373819cd4 100644
--- a/src/analyze/analyze-security.c
+++ b/src/analyze/analyze-security.c
@@ -1385,13 +1385,13 @@ static int assess(const struct security_info *info, Table *overview_table, Analy
const char *color;
SpecialGlyph smiley;
} badness_table[] = {
- { 100, "DANGEROUS", ANSI_HIGHLIGHT_RED, DEPRESSED_SMILEY },
- { 90, "UNSAFE", ANSI_HIGHLIGHT_RED, UNHAPPY_SMILEY },
- { 75, "EXPOSED", ANSI_HIGHLIGHT_YELLOW, SLIGHTLY_UNHAPPY_SMILEY },
- { 50, "MEDIUM", NULL, NEUTRAL_SMILEY },
- { 10, "OK", ANSI_HIGHLIGHT_GREEN, SLIGHTLY_HAPPY_SMILEY },
- { 1, "SAFE", ANSI_HIGHLIGHT_GREEN, HAPPY_SMILEY },
- { 0, "PERFECT", ANSI_HIGHLIGHT_GREEN, ECSTATIC_SMILEY },
+ { 100, "DANGEROUS", ANSI_HIGHLIGHT_RED, SPECIAL_GLYPH_DEPRESSED_SMILEY },
+ { 90, "UNSAFE", ANSI_HIGHLIGHT_RED, SPECIAL_GLYPH_UNHAPPY_SMILEY },
+ { 75, "EXPOSED", ANSI_HIGHLIGHT_YELLOW, SPECIAL_GLYPH_SLIGHTLY_UNHAPPY_SMILEY },
+ { 50, "MEDIUM", NULL, SPECIAL_GLYPH_NEUTRAL_SMILEY },
+ { 10, "OK", ANSI_HIGHLIGHT_GREEN, SPECIAL_GLYPH_SLIGHTLY_HAPPY_SMILEY },
+ { 1, "SAFE", ANSI_HIGHLIGHT_GREEN, SPECIAL_GLYPH_HAPPY_SMILEY },
+ { 0, "PERFECT", ANSI_HIGHLIGHT_GREEN, SPECIAL_GLYPH_ECSTATIC_SMILEY },
};
uint64_t badness_sum = 0, weight_sum = 0, exposure;
@@ -1448,15 +1448,15 @@ static int assess(const struct security_info *info, Table *overview_table, Analy
description = a->description_na;
color = NULL;
} else if (badness == a->range) {
- checkmark = special_glyph(CROSS_MARK);
+ checkmark = special_glyph(SPECIAL_GLYPH_CROSS_MARK);
description = a->description_bad;
color = ansi_highlight_red();
} else if (badness == 0) {
- checkmark = special_glyph(CHECK_MARK);
+ checkmark = special_glyph(SPECIAL_GLYPH_CHECK_MARK);
description = a->description_good;
color = ansi_highlight_green();
} else {
- checkmark = special_glyph(CROSS_MARK);
+ checkmark = special_glyph(SPECIAL_GLYPH_CROSS_MARK);
description = NULL;
color = ansi_highlight_red();
}
@@ -1557,7 +1557,7 @@ static int assess(const struct security_info *info, Table *overview_table, Analy
name = info->id;
printf("\n%s %sOverall exposure level for %s%s: %s%" PRIu64 ".%" PRIu64 " %s%s %s\n",
- special_glyph(ARROW),
+ special_glyph(SPECIAL_GLYPH_ARROW),
ansi_highlight(),
name,
ansi_normal(),
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
index 2b9cb65256..1f69b9fda1 100644
--- a/src/analyze/analyze.c
+++ b/src/analyze/analyze.c
@@ -823,9 +823,9 @@ static int list_dependencies_print(const char *name, unsigned level, unsigned br
char ts[FORMAT_TIMESPAN_MAX], ts2[FORMAT_TIMESPAN_MAX];
for (i = level; i != 0; i--)
- printf("%s", special_glyph(branches & (1 << (i-1)) ? TREE_VERTICAL : TREE_SPACE));
+ printf("%s", special_glyph(branches & (1 << (i-1)) ? SPECIAL_GLYPH_TREE_VERTICAL : SPECIAL_GLYPH_TREE_SPACE));
- printf("%s", special_glyph(last ? TREE_RIGHT : TREE_BRANCH));
+ printf("%s", special_glyph(last ? SPECIAL_GLYPH_TREE_RIGHT : SPECIAL_GLYPH_TREE_BRANCH));
if (times) {
if (times->time > 0)
@@ -1659,7 +1659,7 @@ static int dump_timespan(int argc, char *argv[], void *userdata) {
return log_error_errno(r, "Failed to parse time span '%s': %m", *input_timespan);
printf("Original: %s\n", *input_timespan);
- printf(" %ss: %" PRIu64 "\n", special_glyph(MU), output_usecs);
+ printf(" %ss: %" PRIu64 "\n", special_glyph(SPECIAL_GLYPH_MU), output_usecs);
printf(" Human: %s\n", format_timespan(ft_buf, sizeof(ft_buf), output_usecs, usec_magnitude));
if (input_timespan[1])