From 9dd9ee02e2178b5ccbb01d1da722fd7bb4a515f9 Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Wed, 5 Nov 2025 15:40:05 +0100 Subject: [PATCH] src/bin/grepc_c: -tfld: Split regex This will be reused for -tuf. I copied '[\w\s,;[\]*\?:+-]*\)' from grepc_c_f_params_(). Signed-off-by: Alejandro Colomar --- src/bin/grepc_c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/bin/grepc_c b/src/bin/grepc_c index 42f2f1c4e..09d0c6fe6 100755 --- a/src/bin/grepc_c +++ b/src/bin/grepc_c @@ -123,7 +123,10 @@ grepc_c_fgd_libio() { grepc_c_fd "_IO_$1"; } grepc_c_fgp_libio() { grepc_c_fp "_IO_$1"; } grepc_c_fgp() { grepc_c_fgp_libio "$1"; } grepc_c_flp() { grepc_c_fp "(?:compat_)?sys_$1"; } -grepc_c_fld() { echo '(?s)^(COMPAT_)?SYSCALL_DEFINE.\('"$1"'\b.*?^}'; } +grepc_c_fld_decl_() { printf '%s' '(?s)^(COMPAT_)?SYSCALL_DEFINE.\('"$1"'\b[\w\s,;[\]*\?:+-]*\)'; } +grepc_c_fld() { grepc_c_fld_decl_ "$1"; + grepc_c_f_body_; + echo; } grepc_c_mf() { echo '(?s)^[ \t]*#\s*define\s[\s\\]*'"$1"'\(.*?[^\\]$'; } grepc_c_mo() { echo '(?s)^[ \t]*#\s*define\s[\s\\]*'"$1"'\b(?!\().*?(?