Hello, I am looking for a person who knows enough to verify a ELisp patch. The patch is supposed to fix a problem of space in file names [1], upstream unfortunately does not have the in-house expertise [2].
Volunteers? Regards, [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=579531 [2] https://sourceforge.net/p/cscope/bugs/282/#9a4f/f853 -- Stéphane Aulery
diff -r -u cscope-15.7a/contrib/xcscope/cscope-indexer change/cscope-15.7a/contrib/xcscope/cscope-indexer --- cscope-15.7a/contrib/xcscope/cscope-indexer 2001-06-28 12:39:48.000000000 +0800 +++ change/cscope-15.7a/contrib/xcscope/cscope-indexer 2010-04-28 17:46:02.000000000 +0800 @@ -139,7 +139,8 @@ ) | \ egrep -i '\.([chly](xx|pp)*|cc|hh)$' | \ sed -e '/\/CVS\//d' -e '/\/RCS\//d' -e 's/^\.\///' | \ - sort > $LIST_FILE + sort | \ + sed -e 's/.* .*/\"&\"/' > $LIST_FILE if [ "X$VERBOSE" != "X" ] then diff -r -u cscope-15.7a/contrib/xcscope/xcscope.el change/cscope-15.7a/contrib/xcscope/xcscope.el --- cscope-15.7a/contrib/xcscope/xcscope.el 2002-04-11 00:59:00.000000000 +0800 +++ change/cscope-15.7a/contrib/xcscope/xcscope.el 2010-04-28 17:47:45.000000000 +0800 @@ -1750,7 +1750,7 @@ ;; This should always match. (if (string-match - "^\\([^ \t]+\\)[ \t]+\\([^ \t]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\(.*\\)\n" + "^\\([^\t]+\\)[ \t]+\\([^ \t]+\\)[ \t]+\\([0-9]+\\)[ \t]+\\(.*\\)\n" line) (progn (let (str) diff -r -u cscope-15.7a/src/command.c change/cscope-15.7a/src/command.c --- cscope-15.7a/src/command.c 2009-04-10 21:40:36.000000000 +0800 +++ change/cscope-15.7a/src/command.c 2010-04-28 17:39:19.000000000 +0800 @@ -728,7 +728,7 @@ *oldfile = '\0'; seekline(1); for (i = 0; - fscanf(refsfound, "%" PATHLEN_STR "s%*s%" NUMLEN_STR "s%*[^\n]", newfile, linenum) == 2; + fscanf(refsfound, "%" PATHLEN_STR "[^\t]\t%*s%" NUMLEN_STR "s%*[^\n]\n", newfile, linenum) == 2; ++i) { /* see if the line is to be changed */ if (change[i] == YES) { @@ -884,8 +884,9 @@ filelen = 4; /* strlen("File") */ fcnlen = 8; /* strlen("Function") */ numlen = 0; - while ((i = fscanf(refsfound, "%250s%250s%5s %5000[^\n]", file, - function, linenum, tempstring)) != EOF) { + + while ((i = fscanf(refsfound, "%250[^\t]\t%250s %5s %5000[^\n]\n", file, + function, linenum, tempstring)) != EOF) { if (i != 4 || !isgraph((unsigned char) *file) || !isgraph((unsigned char) *function) || diff -r -u cscope-15.7a/src/display.c change/cscope-15.7a/src/display.c --- cscope-15.7a/src/display.c 2009-04-10 21:40:36.000000000 +0800 +++ change/cscope-15.7a/src/display.c 2010-04-28 17:21:24.000000000 +0800 @@ -224,7 +224,7 @@ disprefs < mdisprefs && screenline <= lastdispline; ++disprefs, ++screenline) { /* read the reference line */ - if (fscanf(refsfound, "%" PATHLEN_STR "s%" PATHLEN_STR "s%" NUMLEN_STR "s %" TEMPSTRING_LEN_STR "[^\n]", file, function, + if (fscanf(refsfound, "%" PATHLEN_STR "[^\t]\t%" PATLEN_STR "s%" NUMLEN_STR "s %" TEMPSTRING_LEN_STR "[^\n]\n", file, function, linenum, tempstring) < 4) { break; } diff -r -u cscope-15.7a/src/edit.c change/cscope-15.7a/src/edit.c --- cscope-15.7a/src/edit.c 2009-04-10 21:40:36.000000000 +0800 +++ change/cscope-15.7a/src/edit.c 2010-04-28 14:49:06.000000000 +0800 @@ -60,7 +60,7 @@ seekline(i + topline); /* get the file name and line number */ - if (fscanf(refsfound, "%" PATHLEN_STR "s%*s%" NUMLEN_STR "s", file, linenum) == 2) { + if (fscanf(refsfound, "%" PATHLEN_STR "[^\t]\t%*s%" NUMLEN_STR "s", file, linenum) == 2) { edit(file, linenum); /* edit it */ } seekline(topline); /* restore the line pointer */ @@ -83,7 +83,7 @@ seekline(1); /* get each file name and line number */ - while (fscanf(refsfound, "%" PATHLEN_STR "s%*s%" NUMLEN_STR "s%*[^\n]", file, linenum) == 2) { + while (fscanf(refsfound, "%" PATHLEN_STR "[^\t]\t%*s%" NUMLEN_STR "s%*[^\n]\n", file, linenum) == 2) { edit(file, linenum); /* edit it */ if (editallprompt == YES) { addstr("Type ^D to stop editing all lines, or any other character to continue: "); diff -r -u cscope-15.7a/src/find.c change/cscope-15.7a/src/find.c --- cscope-15.7a/src/find.c 2009-04-10 21:40:36.000000000 +0800 +++ change/cscope-15.7a/src/find.c 2010-04-28 17:18:06.000000000 +0800 @@ -506,7 +506,7 @@ char *file = filepath(srcfiles[i]); progress("Search", searchcount, nsrcfiles); - if (egrep(file, refsfound, "%s <unknown> %ld ") < 0) { + if (egrep(file, refsfound, "%s\t<unknown> %ld ") < 0) { posterr ("Cannot open file %s", file); } } @@ -532,7 +532,7 @@ s = srcfiles[i]; } if (regexec (®exp, s, (size_t)0, NULL, 0) == 0) { - (void) fprintf(refsfound, "%s <unknown> 1 <unknown>\n", + (void) fprintf(refsfound, "%s\t<unknown> 1 <unknown>\n", srcfiles[i]); } } @@ -765,7 +765,7 @@ else { output = nonglobalrefs; } - (void) fprintf(output, "%s %s ", file, func); + (void) fprintf(output, "%s\t%s ", file, func); putsource(seemore, output); } @@ -1185,7 +1185,7 @@ case FCNCALL: /* function call */ /* output the file name */ - (void) fprintf(refsfound, "%s ", file); + (void) fprintf(refsfound, "%s\t", file); /* output the function name */ skiprefchar();