Commit 7921277
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>1 parent d7eb527 commit 7921277
1 file changed
+10
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
| 313 | + | |
313 | 314 | | |
314 | 315 | | |
315 | 316 | | |
316 | | - | |
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
335 | | - | |
336 | | - | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
| 335 | + | |
341 | 336 | | |
342 | | - | |
| 337 | + | |
| 338 | + | |
343 | 339 | | |
344 | 340 | | |
345 | 341 | | |
| |||
385 | 381 | | |
386 | 382 | | |
387 | 383 | | |
| 384 | + | |
388 | 385 | | |
389 | 386 | | |
390 | 387 | | |
391 | | - | |
| 388 | + | |
392 | 389 | | |
393 | 390 | | |
394 | 391 | | |
| |||
427 | 424 | | |
428 | 425 | | |
429 | 426 | | |
| 427 | + | |
| 428 | + | |
430 | 429 | | |
431 | 430 | | |
432 | 431 | | |
433 | 432 | | |
434 | 433 | | |
435 | | - | |
| 434 | + | |
436 | 435 | | |
437 | 436 | | |
438 | 437 | | |
| |||
0 commit comments