diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2022-04-04 14:56:22 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2022-04-15 14:45:08 -0400 |
commit | a571aa9ef6f3dc2099ee33c5040f8c54776ddece (patch) | |
tree | b38b6656e4fcd225559d0c950fcbae4ff3165372 /diag.c | |
parent | 44a2912b831f1c3f75fee82273e235ff78b5cb93 (diff) | |
download | bfs-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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}"); } } |