import cscope-15.9-11.el8
This commit is contained in:
parent
ca6022cfec
commit
e4b004b5c5
@ -1 +1 @@
|
|||||||
19e7c78faad104020c32ce3a4275c84e9a060070 SOURCES/cscope-15.9.tar.gz
|
e89c6a3458164552d9301ccc213181f463e5210e SOURCES/cscope-15.9.tar.gz
|
||||||
|
@ -0,0 +1,45 @@
|
|||||||
|
From 39fb385d69dc06343e8f8a7e28d516d5aef97ec8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hans-Bernhard Broeker <HBBroeker@T-Online.de>
|
||||||
|
Date: Sat, 28 Jul 2018 17:50:03 +0200
|
||||||
|
Subject: [PATCH 1/9] [modified from patch #81] Fix reading include files in -c
|
||||||
|
mode
|
||||||
|
|
||||||
|
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
|
||||||
|
---
|
||||||
|
src/build.c | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/build.c b/src/build.c
|
||||||
|
index a32b5cb..557e660 100644
|
||||||
|
--- a/src/build.c
|
||||||
|
+++ b/src/build.c
|
||||||
|
@@ -124,7 +124,7 @@ samelist(FILE *oldrefs, char **names, int count)
|
||||||
|
}
|
||||||
|
/* see if the name list is the same */
|
||||||
|
for (i = 0; i < count; ++i) {
|
||||||
|
- if ((1 != fscanf(oldrefs," %[^\n]",oldname)) ||
|
||||||
|
+ if ((1 != fscanf(oldrefs," %" PATHLEN_STR "[^\n]",oldname)) ||
|
||||||
|
strnotequal(oldname, names[i])) {
|
||||||
|
return(NO);
|
||||||
|
}
|
||||||
|
@@ -305,7 +305,7 @@ cscope: -q option mismatch between command line and old symbol database\n");
|
||||||
|
/* see if the list of source files is the same and
|
||||||
|
none have been changed up to the included files */
|
||||||
|
for (i = 0; i < nsrcfiles; ++i) {
|
||||||
|
- if ((1 != fscanf(oldrefs," %[^\n]",oldname))
|
||||||
|
+ if ((1 != fscanf(oldrefs, " %" PATHLEN_STR "[^\n]", oldname))
|
||||||
|
|| strnotequal(oldname, srcfiles[i])
|
||||||
|
|| (lstat(srcfiles[i], &statstruct) != 0)
|
||||||
|
|| (statstruct.st_mtime > reftime)
|
||||||
|
@@ -315,7 +315,7 @@ cscope: -q option mismatch between command line and old symbol database\n");
|
||||||
|
}
|
||||||
|
/* the old cross-reference is up-to-date */
|
||||||
|
/* so get the list of included files */
|
||||||
|
- while (i++ < oldnum && fgets(oldname, sizeof(oldname), oldrefs)) {
|
||||||
|
+ while (i++ < oldnum && fscanf(oldrefs, "%" PATHLEN_STR "s", oldname)) {
|
||||||
|
addsrcfile(oldname);
|
||||||
|
}
|
||||||
|
fclose(oldrefs);
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
26
SOURCES/cscope-2-Cull-extraneous-declaration.patch
Normal file
26
SOURCES/cscope-2-Cull-extraneous-declaration.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 6a6998ecd0392ea643c4c4b317af9af8270761aa Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hans-Bernhard Broeker <HBBroeker@T-Online.de>
|
||||||
|
Date: Thu, 9 Aug 2018 16:25:31 +0200
|
||||||
|
Subject: [PATCH 3/9] Cull extraneous declaration
|
||||||
|
|
||||||
|
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
|
||||||
|
---
|
||||||
|
src/global.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/global.h b/src/global.h
|
||||||
|
index dbc8a43..a6f1486 100644
|
||||||
|
--- a/src/global.h
|
||||||
|
+++ b/src/global.h
|
||||||
|
@@ -224,7 +224,7 @@ extern char dicode2[]; /* digraph second character code */
|
||||||
|
+ dicode2[(unsigned char)(inchar2)])
|
||||||
|
|
||||||
|
/* main.c global data */
|
||||||
|
-extern char *editor, *home, *shell, *lineflag; /* environment variables */
|
||||||
|
+extern char *editor, *shell, *lineflag; /* environment variables */
|
||||||
|
extern char *home; /* Home directory */
|
||||||
|
extern BOOL lineflagafterfile;
|
||||||
|
extern char *argv0; /* command name */
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -0,0 +1,32 @@
|
|||||||
|
From f693474b85f8dc1d31570833c62d9210ed1ffcf2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: mikhail nefedov <mnefedov@users.sourceforge.net>
|
||||||
|
Date: Thu, 23 Aug 2018 00:36:52 +0200
|
||||||
|
Subject: [PATCH 4/9] Avoid putting directories found during header search into
|
||||||
|
srcfiles.
|
||||||
|
|
||||||
|
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
|
||||||
|
---
|
||||||
|
src/dir.c | 7 +++++--
|
||||||
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/dir.c b/src/dir.c
|
||||||
|
index 01c599e..7f7287e 100644
|
||||||
|
--- a/src/dir.c
|
||||||
|
+++ b/src/dir.c
|
||||||
|
@@ -616,8 +616,11 @@ incfile(char *file, char *type)
|
||||||
|
snprintf(path, sizeof(path), "%.*s/%s",
|
||||||
|
(int)(PATHLEN - 2 - file_len), incdirs[i],
|
||||||
|
file);
|
||||||
|
- if (access(compath(path), READ) == 0) {
|
||||||
|
- addsrcfile(path);
|
||||||
|
+ if (access(compath(path), READ) == 0) {
|
||||||
|
+ struct stat st;
|
||||||
|
+ if( 0 == stat(path,&st) && S_ISREG(st.st_mode) ) {
|
||||||
|
+ addsrcfile(path);
|
||||||
|
+ }
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -0,0 +1,38 @@
|
|||||||
|
From f632c3fd86fce2c495a290dd70f5f09e3e7e7a28 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hans-Bernhard Broeker <HBBroeker@T-Online.de>
|
||||||
|
Date: Sat, 13 Apr 2019 14:52:35 +0200
|
||||||
|
Subject: [PATCH 5/9] Avoid double-free via double fclose in changestring.
|
||||||
|
|
||||||
|
Mark closed FILE* by setting it to NULL, and check for that.
|
||||||
|
|
||||||
|
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
|
||||||
|
---
|
||||||
|
src/command.c | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/command.c b/src/command.c
|
||||||
|
index 8740b11..dcb5278 100644
|
||||||
|
--- a/src/command.c
|
||||||
|
+++ b/src/command.c
|
||||||
|
@@ -786,6 +786,7 @@ changestring(void)
|
||||||
|
}
|
||||||
|
fprintf(script, "w\nq\n!\n"); /* write and quit */
|
||||||
|
fclose(script);
|
||||||
|
+ script = NULL;
|
||||||
|
|
||||||
|
/* if any line was marked */
|
||||||
|
if (anymarked == YES) {
|
||||||
|
@@ -803,7 +804,9 @@ changestring(void)
|
||||||
|
}
|
||||||
|
changing = NO;
|
||||||
|
mousemenu();
|
||||||
|
- fclose(script);
|
||||||
|
+ if (script != NULL) {
|
||||||
|
+ fclose(script);
|
||||||
|
+ }
|
||||||
|
free(change);
|
||||||
|
return(anymarked);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
77
SOURCES/cscope-5-contrib-ocs-Fix-bashims-Closes-480591.patch
Normal file
77
SOURCES/cscope-5-contrib-ocs-Fix-bashims-Closes-480591.patch
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
From bb7f25fad3cade493486a6287f5212cdfb6cce24 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jari Aalto <jari.aalto@cante.net>
|
||||||
|
Date: Sat, 8 May 2010 20:15:35 +0300
|
||||||
|
Subject: [PATCH 6/9] contrib/ocs: Fix bashims (Closes: #480591)
|
||||||
|
|
||||||
|
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
|
||||||
|
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
|
||||||
|
---
|
||||||
|
contrib/ocs | 16 ++++++++--------
|
||||||
|
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/contrib/ocs b/contrib/ocs
|
||||||
|
index e924f4f..bd556b4 100755
|
||||||
|
--- a/contrib/ocs
|
||||||
|
+++ b/contrib/ocs
|
||||||
|
@@ -86,7 +86,7 @@ if [ ! -d ${SYSDIR} ]; then
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check that cscope is in PATH
|
||||||
|
-type cscope 1>/dev/null 2>&1
|
||||||
|
+which cscope 1>/dev/null 2>&1
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
@@ -167,8 +167,8 @@ create_list()
|
||||||
|
|
||||||
|
if [ "${FORCE}" != "Y" ]
|
||||||
|
then
|
||||||
|
- echo "\n${LIST}"
|
||||||
|
- echo "Update the library? <(Y)es, (N)o, (Q)uit> [n] \c"
|
||||||
|
+ printf "\n${LIST}\n"
|
||||||
|
+ printf "Update the library? <(Y)es, (N)o, (Q)uit> [n] "
|
||||||
|
read x y
|
||||||
|
case $x in
|
||||||
|
[Yy]* ) ;;
|
||||||
|
@@ -176,9 +176,9 @@ create_list()
|
||||||
|
*) return ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
- echo "Updating library:\n ${LIST} \c"
|
||||||
|
+ printf "Updating library:\n ${LIST} "
|
||||||
|
else
|
||||||
|
- echo "Creating library:\n ${LIST} \c"
|
||||||
|
+ printf "Creating library:\n ${LIST} "
|
||||||
|
fi
|
||||||
|
|
||||||
|
(
|
||||||
|
@@ -196,7 +196,7 @@ create_list()
|
||||||
|
-print
|
||||||
|
) | grep -v SCCS | sort -u > ${LIST}
|
||||||
|
|
||||||
|
- echo "\n`cat ${LIST} | wc -l` files listed"
|
||||||
|
+ printf "\n`cat ${LIST} | wc -l` files listed\n"
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
@@ -210,7 +210,7 @@ exp_inc()
|
||||||
|
then
|
||||||
|
for i in `cat ${theInc}`
|
||||||
|
do
|
||||||
|
- echo "-I $i \c"
|
||||||
|
+ printf "-I $i "
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
@@ -285,7 +285,7 @@ std_libs ${SYSDIR}$PWD
|
||||||
|
|
||||||
|
DIR=$PWD
|
||||||
|
if [ ! -n "${NOUPDATE}" -o -n "${SPECDEST}" ] ; then
|
||||||
|
-echo "Create new library? <(L)ocal, (H)ome, (S)ystem, (Q)uit> [q] \c"
|
||||||
|
+ printf "Create new library? <(L)ocal, (H)ome, (S)ystem, (Q)uit> [q] "
|
||||||
|
|
||||||
|
# shellcheck disable=SC2034
|
||||||
|
read x y
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
130
SOURCES/cscope-6-doc-cscope.1-Fix-hyphens.patch
Normal file
130
SOURCES/cscope-6-doc-cscope.1-Fix-hyphens.patch
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
From 3f9e3da40a77274705c9cb9103a6046daa950f5d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jari Aalto <jari.aalto@cante.net>
|
||||||
|
Date: Sat, 8 May 2010 20:16:14 +0300
|
||||||
|
Subject: [PATCH 7/9] doc/cscope.1: Fix hyphens
|
||||||
|
|
||||||
|
Signed-off-by: Jari Aalto <jari.aalto@cante.net>
|
||||||
|
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
|
||||||
|
---
|
||||||
|
doc/cscope.1 | 33 ++++++++++++++++-----------------
|
||||||
|
1 file changed, 16 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/doc/cscope.1 b/doc/cscope.1
|
||||||
|
index ca94e8b..0318347 100644
|
||||||
|
--- a/doc/cscope.1
|
||||||
|
+++ b/doc/cscope.1
|
||||||
|
@@ -1,4 +1,3 @@
|
||||||
|
-.PU
|
||||||
|
.TH CSCOPE "1" "January 2007" "The Santa Cruz Operation"
|
||||||
|
.SH NAME
|
||||||
|
cscope - interactively examine a C program
|
||||||
|
@@ -106,7 +105,7 @@ below. (The #include files
|
||||||
|
may be specified with either double quotes or angle brackets.)
|
||||||
|
The incdir directory is searched in addition to the current
|
||||||
|
directory (which is searched first) and the standard list
|
||||||
|
-(which is searched last). If more than one occurrence of -I
|
||||||
|
+(which is searched last). If more than one occurrence of \-I
|
||||||
|
appears, the directories are searched in the order they appear
|
||||||
|
on the command line.
|
||||||
|
.TP
|
||||||
|
@@ -129,7 +128,7 @@ source trees generally do not use it.
|
||||||
|
.TP
|
||||||
|
.B -L
|
||||||
|
Do a single search with line-oriented output when used with the
|
||||||
|
--num pattern option.
|
||||||
|
+\-num pattern option.
|
||||||
|
.TP
|
||||||
|
.B -l
|
||||||
|
Line-oriented interface (see ``Line-Oriented Interface''
|
||||||
|
@@ -146,7 +145,7 @@ Prepend
|
||||||
|
.I path
|
||||||
|
to relative file names in a pre-built cross-reference file so you do
|
||||||
|
not have to change to the directory where the cross-reference file was
|
||||||
|
-built. This option is only valid with the -d option.
|
||||||
|
+built. This option is only valid with the \-d option.
|
||||||
|
.TP
|
||||||
|
.BI -p n
|
||||||
|
Display the last
|
||||||
|
@@ -195,7 +194,7 @@ Remove the cscope reference file and inverted indexes when exiting
|
||||||
|
.I files
|
||||||
|
A list of file names to operate on.
|
||||||
|
.PP
|
||||||
|
-The -I, -c, -k, -p, -q, and -T options can also be in the cscope.files file.
|
||||||
|
+The \-I, \-c, \-k, \-p, \-q, and \-T options can also be in the cscope.files file.
|
||||||
|
.PP
|
||||||
|
.SS Requesting the initial search
|
||||||
|
.PP
|
||||||
|
@@ -266,7 +265,7 @@ Append the displayed list of lines to a file.
|
||||||
|
.TP
|
||||||
|
.B <
|
||||||
|
Read lines from a file that is in symbol reference format
|
||||||
|
-(created by > or >>), just like the -F option.
|
||||||
|
+(created by > or >>), just like the \-F option.
|
||||||
|
.TP
|
||||||
|
.B ^
|
||||||
|
Filter all lines through a shell command and display the
|
||||||
|
@@ -371,7 +370,7 @@ commands, respectively.
|
||||||
|
.PP
|
||||||
|
.SS Line-Oriented interface
|
||||||
|
.PP
|
||||||
|
-The -l option lets you use cscope where a screen-oriented interface
|
||||||
|
+The \-l option lets you use cscope where a screen-oriented interface
|
||||||
|
would not be useful, for example, from another screen-oriented
|
||||||
|
program.
|
||||||
|
.PP
|
||||||
|
@@ -380,10 +379,10 @@ with the field number (counting from 0) immediately followed by the
|
||||||
|
search pattern, for example, ``lmain'' finds the definition of the
|
||||||
|
main function.
|
||||||
|
.PP
|
||||||
|
-If you just want a single search, instead of the -l option use the -L
|
||||||
|
-and -num pattern options, and you won't get the >> prompt.
|
||||||
|
+If you just want a single search, instead of the \-l option use the \-L
|
||||||
|
+and \-num pattern options, and you won't get the >> prompt.
|
||||||
|
.PP
|
||||||
|
-For -l, cscope outputs the number of reference lines
|
||||||
|
+For \-l, cscope outputs the number of reference lines
|
||||||
|
cscope: 2 lines
|
||||||
|
.PP
|
||||||
|
For each reference found, cscope outputs a line consisting of the file
|
||||||
|
@@ -468,11 +467,11 @@ is not set, cscope searches only in the current directory.
|
||||||
|
.SH FILES
|
||||||
|
.TP
|
||||||
|
.B cscope.files
|
||||||
|
-Default files containing -I, -p, -q, and -T options and the
|
||||||
|
-list of source files (overridden by the -i option).
|
||||||
|
+Default files containing \-I, \-p, \-q, and \-T options and the
|
||||||
|
+list of source files (overridden by the \-i option).
|
||||||
|
.TP
|
||||||
|
.B cscope.out
|
||||||
|
-Symbol cross-reference file (overridden by the -f option),
|
||||||
|
+Symbol cross-reference file (overridden by the \-f option),
|
||||||
|
which is put in the home directory if it cannot be created in
|
||||||
|
the current directory.
|
||||||
|
.TP
|
||||||
|
@@ -482,11 +481,11 @@ the current directory.
|
||||||
|
.B cscope.po.out
|
||||||
|
.PD 1
|
||||||
|
Default files containing the inverted index used for quick
|
||||||
|
-symbol searching (-q option). If you use the -f option to
|
||||||
|
+symbol searching (\-q option). If you use the \-f option to
|
||||||
|
rename the cross-reference file (so it's not cscope.out), the
|
||||||
|
names for these inverted index files will be created by adding
|
||||||
|
- .in and .po to the name you supply with -f. For example, if you
|
||||||
|
-indicated -f xyz, then these files would be named xyz.in and
|
||||||
|
+ .in and .po to the name you supply with \-f. For example, if you
|
||||||
|
+indicated \-f xyz, then these files would be named xyz.in and
|
||||||
|
xyz.po.
|
||||||
|
.TP
|
||||||
|
.B INCDIR
|
||||||
|
@@ -554,7 +553,7 @@ definition, for example,
|
||||||
|
.PP
|
||||||
|
char flag
|
||||||
|
#ifdef ALLOCATE_STORAGE
|
||||||
|
- = -1
|
||||||
|
+ = \-1
|
||||||
|
#endif
|
||||||
|
;
|
||||||
|
.PP
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -0,0 +1,43 @@
|
|||||||
|
From e1b4cbc93529b07b3217928e8f9b1f43b80f9b06 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jiri Slaby <jslaby@suse.cz>
|
||||||
|
Date: Fri, 5 Dec 2014 19:15:53 +0100
|
||||||
|
Subject: [PATCH 8/9] 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>
|
||||||
|
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
|
||||||
|
---
|
||||||
|
src/fscanner.l | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/fscanner.l b/src/fscanner.l
|
||||||
|
index 8a93192..43880bf 100644
|
||||||
|
--- a/src/fscanner.l
|
||||||
|
+++ b/src/fscanner.l
|
||||||
|
@@ -505,7 +505,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.26.2
|
||||||
|
|
@ -1,11 +0,0 @@
|
|||||||
diff -up ./src/command.c.dblfree ./src/command.c
|
|
||||||
--- ./src/command.c.dblfree 2019-04-11 07:08:24.358253603 -0400
|
|
||||||
+++ ./src/command.c 2019-04-11 07:08:43.955193615 -0400
|
|
||||||
@@ -785,7 +785,6 @@ changestring(void)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
fprintf(script, "w\nq\n!\n"); /* write and quit */
|
|
||||||
- fclose(script);
|
|
||||||
|
|
||||||
/* if any line was marked */
|
|
||||||
if (anymarked == YES) {
|
|
@ -1,216 +0,0 @@
|
|||||||
diff -up ./tests/check0.sh.repoint ./tests/check0.sh
|
|
||||||
--- ./tests/check0.sh.repoint 2019-03-12 13:15:47.331320989 -0400
|
|
||||||
+++ ./tests/check0.sh 2019-03-12 13:20:52.238304290 -0400
|
|
||||||
@@ -5,6 +5,11 @@ SINDEX=0
|
|
||||||
STERM=main
|
|
||||||
STYPE="find C symbol"
|
|
||||||
|
|
||||||
+if [ -z "$CSCOPE_BINARY" ]
|
|
||||||
+then
|
|
||||||
+ CSCOPE_BINARY=./src/cscope
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
echo "Searching item $SINDEX, '$STYPE'"
|
|
||||||
|
|
||||||
#Get to the top level directory
|
|
||||||
@@ -15,7 +20,7 @@ rm -f cscope.out
|
|
||||||
|
|
||||||
#Count the number of instances of the string 'Copyright'
|
|
||||||
#We expect 178 currently
|
|
||||||
-COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
+COUNT=$($CSCOPE_BINARY -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
|
|
||||||
if [ $COUNT -ne $EXPECT ]
|
|
||||||
then
|
|
||||||
diff -up ./tests/check1.sh.repoint ./tests/check1.sh
|
|
||||||
--- ./tests/check1.sh.repoint 2019-03-12 13:15:47.333320983 -0400
|
|
||||||
+++ ./tests/check1.sh 2019-03-12 13:20:52.241304280 -0400
|
|
||||||
@@ -5,6 +5,11 @@ SINDEX=1
|
|
||||||
STERM=main
|
|
||||||
STYPE="symbol definition"
|
|
||||||
|
|
||||||
+if [ -z "$CSCOPE_BINARY" ]
|
|
||||||
+then
|
|
||||||
+ CSCOPE_BINARY=./src/cscope
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
echo "Searching item $SINDEX, '$STYPE'"
|
|
||||||
|
|
||||||
#Get to the top level directory
|
|
||||||
@@ -15,7 +20,7 @@ rm -f cscope.out
|
|
||||||
|
|
||||||
#Count the number of instances of the string 'Copyright'
|
|
||||||
#We expect 178 currently
|
|
||||||
-COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
+COUNT=$($CSCOPE_BINARY -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
|
|
||||||
if [ $COUNT -ne $EXPECT ]
|
|
||||||
then
|
|
||||||
diff -up ./tests/check2.sh.repoint ./tests/check2.sh
|
|
||||||
--- ./tests/check2.sh.repoint 2019-03-12 13:15:47.334320979 -0400
|
|
||||||
+++ ./tests/check2.sh 2019-03-12 13:20:52.245304266 -0400
|
|
||||||
@@ -5,6 +5,11 @@ SINDEX=2
|
|
||||||
STERM=build
|
|
||||||
STYPE="functions called by"
|
|
||||||
|
|
||||||
+if [ -z "$CSCOPE_BINARY" ]
|
|
||||||
+then
|
|
||||||
+ CSCOPE_BINARY=./src/cscope
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
echo "Searching item $SINDEX, '$STYPE'"
|
|
||||||
|
|
||||||
#Get to the top level directory
|
|
||||||
@@ -13,7 +18,7 @@ cd ..
|
|
||||||
#Remove any previous databases from testing
|
|
||||||
rm -f cscope.out
|
|
||||||
|
|
||||||
-COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
+COUNT=$($CSCOPE_BINARY -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
|
|
||||||
if [ $COUNT -ne $EXPECT ]
|
|
||||||
then
|
|
||||||
diff -up ./tests/check3.sh.repoint ./tests/check3.sh
|
|
||||||
--- ./tests/check3.sh.repoint 2019-03-12 13:15:47.335320976 -0400
|
|
||||||
+++ ./tests/check3.sh 2019-03-12 13:20:52.248304256 -0400
|
|
||||||
@@ -5,6 +5,11 @@ SINDEX=3
|
|
||||||
STERM=printf
|
|
||||||
STYPE="functions calling"
|
|
||||||
|
|
||||||
+if [ -z "$CSCOPE_BINARY" ]
|
|
||||||
+then
|
|
||||||
+ CSCOPE_BINARY=./src/cscope
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
echo "Searching item $SINDEX, '$STYPE'"
|
|
||||||
|
|
||||||
#Get to the top level directory
|
|
||||||
@@ -14,7 +19,7 @@ cd ..
|
|
||||||
rm -f cscope.out
|
|
||||||
|
|
||||||
#We expect 178 currently
|
|
||||||
-COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
+COUNT=$($CSCOPE_BINARY -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
|
|
||||||
if [ $COUNT -ne $EXPECT ]
|
|
||||||
then
|
|
||||||
diff -up ./tests/check4.sh.repoint ./tests/check4.sh
|
|
||||||
--- ./tests/check4.sh.repoint 2019-03-12 13:15:47.336320973 -0400
|
|
||||||
+++ ./tests/check4.sh 2019-03-12 13:20:52.252304243 -0400
|
|
||||||
@@ -4,6 +4,11 @@ SINDEX=4
|
|
||||||
STERM=oldsigquit
|
|
||||||
STYPE="regular text string"
|
|
||||||
|
|
||||||
+if [ -z "$CSCOPE_BINARY" ]
|
|
||||||
+then
|
|
||||||
+ CSCOPE_BINARY=./src/cscope
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
echo "Searching item $SINDEX, '$STYPE'"
|
|
||||||
|
|
||||||
#Get to the top level directory
|
|
||||||
@@ -12,7 +17,7 @@ cd ..
|
|
||||||
#Remove any previous databases from testing
|
|
||||||
rm -f cscope.out
|
|
||||||
|
|
||||||
-COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
+COUNT=$($CSCOPE_BINARY -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
|
|
||||||
if [ $COUNT -ne $EXPECT ]
|
|
||||||
then
|
|
||||||
diff -up ./tests/check6.sh.repoint ./tests/check6.sh
|
|
||||||
--- ./tests/check6.sh.repoint 2019-03-12 13:15:47.338320966 -0400
|
|
||||||
+++ ./tests/check6.sh 2019-03-12 13:20:52.259304220 -0400
|
|
||||||
@@ -5,6 +5,11 @@ SINDEX=6
|
|
||||||
STERM=msg.*what
|
|
||||||
STYPE="egrep string"
|
|
||||||
|
|
||||||
+if [ -z "$CSCOPE_BINARY" ]
|
|
||||||
+then
|
|
||||||
+ CSCOPE_BINARY=./src/cscope
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
echo "Searching item $SINDEX, '$STYPE'"
|
|
||||||
|
|
||||||
#Get to the top level directory
|
|
||||||
@@ -15,7 +20,7 @@ rm -f cscope.out
|
|
||||||
|
|
||||||
#Count the number of instances of the string 'Copyright'
|
|
||||||
#We expect 178 currently
|
|
||||||
-COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
+COUNT=$($CSCOPE_BINARY -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
|
|
||||||
if [ $COUNT -ne $EXPECT ]
|
|
||||||
then
|
|
||||||
diff -up ./tests/check7.sh.repoint ./tests/check7.sh
|
|
||||||
--- ./tests/check7.sh.repoint 2019-03-12 13:15:47.339320963 -0400
|
|
||||||
+++ ./tests/check7.sh 2019-03-12 13:20:52.263304206 -0400
|
|
||||||
@@ -5,6 +5,11 @@ SINDEX=7
|
|
||||||
STERM=main.c
|
|
||||||
STYPE="file named"
|
|
||||||
|
|
||||||
+if [ -z "$CSCOPE_BINARY" ]
|
|
||||||
+then
|
|
||||||
+ CSCOPE_BINARY=./src/cscope
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
echo "Searching item $SINDEX, '$STYPE'"
|
|
||||||
|
|
||||||
#Get to the top level directory
|
|
||||||
@@ -15,7 +20,7 @@ rm -f cscope.out
|
|
||||||
|
|
||||||
#Count the number of instances of the string 'Copyright'
|
|
||||||
#We expect 178 currently
|
|
||||||
-COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
+COUNT=$($CSCOPE_BINARY -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
|
|
||||||
if [ $COUNT -ne $EXPECT ]
|
|
||||||
then
|
|
||||||
diff -up ./tests/check8.sh.repoint ./tests/check8.sh
|
|
||||||
--- ./tests/check8.sh.repoint 2019-03-12 13:15:47.340320959 -0400
|
|
||||||
+++ ./tests/check8.sh 2019-03-12 13:20:52.267304193 -0400
|
|
||||||
@@ -5,6 +5,11 @@ SINDEX=8
|
|
||||||
STERM=unistd.h
|
|
||||||
STYPE="files including this file"
|
|
||||||
|
|
||||||
+if [ -z "$CSCOPE_BINARY" ]
|
|
||||||
+then
|
|
||||||
+ CSCOPE_BINARY=./src/cscope
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
echo "Searching item $SINDEX, '$STYPE'"
|
|
||||||
|
|
||||||
#Get to the top level directory
|
|
||||||
@@ -15,7 +20,7 @@ rm -f cscope.out
|
|
||||||
|
|
||||||
#Count the number of instances of the string 'Copyright'
|
|
||||||
#We expect 178 currently
|
|
||||||
-COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
+COUNT=$($CSCOPE_BINARY -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
|
|
||||||
if [ $COUNT -ne $EXPECT ]
|
|
||||||
then
|
|
||||||
diff -up ./tests/check9.sh.repoint ./tests/check9.sh
|
|
||||||
--- ./tests/check9.sh.repoint 2019-03-12 13:15:47.341320956 -0400
|
|
||||||
+++ ./tests/check9.sh 2019-03-12 13:20:52.270304183 -0400
|
|
||||||
@@ -5,6 +5,11 @@ SINDEX=9
|
|
||||||
STERM=reftime
|
|
||||||
STYPE="assignments to symbol"
|
|
||||||
|
|
||||||
+if [ -z "$CSCOPE_BINARY" ]
|
|
||||||
+then
|
|
||||||
+ CSCOPE_BINARY=./src/cscope
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
echo "Searching item $SINDEX, '$STYPE'"
|
|
||||||
|
|
||||||
#Get to the top level directory
|
|
||||||
@@ -15,7 +20,7 @@ rm -f cscope.out
|
|
||||||
|
|
||||||
#Count the number of instances of the string 'Copyright'
|
|
||||||
#We expect 178 currently
|
|
||||||
-COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
+COUNT=$($CSCOPE_BINARY -R -L -$SINDEX$STERM | wc -l)
|
|
||||||
|
|
||||||
if [ $COUNT -ne $EXPECT ]
|
|
||||||
then
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up ./configure.in.version ./configure.in
|
|
||||||
diff -up ./src/version.h.version ./src/version.h
|
|
||||||
--- ./src/version.h.version 2019-06-03 10:06:42.185021824 -0400
|
|
||||||
+++ ./src/version.h 2019-06-03 10:06:51.500994292 -0400
|
|
||||||
@@ -40,6 +40,6 @@
|
|
||||||
#define CSCOPE_VERSION_H
|
|
||||||
|
|
||||||
#define FILEVERSION 15 /* Initial Open Source and Linux Port */
|
|
||||||
-#define FIXVERSION ".8b" /* feature and bug fix version */
|
|
||||||
+#define FIXVERSION ".9" /* feature and bug fix version */
|
|
||||||
|
|
||||||
#endif /* CSCOPE_VERSION_H */
|
|
@ -20,24 +20,11 @@ index ae0fc53..d79d44e 100644
|
|||||||
|
|
||||||
EXTRA_DIST = INSTALL.gnu packages
|
EXTRA_DIST = INSTALL.gnu packages
|
||||||
|
|
||||||
diff --git a/bootstrap.sh b/bootstrap.sh
|
|
||||||
new file mode 100755
|
|
||||||
index 0000000..6a363ed
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/bootstrap.sh
|
|
||||||
@@ -0,0 +1,7 @@
|
|
||||||
+#!/bin/sh
|
|
||||||
+
|
|
||||||
+aclocal
|
|
||||||
+autoheader
|
|
||||||
+autoconf
|
|
||||||
+automake --add-missing
|
|
||||||
+
|
|
||||||
diff --git a/configure.in b/configure.in
|
diff --git a/configure.in b/configure.in
|
||||||
index c51887d..e0a8b1f 100644
|
index c51887d..e0a8b1f 100644
|
||||||
--- a/configure.in
|
--- a/configure.in
|
||||||
+++ b/configure.in
|
+++ b/configure.in
|
||||||
@@ -425,5 +425,5 @@ case "$host_os" in
|
@@ -415,5 +415,5 @@ case "$host_os" in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -59,10 +46,10 @@ index 0000000..2278a71
|
|||||||
+ check7.sh check8.sh check9.sh
|
+ check7.sh check8.sh check9.sh
|
||||||
diff --git a/tests/check0.sh b/tests/check0.sh
|
diff --git a/tests/check0.sh b/tests/check0.sh
|
||||||
new file mode 100755
|
new file mode 100755
|
||||||
index 0000000..2487107
|
index 0000000..6c6883b
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/tests/check0.sh
|
+++ b/tests/check0.sh
|
||||||
@@ -0,0 +1,27 @@
|
@@ -0,0 +1,32 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+
|
+
|
||||||
+EXPECT=4
|
+EXPECT=4
|
||||||
@ -70,7 +57,12 @@ index 0000000..2487107
|
|||||||
+STERM=main
|
+STERM=main
|
||||||
+STYPE="find C symbol"
|
+STYPE="find C symbol"
|
||||||
+
|
+
|
||||||
+echo "Searching item $SINDEX, '$STYPE'"
|
+if [ -z "$CSCOPE_BINARY" ]
|
||||||
|
+then
|
||||||
|
+ CSCOPE_BINARY=./src/cscope
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+echo "Searching item $SINDEX, '$STYPE', '$STERM'"
|
||||||
+
|
+
|
||||||
+#Get to the top level directory
|
+#Get to the top level directory
|
||||||
+cd ..
|
+cd ..
|
||||||
@ -80,7 +72,7 @@ index 0000000..2487107
|
|||||||
+
|
+
|
||||||
+#Count the number of instances of the string 'Copyright'
|
+#Count the number of instances of the string 'Copyright'
|
||||||
+#We expect 178 currently
|
+#We expect 178 currently
|
||||||
+COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
+COUNT=$($CSCOPE_BINARY -R -L -k -$SINDEX$STERM | wc -l)
|
||||||
+
|
+
|
||||||
+if [ $COUNT -ne $EXPECT ]
|
+if [ $COUNT -ne $EXPECT ]
|
||||||
+then
|
+then
|
||||||
@ -92,10 +84,10 @@ index 0000000..2487107
|
|||||||
+
|
+
|
||||||
diff --git a/tests/check1.sh b/tests/check1.sh
|
diff --git a/tests/check1.sh b/tests/check1.sh
|
||||||
new file mode 100755
|
new file mode 100755
|
||||||
index 0000000..a80997b
|
index 0000000..78ffe21
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/tests/check1.sh
|
+++ b/tests/check1.sh
|
||||||
@@ -0,0 +1,27 @@
|
@@ -0,0 +1,32 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+
|
+
|
||||||
+EXPECT=3
|
+EXPECT=3
|
||||||
@ -103,7 +95,12 @@ index 0000000..a80997b
|
|||||||
+STERM=main
|
+STERM=main
|
||||||
+STYPE="symbol definition"
|
+STYPE="symbol definition"
|
||||||
+
|
+
|
||||||
+echo "Searching item $SINDEX, '$STYPE'"
|
+if [ -z "$CSCOPE_BINARY" ]
|
||||||
|
+then
|
||||||
|
+ CSCOPE_BINARY=./src/cscope
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+echo "Searching item $SINDEX, '$STYPE', '$STERM'"
|
||||||
+
|
+
|
||||||
+#Get to the top level directory
|
+#Get to the top level directory
|
||||||
+cd ..
|
+cd ..
|
||||||
@ -113,7 +110,7 @@ index 0000000..a80997b
|
|||||||
+
|
+
|
||||||
+#Count the number of instances of the string 'Copyright'
|
+#Count the number of instances of the string 'Copyright'
|
||||||
+#We expect 178 currently
|
+#We expect 178 currently
|
||||||
+COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
+COUNT=$($CSCOPE_BINARY -R -L -k -$SINDEX$STERM | wc -l)
|
||||||
+
|
+
|
||||||
+if [ $COUNT -ne $EXPECT ]
|
+if [ $COUNT -ne $EXPECT ]
|
||||||
+then
|
+then
|
||||||
@ -125,10 +122,10 @@ index 0000000..a80997b
|
|||||||
+
|
+
|
||||||
diff --git a/tests/check2.sh b/tests/check2.sh
|
diff --git a/tests/check2.sh b/tests/check2.sh
|
||||||
new file mode 100755
|
new file mode 100755
|
||||||
index 0000000..efbf2e5
|
index 0000000..414430a
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/tests/check2.sh
|
+++ b/tests/check2.sh
|
||||||
@@ -0,0 +1,25 @@
|
@@ -0,0 +1,30 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+
|
+
|
||||||
+EXPECT=96
|
+EXPECT=96
|
||||||
@ -136,7 +133,12 @@ index 0000000..efbf2e5
|
|||||||
+STERM=build
|
+STERM=build
|
||||||
+STYPE="functions called by"
|
+STYPE="functions called by"
|
||||||
+
|
+
|
||||||
+echo "Searching item $SINDEX, '$STYPE'"
|
+if [ -z "$CSCOPE_BINARY" ]
|
||||||
|
+then
|
||||||
|
+ CSCOPE_BINARY=./src/cscope
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+echo "Searching item $SINDEX, '$STYPE', '$STERM'"
|
||||||
+
|
+
|
||||||
+#Get to the top level directory
|
+#Get to the top level directory
|
||||||
+cd ..
|
+cd ..
|
||||||
@ -144,7 +146,7 @@ index 0000000..efbf2e5
|
|||||||
+#Remove any previous databases from testing
|
+#Remove any previous databases from testing
|
||||||
+rm -f cscope.out
|
+rm -f cscope.out
|
||||||
+
|
+
|
||||||
+COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
+COUNT=$($CSCOPE_BINARY -R -L -k -$SINDEX$STERM | wc -l)
|
||||||
+
|
+
|
||||||
+if [ $COUNT -ne $EXPECT ]
|
+if [ $COUNT -ne $EXPECT ]
|
||||||
+then
|
+then
|
||||||
@ -156,18 +158,23 @@ index 0000000..efbf2e5
|
|||||||
+
|
+
|
||||||
diff --git a/tests/check3.sh b/tests/check3.sh
|
diff --git a/tests/check3.sh b/tests/check3.sh
|
||||||
new file mode 100755
|
new file mode 100755
|
||||||
index 0000000..5ec8fc0
|
index 0000000..a6b2c7e
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/tests/check3.sh
|
+++ b/tests/check3.sh
|
||||||
@@ -0,0 +1,26 @@
|
@@ -0,0 +1,31 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+
|
+
|
||||||
+EXPECT=44
|
+EXPECT=35
|
||||||
+SINDEX=3
|
+SINDEX=3
|
||||||
+STERM=printf
|
+STERM=printf
|
||||||
+STYPE="functions calling"
|
+STYPE="functions calling"
|
||||||
+
|
+
|
||||||
+echo "Searching item $SINDEX, '$STYPE'"
|
+if [ -z "$CSCOPE_BINARY" ]
|
||||||
|
+then
|
||||||
|
+ CSCOPE_BINARY=./src/cscope
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+echo "Searching item $SINDEX, '$STYPE', '$STERM'"
|
||||||
+
|
+
|
||||||
+#Get to the top level directory
|
+#Get to the top level directory
|
||||||
+cd ..
|
+cd ..
|
||||||
@ -176,7 +183,7 @@ index 0000000..5ec8fc0
|
|||||||
+rm -f cscope.out
|
+rm -f cscope.out
|
||||||
+
|
+
|
||||||
+#We expect 178 currently
|
+#We expect 178 currently
|
||||||
+COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
+COUNT=$($CSCOPE_BINARY -R -L -k -$SINDEX$STERM | wc -l)
|
||||||
+
|
+
|
||||||
+if [ $COUNT -ne $EXPECT ]
|
+if [ $COUNT -ne $EXPECT ]
|
||||||
+then
|
+then
|
||||||
@ -188,17 +195,22 @@ index 0000000..5ec8fc0
|
|||||||
+
|
+
|
||||||
diff --git a/tests/check4.sh b/tests/check4.sh
|
diff --git a/tests/check4.sh b/tests/check4.sh
|
||||||
new file mode 100755
|
new file mode 100755
|
||||||
index 0000000..5a58d59
|
index 0000000..dd2c98c
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/tests/check4.sh
|
+++ b/tests/check4.sh
|
||||||
@@ -0,0 +1,24 @@
|
@@ -0,0 +1,29 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+EXPECT=3
|
+EXPECT=3
|
||||||
+SINDEX=4
|
+SINDEX=4
|
||||||
+STERM=oldsigquit
|
+STERM=oldsigquit
|
||||||
+STYPE="regular text string"
|
+STYPE="regular text string"
|
||||||
+
|
+
|
||||||
+echo "Searching item $SINDEX, '$STYPE'"
|
+if [ -z "$CSCOPE_BINARY" ]
|
||||||
|
+then
|
||||||
|
+ CSCOPE_BINARY=./src/cscope
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+echo "Searching item $SINDEX, '$STYPE', '$STERM'"
|
||||||
+
|
+
|
||||||
+#Get to the top level directory
|
+#Get to the top level directory
|
||||||
+cd ..
|
+cd ..
|
||||||
@ -206,7 +218,7 @@ index 0000000..5a58d59
|
|||||||
+#Remove any previous databases from testing
|
+#Remove any previous databases from testing
|
||||||
+rm -f cscope.out
|
+rm -f cscope.out
|
||||||
+
|
+
|
||||||
+COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
+COUNT=$($CSCOPE_BINARY -R -L -k -$SINDEX$STERM | wc -l)
|
||||||
+
|
+
|
||||||
+if [ $COUNT -ne $EXPECT ]
|
+if [ $COUNT -ne $EXPECT ]
|
||||||
+then
|
+then
|
||||||
@ -218,10 +230,10 @@ index 0000000..5a58d59
|
|||||||
+
|
+
|
||||||
diff --git a/tests/check6.sh b/tests/check6.sh
|
diff --git a/tests/check6.sh b/tests/check6.sh
|
||||||
new file mode 100755
|
new file mode 100755
|
||||||
index 0000000..b13b33e
|
index 0000000..c664960
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/tests/check6.sh
|
+++ b/tests/check6.sh
|
||||||
@@ -0,0 +1,27 @@
|
@@ -0,0 +1,32 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+
|
+
|
||||||
+EXPECT=1
|
+EXPECT=1
|
||||||
@ -229,7 +241,12 @@ index 0000000..b13b33e
|
|||||||
+STERM=msg.*what
|
+STERM=msg.*what
|
||||||
+STYPE="egrep string"
|
+STYPE="egrep string"
|
||||||
+
|
+
|
||||||
+echo "Searching item $SINDEX, '$STYPE'"
|
+if [ -z "$CSCOPE_BINARY" ]
|
||||||
|
+then
|
||||||
|
+ CSCOPE_BINARY=./src/cscope
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+echo "Searching item $SINDEX, '$STYPE', '$STERM'"
|
||||||
+
|
+
|
||||||
+#Get to the top level directory
|
+#Get to the top level directory
|
||||||
+cd ..
|
+cd ..
|
||||||
@ -239,7 +256,7 @@ index 0000000..b13b33e
|
|||||||
+
|
+
|
||||||
+#Count the number of instances of the string 'Copyright'
|
+#Count the number of instances of the string 'Copyright'
|
||||||
+#We expect 178 currently
|
+#We expect 178 currently
|
||||||
+COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
+COUNT=$($CSCOPE_BINARY -R -L -k -$SINDEX$STERM | wc -l)
|
||||||
+
|
+
|
||||||
+if [ $COUNT -ne $EXPECT ]
|
+if [ $COUNT -ne $EXPECT ]
|
||||||
+then
|
+then
|
||||||
@ -251,10 +268,10 @@ index 0000000..b13b33e
|
|||||||
+
|
+
|
||||||
diff --git a/tests/check7.sh b/tests/check7.sh
|
diff --git a/tests/check7.sh b/tests/check7.sh
|
||||||
new file mode 100755
|
new file mode 100755
|
||||||
index 0000000..3dc0706
|
index 0000000..5ac965c
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/tests/check7.sh
|
+++ b/tests/check7.sh
|
||||||
@@ -0,0 +1,27 @@
|
@@ -0,0 +1,32 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+
|
+
|
||||||
+EXPECT=1
|
+EXPECT=1
|
||||||
@ -262,7 +279,12 @@ index 0000000..3dc0706
|
|||||||
+STERM=main.c
|
+STERM=main.c
|
||||||
+STYPE="file named"
|
+STYPE="file named"
|
||||||
+
|
+
|
||||||
+echo "Searching item $SINDEX, '$STYPE'"
|
+if [ -z "$CSCOPE_BINARY" ]
|
||||||
|
+then
|
||||||
|
+ CSCOPE_BINARY=./src/cscope
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+echo "Searching item $SINDEX, '$STYPE', '$STERM'"
|
||||||
+
|
+
|
||||||
+#Get to the top level directory
|
+#Get to the top level directory
|
||||||
+cd ..
|
+cd ..
|
||||||
@ -272,7 +294,7 @@ index 0000000..3dc0706
|
|||||||
+
|
+
|
||||||
+#Count the number of instances of the string 'Copyright'
|
+#Count the number of instances of the string 'Copyright'
|
||||||
+#We expect 178 currently
|
+#We expect 178 currently
|
||||||
+COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
+COUNT=$($CSCOPE_BINARY -R -L -k -$SINDEX$STERM | wc -l)
|
||||||
+
|
+
|
||||||
+if [ $COUNT -ne $EXPECT ]
|
+if [ $COUNT -ne $EXPECT ]
|
||||||
+then
|
+then
|
||||||
@ -284,18 +306,23 @@ index 0000000..3dc0706
|
|||||||
+
|
+
|
||||||
diff --git a/tests/check8.sh b/tests/check8.sh
|
diff --git a/tests/check8.sh b/tests/check8.sh
|
||||||
new file mode 100755
|
new file mode 100755
|
||||||
index 0000000..7bede78
|
index 0000000..72cb946
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/tests/check8.sh
|
+++ b/tests/check8.sh
|
||||||
@@ -0,0 +1,27 @@
|
@@ -0,0 +1,32 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+
|
+
|
||||||
+EXPECT=9
|
+EXPECT=8
|
||||||
+SINDEX=8
|
+SINDEX=8
|
||||||
+STERM=unistd.h
|
+STERM=unistd.h
|
||||||
+STYPE="files including this file"
|
+STYPE="files including this file"
|
||||||
+
|
+
|
||||||
+echo "Searching item $SINDEX, '$STYPE'"
|
+if [ -z "$CSCOPE_BINARY" ]
|
||||||
|
+then
|
||||||
|
+ CSCOPE_BINARY=./src/cscope
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+echo "Searching item $SINDEX, '$STYPE', '$STERM'"
|
||||||
+
|
+
|
||||||
+#Get to the top level directory
|
+#Get to the top level directory
|
||||||
+cd ..
|
+cd ..
|
||||||
@ -305,7 +332,7 @@ index 0000000..7bede78
|
|||||||
+
|
+
|
||||||
+#Count the number of instances of the string 'Copyright'
|
+#Count the number of instances of the string 'Copyright'
|
||||||
+#We expect 178 currently
|
+#We expect 178 currently
|
||||||
+COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
+COUNT=$($CSCOPE_BINARY -R -L -k -$SINDEX$STERM | wc -l)
|
||||||
+
|
+
|
||||||
+if [ $COUNT -ne $EXPECT ]
|
+if [ $COUNT -ne $EXPECT ]
|
||||||
+then
|
+then
|
||||||
@ -317,10 +344,10 @@ index 0000000..7bede78
|
|||||||
+
|
+
|
||||||
diff --git a/tests/check9.sh b/tests/check9.sh
|
diff --git a/tests/check9.sh b/tests/check9.sh
|
||||||
new file mode 100755
|
new file mode 100755
|
||||||
index 0000000..87f59f3
|
index 0000000..a728a32
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/tests/check9.sh
|
+++ b/tests/check9.sh
|
||||||
@@ -0,0 +1,27 @@
|
@@ -0,0 +1,32 @@
|
||||||
+#!/bin/sh
|
+#!/bin/sh
|
||||||
+
|
+
|
||||||
+EXPECT=2
|
+EXPECT=2
|
||||||
@ -328,7 +355,12 @@ index 0000000..87f59f3
|
|||||||
+STERM=reftime
|
+STERM=reftime
|
||||||
+STYPE="assignments to symbol"
|
+STYPE="assignments to symbol"
|
||||||
+
|
+
|
||||||
+echo "Searching item $SINDEX, '$STYPE'"
|
+if [ -z "$CSCOPE_BINARY" ]
|
||||||
|
+then
|
||||||
|
+ CSCOPE_BINARY=./src/cscope
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+echo "Searching item $SINDEX, '$STYPE', '$STERM'"
|
||||||
+
|
+
|
||||||
+#Get to the top level directory
|
+#Get to the top level directory
|
||||||
+cd ..
|
+cd ..
|
||||||
@ -338,7 +370,7 @@ index 0000000..87f59f3
|
|||||||
+
|
+
|
||||||
+#Count the number of instances of the string 'Copyright'
|
+#Count the number of instances of the string 'Copyright'
|
||||||
+#We expect 178 currently
|
+#We expect 178 currently
|
||||||
+COUNT=$(./src/cscope -R -L -$SINDEX$STERM | wc -l)
|
+COUNT=$($CSCOPE_BINARY -R -L -k -$SINDEX$STERM | wc -l)
|
||||||
+
|
+
|
||||||
+if [ $COUNT -ne $EXPECT ]
|
+if [ $COUNT -ne $EXPECT ]
|
||||||
+then
|
+then
|
||||||
@ -348,3 +380,6 @@ index 0000000..87f59f3
|
|||||||
+
|
+
|
||||||
+exit 0
|
+exit 0
|
||||||
+
|
+
|
||||||
|
--
|
||||||
|
2.35.1
|
||||||
|
|
16
SOURCES/dist-4-fix-printf.patch
Normal file
16
SOURCES/dist-4-fix-printf.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
diff --git a/contrib/ocs b/contrib/ocs
|
||||||
|
index e924f4f..bd556b4 100755
|
||||||
|
--- a/contrib/ocs
|
||||||
|
+++ b/contrib/ocs
|
||||||
|
@@ -210,7 +210,7 @@ exp_inc()
|
||||||
|
then
|
||||||
|
for i in `cat ${theInc}`
|
||||||
|
do
|
||||||
|
- printf "-I $i "
|
||||||
|
+ printf -- "-I $i "
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.26.2
|
||||||
|
|
@ -1,28 +1,39 @@
|
|||||||
Summary: C source code tree search and browse tool
|
Summary: C source code tree search and browse tool
|
||||||
Name: cscope
|
Name: cscope
|
||||||
Version: 15.9
|
Version: 15.9
|
||||||
Release: 9%{?dist}
|
Release: 11%{?dist}
|
||||||
Source0: https://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://downloads.sourceforge.net/project/%{name}/%{name}/v%{version}/%{name}-%{version}.tar.gz
|
||||||
URL: http://cscope.sourceforge.net
|
URL: http://cscope.sourceforge.net
|
||||||
License: BSD and GPLv2+
|
License: BSD and GPLv2+
|
||||||
Group: Development/Tools
|
BuildRequires: pkgconf-pkg-config ncurses-devel gcc flex bison m4
|
||||||
BuildRequires: gcc pkgconf-pkg-config ncurses-devel flex bison m4
|
BuildRequires: autoconf automake make
|
||||||
BuildRequires: autoconf automake
|
Requires: emacs-filesystem coreutils ed
|
||||||
Requires: emacs-filesystem coreutils
|
%if !0%{?rhel} && 0%{?fedora} < 36
|
||||||
Requires: ed
|
|
||||||
%if !0%{?rhel}
|
|
||||||
Requires: xemacs-filesystem
|
Requires: xemacs-filesystem
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Patch0: cscope-coverity-fixes.patch
|
# upstream commits from https://sourceforge.net/p/cscope/cscope/commit_browser
|
||||||
Patch1: cscope-selftest.patch
|
Patch1: cscope-1-modified-from-patch-81-Fix-reading-include-files-in-.patch
|
||||||
Patch2: cscope-selftest-repoint.patch
|
Patch2: cscope-2-Cull-extraneous-declaration.patch
|
||||||
Patch3: cscope-version.patch
|
Patch3: cscope-3-Avoid-putting-directories-found-during-header-search.patch
|
||||||
Patch4: cscope-cscope-indexer-help.patch
|
Patch4: cscope-4-Avoid-double-free-via-double-fclose-in-changestring.patch
|
||||||
Patch5: cscope-dblfree.patch
|
Patch5: cscope-5-contrib-ocs-Fix-bashims-Closes-480591.patch
|
||||||
|
Patch6: cscope-6-doc-cscope.1-Fix-hyphens.patch
|
||||||
|
Patch7: cscope-7-fscanner-swallow-function-as-parameters.patch
|
||||||
|
# this patch is not needed - RHEL8 has emacs-26.1
|
||||||
|
# Patch8: cscope-8-emacs-plugin-fixup-GNU-Emacs-27.1-removes-function-p.patch
|
||||||
|
# distrubution patches which were not upstreamed
|
||||||
|
Patch9: dist-1-coverity-fixes.patch
|
||||||
|
Patch10: dist-2-cscope-indexer-help.patch
|
||||||
|
Patch11: dist-3-add-selftests.patch
|
||||||
|
Patch12: dist-4-fix-printf.patch
|
||||||
|
|
||||||
%define cscope_share_path %{_datadir}/cscope
|
%define cscope_share_path %{_datadir}/cscope
|
||||||
|
%if !0%{?rhel} && 0%{?fedora} < 36
|
||||||
%define xemacs_lisp_path %{_datadir}/xemacs/site-packages/lisp
|
%define xemacs_lisp_path %{_datadir}/xemacs/site-packages/lisp
|
||||||
|
%else
|
||||||
|
%define xemacs_lisp_path %nil
|
||||||
|
%endif
|
||||||
%define emacs_lisp_path %{_datadir}/emacs/site-lisp
|
%define emacs_lisp_path %{_datadir}/emacs/site-lisp
|
||||||
%define vim_plugin_path %{_datadir}/vim/vimfiles/plugin
|
%define vim_plugin_path %{_datadir}/vim/vimfiles/plugin
|
||||||
|
|
||||||
@ -43,7 +54,6 @@ autoconf
|
|||||||
automake --add-missing
|
automake --add-missing
|
||||||
%configure
|
%configure
|
||||||
make
|
make
|
||||||
make check
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT %{name}-%{version}.files
|
rm -rf $RPM_BUILD_ROOT %{name}-%{version}.files
|
||||||
@ -60,8 +70,10 @@ for dir in %{xemacs_lisp_path} %{emacs_lisp_path} ; do
|
|||||||
echo "%ghost $dir/xcscope.el*" >> %{name}-%{version}.files
|
echo "%ghost $dir/xcscope.el*" >> %{name}-%{version}.files
|
||||||
done
|
done
|
||||||
|
|
||||||
|
%check
|
||||||
|
make check
|
||||||
|
|
||||||
%files -f %{name}-%{version}.files
|
%files -f %{name}-%{version}.files
|
||||||
%defattr(-,root,root,-)
|
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%dir %{cscope_share_path}
|
%dir %{cscope_share_path}
|
||||||
%{cscope_share_path}/
|
%{cscope_share_path}/
|
||||||
@ -69,7 +81,7 @@ done
|
|||||||
%dir /var/lib/cs
|
%dir /var/lib/cs
|
||||||
%doc AUTHORS COPYING ChangeLog README TODO contrib/cctree.txt
|
%doc AUTHORS COPYING ChangeLog README TODO contrib/cctree.txt
|
||||||
|
|
||||||
%if !0%{?rhel}
|
%if !0%{?rhel} && 0%{?fedora} < 36
|
||||||
%triggerin -- xemacs
|
%triggerin -- xemacs
|
||||||
ln -sf %{cscope_share_path}/xcscope.el %{xemacs_lisp_path}/xcscope.el
|
ln -sf %{cscope_share_path}/xcscope.el %{xemacs_lisp_path}/xcscope.el
|
||||||
%endif
|
%endif
|
||||||
@ -80,7 +92,7 @@ ln -sf %{cscope_share_path}/xcscope.el %{emacs_lisp_path}/xcscope.el
|
|||||||
%triggerin -- vim-filesystem
|
%triggerin -- vim-filesystem
|
||||||
ln -sf %{cscope_share_path}/cctree.vim %{vim_plugin_path}/cctree.vim
|
ln -sf %{cscope_share_path}/cctree.vim %{vim_plugin_path}/cctree.vim
|
||||||
|
|
||||||
%if !0%{?rhel}
|
%if !0%{?rhel} && 0%{?fedora} < 36
|
||||||
%triggerun -- xemacs
|
%triggerun -- xemacs
|
||||||
[ $2 -gt 0 ] && exit 0
|
[ $2 -gt 0 ] && exit 0
|
||||||
rm -f %{xemacs_lisp_path}/xcscope.el
|
rm -f %{xemacs_lisp_path}/xcscope.el
|
||||||
@ -95,6 +107,12 @@ rm -f %{emacs_lisp_path}/xcscope.el
|
|||||||
rm -f %{vim_plugin_path}/cctree.vim
|
rm -f %{vim_plugin_path}/cctree.vim
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Apr 22 2022 Vladis Dronov <vdronov@redhat.com> - 15.9-11
|
||||||
|
- Add another small distrubution patch (bz 2074437)
|
||||||
|
|
||||||
|
* Mon Apr 11 2022 Vladis Dronov <vdronov@redhat.com> - 15.9-10
|
||||||
|
- Add missing upstream patches (bz 2074437)
|
||||||
|
|
||||||
* Wed Oct 21 2020 Vladis Dronov <vdronov@redhat.com> - 15.9-9
|
* Wed Oct 21 2020 Vladis Dronov <vdronov@redhat.com> - 15.9-9
|
||||||
- Remove another fclose() to please covscan (bz1886165)
|
- Remove another fclose() to please covscan (bz1886165)
|
||||||
|
|
||||||
@ -148,8 +166,7 @@ rm -f %{vim_plugin_path}/cctree.vim
|
|||||||
* Wed Aug 05 2015 Neil Horman <nhorman@redhat.com> - 15.8b-1
|
* Wed Aug 05 2015 Neil Horman <nhorman@redhat.com> - 15.8b-1
|
||||||
- Update to latest upstream
|
- Update to latest upstream
|
||||||
|
|
||||||
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> -
|
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 15.8-12
|
||||||
* 15.8-12
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||||
|
|
||||||
* Tue Sep 30 2014 Neil Horman <nhorman@redhat.com> - 15.8-11
|
* Tue Sep 30 2014 Neil Horman <nhorman@redhat.com> - 15.8-11
|
||||||
|
Loading…
Reference in New Issue
Block a user