diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-01-21 16:51:03 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-21 16:51:03 -0800 |
commit | d9fde065bd808fbbad3b53e10e160c8f8193b577 (patch) | |
tree | aeae85b30e694dd7d23a7eb120a499055f147038 /grep.c | |
parent | 1afcde6da1221bdb85a3630d995f9ca384042cb9 (diff) | |
parent | f9b7cce61cbd19c99e89b859b5909f0741111185 (diff) | |
download | git-d9fde065bd808fbbad3b53e10e160c8f8193b577.tar.gz |
Merge branch 'rs/ctype'
* rs/ctype:
Add is_regex_special()
Change NUL char handling of isspecial()
Reformat ctype.c
Add ctype test
Conflicts:
Makefile
Diffstat (limited to 'grep.c')
-rw-r--r-- | grep.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -28,15 +28,9 @@ void append_grep_pattern(struct grep_opt *opt, const char *pat, p->next = NULL; } -static int isregexspecial(int c) -{ - return isspecial(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; } |