21 struct grep_pat
*next
;
24 enum grep_pat_token token
;
37 enum grep_expr_node node
;
39 struct grep_pat
*atom
;
40 struct grep_expr
*unary
;
42 struct grep_expr
*left
;
43 struct grep_expr
*right
;
49 struct grep_pat
*pattern_list
;
50 struct grep_pat
**pattern_tail
;
51 struct grep_expr
*pattern_expression
;
56 unsigned status_only
:1;
58 unsigned unmatch_name_only
:1;
60 unsigned word_regexp
:1;
62 #define GREP_BINARY_DEFAULT 0
63 #define GREP_BINARY_NOMATCH 1
64 #define GREP_BINARY_TEXT 2
71 unsigned post_context
;
74 extern void append_grep_pattern(struct grep_opt
*opt
, const char *pat
, const char *origin
, int no
, enum grep_pat_token t
);
75 extern void compile_grep_patterns(struct grep_opt
*opt
);
76 extern void free_grep_patterns(struct grep_opt
*opt
);
77 extern int grep_buffer(struct grep_opt
*opt
, const char *name
, char *buf
, unsigned long size
);