[comp.lang.c] Function Hierarchy

dsr@stl.stc.co.uk (David Riches) (02/02/90)

I'm looking for a package/tool which, given a set of C files, will
produce an output which describes the hierarchy of the files.

I.e. it will show, perhaps in a diagrammatic way, where functions
are called.

E.g.
	main()
	    load_site_form()
		load_site_points()
		load_nodes()
	    display_form()
	    edit_form()
		change_attributes()
		    specify_new_values()
		    validate_new_values()
		save_changes()

And so on.  It would be nice if it could list the hierarchy in a
number of different ways, e.g. show variables, not show system calls
etc.


If anyone knows of such tools could they please let me know as soon
as possible.

Thanks


   Dave Riches
   PSS:    dsr@stl.stc.co.uk
   ARPA:   dsr%stl.stc.co.uk@earn-relay.ac.uk
   Smail:  Software Design Centre, (Dept. 103, T2 West), 
	   STC Technology Ltd., London Road,
	   Harlow, Essex. CM17 9NA.  England
   Phone:  +44 (0)279-29531 x2496

mni@spodv2.UUCP (Mats Nilsson) (02/05/90)

In article <2629@stl.stc.co.uk>, dsr@stl.stc.co.uk (David Riches) writes:
> I'm looking for a package/tool which, given a set of C files, will
> produce an output which describes the hierarchy of the files.
> ...
> And so on.  It would be nice if it could list the hierarchy in a
> number of different ways, e.g. show variables, not show system calls
> etc.

Why not try cflow(1), read man cflow for details. I'm not sure
whether you can skip the system calls, but I usually redirect the
output to a file and then edit away the unecessary details. Remember
to give path names (-I...) to all include files to get it right.
It is possible to give wildcards in file specifications.

/Mats Nilsson, AF-Mandator Teknik AB

PS. I'm just hired by Philips.