]> git.ipfire.org Git - thirdparty/git.git/blobdiff - grep.h
Git 1.7.8-rc2
[thirdparty/git.git] / grep.h
diff --git a/grep.h b/grep.h
index efa8cff980af2b2c06dad080876637d16b5c4985..a65280026d5dee8ab059bead79f05d6a1111147a 100644 (file)
--- a/grep.h
+++ b/grep.h
@@ -1,6 +1,13 @@
 #ifndef GREP_H
 #define GREP_H
 #include "color.h"
+#ifdef USE_LIBPCRE
+#include <pcre.h>
+#else
+typedef int pcre;
+typedef int pcre_extra;
+#endif
+#include "kwset.h"
 
 enum grep_pat_token {
        GREP_PATTERN,
@@ -22,6 +29,7 @@ enum grep_header_field {
        GREP_HEADER_AUTHOR = 0,
        GREP_HEADER_COMMITTER
 };
+#define GREP_HEADER_FIELD_MAX (GREP_HEADER_COMMITTER + 1)
 
 struct grep_pat {
        struct grep_pat *next;
@@ -32,6 +40,9 @@ struct grep_pat {
        size_t patternlen;
        enum grep_header_field field;
        regex_t regexp;
+       pcre *pcre_regexp;
+       pcre_extra *pcre_extra_info;
+       kwset_t kws;
        unsigned fixed:1;
        unsigned ignore_case:1;
        unsigned word_regexp:1;
@@ -41,6 +52,7 @@ enum grep_expr_node {
        GREP_NODE_ATOM,
        GREP_NODE_NOT,
        GREP_NODE_AND,
+       GREP_NODE_TRUE,
        GREP_NODE_OR
 };
 
@@ -81,12 +93,14 @@ struct grep_opt {
 #define GREP_BINARY_TEXT       2
        int binary;
        int extended;
+       int pcre;
        int relative;
        int pathname;
        int null_following_name;
        int color;
        int max_depth;
        int funcname;
+       int funcbody;
        char color_context[COLOR_MAXLEN];
        char color_filename[COLOR_MAXLEN];
        char color_function[COLOR_MAXLEN];
@@ -99,6 +113,8 @@ struct grep_opt {
        unsigned post_context;
        unsigned last_shown;
        int show_hunk_mark;
+       int file_break;
+       int heading;
        void *priv;
 
        void (*output)(struct grep_opt *opt, const void *data, size_t size);