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...> - 2001-04-30 15:45:43
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv12801 Modified Files: ChangeLog Log Message: Bugfix and encapsulate dicode compression code Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.69 retrieving revision 1.70 diff -C2 -r1.69 -r1.70 *** ChangeLog 2001/04/26 18:26:26 1.69 --- ChangeLog 2001/04/30 15:45:40 1.70 *************** *** 1,2 **** --- 1,5 ---- + (2001/04/30 - broeker) Fixed signed char casting bug in dicode compression. + Encapsulated dicode compression idioms into macros + IS_A_DICODE() and DICODE_COMPRESS(). (2001/04/26 - ogawa) Fix for posterr (2001/04/26 - sorfa) Fixed a SIGSEGV in linemode in find.c. Thanks to OGAWA Hirofumi |
From: Hans-Bernhard B. <br...@us...> - 2001-04-30 15:45:43
|
Update of /cvsroot/cscope/cscope/src In directory usw-pr-cvs1:/tmp/cvs-serv12801/src Modified Files: crossref.c find.c main.c global.h Log Message: Bugfix and encapsulate dicode compression code Index: crossref.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/crossref.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** crossref.c 2000/10/09 19:33:34 1.6 --- crossref.c 2001/04/30 15:45:40 1.7 *************** *** 80,84 **** static struct symbol *symbol; ! void putcrossref(void); static void savesymbol(int token, int num); --- 80,84 ---- static struct symbol *symbol; ! static void putcrossref(void); static void savesymbol(int token, int num); *************** *** 209,217 **** /* output the symbols and source line */ ! void putcrossref(void) { int i, j; ! unsigned c; BOOL blank; /* blank indicator */ int symput = 0; /* symbols output */ --- 209,217 ---- /* output the symbols and source line */ ! static void putcrossref(void) { int i, j; ! unsigned char c; BOOL blank; /* blank indicator */ int symput = 0; /* symbols output */ *************** *** 263,270 **** } else { ! /* check for compressed blanks */ if (blank == YES) { if (dicode2[c]) { ! c = (0200 - 2) + dicode1[' '] + dicode2[c]; } else { --- 263,270 ---- } else { ! /* check for compressed blanks */ if (blank == YES) { if (dicode2[c]) { ! c = DICODE_COMPRESS(' ', c); } else { *************** *** 273,279 **** } /* compress digraphs */ ! else if (dicode1[c] && (j = dicode2[(unsigned) yytext[i + 1]]) != 0 && ! symput < symbols && i + 1 != symbol[symput].first) { ! c = (0200 - 2) + dicode1[c] + j; ++i; } --- 273,281 ---- } /* compress digraphs */ ! else if (IS_A_DICODE(c, yytext[i + 1]) ! && symput < symbols ! && i + 1 != symbol[symput].first ! ) { ! c = DICODE_COMPRESS(c, yytext[i + 1]); ++i; } *************** *** 415,428 **** writestring(char *s) { ! unsigned c; int i; /* compress digraphs */ for (i = 0; (c = s[i]) != '\0'; ++i) { ! if (dicode1[c] && dicode2[(unsigned) s[i + 1]]) { ! c = (0200 - 2) + dicode1[c] + dicode2[(unsigned) s[i + 1]]; ++i; } ! dbputc((int) c); } } --- 417,432 ---- writestring(char *s) { ! unsigned char c; int i; /* compress digraphs */ for (i = 0; (c = s[i]) != '\0'; ++i) { ! if (/* dicode1[c] && dicode2[(unsigned char) s[i + 1]] */ ! IS_A_DICODE(c, s[i + 1])) { ! /* c = (0200 - 2) + dicode1[c] + dicode2[(unsigned char) s[i + 1]]; */ ! c = DICODE_COMPRESS(c, s[i + 1]); ++i; } ! dbputc(c); } } Index: find.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/find.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** find.c 2001/04/26 16:21:33 1.10 --- find.c 2001/04/30 15:45:40 1.11 *************** *** 586,590 **** int i; char *s; ! unsigned c; /* HBB: be nice: free regexp before allocating a new one */ --- 586,590 ---- int i; char *s; ! unsigned char c; /* HBB 20010427: changed uint to uchar */ /* HBB: be nice: free regexp before allocating a new one */ *************** *** 675,680 **** s = cpattern; for (i = 0; (c = pattern[i]) != '\0'; ++i) { ! if (dicode1[c] && dicode2[(unsigned) pattern[i + 1]]) { ! c = (0200 - 2) + dicode1[c] + dicode2[(unsigned) pattern[i + 1]]; ++i; } --- 675,680 ---- s = cpattern; for (i = 0; (c = pattern[i]) != '\0'; ++i) { ! if (IS_A_DICODE(c, pattern[i + 1])) { ! c = DICODE_COMPRESS(c, pattern[i + 1]); ++i; } Index: main.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/main.c,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** main.c 2001/03/29 15:03:55 1.18 --- main.c 2001/04/30 15:45:40 1.19 *************** *** 750,757 **** if (compress == YES) { for (i = 0; i < 16; ++i) { ! dicode1[(unsigned) (dichar1[i])] = i * 8 + 1; } for (i = 0; i < 8; ++i) { ! dicode2[(unsigned) (dichar2[i])] = i + 1; } } --- 750,757 ---- if (compress == YES) { for (i = 0; i < 16; ++i) { ! dicode1[(unsigned char) (dichar1[i])] = i * 8 + 1; } for (i = 0; i < 8; ++i) { ! dicode2[(unsigned char) (dichar2[i])] = i + 1; } } Index: global.h =================================================================== RCS file: /cvsroot/cscope/cscope/src/global.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** global.h 2001/03/27 14:09:19 1.13 --- global.h 2001/04/30 15:45:40 1.14 *************** *** 93,96 **** --- 93,105 ---- extern char dicode2[]; /* digraph second character code */ + /* and some macros to help using dicodes: */ + /* Check if a given pair of chars is compressable as a dicode: */ + #define IS_A_DICODE(inchar1, inchar2) \ + (dicode1[(unsigned char)(inchar1)] && dicode2[(unsigned char)(inchar2)]) + /* Combine the pair into a dicode */ + #define DICODE_COMPRESS(inchar1, inchar2) \ + ((0200 - 2) + dicode1[(unsigned char)(inchar1)] \ + + dicode2[(unsigned char)(inchar2)]) + /* main.c global data */ extern char *editor, *home, *shell, *lineflag; /* environment variables */ |
From: Petr S. <pe...@us...> - 2001-04-26 18:26:29
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv17540 Modified Files: ChangeLog AUTHORS Log Message: Fix for posterr to terminate the message with \n Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -r1.68 -r1.69 *** ChangeLog 2001/04/26 16:21:33 1.68 --- ChangeLog 2001/04/26 18:26:26 1.69 *************** *** 1,2 **** --- 1,3 ---- + (2001/04/26 - ogawa) Fix for posterr (2001/04/26 - sorfa) Fixed a SIGSEGV in linemode in find.c. Thanks to OGAWA Hirofumi for pointing out the problem. Index: AUTHORS =================================================================== RCS file: /cvsroot/cscope/cscope/AUTHORS,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** AUTHORS 2001/04/24 17:42:22 1.22 --- AUTHORS 2001/04/26 18:26:26 1.23 *************** *** 22,23 **** --- 22,24 ---- Tom Hull - Similar work to CSCOPE_EDITOR and friends Donald Slutz - Various fixes + OGAWA Hirofumi - line mode fixes |
From: Petr S. <pe...@us...> - 2001-04-26 18:26:29
|
Update of /cvsroot/cscope/cscope/src In directory usw-pr-cvs1:/tmp/cvs-serv17540/src Modified Files: display.c Log Message: Fix for posterr to terminate the message with \n Index: display.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/display.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** display.c 2001/03/27 14:09:19 1.13 --- display.c 2001/04/26 18:26:26 1.14 *************** *** 644,647 **** --- 644,648 ---- { (void) vfprintf(stderr, msg, ap); + (void) fputc('\n', stderr); } else |
From: Petr S. <pe...@us...> - 2001-04-26 16:21:36
|
Update of /cvsroot/cscope/cscope/src In directory usw-pr-cvs1:/tmp/cvs-serv22086/src Modified Files: find.c Log Message: Fixed a SIGSEGV in linemode in find.c. Thanks to OGAWA Hirofumi for pointing out the problem, where printw was used in line mode to report an error. Index: find.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/find.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** find.c 2000/05/31 16:54:10 1.9 --- find.c 2001/04/26 16:21:33 1.10 *************** *** 498,505 **** progress("Search", searchcount, nsrcfiles); if (egrep(file, refsfound, "%s <unknown> %ld ") < 0) { ! move(1, 0); ! clrtoeol(); ! printw("Cannot open file %s", file); ! refresh(); } } --- 498,502 ---- progress("Search", searchcount, nsrcfiles); if (egrep(file, refsfound, "%s <unknown> %ld ") < 0) { ! posterr ("Cannot open file %s", file); } } |
From: Petr S. <pe...@us...> - 2001-04-26 16:21:36
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv22086 Modified Files: ChangeLog Log Message: Fixed a SIGSEGV in linemode in find.c. Thanks to OGAWA Hirofumi for pointing out the problem, where printw was used in line mode to report an error. Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -r1.67 -r1.68 *** ChangeLog 2001/04/24 17:42:22 1.67 --- ChangeLog 2001/04/26 16:21:33 1.68 *************** *** 1,2 **** --- 1,4 ---- + (2001/04/26 - sorfa) Fixed a SIGSEGV in linemode in find.c. Thanks to OGAWA Hirofumi + for pointing out the problem. (2001/04/24 - slutz) STMTMAX increased to 10000 (2001/03/29 - broeker) Some further MSDOS/DJGPP patches. Close file |
From: Petr S. <pe...@us...> - 2001-04-24 17:42:25
|
Update of /cvsroot/cscope/cscope/src In directory usw-pr-cvs1:/tmp/cvs-serv14683/src Modified Files: constants.h Log Message: STMTMAX increased to 10000 Index: constants.h =================================================================== RCS file: /cvsroot/cscope/cscope/src/constants.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** constants.h 2001/01/24 16:24:52 1.5 --- constants.h 2001/04/24 17:42:23 1.6 *************** *** 78,82 **** #define INVNAME "cscope.in.out" /* inverted index to the database */ #define INVPOST "cscope.po.out" /* inverted index postings */ ! #define STMTMAX 5000 /* maximum source statement length */ #define READ 4 /* access(2) parameter */ #define WRITE 2 /* access(2) parameter */ --- 78,82 ---- #define INVNAME "cscope.in.out" /* inverted index to the database */ #define INVPOST "cscope.po.out" /* inverted index postings */ ! #define STMTMAX 10000 /* maximum source statement length */ #define READ 4 /* access(2) parameter */ #define WRITE 2 /* access(2) parameter */ |
From: Petr S. <pe...@us...> - 2001-04-24 17:42:25
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv14683 Modified Files: AUTHORS ChangeLog Log Message: STMTMAX increased to 10000 Index: AUTHORS =================================================================== RCS file: /cvsroot/cscope/cscope/AUTHORS,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** AUTHORS 2001/02/09 21:07:17 1.21 --- AUTHORS 2001/04/24 17:42:22 1.22 *************** *** 21,22 **** --- 21,23 ---- Jason Duell - CSCOPE_EDITOR and CSCOPE_LINEFLAG* Tom Hull - Similar work to CSCOPE_EDITOR and friends + Donald Slutz - Various fixes Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.66 retrieving revision 1.67 diff -C2 -r1.66 -r1.67 *** ChangeLog 2001/03/29 15:07:11 1.66 --- ChangeLog 2001/04/24 17:42:22 1.67 *************** *** 1,2 **** --- 1,3 ---- + (2001/04/24 - slutz) STMTMAX increased to 10000 (2001/03/29 - broeker) Some further MSDOS/DJGPP patches. Close file 'refsfound' before unlinking it. Avoid calling curses |
From: Hans-Bernhard B. <br...@us...> - 2001-03-29 15:07:17
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv16751 Modified Files: ChangeLog Log Message: updated Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -r1.65 -r1.66 *** ChangeLog 2001/03/27 15:14:02 1.65 --- ChangeLog 2001/03/29 15:07:11 1.66 *************** *** 1,2 **** --- 1,9 ---- + (2001/03/29 - broeker) Some further MSDOS/DJGPP patches. Close file + 'refsfound' before unlinking it. Avoid calling curses + function nonl(). Replace fork/exec/wait machinery in + exec.c by call to lib function spawnvp(). + (2001/03/28 - broeker) Added flex-able version of scanner.l to the project, as + file src/fscanner.l. Changed configure.in and + src/Makefile.am to use it if using 'flex'. (2001/03/27 - broeker) Remove 'extern' declaration of yylval from egrep.y:yylex(). It's not needed, as this is inside the |
From: Hans-Bernhard B. <br...@us...> - 2001-03-29 15:03:59
|
Update of /cvsroot/cscope/cscope/src In directory usw-pr-cvs1:/tmp/cvs-serv16234/src Modified Files: exec.c main.c Log Message: Some more DJGPP patches: curses, sub-processes, and close-before-unlink Index: exec.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/exec.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** exec.c 2001/03/27 14:09:19 1.4 --- exec.c 2001/03/29 15:03:55 1.5 *************** *** 41,44 **** --- 41,47 ---- #include <sys/wait.h> #include <sys/types.h> /* pid_t */ + #ifdef __DJGPP__ + #include <process.h> + #endif #if defined(USE_NCURSES) && !defined(RENAMED_NCURSES) #include <ncurses.h> *************** *** 53,59 **** --- 56,64 ---- static RETSIGTYPE (*oldsigstp)(); + #ifndef __MSDOS__ /* none of these is needed, there */ static int join(pid_t p); static int myexecvp(char *a, char **args); static pid_t myfork(void); + #endif /* execute forks and executes a program or shell script, waits for it to *************** *** 78,81 **** --- 83,91 ---- for (p = 0; (argv[p] = va_arg(ap, char *)) != 0; p++) ; + #ifdef __MSDOS__ + /* HBB 20010313: in MSDOG, everything is completely different. + * No fork()/exec()/wait(), but rather a single libc call: */ + exitcode = spawnvp(P_WAIT, a, argv); + #else if ((p = myfork()) == 0) { (void) myexecvp(a, argv); /* child */ *************** *** 84,90 **** --- 94,104 ---- exitcode = join(p); /* parent */ } + #endif /* MSDOS */ + /* the menu and scrollbar may be changed by the command executed */ #if UNIXPC || !TERMINFO + # ifndef __DJGPP__ /* leave CRLF handling as is */ nonl(); + # endif cbreak(); /* endwin() turns off cbreak mode so restore it */ noecho(); *************** *** 96,99 **** --- 110,115 ---- } + #ifndef __MSDOS__ /* None of the following functions is used, there */ + /* myexecvp is an interface to the execvp system call to * modify argv[0] to reference the last component of its path-name. *************** *** 173,174 **** --- 189,192 ---- return(status >> 8); } + + #endif /* !MSDOS */ Index: main.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/main.c,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** main.c 2001/03/27 14:09:19 1.17 --- main.c 2001/03/29 15:03:55 1.18 *************** *** 1360,1364 **** --- 1360,1366 ---- { incurses = YES; + #ifndef __MSDOS__ /* HBB 20010313 */ (void) nonl(); /* don't translate an output \n to \n\r */ + #endif (void) cbreak(); /* single character input */ (void) noecho(); /* don't echo input characters */ *************** *** 1435,1438 **** --- 1437,1445 ---- myexit(int sig) { + /* HBB 20010313; close file before unlinking it. Unix may not care + * about that, but DOS absolutely needs it */ + if (refsfound != NULL) + fclose(refsfound); + /* remove any temporary files */ if (temp1[0] != '\0') { |
From: Hans-Bernhard B. <br...@us...> - 2001-03-29 15:02:21
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv15882 Modified Files: configure.in Log Message: Version of scanner.l tailored to flex added, autoconfed its usage Index: configure.in =================================================================== RCS file: /cvsroot/cscope/cscope/configure.in,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** configure.in 2001/02/09 19:59:59 1.12 --- configure.in 2001/03/29 15:01:56 1.13 *************** *** 127,130 **** --- 127,137 ---- ACNU_PROG_LEX ACNU_DECL_YYTEXT + dnl set up variable used to choose between the two lexer sources... + if test "x$LEX" = "xflex"; then + LEXER_SOURCE="fscanner" + else + LEXER_SOURCE="scanner" + fi + AC_SUBST(LEXER_SOURCE) ]) dnl === END aclocal REPLACEMENT MACROS *************** *** 145,152 **** fi AC_PROG_YACC - - if test "x$LEX" = "xflex"; then - LEX="$LEX -l" - fi dnl === BEGIN CURSES CHECK --- 152,155 ---- |
From: Hans-Bernhard B. <br...@us...> - 2001-03-29 15:02:20
|
Update of /cvsroot/cscope/cscope/src In directory usw-pr-cvs1:/tmp/cvs-serv15882/src Modified Files: Makefile.am Added Files: fscanner.l Log Message: Version of scanner.l tailored to flex added, autoconfed its usage --- NEW FILE --- %{ /*=========================================================================== Copyright (c) 1998-2000, The Santa Cruz Operation All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: *Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. *Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. *Neither name of The Santa Cruz Operation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =========================================================================*/ /* cscope - interactive C symbol cross-reference * * C symbol scanner */ #include "global.h" /* the line counting has been moved from character reading for speed */ /* comments are discarded */ #define IFLEVELINC 5 /* #if nesting level size increment */ static char const rcsid[] = "$Id: fscanner.l,v 1.1 2001/03/29 15:01:57 broeker Exp $"; /* keyword text for fast testing of keywords in the scanner */ extern char enumtext[]; extern char externtext[]; extern char structtext[]; extern char typedeftext[]; extern char uniontext[]; int first; /* buffer index for first char of symbol */ int last; /* buffer index for last char of symbol */ int lineno; /* symbol line number */ int myylineno = 1; static BOOL arraydimension; /* inside array dimension declaration */ static BOOL bplisting; /* breakpoint listing */ static int braces; /* unmatched left brace count */ static BOOL classdef; /* c++ class definition */ static BOOL elseelif; /* #else or #elif found */ static BOOL esudef; /* enum/struct/union global definition */ static BOOL external; /* external definition */ static int externalbraces; /* external definition outer brace count */ static BOOL fcndef; /* function definition */ static BOOL global; /* file global scope (outside functions) */ static int iflevel; /* #if nesting level */ static BOOL initializer; /* data initializer */ static int initializerbraces; /* data initializer outer brace count */ static BOOL lex; /* lex file */ static int miflevel = IFLEVELINC; /* maximum #if nesting level */ static int *maxifbraces; /* maximum brace count within #if */ static int *preifbraces; /* brace count before #if */ static int parens; /* unmatched left parenthesis count */ static BOOL ppdefine; /* preprocessor define statement */ static BOOL pseudoelif; /* pseudo-#elif */ static BOOL oldtype; /* next identifier is an old type */ static BOOL rules; /* lex/yacc rules */ static BOOL sdl; /* sdl file */ static BOOL structfield; /* structure field declaration */ static int tagdef; /* class/enum/struct/union tag definition */ static BOOL template; /* function template */ static int templateparens; /* function template outer parentheses count */ static int typedefbraces = -1; /* initial typedef brace count */ static int token; /* token found */ static int ident_start; /* begin of preceding identifier */ static void multicharconstant(char terminator); static int skipcomment_input(void); static int comment(void); static int comment_input(void); #ifdef FLEX_SCANNER #define YY_INPUT(buf,result,max_size) \ {\ int c = skipcomment_input (); \ result = (c == EOF) ? YY_NULL : (buf[0] = c, 1); \ } #else /* Assume this is the AT&T/SCO style lex */ #undef input #define input() \ ((yytchar=\ (yytchar=yysptr>yysbuf\ ?*(unsigned char *)--yysptr\ :getc(yyin)\ )=='/'\ ?comment()\ :yytchar\ )==EOF\ ?0\ :yytchar\ ) #define noncommentinput() ((yytchar=yysptr>yysbuf?*--yysptr:getc(yyin))==EOF?0:yytchar) #undef unput #define unput(c) (*yysptr++=(c)) #endif %} identifier [a-zA-Z_$][a-zA-Z_0-9$]* number \.?[0-9][.0-9a-fA-FlLuUxX]* %start SDL %a 4000 %o 7000 /* flex only options, to avoid incompatibilities with AT&T lex: */ %array /* 'flex -B' (batch mode) doesn't work, for this scanner. Probably * a usage bug, but let's stay conservative: */ %option always-interactive /* Exclusive initial states (not available in 'lex'!) */ %x WAS_ENDIF WAS_IDENTIFIER %% %\{ { /* lex/yacc C declarations/definitions */ global = YES; goto more; /* NOTREACHED */ } %\} { global = NO; goto more; /* NOTREACHED */ } ^%% { /* lex/yacc rules delimiter */ braces = 0; if (rules == NO) { rules = YES; /* simulate a yylex() or yyparse() definition */ (void) strcat(yytext, " /* "); first = strlen(yytext); if (lex == YES) { (void) strcat(yytext, "yylex"); } else { /* yacc: yyparse implicitly calls yylex */ char *s = " yylex()"; char *cp = s + strlen(s); while (--cp >= s) { unput(*cp); } (void) strcat(yytext, "yyparse"); } last = strlen(yytext); (void) strcat(yytext, " */"); yyleng = strlen(yytext); yymore(); return(FCNDEF); } else { rules = NO; global = YES; last = first; yymore(); return(FCNEND); /* NOTREACHED */ } } <SDL>STATE[ \t]+({identifier}|\*) { /* sdl state, treat as function def */ braces = 1; fcndef = YES; token = FCNDEF; goto findident; /* NOTREACHED */ } <SDL>ENDSTATE[ \t] { /* end of an sdl state, treat as end of a function */ goto endstate; /* NOTREACHED */ } \{ { /* count unmatched left braces for fcn def detection */ ++braces; /* mark an untagged enum/struct/union so its beginning can be found */ if (tagdef) { if (braces == 1) { esudef = YES; } token = tagdef; tagdef = '\0'; last = first; yymore(); return(token); } goto more; /* NOTREACHED */ } <WAS_ENDIF>.*\n[ \t\n]*#[ \t]*ifn?(def)? { /* attempt to correct erroneous brace count caused by: * * #if ... * ... { * #endif * #if ... * ... { * #endif */ /* the current #if must not have an #else or #elif */ if (elseelif == YES) { goto endif; /* NOTREACHED */ } pseudoelif = YES; BEGIN(INITIAL); goto more; /* NOTREACHED */ } <INITIAL>\#[ \t]*ifn?(def)? { /* #if, #ifdef or #ifndef */ elseelif = NO; if (pseudoelif == YES) { pseudoelif = NO; goto elif; /* NOTREACHED */ } /* make sure there is room for the current brace count */ if (iflevel == miflevel) { miflevel += IFLEVELINC; maxifbraces = myrealloc(maxifbraces, miflevel * sizeof(int)); preifbraces = myrealloc(preifbraces, miflevel * sizeof(int)); } /* push the current brace count */ preifbraces[iflevel] = braces; maxifbraces[iflevel++] = 0; goto more; /* NOTREACHED */ } \#[ \t]*el(se|if) { /* #elif or #else */ elseelif = YES; elif: if (iflevel > 0) { /* save the maximum brace count for this #if */ if (braces > maxifbraces[iflevel - 1]) { maxifbraces[iflevel - 1] = braces; } /* restore the brace count to before the #if */ braces = preifbraces[iflevel - 1]; } goto more; /* NOTREACHED */ } <WAS_ENDIF>.*\n { /* an #endif with no #if right after it */ endif: if (iflevel > 0) { /* get the maximum brace count for this #if */ if (braces < maxifbraces[--iflevel]) { braces = maxifbraces[iflevel]; } } BEGIN(INITIAL); yyless(0); /* rescan */ goto more; /* NOTREACHED */ } \#[ \t]*endif { /* #endif */ /* delay treatment of #endif depending on whether an * #if comes right after it, or not */ BEGIN(WAS_ENDIF); goto more; /* NOTREACHED */ } \} { /* could be the last enum member initializer */ if (braces == initializerbraces) { initializerbraces = -1; initializer = NO; } if (--braces <= 0) { endstate: braces = 0; classdef = NO; } if (braces == 0 || (braces == 1 && classdef == YES)) { /* if the end of an enum/struct/union definition */ if (esudef == YES) { esudef = NO; } /* if the end of the function */ else if (fcndef == YES) { fcndef = NO; last = first; yymore(); return(FCNEND); } } goto more; /* NOTREACHED */ } \( { /* count unmatched left parentheses for function templates */ ++parens; goto more; /* NOTREACHED */ } \) { if (--parens <= 0) { parens = 0; } /* if the end of a function template */ if (parens == templateparens) { templateparens = -1; template = NO; } goto more; /* NOTREACHED */ } = { /* if a global definition initializer */ if (global == YES && ppdefine == NO && yytext[0] != '#') { initializerbraces = braces; initializer = YES; } goto more; /* NOTREACHED */ } : { /* a if global structure field */ if (global == YES && ppdefine == NO && yytext[0] != '#') { structfield = YES; } goto more; /* NOTREACHED */ } \, { if (braces == initializerbraces) { initializerbraces = -1; initializer = NO; } structfield = NO; goto more; /* NOTREACHED */ } ; { /* if the enum/struct/union was not a definition */ if (braces == 0) { esudef = NO; } /* if the end of a typedef */ if (braces == typedefbraces) { typedefbraces = -1; } /* if the end of a external definition */ if (braces == externalbraces) { externalbraces = -1; external = NO; } structfield = NO; initializer = NO; goto more; /* NOTREACHED */ } \#[ \t]*define[ \t]+{identifier} { /* preprocessor macro or constant definition */ ppdefine = YES; token = DEFINE; if (compress == YES) { yytext[0] = '\1'; /* compress the keyword */ } findident: first = yyleng - 1; while (yytext[first] != ' ' && yytext[first] != '\t') { --first; } ++first; goto fcn; /* NOTREACHED */ } class[ \t]+{identifier}[ \t\na-zA-Z0-9_():]*\{ { /* class definition */ classdef = YES; tagdef = 'c'; /* RE!JECT; */ yyless(5); /* eat up 'class', and re-scan */ goto more; /* NOTREACHED */ } /* Notice: three copies of essentially same rule may seem * strange, but they help flex to avoid slowing down the * scan (--> 'variable trailing context rules') */ enum/([ \t\n]+{identifier})?[ \t\n]*\{ { /* enum definition */ tagdef = 'e'; goto ident; /* NOTREACHED */ } struct/([ \t\n]+{identifier})?[ \t\n]*\{ { /* struct definition */ tagdef = 's'; goto ident; /* NOTREACHED */ } union/([ \t\n]+{identifier})?[ \t\n]*\{ { /* union definition */ tagdef = 'u'; goto ident; /* NOTREACHED */ } {identifier} { /* identifier found: do nothing, yet. (!) */ BEGIN(WAS_IDENTIFIER); ident_start = first; goto more; /* NOTREACHED */ } <WAS_IDENTIFIER>[ \t]*\([ \t\na-zA-Z0-9_*&[\]=,.]*\)[ \t\n()]*[:a-zA-Z_#{] { /* warning: "if (...)" must not overflow yytext, so the content of function argument definitions is restricted, in particular parentheses are not allowed */ /* if a function definition */ /* note: "#define a (b) {" and "#if defined(a)\n#" are not */ if ((braces == 0 && ppdefine == NO && yytext[0] != '#' && rules == NO) || (braces == 1 && classdef == YES)) { fcndef = YES; token = FCNDEF; goto fcn; /* NOTREACHED */ } goto fcncal; /* NOTREACHED */ } <WAS_IDENTIFIER>[ \t]*\( { /* if a function call */ fcncal: if (fcndef == YES || ppdefine == YES || rules == YES) { token = FCNCALL; goto fcn; /* NOTREACHED */ } if (template == NO) { templateparens = parens; template = YES; } goto ident; /* NOTREACHED */ } <WAS_IDENTIFIER>[* \t\n]+[a-zA-Z0-9_] { /* typedef name use */ goto ident; /* NOTREACHED */ } <WAS_IDENTIFIER>.|\n { /* the old {identifier} rule */ char *s; if (global == YES && ppdefine == NO && yytext[0] != '#' && external == NO && initializer == NO && arraydimension == NO && structfield == NO && template == NO && fcndef == NO) { if (esudef == YES) { /* if enum/struct/union */ token = MEMBERDEF; } else { token = GLOBALDEF; } } else { ident: token = IDENT; } fcn: if (YYSTATE == WAS_IDENTIFIER) { /* Position back to the actual identifier: */ yyleng = first; first = ident_start; BEGIN(INITIAL); yyless(0); } /* if a long line */ if (yyleng > STMTMAX) { int c; /* skip to the end of the line */ warning("line too long"); while ((c = skipcomment_input()) != LEXEOF) { if (c == '\n') { unput(c); break; } } } /* truncate a long symbol */ if (yyleng - first > PATLEN) { warning("symbol too long"); yyleng = first + PATLEN; yytext[yyleng] = '\0'; } /* if a keyword */ yymore(); if ((s = lookup(yytext + first)) != NULL) { first = yyleng; /* if the start of a typedef */ if (s == typedeftext) { typedefbraces = braces; oldtype = YES; } /* if an enum/struct/union */ /* (needed for "typedef struct tag name;" so tag isn't marked as the typedef name) */ else if (s == enumtext || s == structtext || s == uniontext) { } /* if an external definition */ else if (s == externtext) { externalbraces = braces; external = YES; } /* keyword doesn't start a function template */ else if (templateparens == parens && template == YES) { templateparens = -1; template = NO; } else { /* next identifier after typedef was a keyword */ oldtype = NO; } } else { /* identifier */ last = yyleng; /* if a class/enum/struct/union tag definition */ if (tagdef && strnotequal(yytext + first, "class")) { token = tagdef; tagdef = '\0'; if (braces == 0) { esudef = YES; } } /* if a typedef name */ else if (braces == typedefbraces && oldtype == NO && arraydimension == NO) { token = TYPEDEF; } else { oldtype = NO; } return(token); /* NOTREACHED */ } } \[ { /* array dimension (don't worry or about subscripts) */ arraydimension = YES; goto more; /* NOTREACHED */ } \] { arraydimension = NO; goto more; /* NOTREACHED */ } \\\n { /* preprocessor statement is continued on next line */ goto eol; /* NOTREACHED */ } \n { /* end of the line */ if (ppdefine == YES) { /* end of a #define */ ppdefine = NO; yyless(yyleng - 1); /* rescan \n */ last = first; yymore(); return(DEFINEEND); } /* skip the first 8 columns of a breakpoint listing line */ /* and skip the file path in the page header */ if (bplisting == YES) { int c, i; switch (skipcomment_input()) { /* tab and EOF just fall through */ case ' ': /* breakpoint number line */ case '[': for (i = 1; i < 8 && skipcomment_input() != LEXEOF; ++i) ; break; case '.': /* header line */ case '/': /* skip to the end of the line */ while ((c = skipcomment_input()) != LEXEOF) { if (c == '\n') { unput(c); break; } } break; case '\n': /* empty line */ unput('\n'); break; } } eol: ++myylineno; first = 0; last = 0; if (symbols > 0) { return(NEWLINE); } lineno = myylineno; } \' { /* character constant */ if (sdl == NO) { multicharconstant('\''); } goto more; /* NOTREACHED */ } \" { /* string constant */ multicharconstant('"'); goto more; /* NOTREACHED */ } ^[ \t\f]+ { /* don't save leading white space */ } \#[ \t]*include[ \t]*["<][^"> \t\n]+ { /* #include file */ char *s; s = strpbrk(yytext, "\"<"); incfile(s + 1, s); first = s - yytext; last = yyleng; if (compress == YES) { yytext[0] = '\2'; /* compress the keyword */ } yymore(); return(INCLUDE); /* NOTREACHED */ } \#[ \t]*{identifier} | /* preprocessor keyword */ {number} | /* number */ . { /* punctuation and operators */ more: first = yyleng; yymore(); } %% void initscanner(char *srcfile) { char *s; if (maxifbraces == NULL) { maxifbraces = mymalloc(miflevel * sizeof(int)); preifbraces = mymalloc(miflevel * sizeof(int)); } first = 0; /* buffer index for first char of symbol */ last = 0; /* buffer index for last char of symbol */ lineno = 1; /* symbol line number */ myylineno = 1; /* input line number */ arraydimension = NO; /* inside array dimension declaration */ bplisting = NO; /* breakpoint listing */ braces = 0; /* unmatched left brace count */ classdef = NO; /* c++ class definition */ elseelif = NO; /* #else or #elif found */ esudef = NO; /* enum/struct/union global definition */ external = NO; /* external definition */ externalbraces = -1; /* external definition outer brace count */ fcndef = NO; /* function definition */ global = YES; /* file global scope (outside functions) */ iflevel = 0; /* #if nesting level */ initializer = NO; /* data initializer */ initializerbraces = -1; /* data initializer outer brace count */ lex = NO; /* lex file */ parens = 0; /* unmatched left parenthesis count */ ppdefine = NO; /* preprocessor define statement */ pseudoelif = NO; /* pseudo-#elif */ oldtype = NO; /* next identifier is an old type */ rules = NO; /* lex/yacc rules */ sdl = NO; /* sdl file */ structfield = NO; /* structure field declaration */ tagdef = '\0'; /* class/enum/struct/union tag definition */ template = NO; /* function template */ templateparens = -1; /* function template outer parentheses count */ typedefbraces = -1; /* initial typedef braces count */ ident_start = 0; BEGIN 0; /* if this is not a C file */ if ((s = strrchr(srcfile, '.')) != NULL) { switch (*++s) { /* this switch saves time on C files */ case 'b': if (strcmp(s, "bp") == 0) { /* breakpoint listing */ bplisting = YES; } break; case 'l': if (strcmp(s, "l") == 0) { /* lex */ lex = YES; global = NO; } break; case 's': if (strcmp(s, "sd") == 0) { /* sdl */ sdl = YES; BEGIN SDL; } break; case 'y': if (strcmp(s, "y") == 0) { /* yacc */ global = NO; } break; } } } static int skipcomment_input(void) { int c; if ((c = getc (yyin)) == '/') { return comment (); } else { return c; } } static int comment_input(void) { int c; c = getc (yyin); return c; } static int comment(void) { int c, lastc; do { if ((c = getc(yyin)) == '*') { /* C comment */ lastc = '\0'; while ((c = getc(yyin)) != EOF && (c != '/' || lastc != '*')) { /* fewer '/'s */ if (c == '\n') { ++myylineno; } lastc = c; } /* return a blank for Reiser cpp token concatenation */ if ((c = getc(yyin)) == '_' || isalnum(c)) { (void) ungetc(c, yyin); c = ' '; break; } } else if (c == '/') { /* C++ comment */ while ((c = getc(yyin)) != EOF && c != '\n') { ; } break; } else { /* not a comment */ (void) ungetc(c, yyin); c = '/'; break; /* NOTREACHED */ } /* there may be an immediately following comment */ } while (c == '/'); return(c); } static void multicharconstant(char terminator) { char c; /* scan until the terminator is found */ while ((c = yytext[yyleng++] = comment_input()) != terminator) { switch (c) { case '\\': /* escape character */ if ((yytext[yyleng++] = comment_input()) == '\n') { ++myylineno; } break; case '\t': /* tab character */ /* if not a lex program, continue */ if (lex == NO) { break; } /* fall through */ case '\n': /* illegal character */ /* assume the terminator is missing, so put this character back */ unput(c); yytext[--yyleng] = '\0'; /* fall through */ case LEXEOF: /* end of file */ return; default: /* change a control character to a blank */ if (!isprint((unsigned char)c)) { yytext[yyleng - 1] = ' '; } } /* if this token will overflow the line buffer */ /* note: '\\' may cause yyleng to be > STMTMAX */ if (yyleng >= STMTMAX) { /* truncate the token */ while ((c = comment_input()) != LEXEOF) { if (c == terminator) { unput(c); break; } else if (c == '\n') { ++myylineno; } } } } yytext[yyleng] = '\0'; } Index: Makefile.am =================================================================== RCS file: /cvsroot/cscope/cscope/src/Makefile.am,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Makefile.am 2000/05/04 22:46:01 1.3 --- Makefile.am 2001/03/29 15:01:57 1.4 *************** *** 3,7 **** bin_PROGRAMS = cscope ! cscope_SOURCES = scanner.l egrep.y \ alloc.c basename.c command.c compath.c constants.h \ crossref.c dir.c display.c edit.c exec.c find.c \ --- 3,7 ---- bin_PROGRAMS = cscope ! cscope_SOURCES = $(LEXER_SOURCE).l egrep.y \ alloc.c basename.c command.c compath.c constants.h \ crossref.c dir.c display.c edit.c exec.c find.c \ *************** *** 12,15 **** --- 12,16 ---- LEXLIB = @LEXLIB@ + LEXER_SOURCE = @LEXER_SOURCE@ cscope_LDADD = $(CURSES_LIBS) $(LEXLIB) *************** *** 18,25 **** ## Hack to clean the generated files and not include them in a "make dist". ! BUILT_SOURCES = scanner.c egrep.c ! CLEANFILES = scanner.c egrep.c dist-hook: ! rm -f $(distdir)/scanner.c $(distdir)/egrep.c EXTRA_DIST = emacs.e gmacs.ml --- 19,26 ---- ## Hack to clean the generated files and not include them in a "make dist". ! BUILT_SOURCES = $(LEXER_SOURCE).c egrep.c ! CLEANFILES = $(LEXER_SOURCE).c egrep.c dist-hook: ! rm -f $(distdir)/$(LEXER_SOURCE).c $(distdir)/egrep.c EXTRA_DIST = emacs.e gmacs.ml |
From: Hans-Bernhard B. <br...@us...> - 2001-03-27 14:10:08
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv11685 Modified Files: ChangeLog Log Message: DOS support and related minor changes Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -r1.63 -r1.64 *** ChangeLog 2001/02/12 17:39:04 1.63 --- ChangeLog 2001/03/27 14:10:05 1.64 *************** *** 1,2 **** --- 1,11 ---- + (2001/03/12 - broeker) Some minor changes for compiling cscope with DJGPP, the + MSDOG port of GCC. Mainly non-availability of some + Unix features like CLOSE_ON_EXEC for files, and SIGTSTP. + (2001/03/12 - broeker) Added 'b' flags and O_BINARY bits to all file-opening + calls for (potentially) binary data files, to allow + cscope to work on DOS-style platforms. Moved vpopen() + and vpfopen() prototypes into vp.h. + (2001/03/12 - broeker) rename 'basename' to 'mybasename' --- avoid XPG4 + name conflict (2001/02/12 - duell) man page update for CSCOPE_* information (2001/02/09 - duell & hull) Support for CSCOPE_EDITOR, CSCOPE_LINEFLAG and |
From: Hans-Bernhard B. <br...@us...> - 2001-03-27 14:09:24
|
Update of /cvsroot/cscope/cscope/src In directory usw-pr-cvs1:/tmp/cvs-serv11542 Modified Files: basename.c command.c dir.c display.c edit.c exec.c invlib.c main.c mypopen.c vpfopen.c global.h library.h vp.h Log Message: DOS support and related minor changes Index: basename.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/basename.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** basename.c 2000/04/27 16:33:47 1.1 --- basename.c 2001/03/27 14:09:19 1.2 *************** *** 40,44 **** char * ! basename(char *path) { char *s, *strrchr(); --- 40,44 ---- char * ! mybasename(char *path) { char *s, *strrchr(); Index: command.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/command.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** command.c 2000/05/31 16:54:10 1.10 --- command.c 2001/03/27 14:09:19 1.11 *************** *** 553,557 **** int c; ! if ((file = myfopen(filename, "r")) == NULL) { cannotopen(filename); return(NO); --- 553,557 ---- int c; ! if ((file = myfopen(filename, "rb")) == NULL) { cannotopen(filename); return(NO); *************** *** 568,572 **** } (void) fclose(file); ! (void) freopen(temp1, "r", refsfound); countrefs(); } --- 568,572 ---- } (void) fclose(file); ! (void) freopen(temp1, "rb", refsfound); countrefs(); } Index: dir.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/dir.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** dir.c 2001/02/09 19:59:59 1.9 --- dir.c 2001/03/27 14:09:19 1.10 *************** *** 388,394 **** scan_dir(path, recurse_dir); } ! else if (entry->d_ino != 0 ! && issrcfile(path) ! && infilelist(path) == NO) { addsrcfile(file, path); } --- 388,399 ---- scan_dir(path, recurse_dir); } ! else if ( ! #ifdef __DJGPP__ /* FIXME: should test for feature, not platform */ ! 1 /* DJGPP doesn't have this field in dirent */ ! #else ! entry->d_ino != 0 ! #endif ! && issrcfile(path) ! && infilelist(path) == NO) { addsrcfile(file, path); } Index: display.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/display.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** display.c 2000/05/31 16:54:10 1.12 --- display.c 2001/03/27 14:09:19 1.13 *************** *** 428,432 **** } else { ! if ((nonglobalrefs = myfopen(temp2, "w")) == NULL) { cannotopen(temp2); return(NO); --- 428,432 ---- } else { ! if ((nonglobalrefs = myfopen(temp2, "wb")) == NULL) { cannotopen(temp2); return(NO); *************** *** 440,444 **** /* append the non-global references */ ! (void) freopen(temp2, "r", nonglobalrefs); while ((c = getc(nonglobalrefs)) != EOF) { (void) putc(c, refsfound); --- 440,444 ---- /* append the non-global references */ ! (void) freopen(temp2, "rb", nonglobalrefs); while ((c = getc(nonglobalrefs)) != EOF) { (void) putc(c, refsfound); *************** *** 454,458 **** /* reopen the references found file for reading */ ! (void) freopen(temp1, "r", refsfound); nextline = 1; totallines = 0; --- 454,458 ---- /* reopen the references found file for reading */ ! (void) freopen(temp1, "rb", refsfound); nextline = 1; totallines = 0; *************** *** 735,744 **** { if (refsfound == NULL) { ! if ((refsfound = myfopen(temp1, "w")) == NULL) { cannotopen(temp1); return(NO); } } ! else if (freopen(temp1, "w", refsfound) == NULL) { postmsg("Cannot reopen temporary file"); return(NO); --- 735,744 ---- { if (refsfound == NULL) { ! if ((refsfound = myfopen(temp1, "wb")) == NULL) { cannotopen(temp1); return(NO); } } ! else if (freopen(temp1, "wb", refsfound) == NULL) { postmsg("Cannot reopen temporary file"); return(NO); Index: edit.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/edit.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** edit.c 2001/02/09 21:07:17 1.4 --- edit.c 2001/03/27 14:09:19 1.5 *************** *** 106,114 **** file = filepath(file); ! (void) sprintf(msg, "%s +%s %s", basename(editor), linenum, file); postmsg(msg); (void) sprintf(plusnum, lineflag, linenum); /* if this is the more or page commands */ ! if (strcmp(s = basename(editor), "more") == 0 || strcmp(s, "page") == 0) { /* get it to pause after displaying a file smaller than the screen --- 106,114 ---- file = filepath(file); ! (void) sprintf(msg, "%s +%s %s", mybasename(editor), linenum, file); postmsg(msg); (void) sprintf(plusnum, lineflag, linenum); /* if this is the more or page commands */ ! if (strcmp(s = mybasename(editor), "more") == 0 || strcmp(s, "page") == 0) { /* get it to pause after displaying a file smaller than the screen Index: exec.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/exec.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** exec.c 2000/05/31 16:54:10 1.3 --- exec.c 2001/03/27 14:09:19 1.4 *************** *** 106,110 **** /* modify argv[0] to reference the last component of its path name */ ! args[0] = basename(args[0]); /* execute the program or shell script */ --- 106,110 ---- /* modify argv[0] to reference the last component of its path name */ ! args[0] = mybasename(args[0]); /* execute the program or shell script */ *************** *** 130,134 **** --- 130,136 ---- oldsigquit = signal(SIGQUIT, SIG_IGN); oldsighup = signal(SIGHUP, SIG_IGN); + #ifdef SIGTSTP oldsigstp = signal(SIGTSTP, SIG_DFL); + #endif } /* so they can be used to stop the child */ *************** *** 137,141 **** --- 139,145 ---- (void) signal(SIGQUIT, SIG_DFL); (void) signal(SIGHUP, SIG_DFL); + #ifdef SIGTSTP (void) signal(SIGTSTP, SIG_DFL); + #endif } /* check for fork failure */ *************** *** 162,166 **** --- 166,172 ---- (void) signal(SIGQUIT, oldsigquit); (void) signal(SIGHUP, oldsighup); + #ifdef SIGTSTP (void) signal(SIGTSTP, oldsigstp); + #endif /* return the child's exit code */ Index: invlib.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/invlib.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** invlib.c 2000/05/18 15:21:21 1.8 --- invlib.c 2001/03/27 14:09:19 1.9 *************** *** 124,128 **** #endif /* output file */ ! if ((outfile = vpfopen(invname, "w+")) == NULL) { invcannotopen(invname); return(0); --- 124,128 ---- #endif /* output file */ ! if ((outfile = vpfopen(invname, "w+b")) == NULL) { invcannotopen(invname); return(0); *************** *** 132,136 **** /* posting file */ ! if ((fpost = vpfopen(invpost, "w")) == NULL) { invcannotopen(invpost); return(0); --- 132,136 ---- /* posting file */ ! if ((fpost = vpfopen(invpost, "wb")) == NULL) { invcannotopen(invpost); return(0); *************** *** 508,512 **** int read_index; ! if ((invcntl->invfile = vpfopen(invname, ((stat == 0) ? "r" : "r+"))) == NULL) { invcannotopen(invname); return(-1); --- 508,512 ---- int read_index; ! if ((invcntl->invfile = vpfopen(invname, ((stat == 0) ? "rb" : "r+b"))) == NULL) { invcannotopen(invname); return(-1); *************** *** 526,530 **** goto closeinv; } ! if ((invcntl->postfile = vpfopen(invpost, ((stat == 0) ? "r" : "r+"))) == NULL) { invcannotopen(invpost); goto closeinv; --- 526,530 ---- goto closeinv; } ! if ((invcntl->postfile = vpfopen(invpost, ((stat == 0) ? "rb" : "r+b"))) == NULL) { invcannotopen(invpost); goto closeinv; Index: main.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/main.c,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** main.c 2001/02/09 21:07:17 1.16 --- main.c 2001/03/27 14:09:19 1.17 *************** *** 38,41 **** --- 38,42 ---- #include "global.h" + #include "vp.h" #include "version.h" /* FILEVERSION and FIXVERSION */ #include <stdlib.h> /* atoi */ *************** *** 255,259 **** #if !BSD || sun /* suns can access Amdahl databases */ /* System V has a 14 character limit */ ! s = basename(path); if (strlen(s) > 11) { s[11] = '\0'; --- 256,260 ---- #if !BSD || sun /* suns can access Amdahl databases */ /* System V has a 14 character limit */ ! s = mybasename(path); if (strlen(s) > 11) { s[11] = '\0'; *************** *** 393,397 **** /* if the cross-reference is to be considered up-to-date */ if (isuptodate == YES) { ! if ((oldrefs = vpfopen(reffile, "r")) == NULL) { posterr("cscope: cannot open file %s\n", reffile); myexit(1); --- 394,398 ---- /* if the cross-reference is to be considered up-to-date */ if (isuptodate == YES) { ! if ((oldrefs = vpfopen(reffile, "rb")) == NULL) { posterr("cscope: cannot open file %s\n", reffile); myexit(1); *************** *** 542,554 **** /* create the file name(s) used for a new cross-referene */ (void) strcpy(path, reffile); ! s = basename(path); *s = '\0'; (void) strcat(path, "n"); ++s; ! (void) strcpy(s, basename(reffile)); newreffile = stralloc(path); ! (void) strcpy(s, basename(invname)); newinvname = stralloc(path); ! (void) strcpy(s, basename(invpost)); newinvpost = stralloc(path); --- 543,555 ---- /* create the file name(s) used for a new cross-referene */ (void) strcpy(path, reffile); ! s = mybasename(path); *s = '\0'; (void) strcat(path, "n"); ++s; ! (void) strcpy(s, mybasename(reffile)); newreffile = stralloc(path); ! (void) strcpy(s, mybasename(invname)); newinvname = stralloc(path); ! (void) strcpy(s, mybasename(invpost)); newinvpost = stralloc(path); *************** *** 762,766 **** opendatabase(void) { ! if ((symrefs = vpopen(reffile, O_RDONLY)) == -1) { cannotopen(reffile); myexit(1); --- 763,767 ---- opendatabase(void) { ! if ((symrefs = vpopen(reffile, O_BINARY | O_RDONLY)) == -1) { cannotopen(reffile); myexit(1); *************** *** 832,836 **** /* if there is an old cross-reference and its current directory matches */ /* or this is an unconditional build */ ! if ((oldrefs = vpfopen(reffile, "r")) != NULL && unconditional == NO && fscanf(oldrefs, "cscope %d %s", &fileversion, olddir) == 2 && (strcmp(olddir, currentdir) == 0 || /* remain compatible */ --- 833,837 ---- /* if there is an old cross-reference and its current directory matches */ /* or this is an unconditional build */ ! if ((oldrefs = vpfopen(reffile, "rb")) != NULL && unconditional == NO && fscanf(oldrefs, "cscope %d %s", &fileversion, olddir) == 2 && (strcmp(olddir, currentdir) == 0 || /* remain compatible */ *************** *** 912,916 **** /* so get the list of included files */ while (i++ < oldnum && fscanf(oldrefs, "%s", oldname) == 1) { ! addsrcfile(basename(oldname), oldname); } (void) fclose(oldrefs); --- 913,917 ---- /* so get the list of included files */ while (i++ < oldnum && fscanf(oldrefs, "%s", oldname) == 1) { ! addsrcfile(mybasename(oldname), oldname); } (void) fclose(oldrefs); *************** *** 924,928 **** } /* reopen the old cross-reference file for fast scanning */ ! if ((symrefs = vpopen(reffile, O_RDONLY)) == -1) { (void) fprintf(stderr, "cscope: cannot open file %s\n", reffile); myexit(1); --- 925,929 ---- } /* reopen the old cross-reference file for fast scanning */ ! if ((symrefs = vpopen(reffile, O_BINARY | O_RDONLY)) == -1) { (void) fprintf(stderr, "cscope: cannot open file %s\n", reffile); myexit(1); *************** *** 939,947 **** } /* open the new cross-reference file */ ! if ((newrefs = myfopen(newreffile, "w")) == NULL) { (void) fprintf(stderr, "cscope: cannot open file %s\n", reffile); myexit(1); } ! if (invertedindex == YES && (postings = myfopen(temp1, "w")) == NULL) { cannotwrite(temp1); cannotindex(); --- 940,948 ---- } /* open the new cross-reference file */ ! if ((newrefs = myfopen(newreffile, "wb")) == NULL) { (void) fprintf(stderr, "cscope: cannot open file %s\n", reffile); myexit(1); } ! if (invertedindex == YES && (postings = myfopen(temp1, "wb")) == NULL) { cannotwrite(temp1); cannotindex(); Index: mypopen.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/mypopen.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** mypopen.c 2001/01/24 16:24:52 1.5 --- mypopen.c 2001/03/27 14:09:19 1.6 *************** *** 37,47 **** #include <sys/types.h> #include <sys/wait.h> ! #include "global.h" /* pid_t, RETSIGTYPE, shell, and basename() */ #define tst(a,b) (*mode == 'r'? (b) : (a)) #define RDR 0 #define WTR 1 - #define CLOSE_ON_EXEC 1 static char const rcsid[] = "$Id$"; --- 37,53 ---- #include <sys/types.h> #include <sys/wait.h> ! #include "global.h" /* pid_t, RETSIGTYPE, shell, and mybasename() */ #define tst(a,b) (*mode == 'r'? (b) : (a)) #define RDR 0 #define WTR 1 + /* HBB 20010312: make this a bit safer --- don't blindly assume it's 1 */ + #ifdef FD_CLOEXEC + # define CLOSE_ON_EXEC FD_CLOEXEC + #else + # define CLOSE_ON_EXEC 1 + #endif + static char const rcsid[] = "$Id$"; *************** *** 60,63 **** --- 66,75 ---- fd = open(path, flag); + #ifdef __DJGPP__ /* FIXME: test feature, not platform */ + /* HBB 20010312: DOS GCC doesn't have FD_CLOEXEC (yet), so it + * always fails this call. Have to skip that step */ + if(fd != -1) + return(fd); + #endif if(fd != -1 && (fcntl(fd, F_SETFD, CLOSE_ON_EXEC) != -1)) return(fd); *************** *** 85,89 **** --- 97,107 ---- fp = fopen(path, mode); + #ifdef __DJGPP__ /* FIXME: test feature, not platform */ + /* HBB 20010312: DOS GCC doesn't have FD_CLOEXEC (yet), so it + * always fails this call. Have to skip that step */ + if(fp) + #else if(fp && (fcntl(fileno(fp), F_SETFD, CLOSE_ON_EXEC) != -1)) + #endif return(fp); *************** *** 94,97 **** --- 112,120 ---- mypopen(char *cmd, char *mode) { + #ifdef __DJGPP__ + /* HBB 20010312: Has its own implementation of popen(), which + * is better suited to the platform than cscope's */ + return (popen)(cmd, mode); + #else int p[2]; pid_t *poptr; *************** *** 121,125 **** #endif (void) close(yourside); ! (void) execlp(shell, basename(shell), "-c", cmd, 0); _exit(1); } else if (pid > 0) --- 144,148 ---- #endif (void) close(yourside); ! (void) execlp(shell, mybasename(shell), "-c", cmd, 0); _exit(1); } else if (pid > 0) *************** *** 130,135 **** --- 153,162 ---- (void) close(yourside); return(fdopen(myside, mode)); + #endif } + #ifndef __DJGPP__ /* Don't replace that system's pclose() with our own. */ + /* FIXME: should we really override pclose(), after having left + * popen() well alone, and calling our own version mypopen()? */ int pclose(FILE *ptr) *************** *** 157,158 **** --- 184,186 ---- return(status); } + #endif Index: vpfopen.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/vpfopen.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** vpfopen.c 2000/05/03 22:02:10 1.2 --- vpfopen.c 2001/03/27 14:09:19 1.3 *************** *** 47,52 **** int i; ! if ((returncode = myfopen(filename, type)) == NULL && filename[0] != '/' && ! strcmp(type, "r") == 0) { vpinit(NULL); for (i = 1; i < vpndirs; i++) { --- 47,55 ---- int i; ! if ((returncode = myfopen(filename, type)) == NULL ! && filename[0] != '/' ! /* && strcmp(type, "r") == 0 */ /* HBB: this breaks if type=="rb" */ ! && type[0] == 'r' ! ) { vpinit(NULL); for (i = 1; i < vpndirs; i++) { Index: global.h =================================================================== RCS file: /cvsroot/cscope/cscope/src/global.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** global.h 2001/02/09 21:07:17 1.12 --- global.h 2001/03/27 14:09:19 1.13 *************** *** 294,299 **** int mygetch(void); int myopen(char *path, int flag, int mode); - int vpopen(char *path, int oflag); - int vpaccess(char *path, mode_t amode); int hash(char *ss); int execute(char *a, ...); --- 294,297 ---- Index: library.h =================================================================== RCS file: /cvsroot/cscope/cscope/src/library.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** library.h 2000/05/18 14:14:57 1.3 --- library.h 2001/03/27 14:09:19 1.4 *************** *** 45,49 **** /* private library */ ! char *basename(char *path); char *compath(char *pathname); char *egrepinit(char *egreppat); --- 45,49 ---- /* private library */ ! char *mybasename(char *path); char *compath(char *pathname); char *egrepinit(char *egreppat); Index: vp.h =================================================================== RCS file: /cvsroot/cscope/cscope/src/vp.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** vp.h 2000/04/27 16:33:47 1.1 --- vp.h 2001/03/27 14:09:19 1.2 *************** *** 42,45 **** --- 42,59 ---- #define MAXPATH 200 /* max length for entire name */ + #include <fcntl.h> + #include <sys/stat.h> + + /* In view of DOS portability, we may need the vale of the O_BINARY + * bit mask. On Unix platforms, it's not defined, nor is it needed --> + * set it to a no-op value */ + #ifndef O_BINARY + # ifdef _O_BINARY + # define O_BINARY _O_BINARY + # else + # define O_BINARY 0x00 + # endif + #endif + #if !NOMALLOC extern char **vpdirs; /* directories (including current) in view path */ *************** *** 52,53 **** --- 66,69 ---- void vpinit(char *currentdir); + int vpopen(char *path, int oflag); + int vpaccess(char *path, mode_t amode); |
From: Petr S. <pe...@us...> - 2001-02-12 17:38:31
|
Update of /cvsroot/cscope/cscope/doc In directory usw-pr-cvs1:/tmp/cvs-serv27835/doc Modified Files: cscope.1 Log Message: Updated cscope.1 man page for better description of CSCOPE_* environment variables. Index: cscope.1 =================================================================== RCS file: /cvsroot/cscope/cscope/doc/cscope.1,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** cscope.1 2001/02/09 21:07:16 1.12 --- cscope.1 2001/02/12 17:39:04 1.13 *************** *** 360,373 **** .PP .SH "ENVIRONMENT VARIABLES" .B CSCOPE_EDITOR ! Overrides the EDITOR and VIEWER variables. To be used when the EDITOR ! or VIEWER value is not compatible when called from cscope. .TP .B CSCOPE_LINEFLAG ! Options to the editor. .TP .B CSCOPE_LINEFLAG_AFTER_FILE ! Options to the editor that are required after the name of the ! file to be edited. .TP .B EDITOR --- 360,385 ---- .PP .SH "ENVIRONMENT VARIABLES" + .TP .B CSCOPE_EDITOR ! Overrides the EDITOR and VIEWER variables. Use this if you wish to use ! a different editor with cscope than that specified by your ! EDITOR/VIEWER variables. .TP .B CSCOPE_LINEFLAG ! Format of the line number flag for your editor. By default, cscope ! invokes your editor via the equivalent of ``editor +N file'', where ! ``N'' is the line number that the editor should jump to. This format ! is used by both emacs and vi. If your editor needs something ! different, specify it in this variable, with ``%s'' as a placeholder ! for the line number. Ex: if your editor needs to be invoked as ! ``editor -#103 file'' to go to line 103, set this variable to ! ``-#%s''. .TP .B CSCOPE_LINEFLAG_AFTER_FILE ! Set this variable to ``yes'' if your editor needs to be invoked with ! the line number option after the filename to be edited. To continue ! the example from CSCOPE_LINEFLAG, above: if your editor needs to see ! ``editor file -#number'', set this environment variable. Users of most ! standard editors (vi, emacs) do not need to set this variable. .TP .B EDITOR *************** *** 410,413 **** --- 422,426 ---- .PP .SH FILES + .TP .B cscope.files Default files containing -I, -p, -q, and -T options and the |
From: Petr S. <pe...@us...> - 2001-02-12 17:38:31
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv27835 Modified Files: ChangeLog Log Message: Updated cscope.1 man page for better description of CSCOPE_* environment variables. Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -r1.62 -r1.63 *** ChangeLog 2001/02/09 21:07:17 1.62 --- ChangeLog 2001/02/12 17:39:04 1.63 *************** *** 1,2 **** --- 1,3 ---- + (2001/02/12 - duell) man page update for CSCOPE_* information (2001/02/09 - duell & hull) Support for CSCOPE_EDITOR, CSCOPE_LINEFLAG and CSCOPE_LINEFLAGS_AFTER_FILE |
From: Petr S. <pe...@us...> - 2001-02-09 21:06:52
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv4507 Modified Files: ChangeLog AUTHORS Log Message: Introduced CSCOPE_EDITOR, CSCOPE_LINEFLAG and CSCOPE_LINEFLAG_AFTER_FILE. CSCOPE_EDITOR is to be used when the default EDITOR value is incompatible when called from cscope. CSCOPE_LINEFLAG allows options to be provided for the editor and CSCOPE_LINEFLAG_AFTER_FILE allows options for the editor if they need to be set after the name of the file to be edited. Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -r1.61 -r1.62 *** ChangeLog 2001/02/09 19:59:59 1.61 --- ChangeLog 2001/02/09 21:07:17 1.62 *************** *** 1,2 **** --- 1,4 ---- + (2001/02/09 - duell & hull) Support for CSCOPE_EDITOR, CSCOPE_LINEFLAG and + CSCOPE_LINEFLAGS_AFTER_FILE (2001/02/09 - petrs) Updated version number to 15.2b (for beta) (2001/02/09 - chuck & wilfredo) Darwin support Index: AUTHORS =================================================================== RCS file: /cvsroot/cscope/cscope/AUTHORS,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -r1.20 -r1.21 *** AUTHORS 2001/02/09 19:59:59 1.20 --- AUTHORS 2001/02/09 21:07:17 1.21 *************** *** 19,20 **** --- 19,22 ---- Bruce Frost - Stability Chuck Marco and Wilfredo Sanchez - Darwin support + Jason Duell - CSCOPE_EDITOR and CSCOPE_LINEFLAG* + Tom Hull - Similar work to CSCOPE_EDITOR and friends |
From: Petr S. <pe...@us...> - 2001-02-09 21:06:52
|
Update of /cvsroot/cscope/cscope/doc In directory usw-pr-cvs1:/tmp/cvs-serv4507/doc Modified Files: cscope.1 Log Message: Introduced CSCOPE_EDITOR, CSCOPE_LINEFLAG and CSCOPE_LINEFLAG_AFTER_FILE. CSCOPE_EDITOR is to be used when the default EDITOR value is incompatible when called from cscope. CSCOPE_LINEFLAG allows options to be provided for the editor and CSCOPE_LINEFLAG_AFTER_FILE allows options for the editor if they need to be set after the name of the file to be edited. Index: cscope.1 =================================================================== RCS file: /cvsroot/cscope/cscope/doc/cscope.1,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** cscope.1 2000/11/22 17:37:33 1.11 --- cscope.1 2001/02/09 21:07:16 1.12 *************** *** 360,363 **** --- 360,374 ---- .PP .SH "ENVIRONMENT VARIABLES" + .B CSCOPE_EDITOR + Overrides the EDITOR and VIEWER variables. To be used when the EDITOR + or VIEWER value is not compatible when called from cscope. + .TP + .B CSCOPE_LINEFLAG + Options to the editor. + .TP + .B CSCOPE_LINEFLAG_AFTER_FILE + Options to the editor that are required after the name of the + file to be edited. + .TP .B EDITOR Preferred editor, which defaults to vi. |
From: Petr S. <pe...@us...> - 2001-02-09 21:06:52
|
Update of /cvsroot/cscope/cscope/src In directory usw-pr-cvs1:/tmp/cvs-serv4507/src Modified Files: edit.c global.h main.c Log Message: Introduced CSCOPE_EDITOR, CSCOPE_LINEFLAG and CSCOPE_LINEFLAG_AFTER_FILE. CSCOPE_EDITOR is to be used when the default EDITOR value is incompatible when called from cscope. CSCOPE_LINEFLAG allows options to be provided for the editor and CSCOPE_LINEFLAG_AFTER_FILE allows options for the editor if they need to be set after the name of the file to be edited. Index: edit.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/edit.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** edit.c 2000/05/31 16:54:10 1.3 --- edit.c 2001/02/09 21:07:17 1.4 *************** *** 102,106 **** { char msg[MSGLEN + 1]; /* message */ ! char plusnum[NUMLEN + 2]; /* line number option */ char *s; --- 102,106 ---- { char msg[MSGLEN + 1]; /* message */ ! char plusnum[NUMLEN + 20]; /* line number option: allow space for wordy line# flag */ char *s; *************** *** 108,113 **** (void) sprintf(msg, "%s +%s %s", basename(editor), linenum, file); postmsg(msg); ! (void) sprintf(plusnum, "+%s", linenum); ! /* if this is the more or page commands */ if (strcmp(s = basename(editor), "more") == 0 || strcmp(s, "page") == 0) { --- 108,112 ---- (void) sprintf(msg, "%s +%s %s", basename(editor), linenum, file); postmsg(msg); ! (void) sprintf(plusnum, lineflag, linenum); /* if this is the more or page commands */ if (strcmp(s = basename(editor), "more") == 0 || strcmp(s, "page") == 0) { *************** *** 116,119 **** --- 115,121 ---- length */ (void) execute(editor, editor, plusnum, file, "/dev/null", NULL); + } + else if (lineflagafterfile) { + (void) execute(editor, editor, file, plusnum, NULL); } else { Index: global.h =================================================================== RCS file: /cvsroot/cscope/cscope/src/global.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** global.h 2000/05/19 04:46:32 1.11 --- global.h 2001/02/09 21:07:17 1.12 *************** *** 94,98 **** /* main.c global data */ ! extern char *editor, *home, *shell; /* environment variables */ extern char *argv0; /* command name */ extern BOOL compress; /* compress the characters in the crossref */ --- 94,99 ---- /* main.c global data */ ! extern char *editor, *home, *shell, *lineflag; /* environment variables */ ! extern BOOL lineflagafterfile; extern char *argv0; /* command name */ extern BOOL compress; /* compress the characters in the crossref */ Index: main.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/main.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** main.c 2000/10/27 11:35:01 1.15 --- main.c 2001/02/09 21:07:17 1.16 *************** *** 52,55 **** --- 52,56 ---- #define EDITOR "vi" #define SHELL "sh" + #define LINEFLAG "+%s" /* default: used by vi and emacs */ #define TMPDIR "/tmp" #ifndef DFLT_INCDIR *************** *** 67,71 **** char dicode2[256]; /* digraph second character code */ ! char *editor, *home, *shell; /* environment variables */ char *argv0; /* command name */ BOOL compress = YES; /* compress the characters in the crossref */ --- 68,73 ---- char dicode2[256]; /* digraph second character code */ ! char *editor, *home, *shell, *lineflag; /* environment variables */ ! BOOL lineflagafterfile; char *argv0; /* command name */ BOOL compress = YES; /* compress the characters in the crossref */ *************** *** 307,313 **** /* read the environment */ editor = mygetenv("EDITOR", EDITOR); ! editor = mygetenv("VIEWER", editor); /* use viewer if set */ home = getenv("HOME"); shell = mygetenv("SHELL", SHELL); tmpdir = mygetenv("TMPDIR", TMPDIR); --- 309,318 ---- /* read the environment */ editor = mygetenv("EDITOR", EDITOR); ! 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); + lineflagafterfile = getenv("CSCOPE_LINEFLAG_AFTER_FILE")?1:0; tmpdir = mygetenv("TMPDIR", TMPDIR); |
From: Petr S. <pe...@us...> - 2001-02-09 19:59:35
|
Update of /cvsroot/cscope/cscope/packages In directory usw-pr-cvs1:/tmp/cvs-serv30087/packages Modified Files: cscope.spec Log Message: New version number 15.2.b. Darwin support. Index: cscope.spec =================================================================== RCS file: /cvsroot/cscope/cscope/packages/cscope.spec,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** cscope.spec 2000/12/12 19:54:46 1.7 --- cscope.spec 2001/02/09 19:59:59 1.8 *************** *** 1,9 **** Summary: cscope is an interactive, screen-oriented tool that allows the user to browse through C source files for specified elements of code. Name: cscope ! Version: 15.1 Release: 1 Copyright: BSD Group: Development/Tools ! Source: cscope-15.1.tar.gz Buildroot: /tmp/%{name}-%{version} --- 1,9 ---- Summary: cscope is an interactive, screen-oriented tool that allows the user to browse through C source files for specified elements of code. Name: cscope ! Version: 15.2b Release: 1 Copyright: BSD Group: Development/Tools ! Source: cscope-15.2b.tar.gz Buildroot: /tmp/%{name}-%{version} |
From: Petr S. <pe...@us...> - 2001-02-09 19:59:34
|
Update of /cvsroot/cscope/cscope/packages/uw7 In directory usw-pr-cvs1:/tmp/cvs-serv30087/packages/uw7 Modified Files: pkginfo cscope_pkg.sh Log Message: New version number 15.2.b. Darwin support. Index: pkginfo =================================================================== RCS file: /cvsroot/cscope/cscope/packages/uw7/pkginfo,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pkginfo 2000/11/22 15:42:16 1.1 --- pkginfo 2001/02/09 19:59:59 1.2 *************** *** 1,5 **** PKG="cscope" NAME="cscope" ! VERSION="15.1 UW7.1.1 11/22/2000" CATEGORY="utilities" ARCH=i386 --- 1,5 ---- PKG="cscope" NAME="cscope" ! VERSION="15.2b UW7.1.1 02/09/2001" CATEGORY="utilities" ARCH=i386 Index: cscope_pkg.sh =================================================================== RCS file: /cvsroot/cscope/cscope/packages/uw7/cscope_pkg.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** cscope_pkg.sh 2000/11/22 15:42:16 1.1 --- cscope_pkg.sh 2001/02/09 19:59:59 1.2 *************** *** 90,94 **** # Install the spool dir cscope entry into the package echo "INFO: creating package" >&2 ! pkgtrans -s /var/spool/pkg cscope.15.1.pkg cscope if [ $? -ne 0 ] then --- 90,94 ---- # Install the spool dir cscope entry into the package echo "INFO: creating package" >&2 ! pkgtrans -s /var/spool/pkg cscope.15.2b.pkg cscope if [ $? -ne 0 ] then |
From: Petr S. <pe...@us...> - 2001-02-09 19:59:34
|
Update of /cvsroot/cscope/cscope/src In directory usw-pr-cvs1:/tmp/cvs-serv30087/src Modified Files: dir.c input.c version.h Log Message: New version number 15.2.b. Darwin support. Index: dir.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/dir.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** dir.c 2000/10/27 12:36:55 1.8 --- dir.c 2001/02/09 19:59:59 1.9 *************** *** 38,44 **** #include <stdlib.h> #include <dirent.h> #include <stdlib.h> - #include <sys/types.h> /* needed by stat.h */ #include <sys/stat.h> /* stat */ #include "global.h" --- 38,44 ---- #include <stdlib.h> + #include <sys/types.h> /* needed by stat.h and dirent.h */ #include <dirent.h> #include <stdlib.h> #include <sys/stat.h> /* stat */ #include "global.h" Index: input.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/input.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** input.c 2000/05/31 16:54:10 1.5 --- input.c 2001/02/09 19:59:59 1.6 *************** *** 44,47 **** --- 44,48 ---- #include <setjmp.h> /* jmp_buf */ #include <stdlib.h> + #include <sys/termios.h> static char const rcsid[] = "$Id$"; Index: version.h =================================================================== RCS file: /cvsroot/cscope/cscope/src/version.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** version.h 2000/11/20 20:07:24 1.4 --- version.h 2001/02/09 19:59:59 1.5 *************** *** 40,42 **** #define FILEVERSION 15 /* Initial Open Source and Linux Port */ ! #define FIXVERSION ".1" /* feature and bug fix version */ --- 40,42 ---- #define FILEVERSION 15 /* Initial Open Source and Linux Port */ ! #define FIXVERSION ".2b" /* feature and bug fix version */ |
From: Petr S. <pe...@us...> - 2001-02-09 19:59:34
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv30087 Modified Files: config.guess config.sub configure.in AUTHORS ChangeLog acconfig.h Log Message: New version number 15.2.b. Darwin support. Index: config.guess =================================================================== RCS file: /cvsroot/cscope/cscope/config.guess,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** config.guess 2000/04/27 15:54:13 1.1 --- config.guess 2001/02/09 19:59:59 1.2 *************** *** 854,857 **** --- 854,860 ---- echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit 0 ;; + *:Darwin:*:* | *:"Mac OS":*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; esac Index: config.sub =================================================================== RCS file: /cvsroot/cscope/cscope/config.sub,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** config.sub 2000/04/27 15:54:13 1.1 --- config.sub 2001/02/09 19:59:59 1.2 *************** *** 730,734 **** | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -rhapsody* \ ! | -openstep* | -mpeix* | -oskit*) # Remember, each alternative MUST END IN *, to match a version number. ;; --- 730,734 ---- | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -rhapsody* \ ! | -openstep* | -mpeix* | -oskit* | -darwin* ) # Remember, each alternative MUST END IN *, to match a version number. ;; Index: configure.in =================================================================== RCS file: /cvsroot/cscope/cscope/configure.in,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** configure.in 2000/11/28 21:26:10 1.11 --- configure.in 2001/02/09 19:59:59 1.12 *************** *** 1,5 **** dnl Process this file with autoconf to produce a configure script. AC_INIT(src/basename.c) ! AM_INIT_AUTOMAKE(cscope, 15.1) AM_CONFIG_HEADER(config.h:config.h.in) AC_CANONICAL_HOST --- 1,5 ---- dnl Process this file with autoconf to produce a configure script. AC_INIT(src/basename.c) ! AM_INIT_AUTOMAKE(cscope, 15.2b) AM_CONFIG_HEADER(config.h:config.h.in) AC_CANONICAL_HOST *************** *** 492,496 **** AC_DEFINE(Linux) ;; ! netbsd*|freebsd*) AC_DEFINE(BSD) ;; --- 492,496 ---- AC_DEFINE(Linux) ;; ! netbsd*|freebsd*|darwin*) AC_DEFINE(BSD) ;; Index: AUTHORS =================================================================== RCS file: /cvsroot/cscope/cscope/AUTHORS,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -r1.19 -r1.20 *** AUTHORS 2000/12/11 20:48:18 1.19 --- AUTHORS 2001/02/09 19:59:59 1.20 *************** *** 18,19 **** --- 18,20 ---- Sascha Blank - FreeBSD support Bruce Frost - Stability + Chuck Marco and Wilfredo Sanchez - Darwin support Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -r1.60 -r1.61 *** ChangeLog 2001/01/24 16:24:51 1.60 --- ChangeLog 2001/02/09 19:59:59 1.61 *************** *** 1,2 **** --- 1,4 ---- + (2001/02/09 - petrs) Updated version number to 15.2b (for beta) + (2001/02/09 - chuck & wilfredo) Darwin support (2001/01/24 - petrs) Replaced new style C comments, i.e. // (2000/12/12 - petrs) packages/cscope.spec has now no local directory Index: acconfig.h =================================================================== RCS file: /cvsroot/cscope/cscope/acconfig.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** acconfig.h 2000/11/20 20:07:24 1.4 --- acconfig.h 2001/02/09 19:59:59 1.5 *************** *** 4,8 **** #define PACKAGE cscope ! #define VERSION 15.1 /* OS Definitions */ --- 4,8 ---- #define PACKAGE cscope ! #define VERSION 15.2b /* OS Definitions */ |
From: Petr S. <pe...@us...> - 2001-01-24 16:24:33
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv1371 Modified Files: ChangeLog Log Message: Replaced new style C comments '//' with old style '/* */' to compile with old C compilers. Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -r1.59 -r1.60 *** ChangeLog 2000/12/12 19:54:45 1.59 --- ChangeLog 2001/01/24 16:24:51 1.60 *************** *** 1,2 **** --- 1,3 ---- + (2001/01/24 - petrs) Replaced new style C comments, i.e. // (2000/12/12 - petrs) packages/cscope.spec has now no local directory (2000/12/12 - petrs) contrib/ocs now checks that cscope is in $PATH |
From: Petr S. <pe...@us...> - 2001-01-24 16:24:33
|
Update of /cvsroot/cscope/cscope/src In directory usw-pr-cvs1:/tmp/cvs-serv1371/src Modified Files: constants.h mypopen.c Log Message: Replaced new style C comments '//' with old style '/* */' to compile with old C compilers. Index: constants.h =================================================================== RCS file: /cvsroot/cscope/cscope/src/constants.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** constants.h 2000/11/28 21:26:12 1.4 --- constants.h 2001/01/24 16:24:52 1.5 *************** *** 132,136 **** ! #ifndef __FreeBSD__ // Prevent search issues in cscope.out #if !TERMINFO #ifndef KEY_BREAK --- 132,136 ---- ! #ifndef __FreeBSD__ /* Prevent search issues in cscope.out */ #if !TERMINFO #ifndef KEY_BREAK *************** *** 154,159 **** #define erasechar() (_tty.sg_erase) /* equivalent */ #define killchar() (_tty.sg_kill) /* equivalent */ ! #endif // if UNIXPC ! #endif // if !TERMINFO ! #endif // ifndef __FreeBSD__ --- 154,159 ---- #define erasechar() (_tty.sg_erase) /* equivalent */ #define killchar() (_tty.sg_kill) /* equivalent */ ! #endif /* if UNIXPC */ ! #endif /* if !TERMINFO */ ! #endif /* ifndef __FreeBSD__ */ Index: mypopen.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/mypopen.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** mypopen.c 2000/12/11 20:48:18 1.4 --- mypopen.c 2001/01/24 16:24:52 1.5 *************** *** 65,71 **** else { ! // Ensure that if the fcntl fails and fd is valid, then ! // the file is closed properly. In general this should ! // not happen. if (fd != -1) { --- 65,71 ---- else { ! /* Ensure that if the fcntl fails and fd is valid, then ! the file is closed properly. In general this should ! not happen. */ if (fd != -1) { |