aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-05-09 13:38:43 +0200
committerAlejandro Colomar <alx@kernel.org>2025-10-29 21:28:50 +0100
commit34069b77540f3a765417e3acbc7798066b4a1539 (patch)
treed231962aa770426306dfaf8ac44179b218026428
parent0f75cadf00aa9a70a4a5178e4b50a4e7546cc3f1 (diff)
downloadman-pages-34069b77540f3a765417e3acbc7798066b4a1539.tar.gz
grepc: grepc_type_struct_union_enum: Don't duplicate output
In definitions of the form typedef struct foo {...} foo; grepc_type_typedef_struct_union_enum() is already finding it. Remove the duplicate here. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rwxr-xr-xbin/grepc2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/grepc b/bin/grepc
index 4d6c430fd2..1f7c3076bd 100755
--- a/bin/grepc
+++ b/bin/grepc
@@ -111,7 +111,7 @@ function grepc_type_struct_union_enum()
{
grepc_helper '\.[ch]$' \
"\b(struct|union|enum)\s+$1\b" \
- "(?s)^([\w[][\w\s(,)[:\]*]+\s+)?\b(struct|union|enum)\s+$1\b\s*[\w\s[\]]*{.*?^}.*?;";
+ "(?s)^(?!^typedef\b)([\w[][\w\s(,)[:\]*]+\s+)?\b(struct|union|enum)\s+$1\b\s*[\w\s[\]]*{.*?^}.*?;";
}