I wrote a cross-reference generator for K&R C (doesn't work
for C++ ... may not work for ANSI C). I can try to dig it
up if anybody is interested.
--
-Richard M. Hartman
[EMAIL PROTECTED]
186,000 mi./sec ... not just a good idea, it's the LAW!
> -----Original Message-----
> From: Eric House [mailto:[EMAIL PROTECTED]]
> Sent: Monday, December 20, 1999 10:25 AM
> To: [EMAIL PROTECTED]
> Subject: Re: GCC/Cross-Reference
>
>
> > Does anyone know of an option to GCC to create a cross-reference of
> > what routines invoke other routines? GCC has about a zillion
> > options, but I can't find one to do this (or one to generate a
> > simple compiler listing for that matter).
>
> On Unix/Linux, anyway, that's traditionally done with your editor
> rather than the compiler. Emacs, for example, comes with an app
> called etags that generates a database emacs can then use to jump
> directly to the place where a function is defined, where a type is
> declared, where a global variable is defined, etc. I understand that
> vi has a similar capability.
>
> I don't know if any of this is available in the 'Dows
> versions of these
> fine editors.
>
> --Eric House
>
> PS Here's an example of how you'd use etags and emacs.
>
> 1) at a shell prompt, run 'etags *.c *.h' to build a TAGS file in the
> current directory that's based on all the .h and .c files found
> there. (I do this often enough that all my Makefiles now have a
> "tags:" target.)
> 2) In emacs, type 'M-x visit-tags-file' and pull in the file
> TAGS you just
> built.
> 3) In some .c file, put the cursor on the name of a function or macro
> defined elsewhere in your code and type 'M-.' Emacs will jump
> to the definition, opening the file if necessary.
>
> **************************************************************
> ****************
> * From the desktop of: Eric House, [EMAIL PROTECTED]
> *
> * Check out Crosswords for PalmOS:
> <http://www.peak.org/~fixin/xwords> *
> * "The
> instructions said 'Win98 or better' -- so I installed Linux" *
> **************************************************************
> ****************
>
>