Argument declaration style (Was: ANSI C prototypes)

Richard Caley rjc at uk.ac.ed.cstr
Fri Nov 9 06:11:46 AEST 1990


In article <BZS.90Nov6205843 at world.std.com> bzs at world.std.com (Barry Shein) writes:

    [how to grep for declarations...]

how about

	% alias defof 'awk "/^\!:1\(/,/\)/ {print}" *.c'
	% defof lpc_synth
	lpc_synth(struct utterance *utterance,
	          struct diphone_set *diphones,     /* must be `open' */
	          struct residual *residual)


(or variations thereof for your indentation style).

extension to print file name, line number and the type of the function
(which is on the line before) are left as an exorcise to the interested
reader. (I don't bother since if want to know where it is I build a
TAGS table and I rarely forget the return type, just the arguments).

--
rjc at uk.ac.ed.cstr		``I saw the wheels of neilism rolling my way
				  and now I live life in the bus lane''
					- Half Man Half Biscuit,
					    `Architecture and Morality'



More information about the Comp.lang.c mailing list