]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
bin/grepc: Simplify (remove grepc_func())
authorAlejandro Colomar <alx@kernel.org>
Thu, 2 Nov 2023 17:02:39 +0000 (18:02 +0100)
committerAlejandro Colomar <alx@kernel.org>
Wed, 29 Oct 2025 20:29:11 +0000 (21:29 +0100)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
bin/grepc

index 2820b29cd58b4923058c9f82f7440abf3288771f..876fd37ba614b22af721a09d2f627c397213e762 100755 (executable)
--- a/bin/grepc
+++ b/bin/grepc
@@ -10,7 +10,6 @@ lflag='';
 kflag='no';
 tflag='no';
 t_enum='no';
-t_func='no';
 t_func_proto='no';
 t_func_def='no';
 t_func_syscall='no';
@@ -64,7 +63,10 @@ grepc_parse_cmd()
                                t_enum='yes';
                                ;;
                        f)
-                               t_func='yes';
+                               t_func_proto='yes';
+                               t_func_def='yes';
+                               t_func_syscall='yes';
+                               t_func_glibc='yes';
                                ;;
                        fp)
                                t_func_proto='yes';
@@ -142,7 +144,10 @@ grepc_parse_cmd()
 
        if [ "$tflag" = 'no' ]; then
                t_enum='yes';
-               t_func='yes';
+               t_func_proto='yes';
+               t_func_def='yes';
+               t_func_syscall='yes';
+               t_func_glibc='yes';
                t_macro='yes';
                t_type='yes';
        fi;
@@ -289,15 +294,6 @@ grepc_linux_func()
 }
 
 
-grepc_func()
-{
-       grepc_func_proto "$1";
-       grepc_func_def "$1";
-       grepc_glibc_func "$1";
-       grepc_linux_func "$1";
-}
-
-
 grepc_macro_func()
 {
        grepc_helper \
@@ -472,34 +468,30 @@ grepc_search()
        if [ "$t_enum" = 'yes' ]; then
                grepc_enum_constant "$1";
        fi;
-       if [ "$t_func" = 'yes' ]; then
-               grepc_func "$1";
+       if [ "$t_func_proto" = 'yes' ]; then
+               grepc_func_proto "$1";
+       fi;
+       if [ "$t_func_def" = 'yes' ]; then
+               grepc_func_def "$1";
+       fi;
+       if [ "$t_func_syscall" = 'yes' ]; then
+               grepc_linux_func "$1";
        else
-               if [ "$t_func_proto" = 'yes' ]; then
-                       grepc_func_proto "$1";
+               if [ "$t_func_syscall_proto" = 'yes' ]; then
+                       grepc_linux_func_syscall_proto "$1";
                fi;
-               if [ "$t_func_def" = 'yes' ]; then
-                       grepc_func_def "$1";
+               if [ "$t_func_syscall_def" = 'yes' ]; then
+                       grepc_linux_func_syscall_def "$1";
                fi;
-               if [ "$t_func_syscall" = 'yes' ]; then
-                       grepc_linux_func "$1";
-               else
-                       if [ "$t_func_syscall_proto" = 'yes' ]; then
-                               grepc_linux_func_syscall_proto "$1";
-                       fi;
-                       if [ "$t_func_syscall_def" = 'yes' ]; then
-                               grepc_linux_func_syscall_def "$1";
-                       fi;
+       fi;
+       if [ "$t_func_glibc" = 'yes' ]; then
+               grepc_glibc_func "$1";
+       else
+               if [ "$t_func_glibc_proto" = 'yes' ]; then
+                       grepc_glibc_func_proto "$1";
                fi;
-               if [ "$t_func_glibc" = 'yes' ]; then
-                       grepc_glibc_func "$1";
-               else
-                       if [ "$t_func_glibc_proto" = 'yes' ]; then
-                               grepc_glibc_func_proto "$1";
-                       fi;
-                       if [ "$t_func_glibc_def" = 'yes' ]; then
-                               grepc_glibc_func_def "$1";
-                       fi;
+               if [ "$t_func_glibc_def" = 'yes' ]; then
+                       grepc_glibc_func_def "$1";
                fi;
        fi;
        if [ "$t_macro" = 'yes' ]; then