diff options
author | Jim Meyering <meyering@fb.com> | 2020-10-04 09:39:39 -0700 |
---|---|---|
committer | Jim Meyering <meyering@fb.com> | 2020-10-11 20:30:30 -0700 |
commit | df33ff807de40b131ba835ee4b0d27a0577a17ab (patch) | |
tree | 877177afbfe2d6c5b2805074d7a488fdac22a26a /src/grep.c | |
parent | f31abf786f61f4bdd7134559a5f155fc9c8c2513 (diff) | |
download | grep-df33ff807de40b131ba835ee4b0d27a0577a17ab.tar.gz |
grep: -P: report input filename upon PCRE execution failure
Without this, it could be tedious to determine which input
file evokes a PCRE-execution-time failure.
* src/pcresearch.c (Pexecute): When failing, include the
error-provoking file name in the diagnostic.
* src/grep.c (input_filename): Make extern, since used above.
* src/search.h (input_filename): Declare.
* tests/filename-lineno.pl: Test for this.
($no_pcre): Factor out.
* NEWS (Bug fixes): Mention this.
Diffstat (limited to 'src/grep.c')
-rw-r--r-- | src/grep.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -641,7 +641,7 @@ typedef size_t (*execute_fp_t) (void *, char const *, size_t, size_t *, static execute_fp_t execute; static void *compiled_pattern; -static char const * +char const * input_filename (void) { if (!filename) |