summaryrefslogtreecommitdiffstats
path: root/diag.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-04-04 14:56:22 -0400
committerTavian Barnes <tavianator@tavianator.com>2022-04-15 14:45:08 -0400
commita571aa9ef6f3dc2099ee33c5040f8c54776ddece (patch)
treeb38b6656e4fcd225559d0c950fcbae4ff3165372 /diag.c
parent44a2912b831f1c3f75fee82273e235ff78b5cb93 (diff)
downloadbfs-a571aa9ef6f3dc2099ee33c5040f8c54776ddece.tar.xz
color: Use three-letter codes for warnings and errors
No reason to potentially conflict with the two-letter codes GNU ls uses.
Diffstat (limited to 'diag.c')
-rw-r--r--diag.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/diag.c b/diag.c
index e8333f1..27848f1 100644
--- a/diag.c
+++ b/diag.c
@@ -84,12 +84,12 @@ bool bfs_vdebug(const struct bfs_ctx *ctx, enum debug_flags flag, const char *fo
}
void bfs_error_prefix(const struct bfs_ctx *ctx) {
- cfprintf(ctx->cerr, "${bld}%s:${rs} ${er}error:${rs} ", xbasename(ctx->argv[0]));
+ cfprintf(ctx->cerr, "${bld}%s:${rs} ${err}error:${rs} ", xbasename(ctx->argv[0]));
}
bool bfs_warning_prefix(const struct bfs_ctx *ctx) {
if (ctx->warn) {
- cfprintf(ctx->cerr, "${bld}%s:${rs} ${wr}warning:${rs} ", xbasename(ctx->argv[0]));
+ cfprintf(ctx->cerr, "${bld}%s:${rs} ${wrn}warning:${rs} ", xbasename(ctx->argv[0]));
return true;
} else {
return false;
@@ -180,9 +180,9 @@ static void bfs_argv_diag(const struct bfs_ctx *ctx, const bool *args, bool warn
if (args[i] && (i == 0 || !args[i - 1])) {
if (warning) {
- cfprintf(ctx->cerr, "${wr}");
+ cfprintf(ctx->cerr, "${wrn}");
} else {
- cfprintf(ctx->cerr, "${er}");
+ cfprintf(ctx->cerr, "${err}");
}
}