summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-05-17 10:59:52 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-05-17 10:59:52 +0200
commita8b5b9c41df1d4c2aafd836892f1373915e46cbc (patch)
tree015c9ac6699ee60f85777118f93dfd465ec48cbd
parentd415ef6f0573dae0515503a40952a7e29780b5cc (diff)
grepc: -tt: Find typedefs to function pointers
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rwxr-xr-xbin/grepc10
1 files changed, 10 insertions, 0 deletions
diff --git a/bin/grepc b/bin/grepc
index 8160f05..d10b3fb 100755
--- 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";
}