Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Nov 1998 16:25:29 -0800 (PST)
From:      "Castor L. Fu" <castor@cm20816350173.cableco-op.com>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   ports/8789: New port for cscope-13.7
Message-ID:  <199811220025.QAA16771@cm20816350173.cableco-op.com>

next in thread | raw e-mail | index | archive | help

>Number:         8789
>Category:       ports
>Synopsis:       Port created for Lucent Technology's Cscope version 13.7
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat Nov 21 16:30:00 PST 1998
>Last-Modified:
>Originator:     Castor L. Fu
>Organization:
Geocast Network Systems
>Release:        FreeBSD 2.2.7-STABLE i386
>Environment:
	n/a
>Description:

	I have ported cscope version 13.7 to FreeBSD, avoiding the 
	AT&T Lex dependencies at a cost of about 10%-15% in performance.

>How-To-Repeat:

	n/a

>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	.
#	./Makefile
#	./files
#	./files/md5
#	./patches
#	./patches/patch-aa
#	./patches/opatch
#	./patches/opatch-01
#	./pkg
#	./pkg/COMMENT
#	./pkg/DESCR
#	./pkg/PLIST
#
echo c - .
mkdir -p . > /dev/null 2>&1
echo x - ./Makefile
sed 's/^X//' >./Makefile << 'END-of-./Makefile'
X# ports collection makefile for:	cscope
X# Version required:	13.7
X# Date created:		1998-11-21
X# Whom:			Castor Fu
X#
X# $Id: $
X#
X
XDISTNAME=	cscope-13.7
XCATEGORIES=	devel
XMASTER_SITES=none
X
XMAINTAINER=	castor@alumni.caltech.edu
X
XNO_WRKSUBDIR=yes
XNO_CHECKSUM=yes
XRESTRICTED="Redistribution license from Lucent Technologies required."
XMAKEFILE=makefile
X
X# Location of the Cscope sources as distributed on Toolchest disk
XCDROMDIR=/cdrom/cscope
XTESTFILE=cscope.1
X
XMAN1=	cscope.1
X
XTRUNCATED_NAMES=fixkeypad.c constants.h
X
X#
X# Introduce the ability to get things from a fixed distribution filesystem.
X#
Xdo-fetch:
X	@${MKDIR} ${_DISTDIR}
X	@(cd ${_DISTDIR}; \
X	 for file in ${DISTFILES}; do \
X		if [ ! -f $$file -a ! -f `${BASENAME} $$file` ]; then \
X			if [ -h $$file -o -h `${BASENAME} $$file` ]; then \
X				${ECHO_MSG} ">> ${_DISTDIR}/$$file is a broken symlink."; \
X				${ECHO_MSG} ">> Perhaps a filesystem (most likely a CD) isn't mounted?"; \
X				${ECHO_MSG} ">> Please correct this problem and try again."; \
X				exit 1; \
X			fi ; \
X			${ECHO_MSG} ">> $$file doesn't seem to exist on this system."; \
X			if [ ! -d ${CDROMDIR} -a ! -f ${CDROMDIR}/${TESTFILE} ] ; then \
X				${ECHO_MSG} ">> ${CDROMDIR}/${TESTFILE} not found.  Perhaps the AT&T CD isn't mounted?"; \
X				${ECHO_MSG} ">> See <http://www.lucent.com/ssg/html/toolchest.html>."; \
X				exit 1; \
X			else \
X				(cd ${CDROMDIR}; tar czf ${_DISTDIR}/$$file .); \
X			fi; \
X		fi \
X	 done)
X
X#
X# Get rid of any <CR>'s in the files and expand out file names which may have been truncated.
X#
X
Xpost-extract:
X	@(chmod +w ${WRKSRC})
X	@(for file in ${WRKSRC}/* ; do ${TR} -d '\015' < $$file > $$file.x ; ${MV} -f $$file.x $$file ; done)
X	@(for file in ${TRUNCATED_NAMES} ; do \
X		x=`echo $$file | ${SED} -e 's/^\(......\).*/\1/'` ; \
X		y=$${file#*.} ; \
X		${MV} ${WRKSRC}/$${x}*.$${y} ${WRKSRC}/$$file; \
X	done)
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/cscope ${PREFIX}/bin
X	${INSTALL_MAN}	${WRKSRC}/cscope.1 ${PREFIX}/man/man1
X
X.include <bsd.port.mk>
END-of-./Makefile
echo c - ./files
mkdir -p ./files > /dev/null 2>&1
echo x - ./files/md5
sed 's/^X//' >./files/md5 << 'END-of-./files/md5'
XMD5 (cscope-13.7.tar.gz) = 615fc7ca93c52cf5ecccd9ebff92e4c6
END-of-./files/md5
echo c - ./patches
mkdir -p ./patches > /dev/null 2>&1
echo x - ./patches/patch-aa
sed 's/^X//' >./patches/patch-aa << 'END-of-./patches/patch-aa'
Xdiff -c ./display.c ../goodwork/display.c
X*** ./display.c	Sat Nov 21 15:34:21 1998
X--- ../goodwork/display.c	Sat Nov 21 14:59:23 1998
X***************
X*** 574,580 ****
X--- 574,582 ----
X  char	*text; 
X  {
X  	extern	int	errno, sys_nerr;
X+ #ifdef	NEEDS_SYS_ERRLIST_PROTO
X  	extern	char	*sys_errlist[];
X+ #endif
X  	char	msg[MSGLEN + 1];	/* message */
X  	register char	*s;
X  
Xdiff -c ./getwd.c ../goodwork/getwd.c
X*** ./getwd.c	Sat Nov 21 15:34:22 1998
X--- ../goodwork/getwd.c	Sat Nov 21 14:14:53 1998
X***************
X*** 14,20 ****
X  	return(getcwd(dir, 200));
X  }
X  #else
X! #ifndef BSD
X  /*
X   *	char *getwd(dir)
X   *
X--- 14,20 ----
X  	return(getcwd(dir, 200));
X  }
X  #else
X! #if	!defined(BSD) && !defined(__linux__)
X  /*
X   *	char *getwd(dir)
X   *
Xdiff -c ./global.h ../goodwork/global.h
X*** ./global.h	Sat Nov 21 15:34:22 1998
X--- ../goodwork/global.h	Sat Nov 21 14:55:55 1998
X***************
X*** 33,39 ****
X  #if AIX
X  typedef	long	pid_t;
X  #else
X! typedef	int	pid_t;
X  #endif
X  #endif
X  #endif
X--- 33,43 ----
X  #if AIX
X  typedef	long	pid_t;
X  #else
X! #if BSD
X! #include <sys/types.h>	/* pid_t */
X! #else
X! typedef	int	pid_t; /
X! #endif
X  #endif
X  #endif
X  #endif
Xdiff -c ./library.h ../goodwork/library.h
X*** ./library.h	Sat Nov 21 15:34:22 1998
X--- ../goodwork/library.h	Sat Nov 21 14:14:54 1998
X***************
X*** 42,47 ****
X--- 42,48 ----
X  
X  /* vp*.c */
X  FILE	*vpfopen(char *filename, char *type);
X+ struct	stat;	/* Forward declaration */
X  void	vpinit(char *currentdir);
X  int	vpopen(char *path, int oflag);
X  int	vpstat(char *path, struct stat *statp);
Xdiff -c ./main.c ../goodwork/main.c
X*** ./main.c	Sat Nov 21 15:34:23 1998
X--- ../goodwork/main.c	Sat Nov 21 14:51:57 1998
X***************
X*** 1313,1319 ****
X  	
X  /* string comparison function for qsort */
X  
X! #ifdef __BORLANDC__
X  int
X  compare(const void *s1, const void *s2)
X  {
X--- 1313,1319 ----
X  	
X  /* string comparison function for qsort */
X  
X! #if	defined(__BORLANDC__) || defined(__STDC__)
X  int
X  compare(const void *s1, const void *s2)
X  {
Xdiff -c ./makefile ../goodwork/makefile
X*** ./makefile	Sat Nov 21 15:34:23 1998
X--- ../goodwork/makefile	Sat Nov 21 15:32:51 1998
X***************
X*** 1,7 ****
X--- 1,12 ----
X+ # DEBUG=-pg
X  PROGRAM = cscope
X  BIN = $(HOME)/bin
X  CURSES = -lcurses
X  LIBS = -lPW
X+ # Linux calls it libfl
X+ # LEXLIB=-lfl
X+ LEXLIB=-ll
X+ 
X  
X  # for System V Release 2 change the U to D:
X  SVR2 = U
X***************
X*** 11,22 ****
X  
X  # for System V Release 4  or  Solaris  remove the #:
X  #LIBS = -lgen
X  
X  # for Berkeley UNIX based machines change the U to D:
X! BSD = U
X  
X  # for Berkeley UNIX based machines remove the #:
X! #LIBS = -ltermcap
X  
X  # for Berkeley UNIX 4.2 change the U to D:
X  BSD42 = U
X--- 16,28 ----
X  
X  # for System V Release 4  or  Solaris  remove the #:
X  #LIBS = -lgen
X+ #CFLAGS+=-DNEEDS_SYS_ERRLIST_PROTO -DHAS_ATTLEX
X  
X  # for Berkeley UNIX based machines change the U to D:
X! BSD = D
X  
X  # for Berkeley UNIX based machines remove the #:
X! LIBS = -ltermcap
X  
X  # for Berkeley UNIX 4.2 change the U to D:
X  BSD42 = U
X***************
X*** 30,36 ****
X  
X  TMPDIR= /usr/tmp
X  
X! CFLAGS  = -O $(DEBUG) -$(SVR2)SVR2 -$(BSD)BSD -$(BSD42)BSD42 \
X  	  $(LINUX) -$(AIX)AIX -DTMPDIR=\"$(TMPDIR)\"
X  
X  LDFLAGS = $(DEBUG)
X--- 36,42 ----
X  
X  TMPDIR= /usr/tmp
X  
X! CFLAGS  += -$(SVR2)SVR2 -$(BSD)BSD -$(BSD42)BSD42 \
X  	  $(LINUX) -$(AIX)AIX -DTMPDIR=\"$(TMPDIR)\"
X  
X  LDFLAGS = $(DEBUG)
X***************
X*** 55,61 ****
X  FILES	= $(OTHER) $(SOURCE) $(PROGRAM).1 $(EXTRA)
X  
X  $(PROGRAM): $(OBJECTS)
X! 	$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(CURSES) -ll $(LIBS)
X  $(OBJ): constants.h
X  crossref.o find.o invlib.o: invlib.h
X  dir.o: ndir.h vp.h
X--- 61,67 ----
X  FILES	= $(OTHER) $(SOURCE) $(PROGRAM).1 $(EXTRA)
X  
X  $(PROGRAM): $(OBJECTS)
X! 	$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(CURSES) $(LEXLIB) $(LIBS)
X  $(OBJ): constants.h
X  crossref.o find.o invlib.o: invlib.h
X  dir.o: ndir.h vp.h
X***************
X*** 115,123 ****
X  rmake:  rmake!svr2 rmake.svr2 rmake.svr3 rmake.svr4 rmake.bsd rmake.solaris
X  
X  # set NAME to "and name=type" to select individual types
X! rmake!svr2:		cscope.cpio
X! 		$(TOOLS)/adm/bin/machines -f type name!=3b20 and name!=vax and release!=SunOS and release!=BSD4.3 and release!=SVR4 and name!=i386 $(NAME) | xargs -l1 -i -t $(RMAKE) -p cscope -P .pkg.cscope -s cscope.cpio -t cscope -u -m {}
X! 
X  rmake.svr2:		cscope.cpio
X  		$(TOOLS)/adm/bin/machines -f type release=SVR2 and name!=ibm $(NAME) | xargs -l1 -i -t $(RMAKE) -p cscope -P .pkg.cscope -s cscope.cpio -t cscope -u -m {} SVR2=D
X  
X--- 121,129 ----
X  rmake:  rmake!svr2 rmake.svr2 rmake.svr3 rmake.svr4 rmake.bsd rmake.solaris
X  
X  # set NAME to "and name=type" to select individual types
X! #rmake!svr2:		cscope.cpio
X! #		$(TOOLS)/adm/bin/machines -f type name!=3b20 and name!=vax and release!=SunOS and release!=BSD4.3 and release!=SVR4 and name!=i386 $(NAME) | xargs -l1 -i -t $(RMAKE) -p cscope -P .pkg.cscope -s cscope.cpio -t cscope -u -m {}
X! #
X  rmake.svr2:		cscope.cpio
X  		$(TOOLS)/adm/bin/machines -f type release=SVR2 and name!=ibm $(NAME) | xargs -l1 -i -t $(RMAKE) -p cscope -P .pkg.cscope -s cscope.cpio -t cscope -u -m {} SVR2=D
X  
X***************
X*** 138,141 ****
X  
X  repall:		
X  		$(TOOLS)/adm/bin/machines types | xargs -l1 -i -t $(REPFILE) -p cscope -P .pkg.cscope -s cscope.{} -t bin/cscope -x -v {}
X- 
X--- 144,146 ----
Xdiff -c ./scanner.l ../goodwork/scanner.l
X*** ./scanner.l	Sat Nov 21 15:34:24 1998
X--- ../goodwork/scanner.l	Sat Nov 21 15:01:56 1998
X***************
X*** 1,3 ****
X--- 1,4 ----
X+ %array
X  %{
X  /*	Copyright (c) 1988 AT&T	*/
X  /*	  All Rights Reserved  	*/
X***************
X*** 13,18 ****
X--- 14,20 ----
X  
X  #include "global.h"
X  
X+ #ifdef	HAS_ATTLEX
X  /* the line counting has been moved from character reading for speed */
X  /* comments are discarded */
X  #undef	input
X***************
X*** 27,32 ****
X--- 29,43 ----
X  #endif
X  #undef	unput
X  #define unput(c) (*yysptr++=(c))
X+ #else	/* HAS_ATTLEX */
X+ int 
X+ noncommentinput()
X+ {
X+ 	int c;
X+ 	c = input();
X+ 	return  (c == EOF) ? LEXEOF : c;
X+ }
X+ #endif	/* HAS_ATTLEX */
X  
X  /* not a preprocessor line (allow Ingres(TM) "## char var;" lines) */
X  #define	notpp()	(ppdefine == NO && (*yytext != '#' || yytext[1] == '#'))
X***************
X*** 40,45 ****
X--- 51,59 ----
X  int	first;	/* buffer index for first char of symbol */
X  int	last;	/* buffer index for last char of symbol */
X  int	lineno;	/* symbol line number */
X+ #ifndef	HAS_ATTLEX
X+ int	yylineno; /* current line number */
X+ #endif
X  
X  static	BOOL	arraydimension;		/* inside array dimension declaration */
X  static	BOOL	bplisting;		/* breakpoint listing */
X***************
X*** 74,79 ****
X--- 88,94 ----
X  static	int	token;			/* token found */
X  
X  void	multicharconstant();
X+ 
X  %}
X  identifier	[a-zA-Z_][a-zA-Z_0-9]*
X  number		\.?[0-9][.0-9a-fA-FlLuUxX]*
X***************
X*** 197,202 ****
X--- 212,256 ----
X  			return(INCLUDE);
X  			/* NOTREACHED */
X  		}
X+ "//"		{		/* Skip C++ comment */
X+ 			int c;
X+ 			while ( (c = input()) != '\n' && c != EOF) 
X+ 				;
X+ 			if (c == EOF) {
X+ 				return LEXEOF;
X+ 			} else {
X+ 				unput(c);
X+ 			}
X+ 			goto more;
X+ 		}
X+ 
X+ "/*"		{
X+ 			int c;
X+ 
X+ 			for ( ; ; ) {
X+ 				/* eat up text of comment */
X+ 				while ( (c = input()) != '*' && c != EOF ) {
X+ 					if (c == '\n') {
X+ 						yylineno++;    
X+ 					}
X+ 				}
X+ 		    
X+ 
X+ 				if ( c == '*' ) {
X+ 					while ( (c = input()) == '*' )
X+ 						;
X+ 					if (c == '\n') {
X+ 						yylineno++;
X+ 					}
X+ 					if ( c == '/' )
X+ 						break;    /* found the end */
X+ 				}
X+ 
X+ 				if ( c == EOF )
X+ 					return LEXEOF;
X+ 			}
X+ 			goto more;
X+ 		}
X  \{		{	/* count unmatched left braces for fcn def detection */
X  			++braces;
X  			
X***************
X*** 589,595 ****
X  \n		{	/* end of the line */
X  			if (ppdefine == YES) {	/* end of a #define */
X  				ppdefine = NO;
X! 				(void) yyless(yyleng - 1);	/* rescan \n */
X  				last = first;
X  				yymore();
X  				return(DEFINEEND);
X--- 643,649 ----
X  \n		{	/* end of the line */
X  			if (ppdefine == YES) {	/* end of a #define */
X  				ppdefine = NO;
X! 				yyless(yyleng - 1);	/* rescan \n */
X  				last = first;
X  				yymore();
X  				return(DEFINEEND);
END-of-./patches/patch-aa
echo x - ./patches/opatch
sed 's/^X//' >./patches/opatch << 'END-of-./patches/opatch'
Xdiff ./display.c ../goodwork/display.c
X577d576
X< 	extern	char	*sys_errlist[];
Xdiff ./getwd.c ../goodwork/getwd.c
X17c17
X< #ifndef BSD
X---
X> #if	!defined(BSD) && !defined(__linux__)
Xdiff ./global.h ../goodwork/global.h
X36c36,40
X< typedef	int	pid_t;
X---
X> #if 0
X> typedef	int	pid_t; /
X> #else
X> #include <sys/types.h>
X> #endif
Xdiff ./invlib.c ../goodwork/invlib.c
X9a10
X> #include <assert.h>
X182a184
X> 		assert(s);
Xdiff ./library.h ../goodwork/library.h
X44a45
X> struct	stat;	/* Forward declaration */
Xdiff ./main.c ../goodwork/main.c
X1316c1316
X< #ifdef __BORLANDC__
X---
X> #if	defined(__BORLANDC__) || 1
Xdiff ./makefile ../goodwork/makefile
X0a1
X> # DEBUG=-pg
X4a6,9
X> # Linux calls it libfl
X> # LEXLIB=-lfl
X> LEXLIB=-ll
X> 
X16c21
X< BSD = U
X---
X> BSD = D
X19c24
X< #LIBS = -ltermcap
X---
X> LIBS = -ltermcap
X31c36
X< TMPDIR= /usr/tmp
X---
X> TMPDIR= /var/tmp
X58c63
X< 	$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(CURSES) -ll $(LIBS)
X---
X> 	$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(CURSES) $(LEXLIB) $(LIBS)
X118,120c123,125
X< rmake!svr2:		cscope.cpio
X< 		$(TOOLS)/adm/bin/machines -f type name!=3b20 and name!=vax and release!=SunOS and release!=BSD4.3 and release!=SVR4 and name!=i386 $(NAME) | xargs -l1 -i -t $(RMAKE) -p cscope -P .pkg.cscope -s cscope.cpio -t cscope -u -m {}
X< 
X---
X> #rmake!svr2:		cscope.cpio
X> #		$(TOOLS)/adm/bin/machines -f type name!=3b20 and name!=vax and release!=SunOS and release!=BSD4.3 and release!=SVR4 and name!=i386 $(NAME) | xargs -l1 -i -t $(RMAKE) -p cscope -P .pkg.cscope -s cscope.cpio -t cscope -u -m {}
X> #
X141d145
X< 
Xdiff ./scanner.l ../goodwork/scanner.l
X0a1
X> %array
X15a17
X> #ifdef	HAS_ATTLEX
X29a32,40
X> #else	/* HAS_ATTLEX */
X> int 
X> noncommentinput()
X> {
X> 	int c;
X> 	c = input();
X> 	return  (c == EOF) ? LEXEOF : c;
X> }
X> #endif	/* HAS_ATTLEX */
X42a54,56
X> #ifndef	HAS_ATTLEX
X> int	yylineno; /* current line number */
X> #endif
X76a91
X> 
X199a215,253
X> "//"		{		/* Skip C++ comment */
X> 			int c;
X> 			while ( (c = input()) != '\n' && c != EOF) 
X> 				;
X> 			if (c == EOF) {
X> 				return LEXEOF;
X> 			} else {
X> 				unput(c);
X> 			}
X> 			goto more;
X> 		}
X> 
X> "/*"		{
X> 			int c;
X> 
X> 			for ( ; ; ) {
X> 				/* eat up text of comment */
X> 				while ( (c = input()) != '*' && c != EOF ) {
X> 					if (c == '\n') {
X> 						yylineno++;    
X> 					}
X> 				}
X> 		    
X> 
X> 				if ( c == '*' ) {
X> 					while ( (c = input()) == '*' )
X> 						;
X> 					if (c == '\n') {
X> 						yylineno++;
X> 					}
X> 					if ( c == '/' )
X> 						break;    /* found the end */
X> 				}
X> 
X> 				if ( c == EOF )
X> 					return LEXEOF;
X> 			}
X> 			goto more;
X> 		}
X592c646
X< 				(void) yyless(yyleng - 1);	/* rescan \n */
X---
X> 				yyless(yyleng - 1);	/* rescan \n */
END-of-./patches/opatch
echo x - ./patches/opatch-01
sed 's/^X//' >./patches/opatch-01 << 'END-of-./patches/opatch-01'
Xdiff -c ./display.c ../goodwork/display.c
X*** ./display.c	Sat Nov 21 15:16:33 1998
X--- ../goodwork/display.c	Sat Nov 21 14:59:23 1998
X***************
X*** 574,580 ****
X--- 574,582 ----
X  char	*text; 
X  {
X  	extern	int	errno, sys_nerr;
X+ #ifdef	NEEDS_SYS_ERRLIST_PROTO
X  	extern	char	*sys_errlist[];
X+ #endif
X  	char	msg[MSGLEN + 1];	/* message */
X  	register char	*s;
X  
Xdiff -c ./getwd.c ../goodwork/getwd.c
X*** ./getwd.c	Sat Nov 21 15:16:34 1998
X--- ../goodwork/getwd.c	Sat Nov 21 14:14:53 1998
X***************
X*** 14,20 ****
X  	return(getcwd(dir, 200));
X  }
X  #else
X! #ifndef BSD
X  /*
X   *	char *getwd(dir)
X   *
X--- 14,20 ----
X  	return(getcwd(dir, 200));
X  }
X  #else
X! #if	!defined(BSD) && !defined(__linux__)
X  /*
X   *	char *getwd(dir)
X   *
Xdiff -c ./global.h ../goodwork/global.h
X*** ./global.h	Sat Nov 21 15:16:34 1998
X--- ../goodwork/global.h	Sat Nov 21 14:55:55 1998
X***************
X*** 33,39 ****
X  #if AIX
X  typedef	long	pid_t;
X  #else
X! typedef	int	pid_t;
X  #endif
X  #endif
X  #endif
X--- 33,43 ----
X  #if AIX
X  typedef	long	pid_t;
X  #else
X! #if BSD
X! #include <sys/types.h>	/* pid_t */
X! #else
X! typedef	int	pid_t; /
X! #endif
X  #endif
X  #endif
X  #endif
Xdiff -c ./library.h ../goodwork/library.h
X*** ./library.h	Sat Nov 21 15:16:34 1998
X--- ../goodwork/library.h	Sat Nov 21 14:14:54 1998
X***************
X*** 42,47 ****
X--- 42,48 ----
X  
X  /* vp*.c */
X  FILE	*vpfopen(char *filename, char *type);
X+ struct	stat;	/* Forward declaration */
X  void	vpinit(char *currentdir);
X  int	vpopen(char *path, int oflag);
X  int	vpstat(char *path, struct stat *statp);
Xdiff -c ./main.c ../goodwork/main.c
X*** ./main.c	Sat Nov 21 15:16:35 1998
X--- ../goodwork/main.c	Sat Nov 21 14:51:57 1998
X***************
X*** 1313,1319 ****
X  	
X  /* string comparison function for qsort */
X  
X! #ifdef __BORLANDC__
X  int
X  compare(const void *s1, const void *s2)
X  {
X--- 1313,1319 ----
X  	
X  /* string comparison function for qsort */
X  
X! #if	defined(__BORLANDC__) || defined(__STDC__)
X  int
X  compare(const void *s1, const void *s2)
X  {
Xdiff -c ./makefile ../goodwork/makefile
X*** ./makefile	Sat Nov 21 15:16:35 1998
X--- ../goodwork/makefile	Sat Nov 21 15:16:15 1998
X***************
X*** 1,7 ****
X--- 1,12 ----
X+ # DEBUG=-pg
X  PROGRAM = cscope
X  BIN = $(HOME)/bin
X  CURSES = -lcurses
X  LIBS = -lPW
X+ # Linux calls it libfl
X+ # LEXLIB=-lfl
X+ LEXLIB=-ll
X+ 
X  
X  # for System V Release 2 change the U to D:
X  SVR2 = U
X***************
X*** 11,22 ****
X  
X  # for System V Release 4  or  Solaris  remove the #:
X  #LIBS = -lgen
X  
X  # for Berkeley UNIX based machines change the U to D:
X! BSD = U
X  
X  # for Berkeley UNIX based machines remove the #:
X! #LIBS = -ltermcap
X  
X  # for Berkeley UNIX 4.2 change the U to D:
X  BSD42 = U
X--- 16,28 ----
X  
X  # for System V Release 4  or  Solaris  remove the #:
X  #LIBS = -lgen
X+ #CFLAGS+=-DNEEDS_SYS_ERRLIST_PROTO -DHAS_ATTLEX
X  
X  # for Berkeley UNIX based machines change the U to D:
X! BSD = D
X  
X  # for Berkeley UNIX based machines remove the #:
X! LIBS = -ltermcap
X  
X  # for Berkeley UNIX 4.2 change the U to D:
X  BSD42 = U
X***************
X*** 55,61 ****
X  FILES	= $(OTHER) $(SOURCE) $(PROGRAM).1 $(EXTRA)
X  
X  $(PROGRAM): $(OBJECTS)
X! 	$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(CURSES) -ll $(LIBS)
X  $(OBJ): constants.h
X  crossref.o find.o invlib.o: invlib.h
X  dir.o: ndir.h vp.h
X--- 61,67 ----
X  FILES	= $(OTHER) $(SOURCE) $(PROGRAM).1 $(EXTRA)
X  
X  $(PROGRAM): $(OBJECTS)
X! 	$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(CURSES) $(LEXLIB) $(LIBS)
X  $(OBJ): constants.h
X  crossref.o find.o invlib.o: invlib.h
X  dir.o: ndir.h vp.h
X***************
X*** 115,123 ****
X  rmake:  rmake!svr2 rmake.svr2 rmake.svr3 rmake.svr4 rmake.bsd rmake.solaris
X  
X  # set NAME to "and name=type" to select individual types
X! rmake!svr2:		cscope.cpio
X! 		$(TOOLS)/adm/bin/machines -f type name!=3b20 and name!=vax and release!=SunOS and release!=BSD4.3 and release!=SVR4 and name!=i386 $(NAME) | xargs -l1 -i -t $(RMAKE) -p cscope -P .pkg.cscope -s cscope.cpio -t cscope -u -m {}
X! 
X  rmake.svr2:		cscope.cpio
X  		$(TOOLS)/adm/bin/machines -f type release=SVR2 and name!=ibm $(NAME) | xargs -l1 -i -t $(RMAKE) -p cscope -P .pkg.cscope -s cscope.cpio -t cscope -u -m {} SVR2=D
X  
X--- 121,129 ----
X  rmake:  rmake!svr2 rmake.svr2 rmake.svr3 rmake.svr4 rmake.bsd rmake.solaris
X  
X  # set NAME to "and name=type" to select individual types
X! #rmake!svr2:		cscope.cpio
X! #		$(TOOLS)/adm/bin/machines -f type name!=3b20 and name!=vax and release!=SunOS and release!=BSD4.3 and release!=SVR4 and name!=i386 $(NAME) | xargs -l1 -i -t $(RMAKE) -p cscope -P .pkg.cscope -s cscope.cpio -t cscope -u -m {}
X! #
X  rmake.svr2:		cscope.cpio
X  		$(TOOLS)/adm/bin/machines -f type release=SVR2 and name!=ibm $(NAME) | xargs -l1 -i -t $(RMAKE) -p cscope -P .pkg.cscope -s cscope.cpio -t cscope -u -m {} SVR2=D
X  
X***************
X*** 138,141 ****
X  
X  repall:		
X  		$(TOOLS)/adm/bin/machines types | xargs -l1 -i -t $(REPFILE) -p cscope -P .pkg.cscope -s cscope.{} -t bin/cscope -x -v {}
X- 
X--- 144,146 ----
XOnly in .: makefile.rej
Xdiff -c ./scanner.l ../goodwork/scanner.l
X*** ./scanner.l	Sat Nov 21 15:16:36 1998
X--- ../goodwork/scanner.l	Sat Nov 21 15:01:56 1998
X***************
X*** 1,3 ****
X--- 1,4 ----
X+ %array
X  %{
X  /*	Copyright (c) 1988 AT&T	*/
X  /*	  All Rights Reserved  	*/
X***************
X*** 13,18 ****
X--- 14,20 ----
X  
X  #include "global.h"
X  
X+ #ifdef	HAS_ATTLEX
X  /* the line counting has been moved from character reading for speed */
X  /* comments are discarded */
X  #undef	input
X***************
X*** 27,32 ****
X--- 29,43 ----
X  #endif
X  #undef	unput
X  #define unput(c) (*yysptr++=(c))
X+ #else	/* HAS_ATTLEX */
X+ int 
X+ noncommentinput()
X+ {
X+ 	int c;
X+ 	c = input();
X+ 	return  (c == EOF) ? LEXEOF : c;
X+ }
X+ #endif	/* HAS_ATTLEX */
X  
X  /* not a preprocessor line (allow Ingres(TM) "## char var;" lines) */
X  #define	notpp()	(ppdefine == NO && (*yytext != '#' || yytext[1] == '#'))
X***************
X*** 40,45 ****
X--- 51,59 ----
X  int	first;	/* buffer index for first char of symbol */
X  int	last;	/* buffer index for last char of symbol */
X  int	lineno;	/* symbol line number */
X+ #ifndef	HAS_ATTLEX
X+ int	yylineno; /* current line number */
X+ #endif
X  
X  static	BOOL	arraydimension;		/* inside array dimension declaration */
X  static	BOOL	bplisting;		/* breakpoint listing */
X***************
X*** 74,79 ****
X--- 88,94 ----
X  static	int	token;			/* token found */
X  
X  void	multicharconstant();
X+ 
X  %}
X  identifier	[a-zA-Z_][a-zA-Z_0-9]*
X  number		\.?[0-9][.0-9a-fA-FlLuUxX]*
X***************
X*** 197,202 ****
X--- 212,256 ----
X  			return(INCLUDE);
X  			/* NOTREACHED */
X  		}
X+ "//"		{		/* Skip C++ comment */
X+ 			int c;
X+ 			while ( (c = input()) != '\n' && c != EOF) 
X+ 				;
X+ 			if (c == EOF) {
X+ 				return LEXEOF;
X+ 			} else {
X+ 				unput(c);
X+ 			}
X+ 			goto more;
X+ 		}
X+ 
X+ "/*"		{
X+ 			int c;
X+ 
X+ 			for ( ; ; ) {
X+ 				/* eat up text of comment */
X+ 				while ( (c = input()) != '*' && c != EOF ) {
X+ 					if (c == '\n') {
X+ 						yylineno++;    
X+ 					}
X+ 				}
X+ 		    
X+ 
X+ 				if ( c == '*' ) {
X+ 					while ( (c = input()) == '*' )
X+ 						;
X+ 					if (c == '\n') {
X+ 						yylineno++;
X+ 					}
X+ 					if ( c == '/' )
X+ 						break;    /* found the end */
X+ 				}
X+ 
X+ 				if ( c == EOF )
X+ 					return LEXEOF;
X+ 			}
X+ 			goto more;
X+ 		}
X  \{		{	/* count unmatched left braces for fcn def detection */
X  			++braces;
X  			
X***************
X*** 589,595 ****
X  \n		{	/* end of the line */
X  			if (ppdefine == YES) {	/* end of a #define */
X  				ppdefine = NO;
X! 				(void) yyless(yyleng - 1);	/* rescan \n */
X  				last = first;
X  				yymore();
X  				return(DEFINEEND);
X--- 643,649 ----
X  \n		{	/* end of the line */
X  			if (ppdefine == YES) {	/* end of a #define */
X  				ppdefine = NO;
X! 				yyless(yyleng - 1);	/* rescan \n */
X  				last = first;
X  				yymore();
X  				return(DEFINEEND);
END-of-./patches/opatch-01
echo c - ./pkg
mkdir -p ./pkg > /dev/null 2>&1
echo x - ./pkg/COMMENT
sed 's/^X//' >./pkg/COMMENT << 'END-of-./pkg/COMMENT'
Xan interactive C program browser
END-of-./pkg/COMMENT
echo x - ./pkg/DESCR
sed 's/^X//' >./pkg/DESCR << 'END-of-./pkg/DESCR'
XThis port of Lucent Technologies 'cscope' from the Software Toolchest
XVolume II lets one easily navigate large C programs.  It's designed
Xto answer questions like where symbols are defined and used, and where
Xvariables are assigned.
X
XA source site license is available for approximately US$500 from distributors
Xsuch as Unipress Software, <http://www.unipress.com/att>, or directly
Xfrom Lucent,  <http://www.lucent.com/ssg/html/toolchest.html>.
X
X	-castor fu
X	castor@alumni.caltech.edu
END-of-./pkg/DESCR
echo x - ./pkg/PLIST
sed 's/^X//' >./pkg/PLIST << 'END-of-./pkg/PLIST'
Xbin/cscope
END-of-./pkg/PLIST
exit

>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811220025.QAA16771>