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

index 294fe7f65e39c04fb2ec58e9bd801811ad843d75..2ab0abb79d2ef60cf5ca0cf9cc4416f55cc40327 100755 (executable)
--- a/bin/grepc
+++ b/bin/grepc
@@ -18,7 +18,6 @@ t_func_glibc_proto='no';
 t_func_glibc_def='no';
 t_macro='no';
 t_type='no';
-t_use='no';
 t_use_enum='no';
 t_use_func='no';
 t_use_macro='no';
@@ -101,7 +100,10 @@ grepc_parse_cmd()
                                t_type='yes';
                                ;;
                        u)
-                               t_use='yes';
+                               t_use_enum='yes';
+                               t_use_func='yes';
+                               t_use_macro='yes';
+                               t_use_type='yes';
                                ;;
                        ue)
                                t_use_enum='yes';
@@ -444,15 +446,6 @@ grepc_use_type()
 }
 
 
-grepc_use()
-{
-       grepc_use_enum "$1";
-       grepc_use_func "$1";
-       grepc_use_macro "$1";
-       grepc_use_type "$1";
-}
-
-
 grepc_search()
 {
        if [ "$t_enum" = 'yes' ]; then
@@ -482,21 +475,17 @@ grepc_search()
        if [ "$t_type" = 'yes' ]; then
                grepc_type "$1";
        fi;
-       if [ "$t_use" = 'yes' ]; then
-               grepc_use "$1";
-       else
-               if [ "$t_use_enum" = 'yes' ]; then
-                       grepc_use_enum "$1";
-               fi;
-               if [ "$t_use_func" = 'yes' ]; then
-                       grepc_use_func "$1";
-               fi;
-               if [ "$t_use_macro" = 'yes' ]; then
-                       grepc_use_macro "$1";
-               fi;
-               if [ "$t_use_type" = 'yes' ]; then
-                       grepc_use_type "$1";
-               fi;
+       if [ "$t_use_enum" = 'yes' ]; then
+               grepc_use_enum "$1";
+       fi;
+       if [ "$t_use_func" = 'yes' ]; then
+               grepc_use_func "$1";
+       fi;
+       if [ "$t_use_macro" = 'yes' ]; then
+               grepc_use_macro "$1";
+       fi;
+       if [ "$t_use_type" = 'yes' ]; then
+               grepc_use_type "$1";
        fi;
 }