summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-06-21 13:19:48 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-06-24 13:37:48 +0200
commitf5f221d1338d424dbbf44db8aa41b88bbd6a8eb6 (patch)
tree87ffca0f0bf687d0cabb7054e9c8783cccc62e34
parentce368466b303efeba69304f2b400bca37b18a07e (diff)
grepc: -tm: Fix finding macros defined as empty
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rwxr-xr-xbin/grepc4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/grepc b/bin/grepc
index 4d4f220..e42b158 100755
--- a/bin/grepc
+++ b/bin/grepc
@@ -265,9 +265,9 @@ grepc_macro_func()
grepc_macro_object()
{
grepc_helper \
- "#\s*define\s+$1\b[^(]" \
+ "#\s*define\s+$1\b(?!\()" \
'.' \
- '(?s)^[ \t]*#\s*define\s[\s\\]*'"$1"'\b(?!\().*?[^\\]$';
+ '(?s)^[ \t]*#\s*define\s[\s\\]*'"$1"'\b(?!\().*?(?<!\\)$';
}