]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
src/bin/grepc_c: -tuf: Reuse grepc_c_uf_body_()
authorAlejandro Colomar <alx@kernel.org>
Wed, 5 Nov 2025 15:29:03 +0000 (16:29 +0100)
committerAlejandro Colomar <alx@kernel.org>
Thu, 6 Nov 2025 00:43:06 +0000 (01:43 +0100)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/bin/grepc_c

index 7220e08cfcf2a2652f0ff27ff43103fa7f9f4bb9..48a7b69b1d53c83f78be632cf8de388beeee73b2 100755 (executable)
@@ -139,7 +139,8 @@ grepc_c_uf_def()        { grepc_c_f_decl_ '\w+';
                           grepc_c_uf_body_ "$1";
                           echo; }
 grepc_c_uf_linux_def()  { grepc_c_fld_decl_ '\w+';
-                          echo '(?:(?!^}).)*'"$1"'.*?^}'; }
+                          grepc_c_uf_body_ "$1";
+                          echo; }
 grepc_c_um()            { echo '(?s)^[ \t]*#\s*define\s[\s\\]*\w+\b(\([^\)]*\))?(?:(?![^\\]$).)*'"$1"'.*?[^\\]$'; }
 grepc_c_ut_su()         { echo '(?s)^(?!^[ \t]*typedef\b)([\w[]([\w\s\(,\)[\]*]|::)*[\w\s\)*\]]\s+)?\b(struct|union)\b([\w \t[\]]|::)*\w+[ \t]*\n*([ \t]*){(?:(?!^\5?}).)*?'"$1"'.*?^\5}.*?;'; }
 grepc_c_ut_td_simple()  { echo '(?s)^[ \t]*typedef\s+[^{};]*'"$1"'[^{};]+;'; }