]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
grepc: -tut: Fix regex for braces in the same line as 'struct'
authorAlejandro Colomar <alx.manpages@gmail.com>
Wed, 25 May 2022 21:03:12 +0000 (23:03 +0200)
committerAlejandro Colomar <alx@kernel.org>
Wed, 29 Oct 2025 20:29:08 +0000 (21:29 +0100)
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
bin/grepc

index 5a278cca28bb0068d0dcf152d4473b93372c9722..6c24765d4622b509370a3eb943fae1cd9a2a76b2 100755 (executable)
--- a/bin/grepc
+++ b/bin/grepc
@@ -357,7 +357,7 @@ grepc_use_type_struct_union()
        grepc_helper \
          "\b(struct|union)\b" \
          "\b$1\b" \
-         '(?s)^(?!^[ \t]*typedef\b)([\w[]([\w\s\(,\)[\]*]|::)*[\w\s\)*\]]\s+)?\b(struct|union)\b([\w \t[\]]|::)*\w+\n*([ \t]*){(?:(?!^\5?}).)*?'"$1"'.*?^\5}.*?;';
+         '(?s)^(?!^[ \t]*typedef\b)([\w[]([\w\s\(,\)[\]*]|::)*[\w\s\)*\]]\s+)?\b(struct|union)\b([\w \t[\]]|::)*\w+[ \t]*\n*([ \t]*){(?:(?!^\5?}).)*?'"$1"'.*?^\5}.*?;';
 }