From: Alejandro Colomar Date: Wed, 5 Nov 2025 14:40:05 +0000 (+0100) Subject: src/bin/grepc_c: -tfld: Split regex X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9dd9ee02e2178b5ccbb01d1da722fd7bb4a515f9;p=thirdparty%2Fman-pages.git 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 --- 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(?!\().*?(?