Path: utzoo!dciem!nrcaer!cognos!brianc From: brianc@cognos.uucp (Brian Campbell) Newsgroups: comp.sources.wanted Subject: Re: CSCOPE program Message-ID: <1960@cognos.UUCP> Date: 10 Dec 87 17:31:16 GMT Article-I.D.: cognos.1960 Posted: Thu Dec 10 12:31:16 1987 References: <361@n8emr.UUCP> Reply-To: brianc@cognos.UUCP (Brian Campbell) Organization: Cognos Incorporated, Ottawa, Canada Lines: 37 In article <361@n8emr.UUCP> lwv@n8emr.UUCP (Larry W. Virden) writes: > From the ATT toolchest there is a program called cscope which generates > what looks like a tags like file for one's c programs, headers, etc. and > then gives you an interactive interface to the file, displaying all > lines which contain a variable, etc. > > Does anyone know of a public domain program which works similarly - that > is, allows you to specify a series of files, then allows you to show only > those occurances of a specific variable in all specified files, etc.? Try the "C cross-referenence database system" submitted by Greg McGary (sun!suneast!kumquat!gmcgary). His description of the package follows: This is a program identifier database package. These tools provide a logical extension to ctags. (which is limited in that it only stores the location of function and type *definitions*). The ID facility stores the locations for all uses of identifiers, pre-processor names, and numbers (in decimal, octal or hex). The id-database is most useful for maintaining large programs that consist of many source files. The database is simply a two dimensional boolean array indexed by identifier-name and source-file-name. For a given identifier and source-file, if the identifier occurs in the file, the boolean value is TRUE. The database may be queried either by identifier-name or file-name. > I dont have a Unix source license for my Apple II yet :-) yet I find > that programming without such a tool is rather drab. If you're planning on running this on a 16 bit machine, you will have to make some extensive modifications. The code expects you to have 32 bit integers (it does malloc's on longs, and lseek's with integers). I have it working reasonably well on my AT and if necessary I can mail you my changes ... -- Brian Campbell uucp: decvax!utzoo!dciem!nrcaer!cognos!brianc Cognos Incorporated mail: POB 9707, 3755 Riverside Drive, Ottawa, K1G 3Z4 (613) 738-1440 fido: (613) 731-2945 300/1200, sysop@1:163/8