Accepting request 267282 from home:jirislaby:branches:devel:tools

- support-fun-as-params.patch: swallow function as parameters
- remove INSTALL from %doc, as suggested by the rpm checker

OBS-URL: https://build.opensuse.org/request/show/267282
OBS-URL: https://build.opensuse.org/package/show/devel:tools/cscope?expand=0&rev=15
This commit is contained in:
Takashi Iwai 2015-01-05 14:28:18 +00:00 committed by Git OBS Bridge
parent 9c1fee04f5
commit d583e3395b
3 changed files with 52 additions and 2 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Jan 5 13:44:49 UTC 2015 - jslaby@suse.com
- support-fun-as-params.patch: swallow function as parameters
- remove INSTALL from %doc, as suggested by the rpm checker
-------------------------------------------------------------------
Thu Nov 20 21:31:00 UTC 2014 - Led <ledest@gmail.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package cscope
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -30,6 +30,7 @@ Patch3: %{name}-15.7-vpath.patch
Patch4: %{name}-15.8a-fix-bashisms.patch
Patch5: %{name}-cleanup_on_sigterm.patch
Patch6: %{name}-egrep.out.patch
Patch7: support-fun-as-params.patch
BuildRequires: bison
BuildRequires: flex
BuildRequires: ncurses-devel
@ -47,6 +48,7 @@ browse through C source code files for specified elements of code.
%patch4 -p1
%patch5
%patch6 -p1
%patch7 -p1
%build
%configure
@ -64,7 +66,7 @@ popd
%files
%defattr(-,root,root)
%doc TODO COPYING ChangeLog AUTHORS README NEWS INSTALL
%doc TODO COPYING ChangeLog AUTHORS README NEWS
%doc %{_mandir}/man1/cscope.1.gz
%{_bindir}/cscope
%{_bindir}/ocs

View File

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