summaryrefslogtreecommitdiff
path: root/grep.h
diff options
context:
space:
mode:
Diffstat (limited to 'grep.h')
-rw-r--r--grep.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/grep.h b/grep.h
index 399381c..0ba62a1 100644
--- a/grep.h
+++ b/grep.h
@@ -62,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;
@@ -127,6 +140,7 @@ struct grep_opt {
int prefix_length;
regex_t regexp;
int linenum;
+ int columnnum;
int invert;
int ignore_case;
int status_only;
@@ -149,20 +163,14 @@ struct grep_opt {
int relative;
int pathname;
int null_following_name;
+ int only_matching;
int color;
int max_depth;
int funcname;
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;