summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-05-07 17:30:18 -0400
committerSven Eden <yamakuzure@gmx.net>2017-06-16 10:12:58 +0200
commitbcd8aec4ff66a0f27b46d47df49e184da57a68b0 (patch)
treed551e99a6b6aba7074cf452381599f127b3a34d4 /src/shared
parent5489ba3e334d21609a042d5dc1615323f2903181 (diff)
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.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/bus-unit-util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c
index a4c228280..ff5dceaed 100644
--- a/src/shared/bus-unit-util.c
+++ b/src/shared/bus-unit-util.c
@@ -1088,7 +1088,7 @@ static int dump_processes(
}
more = i+1 < n || cg->children;
- special = draw_special_char(more ? DRAW_TREE_BRANCH : DRAW_TREE_RIGHT);
+ special = special_glyph(more ? TREE_BRANCH : TREE_RIGHT);
fprintf(stdout, "%s%s%*"PID_PRI" %s\n",
prefix,
@@ -1124,14 +1124,14 @@ static int dump_processes(
name++;
more = i+1 < n;
- special = draw_special_char(more ? DRAW_TREE_BRANCH : DRAW_TREE_RIGHT);
+ special = special_glyph(more ? TREE_BRANCH : TREE_RIGHT);
fputs(prefix, stdout);
fputs(special, stdout);
fputs(name, stdout);
fputc('\n', stdout);
- special = draw_special_char(more ? DRAW_TREE_VERTICAL : DRAW_TREE_SPACE);
+ special = special_glyph(more ? TREE_VERTICAL : TREE_SPACE);
pp = strappend(prefix, special);
if (!pp)
@@ -1215,7 +1215,7 @@ static int dump_extra_processes(
fprintf(stdout, "%s%s %*" PID_PRI " %s\n",
prefix,
- draw_special_char(DRAW_TRIANGULAR_BULLET),
+ special_glyph(TRIANGULAR_BULLET),
width, pids[k],
name);
}