[comp.lang.c] finding func. declaration in awk

nacer@hpmcaa.mcm.hp.com (Abdenacer Moussaoui) (03/28/90)

Can anyone provide awk code to recognize C function interface?
I would like to insert text before and after function declarations
as in:
					/* start marker */
static int ErrHandler(
	DBPROCESS * dbproc,
	int severity,
	int oserr )
					/* end marker */
{
	..body..
}

I am not very familiar with all of what can go into C functions declarations
(ie. extern, void, PASCAL, VOID, ...) to be able to generalize.  Can this
be done? or are C function declarations too ambiguous to handle with
awk and regular expressions?

Any hints are very appreciated?  the code does not have to be full proof,
handling most cases will do.

Thanks to all of you out there..   or is out here :-)