From 5f49677d763607ae8624eb9fc6933ce7cf871811 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 11 Feb 2024 16:46:07 -0500 Subject: Bugfix for string literals and add support for printing patterns with --verbose --- pattern.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pattern.h') diff --git a/pattern.h b/pattern.h index 32a2311..046a792 100644 --- a/pattern.h +++ b/pattern.h @@ -3,8 +3,10 @@ // #pragma once +#include #include #include +#include #include #include @@ -67,7 +69,7 @@ typedef struct pat_s { struct {} BP_ANYCHAR; struct {} BP_ID_START; struct {} BP_ID_CONTINUE; - struct {const char *string;} BP_STRING; + struct {const char *string; size_t len; } BP_STRING; struct {unsigned char low, high; } BP_RANGE; struct {struct pat_s *pat;} BP_NOT; struct {struct pat_s *target, *skip;} BP_UPTO; @@ -163,5 +165,6 @@ maybe_pat_t bp_pattern(const char *str, const char *end); void free_all_pats(void); __attribute__((nonnull)) void delete_pat(pat_t **at_pat, bool recursive); +int set_pattern_printf_specifier(char specifier); // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 -- cgit v1.2.3