From a215ab6de0ae34db7311136404d0f9feab34ef04 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Wed, 5 Jul 2023 10:45:56 -0400 Subject: Use strcmp() instead of fnmatch() if possible --- src/expr.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/expr.h') diff --git a/src/expr.h b/src/expr.h index 356689d..95118b9 100644 --- a/src/expr.h +++ b/src/expr.h @@ -143,6 +143,16 @@ struct bfs_expr { }; }; + /** String comparisons. */ + struct { + /** String pattern. */ + const char *pattern; + /** fnmatch() flags. */ + int fnm_flags; + /** Whether strcmp() can be used instead of fnmatch(). */ + bool literal; + }; + /** Printing actions. */ struct { /** The output stream. */ -- cgit v1.2.3