cfunctions (pronounced `see-functions') is a C utility for extracting function prototypes and global variables from C files.Try it!
Try running cfunctions on a C file.
cfunctions takes C files and extracts global information such as function prototypes and external variable declarations from them.
This is useful for
cfunctions's default behaviour is to run as a filter (pipe) reading a C file from standard input and writing to standard output. It can also read files from the command line, and make complete header files, with a banner at the top, a preprocessor wrapper, and copying of verbatim material such as typedefs, macros or struct definitions automatically generated.
cfunctions can also optionally make GNU C style `extern inline' functions by copying the inline functions into the header file, with a normal prototype for the case of non-GNU C compilers.
cfunctions cuts down on the cost of making header files and maintaining them compared to hand-editing.
One can also use it to make forward declarations for static functions, etc. by using it as a pipe. It can also make a tag table from the C file.
cfunctions can be controlled by command-line switches and by directives in the C files themselves.
cfunctions can be downloaded from http://sourceforge.net/projects/cfunctions/.
There is a "git" repository for cfunctions. This repository does not contain header files which are generated by Cfunctions itself, so it is not possible to compile these sources. It is necessary to have a working version of Cfunctions in order to build it. People who wish to develop Cfunctions should download it from sourceforge.net to create a working version, and build it, before forking the repository.
There is a mailing list for this program at http://groups.google.com/group/cfunctions. It is possible to mail to the list at firstname.lastname@example.org. New versions are announced on the mailing list.
Bugs and all problems should be reported to the maintainer via email, or to the mailing list.
Please see the online manual.
The following open-source projects have a similar goal to Cfunctions.
Makeheaders by D. Richard Hipp, also author of the SQLite software, creates a header file from a C file in a similar way to Cfunctions. It also works for C++ files.