]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
bin/grepc: srcfix (Remove grepc_patterns())
authorAlejandro Colomar <alx@kernel.org>
Sun, 5 Nov 2023 15:26:02 +0000 (16:26 +0100)
committerAlejandro Colomar <alx@kernel.org>
Wed, 29 Oct 2025 20:29:24 +0000 (21:29 +0100)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
bin/grepc

index d06b0fb6bf52d7f628446a0fec655594197a14e7..469b69de7f995d6d8adcfa1ba4c3a535a943dc8d 100755 (executable)
--- a/bin/grepc
+++ b/bin/grepc
@@ -149,39 +149,38 @@ grepc_ut_td_simple()      { echo '(?s)^[ \t]*typedef\s+[^{};]*'"$1"'[^{};]+;'; }
 grepc_ut_td_su()       { echo '(?s)^[ \t]*typedef\s+(struct|union)\b([\w \t[\]]|::)*\n*([ \t]*){(?:(?!^\3?}|^\s*typedef).)*'"$1"'(?:(?!^\3?}|^\s*typedef).)*^\3}\s*\w+;'; }
 
 
-grepc_patterns()
-{
-       test $t_e = yes                 && grepc_e "$1";
-       test $t_fp = yes                && grepc_fp "$1";
-       test $t_fd = yes                && grepc_fd "$1";
-       test $t_flp = yes               && grepc_flp "$1";
-       test $t_fld = yes               && grepc_fld "$1";
-       test $t_fgp = yes               && grepc_fgp "$1";
-       test $t_fgd_libm = yes          && grepc_fgd_libm "$1";
-       test $t_fgd_libio = yes         && grepc_fgd_libio "$1";
-       test $t_mf = yes                && grepc_mf "$1";
-       test $t_mo = yes                && grepc_mo "$1";
-       test $t_t_braced = yes          && grepc_t_braced "$1";
-       test $t_t_td_simple = yes       && grepc_t_td_simple "$1";
-       test $t_t_td_braced = yes       && grepc_t_td_braced "$1";
-       test $t_t_td_func = yes         && grepc_t_td_func "$1";
-       test $t_ue = yes                && grepc_ue "$1";
-       test $t_uf_def = yes            && grepc_uf_def "$1";
-       test $t_uf_linux_def = yes      && grepc_uf_linux_def "$1";
-       test $t_um = yes                && grepc_um "$1";
-       test $t_ut_su = yes             && grepc_ut_su "$1";
-       test $t_ut_td_simple = yes      && grepc_ut_td_simple "$1";
-       test $t_ut_td_su = yes          && grepc_ut_td_su "$1";
-}
+patterns="$(mktemp -t grepc.patterns.XXXXXX)";
+
+
+(
+       test $t_e = yes                 && grepc_e "$identifier";
+       test $t_fp = yes                && grepc_fp "$identifier";
+       test $t_fd = yes                && grepc_fd "$identifier";
+       test $t_flp = yes               && grepc_flp "$identifier";
+       test $t_fld = yes               && grepc_fld "$identifier";
+       test $t_fgp = yes               && grepc_fgp "$identifier";
+       test $t_fgd_libm = yes          && grepc_fgd_libm "$identifier";
+       test $t_fgd_libio = yes         && grepc_fgd_libio "$identifier";
+       test $t_mf = yes                && grepc_mf "$identifier";
+       test $t_mo = yes                && grepc_mo "$identifier";
+       test $t_t_braced = yes          && grepc_t_braced "$identifier";
+       test $t_t_td_simple = yes       && grepc_t_td_simple "$identifier";
+       test $t_t_td_braced = yes       && grepc_t_td_braced "$identifier";
+       test $t_t_td_func = yes         && grepc_t_td_func "$identifier";
+       test $t_ue = yes                && grepc_ue "$identifier";
+       test $t_uf_def = yes            && grepc_uf_def "$identifier";
+       test $t_uf_linux_def = yes      && grepc_uf_linux_def "$identifier";
+       test $t_um = yes                && grepc_um "$identifier";
+       test $t_ut_su = yes             && grepc_ut_su "$identifier";
+       test $t_ut_td_simple = yes      && grepc_ut_td_simple "$identifier";
+       test $t_ut_td_su = yes          && grepc_ut_td_su "$identifier";
+) >"$patterns";
 
 
 grepc_search()
 {
-       local patterns="$(mktemp -t grepc.patterns.XXXXXX)";
        local opts='';
 
-       grepc_patterns "$identifier" >"$patterns";
-
        opts="$opts $A";
        opts="$opts $B";
        opts="$opts $C";