[or-cvs] even better function start checks; give dmalloc a chance of...

Nick Mathewson nickm at seul.org
Fri Sep 30 01:39:26 UTC 2005


Update of /home/or/cvsroot/tor/contrib
In directory moria:/tmp/cvs-serv13047/contrib

Modified Files:
	checkSpace.pl 
Log Message:
even better function start checks; give dmalloc a chance of working.

Index: checkSpace.pl
===================================================================
RCS file: /home/or/cvsroot/tor/contrib/checkSpace.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- checkSpace.pl	30 Sep 2005 01:07:55 -0000	1.9
+++ checkSpace.pl	30 Sep 2005 01:39:23 -0000	1.10
@@ -82,14 +82,15 @@
                 }
             }
 	    ## 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;



More information about the tor-commits mailing list