diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-06-02 15:39:19 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-06-02 15:40:30 -0400 |
commit | a1c8bda52a9c07d32127762ee0c865660a0268ab (patch) | |
tree | c79a8a60573fa712c898ece6021929ab539e625e /exec.c | |
parent | c074645660f58faee1f653e4e8bd1ebf832c21f1 (diff) | |
download | bfs-a1c8bda52a9c07d32127762ee0c865660a0268ab.tar.xz |
diag: Unify debug printing
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -37,7 +37,9 @@ /** Print some debugging info. */ BFS_FORMATTER(2, 3) static void bfs_exec_debug(const struct bfs_exec *execbuf, const char *format, ...) { - if (!(execbuf->cmdline->debug & DEBUG_EXEC)) { + const struct cmdline *cmdline = execbuf->cmdline; + + if (!bfs_debug(cmdline, DEBUG_EXEC, "${blu}")) { return; } @@ -49,7 +51,7 @@ static void bfs_exec_debug(const struct bfs_exec *execbuf, const char *format, . if (execbuf->flags & BFS_EXEC_CHDIR) { fputs("dir", stderr); } - fputs(": ", stderr); + cfprintf(cmdline->cerr, "${rs}: "); va_list args; va_start(args, format); |