summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2022-05-10 00:59:06 +0200
committerAlejandro Colomar <alx.manpages@gmail.com>2022-05-10 00:59:14 +0200
commit4db42542867edd537df285abb6d2cdf4f727ec40 (patch)
tree9c9ff698909f924ff7d7b8651c578b21af2d32d1 /bin
parentdda24a237f14781f168e0c482fab972d9f0a261b (diff)
grepc: Fix some corner cases
Those two spaces are for handling some insane GNU style. Those are always spaces, so let's use ' ' instead of '\s\s' to make sure we don't match two tabs, or things like that. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/grepc4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/grepc b/bin/grepc
index e7dd99a..c294a92 100755
--- a/bin/grepc
+++ b/bin/grepc
@@ -137,8 +137,8 @@ function grepc_type_typedef_struct_union_enum()
{
grepc_helper '\.[ch]$' \
'^\s*typedef\s+(struct|union|enum)\b[^;]*$' \
- "^(\s\s)?}\s*$1;" \
- "(?s)^\s*typedef\s+(struct|union|enum)\s+(?:(?!^(\s\s)?}|^\s*typedef).)*^(\s\s)?}\s*$1;";
+ "^( )?}\s*$1;" \
+ "(?s)^\s*typedef\s+(struct|union|enum)\s+(?:(?!^( )?}|^\s*typedef).)*^( )?}\s*$1;";
}