Update of /cvsroot/cscope/cscope/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28719/src
Modified Files:
global.h display.c command.c
Log Message:
Fix column layout for long file/fcn names.
Index: global.h
===================================================================
RCS file: /cvsroot/cscope/cscope/src/global.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -r1.31 -r1.32
*** global.h 30 Apr 2004 15:31:42 -0000 1.31
--- global.h 27 Oct 2004 11:32:46 -0000 1.32
***************
*** 350,353 ****
--- 350,354 ----
void clearmsg(void);
void clearmsg2(void);
+ void countrefs(void);
void crossref(char *srcfile);
void dispinit(void);
Index: display.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/display.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** display.c 30 Apr 2004 15:29:04 -0000 1.25
--- display.c 27 Oct 2004 11:32:46 -0000 1.26
***************
*** 503,539 ****
(void) ungetc(c, refsfound);
! /* count the references found and find the length of the file,
! function, and line number display fields */
! subsystemlen = 9; /* strlen("Subsystem") */
! booklen = 4; /* strlen("Book") */
! filelen = 4; /* strlen("File") */
! fcnlen = 8; /* strlen("Function") */
! numlen = 0;
! while (fscanf(refsfound, "%s%s%s", file, function, linenum) == 3) {
! if ((i = strlen(pathcomponents(file, dispcomponents))) > filelen) {
! filelen = i;
! }
! if (ogs == YES) {
! ogsnames(file, &subsystem, &book);
! if ((i = strlen(subsystem)) > subsystemlen) {
! subsystemlen = i;
! }
! if ((i = strlen(book)) > booklen) {
! booklen = i;
! }
! }
! if ((i = strlen(function)) > fcnlen) {
! fcnlen = i;
! }
! if ((i = strlen(linenum)) > numlen) {
! numlen = i;
! }
! /* skip the line text */
! while ((c = getc(refsfound)) != EOF && c != '\n') {
! ;
! }
! ++totallines;
! }
! rewind(refsfound);
return(YES);
}
--- 503,510 ----
(void) ungetc(c, refsfound);
! /* HBB 20041027: this used to hold a copy of the code of
! * countrefs(), but with the crucial display width adjustments
! * missing. Just call the real thing instead! */
! countrefs();
return(YES);
}
Index: command.c
===================================================================
RCS file: /cvsroot/cscope/cscope/src/command.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** command.c 30 Apr 2004 15:24:18 -0000 1.23
--- command.c 27 Oct 2004 11:32:46 -0000 1.24
***************
*** 70,74 ****
static void mark(int i);
static void scrollbar(MOUSE *p);
- static void countrefs(void);
/* execute the command */
--- 70,73 ----
***************
*** 868,872 ****
/* count the references found */
! static void
countrefs(void)
{
--- 867,871 ----
/* count the references found */
! void
countrefs(void)
{
|