Is there any tools to assist in diagramming a large C library? I am working on a project to port an existing C library to C++. The C library is largely undocumented with no diagrams. I would like to use a CASE tool to help me understand how the various files interact. There is extern variables in most of the files.
If possible I would prefer a visual diagram to better understand the flow of the code. I am not familiar with a diagramming tool for procedual lanagues (or if it even exists). I remember in college we use to use hierarchy and data flow diagrams for procedual languages.
I know there exists many tools for diagramming OO lanaguages, but I would like one for C. Any help would be appreciated.
Suggestions:
It can help you in three ways:
It can generate an on-line documentation browser (in HTML) and/or an off-line reference manual (in ) from a set of documented source files. There is also support for generating output in RTF (MS-Word), PostScript, hyperlinked PDF, compressed HTML, and Unix man pages. The documentation is extracted directly from the sources, which makes it much easier to keep the documentation consistent with the source code. You can configure doxygen to extract the code structure from undocumented source files. This is very useful to quickly find your way in large source distributions. You can also visualize the relations between the various elements by means of include dependency graphs, inheritance diagrams, and collaboration diagrams, which are all generated automatically. You can even `abuse' doxygen for creating normal documentation.
Improve your code base quality. CppDepend is a tool that simplifies managing a complex C\C++ (Native,Mixed and COM) code base. Architects and developers can analyze code structure, specify design rules, do effective code reviews and master evolution by comparing different versions of the code. These Cases Studies shows the utility of CppDepend to have a deep view of your architecture, design and implementation. Refactor and Improve your design and architecture. CppDepend provides useful graphs to analyze your design and architecture. CQL language gives you a flexibility to create your custom queries and have a deep view of your code base. here's a sample of using CppDepend to assist your refactoring. Assist your migration. Understanding the existing migration. CppDepend helps you in your migration process, you can find here the advantages of using CppDepend in your migration process.
Doxygen can generate various types of interaction diagrams - files, function calls, etc. With the EXTRACT_ALL configuration variable set, it will generate diagrams and cross-referenced documentation even for code without documentation comments.