diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-05-30 00:00:07 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-30 00:00:07 -0700 |
commit | be653d6cb87d17c1d70d31cb7cfcb004d48def7b (patch) | |
tree | 5d9eb8e0e0635661448cd98593aec739f7190e85 /grep.h | |
parent | 3d109dd8ef012eac37702a2afa980b545ac08467 (diff) | |
parent | d0042abe14b3aece87595d365d6eba84c3e53327 (diff) | |
download | git-be653d6cb87d17c1d70d31cb7cfcb004d48def7b.tar.gz |
Merge branch 'mk/grep-pcre'
* mk/grep-pcre:
git-grep: Fix problems with recently added tests
git-grep: Update tests (mainly for -P)
Makefile: Pass USE_LIBPCRE down in GIT-BUILD-OPTIONS
git-grep: update tests now regexp type is "last one wins"
git-grep: do not die upon -F/-P when grep.extendedRegexp is set.
git-grep: Bail out when -P is used with -F or -E
grep: Add basic tests
configure: Check for libpcre
git-grep: Learn PCRE
grep: Extract compile_regexp_failed() from compile_regexp()
grep: Fix a typo in a comment
grep: Put calls to fixmatch() and regmatch() into patmatch()
contrib/completion: --line-number to git grep
Documentation: Add --line-number to git-grep synopsis
Diffstat (limited to 'grep.h')
-rw-r--r-- | grep.h | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1,6 +1,12 @@ #ifndef GREP_H #define GREP_H #include "color.h" +#ifdef USE_LIBPCRE +#include <pcre.h> +#else +typedef int pcre; +typedef int pcre_extra; +#endif enum grep_pat_token { GREP_PATTERN, @@ -33,6 +39,8 @@ struct grep_pat { size_t patternlen; enum grep_header_field field; regex_t regexp; + pcre *pcre_regexp; + pcre_extra *pcre_extra_info; unsigned fixed:1; unsigned ignore_case:1; unsigned word_regexp:1; @@ -83,6 +91,7 @@ struct grep_opt { #define GREP_BINARY_TEXT 2 int binary; int extended; + int pcre; int relative; int pathname; int null_following_name; |