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-07-05 18:36:27
|
Update of /cvsroot/cscope/cscope/src In directory usw-pr-cvs1:/tmp/cvs-serv2099 Modified Files: mypopen.c command.c main.c library.h Log Message: Renamed pclose() to mypclose(), avoiding name clash with system version Index: mypopen.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/mypopen.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** mypopen.c 2001/03/27 14:09:19 1.6 --- mypopen.c 2001/07/05 15:08:21 1.7 *************** *** 153,164 **** (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) { int f; --- 153,163 ---- (void) close(yourside); return(fdopen(myside, mode)); ! #endif /* DJGPP */ } ! /* HBB 20010705: renamed from 'pclose', which would collide with ! * system-supplied function of same name */ int ! mypclose(FILE *ptr) { int f; *************** *** 167,170 **** --- 166,174 ---- RETSIGTYPE (*hstat)(int), (*istat)(int), (*qstat)(int); + #ifdef __DJGPP__ + /* HBB 20010705: This system has its own pclose(), which we + * don't want to replace */ + return (pclose)(ptr); + #else f = fileno(ptr); (void) fclose(ptr); *************** *** 183,186 **** popen_pid[f] = 0; return(status); } - #endif --- 187,190 ---- popen_pid[f] = 0; return(status); + #endif /* DJGPP */ } Index: command.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/command.c,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** command.c 2001/06/01 12:43:24 1.12 --- command.c 2001/07/05 15:08:21 1.13 *************** *** 388,392 **** } seekline(topline); ! (void) pclose(file); } if (commandc == '^') { --- 388,392 ---- } seekline(topline); ! (void) mypclose(file); } if (commandc == '^') { Index: main.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/main.c,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -r1.21 -r1.22 *** main.c 2001/07/05 14:31:00 1.21 --- main.c 2001/07/05 15:08:21 1.22 *************** *** 1071,1075 **** cannotindex(); } ! (void) pclose(postings); } (void) unlink(temp1); --- 1071,1075 ---- cannotindex(); } ! (void) mypclose(postings); } (void) unlink(temp1); Index: library.h =================================================================== RCS file: /cvsroot/cscope/cscope/src/library.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** library.h 2001/07/05 14:31:00 1.6 --- library.h 2001/07/05 15:08:21 1.7 *************** *** 48,51 **** --- 48,52 ---- char *stralloc(char *s); FILE *mypopen(char *cmd, char *mode); + int mypclose(FILE *ptr); FILE *vpfopen(char *filename, char *type); void egrepcaseless(int i); |
From: Hans-Bernhard B. <br...@us...> - 2001-07-05 18:31:34
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv5830 Modified Files: ChangeLog Log Message: Renamed pclose() to mypclose(), avoiding name clash with system version Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -r1.89 -r1.90 *** ChangeLog 2001/07/05 14:30:59 1.89 --- ChangeLog 2001/07/05 15:20:45 1.90 *************** *** 1,2 **** --- 1,5 ---- + (2001/07/05 - broeker) Renamed pclose() function to mypclose(), in order not to + cause a conflict with system function having the same + name. (2001/07/05 - broeker) Centralisation of BSDism configuration stuff. Removal of some remaining external prototypes from .c files, where |
From: Petr S. <pe...@ca...> - 2001-07-05 18:09:51
|
Hi Hans-Bernhard, Thanks for this update. The signal parameter type update was a good fix as it now conforms to ANSI C. I think that we should remove all "#if 0" blocks as it provides unnecessary code clutter. We should also consider internationalization (at least the messages and interface) for v16.0. Thanks, Petr > Update of /cvsroot/ > In directory usw-pr-cvs1:/tmp/cvs-serv6737 > > Modified Files: > ChangeLog > Log Message: > Added lots of prototypes, and made lots of funcs/vars "static" > > Index: ChangeLog > =================================================================== > RCS file: /cvsroot/cscope/cscope/ChangeLog,v > retrieving revision 1.90 > retrieving revision 1.91 > diff -C2 -r1.90 -r1.91 > *** ChangeLog 2001/07/05 15:20:45 1.90 > --- ChangeLog 2001/07/05 16:47:04 1.91 > *************** > *** 1,2 **** > --- 1,3 ---- > + (2001/07/05 - broeker) Put in lots of 'static' keywords, added prototypes. > (2001/07/05 - broeker) Renamed pclose() function to mypclose(), in order not to > cause a conflict with system function having the same > > _______________________________________________ > Cscope-cvs mailing list > Csc...@li... > http://lists.sourceforge.net/lists/listinfo/cscope-cvs -- -------------------------------------------------------- Petr Sorfa Senior Software Engineer Caldera 430 Mountain Ave. http://www.caldera.com Murray Hill 07974 NJ, USA -------------------------------------------------------- Disclaimer: All my comments are my own and nobody else's ---------------------------------------------------------- |
From: Hans-Bernhard B. <br...@us...> - 2001-07-05 17:54:20
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv6737 Modified Files: ChangeLog Log Message: Added lots of prototypes, and made lots of funcs/vars "static" Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.90 retrieving revision 1.91 diff -C2 -r1.90 -r1.91 *** ChangeLog 2001/07/05 15:20:45 1.90 --- ChangeLog 2001/07/05 16:47:04 1.91 *************** *** 1,2 **** --- 1,3 ---- + (2001/07/05 - broeker) Put in lots of 'static' keywords, added prototypes. (2001/07/05 - broeker) Renamed pclose() function to mypclose(), in order not to cause a conflict with system function having the same |
From: Hans-Bernhard B. <br...@us...> - 2001-07-05 17:54:17
|
Update of /cvsroot/cscope/cscope/src In directory usw-pr-cvs1:/tmp/cvs-serv6737/src Modified Files: command.c crossref.c dir.c display.c exec.c global.h input.c invlib.c invlib.h library.h logdir.c main.c mygetenv.c Log Message: Added lots of prototypes, and made lots of funcs/vars "static" Index: command.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/command.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** command.c 2001/07/05 15:08:21 1.13 --- command.c 2001/07/05 16:47:04 1.14 *************** *** 63,71 **** static char toprompt[] = "To: "; ! void atchange(void); ! BOOL changestring(void); ! void clearprompt(void); ! void mark(int i); ! void scrollbar(MOUSE *p); static void countrefs(void); --- 63,71 ---- static char toprompt[] = "To: "; ! /* Internal prototypes: */ ! static BOOL changestring(void); ! static void clearprompt(void); ! static void mark(int i); ! static void scrollbar(MOUSE *p); static void countrefs(void); *************** *** 538,542 **** /* clear the prompt line */ ! void clearprompt(void) { --- 538,542 ---- /* clear the prompt line */ ! static void clearprompt(void) { *************** *** 576,580 **** /* change one text string to another */ ! BOOL changestring(void) { --- 576,580 ---- /* change one text string to another */ ! static BOOL changestring(void) { *************** *** 777,781 **** /* mark/unmark this displayed line to be changed */ ! void mark(int i) { --- 777,781 ---- /* mark/unmark this displayed line to be changed */ ! static void mark(int i) { *************** *** 799,803 **** /* scrollbar actions */ ! void scrollbar(MOUSE *p) { --- 799,803 ---- /* scrollbar actions */ ! static void scrollbar(MOUSE *p) { Index: crossref.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/crossref.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** crossref.c 2001/07/05 14:31:00 1.9 --- crossref.c 2001/07/05 16:47:04 1.10 *************** *** 62,66 **** long dboffset; /* new database offset */ BOOL errorsfound; /* prompt before clearing messages */ - long fileindex; /* source file name index */ long lineoffset; /* source line database offset */ long npostings; /* number of postings */ --- 62,65 ---- Index: dir.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/dir.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -r1.10 -r1.11 *** dir.c 2001/03/27 14:09:19 1.10 --- dir.c 2001/07/05 16:47:04 1.11 *************** *** 58,68 **** char **srcfiles; /* source files */ int nincdirs; /* number of #include directories */ - int mincdirs = DIRINC; /* maximum number of #include directories */ int nsrcdirs; /* number of source directories */ - int msrcdirs; /* maximum number of source directories */ int nsrcfiles; /* number of source files */ int msrcfiles = SRCINC; /* maximum number of source files */ static char **incnames; /* #include directory names without view pathing */ static int nvpsrcdirs; /* number of view path source directories */ --- 58,68 ---- char **srcfiles; /* source files */ int nincdirs; /* number of #include directories */ int nsrcdirs; /* number of source directories */ int nsrcfiles; /* number of source files */ int msrcfiles = SRCINC; /* maximum number of source files */ static char **incnames; /* #include directory names without view pathing */ + static int mincdirs = DIRINC; /* maximum number of #include directories */ + static int msrcdirs; /* maximum number of source directories */ static int nvpsrcdirs; /* number of view path source directories */ *************** *** 72,85 **** } *srcnames[HASHMOD]; ! BOOL issrcfile(char *file); ! void addsrcdir(char *dir); ! void addincdir(char *name, char *path); - static void scan_dir(const char *dirfile, BOOL recurse); - /* make the source file list */ /* make the view source directory list */ ! void makevpsrcdirs(void) { --- 72,86 ---- } *srcnames[HASHMOD]; ! /* Internal prototypes: */ ! static BOOL issrcfile(char *file); ! static void addsrcdir(char *dir); ! static void addincdir(char *name, char *path); ! static void scan_dir(const char *dirfile, BOOL recurse); ! static void makevpsrcdirs(void); /* make the view source directory list */ ! static void makevpsrcdirs(void) { *************** *** 148,152 **** /* add a source directory to the list */ ! void addsrcdir(char *dir) { --- 149,153 ---- /* add a source directory to the list */ ! static void addsrcdir(char *dir) { *************** *** 212,216 **** /* add a #include directory to the list */ ! void addincdir(char *name, char *path) { --- 213,217 ---- /* add a #include directory to the list */ ! static void addincdir(char *name, char *path) { *************** *** 408,412 **** /* see if this is a source file */ ! BOOL issrcfile(char *file) { --- 409,413 ---- /* see if this is a source file */ ! static BOOL issrcfile(char *file) { Index: display.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/display.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** display.c 2001/06/01 12:43:24 1.15 --- display.c 2001/07/05 16:47:04 1.16 *************** *** 76,80 **** static int fldline; /* input field line */ static jmp_buf env; /* setjmp/longjmp buffer */ ! int lastdispline; /* last displayed reference line */ static char lastmsg[MSGLEN + 1]; /* last message displayed */ static char helpstring[] = "Press the ? key for help"; --- 76,80 ---- static int fldline; /* input field line */ static jmp_buf env; /* setjmp/longjmp buffer */ ! static int lastdispline; /* last displayed reference line */ static char lastmsg[MSGLEN + 1]; /* last message displayed */ static char helpstring[] = "Press the ? key for help"; *************** *** 106,109 **** --- 106,112 ---- }; + /* Internal prototypes: */ + static RETSIGTYPE jumpback(int sig); + /* initialize display parameters */ *************** *** 390,394 **** /*ARGSUSED*/ ! RETSIGTYPE jumpback(int sig) { --- 393,397 ---- /*ARGSUSED*/ ! static RETSIGTYPE jumpback(int sig) { Index: exec.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/exec.c,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** exec.c 2001/07/05 14:31:00 1.6 --- exec.c 2001/07/05 16:47:04 1.7 *************** *** 52,58 **** static char const rcsid[] = "$Id$"; ! static RETSIGTYPE (*oldsigquit)(); /* old value of quit signal */ ! static RETSIGTYPE (*oldsighup)(); /* old value of hangup signal */ ! static RETSIGTYPE (*oldsigstp)(); #ifndef __MSDOS__ /* none of these is needed, there */ --- 52,58 ---- static char const rcsid[] = "$Id$"; ! static RETSIGTYPE (*oldsigquit)(int); /* old value of quit signal */ ! static RETSIGTYPE (*oldsighup)(int); /* old value of hangup signal */ ! static RETSIGTYPE (*oldsigstp)(int); /* old value of SIGTSTP */ #ifndef __MSDOS__ /* none of these is needed, there */ Index: global.h =================================================================== RCS file: /cvsroot/cscope/cscope/src/global.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** global.h 2001/07/05 14:31:00 1.16 --- global.h 2001/07/05 16:47:04 1.17 *************** *** 176,180 **** --- 176,182 ---- extern char *prependpath; /* prepend path to file names */ extern FILE *refsfound; /* references found file */ + #if 0 /* HBB 20010705: flag no longer used */ extern BOOL select_large; /* enable more than 9 select lines */ + #endif extern int symrefs; /* cross-reference file */ extern char temp1[]; /* temporary file name */ *************** *** 196,200 **** extern long dboffset; /* new database offset */ extern BOOL errorsfound; /* prompt before clearing error messages */ - extern long fileindex; extern long lineoffset; /* source line database offset */ extern long npostings; /* number of postings */ --- 198,201 ---- *************** *** 265,269 **** char *inviewpath(char *file); char *lookup(char *ident); - char *mygetenv(char *variable, char *deflt); char *pathcomponents(char *path, int components); char *readblock(void); --- 266,269 ---- *************** *** 275,278 **** --- 275,279 ---- void askforchar(void); void askforreturn(void); + void atchange(void); void atfield(void); void cannotwrite(char *file); *************** *** 295,299 **** void help(void); void incfile(char *file, char *type); ! void includedir(char *dirname); void initsymtab(void); void makefilelist(void); --- 296,300 ---- void help(void); void incfile(char *file, char *type); ! void includedir(char *_dirname); void initsymtab(void); void makefilelist(void); *************** *** 328,332 **** BOOL writerefsfound(void); - FILE *myfopen(char *path, char *mode); FINDINIT findinit(char *pattern); MOUSE *getmouseaction(char leading_char); --- 329,332 ---- *************** *** 338,342 **** int getline(char s[], unsigned size, int firstchar, BOOL iscaseless); int mygetch(void); - int myopen(char *path, int flag, int mode); int hash(char *ss); int execute(char *a, ...); --- 338,341 ---- Index: input.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/input.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** input.c 2001/06/28 15:12:35 1.8 --- input.c 2001/07/05 16:47:04 1.9 *************** *** 53,60 **** static int prevchar; /* previous, ungotten character */ /* catch the interrupt signal */ /*ARGSUSED*/ ! RETSIGTYPE catchint(int sig) { --- 53,63 ---- static int prevchar; /* previous, ungotten character */ + /* Internal prototypes: */ + static RETSIGTYPE catchint(int sig); + /* catch the interrupt signal */ /*ARGSUSED*/ ! static RETSIGTYPE catchint(int sig) { *************** *** 77,81 **** mygetch(void) { ! RETSIGTYPE (*savesig)(); /* old value of signal */ int c; --- 80,84 ---- mygetch(void) { ! RETSIGTYPE (*savesig)(int); /* old value of signal */ int c; Index: invlib.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/invlib.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -r1.13 -r1.14 *** invlib.c 2001/07/05 14:31:00 1.13 --- invlib.c 2001/07/05 16:47:04 1.14 *************** *** 60,64 **** --- 60,69 ---- static char const rcsid[] = "$Id$"; + #if DEBUG + /* FIXME HBB 20010705: nowhere in the source is `invbreak' ever set to + * a value other than the (silent) initialization to zero. Pretty + * useless, that looks */ int invbreak; + #endif static int boolready(void); Index: invlib.h =================================================================== RCS file: /cvsroot/cscope/cscope/src/invlib.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** invlib.h 2001/07/05 14:31:00 1.4 --- invlib.h 2001/07/05 16:47:04 1.5 *************** *** 113,117 **** long invfind(INVCONTROL *invcntl, char *searchterm); int invforward(INVCONTROL *invcntl); ! int invopen(INVCONTROL *invcntl, char *invname, char *invpost, int stat); long invmake(char *invname, char *invpost, FILE *infile); long invterm(INVCONTROL *invcntl, char *term); --- 113,117 ---- long invfind(INVCONTROL *invcntl, char *searchterm); int invforward(INVCONTROL *invcntl); ! int invopen(INVCONTROL *invcntl, char *invname, char *invpost, int status); long invmake(char *invname, char *invpost, FILE *infile); long invterm(INVCONTROL *invcntl, char *term); Index: library.h =================================================================== RCS file: /cvsroot/cscope/cscope/src/library.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** library.h 2001/07/05 15:08:21 1.7 --- library.h 2001/07/05 16:47:04 1.8 *************** *** 39,48 **** /* private library */ - char *mybasename(char *path); char *compath(char *pathname); char *egrepinit(char *egreppat); char *logdir(char *name); void *mycalloc(int nelem, int size); void *mymalloc(int size); void *myrealloc(void *p, int size); char *stralloc(char *s); --- 39,51 ---- /* private library */ char *compath(char *pathname); char *egrepinit(char *egreppat); char *logdir(char *name); + char *mybasename(char *path); void *mycalloc(int nelem, int size); + FILE *myfopen(char *path, char *mode); + char *mygetenv(char *variable, char *deflt); void *mymalloc(int size); + int myopen(char *path, int flag, int mode); void *myrealloc(void *p, int size); char *stralloc(char *s); *************** *** 53,56 **** --- 56,62 ---- /* Programmer's Workbench library (-lPW) */ + /* FIXME HBB 20010705: these should never be here. We should just + * #include the relevant header, instead. Moreover, they don't seem + * to be used, anyway ... */ char *regcmp(), *regex(); Index: logdir.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/logdir.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** logdir.c 2000/05/03 22:02:10 1.3 --- logdir.c 2001/07/05 16:47:04 1.4 *************** *** 51,54 **** --- 51,58 ---- static char line[OURBUFSIZ+1]; + /* Internal prototypes: */ + static char *nextfield(char *p); + + static char * nextfield(char *p) Index: main.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/main.c,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -r1.22 -r1.23 *** main.c 2001/07/05 15:08:21 1.22 --- main.c 2001/07/05 16:47:04 1.23 *************** *** 70,74 **** char dicode2[256]; /* digraph second character code */ ! char *editor, *home, *shell, *lineflag; /* environment variables */ BOOL lineflagafterfile; char *argv0; /* command name */ --- 70,74 ---- char dicode2[256]; /* digraph second character code */ ! char *editor, *shell, *lineflag; /* environment variables */ BOOL lineflagafterfile; char *argv0; /* command name */ *************** *** 99,103 **** --- 99,105 ---- char *prependpath; /* prepend path to file names */ FILE *refsfound; /* references found file */ + #if 0 /* HBB 20010705: flag no longer used */ BOOL select_large = NO; /* enable more than 9 select lines */ + #endif int symrefs = -1; /* cross-reference file */ char temp1[PATHLEN + 1]; /* temporary file name */ *************** *** 110,113 **** --- 112,116 ---- static BOOL buildonly = NO; /* only build the database */ static BOOL fileschanged; /* assume some files changed */ + static char *home; /* Home directory */ static char *invname = INVNAME; /* inverted index to the database */ static char *invpost = INVPOST; /* inverted index postings */ *************** *** 119,140 **** static BOOL unconditional; /* unconditionally build database */ ! BOOL samelist(FILE *oldrefs, char **names, int count); ! char *getoldfile(void); ! int compare(const void *s1, const void *s2); /* needed for qsort call */ ! void copydata(void); ! void copyinverted(void); ! void initcompress(void); ! void movefile(char *new, char *old); ! void opendatabase(void); ! void putheader(char *dir); ! void putinclude(char *s); ! void putlist(char **names, int count); ! void skiplist(FILE *oldrefs); static void build(void); ! static void usage(void); static void longusage(void); #ifdef HAVE_FIXKEYPAD ! void fixkeypad(); #endif --- 122,145 ---- static BOOL unconditional; /* unconditionally build database */ ! /* Internal prototypes: */ static void build(void); ! static void cannotindex(void); ! static int compare(const void *s1, const void *s2); ! static void copydata(void); ! static void copyinverted(void); ! static char *getoldfile(void); ! static void initcompress(void); static void longusage(void); + static void movefile(char *new, char *old); + static void opendatabase(void); + static void putheader(char *dir); + static void putinclude(char *s); + static void putlist(char **names, int count); + static BOOL samelist(FILE *oldrefs, char **names, int count); + static void skiplist(FILE *oldrefs); + static void usage(void); #ifdef HAVE_FIXKEYPAD ! void fixkeypad(); #endif *************** *** 297,303 **** --- 302,310 ---- } goto nextarg; + #if 0 /* HBB 20010705: unused, now! */ case 't': /* enable more than 9 select lines */ select_large = YES; break; + #endif default: (void) fprintf(stderr, "%s: unknown option: -%c\n", argv0, *************** *** 344,349 **** /* if running in the foreground */ if (signal(SIGINT, SIG_IGN) != SIG_IGN) { - void myexit(); /* needed by ctrace */ - /* cleanup on the interrupt and quit signals */ (void) signal(SIGINT, myexit); --- 351,354 ---- *************** *** 704,708 **** } ! void cannotindex(void) { --- 709,713 ---- } ! static void cannotindex(void) { *************** *** 747,751 **** /* set up the digraph character tables for text compression */ ! void initcompress(void) { --- 752,756 ---- /* set up the digraph character tables for text compression */ ! static void initcompress(void) { *************** *** 764,768 **** /* open the database */ ! void opendatabase(void) { --- 769,773 ---- /* open the database */ ! static void opendatabase(void) { *************** *** 821,824 **** --- 826,830 ---- int built = 0; /* built crossref for these files */ int copied = 0; /* copied crossref for these files */ + long fileindex; /* source file name index */ BOOL interactive = YES; /* output progress messages */ *************** *** 1094,1098 **** /* string comparison function for qsort */ ! int compare(const void *arg_s1, const void *arg_s2) { --- 1100,1104 ---- /* string comparison function for qsort */ ! static int compare(const void *arg_s1, const void *arg_s2) { *************** *** 1105,1109 **** /* get the next file name in the old cross-reference */ ! char * getoldfile(void) { --- 1111,1115 ---- /* get the next file name in the old cross-reference */ ! static char * getoldfile(void) { *************** *** 1128,1132 **** the database trailer offset */ ! void putheader(char *dir) { --- 1134,1138 ---- the database trailer offset */ ! static void putheader(char *dir) { *************** *** 1155,1159 **** /* put the name list into the cross-reference file */ ! void putlist(char **names, int count) { --- 1161,1165 ---- /* put the name list into the cross-reference file */ ! static void putlist(char **names, int count) { *************** *** 1180,1184 **** /* see if the name list is the same in the cross-reference file */ ! BOOL samelist(FILE *oldrefs, char **names, int count) { --- 1186,1190 ---- /* see if the name list is the same in the cross-reference file */ ! static BOOL samelist(FILE *oldrefs, char **names, int count) { *************** *** 1204,1208 **** /* skip the list in the cross-reference file */ ! void skiplist(FILE *oldrefs) { --- 1210,1214 ---- /* skip the list in the cross-reference file */ ! static void skiplist(FILE *oldrefs) { *************** *** 1223,1227 **** /* copy this file's symbol data */ ! void copydata(void) { --- 1229,1233 ---- /* copy this file's symbol data */ ! static void copydata(void) { *************** *** 1262,1266 **** /* copy this file's symbol data and output the inverted index postings */ ! void copyinverted(void) { --- 1268,1272 ---- /* copy this file's symbol data and output the inverted index postings */ ! static void copyinverted(void) { *************** *** 1334,1338 **** /* process the #included file in the old database */ ! void putinclude(char *s) { --- 1340,1344 ---- /* process the #included file in the old database */ ! static void putinclude(char *s) { *************** *** 1345,1349 **** /* replace the old file with the new file */ ! void movefile(char *new, char *old) { --- 1351,1355 ---- /* replace the old file with the new file */ ! static void movefile(char *new, char *old) { Index: mygetenv.c =================================================================== RCS file: /cvsroot/cscope/cscope/src/mygetenv.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** mygetenv.c 2000/05/03 22:02:10 1.2 --- mygetenv.c 2001/07/05 16:47:04 1.3 *************** *** 33,36 **** --- 33,38 ---- static char const rcsid[] = "$Id$"; + #include "library.h" + #include <stdlib.h> |
From: Petr S. <pe...@us...> - 2001-07-04 00:06:35
|
Update of /cvsroot/cscope/cscope/packages/uw7 In directory usw-pr-cvs1:/tmp/cvs-serv4312/packages/uw7 Modified Files: cscope_pkg.sh pkginfo Log Message: Updated version numbers to 16.0a Index: cscope_pkg.sh =================================================================== RCS file: /cvsroot/cscope/cscope/packages/uw7/cscope_pkg.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** cscope_pkg.sh 2001/02/09 19:59:59 1.2 --- cscope_pkg.sh 2001/07/03 22:09:50 1.3 *************** *** 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 --- 90,94 ---- # Install the spool dir cscope entry into the package echo "INFO: creating package" >&2 ! pkgtrans -s /var/spool/pkg cscope.16.0a.pkg cscope if [ $? -ne 0 ] then Index: pkginfo =================================================================== RCS file: /cvsroot/cscope/cscope/packages/uw7/pkginfo,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pkginfo 2001/02/09 19:59:59 1.2 --- pkginfo 2001/07/03 22:09:50 1.3 *************** *** 1,5 **** PKG="cscope" NAME="cscope" ! VERSION="15.2b UW7.1.1 02/09/2001" CATEGORY="utilities" ARCH=i386 --- 1,5 ---- PKG="cscope" NAME="cscope" ! VERSION="16.0a UW7.1.1 07/03/2001" CATEGORY="utilities" ARCH=i386 |
From: Petr S. <pe...@us...> - 2001-07-04 00:06:33
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv4312 Modified Files: ChangeLog acconfig.h configure configure.in Log Message: Updated version numbers to 16.0a Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.86 retrieving revision 1.87 diff -C2 -r1.86 -r1.87 *** ChangeLog 2001/07/02 20:57:45 1.86 --- ChangeLog 2001/07/03 22:09:50 1.87 *************** *** 1,2 **** --- 1,3 ---- + (2001/07/03 - petrs) Updated the version strings to 16.0a. (2001/07/02 - petrs) Updated the contrib/README to include xcscope. (2001/07/02 - petrs) 15.3 version name, man page update, README update. Index: acconfig.h =================================================================== RCS file: /cvsroot/cscope/cscope/acconfig.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** acconfig.h 2001/07/02 16:06:43 1.7 --- acconfig.h 2001/07/03 22:09:50 1.8 *************** *** 4,8 **** #define PACKAGE cscope ! #define VERSION 15.3 /* OS Definitions */ --- 4,8 ---- #define PACKAGE cscope ! #define VERSION 16.0a /* OS Definitions */ Index: configure =================================================================== RCS file: /cvsroot/cscope/cscope/configure,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -r1.12 -r1.13 *** configure 2001/07/02 16:06:43 1.12 --- configure 2001/07/03 22:09:50 1.13 *************** *** 712,716 **** PACKAGE=cscope ! VERSION=15.3 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then --- 712,716 ---- PACKAGE=cscope ! VERSION=16.0a if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then Index: configure.in =================================================================== RCS file: /cvsroot/cscope/cscope/configure.in,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** configure.in 2001/07/02 16:06:43 1.18 --- configure.in 2001/07/03 22:09:50 1.19 *************** *** 1,5 **** dnl Process this file with autoconf to produce a configure script. AC_INIT(src/basename.c) ! AM_INIT_AUTOMAKE(cscope, 15.3) 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, 16.0a) AM_CONFIG_HEADER(config.h:config.h.in) AC_CANONICAL_HOST |
From: Petr S. <pe...@us...> - 2001-07-04 00:06:27
|
Update of /cvsroot/cscope/cscope/src In directory usw-pr-cvs1:/tmp/cvs-serv4312/src Modified Files: version.h Log Message: Updated version numbers to 16.0a Index: version.h =================================================================== RCS file: /cvsroot/cscope/cscope/src/version.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** version.h 2001/07/02 16:06:43 1.6 --- version.h 2001/07/03 22:09:50 1.7 *************** *** 39,42 **** */ ! #define FILEVERSION 15 /* Initial Open Source and Linux Port */ ! #define FIXVERSION ".3" /* feature and bug fix version */ --- 39,42 ---- */ ! #define FILEVERSION 16 /* Initial Open Source and Linux Port */ ! #define FIXVERSION ".0a" /* feature and bug fix version */ |
From: Petr S. <pe...@us...> - 2001-07-04 00:05:11
|
Update of /cvsroot/cscope/cscope/packages In directory usw-pr-cvs1:/tmp/cvs-serv4312/packages Modified Files: cscope.spec Log Message: Updated version numbers to 16.0a Index: cscope.spec =================================================================== RCS file: /cvsroot/cscope/cscope/packages/cscope.spec,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** cscope.spec 2001/07/02 16:06:43 1.9 --- cscope.spec 2001/07/03 22:09:50 1.10 *************** *** 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.3 Release: 1 Copyright: BSD Group: Development/Tools ! Source: cscope-15.3.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: 16.0a Release: 1 Copyright: BSD Group: Development/Tools ! Source: cscope-16.0a.tar.gz Buildroot: /tmp/%{name}-%{version} |
From: Petr S. <pe...@ca...> - 2001-07-03 18:33:22
|
Hi Darryl, No problem. I've been having severe networking problems on my side, so delays have happened. Anyway, the tree was tagged before you updated INSTALL. Anyway, no problem, thanks for your help. Petr > On Mon, Jul 02, 2001 at 05:22:12PM -0400, Petr Sorfa wrote: > > > Ouch! I'll forgive you this time ;o), but the tree was supposed to have > > been frozen. > > Sorry. Hans-Bernhard *really* wanted it out, and I checked it in, > forgetting that you hadn't yet unfrozen the tree. I saw that you had > already tagged the sources, and so I hoped that the checkin wouldn't > cause any problems. > > [ I really should know better, as we use CVS at work. ] > > -- Darryl -- -------------------------------------------------------- Petr Sorfa Senior Software Engineer Caldera 430 Mountain Ave. http://www.caldera.com Murray Hill 07974 NJ, USA -------------------------------------------------------- Disclaimer: All my comments are my own and nobody else's ---------------------------------------------------------- |
From: Darryl O. <da...@bo...> - 2001-07-03 07:09:41
|
On Mon, Jul 02, 2001 at 05:22:12PM -0400, Petr Sorfa wrote: > Ouch! I'll forgive you this time ;o), but the tree was supposed to have > been frozen. Sorry. Hans-Bernhard *really* wanted it out, and I checked it in, forgetting that you hadn't yet unfrozen the tree. I saw that you had already tagged the sources, and so I hoped that the checkin wouldn't cause any problems. [ I really should know better, as we use CVS at work. ] -- Darryl |
From: Petr S. <pe...@ca...> - 2001-07-02 21:27:10
|
Hi Darryl, Ouch! I'll forgive you this time ;o), but the tree was supposed to have been frozen. Petr > Update of /cvsroot/cscope/cscope > In directory usw-pr-cvs1:/tmp/cvs-serv25846 > > Modified Files: > INSTALL > Log Message: > Eliminated incorrect performance issues regarding flex. > > Index: INSTALL > =================================================================== > RCS file: /cvsroot/cscope/cscope/INSTALL,v > retrieving revision 1.3 > retrieving revision 1.4 > diff -C2 -r1.3 -r1.4 > *** INSTALL 2001/06/29 16:42:56 1.3 > --- INSTALL 2001/07/02 16:26:55 1.4 > *************** > *** 24,32 **** > reported as a problem on Solaris. > > - However, please note that the flex-generated scanner is significantly > - slower than the lex scanner (database building is at least twice as > - slow). While flex appears to be more reliable, you might want to try > - using lex. This is true on HP-UX. > - > - On Linux systems (and possibly others) configure may fail if lex is > a synomyn for flex. To fix, do the following: > --- 24,27 ---- > > _______________________________________________ > Cscope-cvs mailing list > Csc...@li... > http://lists.sourceforge.net/lists/listinfo/cscope-cvs -- -------------------------------------------------------- Petr Sorfa Senior Software Engineer Caldera 430 Mountain Ave. http://www.caldera.com Murray Hill 07974 NJ, USA -------------------------------------------------------- Disclaimer: All my comments are my own and nobody else's ---------------------------------------------------------- |
From: Petr S. <pe...@us...> - 2001-07-02 20:57:48
|
Update of /cvsroot/cscope/cscope/contrib In directory usw-pr-cvs1:/tmp/cvs-serv3091/contrib Modified Files: README Log Message: contrib/README update to include xcscope Index: README =================================================================== RCS file: /cvsroot/cscope/cscope/contrib/README,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** README 2001/06/29 14:20:16 1.2 --- README 2001/07/02 20:57:45 1.3 *************** *** 8,9 **** --- 8,11 ---- webcscope - a web cgi interface to cscope. Contributed by Ragho Mahalingam, using code from Dmitry Obukhovi and Steven E. Brenner. + + xcscope - An (X)Emacs interface to cscope. |
From: Petr S. <pe...@us...> - 2001-07-02 20:57:48
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv3091 Modified Files: ChangeLog Log Message: contrib/README update to include xcscope Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -r1.85 -r1.86 *** ChangeLog 2001/07/02 16:06:43 1.85 --- ChangeLog 2001/07/02 20:57:45 1.86 *************** *** 1,2 **** --- 1,3 ---- + (2001/07/02 - petrs) Updated the contrib/README to include xcscope. (2001/07/02 - petrs) 15.3 version name, man page update, README update. Make dist includes webcscope directory. |
From: Petr S. <pe...@us...> - 2001-07-02 17:05:28
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv20569 Modified Files: ChangeLog NEWS acconfig.h configure configure.in Log Message: 15.3 releas version number updates in various files. Preparation for release. Index: ChangeLog =================================================================== RCS file: /cvsroot/cscope/cscope/ChangeLog,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -r1.84 -r1.85 *** ChangeLog 2001/06/29 14:20:15 1.84 --- ChangeLog 2001/07/02 16:06:43 1.85 *************** *** 1,2 **** --- 1,4 ---- + (2001/07/02 - petrs) 15.3 version name, man page update, README update. + Make dist includes webcscope directory. (2001/06/29 - ragho) webcscope added to contrib (2001/06/29 - broeker) Re-formatted README, and added a tip working around Index: NEWS =================================================================== RCS file: /cvsroot/cscope/cscope/NEWS,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** NEWS 2000/04/19 20:36:46 1.1 --- NEWS 2001/07/02 16:06:43 1.2 *************** *** 1 **** --- 1,2 ---- + 2001/07/02 - Release of version 15.3. 2000/04/18 - Release of Version 13.0 into Open Source. Initial Linux port Index: acconfig.h =================================================================== RCS file: /cvsroot/cscope/cscope/acconfig.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** acconfig.h 2001/06/01 12:44:36 1.6 --- acconfig.h 2001/07/02 16:06:43 1.7 *************** *** 4,8 **** #define PACKAGE cscope ! #define VERSION 15.2b /* OS Definitions */ --- 4,8 ---- #define PACKAGE cscope ! #define VERSION 15.3 /* OS Definitions */ Index: configure =================================================================== RCS file: /cvsroot/cscope/cscope/configure,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -r1.11 -r1.12 *** configure 2001/06/28 15:12:35 1.11 --- configure 2001/07/02 16:06:43 1.12 *************** *** 712,716 **** PACKAGE=cscope ! VERSION=15.2b if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then --- 712,716 ---- PACKAGE=cscope ! VERSION=15.3 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then Index: configure.in =================================================================== RCS file: /cvsroot/cscope/cscope/configure.in,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** configure.in 2001/06/28 15:12:35 1.17 --- configure.in 2001/07/02 16:06:43 1.18 *************** *** 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 --- 1,5 ---- dnl Process this file with autoconf to produce a configure script. AC_INIT(src/basename.c) ! AM_INIT_AUTOMAKE(cscope, 15.3) AM_CONFIG_HEADER(config.h:config.h.in) AC_CANONICAL_HOST |
From: Petr S. <pe...@us...> - 2001-07-02 17:05:27
|
Update of /cvsroot/cscope/cscope/packages In directory usw-pr-cvs1:/tmp/cvs-serv20569/packages Modified Files: cscope.spec Log Message: 15.3 releas version number updates in various files. Preparation for release. Index: cscope.spec =================================================================== RCS file: /cvsroot/cscope/cscope/packages/cscope.spec,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** cscope.spec 2001/02/09 19:59:59 1.8 --- cscope.spec 2001/07/02 16:06:43 1.9 *************** *** 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} --- 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.3 Release: 1 Copyright: BSD Group: Development/Tools ! Source: cscope-15.3.tar.gz Buildroot: /tmp/%{name}-%{version} *************** *** 37,40 **** --- 37,49 ---- %changelog + * Mon Jul 2 2001 Cscope development team + - Version 15.3 release + - New flex scanner + - XEmacs support improvements + - Vim support improvements + - 64 bit fixes + - MSDOS support + - More editing keys + - Webcscope added to contrib * Wed Nov 20 2000 Cscope development team - Version 15.1 release |
From: Petr S. <pe...@us...> - 2001-07-02 17:05:24
|
Update of /cvsroot/cscope/cscope/contrib In directory usw-pr-cvs1:/tmp/cvs-serv20569/contrib Modified Files: Makefile.am Makefile.in Log Message: 15.3 releas version number updates in various files. Preparation for release. Index: Makefile.am =================================================================== RCS file: /cvsroot/cscope/cscope/contrib/Makefile.am,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Makefile.am 2001/06/27 15:51:26 1.2 --- Makefile.am 2001/07/02 16:06:43 1.3 *************** *** 3,6 **** bin_SCRIPTS = ocs ! EXTRA_DIST = ocs README xcscope --- 3,6 ---- bin_SCRIPTS = ocs ! EXTRA_DIST = ocs README xcscope webcscope Index: Makefile.in =================================================================== RCS file: /cvsroot/cscope/cscope/contrib/Makefile.in,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** Makefile.in 2001/06/27 16:42:25 1.2 --- Makefile.in 2001/07/02 16:06:43 1.3 *************** *** 73,77 **** bin_SCRIPTS = ocs ! EXTRA_DIST = ocs README xcscope mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h --- 73,77 ---- bin_SCRIPTS = ocs ! EXTRA_DIST = ocs README xcscope webcscope mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h |
From: Petr S. <pe...@us...> - 2001-07-02 17:05:22
|
Update of /cvsroot/cscope/cscope/src In directory usw-pr-cvs1:/tmp/cvs-serv20569/src Modified Files: version.h Log Message: 15.3 releas version number updates in various files. Preparation for release. Index: version.h =================================================================== RCS file: /cvsroot/cscope/cscope/src/version.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** version.h 2001/02/09 19:59:59 1.5 --- version.h 2001/07/02 16:06:43 1.6 *************** *** 40,42 **** #define FILEVERSION 15 /* Initial Open Source and Linux Port */ ! #define FIXVERSION ".2b" /* feature and bug fix version */ --- 40,42 ---- #define FILEVERSION 15 /* Initial Open Source and Linux Port */ ! #define FIXVERSION ".3" /* feature and bug fix version */ |
From: Darryl O. <da...@us...> - 2001-07-02 16:26:58
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv25846 Modified Files: INSTALL Log Message: Eliminated incorrect performance issues regarding flex. Index: INSTALL =================================================================== RCS file: /cvsroot/cscope/cscope/INSTALL,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** INSTALL 2001/06/29 16:42:56 1.3 --- INSTALL 2001/07/02 16:26:55 1.4 *************** *** 24,32 **** reported as a problem on Solaris. - However, please note that the flex-generated scanner is significantly - slower than the lex scanner (database building is at least twice as - slow). While flex appears to be more reliable, you might want to try - using lex. This is true on HP-UX. - - On Linux systems (and possibly others) configure may fail if lex is a synomyn for flex. To fix, do the following: --- 24,27 ---- |
From: Darryl O. <da...@us...> - 2001-06-29 16:42:59
|
Update of /cvsroot/cscope/cscope In directory usw-pr-cvs1:/tmp/cvs-serv28891 Modified Files: README INSTALL Log Message: Cleaned up files. Made more consistent with other open-source projects (moved build instructions from README to INSTALL). Index: README =================================================================== RCS file: /cvsroot/cscope/cscope/README,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** README 2001/06/29 10:52:27 1.6 --- README 2001/06/29 16:42:56 1.7 *************** *** 1,35 **** ! Cscope is a text screen based source browsing tool. ! It has been released by The Santa Cruz Operation, Inc as Open Source under ! the BSD license. Please look at COPYING for a detailed description of the ! license. ! ! BUILDING: ! Try: ! ! ./configure ! make ! ! If the build fails contact pe...@us... ! ! TIPS: ! ! - Try to use flex as the lexical analyzer. There may be some problems ! with using the native lex (due to some problems). The has been ! reported as a problem on Solaris. ! ! - On Linux systems (and possibly others) configure may fail if lex is ! a synomyn for flex. To fix, do the following: ! ! make distclean ! ./configure --with-flex ! make ! ! - On HP-UX 10.*, the default version of curses was observed to be broken. ! Get their "cumulative patches" and then compile like this, to work ! around that bug: ! ! make CURSES_LIBS=-lHcurses ! Browse to http://cscope.sourceforge.net for more current information --- 1,24 ---- ! Cscope is a text screen based source browsing tool. Although it is ! primarily designed to search C code (including lex and yacc files), it ! can also be used for C++ code. ! ! Using cscope, you can easily search for where symbols are used and ! defined. Cscope is designed to answer questions like: ! ! Where is this variable used? ! What is the value of this preprocessor symbol? ! Where is this function in the source files? ! What functions call this function? ! What functions are called by this function? ! Where does the message "out of space" come from? ! Where is this source file in the directory structure? ! What files include this header file? ! ! It has been released by The Santa Cruz Operation, Inc as Open Source ! under the BSD license. Please look at COPYING for a detailed ! description of the license. ! For instructions on how to build and install cscope, see the file, ! "INSTALL". Browse to http://cscope.sourceforge.net for more current information Index: INSTALL =================================================================== RCS file: /cvsroot/cscope/cscope/INSTALL,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** INSTALL 2000/04/27 16:33:47 1.2 --- INSTALL 2001/06/29 16:42:56 1.3 *************** *** 1,16 **** ! This program's build procedure is fairly standard... ! ./configure ! make ! make install ! ! Options to the configure script are up to you... run ! ./configure --help ! for details. Please report build problems at: ! http://sourceforge.net/bugs/?func=addbug&group_id=4664 (yes, even non-Linux problems). --- 1,61 ---- + ***** BUILDING: ! This program's build procedure is fairly standard. Try: ! ./configure ! make ! make install + Options to the configure script are up to you. For details, run: + + ./configure --help + Please report build problems at: ! http://sourceforge.net/bugs/?func=addbug&group_id=4664 (yes, even non-Linux problems). + + + ***** TIPS AND PROBLEMS: + + - Try to use flex as the lexical analyzer. There may be some problems + with using the native lex (due to some problems). The has been + reported as a problem on Solaris. + + However, please note that the flex-generated scanner is significantly + slower than the lex scanner (database building is at least twice as + slow). While flex appears to be more reliable, you might want to try + using lex. This is true on HP-UX. + + - On Linux systems (and possibly others) configure may fail if lex is + a synomyn for flex. To fix, do the following: + + make distclean + ./configure --with-flex + make + + - On HP-UX 10.20, the default version of curses was observed to be + broken. Get their "cumulative libHcurses patch" (patch PHCO_10947) + and then compile like this, to work around that bug: + + make CURSES_LIBS=-lHcurses + + Also on other versions of HP-UX, if the build fails at link time with + errors like: + + /usr/ccs/bin/ld: Unsatisfied symbols: + initscr (code) + wstandend (code) + ... + + you should delete the file, "config.cache", and re-run configure with + the option "--with-vcurses"; for example: + + ./configure --with-vcurses + + Note, however, that you should never see this if you build using + "make CURSES_LIBS=-lHcurses". + + + Browse to http://cscope.sourceforge.net for more current information. |
Update of /cvsroot/cscope/cscope/contrib/webcscope/icons In directory usw-pr-cvs1:/tmp/cvs-serv14190 Added Files: back.gif bomb.gif c.gif down.gif folder.gif folder.open.gif left.gif up.gif world2.gif Log Message: Readding hopefully as binary files. |
Update of /cvsroot/cscope/cscope/contrib/webcscope/icons In directory usw-pr-cvs1:/tmp/cvs-serv13573 Removed Files: back.gif bomb.gif c.gif down.gif folder.gif folder.open.gif left.gif up.gif world2.gif Log Message: .gif files added as ascii. Removed to be added as binary. --- back.gif DELETED --- --- bomb.gif DELETED --- --- c.gif DELETED --- --- down.gif DELETED --- --- folder.gif DELETED --- --- folder.open.gif DELETED --- --- left.gif DELETED --- --- up.gif DELETED --- --- world2.gif DELETED --- |
From: Petr S. <pe...@us...> - 2001-06-29 14:20:20
|
Update of /cvsroot/cscope/cscope/contrib/webcscope In directory usw-pr-cvs1:/tmp/cvs-serv6619/contrib/webcscope Added Files: INSTALL LICENSE TODO cgi-lib.pl cscope hilite.c Log Message: Added webcscope to contribs. --- NEW FILE --- WebCScope Installation Quick Install 0. Create a directory called cscope under your /cgi-bin (virtual) directory. Copy all the files in the distribution to this directory. 1. Edit the 'cscope' file and change the following items: - Location to the perl interpreter - Location of the cscope database and other modifiable parameters - Feedback name and email - Location of the syntax highlighter, if you wish to use it 2. Syntax highlighter - The syntax highlighter must be built if you decide to use it. If you do not want syntax highlighting, you can ignore this step and set the highlighter to /bin/cat. - Compile 'hilite.c' using 'gcc -o hilite hilite.c' 3. Icons - Copy the images from the icons directory into the /icons (virtual) directory on the web server. You can also replace these images with whatever you choose. 4. Organizing your CScope databases - WebCScope supports multiple databases in $cscopedir - Create a directory for each project or sub-source in $cscopedir and, generate your cscope database using the following commands. - find /some/source/dir -name '*.[chyls]' -print > cscope.files - cscope -b -q - Repeat the above step for each database you wish to create --- NEW FILE --- GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. <signature of Ty Coon>, 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. --- NEW FILE --- - Better error checking and the like - Add a more robust cookie mechanism - More efficient way of searching 'all' databases - Fix bugs --- NEW FILE --- # Perl Routines to Manipulate CGI input # cg...@po... # $Id: cgi-lib.pl,v 1.1 2001/06/29 14:20:16 petr Exp $ # # Copyright (c) 1993-1999 Steven E. Brenner # Unpublished work. # Permission granted to use and modify this library so long as the # copyright above is maintained, modifications are documented, and # credit is given for any use of the library. # # Thanks are due to many people for reporting bugs and suggestions # For more information, see: # http://cgi-lib.stanford.edu/cgi-lib/ $cgi_lib'version = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/); # Parameters affecting cgi-lib behavior # User-configurable parameters affecting file upload. $cgi_lib'maxdata = 131072; # maximum bytes to accept via POST - 2^17 $cgi_lib'writefiles = 0; # directory to which to write files, or # 0 if files should not be written $cgi_lib'filepre = "cgi-lib"; # Prefix of file names, in directory above # Do not change the following parameters unless you have special reasons $cgi_lib'bufsize = 8192; # default buffer size when reading multipart $cgi_lib'maxbound = 100; # maximum boundary length to be encounterd $cgi_lib'headerout = 0; # indicates whether the header has been printed # ReadParse # Reads in GET or POST data, converts it to unescaped text, and puts # key/value pairs in %in, using "\0" to separate multiple selections # Returns >0 if there was input, 0 if there was no input # undef indicates some failure. # Now that cgi scripts can be put in the normal file space, it is useful # to combine both the form and the script in one place. If no parameters # are given (i.e., ReadParse returns FALSE), then a form could be output. # If a reference to a hash is given, then the data will be stored in that # hash, but the data from $in and @in will become inaccessable. # If a variable-glob (e.g., *cgi_input) is the first parameter to ReadParse, # information is stored there, rather than in $in, @in, and %in. # Second, third, and fourth parameters fill associative arrays analagous to # %in with data relevant to file uploads. # If no method is given, the script will process both command-line arguments # of the form: name=value and any text that is in $ENV{'QUERY_STRING'} # This is intended to aid debugging and may be changed in future releases sub ReadParse { # Disable warnings as this code deliberately uses local and environment # variables which are preset to undef (i.e., not explicitly initialized) local ($perlwarn); $perlwarn = $^W; $^W = 0; local (*in) = shift if @_; # CGI input local (*incfn, # Client's filename (may not be provided) *inct, # Client's content-type (may not be provided) *insfn) = @_; # Server's filename (for spooled files) local ($len, $type, $meth, $errflag, $cmdflag, $got, $name); binmode(STDIN); # we need these for DOS-based systems binmode(STDOUT); # and they shouldn't hurt anything else binmode(STDERR); # Get several useful env variables $type = $ENV{'CONTENT_TYPE'}; $len = $ENV{'CONTENT_LENGTH'}; $meth = $ENV{'REQUEST_METHOD'}; if ($len > $cgi_lib'maxdata) { #' &CgiDie("cgi-lib.pl: Request to receive too much data: $len bytes\n"); } if (!defined $meth || $meth eq '' || $meth eq 'GET' || $meth eq 'HEAD' || $type eq 'application/x-www-form-urlencoded') { local ($key, $val, $i); # Read in text if (!defined $meth || $meth eq '') { $in = $ENV{'QUERY_STRING'}; $cmdflag = 1; # also use command-line options } elsif($meth eq 'GET' || $meth eq 'HEAD') { $in = $ENV{'QUERY_STRING'}; } elsif ($meth eq 'POST') { if (($got = read(STDIN, $in, $len) != $len)) {$errflag="Short Read: wanted $len, got $got\n";}; } else { &CgiDie("cgi-lib.pl: Unknown request method: $meth\n"); } @in = split(/[&;]/,$in); push(@in, @ARGV) if $cmdflag; # add command-line parameters foreach $i (0 .. $#in) { # Convert plus to space $in[$i] =~ s/\+/ /g; # Split into key and value. ($key, $val) = split(/=/,$in[$i],2); # splits on the first =. # Convert %XX from hex numbers to alphanumeric $key =~ s/%([A-Fa-f0-9]{2})/pack("c",hex($1))/ge; $val =~ s/%([A-Fa-f0-9]{2})/pack("c",hex($1))/ge; # Associate key and value $in{$key} .= "\0" if (defined($in{$key})); # \0 is the multiple separator $in{$key} .= $val; } } elsif ($ENV{'CONTENT_TYPE'} =~ m#^multipart/form-data#) { # for efficiency, compile multipart code only if needed $errflag = !(eval <<'END_MULTIPART'); local ($buf, $boundary, $head, @heads, $cd, $ct, $fname, $ctype, $blen); local ($bpos, $lpos, $left, $amt, $fn, $ser); local ($bufsize, $maxbound, $writefiles) = ($cgi_lib'bufsize, $cgi_lib'maxbound, $cgi_lib'writefiles); # The following lines exist solely to eliminate spurious warning messages $buf = ''; ($boundary) = $type =~ /boundary="([^"]+)"/; #"; # find boundary ($boundary) = $type =~ /boundary=(\S+)/ unless $boundary; &CgiDie ("Boundary not provided: probably a bug in your server") unless $boundary; $boundary = "--" . $boundary; $blen = length ($boundary); if ($ENV{'REQUEST_METHOD'} ne 'POST') { &CgiDie("Invalid request method for multipart/form-data: $meth\n"); } if ($writefiles) { local($me); stat ($writefiles); $writefiles = "/tmp" unless -d _ && -w _; # ($me) = $0 =~ m#([^/]*)$#; $writefiles .= "/$cgi_lib'filepre"; } # read in the data and split into parts: # put headers in @in and data in %in # General algorithm: # There are two dividers: the border and the '\r\n\r\n' between # header and body. Iterate between searching for these # Retain a buffer of size(bufsize+maxbound); the latter part is # to ensure that dividers don't get lost by wrapping between two bufs # Look for a divider in the current batch. If not found, then # save all of bufsize, move the maxbound extra buffer to the front of # the buffer, and read in a new bufsize bytes. If a divider is found, # save everything up to the divider. Then empty the buffer of everything # up to the end of the divider. Refill buffer to bufsize+maxbound # Note slightly odd organization. Code before BODY: really goes with # code following HEAD:, but is put first to 'pre-fill' buffers. BODY: # is placed before HEAD: because we first need to discard any 'preface,' # which would be analagous to a body without a preceeding head. $left = $len; PART: # find each part of the multi-part while reading data while (1) { die $@ if $errflag; $amt = ($left > $bufsize+$maxbound-length($buf) ? $bufsize+$maxbound-length($buf): $left); $errflag = (($got = read(STDIN, $buf, $amt, length($buf))) != $amt); die "Short Read: wanted $amt, got $got\n" if $errflag; $left -= $amt; $in{$name} .= "\0" if defined $in{$name}; $in{$name} .= $fn if $fn; $name=~/([-\w]+)/; # This allows $insfn{$name} to be untainted if (defined $1) { $insfn{$1} .= "\0" if defined $insfn{$1}; $insfn{$1} .= $fn if $fn; } BODY: while (($bpos = index($buf, $boundary)) == -1) { if ($left == 0 && $buf eq '') { foreach $value (values %insfn) { unlink(split("\0",$value)); } &CgiDie("cgi-lib.pl: reached end of input while seeking boundary " . "of multipart. Format of CGI input is wrong.\n"); } die $@ if $errflag; if ($name) { # if no $name, then it's the prologue -- discard if ($fn) { print FILE substr($buf, 0, $bufsize); } else { $in{$name} .= substr($buf, 0, $bufsize); } } $buf = substr($buf, $bufsize); $amt = ($left > $bufsize ? $bufsize : $left); #$maxbound==length($buf); $errflag = (($got = read(STDIN, $buf, $amt, length($buf))) != $amt); die "Short Read: wanted $amt, got $got\n" if $errflag; $left -= $amt; } if (defined $name) { # if no $name, then it's the prologue -- discard if ($fn) { print FILE substr($buf, 0, $bpos-2); } else { $in {$name} .= substr($buf, 0, $bpos-2); } # kill last \r\n } close (FILE); last PART if substr($buf, $bpos + $blen, 2) eq "--"; substr($buf, 0, $bpos+$blen+2) = ''; $amt = ($left > $bufsize+$maxbound-length($buf) ? $bufsize+$maxbound-length($buf) : $left); $errflag = (($got = read(STDIN, $buf, $amt, length($buf))) != $amt); die "Short Read: wanted $amt, got $got\n" if $errflag; $left -= $amt; undef $head; undef $fn; HEAD: while (($lpos = index($buf, "\r\n\r\n")) == -1) { if ($left == 0 && $buf eq '') { foreach $value (values %insfn) { unlink(split("\0",$value)); } &CgiDie("cgi-lib: reached end of input while seeking end of " . "headers. Format of CGI input is wrong.\n$buf"); } die $@ if $errflag; $head .= substr($buf, 0, $bufsize); $buf = substr($buf, $bufsize); $amt = ($left > $bufsize ? $bufsize : $left); #$maxbound==length($buf); $errflag = (($got = read(STDIN, $buf, $amt, length($buf))) != $amt); die "Short Read: wanted $amt, got $got\n" if $errflag; $left -= $amt; } $head .= substr($buf, 0, $lpos+2); push (@in, $head); @heads = split("\r\n", $head); ($cd) = grep (/^\s*Content-Disposition:/i, @heads); ($ct) = grep (/^\s*Content-Type:/i, @heads); ($name) = $cd =~ /\bname="([^"]+)"/i; #"; ($name) = $cd =~ /\bname=([^\s:;]+)/i unless defined $name; ($fname) = $cd =~ /\bfilename="([^"]*)"/i; #"; # filename can be null-str ($fname) = $cd =~ /\bfilename=([^\s:;]+)/i unless defined $fname; $incfn{$name} .= (defined $in{$name} ? "\0" : "") . (defined $fname ? $fname : ""); ($ctype) = $ct =~ /^\s*Content-type:\s*"([^"]+)"/i; #"; ($ctype) = $ct =~ /^\s*Content-Type:\s*([^\s:;]+)/i unless defined $ctype; $inct{$name} .= (defined $in{$name} ? "\0" : "") . $ctype; if ($writefiles && defined $fname) { $ser++; $fn = $writefiles . ".$$.$ser"; open (FILE, ">$fn") || &CgiDie("Couldn't open $fn\n"); binmode (FILE); # write files accurately } substr($buf, 0, $lpos+4) = ''; undef $fname; undef $ctype; } 1; END_MULTIPART if ($errflag) { local ($errmsg, $value); $errmsg = $@ || $errflag; foreach $value (values %insfn) { unlink(split("\0",$value)); } &CgiDie($errmsg); } else { # everything's ok. } } else { &CgiDie("cgi-lib.pl: Unknown Content-type: $ENV{'CONTENT_TYPE'}\n"); } # no-ops to avoid warnings $insfn = $insfn; $incfn = $incfn; $inct = $inct; $^W = $perlwarn; return ($errflag ? undef : scalar(@in)); } # PrintHeader # Returns the magic line which tells WWW that we're an HTML document sub PrintHeader { return "Content-type: text/html\n\n"; } # HtmlTop # Returns the <head> of a document and the beginning of the body # with the title and a body <h1> header as specified by the parameter sub HtmlTop { local ($title) = @_; return <<END_OF_TEXT; <html> <head> <title>$title</title> </head> <body> <h1>$title</h1> END_OF_TEXT } # HtmlBot # Returns the </body>, </html> codes for the bottom of every HTML page sub HtmlBot { return "</body>\n</html>\n"; } # SplitParam # Splits a multi-valued parameter into a list of the constituent parameters sub SplitParam { local ($param) = @_; local (@params) = split ("\0", $param); return (wantarray ? @params : $params[0]); } # MethGet # Return true if this cgi call was using the GET request, false otherwise sub MethGet { return (defined $ENV{'REQUEST_METHOD'} && $ENV{'REQUEST_METHOD'} eq "GET"); } # MethPost # Return true if this cgi call was using the POST request, false otherwise sub MethPost { return (defined $ENV{'REQUEST_METHOD'} && $ENV{'REQUEST_METHOD'} eq "POST"); } # MyBaseUrl # Returns the base URL to the script (i.e., no extra path or query string) sub MyBaseUrl { local ($ret, $perlwarn); $perlwarn = $^W; $^W = 0; $ret = 'http://' . $ENV{'SERVER_NAME'} . ($ENV{'SERVER_PORT'} != 80 ? ":$ENV{'SERVER_PORT'}" : '') . $ENV{'SCRIPT_NAME'}; $^W = $perlwarn; return $ret; } # MyFullUrl # Returns the full URL to the script (i.e., with extra path or query string) sub MyFullUrl { local ($ret, $perlwarn); $perlwarn = $^W; $^W = 0; $ret = 'http://' . $ENV{'SERVER_NAME'} . ($ENV{'SERVER_PORT'} != 80 ? ":$ENV{'SERVER_PORT'}" : '') . $ENV{'SCRIPT_NAME'} . $ENV{'PATH_INFO'} . (length ($ENV{'QUERY_STRING'}) ? "?$ENV{'QUERY_STRING'}" : ''); $^W = $perlwarn; return $ret; } # MyURL # Returns the base URL to the script (i.e., no extra path or query string) # This is obsolete and will be removed in later versions sub MyURL { return &MyBaseUrl; } # CgiError # Prints out an error message which which containes appropriate headers, # markup, etcetera. # Parameters: # If no parameters, gives a generic error message # Otherwise, the first parameter will be the title and the rest will # be given as different paragraphs of the body sub CgiError { local (@msg) = @_; local ($i,$name); if (!@msg) { $name = &MyFullUrl; @msg = ("Error: script $name encountered fatal error\n"); }; if (!$cgi_lib'headerout) { #') print &PrintHeader; print "<html>\n<head>\n<title>$msg[0]</title>\n</head>\n<body>\n"; } print "<h1>$msg[0]</h1>\n"; foreach $i (1 .. $#msg) { print "<p>$msg[$i]</p>\n"; } $cgi_lib'headerout++; } # CgiDie # Identical to CgiError, but also quits with the passed error message. sub CgiDie { local (@msg) = @_; &CgiError (@msg); die @msg; } # PrintVariables # Nicely formats variables. Three calling options: # A non-null associative array - prints the items in that array # A type-glob - prints the items in the associated assoc array # nothing - defaults to use %in # Typical use: &PrintVariables() sub PrintVariables { local (*in) = @_ if @_ == 1; local (%in) = @_ if @_ > 1; local ($out, $key, $output); $output = "\n<dl compact>\n"; foreach $key (sort keys(%in)) { foreach (split("\0", $in{$key})) { ($out = $_) =~ s/\n/<br>\n/g; $output .= "<dt><b>$key</b>\n <dd>:<i>$out</i>:<br>\n"; } } $output .= "</dl>\n"; return $output; } # PrintEnv # Nicely formats all environment variables and returns HTML string sub PrintEnv { &PrintVariables(*ENV); } # The following lines exist only to avoid warning messages $cgi_lib'writefiles = $cgi_lib'writefiles; $cgi_lib'bufsize = $cgi_lib'bufsize ; $cgi_lib'maxbound = $cgi_lib'maxbound; $cgi_lib'version = $cgi_lib'version; $cgi_lib'filepre = $cgi_lib'filepre; 1; #return true --- NEW FILE --- #!/bin/perl # $Id: cscope,v 1.1 2001/06/29 14:20:16 petr Exp $ # # WebCscope: A web interface to the cscope application # Copyright (C) 2001, Ragho Mahalingam <ra...@ma...> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public # License along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Change History: # # $Log: cscope,v $ # Revision 1.1 2001/06/29 14:20:16 petr # Added webcscope to contribs. # # Revision 1.3.4.1 2001/02/05 15:14:34 rmahalin # initial release with some bug fixes # # Revision 1.3.3.1 2001/01/22 22:21:23 rmahalin # added multi-database support # fixed cookie support for trivial functions; removed global trivials # added syntax highlighting for files displayed on browser # # Revision 1.3.1.1 2001/01/11 22:17:30 rmahalin # added direct download with mime-type 'text/c-source' and made cosmetic changes # # Revision 1.3 2001/01/11 21:36:39 rmahalin # *** empty log message *** # # Revision 1.2 2001/01/11 21:34:13 rmahalin # incorporated draft feedback changes # # Revision 1.1 2001/01/11 21:19:32 rmahalin # Initial revision # require "cgi-lib.pl"; # current code version being used $version = "iSOS 2.5/int16"; # full path to the cscope binary $cscopecmd = "/usr/global/bin/cscope"; # cscope working directory, where all the in/out and db files are stored $cscopedir = "/usr/local/cscope"; # trivial functions not to display, one per line in the trivs file $trivs = "/usr/local/htdocs/cscope/trivials"; # temporary storage directory $tmpdir = "/tmp"; $tmpinfile = $tmpdir . "/cscopein.$$"; $tmpoutfile = $tmpdir . "/cscopeout.$$"; $showfile = $tmpdir . "/showfile.$$"; # C syntax highlighting application or uncomment the line beneath to just cat #$hiliter = "/bin/cat"; $hiliter = "/usr/local/cgi-bin/cscope/hilite"; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime(time+1000000); $cookie_exp = sprintf("%s %02d-%s-%s %02d:%02d:%02d GMT", $wday, $mday, $mon, $year, $hour, $min, $sec); # standard images, from the apache distribution $img{openfile} = "/icons/folder.gif"; $img{downloadfile} = "/icons/folder.open.gif"; $img{csymbol} = "/icons/c.gif"; $img{upfunc} = "/icons/up.gif"; $img{downfunc} = "/icons/down.gif"; $img{globalfunc} = "/icons/world2.gif"; $img{trashfunc} = "/icons/bomb.gif"; $img{untrashfunc} = "/icons/back.gif"; $img{back} = "/icons/left.gif"; # feedback details $comment{name} = "Ragho Mahalingam"; $comment{email} = "ragho\@mahalingam.com"; # operations allowed @oper = ( "Find this C symbol", "Find this global symbol", "Find functions called by", "Find functions calling", "Find this text string", "---------------------", "Find this egrep pattern", "Find this file", "Find files #including this file" ); # -- removed global trivial function list in favor of customized trivials #open(TRIVIAL_FUNC, $trivs); #@trivial = <TRIVIAL_FUNC>; #close(TRIVIAL_FUNC); @trivial = (); MAIN: { $starttime = time; if (&ReadParse(*input)) { &ProcessCookie; &ProcessForm; } else { &PrintForm; } } sub ProcessCookie { if ( defined $ENV{HTTP_COOKIE} ) { ($var, $val) = split('=',$ENV{HTTP_COOKIE}); $Cookie{$var} = $val; if ( defined $Cookie{'cs-trivf'} ) { # do nothing, else initialize it to null } else { $Cookie{'cs-trivf'} = "defined"; } @loc_trivial = split(',', $Cookie{'cs-trivf'}); @trivial = ( @loc_trivial ); } } sub ProcessTrashForm { if ( defined $input{'trash'} ) { @trivial = (@trivial, $input{'func'}); } else { @tmptriv = (); for ($i=0; $i <= $#trivial; $i++) { $fhash = unpack('H*', $input{'func'}); $thash = unpack('H*', $trivial[$i]); if ( $fhash != $thash ) { @tmptriv = ( @tmptriv, $trivial[$i] ); } } @trivial = @tmptriv; } $Cookie{'cs-trivf'} = join(',',@trivial); print "Content-type: text/html\n"; print "Set-Cookie: cs-trivf=$Cookie{'cs-trivf'}; path=$ENV{SCRIPT_NAME}; expires $cookie_exp\n\n"; print &HtmlTop("Your WebCScope Trivial Functions"); print "<ul>"; for ($i=0; $i <= $#trivial; $i++) { print "<li><a href=\"$ENV{SCRIPT_NAME}?untrash=&func=$trivial[$i]\"><img src=$img{untrashfunc} border=0></a> $trivial[$i]"; } print "</ul><hr>\n"; print "Click <a href=\"#\" onClick=\"history.back();\"><img src=$img{back} border=0></a> to go back.\n"; print &HtmlBot; } sub ProcessForm { chdir $cscopedir; opendir(DIRLIST,$cscopedir); @dirlist = readdir(DIRLIST); closedir(DIRLIST); if ( $input{'db'} eq "all" ) { @csdirs = (); for ($i=0; $i <= $#dirlist; $i++ ) { if ( ($dirlist[$i] ne ".") && ($dirlist[$i] ne "..") && ( -d $dirlist[$i] ) ) { @csdirs = ( @csdirs, $dirlist[$i] ); } } } else { @csdirs = ( $input{'db'} ); } $op = $input{'op'}; $arg = $input{'arg'}; $shtriv = $input{'triv'}; $db = $input{'db'}; if ( defined $input{'fshow'} ) { &ShowFileForm; exit; } if ( defined $input{'load'} ) { &DownloadFileForm; exit; } if ( (defined $input{'trash'}) || (defined $input{'untrash'}) ) { &ProcessTrashForm; exit; } print &PrintHeader; print &HtmlTop ("WebCscope"); print <<ENDOFHDR; <h3>Instructions</h3><p> <ul> <li><img src=$img{csymbol}> will find a symbol with this name<br> <li><img src=$img{upfunc}> will find functions <i>calling</i> this function<br> <li><img src=$img{downfunc}> will find functions <i>called</i> by this function<br> <li><img src=$img{globalfunc}> will locate a global definition of this name<br> <li><img src=$img{openfile}> will display this file and highlight the fragment line<br> <li><img src=$img{downloadfile}> will download this file with mimetype "text/c-source"<br> <li><img src=$img{trashfunc}> will add this symbol/function to your trivial list<br> </ul> <p><hr> ENDOFHDR foreach $index ( 0 .. $#csdirs ) { unlink $tmpinfile, $tmpoutfile; open(CSCOPEIN, ">$tmpinfile"); print CSCOPEIN "$op$arg\n"; print CSCOPEIN "exit\n"; close(CSCOPEIN); $dbdir = $cscopedir . "/" . $csdirs[$index]; chdir($dbdir); $syscmd = "cd $dbdir; $cscopecmd -d -l < $tmpinfile > $tmpoutfile;"; system($syscmd); $count = 1; open(CSCOPEIN, "$tmpoutfile"); $line = <CSCOPEIN>; @temp = split(' ',$line); $numresult = $temp[2]; print <<ENDOFHDRs; <h2>Search Results from <b>$csdirs[$index]</b></h2> <font size=+1>$oper[$op]: <b>$arg</b></font><br> Matches: $numresult<p> <table border=1 cellpadding=2 cellspacing=2> <tr><td><b>Num</b></td><td><b>File</b></td><td><b>Function</b></td> <td><b>Line</b></td><td><b>Fragment</b></td></tr> ENDOFHDRs $trivs_rm = 0; for ($i=0; $i < $numresult; $i++ ) { $line = <CSCOPEIN>; @fields = split(' ',$line); $file = shift @fields; $fshowfile = $file; $func = shift @fields; $lnum = shift @fields; @filef = split('/',$file); $file = $filef[$#filef]; $frag = join(' ',@fields); if ( ! $shtriv ) { for ( $j=0; $j <= $#trivial; $j++ ) { $fhash = unpack('H*', $func); $thash = unpack('H*', $trivial[$j]); if ( $fhash == $thash ) { $trivs_rm++; goto done; } } } if ( $func ne "<global>" && $func ne "<unknown>" ) { print <<ENDOFBODY1; <tr><td>$count</td> <td><a href="$ENV{SCRIPT_NAME}?fshow=1&fshowfile=$fshowfile&line=$lnum&db=$db"> <img src=$img{openfile} border=0></a> $file <a href="$ENV{SCRIPT_NAME}?load=1&file=$fshowfile&db=$db"> <img src=$img{downloadfile} border=0></a> </td> <td><a href="$ENV{SCRIPT_NAME}?op=0&triv=$shtriv&arg=$func&db=$db"> <img src=$img{csymbol} border=0></a> <a href="$ENV{SCRIPT_NAME}?op=3&triv=$shtriv&arg=$func&db=$db"> <img src=$img{upfunc} border=0></a> $func <a href="$ENV{SCRIPT_NAME}?op=2&triv=$shtriv&arg=$func&db=$db"> <img src=$img{downfunc} border=0></a> <a href="$ENV{SCRIPT_NAME}?op=1&triv=$shtriv&arg=$func&db=$db"> <img src=$img{globalfunc} border=0></a> <a href="$ENV{SCRIPT_NAME}?trash=&func=$func&db=$db"> <img src=$img{trashfunc} border=0></a> </td> <td>$lnum</td> <td>$frag</td></tr> ENDOFBODY1 } else { $func =~ tr/<>/[]/; print <<ENDOFBODY2; <tr><td>$count</td> <td><a href="$ENV{SCRIPT_NAME}?fshow=1&fshowfile=$fshowfile&line=$lnum&db=$db"> <img src=$img{openfile} border=0></a> $file <a href="$ENV{SCRIPT_NAME}?load=1&file=$fshowfile&db=$db"> <img src=$img{downloadfile} border=0></a> </td> <td>$func</td> <td>$lnum</td> <td><$frag</td></tr> ENDOFBODY2 } $count++; done: } close(CSCOPEIN); print "</table>\n"; print "<br>Eliminated $trivs_rm line item(s) as trivial functions<p><hr>\n"; unlink $tmpinfile, $tmpoutfile; } print &OperationTime; print &Feedback; print &HtmlBot; } sub DownloadFileForm { $file = $input{'file'}; print "Content-type: text/c-source\n\n"; open(SHOWFILE, $file); while (<SHOWFILE>) { print; } close(SHOWFILE); } sub ShowFileForm { $file = $input{'fshowfile'}; $lnum = $input{'line'}; print &PrintHeader; print &HtmlTop ("WebCscope"); print "<b>Note</b>: Click <a href=#ref><img src=$img{downfunc} border=0></a> to go to the reference line<p><hr>\n"; print "<hr>"; unlink $showfile; system("$hiliter $file > $showfile"); open(SHOWFILE, $showfile); $curline = 1; while ( <SHOWFILE> ) { $line = $_; if ( $curline == $lnum ) { print "<a name=ref><blink>$line</blink>"; } else { print $line; } $curline++; } close (SHOWFILE); print &OperationTime; print &Feedback; print &HtmlBot; } sub PrintForm { chdir $cscopedir; opendir(DIRLIST,$cscopedir); @dirlist = readdir(DIRLIST); closedir(DIRLIST); @csdirs = (); for ($i=0; $i <= $#dirlist; $i++ ) { if ( ($dirlist[$i] ne ".") && ($dirlist[$i] ne "..") && ( -d $dirlist[$i] ) ) { @csdirs = ( @csdirs, $dirlist[$i] ); } } print &PrintHeader; print &HtmlTop ("Web-CScope"); print <<ENDOFTEXTA; Select an operation below and enter a symbol, function or text to search in the database. The active version is $version. Input is case-sensitive, so if your search returns no results, check the case and the symbol name.<hr> <form method="get" action="$ENV{SCRIPT_NAME}"> <table border=0 cellpadding=2 cellspacing=2> <tr> <td>Operation:</td> <td> <select name="op"> ENDOFTEXTA foreach $opi ( 0 .. $#oper ) { print "<option value=$opi>$oper[$opi]"; } print <<ENDOFTEXTB; </select> </td> </tr> <tr> <td>CScope Database:</td> <td> <select name="db"> <option selected value="all">All Databases ENDOFTEXTB for ($i=0; $i <= $#csdirs; $i++) { print " <option value=\"$csdirs[$i]\">$csdirs[$i]\n"; } print <<ENDOFTEXT2; </select> <tr> <td>Symbol, function or text:</td> <td><input name="arg" size=30></td> </tr> <tr> <td></td> <td halign=center>Show trivial functions: <input type=radio name="triv" value=1>Yes <input type=radio name="triv" value=0 checked>No <br><br> <input type="submit" value="Scope It!"></td> </tr> </table> <hr> </form> ENDOFTEXT2 print &Feedback; print &HtmlBot; } sub Feedback { $feedback = "<font size=-1>"; $feedback .= '$Id: cscope,v 1.1 2001/06/29 14:20:16 petr Exp $<br>'; $feedback .= "$comment{name}<i><"; $feedback .= "<a href=\"mailto:$comment{email}\">"; $feedback .= "$comment{email}</a>></i></font>"; return $feedback; } sub OperationTime { $deltime = time - $starttime; return "Operation took $deltime second(s)<br>"; } --- NEW FILE --- /* CopyRight (C) 1999, Dmitry Obukhov, ds...@us... mailto: ds...@us... http://www.EmbeddedStuff.com ---------------------------------------------- Last modified 6 Apr 97 ---------------------------------------------- Converts C (C++) source to HTML code fragment with syntax highlighting. Since program written for personal purpose the <TABLE> tags generated. This is optional page format specific thing. Usage: CTHM <input_file>. All output is done to STDOUTPUT, error messages to STDERR. For HTML fragment generation: CHTM file.c > file.htm - Some input convertion required to use this code as CGI module. Will be done soon. - Optimization required for blocks of EOL comments */ #include <stdio.h> // ------------------- Decoding status values #define START 0 #define INLINE 1 #define DEFINE 2 // ------------------- Decoding Remark #define REM1 20 #define REM2 21 #define REM_END 22 #define REM_STAR 23 #define REM_STAR_1 24 #define STRING 25 // String is "like" remark // ------------------- HTML TAG Generation #define ON 1 #define OFF 0 // ------------------- HTML TAG type #define MODE_KEYWORD 0 #define MODE_REMARK 2 #define MODE_REMARK_EOL 4 #define MODE_DEFINE 6 #define MODE_STRING 8 int is_delimeter(char c) { int ii=0; char dlms[] = "\t\r\n (){}[]+-*/%\"'&|^~:;<>.,"; //-------------------------------- while (dlms[ii]) { if (c==dlms[ii++]) return 1; } return 0; } int is_keyword(char * str) { char * kwords[] = { "asm", "auto", "break", "case", "cdecl", "char", "class", "const", "continue", "default", "delete", "do", "double", "else", "enum", "extern", "far", "float", "for", "friend", "goto", "huge", "if", "inline", "int", "interrupt", "long", "near", "new", "operator", "pascal", "private", "protected", "public", "register", "return", "short", "signed", "sizeof", "static", "struct", "switch", "template", "this", "typedef", "union", "unsigned", "virtual", "void", "volatile", "while", NULL }; int ii=0; int jj; int check; while (kwords[ii]) { jj = 0; check = 1; while (kwords[ii][jj] && check) { if (str[jj] != kwords[ii][jj]) { check = 0; } jj++; } if (check) return 1; ii++; } return 0; } void set_mode(int on_off, int mode) { char * tags[] = { //-------------------- KEYWORD "<strong>", "</strong>", //-------------------- Classic remarks "<font color=\"#336600\">", "</font>", //-------------------- EOL Remarks "<font color=\"#336600\">", "</font>", //-------------------- #DEFINE "<font color=\"#663300\"><strong>", "</strong></font>", //-------------------- "string" "<font color=\"#0000CC\">", "</font>", NULL, NULL }; fprintf(stdout,tags[mode + 1 - on_off]); } void print_char_html(char c) { switch (c) { case '<': fprintf(stdout,"<"); break; case '>': fprintf(stdout,">"); break; case '"': fprintf(stdout,"""); break; case '&': fprintf(stdout,"&"); break; case '|': fprintf(stdout,"¦"); break; default: fprintf(stdout,"%c",c); } } int main(int _argc, char** _argv) { FILE *in, *out; char c; int mode; char buf[80]; int bufidx = 0; int progress = 1; int echo; int saved_mode; int kw; char tmpc; char prevc; if (_argc < 2) { fprintf(stderr, "USAGE: c2html <file>\n"); return 1; } if ((in = fopen(_argv[1], "rt")) == NULL) { fprintf(stderr, "Cannot open input file.\n"); return 1; } fprintf(stdout, "<pre>"); mode = START; while (!feof(in) && progress) { echo = 1; prevc = c; c = fgetc(in); if (c=='/' && (mode < REM1)) { saved_mode = mode; mode = REM1; } switch (mode) { case REM1: echo = 0; mode = REM2; break; case REM2: if (c=='/') { if (saved_mode == DEFINE) { set_mode(OFF, MODE_DEFINE); } mode = REM_END; set_mode(ON, MODE_REMARK_EOL); } else if (c=='*') { if (saved_mode == DEFINE) { set_mode(OFF, MODE_DEFINE); } mode = REM_STAR; set_mode(ON, MODE_REMARK); } else { mode = saved_mode; } printf("/"); break; case REM_END: if (c=='\n') { set_mode(OFF, MODE_REMARK_EOL); } break; case REM_STAR: if (c=='*') { mode = REM_STAR_1; } break; case REM_STAR_1: if (c=='/') { mode = INLINE; fprintf(stdout,"/"); echo = 0; set_mode(OFF, MODE_REMARK); } else mode = REM_STAR; break; case START: if (c=='#') { mode = DEFINE; set_mode(ON, MODE_DEFINE); break; } else if (c==' ') break; mode = INLINE; // and continue in next case case INLINE: if (c=='"' && // prevc != 0x27 && // prevc != '\\') // { set_mode(ON, MODE_STRING); mode = STRING; } break; case STRING: if (c=='"' && prevc != '\\') { print_char_html('"'); set_mode(OFF, MODE_STRING); echo = 0; mode = INLINE; } break; case DEFINE: if (c=='\n') { set_mode(OFF, MODE_DEFINE); } break; } if (echo && // (mode == INLINE || // (mode!=INLINE && // bufidx))) // { buf[bufidx++] = c; buf[bufidx] = 0; if (is_delimeter(c)) { kw = 0; if (bufidx>2) { kw = is_keyword(buf); } if (kw) { set_mode(ON, MODE_KEYWORD); } tmpc = buf[bufidx-1]; buf[bufidx-1] = 0; fprintf(stdout,"%s",buf); if (kw) { set_mode(OFF, MODE_KEYWORD); } print_char_html(tmpc); bufidx = 0; buf[0] = 0; } } else if (echo) print_char_html(c); if (c=='\n' && mode != REM_STAR) { mode = START; } } fclose(in); fprintf(stdout,"</pre>\n"); fprintf(stdout, "<!-- == Generated by CHTM convertor -->\n"); fprintf(stdout, "<!-- == CopyRight (C) 1999, Dmitry Obukhov, ds...@us... -->\n"); return 0; } |
Update of /cvsroot/cscope/cscope/contrib/webcscope/icons In directory usw-pr-cvs1:/tmp/cvs-serv6619/contrib/webcscope/icons Added Files: back.gif bomb.gif c.gif down.gif folder.gif folder.open.gif left.gif up.gif world2.gif Log Message: Added webcscope to contribs. --- NEW FILE --- GIF89a --- NEW FILE --- GIF89a °v$Ýû}ئIÐvDpHã % r© [§@-45áoJ½Æ --- NEW FILE --- GIF89a Ñ(Q!uA!ÖJq9hRÄZ-Ýf¶ÇâN¿Á0\¾ÑÊó÷ÂÕpðt@ìû7l+ --- NEW FILE --- GIF89a --- NEW FILE --- GIF89a --- NEW FILE --- GIF89a pÅÁ/ãsF«×mñC¨Ûï÷9¦ïûý*:5 --- NEW FILE --- GIF89a --- NEW FILE --- GIF89a --- NEW FILE --- GIF89a |
From: Petr S. <pe...@us...> - 2001-06-29 14:20:19
|
Update of /cvsroot/cscope/cscope/contrib In directory usw-pr-cvs1:/tmp/cvs-serv6619/contrib Modified Files: README Log Message: Added webcscope to contribs. Index: README =================================================================== RCS file: /cvsroot/cscope/cscope/contrib/README,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** README 2000/04/21 23:36:26 1.1 --- README 2001/06/29 14:20:16 1.2 *************** *** 5,6 **** --- 5,9 ---- directory set (among other things) - docced in script itself. contributed from SCO osr5. + + webcscope - a web cgi interface to cscope. Contributed by Ragho Mahalingam, + using code from Dmitry Obukhovi and Steven E. Brenner. |