Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!amdahl!rtech!bobm@rtech.UUCP From: bobm@rtech.UUCP (Bob McQueer) Newsgroups: comp.sources.wanted Subject: Re: #include file usage checker Message-ID: <1801@rtech.UUCP> Date: 11 Mar 88 20:38:42 GMT References: <186@heurikon.UUCP> Sender: news@rtech.UUCP Lines: 22 I've been fiddling around with a header file analysis tool which might answer the need. What I'm really interested in is following out header file dependencies, sorting the files into topological order based on the definitions & typedefs from one header which are needed by others, and giving you a cross reference of what things are defined (or multiply defined) in what files and undefined in the whole mess. I haven't really honed up this thing the way I want it yet, but what you would do is say: hat
-q and among the voluminous output would be the dependencies of on the other files. The -q says to take any symbols which are included in unrecognized syntax, and treat them as references instead of ignoring them. I've really only implemented recognition of the syntax for preprocessor stuff and typedef's, not executable c code since I was intending the tool to analyze sets of headers. It might not do to bad on source files, if spiffed up to recognize a bit more syntax, such as declarations and statement keywords so that they don't turn up as bogus undefined "references". If there is interest, I would post the thing.