diff options
author | Alejandro Colomar <alx.manpages@gmail.com> | 2022-06-21 13:19:48 +0200 |
---|---|---|
committer | Alejandro Colomar <alx.manpages@gmail.com> | 2022-06-24 13:37:48 +0200 |
commit | f5f221d1338d424dbbf44db8aa41b88bbd6a8eb6 (patch) | |
tree | 87ffca0f0bf687d0cabb7054e9c8783cccc62e34 | |
parent | ce368466b303efeba69304f2b400bca37b18a07e (diff) |
grepc: -tm: Fix finding macros defined as empty
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
-rwxr-xr-x | bin/grepc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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(?!\().*?(?<!\\)$'; } |