aboutsummaryrefslogtreecommitdiff
path: root/bp.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-03-03 15:50:59 -0500
committerBruce Hill <bruce@bruce-hill.com>2025-03-03 15:50:59 -0500
commitc234c92eeb5a87fe3dc617a1ddb23f21c5f29069 (patch)
tree4336ca80830cee66eda2eddd295c1070fbe5f651 /bp.c
parent7fd49c022504d71fecc059446675813bdf6f5789 (diff)
Remove printf.h dependency
Diffstat (limited to 'bp.c')
-rw-r--r--bp.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/bp.c b/bp.c
index 2551e5e..236aab0 100644
--- a/bp.c
+++ b/bp.c
@@ -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;