Wanted - Auto function prototype generator

Geoff Rimmer geoff at warwick.UUCP
Mon Jan 23 18:09:25 AEST 1989


Has anyone written, or are they in the middle of writing a program
that vaguely fits the following description?

The program should scan thru a set of C source files, checking each
function definition.  If the function is extern, it should place a
function prototype in the relevant header file (if it was in foo.c,
put the proto in foo.h).  If the function is static, it should place a
prototype at the top of that .c file.

In fact, why not go a stage further, and make it check which functions
call which other functions, and hence put the necessary #include lines
at the head of each source file.

Can this be done?  Or is it just pie in the ozone layer?

Geoff

	------------------------------------------------------------
	Geoff Rimmer, Computer Science, Warwick University, England.
			geoff at uk.ac.warwick.emerald

	"Not work then?"
	"No, my Dad's dying." [shrug]
	"Your Dad's dying?  This could be tre`s bona news."
	"Filthy, I must say I find your at a trifle cal."

		- Filthy Rich and Catflap, 1986.
	------------------------------------------------------------



More information about the Comp.lang.c mailing list