OBS User unknown 2009-02-16 00:14:51 +00:00 committed by Git OBS Bridge
parent 719ea179a5
commit a470e8b7e0
10 changed files with 123 additions and 97 deletions

View File

@ -1,29 +0,0 @@
--- src/main.c 2008-06-07 14:19:34.000000000 +0400
+++ src/main.c.my 2008-06-07 14:19:21.000000000 +0400
@@ -153,12 +153,7 @@
yyout = stdout;
/* save the command name for messages */
argv0 = argv[0];
-#if defined(KEY_RESIZE) && !defined(__DJGPP__)
- winch_action.sa_sigaction = sigwinch_handler;
- sigemptyset(&winch_action.sa_mask);
- winch_action.sa_flags = SA_SIGINFO;
- sigaction(SIGWINCH,&winch_action,NULL);
-#endif
+
/* set the options */
while (--argc > 0 && (*++argv)[0] == '-') {
/* HBB 20030814: add GNU-style --help and --version options */
@@ -402,6 +397,12 @@
}
if (linemode == NO) {
+#if defined(KEY_RESIZE) && !defined(__DJGPP__)
+ winch_action.sa_sigaction = sigwinch_handler;
+ sigemptyset(&winch_action.sa_mask);
+ winch_action.sa_flags = SA_SIGINFO;
+ sigaction(SIGWINCH,&winch_action,NULL);
+#endif
signal(SIGINT, SIG_IGN); /* ignore interrupts */
signal(SIGPIPE, SIG_IGN);/* | command can cause pipe signal */

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:104b2beb4ee60b839fe04f50d94a39932b628159ea66929bba8594814e28604f
size 332675

View File

@ -1,6 +1,8 @@
--- src/global.h Index: src/global.h
===================================================================
--- src/global.h.orig
+++ src/global.h +++ src/global.h
@@ -360,7 +360,7 @@ @@ -370,7 +370,7 @@ void mousecleanup(void);
void mousemenu(void); void mousemenu(void);
void mouseinit(void); void mouseinit(void);
void mousereinit(void); void mousereinit(void);

View File

@ -1,6 +1,8 @@
--- src/build.c Index: src/build.c
===================================================================
--- src/build.c.orig
+++ src/build.c +++ src/build.c
@@ -223,7 +223,7 @@ @@ -223,7 +223,7 @@ build(void)
if (strcmp(currentdir, home) == 0) { if (strcmp(currentdir, home) == 0) {
strcpy(newdir, "$HOME"); strcpy(newdir, "$HOME");
} else if (strncmp(currentdir, home, strlen(home)) == 0) { } else if (strncmp(currentdir, home, strlen(home)) == 0) {
@ -9,7 +11,7 @@
} }
/* sort the source file names (needed for rebuilding) */ /* sort the source file names (needed for rebuilding) */
qsort(srcfiles, nsrcfiles, sizeof(char *), compare); qsort(srcfiles, nsrcfiles, sizeof(char *), compare);
@@ -454,7 +454,7 @@ @@ -456,7 +456,7 @@ cscope: converting to new symbol databas
} }
fstat(fileno(postings), &statstruct); fstat(fileno(postings), &statstruct);
fclose(postings); fclose(postings);
@ -18,9 +20,11 @@
if ((postings = mypopen(sortcommand, "r")) == NULL) { if ((postings = mypopen(sortcommand, "r")) == NULL) {
fprintf(stderr, "cscope: cannot open pipe to sort command\n"); fprintf(stderr, "cscope: cannot open pipe to sort command\n");
cannotindex(); cannotindex();
--- src/command.c Index: src/command.c
===================================================================
--- src/command.c.orig
+++ src/command.c +++ src/command.c
@@ -739,7 +739,7 @@ @@ -739,7 +739,7 @@ changestring(void)
/* make sure it can be changed */ /* make sure it can be changed */
if (access(newfile, WRITE) != 0) { if (access(newfile, WRITE) != 0) {
@ -29,9 +33,11 @@
postmsg(msg); postmsg(msg);
anymarked = NO; anymarked = NO;
break; break;
--- src/dir.c Index: src/dir.c
===================================================================
--- src/dir.c.orig
+++ src/dir.c +++ src/dir.c
@@ -139,7 +139,7 @@ @@ -140,7 +140,7 @@ sourcedir(char *dirlist)
/* compute its path from higher view path source dirs */ /* compute its path from higher view path source dirs */
for (i = 1; i < nvpsrcdirs; ++i) { for (i = 1; i < nvpsrcdirs; ++i) {
@ -40,7 +46,7 @@
PATHLEN - 2 - dir_len, PATHLEN - 2 - dir_len,
srcdirs[i], dir); srcdirs[i], dir);
addsrcdir(path); addsrcdir(path);
@@ -207,7 +207,7 @@ @@ -208,7 +208,7 @@ includedir(char *dirlist)
/* compute its path from higher view path source dirs */ /* compute its path from higher view path source dirs */
for (i = 1; i < nvpsrcdirs; ++i) { for (i = 1; i < nvpsrcdirs; ++i) {
@ -49,7 +55,7 @@
PATHLEN - 2 - dir_len, PATHLEN - 2 - dir_len,
srcdirs[i], dir); srcdirs[i], dir);
addincdir(dir, path); addincdir(dir, path);
@@ -482,8 +482,6 @@ @@ -483,8 +483,6 @@ scan_dir(const char *adir, BOOL recurse_
DIR *dirfile; DIR *dirfile;
int adir_len = strlen(adir); int adir_len = strlen(adir);
@ -58,7 +64,7 @@
if ((dirfile = opendir(adir)) != NULL) { if ((dirfile = opendir(adir)) != NULL) {
struct dirent *entry; struct dirent *entry;
char path[PATHLEN + 1]; char path[PATHLEN + 1];
@@ -494,7 +492,7 @@ @@ -495,7 +493,7 @@ scan_dir(const char *adir, BOOL recurse_
&& (strcmp("..",entry->d_name) != 0)) { && (strcmp("..",entry->d_name) != 0)) {
struct stat buf; struct stat buf;
@ -67,7 +73,7 @@
PATHLEN - 2 - adir_len, PATHLEN - 2 - adir_len,
entry->d_name); entry->d_name);
@@ -604,14 +602,14 @@ @@ -607,14 +605,14 @@ incfile(char *file, char *type)
/* search for the file in the #include directory list */ /* search for the file in the #include directory list */
for (i = 0; i < nincdirs; ++i) { for (i = 0; i < nincdirs; ++i) {
/* don't include the file from two directories */ /* don't include the file from two directories */
@ -84,7 +90,7 @@
PATHLEN - 2 - file_len, incdirs[i], PATHLEN - 2 - file_len, incdirs[i],
file); file);
if (access(compath(path), READ) == 0) { if (access(compath(path), READ) == 0) {
@@ -659,7 +657,7 @@ @@ -678,7 +676,7 @@ inviewpath(char *file)
/* compute its path from higher view path source dirs */ /* compute its path from higher view path source dirs */
for (i = 1; i < nvpsrcdirs; ++i) { for (i = 1; i < nvpsrcdirs; ++i) {
@ -92,10 +98,12 @@
+ snprintf(path, sizeof(path), "%.*s/%s", + snprintf(path, sizeof(path), "%.*s/%s",
PATHLEN - 2 - file_len, srcdirs[i], PATHLEN - 2 - file_len, srcdirs[i],
file); file);
if (access(compath(path), READ) == 0) { if (accessible_file(path)) {
--- src/display.c Index: src/display.c
===================================================================
--- src/display.c.orig
+++ src/display.c +++ src/display.c
@@ -478,20 +478,20 @@ @@ -478,20 +478,20 @@ search(void)
/* see if it is empty */ /* see if it is empty */
if ((c = getc(refsfound)) == EOF) { if ((c = getc(refsfound)) == EOF) {
if (findresult != NULL) { if (findresult != NULL) {
@ -121,7 +129,7 @@
fields[field].text2, Pattern); fields[field].text2, Pattern);
} }
return(NO); return(NO);
@@ -527,17 +527,17 @@ @@ -527,17 +527,17 @@ progress(char *what, long current, long
move(MSGLINE, 0); move(MSGLINE, 0);
clrtoeol(); clrtoeol();
addstr(what); addstr(what);
@ -142,7 +150,7 @@
} }
start = now; start = now;
@@ -575,7 +575,7 @@ @@ -575,7 +575,7 @@ myperror(char *text)
s = sys_errlist[errno]; s = sys_errlist[errno];
} }
#endif #endif
@ -151,9 +159,11 @@
postmsg(msg); postmsg(msg);
} }
--- src/edit.c Index: src/edit.c
===================================================================
--- src/edit.c.orig
+++ src/edit.c +++ src/edit.c
@@ -105,9 +105,9 @@ @@ -105,9 +105,9 @@ edit(char *file, char *linenum)
char *s; char *s;
file = filepath(file); file = filepath(file);
@ -165,7 +175,7 @@
/* if this is the more or page commands */ /* if this is the more or page commands */
if (strcmp(s = mybasename(editor), "more") == 0 || strcmp(s, "page") == 0) { if (strcmp(s = mybasename(editor), "more") == 0 || strcmp(s, "page") == 0) {
@@ -132,7 +132,7 @@ @@ -132,7 +132,7 @@ filepath(char *file)
static char path[PATHLEN + 1]; static char path[PATHLEN + 1];
if (prependpath != NULL && *file != '/') { if (prependpath != NULL && *file != '/') {
@ -174,9 +184,11 @@
file = path; file = path;
} }
return(file); return(file);
--- src/exec.c Index: src/exec.c
===================================================================
--- src/exec.c.orig
+++ src/exec.c +++ src/exec.c
@@ -123,7 +123,7 @@ @@ -123,7 +123,7 @@ myexecvp(char *a, char **args)
/* execute the program or shell script */ /* execute the program or shell script */
execvp(a, args); /* returns only on failure */ execvp(a, args); /* returns only on failure */
@ -185,9 +197,11 @@
perror(msg); /* display the reason */ perror(msg); /* display the reason */
askforreturn(); /* wait until the user sees the message */ askforreturn(); /* wait until the user sees the message */
myexit(1); /* exit the child */ myexit(1); /* exit the child */
--- src/find.c Index: src/find.c
===================================================================
--- src/find.c.orig
+++ src/find.c +++ src/find.c
@@ -673,7 +673,7 @@ @@ -673,7 +673,7 @@ findinit(char *pattern)
/* must be an exact match */ /* must be an exact match */
/* note: regcomp doesn't recognize ^*keypad$ as a syntax error /* note: regcomp doesn't recognize ^*keypad$ as a syntax error
unless it is given as a single arg */ unless it is given as a single arg */
@ -196,9 +210,11 @@
if (regcomp (&regexp, buf, REG_EXTENDED | REG_NOSUB) != 0) { if (regcomp (&regexp, buf, REG_EXTENDED | REG_NOSUB) != 0) {
return(REGCMPERROR); return(REGCMPERROR);
} }
--- src/main.c Index: src/main.c
===================================================================
--- src/main.c.orig
+++ src/main.c +++ src/main.c
@@ -389,12 +389,12 @@ @@ -388,12 +388,12 @@ cscope: Could not create private temp di
* used instead of failing to open a non-existant database in * used instead of failing to open a non-existant database in
* the home directory * the home directory
*/ */
@ -214,7 +230,7 @@
invpost = my_strdup(path); invpost = my_strdup(path);
} }
} }
@@ -735,7 +735,7 @@ @@ -741,7 +741,7 @@ cannotwrite(char *file)
#else #else
char *msg = mymalloc(50 + strlen(file)); char *msg = mymalloc(50 + strlen(file));
@ -223,9 +239,11 @@
#endif #endif
myperror(msg); /* display the reason */ myperror(msg); /* display the reason */
--- src/vpaccess.c Index: src/vpaccess.c
===================================================================
--- src/vpaccess.c.orig
+++ src/vpaccess.c +++ src/vpaccess.c
@@ -49,7 +49,7 @@ @@ -49,7 +49,7 @@ vpaccess(char *path, mode_t amode)
if ((returncode = access(path, amode)) == -1 && path[0] != '/') { if ((returncode = access(path, amode)) == -1 && path[0] != '/') {
vpinit(NULL); vpinit(NULL);
for (i = 1; i < vpndirs; i++) { for (i = 1; i < vpndirs; i++) {
@ -234,9 +252,11 @@
if ((returncode = access(buf, amode)) != -1) { if ((returncode = access(buf, amode)) != -1) {
break; break;
} }
--- src/vpfopen.c Index: src/vpfopen.c
===================================================================
--- src/vpfopen.c.orig
+++ src/vpfopen.c +++ src/vpfopen.c
@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@ vpfopen(char *filename, char *type)
) { ) {
vpinit(NULL); vpinit(NULL);
for (i = 1; i < vpndirs; i++) { for (i = 1; i < vpndirs; i++) {
@ -245,9 +265,11 @@
if ((returncode = myfopen(buf, type)) != NULL) { if ((returncode = myfopen(buf, type)) != NULL) {
break; break;
} }
--- src/vpopen.c Index: src/vpopen.c
===================================================================
--- src/vpopen.c.orig
+++ src/vpopen.c +++ src/vpopen.c
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@ vpopen(char *path, int oflag)
oflag == OPENFLAG_READ) { oflag == OPENFLAG_READ) {
vpinit(NULL); vpinit(NULL);
for (i = 1; i < vpndirs; i++) { for (i = 1; i < vpndirs; i++) {

View File

@ -1,7 +1,9 @@
--- src/vpinit.c Index: src/vpinit.c
===================================================================
--- src/vpinit.c.orig
+++ src/vpinit.c +++ src/vpinit.c
@@ -110,7 +110,13 @@ @@ -111,7 +111,13 @@ vpinit(char *current_dir)
vpath = stralloc(vpath); vpath = my_strdup(vpath);
/* split the view path into nodes */ /* split the view path into nodes */
- for (i = 0, s = vpath; *s != '\0'; ++i) { - for (i = 0, s = vpath; *s != '\0'; ++i) {
@ -15,7 +17,7 @@
vpdirs[i] = s; vpdirs[i] = s;
while (*s != '\0' && *++s != ':') { while (*s != '\0' && *++s != ':') {
if (*s == '\n') { if (*s == '\n') {
@@ -118,6 +124,16 @@ @@ -119,6 +125,16 @@ vpinit(char *current_dir)
} }
} }
if (*s != '\0') { if (*s != '\0') {

3
cscope-15.7.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6a657a320f6601c28875aed2a487d55fe14b467b18f4631546016bb60e08cf33
size 243576

View File

@ -1,11 +1,13 @@
--- src/main.c Index: src/main.c
===================================================================
--- src/main.c.orig
+++ src/main.c +++ src/main.c
@@ -379,6 +379,8 @@ @@ -375,6 +375,8 @@ cscope: Could not create private temp di
} }
/* cleanup on the hangup signal */ /* cleanup on the hangup signal */
signal(SIGHUP, myexit); signal(SIGHUP, myexit);
+ /* and on termination signal */ + /* and on termination signal */
+ signal(SIGTERM, myexit); + signal(SIGTERM, myexit);
/* if the database path is relative and it can't be created */ /* ditto the TERM signal */
if (reffile[0] != '/' && access(".", WRITE) != 0) { signal(SIGTERM, myexit);

View File

@ -1,6 +1,8 @@
--- cscope-15.6/src/mypopen.c Index: cscope-15.7/src/mypopen.c
+++ cscope-15.6/src/mypopen.c ===================================================================
@@ -160,7 +160,7 @@ --- cscope-15.7.orig/src/mypopen.c
+++ cscope-15.7/src/mypopen.c
@@ -160,7 +160,7 @@ mypopen(char *cmd, char *mode)
fcntl(yourside, F_DUPFD, stdio); fcntl(yourside, F_DUPFD, stdio);
#endif #endif
close(yourside); close(yourside);

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Sat Feb 14 11:12:26 CEST 2009 - puzel@suse.cz
- update to 15.7
- bugfix release
- see /usr/share/doc/packages/cscope/ChangeLog for details
- added flex and bison to BR
- install ocsc helper script to bindir
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Jun 18 16:17:26 CEST 2008 - anosek@suse.cz Wed Jun 18 16:17:26 CEST 2008 - anosek@suse.cz

View File

@ -1,10 +1,17 @@
# #
# spec file for package cscope (Version 15.6) # spec file for package cscope (Version 15.7)
# #
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
# #
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Please submit bugfixes or comments via http://bugs.opensuse.org/
# #
@ -13,19 +20,20 @@
Name: cscope Name: cscope
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: flex
BuildRequires: bison
License: BSD 3-Clause License: BSD 3-Clause
Group: Development/Tools/Navigators Group: Development/Tools/Navigators
AutoReqProv: on AutoReqProv: on
Version: 15.6 Version: 15.7
Release: 95 Release: 1
Summary: Interactive Tool for Browsing C Source Code Summary: Interactive Tool for Browsing C Source Code
Source: cscope-%{version}.tar.bz2 Source: %{name}-%{version}.tar.bz2
Patch1: cscope-null.patch Patch1: %{name}-null.patch
Patch2: cscope-%{version}-gcc-warnings.patch Patch2: %{name}-%{version}-gcc-warnings.patch
Patch3: cscope-%{version}-vpath.patch Patch3: %{name}-%{version}-vpath.patch
Patch4: cscope-%{version}-sprintf.patch Patch4: %{name}-%{version}-sprintf.patch
Patch5: cscope-cleanup_on_sigterm.patch Patch5: %{name}-cleanup_on_sigterm.patch
Patch6: %{name}-%{version}-sigwinch-linemode.patch
Url: http://cscope.sourceforge.net/ Url: http://cscope.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define _prefix /usr %define _prefix /usr
@ -51,19 +59,20 @@ Authors:
%patch3 %patch3
%patch4 %patch4
%patch5 %patch5
%patch6
%build %build
%{?suse_update_config:%{suse_update_config}} %{?suse_update_config:%{suse_update_config}}
CFLAGS="$RPM_OPT_FLAGS" \ %configure
./configure
make make
%install %install
mkdir -p $RPM_BUILD_ROOT%{_prefix}/bin mkdir -p $RPM_BUILD_ROOT%{_bindir}
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1 mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -m 755 src/cscope $RPM_BUILD_ROOT%{_prefix}/bin/cscope install -m 755 src/cscope $RPM_BUILD_ROOT%{_bindir}/cscope
install -m 644 doc/cscope.1 $RPM_BUILD_ROOT%{_mandir}/man1/cscope.1 install -m 644 doc/cscope.1 $RPM_BUILD_ROOT%{_mandir}/man1/cscope.1
pushd contrib
%makeinstall
popd
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -72,9 +81,16 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root) %defattr(-,root,root)
%doc TODO COPYING ChangeLog AUTHORS README NEWS INSTALL %doc TODO COPYING ChangeLog AUTHORS README NEWS INSTALL
%doc %{_mandir}/man1/cscope.1.gz %doc %{_mandir}/man1/cscope.1.gz
%{_prefix}/bin/cscope %{_bindir}/cscope
%{_bindir}/ocs
%changelog %changelog
* Sat Feb 14 2009 puzel@suse.cz
- update to 15.7
- bugfix release
- see /usr/share/doc/packages/cscope/ChangeLog for details
- added flex and bison to BR
- install ocsc helper script to bindir
* Wed Jun 18 2008 anosek@suse.cz * Wed Jun 18 2008 anosek@suse.cz
- fixed cscope segfaults when detaching from screen (bnc#398268) - fixed cscope segfaults when detaching from screen (bnc#398268)
- applied attached patch (sigwinch-linemode.patch) - applied attached patch (sigwinch-linemode.patch)