summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-08-17 10:11:15 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-08-17 10:11:15 +0200
commitf805aa763fad3156428866a02de95ba9b67079a7 (patch)
tree9e8705b335eec76803f2e35eb385f2c613041c67
parentf5f221d1338d424dbbf44db8aa41b88bbd6a8eb6 (diff)
grepc, grepc.1: -tg, -tgp, -tgd: Add more support for glibc internal names of libc functions
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rwxr-xr-xbin/grepc52
-rw-r--r--share/man/man1/grepc.112
2 files changed, 62 insertions, 2 deletions
diff --git a/bin/grepc b/bin/grepc
index e42b158..df15953 100755
--- a/bin/grepc
+++ b/bin/grepc
@@ -16,6 +16,9 @@ t_func_def='no';
t_func_syscall='no';
t_func_syscall_proto='no';
t_func_syscall_def='no';
+t_func_glibc='no';
+t_func_glibc_proto='no';
+t_func_glibc_def='no';
t_macro='no';
t_type='no';
t_use='no';
@@ -78,6 +81,15 @@ grepc_parse_cmd()
fsd)
t_func_syscall_def='yes';
;;
+ fg)
+ t_func_glibc='yes';
+ ;;
+ fgp)
+ t_func_glibc_proto='yes';
+ ;;
+ fgd)
+ t_func_glibc_def='yes';
+ ;;
m)
t_macro='yes';
;;
@@ -207,15 +219,41 @@ grepc_func_def()
}
-grepc_glibc_func_math()
+grepc_glibc_func_libm_def()
{
grepc_func_def "M_DECL_FUNC \(__$1\)";
}
+grepc_glibc_func_libio_proto()
+{
+ grepc_func_proto "_IO_$1";
+}
+
+
+grepc_glibc_func_libio_def()
+{
+ grepc_func_def "_IO_$1";
+}
+
+
+grepc_glibc_func_proto()
+{
+ grepc_glibc_func_libio_proto "$1";
+}
+
+
+grepc_glibc_func_def()
+{
+ grepc_glibc_func_libm_def "$1";
+ grepc_glibc_func_libio_def "$1";
+}
+
+
grepc_glibc_func()
{
- grepc_glibc_func_math "$1";
+ grepc_glibc_func_proto "$1";
+ grepc_glibc_func_def "$1";
}
@@ -458,6 +496,16 @@ grepc_search()
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_def" = 'yes' ]; then
+ grepc_glibc_func_def "$1";
+ fi;
+ fi;
fi;
if [ "$t_macro" = 'yes' ]; then
grepc_macro "$1";
diff --git a/share/man/man1/grepc.1 b/share/man/man1/grepc.1
index aa69c7b..2f7e3b1 100644
--- a/share/man/man1/grepc.1
+++ b/share/man/man1/grepc.1
@@ -64,6 +64,18 @@ Linux kernel system call prototypes.
.B fsd
Linux kernel system call definitions.
.RE
+.TP
+.B fg
+Glibc internal names of libc functions.
+This can be further subdivided into:
+.RS
+.TP
+.B fgp
+Glibc prototypes.
+.TP
+.B fgd
+Glibc definitions.
+.RE
.RE
.TP
.B m