]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
src/bin/grepc_c: -tuf: Fix regex
authorAlejandro Colomar <alx@kernel.org>
Wed, 5 Nov 2025 15:07:30 +0000 (16:07 +0100)
committerAlejandro Colomar <alx@kernel.org>
Thu, 6 Nov 2025 00:43:05 +0000 (01:43 +0100)
Fixes: 91c6563acf5e (2025-10-29; "grepc, grepc.1: Add -tu to search for uses")
Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/bin/grepc_c

index c6b51421d65bf56bb8a4fd81de2a0398a877b020..551055de2e3250071e8a3f3cbce8af75e6adafa5 100755 (executable)
@@ -137,7 +137,7 @@ grepc_c_ue()            { echo '(?s)^([\w[]+[\w\s]*)?\benum\b([\w \t[\]]|::)*\n*
 grepc_c_uf_def()        { grepc_c_f_decl_ '\w+';
                           echo '[ \t]*\n*(?<space>[ \t]*){(?:(?!^\k<space>?}).)*'"$1"'.*?^\k<space>}'; }
 grepc_c_uf_linux_def()  { grepc_c_fld_decl_ '\w+';
-                          echo '(?:(?!^}).)*'"$1"'.?^}'; }
+                          echo '(?:(?!^}).)*'"$1"'.*?^}'; }
 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"'[^{};]+;'; }