tree-wide: rename draw_special_char to special_glyph
That function doesn't draw anything on it's own, just returns a string, which sometimes is more than one character. Also remove "DRAW_" prefix from character names, TREE_* and ARROW and BLACK_CIRCLE are unambigous on their own, don't draw anything, and are always used as an argument to special_glyph(). Rename "DASH" to "MDASH", as there's more than one type of dash.
This commit is contained in:
@@ -750,7 +750,7 @@ static int link_status_one(
|
||||
(void) sd_network_link_get_carrier_bound_to(info->ifindex, &carrier_bound_to);
|
||||
(void) sd_network_link_get_carrier_bound_by(info->ifindex, &carrier_bound_by);
|
||||
|
||||
printf("%s%s%s %i: %s\n", on_color_operational, draw_special_char(DRAW_BLACK_CIRCLE), off_color_operational, info->ifindex, info->name);
|
||||
printf("%s%s%s %i: %s\n", on_color_operational, special_glyph(BLACK_CIRCLE), off_color_operational, info->ifindex, info->name);
|
||||
|
||||
printf(" Link File: %s\n"
|
||||
" Network File: %s\n"
|
||||
@@ -818,7 +818,7 @@ static int system_status(sd_netlink *rtnl, sd_hwdb *hwdb) {
|
||||
operational_state_to_color(operational_state, &on_color_operational, &off_color_operational);
|
||||
|
||||
printf("%s%s%s State: %s%s%s\n",
|
||||
on_color_operational, draw_special_char(DRAW_BLACK_CIRCLE), off_color_operational,
|
||||
on_color_operational, special_glyph(BLACK_CIRCLE), off_color_operational,
|
||||
on_color_operational, strna(operational_state), off_color_operational);
|
||||
|
||||
(void) dump_addresses(rtnl, " Address: ", 0);
|
||||
|
||||
Reference in New Issue
Block a user