From d12cf8abbd2f3356348e82a20d95e9ba03b8cdf7 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 18 Jan 2021 11:52:47 -0800 Subject: More bools --- bp.c | 2 +- types.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bp.c b/bp.c index e0241f3..883ada2 100644 --- a/bp.c +++ b/bp.c @@ -211,7 +211,7 @@ static void confirm_replacements(file_t *f, match_t *m, confirm_t *confirm) if (*confirm == CONFIRM_ALL) return; if (m->pat->type == BP_REPLACE) { if (*confirm == CONFIRM_NONE) { - m->skip_replacement = 1; + m->skip_replacement = true; goto check_children; } diff --git a/types.h b/types.h index 1fee2a6..f0e9ff6 100644 --- a/types.h +++ b/types.h @@ -4,6 +4,7 @@ #ifndef TYPES__H #define TYPES__H +#include #include #include "files.h" @@ -97,7 +98,7 @@ typedef struct match_s { // the replaced text when printing this match: // TODO: this is a bit hacky, there is probably a better way to go about // this but it's less hacky that mutating the match objects more drastically - unsigned int skip_replacement:1; + bool skip_replacement:1; } match_t; // -- cgit v1.2.3