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()
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';
;;
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;
{
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";
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;
}
.TP
.B f
Function prototypes and definitions.
+This can be further subdivided into:
+.RS
+.TP
+.B fp
+Function prototypes.
+.TP
+.B fd
+Function definitions.
+.TP
+.B fs
+Linux kernel system calls.
+This can be further subdivided into:
+.RS
+.TP
+.B fsp
+Linux kernel system call prototypes.
+.TP
+.B fsd
+Linux kernel system call definitions.
+.RE
+.RE
.TP
.B m
Macro definitions.
Uses.
Searches occurences of
.BI \eb identifier \eb
-within enums (except as an enum constant),
+within enums,
function bodies,
macro replacements,
and type definitions,
and prints the whole enum, function, macro, and/or type definitions.
+.IP
+This can be further subdivided into:
+.RS
+.TP
+.B ue
+Uses within enum definitions (except as an enum constant).
+.TP
+.B uf
+Uses within function definition bodies.
+.TP
+.B um
+Uses within macro replacements.
+.TP
+.B ut
+Uses within type definitions
+(except enum; that is: typedef, struct, or union).
+.RE
.SH OPTIONS
.TP
.B \-g