diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-03-03 15:50:59 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-03-03 15:50:59 -0500 |
| commit | c234c92eeb5a87fe3dc617a1ddb23f21c5f29069 (patch) | |
| tree | 4336ca80830cee66eda2eddd295c1070fbe5f651 /bp.c | |
| parent | 7fd49c022504d71fecc059446675813bdf6f5789 (diff) | |
Remove printf.h dependency
Diffstat (limited to 'bp.c')
| -rw-r--r-- | bp.c | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -10,7 +10,6 @@ #include <fcntl.h> #include <glob.h> #include <limits.h> -#include <printf.h> #include <signal.h> #include <stdbool.h> #include <stdio.h> @@ -543,9 +542,6 @@ int main(int argc, char *argv[]) { char *flag = NULL; - if (set_pattern_printf_specifier('P')) - errx(1, "Couldn't set printf specifier"); - bp_pat_t *defs = NULL; file_t *loaded_files = NULL; bp_pat_t *pattern = NULL; @@ -664,8 +660,11 @@ int main(int argc, char *argv[]) // Handle exit() calls gracefully: require(atexit(&cleanup), "Failed to set cleanup handler at exit"); - if (options.verbose) - printf("Matching pattern: %P\n", pattern); + if (options.verbose) { + fputs("Matching pattern: ", stderr); + fprint_pattern(stderr, pattern); + fputc('\n', stderr); + } // Default to git mode if there's a .git directory and no files were specified: struct stat gitdir; |
