home *** CD-ROM | disk | FTP | other *** search
- C Cross Reference DataBase
- by: Greg McGary
- Amiga Port by Rick Schaeffer
- E. 13611 26th Ave.
- Spokane, Wa. 99216
-
- This archive contains binaries and documentation for a really nice C
- language cross-reference data base system. The following documents are
- for the Unix environment it was originally written for. Except for the
- differences I will note below the programs work as documented. The
- documents are:
-
- mkid.man
- lid.man
- tutorial
-
- First, the caveats:
- This system was designed for the Unix programming environment and, as such,
- expects that the underlying shell program will expand command line wild-
- card arguments. I thought of using the Arp library wildcard expansion
- routines but then I would have had to restrict users to those that had
- installed the Arp library. Personally, I use the Matt Dillon/Steve Drew
- shell program (often known as "csh") on my system and it performs all
- wildcard expansions quite nicely (as any decent shell should!). This
- system, while useable without wildcard expansion, really needs it and so
- that is the one restriction on it's use...you must be running either "csh"
- or some equivalent shell which expands command line wildcards and passes
- a proper "argv" array to the program being run. I will be posting the
- source to this system so that those that can't or won't run "csh" or it's
- equivalent can add wildcard expansion themselves.
-
- In Unix, the "lid" program is actually linked to two other names: "eid" and
- "gid". Since we can't link files together on Amigados in this manner, I
- added a flag, "-g", to "lid" which makes it run the "gid" functions as
- documented in "lid.man". Typing "lid -g string" is the same as typing
- "gid string" under Unix. On my system, I have placed a file named "gid.sh"
- in my command search path which is a one line csh script and is included in
- this arc file. Since "csh" will automatically execute a file containing
- a ".sh" extension as a script, this means that I can type "gid string"
- just as I do on Unix. Put "gid.sh" in the same place you put the other
- files.
-
- Under Unix, the "eid" function of "lid" automatically invokes the "vi"
- editor with the files found in the data base and does an automatic
- search for the desired string. I have not yet implemented this function
- on Amigados...so "eid" doesn't work.
-
- Other than the differences in root directory naming (which should be
- transparent to the user), this program should function exactly as
- documented in the manual pages. One really good use I have found for
- it (aside from keeping track of symbols in a rather large system I am
- developing on the Amiga) is to create a database of all the symbols in
- the standard "include" files. To do this, just change to the directory
- which contains all of your ".h" files and type:
-
- mkid *.h */*.h
-
- This will create a file named "ID" in your "include" directory. You can
- then type, for instance, "lid FileInfoBlock" and it will instantly tell
- you which file(s) reference that symbol. If you type "gid FileInfoBlock",
- then it will also display the lines of the files that reference that
- symbol. It's similar to grep only *MUCH* faster. If you are currently
- "cd'd" to "include/graphics" it will automatically find the ID file in
- the parent directory (you don't have to cd to it in order to run lid or
- gid) and will report pathnames of files it finds relative to the directory
- you are currently in! Really nice tool!
-
- Rick Schaeffer
- 70120,174
-