summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-05-15 01:40:56 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-05-15 01:44:22 +0200
commitffbab42883313e6e02d49bf69d7ac2418720c29d (patch)
treef0b5c9adf0ffe874b27b8bd5480b469bca4b9f80 /bin
parent713416cfd9db803698fae5f8fd2649d1e93b46d2 (diff)
grepc, grepc.1: -t...: Allow more granularity
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/grepc67
1 files changed, 66 insertions, 1 deletions
diff --git a/bin/grepc b/bin/grepc
index 098093c..ad4bccd 100755
--- a/bin/grepc
+++ b/bin/grepc
@@ -10,9 +10,18 @@ kflag='no';
tflag='no';
t_enum='no';
t_func='no';
+t_func_proto='no';
+t_func_def='no';
+t_func_syscall='no';
+t_func_syscall_proto='no';
+t_func_syscall_def='no';
t_macro='no';
t_type='no';
t_use='no';
+t_use_enum='yes';
+t_use_func='no';
+t_use_macro='no';
+t_use_type='no';
grepc_usage()
@@ -47,6 +56,21 @@ grepc_parse_cmd()
f)
t_func='yes';
;;
+ fp)
+ t_func_proto='yes';
+ ;;
+ fd)
+ t_func_def='yes';
+ ;;
+ fs)
+ t_func_syscall='yes';
+ ;;
+ fsp)
+ t_func_syscall_proto='yes';
+ ;;
+ fsd)
+ t_func_syscall_def='yes';
+ ;;
m)
t_macro='yes';
;;
@@ -56,6 +80,18 @@ grepc_parse_cmd()
u)
t_use='yes';
;;
+ ue)
+ t_use_enum='yes';
+ ;;
+ uf)
+ t_use_func='yes';
+ ;;
+ um)
+ t_use_macro='yes';
+ ;;
+ ut)
+ t_use_type='yes';
+ ;;
*)
grepc_usage;
exit 1;
@@ -375,13 +411,29 @@ grepc_search()
{
if [ "$tflag" = 'no' ]; then
grepc_search_default "$1";
-
else
if [ "$t_enum" = 'yes' ]; then
grepc_enum_constant "$1";
fi;
if [ "$t_func" = 'yes' ]; then
grepc_func "$1";
+ else
+ 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_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;
fi;
if [ "$t_macro" = 'yes' ]; then
grepc_macro "$1";
@@ -391,6 +443,19 @@ grepc_search()
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;
fi;
fi;
}