summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-05-15 01:24:46 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-05-15 01:30:14 +0200
commitd80dc0495921bea4b6587ed075f56311b03f56dd (patch)
tree532a0e748eef4ee59056ff046f11036fa19af1c4
parent9450b556e1bd3da2d9073a970d6f44ccf0b33d36 (diff)
grepc, grepc.1: wfix
Rename functions to have different starting letters. Also rename the macro functions to more closely match ISO C nomenclature. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rwxr-xr-xbin/grepc22
-rw-r--r--share/man/man1/grepc.12
2 files changed, 12 insertions, 12 deletions
diff --git a/bin/grepc b/bin/grepc
index 32b1dd3..098093c 100755
--- a/bin/grepc
+++ b/bin/grepc
@@ -125,7 +125,7 @@ grepc_enum_constant()
}
-grepc_func_decl()
+grepc_func_proto()
{
grepc_helper \
"\b$1\s*\(" \
@@ -155,7 +155,7 @@ grepc_glibc_func()
}
-grepc_linux_func_syscall_decl()
+grepc_linux_func_syscall_proto()
{
grepc_helper \
"^asmlinkage\s+[\w\s]+\**sys_$1\s*\(" \
@@ -175,42 +175,42 @@ grepc_linux_func_syscall_def()
grepc_linux_func()
{
- grepc_linux_func_syscall_decl "$1";
+ grepc_linux_func_syscall_proto "$1";
grepc_linux_func_syscall_def "$1";
}
grepc_func()
{
- grepc_func_decl "$1";
+ grepc_func_proto "$1";
grepc_func_def "$1";
grepc_glibc_func "$1";
grepc_linux_func "$1";
}
-grepc_macro_simple()
+grepc_macro_func()
{
grepc_helper \
- "#\s*define\s+$1\b[^(]" \
+ "#\s*define\s+$1\(" \
'.' \
- '(?s)^[ \t]*#\s*define\s+'"$1"'\b(?!\().*?[^\\]$';
+ '(?s)^[ \t]*#\s*define\s+'"$1"'\(.*?[^\\]$';
}
-grepc_macro_func()
+grepc_macro_object()
{
grepc_helper \
- "#\s*define\s+$1\(" \
+ "#\s*define\s+$1\b[^(]" \
'.' \
- '(?s)^[ \t]*#\s*define\s+'"$1"'\(.*?[^\\]$';
+ '(?s)^[ \t]*#\s*define\s+'"$1"'\b(?!\().*?[^\\]$';
}
grepc_macro()
{
- grepc_macro_simple "$1";
grepc_macro_func "$1";
+ grepc_macro_object "$1";
}
diff --git a/share/man/man1/grepc.1 b/share/man/man1/grepc.1
index e504f5d..aa8fa62 100644
--- a/share/man/man1/grepc.1
+++ b/share/man/man1/grepc.1
@@ -43,7 +43,7 @@ to select the types of code that will be searched.
enum constant definitions.
.TP
.B f
-Function declarations and definitions.
+Function prototypes and definitions.
.TP
.B m
Macro definitions.