summaryrefslogtreecommitdiff
path: root/grep.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-10-11 14:24:47 +0900
committerJunio C Hamano <gitster@pobox.com>2019-10-11 14:24:47 +0900
commita73f91774cbfb6f31bca328ebf200498fe92d97a (patch)
treed76ed7e7108565f006967418f33e3d667135ca34 /grep.h
parent4608a029b490a87469680ee7d055a6d7cb5912c6 (diff)
parentc581e4a7499b9e1089847dbbc057afbef1ed861e (diff)
downloadgit-a73f91774cbfb6f31bca328ebf200498fe92d97a.tar.gz
Merge branch 'ab/pcre-jit-fixes'
A few simplification and bugfixes to PCRE interface. * ab/pcre-jit-fixes: grep: under --debug, show whether PCRE JIT is enabled grep: do not enter PCRE2_UTF mode on fixed matching grep: stess test PCRE v2 on invalid UTF-8 data grep: create a "is_fixed" member in "grep_pat" grep: consistently use "p->fixed" in compile_regexp() grep: stop using a custom JIT stack with PCRE v1 grep: stop "using" a custom JIT stack with PCRE v2 grep: remove overly paranoid BUG(...) code grep: use PCRE v2 for optimized fixed-string search grep: remove the kwset optimization grep: drop support for \0 in --fixed-strings <pattern> grep: make the behavior for NUL-byte in patterns sane grep tests: move binary pattern tests into their own file grep tests: move "grep binary" alongside the rest grep: inline the return value of a function call used only once t4210: skip more command-line encoding tests on MinGW grep: don't use PCRE2?_UTF8 with "log --encoding=<non-utf8>" log tests: test regex backends in "--encode=<enc>" tests
Diffstat (limited to 'grep.h')
-rw-r--r--grep.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/grep.h b/grep.h
index 9c8797a017..1060f0fe50 100644
--- a/grep.h
+++ b/grep.h
@@ -17,13 +17,9 @@
#ifndef GIT_PCRE_STUDY_JIT_COMPILE
#define GIT_PCRE_STUDY_JIT_COMPILE 0
#endif
-#if PCRE_MAJOR <= 8 && PCRE_MINOR < 20
-typedef int pcre_jit_stack;
-#endif
#else
typedef int pcre;
typedef int pcre_extra;
-typedef int pcre_jit_stack;
#endif
#ifdef USE_LIBPCRE2
#define PCRE2_CODE_UNIT_WIDTH 8
@@ -32,10 +28,7 @@ typedef int pcre_jit_stack;
typedef int pcre2_code;
typedef int pcre2_match_data;
typedef int pcre2_compile_context;
-typedef int pcre2_match_context;
-typedef int pcre2_jit_stack;
#endif
-#include "kwset.h"
#include "thread-utils.h"
#include "userdiff.h"
@@ -91,17 +84,14 @@ struct grep_pat {
regex_t regexp;
pcre *pcre1_regexp;
pcre_extra *pcre1_extra_info;
- pcre_jit_stack *pcre1_jit_stack;
const unsigned char *pcre1_tables;
int pcre1_jit_on;
pcre2_code *pcre2_pattern;
pcre2_match_data *pcre2_match_data;
pcre2_compile_context *pcre2_compile_context;
- pcre2_match_context *pcre2_match_context;
- pcre2_jit_stack *pcre2_jit_stack;
uint32_t pcre2_jit_on;
- kwset_t kws;
unsigned fixed:1;
+ unsigned is_fixed:1;
unsigned ignore_case:1;
unsigned word_regexp:1;
};
@@ -176,6 +166,7 @@ struct grep_opt {
int funcbody;
int extended_regexp_option;
int pattern_type_option;
+ int ignore_locale;
char colors[NR_GREP_COLORS][COLOR_MAXLEN];
unsigned pre_context;
unsigned post_context;