You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(2) |
Feb
(9) |
Mar
(6) |
Apr
(8) |
May
(7) |
Jun
(49) |
Jul
(36) |
Aug
(8) |
Sep
(4) |
Oct
(11) |
Nov
(3) |
Dec
|
| 2002 |
Jan
(8) |
Feb
|
Mar
(7) |
Apr
(2) |
May
|
Jun
(3) |
Jul
(9) |
Aug
(2) |
Sep
|
Oct
(3) |
Nov
|
Dec
(2) |
| 2003 |
Jan
(6) |
Feb
|
Mar
(2) |
Apr
(3) |
May
|
Jun
(5) |
Jul
|
Aug
(6) |
Sep
(6) |
Oct
(2) |
Nov
|
Dec
|
| 2004 |
Jan
(2) |
Feb
(12) |
Mar
|
Apr
(10) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(2) |
Dec
(4) |
| 2005 |
Jan
(4) |
Feb
(6) |
Mar
(3) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
(2) |
Dec
|
| 2006 |
Jan
|
Feb
(2) |
Mar
|
Apr
(12) |
May
(2) |
Jun
|
Jul
(6) |
Aug
(4) |
Sep
(11) |
Oct
(10) |
Nov
|
Dec
|
| 2007 |
Jan
(4) |
Feb
(2) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2008 |
Jan
|
Feb
(2) |
Mar
(4) |
Apr
(2) |
May
|
Jun
(6) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(2) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(8) |
| 2010 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2013 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(5) |
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
|
From: Hans-Bernhard B. <br...@us...> - 2002-10-29 16:45:52
|
Update of /cvsroot/cscope/cscope/src
In directory usw-pr-cvs1:/tmp/cvs-serv24988/src
Modified Files:
display.c main.c
Log Message:
Two bugfixes: Missing $HOME, and single very long line output
Index: display.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/display.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** display.c 13 Mar 2002 18:54:40 -0000 1.20
--- display.c 29 Oct 2002 16:45:50 -0000 1.21
***************
*** 163,177 ****
move(0, COLS - (int) sizeof(helpstring));
addstr(helpstring);
! }
! /* if no references were found */
! else if (totallines == 0) {
/* redisplay the last message */
addstr(lastmsg);
! }
! else { /* display the pattern */
if (changing == YES) {
printw("Change \"%s\" to \"%s\"", pattern, newpat);
! }
! else {
printw("%c%s: %s", toupper((unsigned char)fields[field].text2[0]),
fields[field].text2 + 1, pattern);
--- 163,175 ----
move(0, COLS - (int) sizeof(helpstring));
addstr(helpstring);
! } else if (totallines == 0) {
! /* if no references were found */
/* redisplay the last message */
addstr(lastmsg);
! } else {
! /* display the pattern */
if (changing == YES) {
printw("Change \"%s\" to \"%s\"", pattern, newpat);
! } else {
printw("%c%s: %s", toupper((unsigned char)fields[field].text2[0]),
fields[field].text2 + 1, pattern);
***************
*** 211,221 ****
width -= fcnlen + 1;
}
/* until the max references have been displayed or
there is no more room */
topline = nextline;
for (disprefs = 0, screenline = REFLINE;
! disprefs < mdisprefs && screenline <= lastdispline;
! ++disprefs, ++screenline) {
!
/* read the reference line */
if (fscanf(refsfound, "%s%s%s %[^\n]", file, function,
--- 209,219 ----
width -= fcnlen + 1;
}
+
/* until the max references have been displayed or
there is no more room */
topline = nextline;
for (disprefs = 0, screenline = REFLINE;
! disprefs < mdisprefs && screenline <= lastdispline;
! ++disprefs, ++screenline) {
/* read the reference line */
if (fscanf(refsfound, "%s%s%s %[^\n]", file, function,
***************
*** 229,235 ****
if (mouse == YES) {
addch(' ');
! }
! else
printw("%c", dispchars[disprefs]);
/* display any change mark */
--- 227,233 ----
if (mouse == YES) {
addch(' ');
! } else {
printw("%c", dispchars[disprefs]);
+ }
/* display any change mark */
***************
*** 237,249 ****
change[topline + disprefs - 1] == YES) {
addch('>');
! }
! else {
addch(' ');
}
/* display the file name */
if (field == FILENAME) {
printw("%-*s ", filelen, file);
! }
! else {
/* if OGS, display the subsystem and book names */
if (ogs == YES) {
--- 235,246 ----
change[topline + disprefs - 1] == YES) {
addch('>');
! } else {
addch(' ');
}
+
/* display the file name */
if (field == FILENAME) {
printw("%-*s ", filelen, file);
! } else {
/* if OGS, display the subsystem and book names */
if (ogs == YES) {
***************
*** 257,261 ****
pathcomponents(file, dispcomponents));
}
! }
/* display the function name */
if (field == SYMBOL || field == CALLEDBY || field == CALLING) {
--- 254,259 ----
pathcomponents(file, dispcomponents));
}
! } /* else(field == FILENAME) */
!
/* display the function name */
if (field == SYMBOL || field == CALLEDBY || field == CALLING) {
***************
*** 266,279 ****
continue;
}
/* display the line number */
printw("%*s ", numlen, linenum);
-
/* there may be tabs in egrep output */
while ((s = strchr(tempstring, '\t')) != NULL) {
*s = ' ';
}
/* display the source line */
s = tempstring;
-
for (;;) {
/* see if the source line will fit */
--- 264,277 ----
continue;
}
+
/* display the line number */
printw("%*s ", numlen, linenum);
/* there may be tabs in egrep output */
while ((s = strchr(tempstring, '\t')) != NULL) {
*s = ' ';
}
+
/* display the source line */
s = tempstring;
for (;;) {
/* see if the source line will fit */
***************
*** 310,313 ****
--- 308,313 ----
display what will fit on the screen */
if (topline == nextline -1) {
+ disprefs++;
+ /* break out of two loops */
goto endrefs;
}
***************
*** 327,333 ****
/* indent the continued source line */
move(screenline, COLS - width);
! }
!
! }
endrefs:
/* position the cursor for the message */
--- 327,332 ----
/* indent the continued source line */
move(screenline, COLS - width);
! } /* for(ever) */
! } /* for(reference output lines) */
endrefs:
/* position the cursor for the message */
Index: main.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/main.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** main.c 28 Jul 2002 15:40:07 -0000 1.27
--- main.c 29 Oct 2002 16:45:50 -0000 1.28
***************
*** 54,57 ****
--- 54,58 ----
/* defaults for unset environment variables */
#define EDITOR "vi"
+ #define HOME "/" /* no $HOME --> use root directory */
#define SHELL "sh"
#define LINEFLAG "+%s" /* default: used by vi and emacs */
***************
*** 298,302 ****
editor = mygetenv("VIEWER", editor); /* use viewer if set */
editor = mygetenv("CSCOPE_EDITOR", editor); /* has last word */
! home = getenv("HOME");
shell = mygetenv("SHELL", SHELL);
lineflag = mygetenv("CSCOPE_LINEFLAG", LINEFLAG);
--- 299,303 ----
editor = mygetenv("VIEWER", editor); /* use viewer if set */
editor = mygetenv("CSCOPE_EDITOR", editor); /* has last word */
! home = mygetenv("HOME", HOME);
shell = mygetenv("SHELL", SHELL);
lineflag = mygetenv("CSCOPE_LINEFLAG", LINEFLAG);
|
|
From: Hans-Bernhard B. <br...@us...> - 2002-08-15 16:07:11
|
Update of /cvsroot/cscope/cscope/src
In directory usw-pr-cvs1:/tmp/cvs-serv18330/src
Modified Files:
mypopen.c
Log Message:
Fix cygwin crash if no cscope.files present
Index: mypopen.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/mypopen.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** mypopen.c 28 Jul 2002 15:40:07 -0000 1.10
--- mypopen.c 15 Aug 2002 16:07:07 -0000 1.11
***************
*** 104,108 ****
#ifdef SETMODE
! if (! strchr(mode, 'b')) {
SETMODE(fileno(fp), O_TEXT);
}
--- 104,108 ----
#ifdef SETMODE
! if (fp && ! strchr(mode, 'b')) {
SETMODE(fileno(fp), O_TEXT);
}
|
|
From: Hans-Bernhard B. <br...@us...> - 2002-08-15 16:07:11
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv18330 Modified Files: ChangeLog Log Message: Fix cygwin crash if no cscope.files present Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.117 retrieving revision 1.118 diff -C2 -r1.117 -r1.118 *** ChangeLog 28 Jul 2002 15:42:40 -0000 1.117 --- ChangeLog 15 Aug 2002 16:07:07 -0000 1.118 *************** *** 1,2 **** --- 1,3 ---- + (2002/08/15 - broeker) DOS/Cygwin bugfix: avoid setmode() if fopen() failed. (2002/07/27 - broeker) Yet another round of Cygwin-related fixes. Do the #include <fcntl.h> early enough, so checks for |
|
From: Hans-Bernhard B. <br...@us...> - 2002-07-28 15:42:44
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv25870 Modified Files: ChangeLog Log Message: Cygwin-related fixes: * move #include <fcntl.h> above #ifdef O_TEXT/O_BINARY detection stuff * call myexit() instead of exit() everywhere * enable AC_EXEEXT stuff Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.116 retrieving revision 1.117 diff -C2 -r1.116 -r1.117 *** ChangeLog 11 Jul 2002 14:23:45 -0000 1.116 --- ChangeLog 28 Jul 2002 15:42:40 -0000 1.117 *************** *** 1,2 **** --- 1,7 ---- + (2002/07/27 - broeker) Yet another round of Cygwin-related fixes. Do the + #include <fcntl.h> early enough, so checks for + O_BINARY work. Make sure that myexit() is always + called instead of calling exit() directly. Add + AC_EXEEXT to configure.in. (2002/07/10 - broeker) Get rid of assumption about values of access() parameters W_OK and R_OK --- make assumptions only |
|
From: Hans-Bernhard B. <br...@us...> - 2002-07-28 15:40:10
|
Update of /cvsroot/cscope/cscope/contrib In directory usw-pr-cvs1:/tmp/cvs-serv25314/contrib Modified Files: Makefile.in Log Message: Cygwin-related fixes: * move #include <fcntl.h> above #ifdef O_TEXT/O_BINARY detection stuff * call myexit() instead of exit() everywhere * enable AC_EXEEXT stuff Index: Makefile.in =================================================================== RCS file: /cvsroot/cscope/cscope/contrib/Makefile.in,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Makefile.in 2 Jan 2002 17:26:34 -0000 1.4 --- Makefile.in 28 Jul 2002 15:40:06 -0000 1.5 *************** *** 63,66 **** --- 63,67 ---- CURSES_INCLUDEDIR = @CURSES_INCLUDEDIR@ CURSES_LIBS = @CURSES_LIBS@ + EXEEXT = @EXEEXT@ LEX = @LEX@ LEXLIB = @LEXLIB@ |
|
From: Hans-Bernhard B. <br...@us...> - 2002-07-28 15:40:10
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv25314 Modified Files: configure.in Makefile.in Log Message: Cygwin-related fixes: * move #include <fcntl.h> above #ifdef O_TEXT/O_BINARY detection stuff * call myexit() instead of exit() everywhere * enable AC_EXEEXT stuff Index: configure.in =================================================================== RCS file: /cvsroot/cscope/cscope/configure.in,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** configure.in 11 Jul 2002 14:23:45 -0000 1.24 --- configure.in 28 Jul 2002 15:40:06 -0000 1.25 *************** *** 144,147 **** --- 144,148 ---- AC_PROG_INSTALL AC_PROG_CC + AC_EXEEXT AMNU_PROG_LEX AM_CONDITIONAL(USING_LEX, test "x$LEX" = "xlex") Index: Makefile.in =================================================================== RCS file: /cvsroot/cscope/cscope/Makefile.in,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Makefile.in 2 Jan 2002 17:26:34 -0000 1.4 --- Makefile.in 28 Jul 2002 15:40:06 -0000 1.5 *************** *** 63,66 **** --- 63,67 ---- CURSES_INCLUDEDIR = @CURSES_INCLUDEDIR@ CURSES_LIBS = @CURSES_LIBS@ + EXEEXT = @EXEEXT@ LEX = @LEX@ LEXLIB = @LEXLIB@ |
|
From: Hans-Bernhard B. <br...@us...> - 2002-07-28 15:40:10
|
Update of /cvsroot/cscope/cscope/src
In directory usw-pr-cvs1:/tmp/cvs-serv25314/src
Modified Files:
Makefile.in alloc.c command.c exec.c global.h logdir.c main.c
mypopen.c vp.h vpopen.c
Log Message:
Cygwin-related fixes:
* move #include <fcntl.h> above #ifdef O_TEXT/O_BINARY detection stuff
* call myexit() instead of exit() everywhere
* enable AC_EXEEXT stuff
Index: Makefile.in
===================================================================
RCS file: /cvsroot/cscope/cscope/src/Makefile.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** Makefile.in 2 Jan 2002 17:26:35 -0000 1.6
--- Makefile.in 28 Jul 2002 15:40:06 -0000 1.7
***************
*** 63,66 ****
--- 63,67 ----
CURSES_INCLUDEDIR = @CURSES_INCLUDEDIR@
CURSES_LIBS = @CURSES_LIBS@
+ EXEEXT = @EXEEXT@
LEX = @LEX@
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
***************
*** 91,94 ****
--- 92,96 ----
CONFIG_HEADER = ../config.h
CONFIG_CLEAN_FILES =
+ bin_PROGRAMS = cscope$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
***************
*** 185,190 ****
maintainer-clean-compile:
! cscope: $(cscope_OBJECTS) $(cscope_DEPENDENCIES)
! @rm -f cscope
$(LINK) $(cscope_LDFLAGS) $(cscope_OBJECTS) $(cscope_LDADD) $(LIBS)
.l.c:
--- 187,192 ----
maintainer-clean-compile:
! cscope$(EXEEXT): $(cscope_OBJECTS) $(cscope_DEPENDENCIES)
! @rm -f cscope$(EXEEXT)
$(LINK) $(cscope_LDFLAGS) $(cscope_OBJECTS) $(cscope_LDADD) $(LIBS)
.l.c:
Index: alloc.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/alloc.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** alloc.c 9 May 2000 13:37:10 -0000 1.4
--- alloc.c 28 Jul 2002 15:40:07 -0000 1.5
***************
*** 48,52 ****
# else
char *calloc(), *malloc(), *realloc(), *strcpy();
- void exit();
# endif
--- 48,51 ----
***************
*** 90,94 ****
if (p == NULL) {
(void) fprintf(stderr, "\n%s: out of storage\n", argv0);
! exit(1);
}
return(p);
--- 89,93 ----
if (p == NULL) {
(void) fprintf(stderr, "\n%s: out of storage\n", argv0);
! myexit(1);
}
return(p);
Index: command.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/command.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -r1.18 -r1.19
*** command.c 8 Jul 2002 15:52:24 -0000 1.18
--- command.c 28 Jul 2002 15:40:07 -0000 1.19
***************
*** 44,48 ****
#include <curses.h>
#endif
- #include <fcntl.h> /* O_RDONLY */
#include <ctype.h>
--- 44,47 ----
Index: exec.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/exec.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** exec.c 5 Jul 2001 16:47:04 -0000 1.7
--- exec.c 28 Jul 2002 15:40:07 -0000 1.8
***************
*** 128,132 ****
perror(msg); /* display the reason */
askforreturn(); /* wait until the user sees the message */
! exit(1); /* exit the child */
/* NOTREACHED */
}
--- 128,132 ----
perror(msg); /* display the reason */
askforreturn(); /* wait until the user sees the message */
! myexit(1); /* exit the child */
/* NOTREACHED */
}
Index: global.h
===================================================================
RCS file: /cvsroot/cscope/cscope/src/global.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** global.h 11 Jul 2002 14:23:45 -0000 1.21
--- global.h 28 Jul 2002 15:40:07 -0000 1.22
***************
*** 107,110 ****
--- 107,116 ----
#endif
+ /* HBB 20020728: if <fcntl.h> is there, #include it here, since that's
+ * where the system definitions of O_TEXT should be coming from */
+ #ifdef HAVE_FCNTL_H
+ # include <fcntl.h>
+ #endif
+
/* HBB 20020103: Need to force text or binary mode opens on Cygwins,
* because of their "binary/text mode mount" silliness :-( */
Index: logdir.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/logdir.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** logdir.c 5 Jul 2001 16:47:04 -0000 1.4
--- logdir.c 28 Jul 2002 15:40:07 -0000 1.5
***************
*** 42,46 ****
#include <unistd.h>
#include <string.h>
- #include <fcntl.h>
#include "global.h"
--- 42,45 ----
Index: main.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/main.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** main.c 10 Oct 2001 16:49:22 -0000 1.26
--- main.c 28 Jul 2002 15:40:07 -0000 1.27
***************
*** 49,53 ****
#include <curses.h>
#endif
- #include <fcntl.h> /* O_RDONLY */
#include <sys/types.h> /* needed by stat.h */
#include <sys/stat.h> /* stat */
--- 49,52 ----
***************
*** 152,156 ****
if (strlen(s) > PATLEN) {
(void) fprintf(stderr, "cscope: pattern too long, cannot be > %d characters\n", PATLEN);
! exit(1);
}
(void) strcpy(pattern, s);
--- 151,155 ----
if (strlen(s) > PATLEN) {
(void) fprintf(stderr, "cscope: pattern too long, cannot be > %d characters\n", PATLEN);
! myexit(1);
}
(void) strcpy(pattern, s);
***************
*** 169,173 ****
(void) fprintf(stderr, "%s: version %d%s\n", argv0,
FILEVERSION, FIXVERSION);
! exit(0);
#endif
case 'b': /* only build the cross-reference */
--- 168,172 ----
(void) fprintf(stderr, "%s: version %d%s\n", argv0,
FILEVERSION, FIXVERSION);
! myexit(0);
#endif
case 'b': /* only build the cross-reference */
***************
*** 190,194 ****
case 'h':
(void) longusage();
! exit(1);
case 'k': /* ignore DFLT_INCDIR */
kernelmode = YES;
--- 189,193 ----
case 'h':
(void) longusage();
! myexit(1);
case 'k': /* ignore DFLT_INCDIR */
kernelmode = YES;
***************
*** 289,293 ****
(void) usage();
(void) fprintf(stderr, "Try the -h option for more information.\n");
! exit(1);
}
}
--- 288,292 ----
(void) usage();
(void) fprintf(stderr, "Try the -h option for more information.\n");
! myexit(1);
}
}
***************
*** 309,313 ****
{
fprintf (stderr, "cscope: Must use -b if file list comes from stdin\n");
! exit(1);
}
--- 308,312 ----
{
fprintf (stderr, "cscope: Must use -b if file list comes from stdin\n");
! myexit(1);
}
***************
*** 317,321 ****
fprintf (stderr, "cscope: Temporary directory %s does not exist or cannot be accessed\n", tmpdir);
fprintf (stderr, "cscope: Please create the directory or set the environment variable\ncscope: TMPDIR to a valid directory\n");
! exit(1);
}
--- 316,320 ----
fprintf (stderr, "cscope: Temporary directory %s does not exist or cannot be accessed\n", tmpdir);
fprintf (stderr, "cscope: Please create the directory or set the environment variable\ncscope: TMPDIR to a valid directory\n");
! myexit(1);
}
***************
*** 481,485 ****
if (fscanf(oldrefs, "%s", path) != 1) {
posterr("cscope: cannot read source file name from file %s\n", reffile);
! exit(1);
}
srcfiles[i] = stralloc(path);
--- 480,484 ----
if (fscanf(oldrefs, "%s", path) != 1) {
posterr("cscope: cannot read source file name from file %s\n", reffile);
! myexit(1);
}
srcfiles[i] = stralloc(path);
***************
*** 722,731 ****
if (fscanf(oldrefs, "%d", &i) != 1) {
posterr("cscope: cannot read list size from file %s\n", reffile);
! exit(1);
}
while (--i >= 0) {
if (fscanf(oldrefs, "%*s") != 0) {
posterr("cscope: cannot read list name from file %s\n", reffile);
! exit(1);
}
}
--- 721,730 ----
if (fscanf(oldrefs, "%d", &i) != 1) {
posterr("cscope: cannot read list size from file %s\n", reffile);
! myexit(1);
}
while (--i >= 0) {
if (fscanf(oldrefs, "%*s") != 0) {
posterr("cscope: cannot read list name from file %s\n", reffile);
! myexit(1);
}
}
Index: mypopen.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/mypopen.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** mypopen.c 11 Jul 2002 14:23:45 -0000 1.9
--- mypopen.c 28 Jul 2002 15:40:07 -0000 1.10
***************
*** 33,37 ****
#include <stdio.h>
#include <signal.h>
- #include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
--- 33,36 ----
Index: vp.h
===================================================================
RCS file: /cvsroot/cscope/cscope/src/vp.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** vp.h 4 Jan 2002 12:11:50 -0000 1.4
--- vp.h 28 Jul 2002 15:40:07 -0000 1.5
***************
*** 45,49 ****
#define MAXPATH 200 /* max length for entire name */
! #include <fcntl.h>
#include <sys/stat.h>
--- 45,57 ----
#define MAXPATH 200 /* max length for entire name */
! #ifdef HAVE_CONFIG_H
! # include "config.h"
! #else
! # define HAVE_FCNTL_H 1 /* in case of doubt, assume it's there */
! #endif
! #ifdef HAVE_FCNTL_H
! # include <fcntl.h> /* needed for O_... open flags */
! #endif
!
#include <sys/stat.h>
Index: vpopen.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/vpopen.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** vpopen.c 3 May 2000 22:02:10 -0000 1.3
--- vpopen.c 28 Jul 2002 15:40:07 -0000 1.4
***************
*** 35,39 ****
#include <stdio.h>
- #include <fcntl.h>
#include "global.h"
#include "vp.h"
--- 35,38 ----
|
|
From: Hans-Bernhard B. <br...@us...> - 2002-07-28 15:40:10
|
Update of /cvsroot/cscope/cscope/doc In directory usw-pr-cvs1:/tmp/cvs-serv25314/doc Modified Files: Makefile.in Log Message: Cygwin-related fixes: * move #include <fcntl.h> above #ifdef O_TEXT/O_BINARY detection stuff * call myexit() instead of exit() everywhere * enable AC_EXEEXT stuff Index: Makefile.in =================================================================== RCS file: /cvsroot/cscope/cscope/doc/Makefile.in,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Makefile.in 2 Jan 2002 17:26:35 -0000 1.3 --- Makefile.in 28 Jul 2002 15:40:06 -0000 1.4 *************** *** 63,66 **** --- 63,67 ---- CURSES_INCLUDEDIR = @CURSES_INCLUDEDIR@ CURSES_LIBS = @CURSES_LIBS@ + EXEEXT = @EXEEXT@ LEX = @LEX@ LEXLIB = @LEXLIB@ |
|
From: Hans-Bernhard B. <br...@us...> - 2002-07-11 14:23:49
|
Update of /cvsroot/cscope/cscope/src
In directory usw-pr-cvs1:/tmp/cvs-serv8314/src
Modified Files:
constants.h global.h mypopen.c
Log Message:
Fixes for DOS: access() bits, lstat()->stat(), BSD<->DOS setmode()
Index: constants.h
===================================================================
RCS file: /cvsroot/cscope/cscope/src/constants.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** constants.h 13 Aug 2001 15:31:22 -0000 1.11
--- constants.h 11 Jul 2002 14:23:45 -0000 1.12
***************
*** 77,82 ****
#define STMTMAX 10000 /* maximum source statement length */
! #define READ 4 /* access(2) parameter */
! #define WRITE 2 /* access(2) parameter */
/* screen lines */
#define FLDLINE (LINES - FIELDS - 1) /* first input field line */
--- 77,81 ----
#define STMTMAX 10000 /* maximum source statement length */
!
/* screen lines */
#define FLDLINE (LINES - FIELDS - 1) /* first input field line */
Index: global.h
===================================================================
RCS file: /cvsroot/cscope/cscope/src/global.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** global.h 4 Jan 2002 12:11:50 -0000 1.20
--- global.h 11 Jul 2002 14:23:45 -0000 1.21
***************
*** 125,128 ****
--- 125,158 ----
#endif
+ #undef SETMODE
+ #if O_BINARY || O_TEXT
+ /* OK, looks like we are on an MSDOS-ish platform ---> define SETMODE
+ * to actually do something */
+ # ifdef HAVE_SETMODE
+ # define SETMODE(fildes, mode) setmode(fildes,mode)
+ # else
+ # ifdef HAVE__SETMODE
+ # define SETMODE(fildes, mode) _setmode(fildes,mode)
+ # endif
+ # endif
+ #endif
+
+ /* access(2) parameters. Only make assumptions about their values if
+ * <unistd.h> fails to define them. */
+ #ifdef R_OK
+ # define READ R_OK
+ #else
+ # define READ 4
+ #endif
+ #ifdef W_OK
+ # define WRITE W_OK
+ #else
+ # define WRITE 2
+ #endif
+
+ /* This can happen on only vaguely Unix-ish platforms... */
+ #ifndef HAVE_LSTAT
+ # define lstat(file,buf) stat(file,buf)
+ #endif
typedef enum { /* boolean data type */
Index: mypopen.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/mypopen.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** mypopen.c 4 Jan 2002 12:11:50 -0000 1.8
--- mypopen.c 11 Jul 2002 14:23:45 -0000 1.9
***************
*** 43,50 ****
#define WTR 1
- #if !defined(HAVE_SETMODE) && defined(HAVE__SETMODE)
- # define setmode _setmode
- #endif
-
/* HBB 20010312: make this a bit safer --- don't blindly assume it's 1 */
#ifdef FD_CLOEXEC
--- 43,46 ----
***************
*** 108,116 ****
fp = fopen(path, mode);
! #if HAVE_SETMODE
if (! strchr(mode, 'b')) {
! setmode(fileno(fp), O_TEXT);
}
! #endif /* HAVE_SETMODE */
#ifdef __DJGPP__ /* FIXME: test feature, not platform */
--- 104,112 ----
fp = fopen(path, mode);
! #ifdef SETMODE
if (! strchr(mode, 'b')) {
! SETMODE(fileno(fp), O_TEXT);
}
! #endif /* SETMODE */
#ifdef __DJGPP__ /* FIXME: test feature, not platform */
|
|
From: Hans-Bernhard B. <br...@us...> - 2002-07-11 14:23:49
|
Update of /cvsroot/cscope/cscope
In directory usw-pr-cvs1:/tmp/cvs-serv8314
Modified Files:
ChangeLog config.h.in configure configure.in
Log Message:
Fixes for DOS: access() bits, lstat()->stat(), BSD<->DOS setmode()
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cscope/cscope/ChangeLog,v
retrieving revision 1.115
retrieving revision 1.116
diff -C2 -r1.115 -r1.116
*** ChangeLog 8 Jul 2002 15:52:24 -0000 1.115
--- ChangeLog 11 Jul 2002 14:23:45 -0000 1.116
***************
*** 1,2 ****
--- 1,8 ----
+ (2002/07/10 - broeker) Get rid of assumption about values of access()
+ parameters W_OK and R_OK --- make assumptions only
+ if system doesn't supply values. Add check for
+ existence of lstat(); fall back to stat() if not
+ available. Avoid confusion of DOS' setmode() with
+ BSD function of same name...
(2002/07/07 - broeker) Delete tempfile before redirecting to it, to avoid
complaints about clobbering from poorly configured
Index: config.h.in
===================================================================
RCS file: /cvsroot/cscope/cscope/config.h.in,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** config.h.in 4 Jan 2002 12:11:50 -0000 1.11
--- config.h.in 11 Jul 2002 14:23:45 -0000 1.12
***************
*** 67,70 ****
--- 67,73 ----
#undef HAVE_GETCWD
+ /* Define if you have the lstat function. */
+ #undef HAVE_LSTAT
+
/* Define if you have the memcpy function. */
#undef HAVE_MEMCPY
Index: configure
===================================================================
RCS file: /cvsroot/cscope/cscope/configure,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** configure 13 Mar 2002 20:39:13 -0000 1.17
--- configure 11 Jul 2002 14:23:45 -0000 1.18
***************
*** 2407,2480 ****
fi
- for ac_func in strchr memcpy memset setmode _setmode
- do
- echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
- echo "configure:2413: checking for $ac_func" >&5
- if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
- else
- cat > conftest.$ac_ext <<EOF
- #line 2418 "configure"
- #include "confdefs.h"
- /* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func(); below. */
- #include <assert.h>
- /* Override any gcc2 internal prototype to avoid an error. */
- /* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
- char $ac_func();
-
- int main() {
-
- /* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
- #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
- choke me
- #else
- $ac_func();
- #endif
-
- ; return 0; }
- EOF
- if { (eval echo configure:2441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=yes"
- else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_func_$ac_func=no"
- fi
- rm -f conftest*
- fi
-
- if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
- cat >> confdefs.h <<EOF
- #define $ac_tr_func 1
- EOF
-
- else
- echo "$ac_t""no" 1>&6
- fi
- done
-
for ac_hdr in fcntl.h sys/window.h sys/termios.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:2469: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2474 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
--- 2407,2425 ----
fi
for ac_hdr in fcntl.h sys/window.h sys/termios.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
! echo "configure:2414: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2419 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
! { (eval echo configure:2424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
***************
*** 2504,2513 ****
echo $ac_n "checking for working const""... $ac_c" 1>&6
! echo "configure:2507: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2512 "configure"
#include "confdefs.h"
--- 2449,2458 ----
echo $ac_n "checking for working const""... $ac_c" 1>&6
! echo "configure:2452: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2457 "configure"
#include "confdefs.h"
***************
*** 2558,2562 ****
; return 0; }
EOF
! if { (eval echo configure:2561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
--- 2503,2507 ----
; return 0; }
EOF
! if { (eval echo configure:2506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
***************
*** 2579,2588 ****
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
! echo "configure:2582: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2587 "configure"
#include "confdefs.h"
#include <sys/types.h>
--- 2524,2533 ----
echo $ac_n "checking for mode_t""... $ac_c" 1>&6
! echo "configure:2527: checking for mode_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2532 "configure"
#include "confdefs.h"
#include <sys/types.h>
***************
*** 2612,2621 ****
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
! echo "configure:2615: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2620 "configure"
#include "confdefs.h"
#include <sys/types.h>
--- 2557,2566 ----
echo $ac_n "checking for pid_t""... $ac_c" 1>&6
! echo "configure:2560: checking for pid_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2565 "configure"
#include "confdefs.h"
#include <sys/types.h>
***************
*** 2645,2654 ****
echo $ac_n "checking for size_t""... $ac_c" 1>&6
! echo "configure:2648: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2653 "configure"
#include "confdefs.h"
#include <sys/types.h>
--- 2590,2599 ----
echo $ac_n "checking for size_t""... $ac_c" 1>&6
! echo "configure:2593: checking for size_t" >&5
if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2598 "configure"
#include "confdefs.h"
#include <sys/types.h>
***************
*** 2679,2688 ****
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
! echo "configure:2682: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2687 "configure"
#include "confdefs.h"
#include <sys/types.h>
--- 2624,2633 ----
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
! echo "configure:2627: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2632 "configure"
#include "confdefs.h"
#include <sys/types.h>
***************
*** 2701,2705 ****
; return 0; }
EOF
! if { (eval echo configure:2704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
--- 2646,2650 ----
; return 0; }
EOF
! if { (eval echo configure:2649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_type_signal=void
***************
*** 2719,2723 ****
! for ac_func in getcwd regcmp regcomp strerror vsnprintf snprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
--- 2664,2723 ----
! for ac_func in strchr memcpy memset setmode _setmode
! do
! echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
! echo "configure:2670: checking for $ac_func" >&5
! if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
! echo $ac_n "(cached) $ac_c" 1>&6
! else
! cat > conftest.$ac_ext <<EOF
! #line 2675 "configure"
! #include "confdefs.h"
! /* System header to define __stub macros and hopefully few prototypes,
! which can conflict with char $ac_func(); below. */
! #include <assert.h>
! /* Override any gcc2 internal prototype to avoid an error. */
! /* We use char because int might match the return type of a gcc2
! builtin and then its argument prototype would still apply. */
! char $ac_func();
!
! int main() {
!
! /* The GNU C library defines this for functions which it implements
! to always fail with ENOSYS. Some functions are actually named
! something starting with __ and the normal name is an alias. */
! #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
! choke me
! #else
! $ac_func();
! #endif
!
! ; return 0; }
! EOF
! if { (eval echo configure:2698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
! rm -rf conftest*
! eval "ac_cv_func_$ac_func=yes"
! else
! echo "configure: failed program was:" >&5
! cat conftest.$ac_ext >&5
! rm -rf conftest*
! eval "ac_cv_func_$ac_func=no"
! fi
! rm -f conftest*
! fi
!
! if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
! echo "$ac_t""yes" 1>&6
! ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
! cat >> confdefs.h <<EOF
! #define $ac_tr_func 1
! EOF
!
! else
! echo "$ac_t""no" 1>&6
! fi
! done
!
! for ac_func in getcwd regcmp regcomp strerror vsnprintf snprintf lstat
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
Index: configure.in
===================================================================
RCS file: /cvsroot/cscope/cscope/configure.in,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** configure.in 13 Mar 2002 20:39:13 -0000 1.23
--- configure.in 11 Jul 2002 14:23:45 -0000 1.24
***************
*** 482,486 ****
AC_HEADER_DIRENT
AC_HEADER_STDC
- AC_CHECK_FUNCS(strchr memcpy memset setmode _setmode)
AC_CHECK_HEADERS(fcntl.h sys/window.h sys/termios.h unistd.h)
--- 482,485 ----
***************
*** 493,497 ****
dnl Checks for library functions.
AC_TYPE_SIGNAL
! AC_CHECK_FUNCS(getcwd regcmp regcomp strerror vsnprintf snprintf)
AC_CHECK_FUNCS(fixkeypad)
--- 492,497 ----
dnl Checks for library functions.
AC_TYPE_SIGNAL
! AC_CHECK_FUNCS(strchr memcpy memset setmode _setmode)
! AC_CHECK_FUNCS(getcwd regcmp regcomp strerror vsnprintf snprintf lstat)
AC_CHECK_FUNCS(fixkeypad)
|
|
From: Hans-Bernhard B. <br...@us...> - 2002-07-08 15:52:30
|
Update of /cvsroot/cscope/cscope/src
In directory usw-pr-cvs1:/tmp/cvs-serv28309/src
Modified Files:
command.c
Log Message:
Avoid shell complaint about clobbering files in redirection
Index: command.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/command.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** command.c 22 Nov 2001 17:38:19 -0000 1.17
--- command.c 8 Jul 2002 15:52:24 -0000 1.18
***************
*** 379,382 ****
--- 379,388 ----
if (commandc == '^') {
(void) strcat(strcat(newpat, " >"), temp2);
+ /* HBB 20020708: somebody might have even
+ * their non-interactive default shells
+ * complain about clobbering
+ * redirections... --> delete before
+ * overwriting */
+ remove(temp2);
}
exitcurses();
|
|
From: Hans-Bernhard B. <br...@us...> - 2002-07-08 15:52:30
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv28309 Modified Files: ChangeLog Log Message: Avoid shell complaint about clobbering files in redirection Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.114 retrieving revision 1.115 diff -C2 -r1.114 -r1.115 *** ChangeLog 20 Jun 2002 16:26:50 -0000 1.114 --- ChangeLog 8 Jul 2002 15:52:24 -0000 1.115 *************** *** 1,2 **** --- 1,5 ---- + (2002/07/07 - broeker) Delete tempfile before redirecting to it, to avoid + complaints about clobbering from poorly configured + default shells. (2002/06/20 - broeker) Fix operation of -C -L0 if pattern contains any upper-case characters. |
|
From: Hans-Bernhard B. <br...@us...> - 2002-06-20 16:26:53
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv27274 Modified Files: ChangeLog Log Message: Updated. Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.113 retrieving revision 1.114 diff -C2 -r1.113 -r1.114 *** ChangeLog 16 Mar 2002 15:20:44 -0000 1.113 --- ChangeLog 20 Jun 2002 16:26:50 -0000 1.114 *************** *** 1,2 **** --- 1,8 ---- + (2002/06/20 - broeker) Fix operation of -C -L0 if pattern contains any + upper-case characters. + (2002/06/20 - broeker) Fix handling of non-standard whitespace in Flex + scanner. Should make it more robust against DOS text + files that ended up on a Unix box, and other unexpected + characters, and avoid SF bug #508060. (2002/03/16 - broeker) Fix namelist handling bug: ./ in paths would cause search for next name to fail (SF bug #529618). |
|
From: Hans-Bernhard B. <br...@us...> - 2002-06-20 16:26:32
|
Update of /cvsroot/cscope/cscope/src
In directory usw-pr-cvs1:/tmp/cvs-serv27183/src
Modified Files:
find.c
Log Message:
Fix -C -L mode: lowercase pattern before using it
Index: find.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/find.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** find.c 13 Mar 2002 18:54:40 -0000 1.14
--- find.c 20 Jun 2002 16:26:29 -0000 1.15
***************
*** 598,612 ****
/* remove trailing white space */
! for (s = pattern + strlen(pattern) - 1; isspace((unsigned char)*s); --s) {
*s = '\0';
}
/* allow a partial match for a file name */
if (field == FILENAME || field == INCLUDES) {
-
if (regcomp (®exp, pattern, REG_EXTENDED | REG_NOSUB) != 0) {
return(REGCMPERROR);
! }
! else
! {
isregexp_valid = YES;
}
--- 598,619 ----
/* remove trailing white space */
! for (s = pattern + strlen(pattern) - 1;
! isspace((unsigned char)*s);
! --s) {
*s = '\0';
}
+
+ /* HBB 20020620: new: make sure pattern is lowercased. Curses
+ * mode gets this right all on its own, but at least -L mode
+ * doesn't */
+ if (caseless == YES) {
+ pattern = lcasify(pattern);
+ }
+
/* allow a partial match for a file name */
if (field == FILENAME || field == INCLUDES) {
if (regcomp (®exp, pattern, REG_EXTENDED | REG_NOSUB) != 0) {
return(REGCMPERROR);
! } else {
isregexp_valid = YES;
}
***************
*** 616,621 ****
if (strpbrk(pattern, "^.[{*+$") != NULL) {
isregexp = YES;
! }
! else {
/* check for a valid C symbol */
s = pattern;
--- 623,627 ----
if (strpbrk(pattern, "^.[{*+$") != NULL) {
isregexp = YES;
! } else {
/* check for a valid C symbol */
s = pattern;
|
|
From: Hans-Bernhard B. <br...@us...> - 2002-06-20 16:25:37
|
Update of /cvsroot/cscope/cscope/src
In directory usw-pr-cvs1:/tmp/cvs-serv26864/src
Modified Files:
fscanner.l
Log Message:
Make flex scanner more tolerant to unexpected whitespace characters
Index: fscanner.l
===================================================================
RCS file: /cvsroot/cscope/cscope/src/fscanner.l,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** fscanner.l 13 Sep 2001 16:44:52 -0000 1.8
--- fscanner.l 20 Jun 2002 16:25:33 -0000 1.9
***************
*** 129,133 ****
number \.?[0-9][.0-9a-fA-FlLuUxX]*
comment "/*"([^*]*("*"+[^/])?)*"*/"|"//"[^\n]*\n
! whitespace [ \t\n]|{comment}
/* flex options: stack of start conditions, and don't use yywrap() */
--- 129,134 ----
number \.?[0-9][.0-9a-fA-FlLuUxX]*
comment "/*"([^*]*("*"+[^/])?)*"*/"|"//"[^\n]*\n
! ws [ \t\r\v\f]
! wsnl [ \t\n]|{comment}
/* flex options: stack of start conditions, and don't use yywrap() */
***************
*** 224,228 ****
}
! \#[ \t]* { /* start a preprocessor line */
if (rules == NO) /* don't consider CPP for lex/yacc rules */
BEGIN(IN_PREPROC);
--- 225,229 ----
}
! \#{ws}* { /* start a preprocessor line */
if (rules == NO) /* don't consider CPP for lex/yacc rules */
BEGIN(IN_PREPROC);
***************
*** 240,244 ****
/* NOTREACHED */
}
! <WAS_ENDIF>\n{whitespace}*#[ \t]*if(ndef|def)?[ \t]+ {
/* attempt to correct erroneous brace count caused by:
*
--- 241,245 ----
/* NOTREACHED */
}
! <WAS_ENDIF>\n{wsnl}*#{ws}*if(ndef|def)?{ws}+ {
/* attempt to correct erroneous brace count caused by:
*
***************
*** 262,266 ****
/* NOTREACHED */
}
! <WAS_ENDIF>\n{whitespace}* { /* an #endif with no #if right after it */
endif:
if (iflevel > 0) {
--- 263,267 ----
/* NOTREACHED */
}
! <WAS_ENDIF>\n{wsnl}* { /* an #endif with no #if right after it */
endif:
if (iflevel > 0) {
***************
*** 277,283 ****
}
! <IN_PREPROC>ifndef[ \t]+ |
! <IN_PREPROC>ifdef[ \t]+ |
! <IN_PREPROC>if[ \t]+ { /* #if directive */
elseelif = NO;
if (pseudoelif == YES) {
--- 278,284 ----
}
! <IN_PREPROC>ifndef{ws}+ |
! <IN_PREPROC>ifdef{ws}+ |
! <IN_PREPROC>if{ws}+ { /* #if directive */
elseelif = NO;
if (pseudoelif == YES) {
***************
*** 299,303 ****
/* NOTREACHED */
}
! <IN_PREPROC>else([ \t].*)? { /* #else --- eat up whole line */
elseelif = YES;
if (iflevel > 0) {
--- 300,304 ----
/* NOTREACHED */
}
! <IN_PREPROC>else({ws}.*)? { /* #else --- eat up whole line */
elseelif = YES;
if (iflevel > 0) {
***************
*** 314,318 ****
/* NOTREACHED */
}
! <IN_PREPROC>elif[ \t]+ { /* #elif */
/* elseelif = YES; --- HBB I doubt this is correct */
elif:
--- 315,319 ----
/* NOTREACHED */
}
! <IN_PREPROC>elif{ws}+ { /* #elif */
/* elseelif = YES; --- HBB I doubt this is correct */
elif:
***************
*** 331,336 ****
}
! <IN_PREPROC>include[ \t]*\"[^"\n]+\" |
! <IN_PREPROC>include[ \t]*<[^>\n]+> { /* #include file */
char *s;
char remember = yytext[yyleng-1];
--- 332,337 ----
}
! <IN_PREPROC>include{ws}*\"[^"\n]+\" |
! <IN_PREPROC>include{ws}*<[^>\n]+> { /* #include file */
char *s;
char remember = yytext[yyleng-1];
***************
*** 439,443 ****
/* NOTREACHED */
}
! <IN_PREPROC>define[ \t]+{identifier} {
/* preprocessor macro or constant definition */
--- 440,444 ----
/* NOTREACHED */
}
! <IN_PREPROC>define{ws}+{identifier} {
/* preprocessor macro or constant definition */
***************
*** 469,473 ****
}
! class{whitespace}+{identifier}({whitespace}|{identifier}|[():])*\{ { /* class definition */
classdef = YES;
tagdef = 'c';
--- 470,474 ----
}
! class{wsnl}+{identifier}({wsnl}|{identifier}|[():])*\{ { /* class definition */
classdef = YES;
tagdef = 'c';
***************
*** 484,493 ****
}
<WAS_ESU>{
! ({whitespace}+{identifier}){whitespace}*\{ { /* e/s/u definition */
tagdef = my_yytext[ident_start];
BEGIN(WAS_IDENTIFIER);
goto ident;
}
! {whitespace}*\{ { /* e/s/u definition without a tag */
tagdef = my_yytext[ident_start];
BEGIN(INITIAL);
--- 485,494 ----
}
<WAS_ESU>{
! ({wsnl}+{identifier}){wsnl}*\{ { /* e/s/u definition */
tagdef = my_yytext[ident_start];
BEGIN(WAS_IDENTIFIER);
goto ident;
}
! {wsnl}*\{ { /* e/s/u definition without a tag */
tagdef = my_yytext[ident_start];
BEGIN(INITIAL);
***************
*** 500,504 ****
goto more;
}
! ({whitespace}+{identifier})?{whitespace}* |
.|\n { /* e/s/u usage */
BEGIN(WAS_IDENTIFIER);
--- 501,505 ----
goto more;
}
! ({wsnl}+{identifier})?{wsnl}* |
.|\n { /* e/s/u usage */
BEGIN(WAS_IDENTIFIER);
***************
*** 507,511 ****
}
! if{whitespace}*\( { /* ignore 'if' */
yyless(2);
yy_set_bol(0);
--- 508,512 ----
}
! if{wsnl}*\( { /* ignore 'if' */
yyless(2);
yy_set_bol(0);
***************
*** 521,525 ****
<WAS_IDENTIFIER>{
! [ \t]*\(({whitespace}|{identifier}|[*&[\]=,.])*\)([()]|{whitespace})*[:a-zA-Z_#{] {
/* a function definition */
/* note: "#define a (b) {" and "#if defined(a)\n#"
--- 522,526 ----
<WAS_IDENTIFIER>{
! {ws}*\(({wsnl}|{identifier}|[*&[\]=,.])*\)([()]|{wsnl})*[:a-zA-Z_#{] {
/* a function definition */
/* note: "#define a (b) {" and "#if defined(a)\n#"
***************
*** 543,547 ****
/* NOTREACHED */
}
! [ \t]*\(([*&[\]=,.]|{identifier}|{whitespace})* { /* function call */
fcncal: if (fcndef == YES || ppdefine == YES || rules == YES) {
token = FCNCALL;
--- 544,548 ----
/* NOTREACHED */
}
! {ws}*\(([*&[\]=,.]|{identifier}|{wsnl})* { /* function call */
fcncal: if (fcndef == YES || ppdefine == YES || rules == YES) {
token = FCNCALL;
***************
*** 556,560 ****
/* NOTREACHED */
}
! ("*"|{whitespace})+{identifier} { /* typedef name or modifier use */
goto ident;
/* NOTREACHED */
--- 557,561 ----
/* NOTREACHED */
}
! ("*"|{wsnl})+{identifier} { /* typedef name or modifier use */
goto ident;
/* NOTREACHED */
***************
*** 769,773 ****
/* NOTREACHED */
}
! \\\n { /* line continuation inside a string! */
myylineno++;
goto more;
--- 770,774 ----
/* NOTREACHED */
}
! \\\n { /* line continuation inside a string! */
myylineno++;
goto more;
***************
*** 776,783 ****
}
! ^[ \t\f]+ { /* don't save leading white space */
}
! [ \t]{2,} { /* compress sequential whitespace here, not in putcrossref() */
unput(' ');
}
--- 777,793 ----
}
! ^{ws}+ { /* don't save leading white space */
! }
!
! {ws}+\n { /* eat whitespace at end of line */
! unput('\n');
! }
!
! [\t\r\v\f]+ { /* eat non-blank whitespace sequences, replace
! * by single blank */
! unput(' ');
}
! {ws}{2,} { /* compress sequential whitespace here, not in putcrossref() */
unput(' ');
}
|
|
From: Darryl O. <da...@us...> - 2002-04-10 18:37:22
|
Update of /cvsroot/cscope/cscope/contrib/xcscope
In directory usw-pr-cvs1:/tmp/cvs-serv30371
Modified Files:
xcscope.el
Log Message:
Intermediate checkin.
Fix spelling errors. Miscellaneous tweaks and small bugfixes.
Index: xcscope.el
===================================================================
RCS file: /cvsroot/cscope/cscope/contrib/xcscope/xcscope.el,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** xcscope.el 5 Apr 2002 01:26:00 -0000 1.13
--- xcscope.el 10 Apr 2002 16:59:00 -0000 1.14
***************
*** 308,312 ****
;; cscope to build the database:
;;
! ;; cd top-level-directory # or whereever
;; rm -f cscope.out # not always necessary
;; cscope -b
--- 308,312 ----
;; cscope to build the database:
;;
! ;; cd top-level-directory # or wherever
;; rm -f cscope.out # not always necessary
;; cscope -b
***************
*** 317,321 ****
;; list of all pathnames into it. Then build the database using:
;;
! ;; cd some-directory # whereever cscope.files exists
;; rm -f cscope.out # not always necessary
;; cscope -b
--- 317,321 ----
;; list of all pathnames into it. Then build the database using:
;;
! ;; cd some-directory # wherever cscope.files exists
;; rm -f cscope.out # not always necessary
;; cscope -b
***************
*** 1173,1177 ****
[ "Pop mark" cscope-pop-mark t ]
"-----------"
! ( "More ..."
[ "Set initial directory"
cscope-set-initial-directory t ]
--- 1173,1177 ----
[ "Pop mark" cscope-pop-mark t ]
"-----------"
! ( "Cscope Database"
[ "Set initial directory"
cscope-set-initial-directory t ]
***************
*** 1332,1336 ****
;; backward-point is closest to old-point.
;; Give forward-point a line-length advantage
! ;; so that if the symbol is on the currrent
;; line the current line is chosen.
(if (<= (- (- forward-point line-length)
--- 1332,1336 ----
;; backward-point is closest to old-point.
;; Give forward-point a line-length advantage
! ;; so that if the symbol is on the current
;; line the current line is chosen.
(if (<= (- (- forward-point line-length)
***************
*** 1420,1429 ****
(let ((ep (cscope-event-point event))
(win (cscope-event-window event))
! buffer file line-number)
! (setq buffer (window-buffer win)
! file (get-text-property ep 'cscope-file buffer)
! line-number (get-text-property ep 'cscope-line-number buffer))
! (select-window win)
! (select-window (cscope-show-entry-internal file line-number t))
))
--- 1420,1436 ----
(let ((ep (cscope-event-point event))
(win (cscope-event-window event))
! buffer file line-number window)
! (if ep
! (progn
! (setq buffer (window-buffer win)
! file (get-text-property ep 'cscope-file buffer)
! line-number (get-text-property ep 'cscope-line-number buffer))
! (select-window win)
! (setq window (cscope-show-entry-internal file line-number t))
! (if (windowp window)
! (select-window window))
! )
! (message "No entry found at point.")
! )
))
***************
*** 1883,1887 ****
(if cscope-display-cscope-buffer
(if (and cscope-edit-single-match (not cscope-matched-multiple))
! (cscope-show-entry-internal (car cscope-first-match)
(cdr cscope-first-match) t))
(cscope-select-entry-specified-window old-buffer-window))
--- 1890,1894 ----
(if cscope-display-cscope-buffer
(if (and cscope-edit-single-match (not cscope-matched-multiple))
! (cscope-show-entry-internal(car cscope-first-match)
(cdr cscope-first-match) t))
(cscope-select-entry-specified-window old-buffer-window))
***************
*** 2340,2344 ****
"Find functions called by this function: " nil)
))
! (let ( (cscope-adjust nil) ) ;; Suppress fuzzy matching.
(setq cscope-symbol symbol)
(cscope-call (format "Finding functions called by: %s" symbol)
--- 2347,2351 ----
"Find functions called by this function: " nil)
))
! (let ( (cscope-adjust nil) ) ;; Disable fuzzy matching.
(setq cscope-symbol symbol)
(cscope-call (format "Finding functions called by: %s" symbol)
***************
*** 2410,2415 ****
"Find files #including this file: " t))
))
! (let ( (cscope-adjust nil) ) ;; Disable fuzzy matching.
! ;; Is this needed?
(setq cscope-symbol symbol)
(cscope-call (format "Finding files #including file: %s" symbol)
--- 2417,2421 ----
"Find files #including this file: " t))
))
! (let ( (cscope-adjust t) ) ;; Use fuzzy matching.
(setq cscope-symbol symbol)
(cscope-call (format "Finding files #including file: %s" symbol)
|
|
From: Darryl O. <da...@us...> - 2002-04-05 01:26:04
|
Update of /cvsroot/cscope/cscope/contrib/xcscope
In directory usw-pr-cvs1:/tmp/cvs-serv19924
Modified Files:
xcscope.el
Log Message:
Intermediate checkin.
Merge cscope patch #482960.
Fix some minor nits (but others still remain).
Index: xcscope.el
===================================================================
RCS file: /cvsroot/cscope/cscope/contrib/xcscope/xcscope.el,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** xcscope.el 2 Nov 2001 00:42:55 -0000 1.12
--- xcscope.el 5 Apr 2002 01:26:00 -0000 1.13
***************
*** 7,16 ****
; Author: Darryl Okahata
; Created: Wed Apr 19 17:03:38 2000
! ; Modified: Thu Nov 1 16:34:54 2001 (Darryl Okahata) da...@so...
; Language: Emacs-Lisp
; Package: N/A
; Status: Experimental
;
! ; (C) Copyright 2000, 2001, Darryl Okahata <da...@so...>,
; all rights reserved.
; GNU Emacs enhancements (C) Copyright 2001,
--- 7,16 ----
; Author: Darryl Okahata
; Created: Wed Apr 19 17:03:38 2000
! ; Modified: Thu Apr 4 17:22:22 2002 (Darryl Okahata) da...@so...
; Language: Emacs-Lisp
; Package: N/A
; Status: Experimental
;
! ; (C) Copyright 2000, 2001, 2002, Darryl Okahata <da...@so...>,
; all rights reserved.
; GNU Emacs enhancements (C) Copyright 2001,
***************
*** 20,24 ****
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
! ;; ALPHA VERSION 0.95
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
--- 20,24 ----
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
! ;; ALPHA VERSION 0.96
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
***************
*** 114,117 ****
--- 114,119 ----
;; (define-key global-map [(control f11)] 'cscope-prev-symbol)
;; (define-key global-map [(control f12)] 'cscope-prev-file)
+ ;; (define-key global-map [(meta f9)] 'cscope-display-buffer)
+ ;; (defin-ekey global-map [(meta f10)] 'cscope-display-buffer-toggle)
;;
;; 6. Restart (X)Emacs. That's it.
***************
*** 220,223 ****
--- 222,227 ----
;; These pertain to navigation through the search results:
;;
+ ;; C-c s b Display *cscope* buffer.
+ ;; C-c s B Auto display *cscope* buffer toggle.
;; C-c s n Next symbol.
;; C-c s N Next file.
***************
*** 1070,1073 ****
--- 1074,1083 ----
+ (defvar cscope-adjust t
+ "True if the symbol searched for (cscope-symbol) should be on
+ the line specified by the cscope database. In such cases the point will be
+ adjusted if need be (fuzzy matching).")
+
+
(defvar cscope-adjust-range 1000
"How far the point should be adjusted if the symbol is not on the line
***************
*** 1117,1120 ****
--- 1127,1132 ----
(define-key cscope:map "\C-csi" 'cscope-find-files-including-file)
;; --- (The '---' indicates that this line corresponds to a menu separator.)
+ (define-key cscope:map "\C-csb" 'cscope-display-buffer)
+ (define-key cscope:map "\C-csB" 'cscope-display-buffer-toggle)
(define-key cscope:map "\C-csn" 'cscope-next-symbol)
(define-key cscope:map "\C-csN" 'cscope-next-file)
***************
*** 1152,1199 ****
cscope-find-files-including-file t ]
"-----------"
! [ "Next symbol" cscope-next-symbol t ]
! [ "Next file" cscope-next-file t ]
! [ "Previous symbol" cscope-prev-symbol t ]
! [ "Previous file" cscope-prev-file t ]
! [ "Pop mark" cscope-pop-mark t ]
! "-----------"
! [ "Set initial directory" cscope-set-initial-directory t ]
! [ "Unset initial directory"
! cscope-unset-initial-directory t ]
"-----------"
! [ "Create list of files to index"
! cscope-create-list-of-files-to-index t ]
! [ "Create list and index"
! cscope-index-files t ]
! [ "Edit list of files to index"
! cscope-edit-list-of-files-to-index t ]
! [ "Locate this buffer's cscope directory"
! cscope-tell-user-about-directory t ]
! [ "Dired this buffer's cscope directory"
! cscope-dired-directory t ]
"-----------"
! [ "Auto edit single match" (setq cscope-edit-single-match
! (not cscope-edit-single-match))
! :style toggle :selected cscope-edit-single-match ]
! [ "Auto display *cscope* buffer"
! (setq cscope-display-cscope-buffer
! (not cscope-display-cscope-buffer))
! :style toggle :selected cscope-display-cscope-buffer ]
! [ "Stop at first matching database"
! (setq cscope-stop-at-first-match-dir
! (not cscope-stop-at-first-match-dir))
! :style toggle :selected cscope-stop-at-first-match-dir ]
! [ "Index recursively" (setq cscope-index-recursively
! (not cscope-index-recursively))
! :style toggle :selected cscope-index-recursively ]
! [ "Suppress empty matches" (setq cscope-suppress-empty-matches
! (not cscope-suppress-empty-matches))
! :style toggle :selected cscope-suppress-empty-matches ]
! [ "Use relative paths" (setq cscope-use-relative-paths
! (not cscope-use-relative-paths))
! :style toggle :selected cscope-use-relative-paths ]
! [ "No mouse prompts" (setq cscope-no-mouse-prompts
! (not cscope-no-mouse-prompts))
! :style toggle :selected cscope-no-mouse-prompts ]
))
--- 1164,1228 ----
cscope-find-files-including-file t ]
"-----------"
! [ "Display *cscope* buffer" cscope-display-buffer t ]
! [ "Auto display *cscope* buffer toggle"
! cscope-display-buffer-toggle t ]
! [ "Next symbol" cscope-next-symbol t ]
! [ "Next file" cscope-next-file t ]
! [ "Previous symbol" cscope-prev-symbol t ]
! [ "Previous file" cscope-prev-file t ]
! [ "Pop mark" cscope-pop-mark t ]
"-----------"
! ( "More ..."
! [ "Set initial directory"
! cscope-set-initial-directory t ]
! [ "Unset initial directory"
! cscope-unset-initial-directory t ]
! "-----------"
! [ "Create list of files to index"
! cscope-create-list-of-files-to-index t ]
! [ "Create list and index"
! cscope-index-files t ]
! [ "Edit list of files to index"
! cscope-edit-list-of-files-to-index t ]
! [ "Locate this buffer's cscope directory"
! cscope-tell-user-about-directory t ]
! [ "Dired this buffer's cscope directory"
! cscope-dired-directory t ]
! )
"-----------"
! ( "Options"
! [ "Auto edit single match"
! (setq cscope-edit-single-match
! (not cscope-edit-single-match))
! :style toggle :selected cscope-edit-single-match ]
! [ "Auto display *cscope* buffer"
! (setq cscope-display-cscope-buffer
! (not cscope-display-cscope-buffer))
! :style toggle :selected cscope-display-cscope-buffer ]
! [ "Stop at first matching database"
! (setq cscope-stop-at-first-match-dir
! (not cscope-stop-at-first-match-dir))
! :style toggle
! :selected cscope-stop-at-first-match-dir ]
! [ "Never update cscope database"
! (setq cscope-do-not-update-database
! (not cscope-do-not-update-database))
! :style toggle :selected cscope-do-not-update-database ]
! [ "Index recursively"
! (setq cscope-index-recursively
! (not cscope-index-recursively))
! :style toggle :selected cscope-index-recursively ]
! [ "Suppress empty matches"
! (setq cscope-suppress-empty-matches
! (not cscope-suppress-empty-matches))
! :style toggle :selected cscope-suppress-empty-matches ]
! [ "Use relative paths"
! (setq cscope-use-relative-paths
! (not cscope-use-relative-paths))
! :style toggle :selected cscope-use-relative-paths ]
! [ "No mouse prompts" (setq cscope-no-mouse-prompts
! (not cscope-no-mouse-prompts))
! :style toggle :selected cscope-no-mouse-prompts ]
! )
))
***************
*** 1278,1282 ****
(goto-line line-number)
(setq old-point (point))
! (if cscope-adjust-range
(progn
;; Calculate the length of the line specified by cscope.
--- 1307,1311 ----
(goto-line line-number)
(setq old-point (point))
! (if (and cscope-adjust cscope-adjust-range)
(progn
;; Calculate the length of the line specified by cscope.
***************
*** 1447,1450 ****
--- 1476,1497 ----
+ (defun cscope-display-buffer ()
+ "Display the *cscope* buffer."
+ (interactive)
+ (let ((buffer (get-buffer cscope-output-buffer-name)))
+ (if buffer
+ (pop-to-buffer buffer)
+ (error "The *cscope* buffer does not exist yet"))))
+
+
+ (defun cscope-display-buffer-toggle ()
+ "Toggle cscope-display-cscope-buffer, which corresponds to
+ \"Auto display *cscope* buffer\"."
+ (interactive)
+ (setq cscope-display-cscope-buffer (not cscope-display-cscope-buffer))
+ (message "The cscope-display-cscope-buffer variable is now %s."
+ (if cscope-display-cscope-buffer "set" "unset")))
+
+
(defun cscope-next-symbol ()
"Move to the next symbol in the *cscope* buffer."
***************
*** 1780,1785 ****
(let (buffer-read-only continue)
(goto-char (point-max))
- (if (not cscope-first-match)
- (message "No matches were found."))
(if (and cscope-suppress-empty-matches
(= cscope-output-start (point)))
--- 1827,1830 ----
***************
*** 1817,1820 ****
--- 1862,1867 ----
(if cscope-start-directory
(setq default-directory cscope-start-directory))
+ (if (not cscope-first-match)
+ (message "No matches were found."))
)
))
***************
*** 1841,1845 ****
)
)
! (if (and done (eq old-buffer buffer))
(cscope-help))
(set-buffer old-buffer)
--- 1888,1892 ----
)
)
! (if (and done (eq old-buffer buffer) cscope-first-match)
(cscope-help))
(set-buffer old-buffer)
***************
*** 2254,2258 ****
(cscope-prompt-for-symbol "Find this symbol: " nil)
))
! (let ()
(setq cscope-symbol symbol)
(cscope-call (format "Finding symbol: %s" symbol)
--- 2301,2305 ----
(cscope-prompt-for-symbol "Find this symbol: " nil)
))
! (let ( (cscope-adjust t) ) ;; Use fuzzy matching.
(setq cscope-symbol symbol)
(cscope-call (format "Finding symbol: %s" symbol)
***************
*** 2267,2271 ****
(cscope-prompt-for-symbol "Find this global definition: " nil)
))
! (let ()
(setq cscope-symbol symbol)
(cscope-call (format "Finding global definition: %s" symbol)
--- 2314,2318 ----
(cscope-prompt-for-symbol "Find this global definition: " nil)
))
! (let ( (cscope-adjust t) ) ;; Use fuzzy matching.
(setq cscope-symbol symbol)
(cscope-call (format "Finding global definition: %s" symbol)
***************
*** 2278,2282 ****
"Find a symbol's global definition without prompting."
(interactive)
! (let ( (symbol (cscope-extract-symbol-at-cursor nil)) )
(setq cscope-symbol symbol)
(cscope-call (format "Finding global definition: %s" symbol)
--- 2325,2330 ----
"Find a symbol's global definition without prompting."
(interactive)
! (let ( (symbol (cscope-extract-symbol-at-cursor nil))
! (cscope-adjust t) ) ;; Use fuzzy matching.
(setq cscope-symbol symbol)
(cscope-call (format "Finding global definition: %s" symbol)
***************
*** 2292,2296 ****
"Find functions called by this function: " nil)
))
! (let ()
(setq cscope-symbol symbol)
(cscope-call (format "Finding functions called by: %s" symbol)
--- 2340,2344 ----
"Find functions called by this function: " nil)
))
! (let ( (cscope-adjust nil) ) ;; Suppress fuzzy matching.
(setq cscope-symbol symbol)
(cscope-call (format "Finding functions called by: %s" symbol)
***************
*** 2306,2310 ****
"Find functions calling this function: " nil)
))
! (let ()
(setq cscope-symbol symbol)
(cscope-call (format "Finding functions calling: %s" symbol)
--- 2354,2358 ----
"Find functions calling this function: " nil)
))
! (let ( (cscope-adjust t) ) ;; Use fuzzy matching.
(setq cscope-symbol symbol)
(cscope-call (format "Finding functions calling: %s" symbol)
***************
*** 2319,2323 ****
(cscope-prompt-for-symbol "Find this text string: " nil)
))
! (let ()
(setq cscope-symbol symbol)
(cscope-call (format "Finding text string: %s" symbol)
--- 2367,2371 ----
(cscope-prompt-for-symbol "Find this text string: " nil)
))
! (let ( (cscope-adjust t) ) ;; Use fuzzy matching.
(setq cscope-symbol symbol)
(cscope-call (format "Finding text string: %s" symbol)
***************
*** 2333,2337 ****
(cscope-prompt-for-symbol "Find this egrep pattern: " nil))
))
! (let ()
(setq cscope-symbol symbol)
(cscope-call (format "Finding egrep pattern: %s" symbol)
--- 2381,2385 ----
(cscope-prompt-for-symbol "Find this egrep pattern: " nil))
))
! (let ( (cscope-adjust t) ) ;; Use fuzzy matching.
(setq cscope-symbol symbol)
(cscope-call (format "Finding egrep pattern: %s" symbol)
***************
*** 2347,2351 ****
(cscope-prompt-for-symbol "Find this file: " t))
))
! (let ()
(setq cscope-symbol symbol)
(cscope-call (format "Finding file: %s" symbol)
--- 2395,2399 ----
(cscope-prompt-for-symbol "Find this file: " t))
))
! (let ( (cscope-adjust nil) ) ;; Disable fuzzy matching.
(setq cscope-symbol symbol)
(cscope-call (format "Finding file: %s" symbol)
***************
*** 2362,2366 ****
"Find files #including this file: " t))
))
! (let ()
(setq cscope-symbol symbol)
(cscope-call (format "Finding files #including file: %s" symbol)
--- 2410,2415 ----
"Find files #including this file: " t))
))
! (let ( (cscope-adjust nil) ) ;; Disable fuzzy matching.
! ;; Is this needed?
(setq cscope-symbol symbol)
(cscope-call (format "Finding files #including file: %s" symbol)
|
|
From: Hans-Bernhard B. <br...@us...> - 2002-03-16 15:20:47
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv22489 Modified Files: ChangeLog Log Message: Updated. Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -r1.112 -r1.113 *** ChangeLog 13 Mar 2002 20:39:13 -0000 1.112 --- ChangeLog 16 Mar 2002 15:20:44 -0000 1.113 *************** *** 1,2 **** --- 1,7 ---- + (2002/03/16 - broeker) Fix namelist handling bug: ./ in paths would cause + search for next name to fail (SF bug #529618). + -I/-p and their argument no longer have to be in + one line inside the namelist file, and -I pathname + can now be quote-escaped. (2002/03/13 - broeker) Add AC_PREREQ() call to configure.in. Enables Cygwin automagic hack to call the right autoconf for us. |
|
From: Hans-Bernhard B. <br...@us...> - 2002-03-16 15:20:31
|
Update of /cvsroot/cscope/cscope/src
In directory usw-pr-cvs1:/tmp/cvs-serv22328
Modified Files:
dir.c
Log Message:
Some more namelist file parsing bugs fixed:
1) (SF bug #529618): ./ in filenames caused cscope to search for a file '.c',
because some subroutine changed the content of makefilelists()'s variable
'path'.
2) The path argument to -I in a namelist file couldn't be quoted, and was
read directly via fscanf() --- silly oversight by me.
3) -p/-I and their argument can be on separate lines, now.
Index: dir.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/dir.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** dir.c 8 Mar 2002 15:34:05 -0000 1.16
--- dir.c 16 Mar 2002 15:20:27 -0000 1.17
***************
*** 311,314 ****
--- 311,317 ----
while (fgets(line, 10*PATHLEN, names) != NULL) {
char *point_in_line = line + (strlen(line) - 1);
+ size_t length_of_name = 0;
+ int unfinished_option = 0;
+ BOOL done = NO;
/* Kill away \n left at end of fgets()'d string: */
***************
*** 317,324 ****
/* Parse whitespace-terminated strings in line: */
! for (point_in_line = line;
! sscanf(point_in_line, "%s", path) == 1;
! point_in_line += strlen(path)) {
if (*path == '-') { /* if an option */
i = path[1];
switch (i) {
--- 320,339 ----
/* Parse whitespace-terminated strings in line: */
! point_in_line = line;
! while (sscanf(point_in_line, "%s", path) == 1) {
! /* Have to store this length --- inviewpath() will
! * modify path, later! */
! length_of_name = strlen(path);
!
if (*path == '-') { /* if an option */
+ if (unfinished_option) {
+ /* Can't have another option directly after an
+ * -I or -p option with no name after it! */
+ (void) fprintf(stderr, "\
+ cscope: Syntax error in namelist file %s: unfinished -I or -p option\n",
+ namefile);
+ unfinished_option = 0;
+ }
+
i = path[1];
switch (i) {
***************
*** 339,360 ****
s = path + 2; /* for "-Ipath" */
if (*s == '\0') { /* if "-I path" */
! (void) fscanf(names, "%s", path);
! s = path;
! }
! switch (i) {
! case 'I': /* #include file directory */
! if (firstbuild == YES) {
! shellpath(dir, sizeof(dir), s); /* expand $ and ~ */
! includedir(dir);
! }
! break;
! case 'p': /* file path components to display */
! if (*s < '0' || *s > '9') {
! (void) fprintf(stderr, "cscope: -p option in file %s: missing or invalid numeric value\n",
! namefile);
! }
! dispcomponents = atoi(s);
! break;
}
break;
default:
--- 354,391 ----
s = path + 2; /* for "-Ipath" */
if (*s == '\0') { /* if "-I path" */
! unfinished_option = i;
! break;
! }
!
! /* this code block used several times in here
! * --> make it a macro to avoid unnecessary
! * duplication */
! #define HANDLE_OPTION_ARGUMENT(i, s) \
! switch (i) { \
! case 'I': /* #include file directory */ \
! if (firstbuild == YES) { \
! /* expand $ and ~ */ \
! shellpath(dir, sizeof(dir), (s)); \
! includedir(dir); \
! } \
! unfinished_option = 0; \
! done = YES; \
! break; \
! case 'p': /* file path components to display */ \
! if (*(s) < '0' || *(s) > '9') { \
! (void) fprintf(stderr, \
! "cscope: -p option in file %s: missing or invalid numeric value\n", \
! namefile); \
! } \
! dispcomponents = atoi(s); \
! unfinished_option = 0; \
! done = YES; \
! break; \
! default: \
! done = NO; \
}
+
+ /* ... and now call it for the first time */
+ HANDLE_OPTION_ARGUMENT(i, s)
break;
default:
***************
*** 362,367 ****
namefile);
}
! }
! else if (*path == '"') {
/* handle quoted filenames... */
size_t in = 1, out = 0;
--- 393,397 ----
namefile);
}
! } else if (*path == '"') {
/* handle quoted filenames... */
size_t in = 1, out = 0;
***************
*** 391,411 ****
newpath[out]='\0';
}
! if ((s = inviewpath(newpath)) != NULL) {
! addsrcfile(s);
}
! else {
! (void) fprintf(stderr, "cscope: cannot find file %s\n",
! newpath);
! errorsfound = YES;
}
- } /* if (quoted entry) */
- else if ((s = inviewpath(path)) != NULL) {
- addsrcfile(s);
- }
- else {
- (void) fprintf(stderr, "cscope: cannot find file %s\n",
- path);
- errorsfound = YES;
}
}
}
--- 421,457 ----
newpath[out]='\0';
}
!
! /* If an -I or -p arguments was missing before,
! * treat this name as the argument: */
! HANDLE_OPTION_ARGUMENT(unfinished_option, newpath);
! if (! done) {
! if ((s = inviewpath(newpath)) != NULL) {
! addsrcfile(s);
! } else {
! (void) fprintf(stderr,
! "cscope: cannot find file %s\n",
! newpath);
! errorsfound = YES;
! }
}
! } else {
! /* ... so this is an ordinary file name, unquoted */
!
! /* If an -I or -p arguments was missing before,
! * treat this name as the argument: */
! HANDLE_OPTION_ARGUMENT(unfinished_option, path);
! if (!done) {
! if ((s = inviewpath(path)) != NULL) {
! addsrcfile(s);
! } else {
! (void) fprintf(stderr, "cscope: cannot find file %s\n",
! path);
! errorsfound = YES;
! }
}
}
+ point_in_line += length_of_name;
+ while (isspace((unsigned char) *point_in_line))
+ point_in_line ++;
}
}
|
|
From: Hans-Bernhard B. <br...@us...> - 2002-03-13 20:39:19
|
Update of /cvsroot/cscope/cscope
In directory usw-pr-cvs1:/tmp/cvs-serv9016
Modified Files:
ChangeLog configure.in configure
Log Message:
Call AC_PREREQ in configure.in to help Cygwin build correctly
Index: ChangeLog
===================================================================
RCS file: /cvsroot/cscope/cscope/ChangeLog,v
retrieving revision 1.111
retrieving revision 1.112
diff -C2 -r1.111 -r1.112
*** ChangeLog 13 Mar 2002 18:54:40 -0000 1.111
--- ChangeLog 13 Mar 2002 20:39:13 -0000 1.112
***************
*** 1,2 ****
--- 1,4 ----
+ (2002/03/13 - broeker) Add AC_PREREQ() call to configure.in. Enables Cygwin
+ automagic hack to call the right autoconf for us.
(2002/03/13 - broeker) Replace all references to manpage 'regcmp(3X)' in
messages and comments by regcomp(3), which is what
Index: configure.in
===================================================================
RCS file: /cvsroot/cscope/cscope/configure.in,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** configure.in 4 Jan 2002 12:11:50 -0000 1.22
--- configure.in 13 Mar 2002 20:39:13 -0000 1.23
***************
*** 3,6 ****
--- 3,7 ----
AM_INIT_AUTOMAKE(cscope, 16.0a)
AM_CONFIG_HEADER(config.h:config.h.in)
+ AC_PREREQ(2.13)
AC_CANONICAL_HOST
Index: configure
===================================================================
RCS file: /cvsroot/cscope/cscope/configure,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -r1.16 -r1.17
*** configure 4 Jan 2002 12:11:50 -0000 1.16
--- configure 13 Mar 2002 20:39:13 -0000 1.17
***************
*** 798,801 ****
--- 798,802 ----
+
# Make sure we can run config.sub.
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
***************
*** 804,808 ****
echo $ac_n "checking host system type""... $ac_c" 1>&6
[...1071 lines suppressed...]
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
! #line 2785 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
***************
*** 2804,2808 ****
; return 0; }
EOF
! if { (eval echo configure:2807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
--- 2805,2809 ----
; return 0; }
EOF
! if { (eval echo configure:2808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
|
|
From: Hans-Bernhard B. <br...@us...> - 2002-03-13 18:54:43
|
Update of /cvsroot/cscope/cscope/src
In directory usw-pr-cvs1:/tmp/cvs-serv12428/src
Modified Files:
find.c help.c display.c
Log Message:
Correct references to 'regcmp(3X)' manpage to point to 'regcomp(3)' instead
Index: find.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/find.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** find.c 9 Jul 2001 14:00:25 -0000 1.13
--- find.c 13 Mar 2002 18:54:40 -0000 1.14
***************
*** 659,663 ****
}
/* must be an exact match */
! /* note: regcmp doesn't recognize ^*keypad$ as a syntax error
unless it is given as a single arg */
(void) sprintf(buf, "^%s$", s);
--- 659,663 ----
}
/* must be an exact match */
! /* note: regcomp doesn't recognize ^*keypad$ as a syntax error
unless it is given as a single arg */
(void) sprintf(buf, "^%s$", s);
Index: help.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/help.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** help.c 15 Jun 2001 11:01:14 -0000 1.4
--- help.c 13 Mar 2002 18:54:40 -0000 1.5
***************
*** 62,66 ****
*tp++ = "Point with the mouse and click button 1 to move to the desired input field,\n";
*tp++ = "type the pattern to search for, and then press the RETURN key. For the first 4\n";
! *tp++ = "and last 2 input fields, the pattern can be a regcmp(3X) regular expression.\n";
*tp++ = "If the search is successful, you can edit the file containing a displayed line\n";
*tp++ = "by pointing with the mouse and clicking button 1.\n";
--- 62,66 ----
*tp++ = "Point with the mouse and click button 1 to move to the desired input field,\n";
*tp++ = "type the pattern to search for, and then press the RETURN key. For the first 4\n";
! *tp++ = "and last 2 input fields, the pattern can be a regcomp(3) regular expression.\n";
*tp++ = "If the search is successful, you can edit the file containing a displayed line\n";
*tp++ = "by pointing with the mouse and clicking button 1.\n";
***************
*** 70,74 ****
*tp++ = "Press the RETURN key repeatedly to move to the desired input field, type the\n";
*tp++ = "pattern to search for, and then press the RETURN key. For the first 4 and\n";
! *tp++ = "last 2 input fields, the pattern can be a regcmp(3X) regular expression.\n";
*tp++ = "If the search is successful, you can use these single-character commands:\n\n";
*tp++ = "0-9a-zA-Z\tEdit the file containing the displayed line.\n";
--- 70,74 ----
*tp++ = "Press the RETURN key repeatedly to move to the desired input field, type the\n";
*tp++ = "pattern to search for, and then press the RETURN key. For the first 4 and\n";
! *tp++ = "last 2 input fields, the pattern can be a regcomp(3) regular expression.\n";
*tp++ = "If the search is successful, you can use these single-character commands:\n\n";
*tp++ = "0-9a-zA-Z\tEdit the file containing the displayed line.\n";
Index: display.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/display.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -r1.19 -r1.20
*** display.c 19 Oct 2001 15:32:27 -0000 1.19
--- display.c 13 Mar 2002 18:54:40 -0000 1.20
***************
*** 483,487 ****
}
else if (rc == REGCMPERROR) {
! (void) sprintf(lastmsg, "Error in this regcmp(3X) regular expression: %s",
pattern);
--- 483,487 ----
}
else if (rc == REGCMPERROR) {
! (void) sprintf(lastmsg, "Error in this regcomp(3) regular expression: %s",
pattern);
|
|
From: Hans-Bernhard B. <br...@us...> - 2002-03-13 18:54:43
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv12428 Modified Files: ChangeLog Log Message: Correct references to 'regcmp(3X)' manpage to point to 'regcomp(3)' instead Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.110 retrieving revision 1.111 diff -C2 -r1.110 -r1.111 *** ChangeLog 8 Mar 2002 15:34:06 -0000 1.110 --- ChangeLog 13 Mar 2002 18:54:40 -0000 1.111 *************** *** 1,2 **** --- 1,5 ---- + (2002/03/13 - broeker) Replace all references to manpage 'regcmp(3X)' in + messages and comments by regcomp(3), which is what + cscope actually uses. (2002/03/08 - broeker) Fix completely broken handling of filenames with blanks in namelist files. Use fgets + sscanf, not fscanf, and |
|
From: Hans-Bernhard B. <br...@us...> - 2002-03-08 15:34:10
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv27769 Modified Files: ChangeLog Log Message: Revised handling of quotes in namelist files Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.109 retrieving revision 1.110 diff -C2 -r1.109 -r1.110 *** ChangeLog 4 Jan 2002 12:11:50 -0000 1.109 --- ChangeLog 8 Mar 2002 15:34:06 -0000 1.110 *************** *** 1,2 **** --- 1,5 ---- + (2002/03/08 - broeker) Fix completely broken handling of filenames with blanks + in namelist files. Use fgets + sscanf, not fscanf, and + don't split at whitespace inside "" quotes. (2001/01/04 - broeker) Survive Cygwin "binmode" mounted filesystems by explicitly forcing text mode for source files. |
|
From: Hans-Bernhard B. <br...@us...> - 2002-03-08 15:34:09
|
Update of /cvsroot/cscope/cscope/src
In directory usw-pr-cvs1:/tmp/cvs-serv27769/src
Modified Files:
dir.c
Log Message:
Revised handling of quotes in namelist files
Index: dir.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/dir.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** dir.c 2 Jan 2002 17:25:48 -0000 1.15
--- dir.c 8 Mar 2002 15:34:05 -0000 1.16
***************
*** 270,273 ****
--- 270,274 ----
char dir[PATHLEN + 1];
char path[PATHLEN + 1];
+ char line[PATHLEN * 10];
char *file;
char *s;
***************
*** 308,394 ****
}
/* get the names in the file */
! while (fscanf(names, "%s", path) == 1) {
! if (*path == '-') { /* if an option */
! i = path[1];
! switch (i) {
! case 'c': /* ASCII characters only in crossref */
! compress = NO;
! break;
! case 'k': /* ignore DFLT_INCDIR */
! kernelmode = YES;
! break;
! case 'q': /* quick search */
! invertedindex = YES;
! break;
! case 'T': /* truncate symbols to 8 characters */
! trun_syms = YES;
! break;
! case 'I': /* #include file directory */
! case 'p': /* file path components to display */
! s = path + 2; /* for "-Ipath" */
! if (*s == '\0') { /* if "-I path" */
! (void) fscanf(names, "%s", path);
! s = path;
! }
switch (i) {
! case 'I': /* #include file directory */
! if (firstbuild == YES) {
! shellpath(dir, sizeof(dir), s); /* expand $ and ~ */
! includedir(dir);
! }
break;
case 'p': /* file path components to display */
! if (*s < '0' || *s > '9') {
! (void) fprintf(stderr, "cscope: -p option in file %s: missing or invalid numeric value\n",
! namefile);
}
- dispcomponents = atoi(s);
break;
}
- break;
- default:
- (void) fprintf(stderr, "cscope: only -I, -c, -k, -p, and -T options can be in file %s\n",
- namefile);
}
! }
! else if (*path == '"') {
! /* handle quoted filenames... */
! size_t in = 1, out = 0;
! char *newpath = mymalloc(PATHLEN + 1);
! while (in < PATHLEN && path[in] != '\0') {
! if (path[in] == '"') {
! newpath[out] = '\0';
! break; /* found end of quoted string */
}
! else if (path[in] == '\\' && in < PATHLEN - 1
! && (path[in + 1]== '"' || path[in + 1] == '\\')) {
! /* un-escape \" or \\ sequence */
! newpath[out++] = path[in + 1];
! in += 2;
}
else {
! newpath[out++] = path[in++];
}
! } /* while */
! if (i >= PATHLEN) { /* safeguard against almost-overflow */
! newpath[out]='\0';
! }
! if ((s = inviewpath(newpath)) != NULL) {
addsrcfile(s);
}
else {
(void) fprintf(stderr, "cscope: cannot find file %s\n",
! newpath);
errorsfound = YES;
}
- } /* if (quoted entry) */
- else if ((s = inviewpath(path)) != NULL) {
- addsrcfile(s);
- }
- else {
- (void) fprintf(stderr, "cscope: cannot find file %s\n",
- path);
- errorsfound = YES;
}
}
--- 309,411 ----
}
/* get the names in the file */
! while (fgets(line, 10*PATHLEN, names) != NULL) {
! char *point_in_line = line + (strlen(line) - 1);
!
! /* Kill away \n left at end of fgets()'d string: */
! if (*point_in_line == '\n')
! *point_in_line = '\0';
!
! /* Parse whitespace-terminated strings in line: */
! for (point_in_line = line;
! sscanf(point_in_line, "%s", path) == 1;
! point_in_line += strlen(path)) {
! if (*path == '-') { /* if an option */
! i = path[1];
switch (i) {
! case 'c': /* ASCII characters only in crossref */
! compress = NO;
break;
+ case 'k': /* ignore DFLT_INCDIR */
+ kernelmode = YES;
+ break;
+ case 'q': /* quick search */
+ invertedindex = YES;
+ break;
+ case 'T': /* truncate symbols to 8 characters */
+ trun_syms = YES;
+ break;
+ case 'I': /* #include file directory */
case 'p': /* file path components to display */
! s = path + 2; /* for "-Ipath" */
! if (*s == '\0') { /* if "-I path" */
! (void) fscanf(names, "%s", path);
! s = path;
! }
! switch (i) {
! case 'I': /* #include file directory */
! if (firstbuild == YES) {
! shellpath(dir, sizeof(dir), s); /* expand $ and ~ */
! includedir(dir);
! }
! break;
! case 'p': /* file path components to display */
! if (*s < '0' || *s > '9') {
! (void) fprintf(stderr, "cscope: -p option in file %s: missing or invalid numeric value\n",
! namefile);
! }
! dispcomponents = atoi(s);
! break;
}
break;
+ default:
+ (void) fprintf(stderr, "cscope: only -I, -c, -k, -p, and -T options can be in file %s\n",
+ namefile);
}
}
! else if (*path == '"') {
! /* handle quoted filenames... */
! size_t in = 1, out = 0;
! char *newpath = mymalloc(PATHLEN + 1);
! while (in < PATHLEN && point_in_line[in] != '\0') {
! if (point_in_line[in] == '"') {
! newpath[out] = '\0';
! /* Make sure we skip over the part just read */
! point_in_line += in + 1;
! /* ... to deactive step by strlen() path at end
! * of loop */
! path[0]='\0';
! break; /* found end of quoted string */
! }
! else if (point_in_line[in] == '\\' && in < PATHLEN - 1
! && (point_in_line[in + 1]== '"' || point_in_line[in + 1] == '\\')) {
! /* un-escape \" or \\ sequence */
! newpath[out++] = point_in_line[in + 1];
! in += 2;
! }
! else {
! newpath[out++] = point_in_line[in++];
! }
! } /* while */
! if (in >= PATHLEN) { /* safeguard against almost-overflow */
! newpath[out]='\0';
}
! if ((s = inviewpath(newpath)) != NULL) {
! addsrcfile(s);
}
else {
! (void) fprintf(stderr, "cscope: cannot find file %s\n",
! newpath);
! errorsfound = YES;
}
! } /* if (quoted entry) */
! else if ((s = inviewpath(path)) != NULL) {
addsrcfile(s);
}
else {
(void) fprintf(stderr, "cscope: cannot find file %s\n",
! path);
errorsfound = YES;
}
}
}
|
|
From: Hans-Bernhard B. <br...@us...> - 2002-01-04 12:11:53
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv8110 Modified Files: ChangeLog config.h.in configure configure.in Log Message: Fix against Cygwin binmode mounts of source files Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.108 retrieving revision 1.109 diff -C2 -r1.108 -r1.109 *** ChangeLog 2002/01/02 17:26:34 1.108 --- ChangeLog 2002/01/04 12:11:50 1.109 *************** *** 1,2 **** --- 1,4 ---- + (2001/01/04 - broeker) Survive Cygwin "binmode" mounted filesystems by + explicitly forcing text mode for source files. (2002/01/02 - broeker) Updated files supplied or generated by automake to version 1.4-p5, the current recommended version in the Index: config.h.in =================================================================== RCS file: /cvsroot/cscope/cscope/config.h.in,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** config.h.in 2001/09/27 12:41:00 1.10 --- config.h.in 2002/01/04 12:11:50 1.11 *************** *** 58,61 **** --- 58,64 ---- #undef USING_LEX + /* Define if you have the _setmode function. */ + #undef HAVE__SETMODE + /* Define if you have the fixkeypad function. */ #undef HAVE_FIXKEYPAD *************** *** 75,78 **** --- 78,84 ---- /* Define if you have the regcomp function. */ #undef HAVE_REGCOMP + + /* Define if you have the setmode function. */ + #undef HAVE_SETMODE /* Define if you have the snprintf function. */ Index: configure =================================================================== RCS file: /cvsroot/cscope/cscope/configure,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** configure 2001/09/27 12:41:00 1.15 --- configure 2002/01/04 12:11:50 1.16 *************** *** 2406,2410 **** fi ! for ac_func in strchr memcpy memset do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 --- 2406,2410 ---- fi ! for ac_func in strchr memcpy memset setmode _setmode do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 Index: configure.in =================================================================== RCS file: /cvsroot/cscope/cscope/configure.in,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** configure.in 2001/09/27 12:38:18 1.21 --- configure.in 2002/01/04 12:11:50 1.22 *************** *** 481,485 **** AC_HEADER_DIRENT AC_HEADER_STDC ! AC_CHECK_FUNCS(strchr memcpy memset) AC_CHECK_HEADERS(fcntl.h sys/window.h sys/termios.h unistd.h) --- 481,485 ---- AC_HEADER_DIRENT AC_HEADER_STDC ! AC_CHECK_FUNCS(strchr memcpy memset setmode _setmode) AC_CHECK_HEADERS(fcntl.h sys/window.h sys/termios.h unistd.h) |