Style filters

wjm at teddy.UUCP wjm at teddy.UUCP
Thu Jan 23 00:39:31 AEST 1986


In article <1748 at brl-tgr.ARPA> chris at maryland.arpa (Chris Torek) writes:
>4.3BSD will come with a program called `indent', which is a rewrite

4.2BSD already comes with the indent program.

>of James Gosling's rewrite of the program from the University of
>Illinois.  The program has an amazing number of options to control
>its output (48, to be exact, though one of those is not output
>control); default plus two options and it emits `Joy normal form'
>code (4.2/4.3 kernel style).
>
>As most people seem to be concerned with brace style, I will describe
>indent's treatment of braces.  It currently handles the following two
>styles:
>
>	if (...)
>	{
>		code
>	}
>
>or
>
>	if (...) {
>		code
>	}
>
>
>It does not do
>
>	if (...)
>		{
>		code
>		}
>
>which is somewhat unfortunate; I almost added it but gave up since
>I myself do not use it, and since that particular translation can
>be accomplished with a `sed' script in emergencies.

I have modified indent to support the third bracket/indentation
style.  I have posted a copy of the diff's to indent to net.sources.

						Enjoy
						bill masek



More information about the Comp.lang.c mailing list