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.
This commit is contained in:
Lennart Poettering
2018-12-14 08:22:54 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent fd0ec39d38
commit 9a6f746fb6
20 changed files with 152 additions and 152 deletions
+4 -4
View File
@@ -2305,7 +2305,7 @@ static int dump_processes(
}
more = i+1 < n || cg->children;
special = special_glyph(more ? TREE_BRANCH : TREE_RIGHT);
special = special_glyph(more ? SPECIAL_GLYPH_TREE_BRANCH : SPECIAL_GLYPH_TREE_RIGHT);
fprintf(stdout, "%s%s%*"PID_PRI" %s\n",
prefix,
@@ -2342,14 +2342,14 @@ static int dump_processes(
name++;
more = i+1 < n;
special = special_glyph(more ? TREE_BRANCH : TREE_RIGHT);
special = special_glyph(more ? SPECIAL_GLYPH_TREE_BRANCH : SPECIAL_GLYPH_TREE_RIGHT);
fputs(prefix, stdout);
fputs(special, stdout);
fputs(name, stdout);
fputc('\n', stdout);
special = special_glyph(more ? TREE_VERTICAL : TREE_SPACE);
special = special_glyph(more ? SPECIAL_GLYPH_TREE_VERTICAL : SPECIAL_GLYPH_TREE_SPACE);
pp = strappend(prefix, special);
if (!pp)
@@ -2433,7 +2433,7 @@ static int dump_extra_processes(
fprintf(stdout, "%s%s %*" PID_PRI " %s\n",
prefix,
special_glyph(TRIANGULAR_BULLET),
special_glyph(SPECIAL_GLYPH_TRIANGULAR_BULLET),
width, pids[k],
name);
}
+5 -5
View File
@@ -63,9 +63,9 @@ static void show_pid_array(
(void) get_process_cmdline(pids[i], n_columns, true, &t);
if (extra)
printf("%s%s ", prefix, special_glyph(TRIANGULAR_BULLET));
printf("%s%s ", prefix, special_glyph(SPECIAL_GLYPH_TRIANGULAR_BULLET));
else
printf("%s%s", prefix, special_glyph(((more || i < n_pids-1) ? TREE_BRANCH : TREE_RIGHT)));
printf("%s%s", prefix, special_glyph(((more || i < n_pids-1) ? SPECIAL_GLYPH_TREE_BRANCH : SPECIAL_GLYPH_TREE_RIGHT)));
printf("%*"PID_PRI" %s\n", pid_width, pids[i], strna(t));
}
@@ -159,10 +159,10 @@ int show_cgroup_by_path(
}
if (last) {
printf("%s%s%s\n", prefix, special_glyph(TREE_BRANCH), cg_unescape(basename(last)));
printf("%s%s%s\n", prefix, special_glyph(SPECIAL_GLYPH_TREE_BRANCH), cg_unescape(basename(last)));
if (!p1) {
p1 = strappend(prefix, special_glyph(TREE_VERTICAL));
p1 = strappend(prefix, special_glyph(SPECIAL_GLYPH_TREE_VERTICAL));
if (!p1)
return -ENOMEM;
}
@@ -181,7 +181,7 @@ int show_cgroup_by_path(
show_cgroup_one_by_path(path, prefix, n_columns, !!last, flags);
if (last) {
printf("%s%s%s\n", prefix, special_glyph(TREE_RIGHT), cg_unescape(basename(last)));
printf("%s%s%s\n", prefix, special_glyph(SPECIAL_GLYPH_TREE_RIGHT), cg_unescape(basename(last)));
if (!p2) {
p2 = strappend(prefix, " ");
+1 -1
View File
@@ -346,7 +346,7 @@ void unit_file_dump_changes(int r, const char *verb, const UnitFileChange *chang
if (!quiet)
log_info("Created symlink %s %s %s.",
changes[i].path,
special_glyph(ARROW),
special_glyph(SPECIAL_GLYPH_ARROW),
changes[i].source);
break;
case UNIT_FILE_UNLINK: