| 14018 | |
| 14019 | |
| 14020 | static const char *end_capture (MatchState *ms, const char *s, |
| 14021 | const char *p) { |
| 14022 | int l = capture_to_close(ms); |
| 14023 | const char *res; |
| 14024 | ms->capture[l].len = s - ms->capture[l].init; /* close capture */ |
| 14025 | if ((res = match(ms, s, p)) == NULL) /* match failed? */ |
| 14026 | ms->capture[l].len = CAP_UNFINISHED; /* undo capture */ |
| 14027 | return res; |
| 14028 | } |
| 14029 | |
| 14030 | |
| 14031 | static const char *match_capture (MatchState *ms, const char *s, int l) { |
no test coverage detected