]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
grepc: -tt: Find typedefs to function pointers
authorAlejandro Colomar <alx.manpages@gmail.com>
Tue, 17 May 2022 08:59:52 +0000 (10:59 +0200)
committerAlejandro Colomar <alx@kernel.org>
Wed, 29 Oct 2025 20:29:04 +0000 (21:29 +0100)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
bin/grepc

index 8160f0598cdc5004cf21c1d4e40907070116d8ce..d10b3fb38d2af1e5c61e958e47312a36e06ad1a6 100755 (executable)
--- a/bin/grepc
+++ b/bin/grepc
@@ -289,11 +289,21 @@ grepc_type_typedef_underlying_struct_union_enum()
 }
 
 
+grepc_type_typedef_func()
+{
+       grepc_helper \
+         '^[ \t]*typedef\s' \
+         "\(\**$1\)\s*\(" \
+         "(?s)^[ \t]*typedef\s+[^{};]+\(\**$1\)\s*\([^{};]+;";
+}
+
+
 grepc_type_typedef()
 {
        grepc_type_typedef_simple "$1";
        grepc_type_typedef_struct_union_enum "$1";
        grepc_type_typedef_underlying_struct_union_enum "$1";
+       grepc_type_typedef_func "$1";
 }