]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
grepc: grepc_func_decl: Optimize
authorAlejandro Colomar <alx.manpages@gmail.com>
Sun, 8 May 2022 22:46:56 +0000 (00:46 +0200)
committerAlejandro Colomar <alx@kernel.org>
Wed, 29 Oct 2025 20:28:49 +0000 (21:28 +0100)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
bin/grepc

index cb45ac667fbde79e9dee04aff6840fbc0b906b4a..50b94dd66abce5518601d3d7b86b0f7e207054b8 100755 (executable)
--- a/bin/grepc
+++ b/bin/grepc
@@ -52,7 +52,7 @@ function grepc_func_decl()
 {
        find . -type f \
        | grep '\.[ch]$' \
-       | xargs grep -lP "\b$1\b" \
+       | xargs grep -lP "\b$1\s*\(" \
        | sort \
        | xargs pcregrep -Mn \
          "(?s)^[\w[][\w\s(,)[:\]*]+\s+\**$1\s*\([\w\s(,)[\]*]+?(...)?\)[\w\s(,)[:\]]*;" /dev/null \