]> git.ipfire.org Git - thirdparty/git.git/blobdiff - grep.h
Merge branch 'sb/object-store-lookup'
[thirdparty/git.git] / grep.h
diff --git a/grep.h b/grep.h
index 0c091e5104a83c0f83c65fd0bef9f39caf8f644d..01d2cba6f80921538d0269aefcad6f11218392b0 100644 (file)
--- a/grep.h
+++ b/grep.h
@@ -7,11 +7,12 @@
 #if PCRE_MAJOR >= 8 && PCRE_MINOR >= 32
 #ifndef NO_LIBPCRE1_JIT
 #define GIT_PCRE1_USE_JIT
+#define GIT_PCRE_STUDY_JIT_COMPILE PCRE_STUDY_JIT_COMPILE
 #endif
 #endif
 #endif
-#ifndef PCRE_STUDY_JIT_COMPILE
-#define PCRE_STUDY_JIT_COMPILE 0
+#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;
@@ -61,6 +62,19 @@ enum grep_header_field {
        GREP_HEADER_FIELD_MAX
 };
 
+enum grep_color {
+       GREP_COLOR_CONTEXT,
+       GREP_COLOR_FILENAME,
+       GREP_COLOR_FUNCTION,
+       GREP_COLOR_LINENO,
+       GREP_COLOR_COLUMNNO,
+       GREP_COLOR_MATCH_CONTEXT,
+       GREP_COLOR_MATCH_SELECTED,
+       GREP_COLOR_SELECTED,
+       GREP_COLOR_SEP,
+       NR_GREP_COLORS
+};
+
 struct grep_pat {
        struct grep_pat *next;
        const char *origin;
@@ -126,6 +140,7 @@ struct grep_opt {
        int prefix_length;
        regex_t regexp;
        int linenum;
+       int columnnum;
        int invert;
        int ignore_case;
        int status_only;
@@ -154,14 +169,7 @@ struct grep_opt {
        int funcbody;
        int extended_regexp_option;
        int pattern_type_option;
-       char color_context[COLOR_MAXLEN];
-       char color_filename[COLOR_MAXLEN];
-       char color_function[COLOR_MAXLEN];
-       char color_lineno[COLOR_MAXLEN];
-       char color_match_context[COLOR_MAXLEN];
-       char color_match_selected[COLOR_MAXLEN];
-       char color_selected[COLOR_MAXLEN];
-       char color_sep[COLOR_MAXLEN];
+       char colors[NR_GREP_COLORS][COLOR_MAXLEN];
        unsigned pre_context;
        unsigned post_context;
        unsigned last_shown;
@@ -193,7 +201,6 @@ struct grep_source {
                GREP_SOURCE_OID,
                GREP_SOURCE_FILE,
                GREP_SOURCE_BUF,
-               GREP_SOURCE_SUBMODULE,
        } type;
        void *identifier;