summaryrefslogtreecommitdiffstats
path: root/diag.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-01-02 17:00:40 -0500
committerTavian Barnes <tavianator@tavianator.com>2019-01-02 17:01:06 -0500
commit29a49f5d150911428a35943be8d9fc226865eb1b (patch)
tree35ca4aa4fd793e6398c7943cee0b1732f29419c0 /diag.c
parent7fc7e98df2ea9c34dd1e0cb188554bed933a16df (diff)
downloadbfs-29a49f5d150911428a35943be8d9fc226865eb1b.tar.xz
color: Check format strings + args for cfprintf()
%{cc} is now ${cc} to avoid warnings about an unrecognized format specifier, and %P and %L are now %pP and %pL to make them look more like standard format strings.
Diffstat (limited to 'diag.c')
-rw-r--r--diag.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/diag.c b/diag.c
index d45e38b..bdbf98e 100644
--- a/diag.c
+++ b/diag.c
@@ -56,9 +56,9 @@ void bfs_vwarning(const struct cmdline *cmdline, const char *format, va_list arg
}
void bfs_error_prefix(const struct cmdline *cmdline) {
- cfprintf(cmdline->cerr, "%{bld}%s:%{rs} %{er}error:%{rs} ", xbasename(cmdline->argv[0]));
+ cfprintf(cmdline->cerr, "${bld}%s:${rs} ${er}error:${rs} ", xbasename(cmdline->argv[0]));
}
void bfs_warning_prefix(const struct cmdline *cmdline) {
- cfprintf(cmdline->cerr, "%{bld}%s:%{rs} %{wr}warning:%{rs} ", xbasename(cmdline->argv[0]));
+ cfprintf(cmdline->cerr, "${bld}%s:${rs} ${wr}warning:${rs} ", xbasename(cmdline->argv[0]));
}