Blame SOURCES/cscope-7-fscanner-swallow-function-as-parameters.patch

b93632
From e1b4cbc93529b07b3217928e8f9b1f43b80f9b06 Mon Sep 17 00:00:00 2001
b93632
From: Jiri Slaby <jslaby@suse.cz>
b93632
Date: Fri, 5 Dec 2014 19:15:53 +0100
b93632
Subject: [PATCH 8/9] fscanner: swallow function as parameters
b93632
MIME-Version: 1.0
b93632
Content-Type: text/plain; charset=UTF-8
b93632
Content-Transfer-Encoding: 8bit
b93632
b93632
Some functions take as a parameter a pointer to another function. This
b93632
causes troubles in the cscope scanner and such function definition is
b93632
dropped on the floor.
b93632
b93632
Instead of choking and skipping the definition/declaration, teach the
b93632
scanner about this case. So now cscope will not skip those and put
b93632
them properly in the index.
b93632
b93632
I carry this patch for a couple of months and using cscope daily on
b93632
the Linux kernel and see no problems.
b93632
b93632
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
b93632
Cc: Hans-Bernhard Bröker <broeker@users.sourceforge.net>
b93632
Cc: Neil Horman <nhorman@users.sourceforge.net>
b93632
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
b93632
---
b93632
 src/fscanner.l | 2 +-
b93632
 1 file changed, 1 insertion(+), 1 deletion(-)
b93632
b93632
diff --git a/src/fscanner.l b/src/fscanner.l
b93632
index 8a93192..43880bf 100644
b93632
--- a/src/fscanner.l
b93632
+++ b/src/fscanner.l
b93632
@@ -505,7 +505,7 @@ if{wsnl}*\(	{ 	/* ignore 'if' */
b93632
 		}
b93632
 
b93632
 <WAS_IDENTIFIER>{       
b93632
-{ws}*\(({wsnl}|{identifier}|{number}|[*&[\]=,.:])*\)([()]|{wsnl})*[:a-zA-Z_#{]	{
b93632
+{ws}*\(({wsnl}|{identifier}|\({ws}*\*{ws}*{identifier}{ws}*\){ws}*\([^()]*\)|{number}|[*&[\]=,.:])*\)([()]|{wsnl})*[:a-zA-Z_#{]	{
b93632
 			/* a function definition */
b93632
 			/* note: "#define a (b) {" and "#if defined(a)\n#" 
b93632
 			 * are not fcn definitions! */
b93632
-- 
b93632
2.26.2
b93632