diff options
| author | Alejandro Colomar <alx@kernel.org> | 2025-11-05 16:33:09 +0100 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2025-11-06 01:43:06 +0100 |
| commit | 1ccb5413367b32e64e30907059b9c561b24898d9 (patch) | |
| tree | b7a0ec5c922c1e0b0ba619941e3efb20268fdc21 | |
| parent | 5f42d2a27233f80043f3cf5a1898ea0841a8d3d0 (diff) | |
| download | man-pages-1ccb5413367b32e64e30907059b9c561b24898d9.tar.gz | |
src/bin/grepc_c: Use grepc_c_uf_body_() to replace grepc_c_f_body_()
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| -rwxr-xr-x | src/bin/grepc_c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/bin/grepc_c b/src/bin/grepc_c index 48a7b69b1d..2ee4d818e1 100755 --- a/src/bin/grepc_c +++ b/src/bin/grepc_c @@ -112,11 +112,11 @@ grepc_c_f_params_() { printf '%s' '\s*(?<params>\((?:[\w\s,;[\]*\?:+-]|(?&pa grepc_c_f_decl_() { grepc_c_f_return_; printf '%s' '\(?'"$1"'\)?'; grepc_c_f_params_; } -grepc_c_f_body_() { printf '%s' '[ \t]*\n(?<space>[ \t]*){.*?^\k<space>}'; } +grepc_c_uf_body_() { printf '%s' '[ \t]*\n*(?<space>[ \t]*){(?:(?!^\k<space>?}).)*'"$1"'.*?^\k<space>}'; } grepc_c_fp() { grepc_c_f_decl_ "$1"; echo '(?:[\w\s\(,\)[\]]|::)*;'; } grepc_c_fd() { grepc_c_f_decl_ "$1"; - grepc_c_f_body_; + grepc_c_uf_body_ ''; echo; } grepc_c_fgd_libm() { grepc_c_fd "M_DECL_FUNC \(__$1\)"; } grepc_c_fgd_libio() { grepc_c_fd "_IO_$1"; } @@ -125,7 +125,7 @@ grepc_c_fgp() { grepc_c_fgp_libio "$1"; } grepc_c_flp() { grepc_c_fp "(?:compat_)?sys_$1"; } 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_; + grepc_c_uf_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(?!\().*?(?<!\\)$'; } @@ -134,7 +134,6 @@ grepc_c_t_td_simple() { echo '(?s)^[ \t]*typedef\s+[^{};]+\b'"$1"';'; } grepc_c_t_td_braced() { echo '(?s)^[ \t]*typedef\s+(struct|union|enum)\b(?:(?!\W'"$1"'\W)([\w \t[\]]|::))*\n*([ \t]*){(?:(?!^\3?}).)*?^\3}\s*'"$1"'(\[[\w\(,\)]\])*;'; } grepc_c_t_td_func() { echo '(?s)^[ \t]*typedef\s+[^{};]+\(\**'"$1"'\)\s*\([^{};]+;'; } grepc_c_ue() { echo '(?s)^([\w[]+[\w\s]*)?\benum\b([\w \t[\]]|::)*\n*([ \t]*){[^}]*^\s*\w+[\w\s[\]=]*'"$1"'.*?^\3}.*?;'; } -grepc_c_uf_body_() { printf '%s' '[ \t]*\n*(?<space>[ \t]*){(?:(?!^\k<space>?}).)*'"$1"'.*?^\k<space>}'; } grepc_c_uf_def() { grepc_c_f_decl_ '\w+'; grepc_c_uf_body_ "$1"; echo; } |
