How do I extract a list of function prototypes from C++ code?

Matt Graham danceswithcrows at usa.net
Thu Mar 11 12:06:52 MST 2010


From: X Y <achaios_1 at yahoo.com>
> I assume that by "every function prototype" you mean that you want to have
> a list of all functions of every class. If my assumption is correct I can
help you.
> I do not know Perl or similar stuff, the best way to do such a job is to use
C.

Seriously?  I'm thinking that's overkill of an insane degree.  If you have
exuberant-ctags installed (many people will), then go into the root dir of
the project.  Run ctags -R .  "grep 'f$' tags | sed -e 's#.*/\^##' -e
's#\$/.*##' > functions.txt" .  You may have to sort that and pipe it
through uniq to get a better list.  At least, that should get you a first
approximation with minimal effort, and a ctags guru could probably get a
better solution.  This is what I came up with in 5 minutes.

-- 
Matt G / Dances With Crows
The Crow202 Blog:  http://crow202.org/wordpress/
There is no Darkness in Eternity/But only Light too dim for us to see




More information about the PLUG-discuss mailing list