From: Alejandro Colomar Date: Wed, 5 Nov 2025 14:44:02 +0000 (+0100) Subject: src/bin/grepc_c: -tuf: Reuse grepc_c_fld_decl_() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5c35f7174418253a8decfd84917392d1362d87a1;p=thirdparty%2Fman-pages.git src/bin/grepc_c: -tuf: Reuse grepc_c_fld_decl_() Signed-off-by: Alejandro Colomar --- diff --git a/src/bin/grepc_c b/src/bin/grepc_c index 09d0c6fe6..c6b51421d 100755 --- a/src/bin/grepc_c +++ b/src/bin/grepc_c @@ -136,7 +136,8 @@ 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_def() { grepc_c_f_decl_ '\w+'; echo '[ \t]*\n*(?[ \t]*){(?:(?!^\k?}).)*'"$1"'.*?^\k}'; } -grepc_c_uf_linux_def() { echo '(?s)^(COMPAT_)?SYSCALL_DEFINE.\(\w+\b(?:(?!^}).)*'"$1"'.?^}'; } +grepc_c_uf_linux_def() { grepc_c_fld_decl_ '\w+'; + 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"'[^{};]+;'; }