summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-05-13 17:12:47 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-05-13 17:12:47 +0200
commit44156f8553271c7b29a3fc02f718a278dd4dc194 (patch)
treeef543fef097f0138fb27d699b812b4bb2521a6e5
parent10f476f5c10fb6af065374274fdab5c505149087 (diff)
grepc: grepc_macro_*: Remove a few false positives
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 72c7677..0687095 100755
--- a/bin/grepc
+++ b/bin/grepc
@@ -185,7 +185,7 @@ grepc_macro_simple()
grepc_helper \
"#\s*define\s+$1\b[^(]" \
'.' \
- '(?s)#\s*define\s+'"$1"'\b(?!\().*?[^\\]$';
+ '(?s)^[ \t]*#\s*define\s+'"$1"'\b(?!\().*?[^\\]$';
}
@@ -194,7 +194,7 @@ grepc_macro_func()
grepc_helper \
"#\s*define\s+$1\(" \
'.' \
- '(?s)#\s*define\s+'"$1"'\(.*?[^\\]$';
+ '(?s)^[ \t]*#\s*define\s+'"$1"'\(.*?[^\\]$';
}