14 struct grep_pat
*next
;
17 enum grep_pat_token token
;
30 enum grep_expr_node node
;
32 struct grep_pat
*atom
;
33 struct grep_expr
*unary
;
35 struct grep_expr
*left
;
36 struct grep_expr
*right
;
42 struct grep_pat
*pattern_list
;
43 struct grep_pat
**pattern_tail
;
44 struct grep_expr
*pattern_expression
;
49 unsigned status_only
:1;
51 unsigned unmatch_name_only
:1;
53 unsigned word_regexp
:1;
55 #define GREP_BINARY_DEFAULT 0
56 #define GREP_BINARY_NOMATCH 1
57 #define GREP_BINARY_TEXT 2
64 unsigned post_context
;
67 extern void append_grep_pattern(struct grep_opt
*opt
, const char *pat
, const char *origin
, int no
, enum grep_pat_token t
);
68 extern void compile_grep_patterns(struct grep_opt
*opt
);
69 extern int grep_buffer(struct grep_opt
*opt
, const char *name
, char *buf
, unsigned long size
);