X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=grep.c;h=062b2b6f28f6332518240d2a474a7739735e1ecf;hb=4c58a7111d9fb4f62ca041fc73e8aec0a2f9c800;hp=f9a45258aa0485df6f6205aa8121bdad07a480b0;hpb=8cc32992624ed4140fb136d98675f0f19b20ba09;p=git.git diff --git a/grep.c b/grep.c index f9a45258a..062b2b6f2 100644 --- a/grep.c +++ b/grep.c @@ -28,16 +28,9 @@ void append_grep_pattern(struct grep_opt *opt, const char *pat, p->next = NULL; } -static int isregexspecial(int c) -{ - return c == '\0' || is_glob_special(c) || - c == '$' || c == '(' || c == ')' || c == '+' || - c == '.' || c == '^' || c == '{' || c == '|'; -} - static int is_fixed(const char *s) { - while (!isregexspecial(*s)) + while (*s && !is_regex_special(*s)) s++; return !*s; }