ctags does this. It looks through C code for such things and builds an index file which can be used with some editors to find definitions of function you call from your own code. For example vi can read these tags files. This tagging method is a real gem, and it's really really worth finding out how it works.
If you use emacs, it doesn't read tags files generated by ctags, but has a very similar program called etags which creates tags for emacs.
Typical use is that you open a program file, see a function used from some library which you're not familiar with, move the cursor over the function, press some key combo, and the editor opens the file where that function is defined and jumps to the definition. It's really great.
The tags and etags output are well documented formats, and you'll be able to use them in your own code easily.
|