rpms/cscope/F-12 cscope-15.6-argv-adjust.patch, NONE, 1.1 cscope-15.6-linemode-options-readd.patch, NONE, 1.1 cscope.spec, 1.40, 1.41
Neil Horman
nhorman at fedoraproject.org
Fri Dec 18 13:42:04 UTC 2009
Author: nhorman
Update of /cvs/pkgs/rpms/cscope/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27061
Modified Files:
cscope.spec
Added Files:
cscope-15.6-argv-adjust.patch
cscope-15.6-linemode-options-readd.patch
Log Message:
Resoves: bz546993 bz547023
cscope-15.6-argv-adjust.patch:
main.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
--- NEW FILE cscope-15.6-argv-adjust.patch ---
diff -up cscope-15.6/src/main.c.orig cscope-15.6/src/main.c
--- cscope-15.6/src/main.c.orig 2009-12-18 08:28:46.000000000 -0500
+++ cscope-15.6/src/main.c 2009-12-18 08:29:15.000000000 -0500
@@ -145,17 +145,15 @@ struct option lopts[] = {
char ** parse_options(int *argc, char **argv)
{
int opt;
- int optind;
+ int longind;
char path[PATHLEN + 1]; /* file path */
char *s;
- int args_handled = 1;
int argcc = *argc;
while ((opt = getopt_long(argcc, argv,
"hVbcCdeF:f:I:i:kLl0:1:2:3:4:5:6:7:8:9:P:p:qRs:TUuv",
- lopts, &optind)) != -1) {
- args_handled++;
+ lopts, &longind)) != -1) {
switch(opt) {
case '?':
@@ -248,8 +246,8 @@ char ** parse_options(int *argc, char **
* args. Its ugly, but we need to do it so that the rest
* of the main routine doesn't get all confused
*/
- *argc = *argc - args_handled;
- return &argv[*argc];
+ *argc = *argc - optind;
+ return &argv[optind];
}
#endif
cscope-15.6-linemode-options-readd.patch:
main.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
--- NEW FILE cscope-15.6-linemode-options-readd.patch ---
diff -up cscope-15.6/src/main.c.orig cscope-15.6/src/main.c
--- cscope-15.6/src/main.c.orig 2009-12-18 08:32:02.000000000 -0500
+++ cscope-15.6/src/main.c 2009-12-18 08:32:20.000000000 -0500
@@ -160,6 +160,25 @@ char ** parse_options(int *argc, char **
usage();
myexit(1);
break;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ /* The input fields numbers for line mode operation */
+ field = opt - '0';
+ if (strlen(optarg) > PATHLEN) {
+ postfatal("\
+ cscope: pattern too long, cannot be > \
+ %d characters\n", PATLEN);
+ }
+ strcpy(Pattern, optarg);
+ break;
case 'b': /* only build the cross-reference */
buildonly = YES;
linemode = YES;
Index: cscope.spec
===================================================================
RCS file: /cvs/pkgs/rpms/cscope/F-12/cscope.spec,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -p -r1.40 -r1.41
--- cscope.spec 9 Dec 2009 20:38:08 -0000 1.40
+++ cscope.spec 18 Dec 2009 13:42:04 -0000 1.41
@@ -1,7 +1,7 @@
Summary: C source code tree search and browse tool
Name: cscope
Version: 15.6
-Release: 6%{?dist}
+Release: 7%{?dist}
Source0: http://unc.dl.sourceforge.net/sourceforge/cscope/cscope-15.6.tar.gz
URL: http://cscope.sourceforge.net
License: BSD
@@ -20,6 +20,8 @@ Patch3:cscope-15.6-sigwinch-linemode.pat
Patch4:cscope-15.6-qrebuild.patch
Patch5:cscope-15.6-incdir-overflow.patch
Patch6:cscope-15.6-invalid-opt.patch
+Patch7:cscope-15.6-argv-adjust.patch
+Patch8:cscope-15.6-linemode-options-readd.patch
%description
cscope is a mature, ncurses based, C source code tree browsing tool. It
@@ -37,9 +39,11 @@ matches for use in file editing.
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
+%patch8 -p1
%build
-export CFLAGS="-g -O2 -D_GNU_SOURCE"
+export CFLAGS="%{optflags} -D_GNU_SOURCE"
%configure
make
@@ -86,7 +90,11 @@ rm -f %{xemacs_lisp_path}/xcscope.el
rm -f %{emacs_lisp_path}/xcscope.el
%changelog
-* Wed Dec 09 2009 Neil Horman <nhorman at redhat.com>
+* Fri Dec 18 2009 Neil Horman <nhorman at redhat.com> 15.6-7
+- Fixed adjustment of argv that led to bad commandline behavior (bz 547023)
+- Added missing linemode operations to parse_options (bz 546993)
+
+* Wed Dec 09 2009 Neil Horman <nhorman at redhat.com> 15.6-6
- Fixed broken parsing of invalid options (bz 545816)
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 15.6-5
More information about the fedora-extras-commits
mailing list