From 6639cc3d639f74d4983eaeb91a9338ae614471ff Mon Sep 17 00:00:00 2001 From: Neil Horman Date: Tue, 5 Oct 2004 17:10:33 +0000 Subject: [PATCH] fixing inverted patch to be upstream friendly --- cscope-15.5-inverted.patch | 48 ++++++++++++++++++++++++++------------ cscope.spec | 6 ++++- 2 files changed, 38 insertions(+), 16 deletions(-) diff --git a/cscope-15.5-inverted.patch b/cscope-15.5-inverted.patch index 9a74a00..2ede821 100644 --- a/cscope-15.5-inverted.patch +++ b/cscope-15.5-inverted.patch @@ -1,15 +1,33 @@ ---- cscope-15.5/src/dir.c.orig 2004-09-28 14:43:17.706427680 -0400 -+++ cscope-15.5/src/dir.c 2004-09-28 15:29:27.566344968 -0400 -@@ -504,7 +505,11 @@ - #endif - && issrcfile(mybasename(path)) - && infilelist(path) == NO) { -- addsrcfile(path); -+ /* if the file is a symlink, make sure -+ * it points to a real file */ -+ if(S_ISREG(buf.st_mode) || -+ (S_ISLNK(buf.st_mode) && (stat(path,&buf) == 0))) -+ addsrcfile(path); - } - } - } +--- cscope/src/crossref.c.orig 2003-04-29 10:08:45.000000000 -0400 ++++ cscope/src/crossref.c 2004-10-05 10:37:19.958700472 -0400 +@@ -95,10 +95,16 @@ + int token; /* current token */ + struct stat st; + ++ filename = srcfile; ++ putfilename(srcfile); /* output the file name */ ++ dbputc('\n'); ++ dbputc('\n'); ++ + if (! ((stat(srcfile, &st) == 0) + && S_ISREG(st.st_mode))) { + cannotopen(srcfile); + errorsfound = YES; ++ dbputc('\t'); + return; + } + +@@ -107,12 +113,9 @@ + if ((yyin = myfopen(srcfile, "r")) == NULL) { + cannotopen(srcfile); + errorsfound = YES; ++ dbputc('\t'); + return; + } +- filename = srcfile; /* save the file name for warning messages */ +- putfilename(srcfile); /* output the file name */ +- dbputc('\n'); +- dbputc('\n'); + + /* read the source file */ + initscanner(srcfile); diff --git a/cscope.spec b/cscope.spec index bf927a4..17aa156 100644 --- a/cscope.spec +++ b/cscope.spec @@ -1,7 +1,7 @@ Summary: C source code tree search and browse tool Name: cscope Version: 15.5 -Release: 2 +Release: 3 Source0: http://unc.dl.sourceforge.net/sourceforge/cscope/cscope-15.5.tar.gz URL: http://cscope.sourceforge.net License: BSD @@ -81,6 +81,10 @@ rm -f %{xemacs_lisp_path}/xcscope.el rm -f %{emacs_lisp_path}/xcscope.el %changelog +* Tue Oct 5 2004 Neil Horman +- modified cscope-15.5.-inverted patch to be upstream + friendly + * Tue Sep 28 2004 Neil Horman - fixed inverted index bug (bz 133942)