]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
grepc: Don't search underlying structure of a typedef
authorAlejandro Colomar <alx.manpages@gmail.com>
Wed, 25 May 2022 13:46:26 +0000 (15:46 +0200)
committerAlejandro Colomar <alx@kernel.org>
Wed, 29 Oct 2025 20:29:07 +0000 (21:29 +0100)
In some cases it might be nice, but in some other cases, it might
cause a lot of code to be printed.  Let the user explicitly search
for it or not in a separate run.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
bin/grepc

index 0781f5eb62e2b3eed26ad7446dd58004ef028ada..0517313cbf560260d9badd34c2eacefae9d09b46 100755 (executable)
--- a/bin/grepc
+++ b/bin/grepc
@@ -287,19 +287,6 @@ grepc_type_typedef_struct_union_enum()
 }
 
 
-grepc_type_typedef_underlying_struct_union_enum()
-{
-       xargs grep -${iflag}hP '^[ \t]*typedef\s+(struct|union|enum)\s+.*\b'"$1;" <"$files" \
-       | sed -E -e 's/^[ \t]*typedef\s+//' -e "s/\s*\**\b$1;.*//${iflag}" \
-       | sed -E -e 's/^struct\s+//' -e 's/^union\s+//' -e 's/^enum\s+//' \
-       | while read -r t; do
-               test "$1" != "$t" \
-               && grepc_find_files "$t" \
-               | grepc_type_struct_union_enum "$t";
-       done;
-}
-
-
 grepc_type_typedef_func()
 {
        grepc_helper \
@@ -314,7 +301,6 @@ 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";
 }