diff options
Diffstat (limited to 'src/pcresearch.c')
-rw-r--r-- | src/pcresearch.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pcresearch.c b/src/pcresearch.c index e77509c4..9e2f393d 100644 --- a/src/pcresearch.c +++ b/src/pcresearch.c @@ -74,6 +74,15 @@ private_free (void *ptr, _GL_UNUSED void *unused) free (ptr); } +void +Pprint_version (void) +{ + char buf[128]; + if (sizeof buf <= pcre2_config (PCRE2_CONFIG_VERSION, buf)) + abort (); + printf (_("\ngrep -P uses PCRE2 %s\n"), buf); +} + /* Match the already-compiled PCRE pattern against the data in SUBJECT, of size SEARCH_BYTES and starting with offset SEARCH_OFFSET, with options OPTIONS. |