| 314 | |
| 315 | |
| 316 | static const char *min_expand (MatchState *ms, const char *s, |
| 317 | const char *p, const char *ep) { |
| 318 | for (;;) { |
| 319 | const char *res = match(ms, s, ep+1); |
| 320 | if (res != NULL) |
| 321 | return res; |
| 322 | else if (s<ms->src_end && singlematch(uchar(*s), p, ep)) |
| 323 | s++; /* try with one more repetition */ |
| 324 | else return NULL; |
| 325 | } |
| 326 | } |
| 327 | |
| 328 | |
| 329 | static const char *start_capture (MatchState *ms, const char *s, |
no test coverage detected