From 94421639b0bb61dc14ea39028ee66c84e26814a7 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Thu, 18 Jan 2024 01:18:48 +0100 Subject: Add optional PCRE support --- src/grab.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/grab.c b/src/grab.c index f04f75f..5695226 100644 --- a/src/grab.c +++ b/src/grab.c @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include @@ -14,12 +13,17 @@ # define nullptr NULL #endif -#include "da.h" - -#ifndef REG_STARTEND -# error "REG_STARTEND not defined" +#if GRAB_DO_PCRE +# include +#else +# include +# ifndef REG_STARTEND +# error "REG_STARTEND not defined" +# endif #endif +#include "da.h" + #define die(...) err(EXIT_FAILURE, __VA_ARGS__); #define diex(...) errx(EXIT_FAILURE, __VA_ARGS__); #define warn(...) \ -- cgit v1.2.3