aboutsummaryrefslogtreecommitdiffstats
path: root/bin/grepc
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-05-09 00:10:49 +0200
committerAlejandro Colomar <alx@kernel.org>2025-10-29 21:28:47 +0100
commitb8c9b7209e02a135d5e1e102a8ace60a70e45dba (patch)
tree9ecc8338f320404f9f4a5b7734ac2d56835b233c /bin/grepc
parent61a8cb713a76a5cc32315b23e2f41d9e24d98dda (diff)
downloadman-pages-b8c9b7209e02a135d5e1e102a8ace60a70e45dba.tar.gz
grepc: Allow tabs
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Diffstat (limited to 'bin/grepc')
-rwxr-xr-xbin/grepc6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/grepc b/bin/grepc
index a069add268..c03cbf2fd2 100755
--- a/bin/grepc
+++ b/bin/grepc
@@ -147,9 +147,9 @@ function grepc_type_typedef_underlying_struct_union_enum()
{
find . -type f \
| grep '\.[ch]$' \
- | xargs grep -hP "^typedef .* *\b$1;" \
- | sed -E -e 's/^typedef //' -e "s/ *\b$1;.*//" \
- | sed -e 's/^struct //' -e 's/^union //' -e 's/^enum //' \
+ | xargs grep -hP "^typedef\s+.*\b$1;" \
+ | sed -E -e 's/^typedef\s+//' -e "s/\s*\**\b$1;.*//" \
+ | sed -E -e 's/^struct\s+//' -e 's/^union\s+//' -e 's/^enum\s+//' \
| while read t; do
grepc_type_struct_union_enum "$t";
done;