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

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