From 26e7a05725bcb2cea59401803371ee3fa688a8f6 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 30 Sep 2005 01:39:24 +0000 Subject: even better function start checks; give dmalloc a chance of working. svn:r5162 --- contrib/checkSpace.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'contrib') diff --git a/contrib/checkSpace.pl b/contrib/checkSpace.pl index cdbfb7907..e0b9d6b93 100755 --- a/contrib/checkSpace.pl +++ b/contrib/checkSpace.pl @@ -82,14 +82,15 @@ for $fn (@ARGV) { } } ## Warn about functions not declared at start of line. - if ($in_func_head || ($fn !~ /\.h$/ && /^[a-zA-Z0-9_]/ && - ! /^(?:static )?(?:typedef|struct|union)/ && - ! /= *\{$/ && ! /;$/)) { + if ($in_func_head || + ($fn !~ /\.h$/ && /^[a-zA-Z0-9_]/ && + ! /^(?:static )?(?:typedef|struct|union)[^\(]*$/ && + ! /= *\{$/ && ! /;$/)) { if (/.\{$/){ print "fn() {:$fn:$.\n"; $in_func_head = 0; - } elsif (/^\S[^\(]* +[a-zA-Z0-9_]+\(/) { + } elsif (/^\S[^\(]* +\**[a-zA-Z0-9_]+\(/) { $in_func_head = -1; # started with tp fn } elsif (/;$/) { $in_func_head = 0; -- cgit v1.2.3