author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Sat, 7 Mar 2009 12:30:27 +0000 (13:30 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 7 Mar 2009 19:34:57 +0000 (11:34 -0800) | ||
commit | 79212772ce127cc32a67d50eaaa7f1c102ce7d5d | |
tree | 076afff7009a549e52ada28fff24b2c4776b820e | tree | snapshot |
parent | d7eb527d731e2a71eaa4597417d879a15588d9ee | commit | diff |
grep: add pmatch and eflags arguments to match_one_pattern()
Push pmatch and eflags to the callers of match_one_pattern(), which
allows them to specify regex execution flags and to get the location
of a match.
Since we only use the first element of the matches array and aren't
interested in submatches, no provision is made for callers to
provide a larger array.
eflags are ignored for fixed patterns, but that's OK, since they
only have a meaning in connection with regular expressions
containing ^ or $.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Push pmatch and eflags to the callers of match_one_pattern(), which
allows them to specify regex execution flags and to get the location
of a match.
Since we only use the first element of the matches array and aren't
interested in submatches, no provision is made for callers to
provide a larger array.
eflags are ignored for fixed patterns, but that's OK, since they
only have a meaning in connection with regular expressions
containing ^ or $.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
grep.c | diff | blob | history |